CN114925982A - Model training method and device, storage medium and electronic equipment - Google Patents

Model training method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114925982A
CN114925982A CN202210426299.1A CN202210426299A CN114925982A CN 114925982 A CN114925982 A CN 114925982A CN 202210426299 A CN202210426299 A CN 202210426299A CN 114925982 A CN114925982 A CN 114925982A
Authority
CN
China
Prior art keywords
combination
distribution
capacity
distributed
delivery
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210426299.1A
Other languages
Chinese (zh)
Inventor
李紫璇
梁易乐
段海宁
丁雪涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202210426299.1A priority Critical patent/CN114925982A/en
Publication of CN114925982A publication Critical patent/CN114925982A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0832Special goods or special handling procedures, e.g. handling of hazardous or fragile goods

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The specification discloses a model training method, a model training device, a storage medium and electronic equipment. And selecting a specified duration combination from each sample combination according to the similarity between each sample combination. And (5) taking the specified duration combination as a label of each sample combination, and training the screening model. Selecting a target time length combination by adopting a trained screening model in the actual order distribution process, determining a distribution overtime risk index when each candidate distribution capacity executes the order to be distributed based on the selected target time length combination, and distributing the order to be distributed. According to the method, a representative distribution time length combination is selected from a plurality of distribution time length combinations through a screening model, and the distribution overtime risk index is calculated by using the selected distribution time length combination, so that the calculation pressure of order distribution can be reduced under the condition that the calculation accuracy of the overtime risk is guaranteed.

Description

Model training method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a model training method and apparatus, a storage medium, and an electronic device.
Background
In an instant delivery scenario, the order distribution system needs to distribute a large amount of orders to a proper delivery capacity, so that the delivery capacity can deliver the orders on time. The order distribution system may generate a plurality of "order-delivery capacity" combinations based on each order and each delivery capacity. Then, the matching degree of each order-delivery capacity combination is determined according to multiple dimensions such as whether the planned path is reasonable and whether the order is overtime, and the like, and then each order is allocated to the appropriate delivery capacity by taking the optimal matching degree of all the order-delivery capacity combinations as a target, so that the delivery capacity can deliver the order on time. The dimension of whether the order is overtime relates to various uncertain factors such as uncertain meal time of a merchant and uncertain commodity delivery time of delivery capacity in the order delivery process.
In the prior art, in the order distribution process, the order distribution system may determine a probability distribution of a time duration that may be consumed between any two distribution points in a planned path for distributing the transporting capacity to distribute orders. And then, sampling the probability distribution between any two distribution points in the planned path for multiple times, and obtaining multiple distribution time length combinations which may exist when the distribution capacity distribution orders pass through each distribution point according to the multiple sampling results. And finally, calculating the overtime risk of the distribution transportation capacity distribution orders according to the combination of the distribution time lengths, so as to distribute the orders.
However, in the prior art, in order to ensure the calculation accuracy of the overtime risk, the sampling frequency needs to be increased, and the increase of the sampling frequency inevitably increases the calculation pressure of the order distribution system, so that how to reduce the calculation pressure of the order distribution system is an urgent problem to be solved under the condition of ensuring the calculation accuracy of the overtime risk.
Disclosure of Invention
Embodiments of the present specification provide a model training method, an apparatus, a storage medium, and an electronic device, so as to partially solve the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
the model training method provided by the specification comprises the following steps:
acquiring delivery capacity associated with historical orders to be distributed;
determining each distribution time length combination passing through each distribution point when the distribution capacity executes the historical orders to be distributed as each sample combination according to distribution time length distribution between any two adjacent distribution points through which the distribution capacity executes the historical orders to be distributed;
selecting a specified duration combination from the sample combinations according to the similarity between the sample combinations;
and training a screening model by taking the specified duration combination as a label of each sample combination, wherein the trained screening model is used for selecting a target duration combination from the determined distribution duration combinations of the orders to be distributed in the actual order distribution process so as to distribute the orders to be distributed according to the target duration combination.
Optionally, selecting a combination of specified durations from the sample combinations according to the similarity between the sample combinations specifically includes:
combining the samples as a sample set;
for each sample combination in the sample set, determining the comprehensive similarity corresponding to the sample combination according to the similarity between the sample combination and other sample combinations;
selecting a sample combination with the maximum comprehensive similarity from the sample set according to the comprehensive similarity corresponding to each sample combination, using the sample combination as a specified duration combination, and judging whether a preset screening stopping condition is met;
if the condition of stopping screening is determined not to be met, re-determining the sample set according to the sample combinations except the selected specified duration combination, re-determining the comprehensive similarity corresponding to each sample combination aiming at each sample combination in the re-determined sample set, and selecting the specified duration combination from the re-determined sample set until the condition of stopping screening is met.
Optionally, the method further comprises:
after a preset stopping condition is met, determining a sample combination with the maximum similarity to each selected specified duration combination from the sample set meeting the preset stopping condition as a matched sample combination;
and determining the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in all the specified time length combinations as the probability of the specified time length combination according to the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the matched sample combination in the initial sample set and the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in the initial sample set.
Optionally, training a screening model by using the specified duration combination as a label of each sample combination, specifically including:
inputting each sample combination into a screening model to be trained, outputting each specified time length combination to be optimized through the screening model, and determining the probability to be optimized that the time length of each distribution point is consistent with the specified time length combination to be optimized when the distribution capacity executes the historical orders to be distributed according to each specified time length combination to be optimized as the probability to be optimized corresponding to the specified time length combination to be optimized;
aiming at each specified duration combination to be optimized, the screening model is trained by taking the aim of minimizing the difference between the specified duration combination corresponding to the specified duration combination to be optimized 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 to be optimized and the probability to be optimized corresponding to the specified duration combination to be optimized.
An order allocation method provided by the present specification includes:
acquiring an order to be distributed, and determining candidate delivery capacity associated with the order to be distributed;
for each candidate delivery capacity, determining each delivery time length combination passing through each delivery point when the candidate delivery capacity executes the order to be distributed as each delivery time length combination corresponding to the candidate delivery capacity;
inputting each distribution time length combination corresponding to each candidate distribution capacity into a trained screening model, selecting each target time length combination from each distribution time length combination corresponding to each candidate distribution capacity through the screening model as each target time length combination corresponding to each candidate distribution capacity, and obtaining the screening model through model training;
determining a corresponding delivery overtime risk index when the candidate delivery capacity executes the order to be distributed according to each target time length combination corresponding to the candidate delivery capacity;
and distributing the orders to be distributed according to the corresponding distribution overtime risk index when each candidate distribution capacity executes the orders to be distributed.
Optionally, determining, according to each target duration combination corresponding to the candidate delivery capacity, a delivery timeout risk indicator corresponding to the candidate delivery capacity when the candidate delivery capacity executes the order to be allocated specifically includes:
determining an overtime risk value of each target duration combination corresponding to the candidate delivery capacity;
selecting at least part of target duration combinations as risk duration combinations according to the overtime risk value of each target duration combination corresponding to the candidate distribution capacity;
and weighting the overtime risk value of each risk duration combination according to the probability that the duration of each distribution point when the candidate distribution capacity executes the order to be distributed, which is determined by the screening model, accords with each risk duration combination, so as to obtain a distribution overtime risk index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed.
The present specification provides an apparatus for model training, including:
the acquisition module is used for acquiring the delivery capacity associated with the historical orders to be distributed;
the determining module is used for determining each distribution time length combination passing through each distribution point when the distribution capacity executes the historical to-be-distributed order as each sample combination according to distribution time length distribution between any two adjacent distribution points through which the distribution capacity executes the historical to-be-distributed order;
the screening module is used for selecting a combination with specified duration from each sample combination according to the similarity between each sample combination;
and the training module is used for training a screening model by taking the specified duration combination as a label of each sample combination, wherein the trained screening model is used for selecting a target duration combination from the determined distribution duration combinations of the orders to be distributed in the actual order distribution process so as to distribute the orders to be distributed according to the target duration combination.
The present specification provides an order distribution device, including:
the first determining module is used for acquiring the order to be distributed and determining the candidate delivery capacity associated with the order to be distributed;
a second determining module, configured to determine, for each candidate delivery capacity, each delivery duration combination that passes through each delivery point when the candidate delivery capacity executes the to-be-distributed order, as each delivery duration combination corresponding to the candidate delivery capacity;
the selection module is used for inputting each distribution time length combination corresponding to each candidate distribution capacity into a trained screening model, selecting each target time length combination from each distribution time length combination corresponding to the candidate distribution capacity as each target time length combination corresponding to the candidate distribution capacity aiming at each candidate distribution capacity through the screening model, and obtaining the screening model through model training;
a third determining module, configured to determine, according to each target duration combination corresponding to the candidate delivery capacity, a delivery timeout risk indicator corresponding to the candidate delivery capacity when the candidate delivery capacity executes the order to be distributed;
and the distribution module is used for distributing the orders to be distributed according to the corresponding distribution overtime risk index when each candidate distribution capacity executes the orders to be distributed.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the model training method and the order allocation method described above.
The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the model training method and the order allocation method when executing the program.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
in the embodiment of the present specification, each delivery duration combination corresponding to the delivery capacity execution history to-be-assigned order is determined as a sample combination. And selecting a specified duration combination from each sample combination according to the similarity between each sample combination. And (5) taking the specified duration combination as a label of each sample combination, and training the screening model. And selecting a target time length combination corresponding to each candidate delivery capacity when executing the order to be distributed by adopting a trained screening model in the actual order distribution process, determining a delivery overtime risk index corresponding to each candidate delivery capacity when executing the order to be distributed based on the selected target time length combination, and distributing the order to be distributed. In the method, in the actual order distribution process, aiming at each candidate delivery capacity, a representative delivery duration combination can be selected according to the similarity between the delivery duration combinations corresponding to the candidate delivery capacity, then the delivery overtime risk index corresponding to the candidate delivery capacity is calculated according to the selected delivery duration combination, and the calculation pressure of order distribution can be reduced under the condition that the calculation accuracy of the overtime risk is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the principles of the specification and not to limit the specification in a limiting sense. In the drawings:
FIG. 1 is a schematic flow chart of a model training method provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a planned path including distribution points according to an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating an order allocation method according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for model training provided in an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of an order distribution apparatus provided in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In the instant delivery scene, the timeliness and the rationality of the order distribution system for distributing the orders are very important, the timeliness of the order distribution mainly considers the calculation pressure of the order distribution system, and the rationality of the order distribution mainly considers whether the delivery capacity executes the delivery task or not and is overtime. Whether the distribution and delivery tasks executed by the distribution and delivery capacity are overtime or not is related to the accuracy of the overtime risk index of the distribution and delivery capacity, and the higher the accuracy of the overtime risk is, the more accurate whether the determined distribution and delivery capacity is overtime or not is shown. On the basis that the existing order distribution system calculates the overtime risk index, the calculation accuracy of the overtime risk index is in conflict with the calculation pressure of the order distribution system, namely, the more distribution time combinations obtained by sampling, the higher the calculation accuracy of the overtime risk index is, and the higher the calculation pressure of the order distribution system is.
In addition, in the prior art, when the order distribution system samples the probability distribution between any two distribution points in the order distribution process, random sampling is performed and the sampling frequency is limited, which may cause that a combination of multiple distribution time lengths obtained by sampling the same distribution task meets the distribution time length when most distribution capacity executes the distribution task, and the distribution time length when a few distribution capacity executes the distribution task cannot be obtained, thereby reducing the calculation accuracy of the overtime risk index.
In order to balance the calculation accuracy of the overtime risk index and the calculation pressure of the order distribution system as much as possible, a large number of distribution time length combinations may be sampled in an offline state, and then a part of the distribution time length combinations may be selected from the large number of distribution time length combinations. And then training a screening model for online use through a large number of distribution time length combinations and selected partial distribution time length combinations. In this way, in the order distribution process of the order distribution system, only a trained screening model is adopted to screen part of distribution time length combinations from a large number of distribution time length combinations for calculating the overtime risk index. Where the on-line is equivalent to the actual order distribution process.
In addition, regarding the problem that the calculation accuracy of the overtime risk index is low, a large number of delivery time length combinations are sampled, and a small number of delivery time length combinations can be increased to a certain extent. Then, according to the similarity between the distribution time length combinations, the distribution time length combination with the maximum similarity with other distribution time length combinations is selected from the distribution time length combinations in an iteration mode, and under the condition that the number of the selected distribution time length combinations is enough, the distribution time length combinations which live in a small number can be selected. And the calculation accuracy can be improved to a certain extent by adopting the selected distribution duration combination to calculate the overtime risk index.
In this specification, the distribution method is mainly divided into two parts, the first part is a training model, and the second part is a distribution method using a model after training to distribute orders to be distributed.
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a model training method provided in an embodiment of the present specification, including:
s100: and acquiring delivery capacity associated with the historical orders to be distributed.
In an embodiment of the present specification, historical orders to be allocated are obtained historically, and delivery capacity historically associated with the historical orders to be allocated is determined. The to-be-allocated order may refer to an order generated after a user purchases a commodity, and the historical to-be-allocated order refers to an order generated after the user purchases the commodity historically.
When the distribution capacity historically associated with the historical orders to be distributed is determined, the distribution capacities which historically execute distribution tasks and are not up to the upper limit can be determined according to the historically monitored order distribution information of the distribution capacities, and the distribution capacities are used as the distribution capacities associated with the historical orders to be distributed. The delivery capacity may refer to a delivery person, an unmanned device performing a delivery task, and the like. The order delivery information may indicate the number of delivery tasks whose delivery capacity has not been completed, location information of the delivery capacity, a delivery route to which the delivery capacity executes the delivery tasks, and the like. In addition, one delivery task corresponds to one order.
That is, the delivery capacity associated with the historical orders to be allocated may be a delivery capacity at which the number of delivery tasks is not greater than the task threshold.
When there are a plurality of delivery capacities associated with the historical orders to be allocated, the delivery capacity may be associated with the historical orders to be allocated as one association group for each delivery capacity.
When the screening model is trained, a training sample corresponding to each association group may be determined, and then the screening model is trained according to the training samples determined by each association group and the sample labels determined by each association group. The training sample may be a combination of delivery durations corresponding to delivery capacity execution history orders to be distributed. The sample label may select a specified time duration combination from among the distribution time duration combinations. The screening model may be a deep convolutional neural network model. The deep convolutional neural network model at least comprises: a convolution layer, a pooling layer, and three full-connection layers.
It should be noted that the model training method shown in fig. 1 may be applied to a server. All actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
Next, the model training method shown in fig. 1 will be described by taking an example of a related group, that is, an example of a relation between a historical order to be distributed and a delivery capacity.
S102: and determining each distribution time length combination passing through each distribution point when the delivery capacity executes the historical to-be-distributed order as each sample combination according to distribution time length distribution between any two adjacent distribution points through which the delivery capacity executes the historical to-be-distributed order.
In embodiments of the present description, after acquiring delivery capacity associated with historical orders to be allocated, training samples for training the screening model may be determined.
Specifically, the planned path corresponding to the delivery capacity execution history to-be-allocated order may be determined first. And then, determining each distribution time length combination passing through each distribution point when the historical to-be-distributed orders are distributed according to distribution time length distribution between any two adjacent distribution points passing through the planned path when the historical to-be-distributed orders are executed by distribution capacity, and taking each distribution time length combination as each sample combination. That is, each delivery duration combination passing through each delivery point when the delivery capacity executes the historical to-be-distributed orders can be used as a training sample for training the screening model.
Wherein the delivery point may include a pick address for the delivery capacity, a ship-to address, and a location for the delivery capacity. The pick address may include: a merchant address, a temporary pickup address, etc., and the shipping address may include: customer shipping address, etc.
When determining the planned path corresponding to the historical to-be-distributed orders executed by the delivery capacity, the planned path corresponding to the historical to-be-distributed orders executed by the delivery capacity may be determined according to the delivery tasks that the delivery capacity is not completed and the picking and receiving addresses corresponding to the historical to-be-distributed orders, where the planned path may be one or multiple. In addition, a machine learning model, a deep learning model and the like can be adopted for determining a planning path corresponding to the to-be-allocated order in the delivery capacity execution history, and the description is not limited.
Based on the above description of the planned path, the embodiment of the present specification provides a planned path including distribution points, as shown in fig. 2. In fig. 2, taking a delivery capacity associated with a historical to-be-distributed order as an example, a location of the delivery capacity is taken as a delivery point 0, a pick-up address corresponding to a delivery task 1 is taken as a delivery point 1, a pick-up address corresponding to the historical to-be-distributed order is taken as a delivery point 2, a delivery address corresponding to the delivery task 1 is taken as a delivery point 3, and a delivery address corresponding to the historical to-be-distributed order is taken as a delivery point 4.
After the planned path is determined, due to uncertain factors such as road conditions of the planned path, shipment time of a merchant (for example, meal time of the merchant), delivery time of commodities and the like, time-consuming information among distribution points where the planned path passes through cannot be determined. The commodity delivery duration can be duration of delivering the commodity to the user after the delivery capacity reaches the receiving address. The merchant shipment time may refer to the time from receiving an order to handing the goods to the shipping capacity. The reasons for uncertainty of the shipment duration of the merchant are as follows: the order of the merchant suddenly increases, the shipment time of the merchant is artificially determined, and the accuracy of the order cannot be guaranteed. The reasons for uncertainty of the delivery time of the commodity are as follows: the time for the delivery capacity to go upstairs or downstairs is uncertain, and the delivery capacity cannot enter buildings or communities and the like.
Based on the influence of the above-mentioned uncertain factors, in the embodiments of the present specification, considering that the distribution capacity is influenced by various uncertain factors in the distribution process, various uncertain factors may be quantified.
Specifically, for any two adjacent delivery points through which the historical to-be-distributed order is executed according to the delivery capacity, the delivery time consumption information between the two delivery points before the historical to-be-distributed order is executed is determined according to the road condition between the two delivery points, the historical merchant delivery time length and the historical commodity delivery time length corresponding to the two delivery points before the historical to-be-distributed order is executed, and the delivery time length distribution between the two delivery points is determined according to the delivery time consumption information between the two delivery points. Wherein, the delivery time consumption information may indicate the delivery time lengths existing between the two delivery points. The distribution time duration distribution may follow a gaussian distribution. The road condition between two distribution points may indicate whether the road is congested, whether the road is bumpy, the length of the road between two distribution points, whether the road between two distribution points is off-road, etc.
After the distribution of the distribution time length between any two adjacent distribution points is determined, according to the distribution of the distribution time length between any two adjacent distribution points through which the historical to-be-distributed orders are executed by the distribution transport capacity, each distribution time length combination passing through each distribution point when the historical to-be-distributed orders are executed by the distribution transport capacity is determined. Each distribution time length combination can represent the total distribution time length of the distribution capacity passing through all distribution points, and the total distribution time lengths corresponding to different distribution time length combinations are different. The total delivery time length can be the delivery time length corresponding to the delivery capacity executing the unfinished delivery task and the historical orders to be distributed.
When determining that the delivery capacity executes the historical to-be-distributed orders and passes through each delivery time length combination of each delivery point, for each sampling, sampling can be performed on the delivery time length distribution between any two adjacent delivery points, and the delivery time length combination corresponding to the sampling when the delivery capacity executes the historical to-be-distributed orders is obtained. And determining each distribution time length combination passing through each distribution point when the distribution capacity executes the historical orders to be distributed through multiple sampling.
Such as: if the planned route includes 3 distribution points, which are respectively a distribution point a, a distribution point b and a distribution point c. For one-time sampling, 10 minutes are sampled from distribution time length distribution between a distribution point a and a distribution point b, 15 minutes are sampled from distribution time length distribution between a distribution point b and a distribution point c, so that a distribution time length combination of distribution transport capacity execution history orders to be distributed passing through each distribution point is obtained, and the total distribution time length corresponding to the distribution time length combination is 25 minutes.
When determining that the delivery capacity executes the historical orders to be distributed and passes through each delivery time length combination of each delivery point, in addition to independently sampling 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 be determined according to the delivery time length distribution between any two adjacent delivery points. And then, directly sampling for many times from the high-dimensional distribution time length probability distribution corresponding to the planned path to obtain each distribution time length combination passing through each distribution point when the distribution capacity executes the historical orders to be distributed. Each distribution time length combination comprises the distribution time length between any two adjacent distribution points.
Such as: if the planned path includes 3 distribution points, which are the distribution point d, the distribution point e and the distribution point f. The delivery duration t1 between the delivery point d and the delivery point e obeys the first probability distribution P1, i.e., t1 to P1. The distribution time period t2 between the distribution point e and the distribution point f obeys the second probability distribution P2, i.e., t2 to P2. The dispensing time period t1 and the dispensing time period t2 are independent of each other. The distribution duration between any two adjacent distribution points in the planned path obeys the high-dimensional distribution duration probability distribution determined by the first probability distribution and the second probability distribution, i.e., (t1, t2) - (P1, P2).
S104: and selecting a specified duration combination from the sample combinations according to the similarity between the sample combinations.
In the embodiment of the present specification, after determining the training samples (i.e., the sample combinations) for training the screening model, a part of the training samples may be selected from the training samples, and the selected training samples may be used as the labels.
After determining each sample combination, a part of the sample combinations may be selected from each sample combination as each specified duration combination according to the similarity between each sample combination. Then, the specified time lengths are combined to be used as a label for training the screening model.
Specifically, the samples may be combined as a sample set. And for each sample combination in the sample set, determining the comprehensive similarity corresponding to the sample combination according to the similarity between the sample combination and other sample combinations. And then, selecting partial sample combinations from all the sample combinations of the sample set according to the comprehensive similarity corresponding to each sample combination to serve as all the specified duration combinations.
And for each sample combination in the sample set, summing the similarity between the sample combination and other sample combinations to obtain the comprehensive similarity corresponding to the sample combination.
It should be noted that, for each sample combination, the similarity between the sample combination and other sample combinations may be determined according to the euclidean distance. The calculation method of the similarity is not limited, and may be an euclidean distance, a manhattan distance, a chebyshev distance, or the like.
When a specified duration combination is selected from each sample combination of the sample set according to the comprehensive similarity corresponding to each sample combination, a specified number of sample combinations can be directly selected from each sample combination of the sample set according to the comprehensive similarity corresponding to each sample combination to serve as each specified duration combination.
When the specified duration combination is selected from each sample combination 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 according to the comprehensive similarity corresponding to each sample combination to serve as the specified duration combination, and whether the preset screening stopping condition is met or not is judged. And if the condition of stopping screening is determined not to be met, re-determining the sample set according to the sample combinations except the selected specified duration combination, re-determining the comprehensive similarity corresponding to each sample combination aiming at each sample combination in the re-determined sample set, and selecting the specified duration combination from the re-determined sample set until the condition of stopping screening is met. Wherein, the screening conditions may include: the iterative screening times are larger than the first time threshold value, the selected specified duration combination reaches the specified number, and the like.
When a specific time length combination is selected from each sample combination, the sample combination with the highest similarity to other sample combinations is selected, and a representative distribution time length combination can be selected. In the continuous iterative screening process, the time length of passing through each distribution point when the distribution transport capacity executes historical orders to be distributed can be selected to accord with a larger possible distribution time length combination. In the case that the iterative filtering times are enough, the time length of passing through each delivery point when the delivery capacity execution history orders to be distributed are distributed can be selected to accord with the smaller possible delivery time length combination.
In addition, except that the similarity between the sample combination and other sample combinations is summed, so that the appointed time length combination is selected, the sample combinations can be clustered according to the similarity between the sample combinations to obtain clustering clusters, and then the sample combination corresponding to the clustering center of each clustering cluster is used as the appointed time length combination. The clustering method can be K-means, hierarchical clustering, a DBSCN clustering algorithm and the like.
Taking K-means clustering as an example, a preset number of sample combinations are randomly selected from each sample combination as a center combination. And for each center combination, determining a cluster containing the center combination 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 stop condition is met. Wherein the clustering stop condition may include: the iterative clustering times are larger than a second time threshold value, and the like.
S106: and training a screening model by taking the specified duration combination as a label of each sample combination, wherein the trained screening model is used for selecting a target duration combination from each determined distribution duration combination of the order to be distributed in the actual order distribution process so as to distribute the order to be distributed according to the target duration combination.
In this embodiment, after each specified duration combination is selected from each sample combination, each specified duration combination may be used as a label of each sample combination, and then, the screening model is trained according to each sample combination and each specified duration combination.
Specifically, each sample combination may be input into the screening model, and a part of the sample combinations may be output by the screening model as each combination of the specified durations to be optimized. And then, training the screening model by taking the minimization of the difference between each specified duration combination to be optimized and each specified duration combination as a target.
After the screening model is trained, in the actual order distribution process, part of the distribution time length combinations can be selected from the distribution time length combinations corresponding to the determined orders to be distributed as the target time length combination. And then, distributing the orders to be distributed according to the selected target time length combination.
Based on the trained screening model, the present specification proposes an order allocation method, and fig. 3 is a schematic flow chart of the order allocation method provided in the embodiment of the present specification, including:
s300: and acquiring the order to be distributed, and determining the candidate delivery capacity associated with the order to be distributed.
In the embodiment of the present specification, in the actual order allocation process, an order generated when a user purchases a commodity is acquired in real time and is used as an order to be allocated. That is, the order to be allocated is obtained. The order to be allocated may be one or multiple.
And then, according to the order distribution information of the distribution capacity monitored in real time, determining the distribution capacity with the current number of uncompleted distribution tasks not greater than the task threshold value as a candidate distribution capacity associated with the order to be distributed. The candidate delivery capacity may be plural.
S302: and for each candidate delivery capacity, determining each delivery time length combination passing through each delivery point when the candidate delivery capacity executes the order to be distributed as each delivery time length combination corresponding to the candidate delivery capacity.
In this embodiment, after determining the candidate delivery capacities associated with the to-be-distributed orders, for each candidate delivery capacity, determining the delivery time length combinations of the candidate delivery capacity passing through the delivery points when executing the to-be-distributed orders as the delivery time length combinations corresponding to the candidate delivery capacity.
Specifically, for each candidate delivery capacity, each delivery point that the candidate delivery capacity passes when executing the order to be distributed may be determined according to the pick-and-place address of the order to be distributed and the pick-and-place address corresponding to the delivery task for which the candidate delivery capacity is not completed. Then, according to distribution time length distribution between any two adjacent distribution points on the way, each distribution time length combination passing through each distribution point when the candidate distribution capacity executes the order to be distributed is determined.
The distribution time consumption information between the two distribution points before the order to be distributed is executed can be determined according to the road condition between the two distribution points, the historical merchant delivery time length and the historical commodity delivery time length corresponding to the two distribution points before the order to be distributed is executed, and the distribution time length between the two distribution points can be determined according to the distribution time consumption information between the two distribution points.
S304: inputting each distribution time length combination corresponding to each candidate distribution transport capacity into a trained screening model, and selecting each target time length combination from each distribution time length combination corresponding to each candidate distribution transport capacity as each target time length combination corresponding to each candidate distribution transport capacity through the screening model, wherein the screening model is obtained by the model training method in fig. 1.
In this embodiment, each delivery duration combination corresponding to each candidate delivery capacity may be input into a trained screening model, and for each candidate delivery capacity, a part of the delivery duration combinations may be selected from the delivery duration combinations corresponding to the candidate delivery capacity as each target duration combination through the screening model, and each target duration combination may be used as each target duration combination corresponding to the candidate delivery capacity. The target time length combination corresponding to the candidate delivery capacity may represent all the delivery time length combinations corresponding to the candidate delivery capacity. That is, the target time length combination is representative.
S306: and determining a corresponding delivery overtime risk index when the candidate delivery capacity executes the order to be distributed according to each target time length combination corresponding to the candidate delivery capacity.
S308: and distributing the orders to be distributed according to the corresponding distribution overtime risk index when each candidate distribution capacity executes the orders to be distributed.
In this embodiment of the present specification, after each target duration combination corresponding to each candidate delivery capacity is selected, for each candidate delivery capacity, a delivery timeout risk indicator corresponding to the candidate delivery capacity when the candidate delivery capacity executes the to-be-distributed order may be determined according to each target duration combination corresponding to the candidate delivery capacity.
Specifically, for each candidate delivery capacity, according to a preset timeout parameter, an timeout risk value of each target duration combination corresponding to the candidate delivery capacity is determined, and then, the timeout risk value of each target duration combination corresponding to the candidate delivery capacity is weighted to obtain a delivery timeout risk index corresponding to the candidate delivery capacity when the candidate delivery capacity executes the order to be distributed.
After determining the delivery timeout risk indicator corresponding to each candidate delivery capacity executing the to-be-distributed order, the to-be-distributed order may be distributed according to the delivery timeout risk indicator corresponding to each candidate delivery capacity executing the to-be-distributed order. That is, the order to be distributed is distributed to the candidate delivery capacity with the lowest delivery timeout risk index.
As can be seen from the method shown in fig. 1 and the method shown in fig. 3, the present specification determines, as a sample combination, each delivery time length combination corresponding to the delivery capacity execution history to-be-assigned orders. And selecting a specified duration combination from each sample combination according to the similarity between each sample combination. And (5) taking the specified duration combination as a label of each sample combination, and training the screening model. And selecting a target time length combination corresponding to each candidate delivery capacity when executing the order to be distributed by adopting a trained screening model in the actual order distribution process, determining a delivery overtime risk index corresponding to each candidate delivery capacity when executing the order to be distributed based on the selected target time length combination, and distributing the order to be distributed. In the method, in the actual order distribution process, aiming at each candidate delivery capacity, a representative delivery duration combination can be selected according to the similarity between the delivery duration combinations corresponding to the candidate delivery capacity, then the delivery overtime risk index corresponding to the candidate delivery capacity is calculated according to the selected delivery duration combination, and the calculation pressure of the order distribution system in order distribution can be reduced under the condition that the calculation accuracy of the overtime risk is guaranteed.
Further, in the process from step S104 to step S106 shown in fig. 1, in addition to selecting the specified time length combination from the distribution time length combinations, a probability that each specified time length combination meets the time length of the distribution capacity execution history to-be-distributed order passing through each distribution point is determined.
In step S104, after the iterative screening satisfies the preset stop condition, for each selected specified duration combination, a sample combination with the greatest similarity to the specified duration combination is determined from the sample set satisfying the preset stop condition, and is used as a matching sample combination. The number of the matching sample combinations may be plural or one.
Then, according to the probability that the time length of passing through each distribution point when the historical to-be-distributed orders are executed in the distribution capacity accords with the matched sample combination in the initial sample set and the probability that the time length of passing through each distribution point when the historical to-be-distributed orders are executed in the distribution capacity accords with the specified time length combination in the initial sample set, the probability that the time length of passing through each distribution point when the historical to-be-distributed orders are executed in the distribution capacity accords with the specified time length combination in all the specified time length combinations is determined and serves as the probability of the specified time length combination.
Specifically, the probability that the time length of the distribution points when the historical to-be-distributed orders are distributed is matched with the matching sample combination in the initial sample set is summed, and the probability that the time length of the distribution points when the historical to-be-distributed orders are distributed is matched with the specified time length combination in the initial sample set is summed, so that the probability that the time length of the distribution points when the historical to-be-distributed orders are distributed is matched with the specified time length combination in all the specified time length combinations is obtained. The probability that the time length of the delivery capacity execution history passing through each delivery point when the orders are to be distributed accords with each delivery time length combination in the initial sample set is equal.
Such as: if there are 10 delivery duration combinations in the initial sample set, the probability that the duration of time that passes through each delivery point when the delivery capacity execution history orders to be distributed meet each delivery duration combination in the initial sample set is 0.1. There are 2 combinations of specified durations in the initial sample set, the first and second combinations of specified durations, respectively. The number of the matching sample combinations with the maximum similarity of the first specified delivery time length combination is 3, and the number of the matching sample combinations with the maximum similarity of the second specified delivery time length combination is 4, so that the probability that the time length passing through each delivery point when the historical to-be-distributed orders are executed by delivery capacity meets the first specified time length combination in all the specified time length combinations is 0.3, and the probability that the time length passing through each delivery point when the historical to-be-distributed orders are executed by delivery capacity meets the second specified time length combination in all the specified time length combinations is 0.5.
In addition, the initial sample set may be represented by a matrix. Each column of the matrix represents a distribution time length combination, and the other elements except the last element in each column of the matrix represent distribution time lengths obtained by sampling between any two adjacent distribution points. The last element in each column of the matrix represents the probability that the time duration of passing each delivery point when delivering the capacity execution history to-be-assigned order matches the delivery time duration combination represented by the column.
Wherein, the matrix expression is:
Figure BDA0003608614870000171
the matrix comprises N distribution time length combinations, each distribution time length combination relates to S distribution time lengths obtained by sampling, and sampling is carried out between every two adjacent distribution pointsObtaining a distribution time length, which is needed to sample distribution time length distribution between two adjacent distribution points of the S group. p is a radical of N And the probability that the time length of passing through each distribution point when the delivery capacity execution history orders to be distributed meet the Nth distribution time length combination is represented.
In step S106, when training the screening model, in addition to the specific duration combinations selected by training, it is also necessary to train and determine the probability corresponding to each specific duration combination.
Specifically, each sample combination is input into a screening model to be trained, each specified duration combination to be optimized is output through the screening model, and for each specified duration combination to be optimized, the probability to be optimized that the duration passing through each distribution point meets the specified duration combination to be optimized when the historical orders to be distributed are distributed in the distribution capacity execution history is determined and is used as the probability to be optimized corresponding to the specified duration combination to be optimized.
Then, aiming at each specified duration combination to be optimized, the screening model is trained by taking the goal of minimizing the difference between the specified duration combination corresponding to the specified duration combination to be optimized 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 to be optimized and the probability to be optimized corresponding to the specified duration combination to be optimized.
In steps S304 to S306 shown in fig. 3, in addition to selecting each target duration combination through the trained screening model, it is also necessary to determine the probability corresponding to each target duration combination through the trained screening model, that is, for each target duration combination corresponding to each candidate delivery capacity, determine the probability that the duration passing through each delivery point when the candidate delivery capacity executes the order to be allocated meets the target duration combination in all the target duration combinations.
In step S304, each delivery duration combination corresponding to each candidate delivery capacity is input into the trained screening model, and for each candidate delivery capacity, a part of delivery duration combinations are selected from each delivery duration combination corresponding to the candidate delivery capacity as each target duration combination through the screening model, and each target duration combination is used as each target duration combination corresponding to the candidate delivery capacity. Meanwhile, through a screening model, for each target time length combination corresponding to each candidate distribution transport capacity, the probability that the time length of the candidate distribution transport capacity passing through each distribution point when the candidate distribution transport capacity executes the order to be distributed accords with the target time length combination in all the target time length combinations corresponding to the candidate distribution transport capacity is determined.
In step S306, when the timeout risk value of each target duration combination corresponding to the candidate delivery capacity is weighted to obtain the delivery timeout risk index corresponding to the candidate delivery capacity when the candidate delivery capacity executes the to-be-distributed order, at least a part of the target duration combinations may be selected as the risk duration combination according to the timeout risk value of each target duration combination corresponding to the candidate delivery capacity. And meanwhile, determining the probability that the time length of the candidate delivery transport capacity passing through each delivery point meets each risk time length combination when the candidate delivery transport capacity executes the order to be distributed, which is determined by the screening model.
The method for selecting the risk duration combination from the target duration combinations may include: the target duration combinations can be sorted from high to low according to the overtime risk value, and a sorting result is obtained. And selecting each target time length combination before the specified position from the sequencing result as each risk time length combination.
In addition, the method for selecting a risk duration combination from the target duration combinations may further include: and selecting each target duration combination with the overtime risk value larger than the preset risk threshold value from each target duration combination as each risk duration combination.
And then, according to the probability that the time length of the candidate distribution capacity passing through each distribution point when the candidate distribution capacity executes the order to be distributed is determined to accord with each risk time length combination through the screening model, weighting the overtime risk value of each risk time length combination to obtain a distribution overtime risk index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed.
In step S308, according to the delivery timeout risk indicator corresponding to when each candidate delivery capacity executes the to-be-distributed order, the method for distributing the to-be-distributed order may include: and for each candidate distribution capacity, weighting the overtime risk value of each target time length combination corresponding to the candidate distribution capacity according to the probability that the time length of each distribution point passed by the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed accords with each target time length combination in all target time length combinations corresponding to the candidate distribution capacity, and obtaining the risk expected index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed. And carrying out weighted summation on the risk expected index corresponding to the candidate delivery capacity executing the to-be-distributed order and the delivery overtime risk index corresponding to the candidate delivery capacity executing the to-be-distributed order to obtain the comprehensive risk index corresponding to the candidate delivery capacity executing the to-be-distributed order. And finally, distributing the orders to be distributed according to the comprehensive risk index corresponding to each candidate distribution capacity when the orders to be distributed are executed. Wherein the higher the delivery timeout risk indicator, the higher the composite risk indicator.
Based on the same idea, the model training method and the order allocation method provided in the embodiments of the present specification further provide a corresponding apparatus, a storage medium, and an electronic device.
Fig. 4 is a schematic structural diagram of an apparatus for model training provided in an embodiment of the present disclosure, where the apparatus includes:
an obtaining module 401, configured to obtain a delivery capacity associated with a historical order to be distributed;
a determining module 402, configured to determine, according to distribution time length distribution between any two adjacent distribution points through which the historical to-be-distributed order is executed by the distribution capacity, each distribution time length combination passing through each distribution point when the distribution capacity executes the historical to-be-distributed order, as each sample combination;
a screening module 403, configured to select a combination with a specified duration from the sample combinations according to the similarity between the sample combinations;
a training module 404, configured to train a screening model with the specified duration combination as a label of each sample combination, where the trained screening model is used to select a target duration combination from each determined distribution duration combination of the to-be-distributed orders in an actual order distribution process, so as to distribute the to-be-distributed orders according to the target duration combination.
Optionally, the screening module 403 is specifically configured to combine the samples to form a sample set; for each sample combination in the sample set, determining the comprehensive similarity corresponding to the sample combination according to the similarity between the sample combination and other sample combinations; selecting a sample combination with the maximum comprehensive similarity from the sample set according to the comprehensive similarity corresponding to each sample combination, using the sample combination as a specified duration combination, and judging whether a preset screening stopping condition is met; and if the condition of stopping screening is determined not to be met, re-determining the sample set according to the sample combinations except the selected specified duration combination, re-determining the comprehensive similarity corresponding to each sample combination aiming at each sample combination in the re-determined sample set, and selecting the specified duration combination from the re-determined sample set until the condition of stopping screening is met.
Optionally, the screening module 403 is further configured to, after a preset stop condition is met, determine, for each selected specified duration combination, a sample combination with the largest similarity to the specified duration combination from a sample set after the preset stop condition is met, and use the sample combination as a matching sample combination; and determining the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in all the specified time length combinations as the probability of the specified time length combination according to the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the matched sample combination in the initial sample set and the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in the initial sample set.
Optionally, the training module 404 is specifically configured to input each sample combination into a screening model to be trained, output each specified duration combination to be optimized through the screening model, and determine, for each specified duration combination to be optimized, a probability to be optimized that a duration passing through each distribution point when the distribution capacity executes the historical orders to be distributed conforms to the specified duration combination to be optimized, as a probability to be optimized corresponding to the specified duration combination to be optimized; aiming at each specified duration combination to be optimized, the screening model is trained by taking the aim of minimizing the difference between the specified duration combination corresponding to the specified duration combination to be optimized 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 to be optimized and the probability to be optimized corresponding to the specified duration combination to be optimized.
Fig. 5 is a schematic structural diagram of an order distribution apparatus provided in an embodiment of the present disclosure, where the order distribution apparatus includes:
a first determining module 501, configured to obtain an order to be allocated and determine a candidate delivery capacity associated with the order to be allocated;
a second determining module 502, configured to determine, for each candidate delivery capacity, each delivery duration combination passing through each delivery point when the candidate delivery capacity executes the to-be-distributed order, as each delivery duration combination corresponding to the candidate delivery capacity;
a selecting module 503, configured to input each delivery duration combination corresponding to each candidate delivery capacity into a trained screening model, select, through the screening model and for each candidate delivery capacity, each target duration combination from each delivery duration combination corresponding to the candidate delivery capacity as each target duration combination corresponding to the candidate delivery capacity, where the screening model is obtained through model training;
a third determining module 504, configured to determine, according to each target duration combination corresponding to the candidate delivery capacity, a delivery timeout risk indicator corresponding to the candidate delivery capacity when the candidate delivery capacity executes the order to be distributed;
the allocating module 505 is configured to allocate the order to be allocated according to the delivery timeout risk indicator corresponding to the time when each candidate delivery capacity executes the order to be allocated.
Optionally, the third determining module 504 is specifically configured to determine an overtime risk value of each target duration combination corresponding to the candidate delivery capacity; selecting at least part of target duration combinations as risk duration combinations according to the overtime risk value of each target duration combination corresponding to the candidate distribution capacity; and weighting the overtime risk value of each risk duration combination according to the probability that the duration of passing through each distribution point when the candidate distribution capacity executes the order to be distributed, which is determined by the screening model, accords with each risk duration combination to obtain a distribution overtime risk index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed.
The present specification also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, is operable to perform the model training method provided in fig. 1 and the order allocation method provided in fig. 3 described above.
Based on the model training method shown in fig. 1 and the order allocation method shown in fig. 3, the embodiment of the present specification further provides a schematic structural diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the model training method described in fig. 1 and the order allocation method shown in fig. 3.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry for implementing the logical method flows can be readily obtained by a mere need to program the method flows with some of the hardware description languages described above and into an integrated circuit.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium that stores computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and embedded microcontrollers, 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 may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in purely computer readable program code means, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures within the hardware component. Or even means for performing the functions may be conceived to be both a software module implementing the method and a structure within a hardware component.
The systems, apparatuses, modules or units described in the above embodiments may be specifically implemented by a computer chip or an entity, or implemented by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, 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 flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present disclosure, and is not intended to limit the present disclosure. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A method of model training, comprising:
acquiring delivery capacity associated with historical orders to be distributed;
determining each distribution time length combination passing through each distribution point when the distribution capacity executes the historical to-be-distributed order as each sample combination according to distribution time length distribution between any two adjacent distribution points through which the distribution capacity executes the historical to-be-distributed order;
selecting a specified duration combination from the sample combinations according to the similarity between the sample combinations;
and training a screening model by taking the specified duration combination as a label of each sample combination, wherein the trained screening model is used for selecting a target duration combination from each determined distribution duration combination of the order to be distributed in the actual order distribution process so as to distribute the order to be distributed according to the target duration combination.
2. The method according to claim 1, wherein selecting a combination of specified durations from the combinations of samples according to the similarity between the combinations of samples specifically comprises:
combining the samples as a sample set;
for each sample combination in the sample set, determining the comprehensive similarity corresponding to the sample combination according to the similarity between the sample combination and other sample combinations;
selecting a sample combination with the maximum comprehensive similarity from the sample set according to the comprehensive similarity corresponding to each sample combination, using the sample combination as a specified duration combination, and judging whether a preset screening stopping condition is met;
and if the condition of stopping screening is determined not to be met, re-determining the sample set according to the sample combinations except the selected specified duration combination, re-determining the comprehensive similarity corresponding to each sample combination aiming at each sample combination in the re-determined sample set, and selecting the specified duration combination from the re-determined sample set until the condition of stopping screening is met.
3. The method of claim 2, wherein the method further comprises:
after a preset stopping condition is met, determining a sample combination with the maximum similarity to each selected specified duration combination from the sample set meeting the preset stopping condition as a matched sample combination;
and determining the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in all the specified time length combinations as the probability of the specified time length combination according to the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the matched sample combination in the initial sample set and the probability that the time length of the distribution points when the distribution capacity executes the historical to-be-distributed order conforms to the specified time length combination in the initial sample set.
4. The method of claim 3, wherein training a screening model with the specified duration combination as a label for the sample combinations comprises:
inputting each sample combination into a screening model to be trained, outputting each specified duration combination to be optimized through the screening model, and determining the probability to be optimized that the duration passing through each distribution point accords with the specified duration combination to be optimized when the distribution transport capacity executes the historical orders to be distributed as the probability to be optimized corresponding to the specified duration combination to be optimized;
aiming at each specified duration combination to be optimized, the screening model is trained by taking the aim of minimizing the difference between the specified duration combination corresponding to the specified duration combination to be optimized 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 to be optimized and the probability to be optimized corresponding to the specified duration combination to be optimized.
5. An order allocation method, comprising:
acquiring an order to be distributed, and determining candidate delivery capacity associated with the order to be distributed;
for each candidate delivery capacity, determining each delivery duration combination passing through each delivery point when the candidate delivery capacity executes the order to be distributed as each delivery duration combination corresponding to the candidate delivery capacity;
inputting each distribution time length combination corresponding to each candidate distribution capacity into a trained screening model, and selecting each target time length combination from each distribution time length combination corresponding to each candidate distribution capacity as each target time length combination corresponding to each candidate distribution capacity through the screening model, wherein the screening model is obtained by training through the method of any one of claims 1 to 4;
determining a corresponding delivery overtime risk index when the candidate delivery transport capacity executes the order to be distributed according to each target time length combination corresponding to the candidate delivery transport capacity;
and distributing the orders to be distributed according to the corresponding distribution overtime risk index when each candidate distribution capacity executes the orders to be distributed.
6. The method as claimed in claim 5, wherein determining a delivery timeout risk indicator corresponding to the candidate delivery capacity when executing the to-be-allocated order according to each target duration combination corresponding to the candidate delivery capacity includes:
determining an overtime risk value of each target duration combination corresponding to the candidate delivery capacity;
selecting at least part of target duration combinations as risk duration combinations according to the overtime risk value of each target duration combination corresponding to the candidate distribution capacity;
and weighting the overtime risk value of each risk duration combination according to the probability that the duration of each distribution point when the candidate distribution capacity executes the order to be distributed, which is determined by the screening model, accords with each risk duration combination, so as to obtain a distribution overtime risk index corresponding to the candidate distribution capacity when the candidate distribution capacity executes the order to be distributed.
7. An apparatus for model training, comprising:
the acquisition module is used for acquiring the delivery capacity associated with the historical orders to be distributed;
the determining module is used for determining each distribution time length combination passing through each distribution point when the distribution capacity executes the historical orders to be distributed as each sample combination according to distribution time length distribution between any two adjacent distribution points on which the distribution capacity executes the historical orders to be distributed;
the screening module is used for selecting a combination with specified duration from each sample combination according to the similarity between each sample combination;
and the training module is used for training a screening model by taking the specified duration combination as a label of each sample combination, wherein the trained screening model is used for selecting a target duration combination from the determined distribution duration combinations of the orders to be distributed in the actual order distribution process so as to distribute the orders to be distributed according to the target duration combination.
8. An apparatus for order distribution, comprising:
the first determining module is used for acquiring the order to be distributed and determining the candidate delivery capacity associated with the order to be distributed;
a second determining module, configured to determine, for each candidate delivery capacity, each delivery duration combination that passes through each delivery point when the candidate delivery capacity executes the to-be-distributed order, as each delivery duration combination corresponding to the candidate delivery capacity;
a selection module, configured to input each delivery duration combination corresponding to each candidate delivery capacity into a trained screening model, select, through the screening model and for each candidate delivery capacity, each target duration combination from each delivery duration combination corresponding to the candidate delivery capacity as each target duration combination corresponding to the candidate delivery capacity, where the screening model is obtained by the method according to any one of claims 1 to 4;
a third determining module, configured to determine, according to each target duration combination corresponding to the candidate delivery capacity, a delivery timeout risk indicator corresponding to the candidate delivery capacity when the candidate delivery capacity executes the order to be allocated;
and the distribution module is used for distributing the orders to be distributed according to the corresponding distribution overtime risk index when each candidate distribution capacity executes the orders to be distributed.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when being executed by a processor, carries out the method of any of the preceding claims 1-6.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-6 when executing the program.
CN202210426299.1A 2022-04-21 2022-04-21 Model training method and device, storage medium and electronic equipment Pending CN114925982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210426299.1A CN114925982A (en) 2022-04-21 2022-04-21 Model training method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210426299.1A CN114925982A (en) 2022-04-21 2022-04-21 Model training method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114925982A true CN114925982A (en) 2022-08-19

Family

ID=82806819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210426299.1A Pending CN114925982A (en) 2022-04-21 2022-04-21 Model training method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114925982A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402113A (en) * 2023-06-08 2023-07-07 之江实验室 Task execution method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402113A (en) * 2023-06-08 2023-07-07 之江实验室 Task execution method and device, storage medium and electronic equipment
CN116402113B (en) * 2023-06-08 2023-10-03 之江实验室 Task execution method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110414731B (en) Order distribution method and device, computer readable storage medium and electronic equipment
CN108492124A (en) Store information recommends method, apparatus and client
CN110525855B (en) Goods warehousing method and device
CN110020427B (en) Policy determination method and device
CN110705934A (en) Abnormal order identification method and device, readable storage medium and electronic equipment
CN110008991B (en) Risk event identification method, risk identification model generation method, risk event identification device, risk identification equipment and risk identification medium
CN113033820A (en) Federal learning method, device and equipment
CN114925982A (en) Model training method and device, storage medium and electronic equipment
CN110033092B (en) Data label generation method, data label training device, event recognition method and event recognition device
CN109597678A (en) Task processing method and device
CN116521350B (en) ETL scheduling method and device based on deep learning algorithm
CN116308738B (en) Model training method, business wind control method and device
CN115729714A (en) Resource allocation method, device, storage medium and electronic equipment
CN112434986A (en) Order form changing method and device, computer readable storage medium and electronic equipment
CN113298445B (en) Method and device for model training and unmanned equipment scheduling
CN115049263A (en) Construction method of distribution network
CN116151907A (en) Order processing method and device, electronic equipment and computer storage medium
CN115238194A (en) Book recommendation method, computing device and computer storage medium
CN114120273A (en) Model training method and device
CN114077944A (en) Order allocation method and device, storage medium and electronic equipment
CN112862133A (en) Order processing method and device, readable storage medium and electronic equipment
CN112417275A (en) Information providing method, device storage medium and electronic equipment
CN114372736A (en) Route recommendation method and device, storage medium and electronic equipment
CN112884390A (en) Order processing method and device, readable storage medium and electronic equipment
CN115545938B (en) Method, device, storage medium and equipment for executing risk identification service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination