A model training method and device, a storage medium and an electronic device
By training a screening model to select the target time combination of delivery capacity in the order allocation system, the contradiction between computational pressure and accuracy in the existing technology is resolved, and the effect of reducing computational pressure under high accuracy is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2026-03-27
AI Technical Summary
In order to ensure the accuracy of timeout risk calculation in existing order allocation systems, the number of samplings needs to be increased, which increases the computational burden. How to reduce the computational burden of order allocation systems while ensuring the accuracy of timeout risk calculation is an urgent problem to be solved.
By acquiring the delivery capacity associated with historical orders to be allocated, the combination of delivery time at each delivery point is determined as a sample combination. Based on similarity, a specified combination of delivery time is selected as a label, and the screening model is trained. The trained model is used to select the target combination of delivery time in the actual order allocation process, and the delivery timeout risk index is calculated based on this.
While ensuring the accuracy of timeout risk calculation, the computational burden on the order allocation system is reduced, and the efficiency of order allocation is improved.
Smart Images

Figure CN114925982B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of computer technology, and particularly relates to a model training method and device, a storage medium and an electronic device. BACKGROUND
[0002] In the instant delivery scenario, the order allocation system needs to allocate a large number of orders to appropriate delivery capacity, so that the delivery capacity can deliver the orders on time. The order allocation system can generate a plurality of "order-delivery capacity" combinations according to each order and each delivery capacity. Then, the matching degree of each "order-delivery capacity" combination is determined from multiple dimensions such as whether the planned path is reasonable and whether the order is overdue. Then, the matching degrees of all "order-delivery capacity" combinations are optimized, and each order is allocated to appropriate delivery capacity so that the delivery capacity can deliver the orders on time. The dimension of whether the order is overdue involves various uncertain factors such as the uncertain delivery time of the merchant and the uncertain delivery time of the goods encountered by the delivery capacity in the order delivery process.
[0003] In the prior art, the order allocation system can first determine the probability distribution of the time length that the delivery capacity may consume between any two delivery points in the planned path of the order delivery. Then, the probability distribution between any two delivery points in the planned path is sampled multiple times, and the multiple delivery time length combinations that the delivery capacity may have when passing through each delivery point are obtained according to the multiple sampling results. Finally, the overdue risk of the delivery capacity delivering the order is calculated according to the multiple delivery time length combinations, and each order is allocated accordingly.
[0004] However, in order to ensure the calculation accuracy of the overdue risk, the number of samplings needs to be increased, and the increase in the number of samplings will inevitably increase the calculation pressure of the order allocation system. Therefore, under the condition of ensuring the calculation accuracy of the overdue risk, how to reduce the calculation pressure of the order allocation system is a problem that needs to be solved urgently. SUMMARY
[0005] The embodiments of the present specification provide a model training method, device, storage medium and electronic device to partially solve the above-mentioned problems in the prior art.
[0006] The embodiments of the present specification adopt the following technical solutions:
[0007] The model training method provided by the present specification comprises:
[0008] obtaining a delivery capacity associated with a historical to-be-allocated order;
[0009] determine, according to a distribution of delivery time lengths between any two adjacent delivery points through which a delivery vehicle passes when performing a historical order to be allocated, a delivery time length combination of each delivery point through which the delivery vehicle passes when performing the historical order to be allocated, as each sample combination;
[0010] select a specified time length combination from the sample combinations according to similarity between the sample combinations;
[0011] train a screening model by taking the specified time length combination as a label of the sample combinations, wherein the trained screening model is used to select a target time length combination from the determined delivery time length combinations of an order to be allocated in an actual order allocation process, and allocate the order to be allocated according to the target time length combination.
[0012] Optionally, the selecting a specified time length combination from the sample combinations according to similarity between the sample combinations specifically includes:
[0013] taking the sample combinations as a sample set;
[0014] for each sample combination in the sample set, determining a comprehensive similarity corresponding to the sample combination according to similarity between the sample combination and other sample combinations;
[0015] selecting, according to the comprehensive similarity corresponding to each sample combination, a sample combination with the maximum comprehensive similarity from the sample set as a specified time length combination, and determining whether a preset stop screening condition is met;
[0016] if it is determined that the stop screening condition is not met, redetermining a sample set according to sample combinations other than the selected specified time length combination, redetermining, for each sample combination in the redetermined sample set, a comprehensive similarity corresponding to each sample combination, and selecting a specified time length combination from the redetermined sample set until the stop screening condition is met.
[0017] Optionally, the method further includes:
[0018] after the preset stop condition is met, for each selected specified time length combination, determining, from the sample set after the preset stop condition is met, a sample combination with the maximum similarity to the specified time length combination as a matching sample combination;
[0019] The probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order conforms to the specified time length combination in the initial sample set is determined as the probability of the specified time length combination.
[0020] Optionally, the screening model is trained with the specified time length combination as a label of the sample combination, and the training specifically includes:
[0021] The sample combination is input into the to-be-trained screening model, and each to-be-optimized specified time length combination is output by the screening model. For each to-be-optimized specified time length combination, a to-be-optimized probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order conforms to the to-be-optimized specified time length combination is determined as a to-be-optimized probability corresponding to the to-be-optimized specified time length combination;
[0022] For each to-be-optimized specified time length combination, the screening model is trained with minimization of a difference between the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized specified time length combination and minimization of a difference between the probability of the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized probability corresponding to the to-be-optimized specified time length combination as a target.
[0023] The order allocation method provided in the specification includes:
[0024] A to-be-assigned order is obtained, and candidate delivery capacities associated with the to-be-assigned order are determined.
[0025] For each candidate delivery capacity, each delivery time length combination of each delivery point passed by the candidate delivery capacity when executing the to-be-assigned order is determined as each delivery time length combination corresponding to the candidate delivery capacity.
[0026] Each delivery time length combination corresponding to each candidate delivery capacity is input into the trained screening model, and each target time length combination corresponding to each candidate delivery capacity is selected from each delivery time length combination corresponding to the candidate delivery capacity by the screening model, as each target time length combination corresponding to the candidate delivery capacity. The screening model is obtained by model training.
[0027] According to each target time length combination corresponding to the candidate delivery capacity, a delivery overtime risk index corresponding to the candidate delivery capacity when executing the to-be-assigned order is determined.
[0028] According to a delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order, the to-be-allocated order is allocated.
[0029] Optionally, according to each target time length combination corresponding to the candidate delivery capacity, a delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order is determined, and specifically includes:
[0030] A timeout risk value of each target time length combination corresponding to the candidate delivery capacity is determined.
[0031] According to the timeout risk value of each target time length combination corresponding to the candidate delivery capacity, at least part of the target time length combinations are selected as risk time length combinations.
[0032] According to a probability that a time length passing through each delivery point when the candidate delivery capacity performing the to-be-allocated order is determined by the screening model to meet each risk time length combination, a timeout risk value of each risk time length combination is weighted to obtain a delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order.
[0033] The model training device provided in the specification comprises:
[0034] The acquisition module is configured to acquire delivery capacity associated with historical to-be-allocated orders.
[0035] The determination module is configured to determine, according to a delivery time length distribution between any two adjacent delivery points passed through when the delivery capacity performs the historical to-be-allocated order, each delivery time length combination passing through each delivery point when the delivery capacity performs the historical to-be-allocated order as each sample combination.
[0036] The screening module is configured to select a specified time length combination from the sample combinations according to a similarity between the sample combinations.
[0037] The training module is configured to train a screening model by taking the specified time length combination as a label of the sample combinations, wherein the trained screening model is used to select a target time length combination from the determined delivery time length combinations of a to-be-allocated order in an actual order allocation process, so as to allocate the to-be-allocated order according to the target time length combination.
[0038] The order allocation device provided in the specification comprises:
[0039] The first determination module is configured to acquire a to-be-allocated order and determine candidate delivery capacity associated with the to-be-allocated order.
[0040] The second determining module is configured to determine, for each candidate distribution capacity, a combination of distribution time lengths of each distribution point when the candidate distribution capacity executes the to-be-allocated order as the combination of distribution time lengths corresponding to the candidate distribution capacity.
[0041] The selecting module is configured to input the combination of distribution time lengths corresponding to each candidate distribution capacity into the trained screening model, and select, for each candidate distribution capacity, a combination of target time lengths from the combination of distribution time lengths corresponding to the candidate distribution capacity as the combination of target time lengths corresponding to the candidate distribution capacity through the screening model, wherein the screening model is obtained through the model training method.
[0042] The third determining module is configured to determine, according to the combination of target time lengths corresponding to the candidate distribution capacity, a distribution overtime risk index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the to-be-allocated order.
[0043] The allocating module is configured to allocate the to-be-allocated order according to the distribution overtime risk index corresponding to each candidate distribution capacity when the candidate distribution capacity executes the to-be-allocated order.
[0044] The computer readable storage medium provided in the specification stores a computer program, and the computer program is executed by a processor to implement the model training method and the order allocation method.
[0045] The electronic device provided in the specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the model training method and the order allocation method when executing the program.
[0046] The above at least one technical solution adopted by the embodiments of the specification can achieve the following beneficial effects:
[0047] The embodiment of the specification first determines each delivery duration combination corresponding to the delivery capacity execution history of the to-be-assigned order as a sample combination. According to the similarity between each sample combination, a specified duration combination is selected from each sample combination. The specified duration combination is used as the label of each sample combination to train the screening model. In the actual order assignment process, the trained screening model is used to select the target duration combination corresponding to the to-be-assigned order executed by each candidate delivery capacity, and based on the selected target duration combination, the delivery overtime risk index corresponding to the to-be-assigned order executed by each candidate delivery capacity is determined, and the to-be-assigned order is assigned accordingly. In this method, in the actual order assignment process, for each candidate delivery capacity, according to the similarity between each delivery duration combination corresponding to the candidate delivery capacity, a representative delivery duration combination can be selected, and then according to the selected delivery duration combination, the delivery overtime risk index corresponding to the candidate delivery capacity can be calculated, which can reduce the calculation pressure of order assignment while ensuring the calculation accuracy of overtime risk. BRIEF DESCRIPTION OF DRAWINGS
[0048] The drawings described herein are used to provide further understanding of the specification, constitute a part of the specification, the illustrative embodiments of the specification and the description thereof are used to explain the specification, and do not constitute improper limitation on the specification. In the drawings:
[0049] Figure 1 The flowchart of the model training method provided by the embodiment of the specification;
[0050] Figure 2 The schematic diagram of the planning path containing each delivery point provided by the embodiment of the specification;
[0051] Figure 3 The flowchart of the order assignment method provided by the embodiment of the specification;
[0052] Figure 4 The device structure schematic diagram of the model training provided by the embodiment of the specification;
[0053] Figure 5 The device structure schematic diagram of the order assignment provided by the embodiment of the specification;
[0054] Figure 6 The structure schematic diagram of the electronic equipment provided by the embodiment of the specification. DETAILED DESCRIPTION
[0055] In the instant delivery scenario, the timeliness and rationality of the order distribution system in distributing orders are very important, and the timeliness of distributing orders mainly considers the calculation pressure of the order distribution system, and the rationality of distributing orders mainly considers whether the delivery capacity will be overtime in executing the delivery task. Whether the delivery capacity will be overtime in executing the delivery task is related to the precision of the overtime risk index of the delivery capacity. The higher the precision of the overtime risk, the more accurate the determination of whether the delivery capacity will be overtime. On the basis of the existing order distribution system calculating the overtime risk index, the calculation precision of the overtime risk index and the calculation pressure of the order distribution system are in conflict, that is, the more sampling combinations of delivery time length, the higher the calculation precision of the overtime risk index, and the higher the calculation pressure of the order distribution system.
[0056] In addition, in the prior art, when the order distribution system samples the probability distribution between any two delivery points in the order distribution process, it is randomly sampled and the sampling times are limited, which may cause that multiple delivery time length combinations sampled for the same delivery task conform to the delivery time length when most delivery capacities execute the delivery task, and the delivery time length when a small number of delivery capacities execute the delivery task cannot be obtained, thereby reducing the calculation precision of the overtime risk index.
[0057] In order to balance the calculation precision of the overtime risk index and the calculation pressure of the order distribution system as much as possible in the present specification, a large number of delivery time length combinations can be sampled in an offline state, and then a part of the delivery time length combinations can be selected from the large number of delivery time length combinations. Then, the screening model for online use is trained through the large number of delivery time length combinations and the selected part of the delivery time length combinations. In this way, the order distribution system only needs to use the trained screening model to select a part of the delivery time length combinations from the large number of delivery time length combinations for calculating the overtime risk index in the order distribution process. Among them, online is equivalent to the actual order distribution process.
[0058] In addition, to solve the problem of low calculation precision of the overtime risk index, a large number of delivery time length combinations can be sampled to a certain extent to increase the minority of delivery time length combinations. Then, according to the similarity between each delivery time length combination, the delivery time length combination with the highest similarity to other delivery time length combinations is iteratively selected from each delivery time length combination. In the case that the number of selected delivery time length combinations is sufficient, the minority of delivery time length combinations can be selected. Using the selected delivery time length combinations to calculate the overtime risk index can improve the calculation precision to a certain extent.
[0059] In the present specification, it is mainly divided into two parts, the first part is to train the model, and the second part is to use the trained model to distribute the to-be-distributed order.
[0060] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0061] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0062] Figure 1 A flowchart illustrating the model training method provided in the embodiments of this specification includes:
[0063] S100: Obtain delivery capacity associated with historical pending orders.
[0064] In the embodiments of this specification, historical pending orders are obtained, and the delivery capacity associated with historical pending orders is determined. Here, pending orders may refer to orders generated after a user purchases goods, and historical pending orders refer to orders generated after a user purchases goods in the past.
[0065] When determining delivery capacity historically associated with pending orders, the system can identify delivery capacities that historically failed to reach their delivery limits based on historically monitored order delivery information. These capacities are then associated with the historical pending orders. Delivery capacity can refer to delivery personnel, unmanned equipment performing delivery tasks, etc. Order delivery information can indicate the number of unfulfilled delivery tasks, the location of the delivery capacity, and the delivery routes corresponding to the tasks performed by that capacity. Furthermore, one delivery task corresponds to one order.
[0066] In other words, the delivery capacity associated with historical pending orders can be delivery capacity with a delivery task number not exceeding the task threshold.
[0067] When there are multiple delivery capacities associated with historical pending orders, each delivery capacity can be associated with a historical pending order as an association group.
[0068] In training the screening model, training samples corresponding to each associated combination can be determined first, and then the screening model is trained according to the training samples determined by each associated group and the sample labels determined by each associated group. The training sample can be each delivery time combination corresponding to the delivery capacity execution history of the to-be-assigned order. The sample label can be a specified time combination selected from each delivery time combination. The screening model can be a deep convolutional neural network model. The deep convolutional neural network model at least includes a convolutional layer, a pooling layer, and three fully connected layers.
[0069] It should be noted that, Figure 1 The model training method shown can be applied to a server. All actions of obtaining signals, information or data in this application are performed in accordance with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization of the corresponding device owner.
[0070] Next, taking an associated group as an example, i.e., taking a historical to-be-assigned order associated with a delivery capacity as an example, the model training method shown will be described. Figure 1
[0071] S102: According to the delivery time distribution between any two adjacent delivery points passed by the delivery capacity when executing the historical to-be-assigned order, determine each delivery time combination of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order as each sample combination.
[0072] In the embodiments of the present application, after obtaining the delivery capacity associated with the historical to-be-assigned order, the training sample for training the screening model can be determined.
[0073] Specifically, the planned path of the delivery capacity executing the historical to-be-assigned order can be determined first. Then, according to the delivery time distribution between any two adjacent delivery points passed on the planned path by the delivery capacity when executing the historical to-be-assigned order, determine each delivery time combination of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order, and take each delivery time combination as each sample combination. That is, each delivery time combination of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order can be used as a training sample for training the screening model.
[0074] The delivery point can include the pickup address of the delivery capacity, the delivery address, and the location of the delivery capacity. The pickup address can include a merchant address, a temporary pickup address, etc., and the delivery address can include a user delivery address, etc.
[0075] When determining the planning path corresponding to the historical to-be-assigned order executed by the delivery capacity, the planning path corresponding to the historical to-be-assigned order executed by the delivery capacity can be determined according to the delivery task not completed by the delivery capacity and the pickup and drop-off addresses corresponding to the historical to-be-assigned order. The planning path can be one or multiple. In addition, the planning path corresponding to the historical to-be-assigned order executed by the delivery capacity can be determined by using a machine learning model, a deep learning model, etc., which is not limited in the specification.
[0076] Based on the above description of the planning path, the embodiments of the specification provide a planning path containing various delivery points, as shown in Figure 2 Figure 2 In the above description of the planning path, one delivery capacity associated with the historical to-be-assigned order is taken as an example, the position of the delivery capacity is taken as the delivery point 0, the pickup address corresponding to the delivery task 1 is taken as the delivery point 1, the pickup address corresponding to the historical to-be-assigned order is taken as the delivery point 2, the drop-off address corresponding to the delivery task 1 is taken as the delivery point 3, and the drop-off address corresponding to the historical to-be-assigned order is taken as the delivery point 4.
[0077] After determining the planning path, the time consumption information between the delivery points passed by the planning path cannot be determined due to the uncertainty factors such as the road conditions of the planning path, the merchant delivery time (for example, the merchant delivery time), and the product delivery time. The product delivery time can be the time length of delivering the product to the user after the delivery capacity arrives at the drop-off address. The merchant delivery time can refer to the time length from receiving the order to delivering the product to the delivery capacity by the merchant. The reasons for the uncertainty of the merchant delivery time include sudden increase of the merchant order, and the merchant delivery time determined by human cannot guarantee its accuracy. The reasons for the uncertainty of the product delivery time include the uncertainty of the time length of the delivery capacity going up and down the stairs, and the delivery capacity cannot enter the building or community.
[0078] Based on the above influence of the uncertainty factors, in the embodiments of the specification, various uncertainty factors can be quantified considering that the delivery capacity is affected by various uncertainty factors in the delivery process.
[0079] Specifically, for any two adjacent distribution points through which the delivery capacity executes the historical to-be-assigned order, the delivery time consumption information between the two distribution points before the historical to-be-assigned order is executed can be determined according to the road condition between the two distribution points and the historical merchant delivery time length and the historical commodity delivery time length between the two distribution points before the historical to-be-assigned order is executed, and the delivery time length distribution between the two distribution points can be determined according to the delivery time consumption information between the two distribution points. The delivery time consumption information can represent each delivery time length between the two distribution points. The delivery time length distribution can be subject to a Gaussian distribution. The road condition between the two distribution points can represent whether the road is congested, whether the road is rugged, the length of the road between the two distribution points, whether the road between the two distribution points is smooth, and the like.
[0080] After determining the delivery time length distribution between any two adjacent distribution points, each delivery time length combination of the delivery capacity executing the historical to-be-assigned order through each distribution point can be determined according to the delivery time length distribution between any two adjacent distribution points through which the delivery capacity executes the historical to-be-assigned order. Each delivery time length combination can represent the total delivery time length of the delivery capacity through all distribution points, and the total delivery time length corresponding to different delivery time length combinations is different. The total delivery time length can refer to the delivery time length corresponding to the delivery capacity executing an unfinished delivery task and the historical to-be-assigned order.
[0081] In determining each delivery time length combination of the delivery capacity executing the historical to-be-assigned order through each distribution point, for each sampling, the delivery time length distribution between any two adjacent distribution points can be sampled to obtain the delivery time length combination corresponding to the delivery capacity executing the historical to-be-assigned order under this sampling. Through multiple samplings, each delivery time length combination of the delivery capacity executing the historical to-be-assigned order through each distribution point is determined.
[0082] For example, if the planned path includes three distribution points, namely distribution point a, distribution point b, and distribution point c. For one sampling, 10 minutes is sampled from the delivery time length distribution between distribution point a and distribution point b, and 15 minutes is sampled from the delivery time length distribution between distribution point b and distribution point c, so as to obtain one delivery time length combination of the delivery capacity executing the historical to-be-assigned order through each distribution point. The total delivery time length corresponding to this delivery time length combination is 25 minutes.
[0083] In the process of determining the combination of delivery time lengths of each delivery point in the process of the delivery capacity execution history to distribute the order, in addition to the above-mentioned separate sampling of the delivery time length distribution between any two adjacent delivery points, the high-dimensional delivery time length probability distribution corresponding to the planned path can also be determined according to the delivery time length distribution between any two adjacent delivery points. Then, multiple sampling is directly performed from the high-dimensional delivery time length probability distribution corresponding to the planned path to obtain the combination of delivery time lengths of each delivery point in the process of the delivery capacity execution history to distribute the order. Each delivery time length combination contains the delivery time length between any two adjacent delivery points.
[0084] For example: if the planned path contains 3 delivery points, which are delivery point d, delivery point e and delivery point f. The delivery time length t1 between delivery point d and delivery point e is subject to the first probability distribution P1, that is, t1 ~ P1. The delivery time length t2 between delivery point e and delivery point f is subject to the second probability distribution P2, that is, t2 ~ P2. Wherein, the delivery time length t1 and the delivery time length t2 are independent of each other. Then, the delivery time length between any two adjacent delivery points in the planned path is subject to the high-dimensional delivery time length probability distribution determined by the first probability distribution and the second probability distribution, that is, (t1, t2) ~ (P1, P2).
[0085] S104: Select a specified time length combination from the sample combinations according to the similarity between the sample combinations.
[0086] In the embodiments of the present specification, after determining the training samples (i.e., sample combinations) of the training screening model, part of the training samples can be selected from the training samples, and the selected training samples are used as labels.
[0087] After determining the sample combinations, part of the sample combinations can be selected from the sample combinations as specified time length combinations according to the similarity between the sample combinations. Then, the specified time length combinations are used as labels of the training screening model.
[0088] Specifically, each sample combination can be used as a sample set. For each sample combination in the sample set, the comprehensive similarity corresponding to the sample combination is determined according to the similarity between the sample combination and other sample combinations. Then, part of the sample combinations in the sample set are selected as specified time length combinations according to the comprehensive similarity corresponding to each sample combination.
[0089] Wherein, for each sample combination in the sample set, the similarity between the sample combination and other sample combinations is summed to obtain the comprehensive similarity corresponding to the sample combination.
[0090] It should be noted that for each sample combination, the similarity between the sample combination and other sample combinations can be determined according to the Euclidean distance. The calculation method of the similarity is not limited, which can be the Euclidean distance, Manhattan distance, Chebyshev distance, etc.
[0091] When the specified duration combinations are selected from the sample combinations of the sample set according to the comprehensive similarity corresponding to each sample combination, the specified number of sample combinations can be directly selected from the sample combinations of the sample set as the specified duration combinations according to the comprehensive similarity corresponding to each sample combination.
[0092] When the specified duration combinations are selected from the sample combinations of the sample set according to the comprehensive similarity corresponding to each sample combination, the sample combination with the maximum comprehensive similarity can be selected from the sample set as the specified duration combination according to the comprehensive similarity corresponding to each sample combination, and it is determined whether the preset stop screening condition is met. If it is determined that the stop screening condition is not met, the sample set is re-determined according to the sample combinations other than the selected specified duration combination, and the comprehensive similarity corresponding to each sample combination is re-determined for each sample combination in the re-determined sample set, and the specified duration combination is selected from the re-determined sample set until the stop screening condition is met. The screening condition can include that the number of iterations of the screening is greater than a first number threshold, the selected specified duration combination reaches a specified number, etc.
[0093] When the specified duration combinations are selected from the sample combinations, the sample combination with the maximum similarity to other sample combinations can be selected to select a representative delivery duration combination. Because in the continuous iteration and screening process, the duration of the delivery vehicle performing the historical to-be-allocated order through each delivery point can be selected to be a duration combination that meets a relatively high possibility. In the case of a sufficient number of iterations of the screening, the duration of the delivery vehicle performing the historical to-be-allocated order through each delivery point can also be selected to be a duration combination that meets a relatively low possibility.
[0094] In addition, in addition to summing the similarity between the sample combination and other sample combinations to select the specified duration combination, the sample combinations can also be clustered according to the similarity between the sample combinations to obtain each cluster, and then the sample combination corresponding to the cluster center of each cluster is selected as the specified duration combination. The clustering method can be K-means, hierarchical clustering, DBSCN clustering algorithm, etc.
[0095] Taking K-means clustering as an example, a preset number of sample combinations are randomly selected from each sample combination as a center combination. For each center combination, a cluster containing the center combination is determined according to the similarity between the center combination and other sample combinations. Then, the cluster center of the cluster containing the center combination is re-determined, and the cluster is re-determined according to the re-determined cluster center until a preset cluster stopping condition is met. The cluster stopping condition can include that the number of iterations of clustering is greater than a second number threshold.
[0096] S106: training a screening model by taking the specified time length combination as the label of each sample combination, wherein the trained screening model is used to select a target time length combination from the determined time length combinations of each delivery order in an actual order allocation process, so as to allocate the to-be-allocated order according to the target time length combination.
[0097] In the embodiments of the present specification, after each specified time length combination is selected from each sample combination, each specified time length combination can be taken as the label of each sample combination, and then the screening model is trained according to each sample combination and each specified time length combination.
[0098] Specifically, each sample combination can be input into the screening model, and part of the sample combinations are output by the screening model as each to-be-optimized specified time length combination. Then, the screening model is trained to minimize the difference between each to-be-optimized specified time length combination and each specified time length combination.
[0099] After the training of the screening model is completed, in the actual order allocation process, part of the delivery time length combinations corresponding to the determined to-be-allocated order can be selected as the target time length combination. Then, the to-be-allocated order is allocated according to the selected target time length combination.
[0100] Based on the above trained screening model, the present specification provides an order allocation method, Figure 3 The flowchart of the order allocation method provided by the embodiments of the present specification includes:
[0101] S300: obtaining a to-be-allocated order and determining candidate delivery capacity associated with the to-be-allocated order.
[0102] In the embodiments of the present specification, in the actual order allocation process, the order generated by the user purchasing goods is obtained in real time as the to-be-allocated order. That is, the to-be-allocated order is obtained. The to-be-allocated order can be one or multiple.
[0103] Then, according to the order delivery information of the delivery capacity monitored in real time, a delivery capacity with a number of unfinished delivery tasks less than or equal to the task threshold is determined as a candidate delivery capacity associated with the to-be-allocated order. There can be multiple candidate delivery capacities.
[0104] S302: For each candidate delivery capacity, determine the delivery time length combination of each delivery point passed through by the candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order, as the delivery time length combination corresponding to the candidate delivery capacity.
[0105] In the embodiments of the present specification, after determining the candidate delivery capacities associated with the to-be-allocated order, for each candidate delivery capacity, the delivery time length combination of each delivery point passed through by the candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order can be determined as the delivery time length combination corresponding to the candidate delivery capacity.
[0106] Specifically, for each candidate delivery capacity, the delivery points passed through by the candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order can be determined according to the pickup / delivery address of the to-be-allocated order and the pickup / delivery address corresponding to the unfinished delivery task of the candidate delivery capacity. Then, for the delivery time length distribution between any two adjacent delivery points passed through, the delivery time length combination of each delivery point passed through by the candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order is determined.
[0107] Among them, the delivery time consuming information between the two delivery points before executing the to-be-allocated order can be determined according to the road conditions between the two delivery points and the historical merchant delivery time length and historical commodity delivery time length corresponding to the two delivery points before executing the to-be-allocated order, and the delivery time length distribution between the two delivery points is determined according to the delivery time consuming information between the two delivery points.
[0108] S304: Input the delivery time length combination corresponding to each candidate delivery capacity into the trained screening model, and select, by the screening model, the target time length combination from the delivery time length combination corresponding to each candidate delivery capacity as the target time length combination corresponding to the candidate delivery capacity for each candidate delivery capacity, wherein the screening model is Figure 1 The model training method is trained to obtain.
[0109] In the embodiments of the present specification, each candidate distribution capacity can be corresponded to each distribution duration combination. The screening model trained can be inputted into each candidate distribution capacity, and the screening model can be used to select part of the distribution duration combinations from each distribution duration combination corresponding to each candidate distribution capacity as each target duration combination, and each target duration combination can be used as each target duration combination corresponding to each candidate distribution capacity. The target duration combination corresponding to each candidate distribution capacity can represent all distribution duration combinations corresponding to the candidate distribution capacity. That is, the target duration combination is representative.
[0110] S306: According to each target duration combination corresponding to the candidate distribution capacity, a distribution overtime risk index corresponding to the candidate distribution capacity executing the order to be distributed is determined.
[0111] S308: According to the distribution overtime risk index corresponding to each candidate distribution capacity executing the order to be distributed, the order to be distributed is distributed.
[0112] In the embodiments of the present specification, after each target duration combination corresponding to each candidate distribution capacity is selected, for each candidate distribution capacity, a distribution overtime risk index corresponding to the candidate distribution capacity executing the order to be distributed can be determined according to each target duration combination corresponding to the candidate distribution capacity.
[0113] Specifically, for each candidate distribution capacity, an overtime risk value of each target duration combination corresponding to the candidate distribution capacity is determined according to a preset overtime parameter, and then the overtime risk value of each target duration combination corresponding to the candidate distribution capacity is weighted to obtain a distribution overtime risk index corresponding to the candidate distribution capacity executing the order to be distributed.
[0114] After determining the distribution overtime risk index corresponding to each candidate distribution capacity executing the order to be distributed, the order to be distributed can be distributed according to the distribution overtime risk index corresponding to each candidate distribution capacity executing the order to be distributed. That is, the order to be distributed is distributed to the candidate distribution capacity with the lowest distribution overtime risk index.
[0115] Through the above Figure 1 The method and Figure 3The method shown can be seen that the specification first determines each delivery time length combination corresponding to the delivery capacity execution history of the to-be-assigned order as a sample combination. According to the similarity between each sample combination, a specified time length combination is selected from each sample combination. The specified time length combination is used as the label of each sample combination to train the screening model. In the actual order assignment process, the trained screening model is used to select the target time length combination corresponding to each candidate delivery capacity executing the to-be-assigned order, and based on the selected target time length combination, the delivery overtime risk index corresponding to each candidate delivery capacity executing the to-be-assigned order is determined, and the to-be-assigned order is assigned. In this method, in the actual order assignment process, for each candidate delivery capacity, according to the similarity between each delivery time length combination corresponding to the candidate delivery capacity, a representative delivery time length combination can be selected, and then according to the selected delivery time length combination, the delivery overtime risk index corresponding to the candidate delivery capacity can be calculated, which can reduce the calculation pressure of the order assignment system when performing order assignment while ensuring the calculation accuracy of the overtime risk.
[0116] Further, in Figure 1 In the process of steps S104-S106, in addition to selecting a specified time length combination from each delivery time length combination, the probability that each specified time length combination meets the time length of the delivery capacity execution history to-be-assigned order passing through each delivery point is also determined.
[0117] In step S104, after the iteration screening meets the preset stop condition, for each specified time length combination selected, the sample combination with the maximum similarity to the specified time length combination is determined from the sample set after the preset stop condition is met as the matching sample combination. The matching sample combination can be multiple or one.
[0118] Then, according to the probability that the time length of the delivery capacity execution history to-be-assigned order passing through each delivery point meets the matching sample combination in the initial sample set, and the probability that the time length of the delivery capacity execution history to-be-assigned order passing through each delivery point meets the specified time length combination in the initial sample set, the probability that the time length of the delivery capacity execution history to-be-assigned order passing through each delivery point meets the specified time length combination in all specified time length combinations is determined as the probability of the specified time length combination.
[0119] Specifically, the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the matching sample combination in the initial sample set, and the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the specified time length combination in the initial sample set are summed up to obtain the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the specified time length combination in all specified time length combinations. Wherein, the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches each delivery time length combination in the initial sample set is equal probability.
[0120] For example: If there are 10 delivery time length combinations in the initial sample set, the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches each delivery time length combination in the initial sample set is 0.1. There are 2 specified time length combinations in the initial sample set, which are the first specified time length combination and the second specified time length combination. The matching sample combination with the highest similarity to the first specified delivery time length combination has 3, and the matching sample combination with the highest similarity to the second specified delivery time length combination has 4. The probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the first specified time length combination in all specified time length combinations is 0.3, and the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the second specified time length combination in all specified time length combinations is 0.5.
[0121] In addition, the initial sample set can be represented by a matrix. Each row of the matrix represents a delivery time length combination, and each element in the column of the matrix except the last element represents a sampling delivery time length between any two adjacent delivery points. The last element in each column of the matrix represents the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the delivery time length combination represented by this column.
[0122] Wherein, the matrix expression is: Wherein, the matrix contains N delivery time length combinations, each delivery time length combination involves S sampling delivery time lengths, and one sampling delivery time length is obtained between each adjacent two delivery points. The distribution of S adjacent two delivery points needs to be sampled. N represents the probability that the time length of the delivery vehicle execution history when the order to be allocated passes through each delivery point matches the Nth delivery time length combination.
[0123] In step S106, when training the screening model, in addition to training to select the specified time length combination, the probability corresponding to each specified time length combination also needs to be determined.
[0124] Specifically, each sample combination is input into the screening model to be trained, and each to-be-optimized specified time length combination is output by the screening model. For each to-be-optimized specified time length combination, a to-be-optimized probability that the time length of the candidate delivery vehicle performing the to-be-allocated order through each delivery point meets the to-be-optimized specified time length combination is determined as the to-be-optimized probability corresponding to the to-be-optimized specified time length combination.
[0125] Then, for each to-be-optimized specified time length combination, the screening model is trained to minimize the difference between the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized specified time length combination, and to minimize the difference between the probability of the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized probability corresponding to the to-be-optimized specified time length combination.
[0126] In Figure 3 In steps S304-S306, in addition to selecting each target time length combination by the trained screening model, the probability corresponding to each target time length combination is also determined by the trained screening model, that is, for each target time length combination corresponding to each candidate delivery vehicle, the probability that the time length of the candidate delivery vehicle performing the to-be-allocated order through each delivery point meets the target time length combination in all target time length combinations is determined.
[0127] In step S304, each delivery time length combination corresponding to each candidate delivery vehicle is input into the trained screening model. Through the screening model, for each candidate delivery vehicle, part of the delivery time length combinations corresponding to the candidate delivery vehicle are selected as target time length combinations from the delivery time length combinations corresponding to the candidate delivery vehicle, and the target time length combinations are used as the target time length combinations corresponding to the candidate delivery vehicle. At the same time, through the screening model, for each target time length combination corresponding to each candidate delivery vehicle, the probability that the time length of the candidate delivery vehicle performing the to-be-allocated order through each delivery point meets the target time length combination in all target time length combinations corresponding to the candidate delivery vehicle is determined.
[0128] In step S306, when weighting the overtime risk values of each target time length combination corresponding to the candidate delivery vehicle to obtain the delivery overtime risk index corresponding to the candidate delivery vehicle performing the to-be-allocated order, at least part of the target time length combinations can be selected as risk time length combinations according to the overtime risk values of each target time length combination corresponding to the candidate delivery vehicle. At the same time, the probability that the time length of the candidate delivery vehicle performing the to-be-allocated order through each delivery point meets each risk time length combination is determined.
[0129] The method of selecting the risk time length combination from the target time length combinations can include that the target time length combinations can be sorted in descending order of the overtime risk values to obtain a sorting result. The target time length combinations before the specified position in the sorting result are selected as the risk time length combinations.
[0130] In addition, the method of selecting the risk time length combination from the target time length combinations can further include that the target time length combinations with the overtime risk values greater than a preset risk threshold are selected from the target time length combinations as the risk time length combinations.
[0131] Then, the overtime risk value of each risk time length combination is weighted according to the probability that the time length of the candidate delivery capacity performing the to-be-allocated order passing through each delivery point meets each risk time length combination determined by the screening model, to obtain a delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order.
[0132] In step S308, the method of allocating the to-be-allocated order according to the delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order can include that for each candidate delivery capacity, the overtime risk value of each target time length combination corresponding to the candidate delivery capacity is weighted according to the probability that the time length of the candidate delivery capacity performing the to-be-allocated order passing through each delivery point meets each target time length combination in all target time length combinations corresponding to the candidate delivery capacity, to obtain a risk expectation index corresponding to the candidate delivery capacity performing the to-be-allocated order. The risk expectation index corresponding to the candidate delivery capacity performing the to-be-allocated order and the delivery overtime risk index corresponding to the candidate delivery capacity performing the to-be-allocated order are weighted and summed to obtain a comprehensive risk index corresponding to the candidate delivery capacity performing the to-be-allocated order. Finally, the to-be-allocated order is allocated according to the comprehensive risk index corresponding to each candidate delivery capacity performing the to-be-allocated order. The higher the delivery overtime risk index is, the higher the comprehensive risk index is.
[0133] The above is the model training method and order allocation method provided by the embodiments of the present specification. Based on the same idea, the present specification also provides corresponding devices, storage media and electronic equipment.
[0134] Figure 4 A device structure schematic diagram of the model training provided by the embodiments of the present specification, the device includes:
[0135] The acquisition module 401 is configured to acquire delivery capacity associated with historical to-be-allocated orders.
[0136] The determining module 402 is configured to determine, according to a distribution of a delivery time length between any two adjacent delivery points through which a delivery vehicle executes a historical order to be allocated, a delivery time length combination of each delivery point through which the delivery vehicle executes the historical order to be allocated as each sample combination.
[0137] The screening module 403 is configured to select a specified time length combination from the sample combinations according to a similarity between the sample combinations.
[0138] The training module 404 is configured to train a screening model by taking the specified time length combination as a label of the sample combinations, and the trained screening model is configured to select a target time length combination from the delivery time length combinations of an order to be allocated in an actual order allocation process, and allocate the order to be allocated according to the target time length combination.
[0139] Optionally, the screening module 403 is specifically configured to take the sample combinations as a sample set, determine, for each sample combination in the sample set, a comprehensive similarity corresponding to the sample combination according to a similarity between the sample combination and other sample combinations, select, according to the comprehensive similarity corresponding to each sample combination, a sample combination with a maximum comprehensive similarity from the sample set as the specified time length combination, and determine whether a preset stop screening condition is met; if it is determined that the stop screening condition is not met, redetermine a sample set according to the sample combinations other than the selected specified time length combination, redetermine, for each sample combination in the redetermined sample set, a comprehensive similarity corresponding to each sample combination, and select, from the redetermined sample set, a specified time length combination until the stop screening condition is met.
[0140] Optionally, the screening module 403 is further configured to, after the preset stop condition is met, determine, for each selected specified time length combination, a sample combination with a maximum similarity to the specified time length combination from the sample set after the preset stop condition is met as a matching sample combination, determine, according to a probability that a time length of each delivery point through which the delivery vehicle executes the historical order to be allocated meets the matching sample combination in the initial sample set and a probability that the time length of each delivery point through which the delivery vehicle executes the historical order to be allocated meets the specified time length combination in the initial sample set, a probability that the time length of each delivery point through which the delivery vehicle executes the historical order to be allocated meets the specified time length combination in all specified time length combinations as a probability of the specified time length combination.
[0141] Optionally, the training module 404 is specifically configured to: input the sample combination into a screening model to be trained, output each to-be-optimized specified time length combination by the screening model, and for each to-be-optimized specified time length combination, determine a to-be-optimized probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-allocated order meets the to-be-optimized specified time length combination as the to-be-optimized probability corresponding to the to-be-optimized specified time length combination; and for each to-be-optimized specified time length combination, minimize the difference between the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized specified time length combination, and minimize the difference between the probability of the specified time length combination corresponding to the to-be-optimized specified time length combination and the to-be-optimized probability corresponding to the to-be-optimized specified time length combination as the training target of the screening model.
[0142] Figure 5 An order allocation device structure schematic diagram is provided for an embodiment of the present specification, and the device comprises:
[0143] The first determination module 501 is configured to acquire a to-be-allocated order and determine candidate delivery capacity associated with the to-be-allocated order.
[0144] The second determination module 502 is configured to determine, for each candidate delivery capacity, each delivery time length combination of each delivery point passed by the candidate delivery capacity when executing the to-be-allocated order as the delivery time length combination corresponding to the candidate delivery capacity.
[0145] The selection module 503 is configured to input the delivery time length combination corresponding to each candidate delivery capacity into the trained screening model, and select, by the screening model, for each candidate delivery capacity, each target time length combination from the delivery time length combination corresponding to the candidate delivery capacity as the target time length combination corresponding to the candidate delivery capacity, wherein the screening model is obtained by the model training method.
[0146] The third determination module 504 is configured to determine, according to the target time length combination corresponding to the candidate delivery capacity, a delivery overtime risk index corresponding to the candidate delivery capacity when executing the to-be-allocated order.
[0147] The allocation module 505 is configured to allocate the to-be-allocated order according to the delivery overtime risk index corresponding to each candidate delivery capacity when executing the to-be-allocated order.
[0148] Optionally, the third determining module 504 is specifically used to: determine the timeout risk value of each target duration combination corresponding to the candidate delivery capacity; select at least some target duration combinations as risk duration combinations based on the timeout risk value of each target duration combination corresponding to the candidate delivery capacity; and weight the timeout risk value of each risk duration combination based on the probability that the time taken by the candidate delivery capacity to execute the order to be allocated meets each risk duration combination, as determined by the screening model, to obtain the delivery timeout risk index corresponding to the candidate delivery capacity when executing the order to be allocated.
[0149] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can be used to perform the above-described actions. Figure 1 The provided model training methods and Figure 3 The provided order allocation method.
[0150] based on Figure 1 The model training method shown and Figure 3 The order allocation method shown in this specification is further provided in the embodiments. Figure 6 The diagram shows the structure of the electronic device. Figure 6 At the hardware level, this electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 The model training method and Figure 3 The order allocation method shown.
[0151] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0152] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.
[0153] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. by means of a logical programming of the method steps. The controller can thus be considered as a hardware component, and the means comprised therein for performing the various functions can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can even be considered as both a software module implementing the method and a structure within the hardware component.
[0154] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0155] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present specification.
[0156] Those skilled in the art will understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The specification is presented with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a means for performing the specified functions Figure 1
[0158] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a means for performing the specified functions Figure 1
[0159] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a means for performing the specified functions Figure 1
[0160] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0161] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) for example, and / or non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, for example. The memory is an example of computer-readable media.
[0162] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0163] It should also be noted that the terms "comprising", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0164] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0165] The present specification can be described in the general context of computer-executable instructions, such as program modules, executed by computers. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media, including storage devices.
[0166] The various embodiments described in this specification are described using a numbering of embodiments approach: these are each individually integrated contributions pertaining to different aspects of the description. For each embodiment, the description focuses on the differences from the other embodiments. Each embodiment is to be read in isolation, with the understanding that the same or similar features from other embodiments can be combined with the features of the respective embodiment. In particular, the description of the system embodiments is kept relatively short, as the system embodiments are largely analogous to the method embodiments.
[0167] The above description is embodied in the form of only a description of embodiments of the present specification, and is not intended to limit the present specification. Various changes and modifications can be made by those skilled in the art based on the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A model training method, characterized in that, include: Obtain delivery capacity associated with historical pending orders; Based on the distribution of delivery time between any two adjacent delivery points along the route of the delivery capacity when executing the historical pending orders, determine the delivery time combinations of each delivery point along the route of the delivery capacity when executing the historical pending orders, as each sample combination. Each delivery time combination represents the total delivery time of the delivery capacity through all delivery points. The total delivery time represents the delivery time of the delivery capacity executing unfinished delivery tasks and the delivery time corresponding to the historical pending orders. Based on the similarity between the sample combinations, a specified duration combination is selected from the sample combinations, wherein the sample combinations are regarded as a sample set; for each sample combination in the sample set, the comprehensive similarity corresponding to the sample combination is determined based on the similarity between the sample combination and other sample combinations; based on the comprehensive similarity corresponding to each sample combination, the sample combination with the highest comprehensive similarity is selected from the sample set as the specified duration combination. Using the specified duration combinations as labels for each sample combination, the screening model is trained. The sample combinations are input into the screening model to be trained, and the model outputs each specified duration combination to be optimized. For each specified duration combination to be optimized, the probability that the delivery capacity's time spent passing through each delivery point when executing the historical orders to be allocated conforms to the specified duration combination to be optimized is determined as the probability to be optimized for that specified duration combination. For each specified duration combination to be optimized, the screening model is trained with the objectives of minimizing the difference between the specified duration combination corresponding to the specified duration combination and the specified duration combination to be optimized, and minimizing the difference between the probability of the specified duration combination corresponding to the specified duration combination and the probability to be optimized for that specified duration combination. The trained screening model is used to select a target duration combination from the determined delivery duration combinations of the orders to be allocated during the actual order allocation process, and to allocate the orders to be allocated according to the target duration combination.
2. The method of claim 1, wherein, Based on the similarity between the sample combinations, a specified duration combination is selected from the sample combinations, specifically including: After determining the specified duration combination, check whether the preset stop filtering conditions are met; If it is determined that the stopping screening condition is not met, the sample set is re-determined based on the sample combinations other than the selected specified duration combinations. For each sample combination in the re-determined sample set, the comprehensive similarity corresponding to each sample combination is re-determined, and the specified duration combinations are selected from the re-determined sample set until the stopping screening condition is met.
3. The method of claim 2, wherein, The method further includes: After the preset stopping conditions are met, for each selected specified duration combination, the sample combination with the highest similarity to the specified duration combination is determined from the sample set after the preset stopping conditions are met, and it is used as the matching sample combination; According to the probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order matches the matching sample combination in the initial sample set and the probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order matches the specified time length combination in the initial sample set, the probability that the time length of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order matches the specified time length combination in all specified time length combinations is determined as the probability of the specified time length combination.
4. An order allocation method characterized by, Comprise: Obtain a to-be-assigned order, and determine candidate delivery capacities associated with the to-be-assigned order; For each candidate delivery capacity, determine each delivery time length combination of each delivery point passed by the candidate delivery capacity when executing the to-be-assigned order as each delivery time length combination corresponding to the candidate delivery capacity; Input each delivery time length combination corresponding to each candidate delivery capacity into the trained screening model, and select, through the screening model, each target time length combination from each delivery time length combination corresponding to each candidate delivery capacity as each target time length combination corresponding to the candidate delivery capacity, the screening model being trained by the method of any one of claims 1-3; According to each target time length combination corresponding to the candidate delivery capacity, determine the delivery overtime risk index corresponding to the candidate delivery capacity when executing the to-be-assigned order; According to the delivery overtime risk index corresponding to each candidate delivery capacity when executing the to-be-assigned order, assign the to-be-assigned order.
5. The method of claim 4, wherein, According to each target time length combination corresponding to the candidate delivery capacity, determine the delivery overtime risk index corresponding to the candidate delivery capacity when executing the to-be-assigned order, specifically comprising: Determine the overtime risk value of each target time length combination corresponding to the candidate delivery capacity; According to the overtime risk value of each target time length combination corresponding to the candidate delivery capacity, select at least part of the target time length combinations as risk time length combinations; According to the probability that the time length of each delivery point passed by the delivery capacity when executing the to-be-assigned order matches each risk time length combination determined through the screening model, weight the overtime risk value of each risk time length combination to obtain the delivery overtime risk index corresponding to the candidate delivery capacity when executing the to-be-assigned order.
6. An apparatus for model training, the apparatus comprising: Comprise: An acquisition module is configured to acquire delivery capacities associated with historical to-be-assigned orders; A determination module is configured to determine, according to a delivery time length distribution between any two adjacent delivery points passed by a delivery capacity when executing a historical to-be-assigned order, each delivery time length combination of each delivery point passed by the delivery capacity when executing the historical to-be-assigned order as each sample combination, each delivery time length combination representing a total delivery time length of the delivery capacity passing through all delivery points, and the total delivery time length representing a delivery time length corresponding to the historical to-be-assigned order and a delivery task not completed by the delivery capacity; The screening module is configured to select a specified duration combination from the sample combinations according to similarities between the sample combinations, wherein the sample combinations are taken as a sample set; for each sample combination in the sample set, a comprehensive similarity of the sample combination is determined according to similarities between the sample combination and other sample combinations; and a sample combination with a maximum comprehensive similarity is selected from the sample set as the specified duration combination according to the comprehensive similarity of each sample combination. The training module is configured to train the screening model by taking the specified duration combination as a label of the sample combinations, wherein the sample combinations are input into the screening model to be trained, each to-be-optimized specified duration combination is output by the screening model, and for each to-be-optimized specified duration combination, a to-be-optimized probability that durations of each delivery point passed through by the delivery capacity when the delivery capacity executes the historical to-be-allocated order conform to the to-be-optimized specified duration combination is determined as a to-be-optimized probability corresponding to the to-be-optimized specified duration combination; and for each to-be-optimized specified duration combination, the screening model is trained to minimize a difference between the to-be-optimized specified duration combination corresponding to the specified duration combination and the to-be-optimized specified duration combination, and to minimize a difference between a probability of the specified duration combination corresponding to the specified duration combination and the to-be-optimized probability corresponding to the to-be-optimized specified duration combination, as an objective. The trained screening model is configured to select a target duration combination from the determined to-be-allocated order duration combinations in an actual order allocation process, and to allocate the to-be-allocated order according to the target duration combination.
7. An apparatus for order allocation, characterized by The method comprises the following steps: The first determining module is configured to obtain a to-be-allocated order and determine candidate delivery capacities associated with the to-be-allocated order; The second determining module is configured to determine, for each candidate delivery capacity, each delivery duration combination of each delivery point passed through by the candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order, as each delivery duration combination corresponding to the candidate delivery capacity; The selection module is configured to input each delivery duration combination corresponding to each candidate delivery capacity into the trained screening model, and select, by the screening model, each target duration combination from each delivery duration combination corresponding to each candidate delivery capacity, as each target duration combination corresponding to the candidate delivery capacity, wherein the screening model is trained by the method of any one of claims 1-3; The third determining module is configured to determine a delivery overtime risk index corresponding to each candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order according to each target duration combination corresponding to the candidate delivery capacity; The allocation module is configured to allocate the to-be-allocated order according to the delivery overtime risk index corresponding to each candidate delivery capacity when the candidate delivery capacity executes the to-be-allocated order.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-5.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method of any one of claims 1-5.
Citation Information
Patent Citations
Order scheduling method and device, storage medium and electronic equipment
CN113222305A
Path planning method and device, storage medium and electronic equipment
CN113850407A
Order allocation method and device, readable storage medium and electronic equipment
CN114118645A