Vehicle scheduling method, computer equipment and computer readable storage medium
Through deep learning models, the feature vectors of the vehicle scheduling scheme are evaluated and the vehicle allocation is dynamically adjusted, which solves the problem of low rationality of vehicle scheduling caused by fixed scheduling rules in the prior art, and improves the efficiency and effect of scheduling.
Patent Information
- Application Number
- CN202510160295.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-13
AI Technical Summary
The scheduling rules in the existing vehicle scheduling plan are fixed and cannot be dynamically adjusted to meet order demand, resulting in low rationality in vehicle scheduling.
By obtaining the order set and the vehicle set to be dispatched, the initial dispatch scheme set is determined, and the feature vectors of each initial dispatch scheme are evaluated through the deep learning model to determine the target vehicle matching each order.
The rationality of vehicle scheduling is improved. By dynamically adjusting the vehicle allocation plan, the order and vehicle characteristics can be considered more accurately, thereby improving the efficiency and effectiveness of scheduling.
Smart Images

Figure CN119990665A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle dispatching, and in particular to a vehicle dispatching method, a computer device and a computer-readable storage medium. Background Art
[0002] In many fields involving vehicle dispatch, such as logistics distribution, travel services, etc., a reasonable vehicle dispatch plan is the key to achieving rational allocation of resources.
[0003] In the related art, the vehicle dispatching scheme mainly adopts the dispatching scheme based on dispatching rules, for example, the vehicle is allocated according to the idle time of the vehicle, the distance of the vehicle from the task location, or the matching degree between the vehicle type and the cargo demand.
[0004] However, the scheduling rules in the vehicle scheduling scheme in the related art are often fixed and cannot be dynamically adjusted according to the needs of the order, which leads to the problem of low rationality of vehicle scheduling. Summary of the invention
[0005] Based on this, the present application provides a vehicle scheduling method, a computer device and a computer-readable storage medium, which can improve the rationality of vehicle scheduling.
[0006] In a first aspect, the present application provides a vehicle dispatching method, the method comprising:
[0007] Obtain an order set and a set of vehicles to be dispatched, and determine an initial vehicle dispatching plan set based on the order set and the set of vehicles to be dispatched; each initial vehicle dispatching plan in the initial vehicle dispatching plan set includes each order in the order set and an initial vehicle to be dispatched matching each order;
[0008] Obtaining feature vectors of each initial vehicle dispatching scheme, and obtaining scores of each initial vehicle dispatching scheme under at least two decision schemes by inputting the feature vectors of each initial vehicle dispatching scheme into a deep learning model;
[0009] The target vehicle for matching each order is determined based on the scores of each initial vehicle dispatch plan under at least two decision plans.
[0010] In some embodiments, determining an initial vehicle dispatching solution set according to an order set and a vehicle to be dispatched set includes:
[0011] Determine each transportation distance between the delivery location of each order and each vehicle to be dispatched in the set of vehicles to be dispatched, and obtain a set of transportation distances for each order;
[0012] Determine a preset number of target transportation distances with the shortest transportation distances from the transportation distance set of each order;
[0013] From a preset number of vehicles to be dispatched that match a preset number of target transportation distances, the vehicle to be dispatched with the longest idle time is determined as the initial vehicle to be dispatched for matching each order.
[0014] In some embodiments, obtaining a feature vector of each initial vehicle dispatching scheme includes:
[0015] Obtain the remaining capacity characteristic value of each initial vehicle to be dispatched and the urgency of each order;
[0016] The characteristic vector of each initial vehicle dispatching plan is determined according to the remaining load of each initial vehicle to be dispatched, the remaining cargo compartment volume of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the shipping location of the matching order, and the remaining transportation capacity characteristic value of each initial vehicle to be dispatched.
[0017] In some embodiments, obtaining the remaining capacity characteristic value of each initial vehicle to be dispatched includes:
[0018] Obtain the rated load, real-time load, standard cargo hold volume and real-time cargo volume of each initial vehicle to be dispatched;
[0019] Determine the remaining load ratio of each initial vehicle to be dispatched according to the rated load and real-time load of each initial vehicle to be dispatched;
[0020] Determine the remaining volume ratio of each initial vehicle to be dispatched according to the standard cargo compartment volume and real-time cargo volume of each initial vehicle to be dispatched;
[0021] According to the remaining load ratio and the remaining volume ratio of each initial vehicle to be dispatched, the remaining capacity characteristic value of each initial vehicle to be dispatched is determined.
[0022] In some embodiments, the at least two decision schemes include maintaining the original scheme and changing the vehicle scheme; determining the target vehicle for matching each order according to the scores of each initial vehicle dispatch scheme under the at least two decision schemes includes:
[0023] In the case where any initial vehicle dispatching plan maintains the highest score of the original plan, the initial vehicle to be dispatched in any initial vehicle dispatching plan is determined as the target vehicle;
[0024] In the case that the vehicle replacement scheme has the highest score in any initial vehicle dispatching scheme, the initial vehicle to be dispatched in any initial vehicle dispatching scheme is replaced with the scheduled vehicle to be dispatched, and the scheduled vehicle to be dispatched is determined as the target vehicle.
[0025] In some embodiments, before obtaining the order set and the vehicle set to be dispatched, the method further includes:
[0026] Obtain the feature vectors of each vehicle dispatching plan sample in the model to be trained and the vehicle dispatching plan sample set;
[0027] The feature vectors of each dispatch plan sample are used to update the weights in the training model to obtain a deep learning model.
[0028] In some embodiments, the feature vectors of each dispatch plan sample are used to update the weights in the training model to obtain a deep learning model, including:
[0029] Input the feature vectors of each dispatching plan sample into the j-th round model to obtain the scores of each dispatching plan sample under at least two decision plans; j is an integer greater than or equal to 1, and the first round model is the model to be trained;
[0030] Select the highest score among the scores under at least two decision schemes with a preset probability, and determine the selected score as the predicted score of the j-th round of decision scheme;
[0031] Get the actual score obtained by using the j-th round decision plan for transportation, and update the weights in the j-th round model according to the difference between the actual score and the predicted score to obtain the j+1-th round model;
[0032] When the iteration stopping condition is met, the model of the last round is determined as the deep learning model.
[0033] In some embodiments, obtaining a real score obtained by using the j-th round decision solution for transportation includes:
[0034] Obtain the actual transportation time, cargo integrity value and vehicle utilization efficiency obtained by using the j-th round decision plan for transportation;
[0035] Determine the difference in transit time between expected transit time and actual transit time;
[0036] According to the difference in transportation time, the intact status of the goods and the vehicle utilization efficiency, the actual score obtained by using the j-th round decision plan for transportation is determined.
[0037] In a second aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods of the first aspect when executing the computer program.
[0038] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods of the first aspect when the computer program is executed by a processor.
[0039] In the technical solution of the embodiment of the present application, the feature vectors of each initial vehicle dispatch plan are evaluated through a deep learning model, so that the characteristics of the orders in the initial vehicle dispatch plan and the characteristics of the initial vehicles to be dispatched can be considered, thereby improving the accuracy of the scores under at least two determined decision plans, and further improving the rationality of the target vehicles matched for each determined order. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic flow chart of a vehicle dispatching method provided for the first embodiment;
[0042] Figure 2 A schematic flow chart of a vehicle dispatching method provided for the second embodiment;
[0043] Figure 3 A schematic flow chart of a vehicle dispatching method provided for the third embodiment;
[0044] Figure 4 A schematic flow chart of a vehicle dispatching method provided for a fourth embodiment;
[0045] Figure 5 A schematic flow chart of a vehicle dispatching method provided for the fifth embodiment;
[0046] Figure 6 A schematic flow chart of a vehicle dispatching method provided for the sixth embodiment;
[0047] Figure 7 A schematic diagram of the structure of a computer device is provided for some embodiments. DETAILED DESCRIPTION
[0048] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0050] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined. In the description of the embodiments of the present application, "each" means each or each of the multiple, unless otherwise clearly and specifically defined.
[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0053] The computer device in the embodiments of the present application may include one or a combination of at least two of the following: a server, a mobile phone, a tablet computer, a computer with a sending and receiving function, a PDA, a desktop computer, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a smart watch, a smart glasses, a smart necklace and other wearable devices, a pedometer, a digital TV, a virtual reality (VR) device, an augmented reality (AR) device, an industrial control (Industrial Control) device, an unmanned driving (Self Driving) device, a remote medical surgery (Remote Medical Surgery) device, a smart grid (Smart Grid) device, a transportation safety (Transportation Safety) device, a smart city (Smart City) device, a smart home (Smart Home) device, a vehicle, a vehicle-mounted device, a vehicle-mounted module, and the like.
[0054] Figure 1 A flow chart of a vehicle dispatching method provided in the first embodiment is as follows: Figure 1 As shown, the method is applied to a computer device, and the method comprises the following steps:
[0055] S101, obtaining an order set and a set of vehicles to be dispatched, and determining an initial vehicle dispatching plan set according to the order set and the set of vehicles to be dispatched; each initial vehicle dispatching plan in the initial vehicle dispatching plan set includes each order in the order set and an initial vehicle to be dispatched matching each order.
[0056] The order set may include at least one order. For example, each order may be sent by an online order platform or a mobile client to a computer device. For example, each order may include at least one of the following: order number, starting location, destination location, cargo type, cargo weight, cargo volume, required delivery time, order urgency, etc.
[0057] The orders in the order set may be orders that have not been assigned a matched target vehicle. Exemplarily, the computer device may obtain the latest order set once every preset time period, thereby determining a matched target vehicle for each order in the latest order set.
[0058] The set of vehicles to be dispatched may include at least one of the following: vehicles to be dispatched, and vehicles that have been loaded and whose remaining capacity can meet the order requirements. For example, the models of different vehicles to be dispatched may be the same or different.
[0059] Each initial vehicle dispatch plan in the initial vehicle dispatch plan set includes an order and an initial vehicle to be dispatched that matches the order. In some embodiments, for each order, a vehicle that meets at least one of the following conditions can be selected as the initial matching vehicle: the vehicle with the shortest distance, the cargo capacity that meets the order requirements, the longest idle time, and the driving route is consistent with the transportation route of the goods or the overlap is greater than a preset threshold. Exemplarily, for each order, a vehicle with the shortest distance and the cargo capacity that meets the order requirements can be selected as the initial matching vehicle. Again exemplarily, for each order, a vehicle with the shortest distance, the cargo capacity that meets the order requirements, and the longest idle time can be selected as the initial matching vehicle. Exemplarily, for each order, a vehicle with the shortest distance, the cargo capacity that meets the order requirements, and the longest idle time can be selected as the initial matching vehicle. Exemplarily, for each order, a vehicle with the cargo capacity that meets the order requirements and the longest idle time can be selected as the initial matching vehicle.
[0060] In some embodiments, the number of initial vehicles to be dispatched for one order matching may be one, or the number of initial vehicles to be dispatched for one order matching may be at least two.
[0061] S102: Obtain feature vectors of each initial vehicle dispatching scheme, and obtain scores of each initial vehicle dispatching scheme under at least two decision schemes by inputting the feature vectors of each initial vehicle dispatching scheme into a deep learning model.
[0062] The characteristic vector of each initial vehicle dispatch plan can be determined based on at least one of the following: the remaining load of each initial vehicle to be dispatched, the remaining cargo compartment volume of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the shipping location of the matching order, and the remaining capacity characteristic value of each initial vehicle to be dispatched.
[0063] In some embodiments, in order to improve the comparability of different features, at least one of the remaining load of each initial vehicle to be dispatched, the remaining cargo space of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the delivery location of the matching order, and the remaining capacity characteristic value of each initial vehicle to be dispatched can be normalized, and the normalized data can be combined to obtain the characteristic vector of each initial vehicle dispatch plan. In other embodiments, at least one of the remaining load of each initial vehicle to be dispatched, the remaining cargo space of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the delivery location of the matching order, and the remaining capacity characteristic value of each initial vehicle to be dispatched can be combined to obtain the characteristic vector of each initial vehicle dispatch plan.
[0064] The deep learning model may be a trained model. Exemplarily, the deep learning model may be a multilayer perceptron (MLP) model. The MLP model includes an input layer, at least one hidden layer, and an output layer. The number of nodes in the input layer is the same as the dimension of the feature vector of each initial vehicle dispatching scheme, and the number of nodes in the output layer is the same as the dimension of at least two decision schemes. In this way, at least two nodes in the output layer output the scores of each initial vehicle dispatching scheme under at least two decision schemes. Exemplarily, the at least one hidden layer may include one hidden layer, two hidden layers, three hidden layers, or other numbers of hidden layers.
[0065] The different decision methods in at least two decision solutions represent the use of different vehicles. Exemplarily, the at least two decision solutions include maintaining the original solution and changing the vehicle solution.
[0066] S103: Determine the target vehicle for matching each order according to the scores of each initial vehicle dispatching plan under at least two decision plans.
[0067] In some embodiments, it is possible to determine whether the target vehicle matched by each order is the initial vehicle to be dispatched according to whether the highest score among the scores under at least two decision schemes is the score for maintaining the original scheme. Exemplarily, when the highest score corresponding to a certain order is the score for maintaining the original scheme, the target vehicle matched by the order is determined as the initial vehicle to be dispatched. Exemplarily, when the highest score corresponding to a certain order is the score for replacing the vehicle scheme, another vehicle to be dispatched other than the initial vehicle to be dispatched matched by the order in the set of vehicles to be dispatched is obtained, and the feature vector of the target dispatching scheme is determined according to the order and the other vehicle to be dispatched, and the score of the target dispatching scheme under at least two decision schemes is obtained by inputting the feature vector of the target dispatching scheme into the deep learning model, and when the highest score is the score for maintaining the original scheme, the target vehicle matched by the order is determined as another vehicle to be dispatched, otherwise, other vehicles to be dispatched are continuously obtained until the highest score is the score for maintaining the original scheme.
[0068] In the technical solution of the embodiment of the present application, the feature vectors of each initial vehicle dispatch plan are evaluated through a deep learning model, so that the characteristics of the orders in the initial vehicle dispatch plan and the characteristics of the initial vehicles to be dispatched can be considered, thereby improving the accuracy of the scores under at least two determined decision plans, and further improving the rationality of the target vehicles matched for each determined order.
[0069] Figure 2 A flow chart of a vehicle dispatching method provided for the second embodiment is as follows: Figure 2 As shown, the method is applied to a computer device, Figure 2 Example compared to Figure 1The difference between the embodiments is that S101 includes S1011 to S1013.
[0070] S1011. Obtain an order set and a set of vehicles to be dispatched, determine each transportation distance between the shipping location of each order and each vehicle to be dispatched in the set of vehicles to be dispatched, and obtain a transportation distance set for each order.
[0071] Exemplarily, the transport distance may be a European distance. Also exemplary, the transport distance may be a distance traveled by a vehicle.
[0072] Exemplarily, the order set includes order A and order B, the set of vehicles to be dispatched includes vehicle A to be dispatched, vehicle B to be dispatched and vehicle C to be dispatched, the three transportation distances between the shipping location of order A and vehicles A, B and C to be dispatched are determined respectively, and the transportation distance set of order A is obtained, the three transportation distances between the shipping location of order B and vehicles A, B and C to be dispatched are determined respectively, and the transportation distance set of order B is obtained.
[0073] In some embodiments, the set of vehicles to be dispatched may be a set of vehicles to be dispatched that are adjacent to the delivery locations of the orders in the order set. Exemplarily, the vehicles to be dispatched that are adjacent to the delivery location may be vehicles whose straight-line distance to the delivery location is less than or equal to a preset distance range. Exemplarily, the vehicles to be dispatched that are adjacent to the delivery location may be vehicles that are within the same jurisdiction as the delivery location.
[0074] S1012. Determine a preset number of target transportation distances with the shortest transportation distances from the transportation distance sets of each order.
[0075] Exemplarily, the preset number can be determined according to the number of vehicles to be dispatched in the set of vehicles to be dispatched. For example, the preset number can be a rounded value of 1 / Y times the number of vehicles to be dispatched in the set of vehicles to be dispatched. Y is an integer greater than or equal to 2.
[0076] S1013. From a preset number of to-be-dispatched vehicles that match a preset number of target transport distances, determine the to-be-dispatched vehicle with the longest idle time as the initial to-be-dispatched vehicle matching each order, and obtain an initial vehicle dispatching solution set.
[0077] In this way, a preset number of vehicles to be dispatched is first matched for each order in the order set, and then an initial vehicle to be dispatched is determined from the vehicles to be dispatched that match the preset number of vehicles to be dispatched for each order.
[0078] In some embodiments, the initial dispatched vehicles to be matched with each order may be determined in sequence. In the case of the initial dispatched vehicles determined for the current order, the initial dispatched vehicles of the current order cannot be matched with the subsequent orders. In other embodiments, the initial dispatched vehicles to be matched with each order may be determined in sequence. In the case of the initial dispatched vehicles determined for the current order, if the overlap between the cargo transportation route corresponding to a subsequent order and the transportation route of the current order is greater than a threshold, and the initial dispatched vehicles of the current order meet the transportation capacity requirements of a subsequent order, the initial dispatched vehicles of the current order may be allocated to a subsequent order.
[0079] In the technical solution of the embodiment of the present application, from a preset number of vehicles to be dispatched that match a preset number of target transportation distances, the vehicle to be dispatched with the longest idle time is determined as the initial vehicle to be dispatched for each order. This not only reduces the time for the initial vehicle to be dispatched to travel to the shipping location of the matching order and reduces idle mileage, but also helps to make full use of vehicles with longer idle time, making the vehicles' working opportunities more balanced, which helps to extend the service life of the vehicles.
[0080] Figure 3 A flow chart of a vehicle dispatching method provided for the third embodiment is as follows: Figure 3 As shown, the method is applied to a computer device, Figure 3 Example compared to Figure 1 The difference between the embodiments is that S102 includes S1021 to S1023.
[0081] S1021. Obtain the remaining capacity characteristic value of each initial vehicle to be dispatched and the urgency of each order.
[0082] In some embodiments, obtaining the residual capacity characteristic value of each initial vehicle to be dispatched includes: determining the residual load ratio of each initial vehicle to be dispatched according to the rated load and the real-time load of each initial vehicle to be dispatched, and determining the residual capacity characteristic value of each initial vehicle to be dispatched according to the residual load ratio of each initial vehicle to be dispatched. For example, the residual load ratio of each initial vehicle to be dispatched is determined as the residual capacity characteristic value.
[0083] In other embodiments, obtaining the residual capacity characteristic value of each initial vehicle to be dispatched includes: determining the volume residual ratio of each initial vehicle to be dispatched according to the standard cargo compartment volume and the real-time cargo volume of each initial vehicle to be dispatched, and determining the residual capacity characteristic value of each initial vehicle to be dispatched according to the volume residual ratio of each initial vehicle to be dispatched. For example, the volume residual ratio of each initial vehicle to be dispatched is determined as the residual capacity characteristic value.
[0084] In some other embodiments, obtaining the residual capacity characteristic value of each initial vehicle to be dispatched includes: obtaining the rated load, real-time load, standard cargo compartment volume, and real-time cargo volume of each initial vehicle to be dispatched; determining the residual load ratio of each initial vehicle to be dispatched according to the rated load and real-time load of each initial vehicle to be dispatched; determining the residual volume ratio of each initial vehicle to be dispatched according to the standard cargo compartment volume and real-time cargo volume of each initial vehicle to be dispatched; determining the residual capacity characteristic value of each initial vehicle to be dispatched according to the residual load ratio and volume residual ratio of each initial vehicle to be dispatched. Exemplarily, the residual load ratio and volume residual ratio of each initial vehicle to be dispatched can be added and divided by 2 to obtain the residual capacity characteristic value of each initial vehicle to be dispatched.
[0085] In some embodiments, obtaining the urgency of each order may include: obtaining the current time and the expected delivery time of each order, and determining the urgency of each order according to the time difference between the expected delivery time of each order and the current time. Exemplarily, when the time difference of a certain order is greater than or equal to 0 hours and less than 3 hours, the urgency of the order is determined to be 3; when the time difference of a certain order is greater than or equal to 3 hours and less than 12 hours, the urgency of the order is determined to be 2; when the time difference of a certain order is greater than or equal to 12 hours, the urgency of the order is determined to be 1.
[0086] S1022. Determine the characteristic vector of each initial vehicle dispatching plan according to the remaining load of each initial vehicle to be dispatched, the remaining cargo compartment volume of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the shipping location of the matched order, and the remaining transportation capacity characteristic value of each initial vehicle to be dispatched.
[0087] Exemplarily, the remaining load of each initial vehicle to be dispatched, the remaining cargo space of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the delivery location of the matching order, and the remaining capacity characteristic value of each initial vehicle to be dispatched can be combined to obtain a five-dimensional characteristic vector of each initial vehicle dispatching scheme. Exemplarily again, the remaining load of each initial vehicle to be dispatched, the remaining cargo space of each initial vehicle to be dispatched, the urgency of each order, the transportation distance between each initial vehicle to be dispatched and the delivery location of the matching order, and the remaining capacity characteristic value of each initial vehicle to be dispatched can be normalized to obtain a five-dimensional characteristic vector of each initial vehicle dispatching scheme.
[0088] S1023. Inputting the feature vectors of each initial vehicle dispatching scheme into the deep learning model, thereby obtaining the scores of each initial vehicle dispatching scheme under at least two decision schemes.
[0089] Figure 4A flow chart of a vehicle dispatching method provided for the fourth embodiment is as follows: Figure 4 As shown, the method is applied to a computer device, Figure 4 Example compared to Figure 1 The difference between the embodiments is that S103 includes S1031 to S1032.
[0090] S1031. When any initial vehicle dispatching plan maintains the highest score of the original plan, determine the initial to-be-dispatched vehicle in any initial vehicle dispatching plan as the target vehicle.
[0091] S1032. When the vehicle replacement scheme has the highest score in any initial vehicle dispatching scheme, the initial vehicle to be dispatched in any initial vehicle dispatching scheme is replaced with a scheduled vehicle to be dispatched, and the scheduled vehicle to be dispatched is determined as the target vehicle.
[0092] In some embodiments, an order may match at least one transportation route. In some embodiments, each initial vehicle dispatching scheme includes each order in the order set, the initial vehicles to be dispatched that match each order, and the initial transportation routes that each initial vehicle to be dispatched matches. In this manner, the feature vector of each initial vehicle dispatching scheme may also include a transportation route identifier of the initial transportation route, and at least two decision schemes may also include a transportation route adjustment scheme. Exemplarily, the initial transportation route may be a route with the shortest transportation distance.
[0093] Exemplarily, the scheduled vehicle to be dispatched may be the vehicle to be dispatched with the second longest idle time among the preset number of vehicles to be dispatched. Also exemplarily, the scheduled vehicle to be dispatched may be another vehicle other than the randomly determined initial vehicle to be dispatched among the preset number of vehicles to be dispatched.
[0094] For example, when any initial vehicle dispatching plan maintains the highest score of the original plan, the initial vehicle to be dispatched in any initial vehicle dispatching plan is determined as the target vehicle, and the initial transportation route in any initial vehicle dispatching plan is determined as the target transportation route.
[0095] For example, if the vehicle replacement scheme has the highest score in any initial dispatching scheme, the initial vehicle to be dispatched in any initial dispatching scheme is replaced with a predetermined vehicle to be dispatched, and the predetermined vehicle to be dispatched is determined as the target vehicle, and the initial transportation route matched by the predetermined vehicle to be dispatched is determined as the target transportation route. Among them, the score of maintaining the original scheme is determined to be the highest through the feature vectors of the dispatching scheme corresponding to the predetermined vehicle to be dispatched and the initial transportation route matched by the predetermined vehicle to be dispatched.
[0096] For example, when the score of the adjusted transportation route scheme is the highest in any initial vehicle dispatching scheme, the initial vehicle to be dispatched in any initial vehicle dispatching scheme is determined as the target vehicle, and another transportation route other than the initial transportation route in any initial vehicle dispatching scheme is determined as the target transportation route. The score of maintaining the original scheme is determined to be the highest through the feature vectors of the vehicle dispatching schemes corresponding to the initial vehicle to be dispatched and the other transportation route.
[0097] Figure 5 A flow chart of a vehicle dispatching method provided for the fifth embodiment is shown as follows: Figure 5 As shown, the method is applied to a computer device, Figure 5 Example compared to Figure 1 The difference between the embodiments is that, before S101, the method may further include S104 to S105.
[0098] S104, obtaining the model to be trained and the feature vector of each vehicle dispatching plan sample in the vehicle dispatching plan sample set.
[0099] The model to be trained may include a multi-layer perceptron model to be trained. Each dispatching plan sample in the dispatching plan sample set includes each order and an initial dispatching vehicle matched with each order.
[0100] Among them, the method for obtaining the feature vector of each vehicle dispatching plan sample in the vehicle dispatching plan sample set is similar to the method for obtaining the feature vector of each initial vehicle dispatching plan mentioned above, and will not be repeated here.
[0101] S105. Use the feature vectors of each vehicle dispatching plan sample to update the weights in the training model to obtain a deep learning model.
[0102] For example, the feature vectors of each vehicle dispatching solution sample can be used to update the weights in the training model using a greedy algorithm (or greedy strategy) to obtain a deep learning model.
[0103] In the technical solution provided in the embodiment of the present application, the weights in the training model are updated by adopting the feature vectors of each vehicle dispatch plan sample to obtain a deep learning model, thereby improving the accuracy of predicting the scores of each initial vehicle dispatch plan under at least two decision plans.
[0104] In some embodiments, the feature vectors of each vehicle dispatching plan sample are used to update the weights in the training model to obtain a deep learning model, including: inputting the feature vectors of each vehicle dispatching plan sample into the j-th round model to obtain the score of each vehicle dispatching plan sample under at least two decision plans; j is an integer greater than or equal to 1, and the first round model is the model to be trained; selecting the highest score under at least two decision plans with a preset probability, and determining the selected score as the predicted score of the j-th round decision plan; obtaining the actual score obtained by using the j-th round decision plan for transportation, and updating the weights in the j-th round model according to the difference between the actual score and the predicted score to obtain the j+1-th round model; when the iteration stop condition is met, determining the model of the last round as the deep learning model.
[0105] In some embodiments, satisfying the iteration stop condition may include one of the following: the number of weight updates reaches a preset number, the difference between the true score and the predicted score is less than a preset difference, the training time of the model to be trained reaches a preset time, etc.
[0106] In any embodiment of the present application, the score may be a real number greater than or equal to 0 and less than or equal to 1.
[0107] In some embodiments, updating the weights in the i-th round model according to the difference between the true score and the predicted score may include: using a loss function , update the weights in the j-th round model. Among them, represents the number of samples in the sample set of the dispatch plan, represents the true score of the i-th sample transported using the j-th round decision plan, The i-th sample uses the predicted score of the j-th round of decision-making plan.
[0108] By selecting the highest score among the scores under at least two decision schemes with a preset probability, it is not the case that the predicted score selected in each round is the highest score, but the possibility of selecting the highest score in each round is the preset probability.
[0109] In some embodiments, obtaining the real score obtained by using the j-th round decision plan for transportation includes: obtaining the actual transportation time, cargo integrity value and vehicle utilization efficiency obtained by using the j-th round decision plan for transportation; determining the transportation time difference between the expected transportation time and the actual transportation time; and determining the real score obtained by using the j-th round decision plan for transportation based on the transportation time difference, cargo integrity value and vehicle utilization efficiency.
[0110] In some embodiments, obtaining the urgency of an order can be achieved by: assuming that the expected delivery time of the order is , the current system time is . Convert the time to timestamp format uniformly, and set the timestamp conversion function to , the time Mapped to a value according to specific rules, ,in , It's time The time unit values are broken down. Calculate the time difference: , and then convert to hours: . Define the grading function To classify the urgency of the order. The expression is as follows:
[0111] .
[0112] In some embodiments, the remaining capacity characteristic value of the initial vehicle to be dispatched can be realized by obtaining the rated load, real-time load, standard cargo compartment volume and real-time cargo volume of the initial vehicle to be dispatched, and then the remaining load ratio = (rated load - actual load) / rated load, remaining volume ratio = (standard cargo hold volume - real-time cargo hold volume) / standard cargo hold volume. The remaining capacity characteristic value is obtained by combining the two. ,in, Indicates that the vehicle is fully loaded. Indicates that the vehicle is unloaded.
[0113] In some embodiments, the initial vehicle dispatching solution set can be determined by the following method: Suppose there is an order set Meet the vehicle to be dispatched . Given each order With each vehicle to be dispatched The distance value set between For each order , first filter out the subset of vehicles that are closer to their shipping locations and account for 30% of the total number of vehicles to be dispatched. The specific approach is to Order The relevant distance value Sort and pick the one with the smallest value The corresponding vehicles form a preliminary subset. is the number of vehicles to be dispatched in the set of vehicles to be dispatched. Then query the vehicle task record system to obtain the idle time of each vehicle in the preliminary subset In order of idle time from longest to shortest, select the vehicles and orders with the longest idle time from the preliminary subset. Carry out matching. Loop through all orders to generate an initial vehicle dispatching solution set .
[0114] In some embodiments, the feature vector of the initial vehicle dispatching solution is determined by: Each plan in Encoded in vector form, the vector elements contain the vehicle's rated load , Warehouse capacity , Cargo urgency , the pre-given distance between the vehicle and the order , and the residual capacity characteristic value And other key information, namely .
[0115] In some embodiments, in the constructed MLP model, the input layer dimension is set equal to the dimension of the encoding vector, 3 hidden layers are set, and the output layer corresponds to the three dimensions of maintaining the original plan, replacing vehicles, and adjusting the transportation route. Then, the weight matrix and bias vector of each layer of the model are randomly initialized.
[0116] In some embodiments, using - Greedy strategy, setting At each iteration, the model follows this strategy with probability Randomly select a decision action with probability Select the action with the highest estimated profit (i.e. the decision plan with the highest score). After each action is selected, complete the transportation process and collect the actual transportation time. , Goods in good condition (intact is recorded as 1, damaged is recorded as 0) data, and the mean square error is used as the loss function , illustratively, Set to 200, is the real transport effect value (i.e. the real score mentioned above), is the model prediction value (i.e. the prediction score mentioned above). Using the back propagation algorithm, according to the formula Update the model weights, where the learning rate After multiple rounds of iterations, the initial dispatch plan set Optimize step by step and finally converge to the candidate optimal vehicle dispatching plan.
[0117] In some embodiments, the difference between the expected delivery time and the actual transportation time of the order is calculated. The smaller the difference, the higher the efficiency. . Difference , to standardize to the (0,1) interval. Direct scoring, intact , if damaged , weight Based on the residual capacity characteristic value Scoring: To fully utilize the vehicle without overloading, score points , weight In this way, the comprehensive score calculation formula is .
[0118] In some embodiments, when the score obtained under the original plan according to the feature vector of the vehicle dispatch plan corresponding to the vehicle matched to an order is not the highest score, the scores of the candidate optimal vehicle dispatch plan and similar plans are recalculated until the score obtained under the original plan is the highest score, and the vehicle corresponding to the highest score is determined as the vehicle matching the order. In some embodiments, when there is no score under the original plan that is the highest score, all the scores obtained under the original plan can be sorted by score, and the vehicle corresponding to the highest score is determined as the vehicle matching the order.
[0119] In an embodiment of the present application, distance and idle time screening are combined to generate an initial vehicle dispatch plan, and dynamic optimization is performed through a deep reinforcement learning model to adapt to complex transportation environments.
[0120] Figure 6 A flow chart of a vehicle dispatching method provided for the sixth embodiment is shown as follows: Figure 6 As shown, the method is applied to a computer device, and the method comprises the following steps:
[0121] S601. Obtain the urgency of the order.
[0122] S602: Calculate the remaining capacity of each vehicle to be dispatched in the set of vehicles to be dispatched.
[0123] S603: Determine whether there is a dispatch vehicle that meets the transportation demand for the target order.
[0124] The target order may be any order in the order set.
[0125] If the answer of S603 is No, S604 is executed, and if the answer of S603 is Yes, S605 is executed.
[0126] S604: Adjust the vehicle that meets the transportation capacity to the target order or wait for the vehicle that meets the transportation capacity to appear.
[0127] After S604 , S602 may be executed.
[0128] S605: Filter the adjacent vehicles of the target order and match the initial vehicles to be dispatched to the target order.
[0129] S606: Generate an initial vehicle dispatch plan set.
[0130] S607: Obtain a deep learning model.
[0131] S608. Determine whether the initial vehicle to be dispatched is the optimal vehicle to be dispatched based on the feature vector of the initial vehicle dispatch plan set and the deep learning model.
[0132] If the answer of S608 is yes, S609 is executed, and if the answer of S608 is no, S610 is executed.
[0133] S609: Determine the initial vehicle to be dispatched as the target vehicle to be matched with the target order.
[0134] S610: Replace the initial vehicle to be dispatched with the scheduled vehicle to be dispatched, and determine the scheduled vehicle to be dispatched as the target vehicle matched with the target order.
[0135] In an exemplary embodiment, Figure 7 A schematic diagram of the structure of a computer device provided for some embodiments, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through wireless fidelity (Wireless Fidelity, WIFI), a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a vehicle dispatching method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0136] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0137] For example, a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.
[0138] For example, in an exemplary embodiment, the processor is used to execute a computer program to implement: obtaining an order set and a vehicle set to be dispatched, and determining an initial vehicle dispatch plan set based on the order set and the vehicle set to be dispatched; each initial vehicle dispatch plan in the initial vehicle dispatch plan set includes each order in the order set and an initial vehicle to be dispatched matching each order; obtaining a feature vector of each initial vehicle dispatch plan, and obtaining a score of each initial vehicle dispatch plan under at least two decision plans by inputting the feature vector of each initial vehicle dispatch plan into a deep learning model; and determining a target vehicle matching each order based on the score of each initial vehicle dispatch plan under at least two decision plans.
[0139] In one embodiment, a computer-readable storage medium is provided, and when a computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.
[0140] For example, in an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: an order set and a vehicle set to be dispatched are obtained, and an initial vehicle dispatch plan set is determined based on the order set and the vehicle set to be dispatched; each initial vehicle dispatch plan in the initial vehicle dispatch plan set includes each order in the order set and an initial vehicle to be dispatched matching each order; a feature vector of each initial vehicle dispatch plan is obtained, and a score of each initial vehicle dispatch plan under at least two decision plans is obtained by inputting the feature vector of each initial vehicle dispatch plan into a deep learning model; and a target vehicle matching each order is determined based on the score of each initial vehicle dispatch plan under at least two decision plans.
[0141] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0142] The processor, each functional module or each functional unit in any embodiment of the present application may include any one or more of the following integrations: general-purpose processor, application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), central processing unit (CPU), graphics processing unit (GPU), embedded neural network processor (neural-network processing units, NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component, data processing logic based on quantum computing, artificial intelligence (AI) processor, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0143] The memory or computer-readable storage medium in any embodiment of the present application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory includes the integration of one or more of the following: Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, Magnetic Surface Storage, Optical Disc, Compact Disc Read-Only Memory (CD-ROM), Tape, Floppy Disk, Flash Memory, Optical Storage, High-density Embedded Non-volatile Memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), Graphene Memory, Volatile Memory, etc. Volatile memory includes an integration of one or more of the following: Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0145] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A vehicle dispatching method, characterized in that: The method comprises: Obtaining an order set and a set of vehicles to be dispatched, and determining an initial vehicle dispatching plan set according to the order set and the set of vehicles to be dispatched; each initial vehicle dispatching plan in the initial vehicle dispatching plan set includes each order in the order set and an initial vehicle to be dispatched matching each order; Obtaining feature vectors of each of the initial vehicle dispatching schemes, and obtaining scores of each of the initial vehicle dispatching schemes under at least two decision schemes by inputting the feature vectors of each of the initial vehicle dispatching schemes into a deep learning model; According to the scores of each of the initial vehicle dispatching plans under at least two decision plans, a target vehicle for matching each of the orders is determined.
2. The method according to claim 1, characterized in that The step of determining an initial vehicle dispatching solution set according to the order set and the vehicle set to be dispatched includes: Determine each transportation distance between the shipping location of each order and each vehicle to be dispatched in the set of vehicles to be dispatched, and obtain a set of transportation distances for each order; Determining a preset number of target transportation distances with the shortest transportation distances from the transportation distance sets of each of the orders; From the preset number of vehicles to be dispatched that match the preset number of target transportation distances, the vehicle to be dispatched with the longest idle time is determined as the initial vehicle to be dispatched for matching each order.
3. The method according to claim 1, characterized in that: The step of obtaining the feature vector of each of the initial vehicle dispatching schemes includes: Obtaining the remaining capacity characteristic value of each of the initial vehicles to be dispatched and the urgency of each of the orders; The characteristic vector of each of the initial vehicle dispatching plans is determined according to the remaining load of each of the initial vehicles to be dispatched, the remaining cargo compartment volume of each of the initial vehicles to be dispatched, the urgency of each of the orders, the transportation distance between each of the initial vehicles to be dispatched and the shipping location of the matching order, and the remaining transportation capacity characteristic value of each of the initial vehicles to be dispatched.
4. The method according to claim 3, characterized in that: The obtaining of the remaining capacity characteristic value of each of the initial vehicles to be dispatched includes: Obtaining the rated load, real-time load, standard cargo hold volume and real-time cargo volume of each of the initial vehicles to be dispatched; Determining the remaining load ratio of each of the initial vehicles to be dispatched according to the rated load and the real-time load of each of the initial vehicles to be dispatched; Determining the remaining volume ratio of each of the initial vehicles to be dispatched according to the standard cargo compartment volume and the real-time cargo capacity of each of the initial vehicles to be dispatched; The remaining transport capacity characteristic value of each of the initial vehicles to be dispatched is determined according to the remaining load ratio and the remaining volume ratio of each of the initial vehicles to be dispatched.
5. The method according to any one of claims 1 to 4, characterized in that: The at least two decision schemes include maintaining the original scheme and changing the vehicle scheme; and determining the target vehicle for matching each order according to the scores of each of the initial vehicle dispatch schemes under the at least two decision schemes includes: When any of the initial vehicle dispatching plans has the highest score in the maintaining original plan, determining the initial vehicle to be dispatched in any of the initial vehicle dispatching plans as the target vehicle; When any initial vehicle dispatching plan has the highest score in the vehicle replacement plan, the initial vehicle to be dispatched in any initial vehicle dispatching plan is replaced with a predetermined vehicle to be dispatched, and the predetermined vehicle to be dispatched is determined as the target vehicle.
6. The method according to any one of claims 1 to 4, characterized in that: Before obtaining the order set and the vehicle set to be dispatched, the method further includes: Obtain the feature vectors of each vehicle dispatching plan sample in the model to be trained and the vehicle dispatching plan sample set; The feature vectors of each of the vehicle dispatch plan samples are used to update the weights in the model to be trained to obtain the deep learning model.
7. The method according to claim 6, characterized in that The method of using the feature vectors of each of the vehicle dispatching plan samples to update the weights in the model to be trained to obtain the deep learning model includes: Input the feature vector of each of the vehicle dispatching scheme samples into the j-th round model to obtain the score of each of the vehicle dispatching scheme samples under at least two decision schemes; j is an integer greater than or equal to 1, and the first round model is the model to be trained; Selecting the highest score among the scores under the at least two decision solutions with a preset probability, and determining the selected score as the predicted score of the j-th round of decision solutions; Obtaining a real score obtained by transporting using the j-th round decision plan, and updating the weights in the j-th round model according to the difference between the real score and the predicted score to obtain a j+1-th round model; When the iteration stopping condition is met, the model of the last round is determined as the deep learning model.
8. The method according to claim 7, characterized in that The obtaining of the real score obtained by transporting using the j-th round decision plan includes: Obtaining the actual transportation time, cargo integrity value, and vehicle utilization efficiency obtained by using the j-th round decision plan for transportation; Determining a difference in transit time between the expected transit time and the actual transit time; The actual score obtained by transporting using the j-th round decision plan is determined based on the transport time difference, the cargo integrity value and the vehicle utilization efficiency.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Driving and charging cooperative scheduling system and method for networked heavy vehicle cluster
CN121390759A