Order pressing method and device

By constructing a fitting function and adjusting the penalty item weight, the order placement process is optimized, solving the problem of incorrect search direction in existing technologies, achieving more efficient calculations and reducing costs.

CN111798177BActive Publication Date: 2025-09-05BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010583045.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-23
Publication Date
2025-09-05
Estimated Expiration
2040-06-23

Smart Images

  • Figure CN111798177B_ABST
    Figure CN111798177B_ABST
Patent Text Reader

Abstract

This specification discloses a method and device for order pressure, which constructs a fitting function of the correspondence between the average pressure time and the average driving distance based on historical order information, constructs a fitness function according to the optimization target, and performs iterative calculations through the optimization algorithm according to the preset mapping function and decision parameters. Moreover, for each iterative process, when the solution of the iterative calculation does not meet the target conditions, the weight of the penalty term in the fitness function is adjusted according to the slope difference of the solutions obtained in the two most recent iterative processes on the fitting function, so as to continue the iterative calculation and pressure the order according to the decision parameters corresponding to the solution that meets the target conditions. The fitting function of the average pressure time and the average driving distance is determined by historical data, so that the adjustment direction of the fitness function can be guided by the fitting function, which is equivalent to determining the search direction of the algorithm, avoiding the problem of searching in the direction of unnecessary solutions, and reducing the cost of order pressure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of logistics and distribution technology, and in particular to a method and device for placing an order. Background Art

[0002] Currently, in the field of logistics and distribution, in order to improve order delivery efficiency, delivery platforms often postpone received orders to seek the possibility of combined delivery. In other words, by postponing orders, more orders can be delivered "on the way".

[0003] Setting an accurate order placement time can effectively improve order delivery efficiency, while setting an incorrect time may reduce order delivery efficiency. Therefore, in the prior art, an optimization algorithm is usually used to determine the order placement time.

[0004] Specifically, generally speaking, since the purpose of order holding is to improve delivery efficiency, it can be optimized from two dimensions, one is the average driving distance for delivering an order, and the other is the average order holding time. The optimization goal can be set to minimize the average driving distance within a certain order holding time. Therefore, a mapping function of the average driving distance and the average order holding time can be constructed, wherein the variables of the mapping function are the decision parameters for order holding, and the decision parameters are used to determine the parameters of the order holding time based on the delivery information. For example, based on the order density, traffic congestion conditions, order volume, etc. in the area, the decision parameters of the threshold of the order holding time are calculated. When solving the optimization problem, the objective function is to minimize the average driving distance, and the difference between the currently calculated order holding time and the target order holding time is used as the penalty term of the objective function.

[0005] However, the weight of the penalty term in the current objective function is often manually set. Furthermore, because the optimization objectives consist of two factors: keeping the average order placement time close to a preset value and minimizing the average travel distance, the algorithm may search in undesirable directions when searching for the optimal solution. For example, the calculated result may be that the average order placement time is equal to the preset value, but the average travel distance is longer. This can easily lead to a waste of computing power during the calculation process, increasing the cost of order placement. Summary of the Invention

[0006] The embodiments of this specification provide an order pressing method and device for solving the problems existing in the prior art.

[0007] The embodiments of this specification adopt the following technical solutions:

[0008] The order placement methods provided in this manual include:

[0009] Determine, based on the information of each historical order, a fitting function of the average order placement time and the average travel distance of the historical orders, wherein the fitting function is a function in the form of multiple straight line segments;

[0010] Based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as penalty terms, the initial fitness function is determined according to the initialized penalty term weight value;

[0011] Based on the preset mapping function of average order placement time and average driving distance and the initialized decision parameters, iterative calculation is performed through the preset optimization algorithm;

[0012] When the solution determined by this iterative process does not meet the target condition, the slope difference corresponding to the solution of the previous iterative process of the iterative process and the solution of the current iterative process on the fitting function is determined, the weight of the penalty term in the fitness function is adjusted according to the determined slope difference, and the fitness function is re-determined, so as to continue the iterative calculation through the optimization algorithm according to the re-determined fitness function until the determined solution meets the target condition, and the order is suppressed according to the decision parameters adopted in the iterative process in which the determined solution meets the target condition.

[0013] Optionally, based on each historical order information, a fitting function of the average order placement time and the average driving distance of the order is determined, specifically including:

[0014] Obtain several historical orders, and determine several groups of historical orders based on the order placement time and the preset duration of each historical order;

[0015] Based on each group of historical orders, determine several discrete points in two-dimensional space where the average order placement time and average travel distance are related.

[0016] Determine the fitting function corresponding to the discrete point by fitting multiple straight lines and a preset number of nodes;

[0017] The time span of the historical orders in each group of historical orders does not exceed the preset time length, and the number of straight lines in the fitting function corresponds to the number of nodes.

[0018] Optionally, the target conditions include: the absolute difference between the average order placement time determined in the current iteration process and the expected order placement time falls within a target interval, and the average driving distance determined in the current iteration process is not greater than the average driving distance determined in other iteration processes;

[0019] Before determining whether the solution determined by the current iterative process satisfies the target condition, the method further includes:

[0020] Determine the average order placement time and average driving distance included in the solution of the current iterative process, and determine the average driving distance of the solutions of other iterative processes before the current iterative process.

[0021] Optionally, the method further includes:

[0022] According to the preset time difference and the expected order placement time, a time range is determined as the target interval.

[0023] Optionally, determining the average driving distance of solutions of other iterative processes before the current iterative process specifically includes:

[0024] Determine the average driving distances contained in the solutions of a specified number of other iterative processes before the current iterative process.

[0025] Optionally, according to the decision parameters adopted in the iterative process of determining that the solution satisfies the target condition, the order is suppressed, specifically including:

[0026] Determining the conditions for suppressing the order based on the decision parameters used in the iterative process of determining that the solution satisfies the target condition;

[0027] For each order to be delivered, when it is determined according to the order pressing conditions that the order to be delivered needs to be pressed, the order to be delivered is pressed.

[0028] Optionally, determining a slope difference between a solution of a previous iterative process of the current iterative process and the solution of the current iterative process on the fitting function, and adjusting the weight of the penalty term in the fitness function according to the determined slope difference, specifically includes:

[0029] Determine the average single-order pressing time of the solution of the previous iterative process of the current iterative process as a first time, and determine the slope corresponding to the first time on the fitting function; and determine the average single-order pressing time of the solution of the current iterative process as a second time, and determine the slope corresponding to the second time on the fitting function;

[0030] Determine the slope difference based on the two determined slopes;

[0031] The weight of the penalty term is re-determined based on the difference between the average order pressing time and the expected order pressing time of the solution of this iterative process, the slope corresponding to the second time, and the determined slope difference.

[0032] The order pressing device provided in this manual includes:

[0033] A history construction module determines, based on the information of each historical order, a fitting function of the average order placement time and the average travel distance of the historical orders, wherein the fitting function is a function in the form of multiple straight line segments;

[0034] The determination module determines the initial fitness function based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as a penalty term, and the initialized weight value of the penalty term;

[0035] The calculation and order placement module performs iterative calculations through a preset optimization algorithm based on a preset mapping function of the average order placement time and the average driving distance and the initialized decision parameters. When the solution determined in this iterative process does not meet the target conditions, the slope difference corresponding to the solution of the previous iterative process of the iterative process and the solution of the current iterative process on the fitting function is determined, the weight of the penalty term in the fitness function is adjusted according to the determined slope difference, and the fitness function is re-determined. Iterative calculations are continued through the optimization algorithm according to the re-determined fitness function until the determined solution meets the target conditions. The order is then placed according to the decision parameters adopted in the iterative process in which the determined solution meets the target conditions.

[0036] The computer-readable storage medium provided in this specification stores a computer program, and when the computer program is executed by a processor, any of the above methods is implemented.

[0037] The electronic device provided in this specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, any of the above-described methods is implemented.

[0038] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0039] First, based on historical order information, a fitting function is constructed to characterize the corresponding relationship between the actual average order holding time and the average driving distance. This fitting function can be regarded as a response to the actual situation. Then, a fitness function is constructed according to the optimization goal, and iterative calculations are performed through the optimization algorithm based on the preset mapping function and decision parameters. Moreover, for each iterative process, when the solution of the iterative calculation does not meet the target conditions, the weight of the penalty term in the fitness function is adjusted according to the slope difference of the solutions obtained from the two most recent iterative processes on the fitting function to continue the iterative calculation. When the solution of the iterative calculation meets the target conditions, the order is pressed according to the decision parameters used in the iterative process. Determining the fitting function of the average order holding time and the average driving distance through historical data allows the adjustment direction of the fitness function to be guided by the fitting function, which is equivalent to determining the search direction of the algorithm, avoiding the problem of searching in the direction of unnecessary solutions, improving computational efficiency, and reducing the cost of order pressing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 This is a schematic diagram of the order placement process provided in the embodiments of this specification;

[0042] Figure 2 A schematic diagram of a fitting function provided in an embodiment of this specification;

[0043] Figure 3 A schematic diagram of the structure of the order pressing device provided in the embodiment of this specification;

[0044] Figure 4 Schematic diagram of an electronic device for implementing the order push method provided in the embodiments of this specification. DETAILED DESCRIPTION

[0045] To make the purpose, technical solutions, and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0047] Figure 1 The following is a schematic diagram of the order placement process provided in the embodiments of this specification:

[0048] S100: Determine a fitting function of the average order placement time and the average driving distance of the order based on each historical order information, wherein the fitting function is a function in the form of multiple straight line connections.

[0049] In this specification, for the order pressing process, since the delivery situation of the order may change every day or at different times of the day, how to determine the appropriate time to press the order becomes a process that needs to be executed before the order pressing process is carried out. This process is usually executed by the server. Similarly, in this specification, the order pressing process can also be executed by the server. Specifically, the server can be a server specifically used to process order pressing, or a server on the delivery platform that has the function of pressing orders.

[0050] In order to avoid the problem of the algorithm searching in unnecessary solution directions when using the optimization algorithm to determine the decision parameters because the optimization target is stored in multiple items, in this manual, the server can first obtain the information of each historical order before processing the order, including the pickup location, delivery location, order pressing time, order placement time, etc.

[0051] Subsequently, each historical order is divided into several groups based on the order placement time and a preset time duration. Specifically, the server selects a single time point and identifies the historical orders completed within a preset time duration before that time point to form a group of historical orders. Alternatively, the server may determine several time points starting from the current moment using a preset time step, and identify the historical orders completed within a preset time duration before each time point to form several groups of historical orders.

[0052] Since the goal of order placement is to ensure that the average order placement time and average travel distance meet requirements within a certain period of time, the preset duration can be based on the target period. For example, if the goal is to keep the average order placement time around 2 minutes and minimize the average travel distance within a week, the server can use one week as the preset duration to determine the decision parameters.

[0053] Then, for each set of historical orders, the server can determine the total driving distance required to deliver the set of historical orders based on the pickup and delivery locations of each historical order in the set. The server can then determine the average driving distance based on the ratio of the determined total driving distance to the total number of orders in the set. The server can also determine the average order holding time based on the ratio of the order holding time for each historical order to the total number of orders.

[0054] Then, according to the average order placement time and average driving distance of this group of historical orders, the corresponding points of this group of historical orders are determined in the two-dimensional space constructed by the average order placement time and the average driving distance.

[0055] Finally, according to the discrete points corresponding to each group of historical orders determined in the two-dimensional space and the preset number of nodes, a fitting function is determined by multi-segment straight line fitting.

[0056] Figure 2 This is a schematic diagram of the fitting function provided in this manual, where the horizontal axis x represents the average order time and the vertical axis y represents the average driving distance. In this two-dimensional space, there are multiple points, each of which corresponds to the average driving distance and average order time of a group of historical orders. According to the preset number of nodes, the final fitting function is determined to consist of several straight lines, and the function is fitted to each discrete point in the two-dimensional space to determine the fitting function. Of course, Figure 2 The fitting function is only schematically shown in the figure, and the number of straight lines included in the specific fitting function is not limited in this specification.

[0057] Specifically, the server can divide the two-dimensional space on the horizontal axis according to the number of nodes, and perform straight line fitting on the discrete points in each segment of the space obtained after the segmentation, for example, using the Random Sample Consensus (RANSAC) algorithm to perform straight line fitting. The determined straight line segments are used as fitting functions. The fitting function can be expressed as y i =K i x i +B i , where i represents Figure 2 The areas corresponding to different broken lines, for example, the fitting function corresponding to the area x0~x1 is y0=K0x0+B0, where K represents the slope of the broken line and B represents the y-axis height of the base of the broken line.

[0058] Alternatively, the server may also perform broken line fitting based on each discrete point in the two-dimensional space to determine a fitting function. Of course, performing broken line fitting on discrete points is a relatively mature method in the prior art, so this specification will not elaborate on this.

[0059] It should be noted that since the fitting function is fitted based on the information of actual historical orders, it reflects the actual situation. Therefore, the fitting function can be used to guide the search direction of the algorithm during the iterative calculation of subsequent optimization problems, avoiding the wrong search direction when searching for solutions to multi-objectives, resulting in wasted computing power searching for unnecessary solutions.

[0060] S102: Based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as penalty items, an initial fitness function is determined according to the weight value of the initialized penalty item.

[0061] In this specification, since the decision parameters are solved based on the optimization algorithm, it is necessary to determine the fitness function used in the calculation process, that is, the function that adjusts the difference between the final desired effect and the calculated solution to the target.

[0062] Specifically, the server can determine the initial fitness function based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as a penalty term, and the weight value of the initialized penalty term. For example, the fitness function can be f min (P i )+α|C i -C standard |, where P i represents the average driving distance calculated in the i-th iteration, C i It represents the average order-pressing time calculated in the i-th iteration, C standardrepresents the expected order placement time, that is, the average order placement time expected in the order placement process. α is the weight value of the penalty term, which can be initialized according to a preset value, for example, 0.3.

[0063] S104: performing iterative calculations using a preset optimization algorithm according to a preset mapping function of average order placement time and average driving distance and initialized decision parameters.

[0064] In this specification, after determining the fitness function and the fitting function, the server can perform iterative calculations through the optimization algorithm based on the preset mapping function of the average order placement time and the average driving distance, as well as the initialized decision parameters.

[0065] Specifically, the server may first randomly generate initialized decision parameters as the initial solution for the optimization problem. Then, using the mapping function and the determined decision parameters, the server calculates an initial solution, i.e., the solution obtained in the first iteration. The initial solution is calculated based on the initialized decision parameters, calculating the average order placement time and average travel distance. Next, the server determines whether the initial solution obtained in the first iteration meets the target conditions. If not, iterative calculations continue in step S106 until the calculated solution meets the target conditions, thereby determining the optimal solution to the optimization problem.

[0066] In this specification, the purpose of the iterative calculations performed by the optimization algorithm during the order placement process is to obtain a set of decision parameters such that the difference between the average order placement time and the expected order placement time is within a preset range, and the average travel distance of the order is minimized, that is, the content reflected by the fitness function constructed above. Therefore, the target condition can also be: the absolute difference between the average order placement time and the expected order placement time determined by the iterative process falls within the target range, and the average travel distance determined by the iterative process is no greater than the average travel distance determined by the other iterative processes.

[0067] Of course, for the initial solution, since it is impossible to determine whether the obtained average driving distance is the minimum value, it is usually necessary to continue iterative calculations to determine the solution that meets the target conditions through the solutions of multiple iterative processes.

[0068] In addition, for each iterative process, the server may also determine the data required for the judgment before making a judgment, that is, determine the average order pressing time and average driving distance contained in the solution of the iterative process, and determine the average driving distance of the solutions of other iterative processes before the iterative process.

[0069] Furthermore, in this specification, since the expectation is to obtain the minimum average driving distance, it is necessary to determine whether the average driving distance of the solution of the current iterative process has been unable to continue to converge. However, since the optimization algorithm is a process of gradually approaching the optimal solution, the server only needs to determine whether the current average driving distance has been unable to continue to converge based on the solutions of the most recent iterative processes. Therefore, the server can determine the average driving distances contained in the solutions of the specified number of other iterative processes before the iterative process, and based on the size of each current average driving distance and the average driving distances contained in the other solutions, when it is determined that the average driving distances determined by the iterative process are not greater than the average driving distances determined by the other iterative processes, it is determined that the solution of the iterative process meets f min (P i ), which is the condition for minimizing the average driving distance.

[0070] Furthermore, for the target interval, the server can determine a time range as the target interval based on the preset time difference and the expected order time. For example, if the expected order time is 2 minutes and the preset time difference is 0.3 minutes, then 1.7 to 2.3 minutes can be determined as the target interval. When the average order time contained in the solution of the iterative process falls within the range of 1.7 to 2.3 minutes, it is determined that the solution of the iterative process meets C i -C standard <C 差值 , which is the condition for falling into the target interval.

[0071] S106: When the solution determined by this iterative process does not meet the target condition, the slope difference corresponding to the solution of the previous iterative process of the iterative process and the solution of the current iterative process on the fitting function is determined, the weight of the penalty term in the fitness function is adjusted according to the determined slope difference, and the fitness function is re-determined, so as to continue the iterative calculation through the optimization algorithm according to the re-determined fitness function, until the determined solution meets the target condition, the order is suppressed according to the decision parameters adopted in the iterative process in which the determined solution meets the target condition.

[0072] In this specification, the server may repeat iterative calculations, and in each iterative process, when the solution of this iterative process does not meet the target conditions, the server may continue to adjust the decision parameters according to the fitness function and perform iterative calculations until a solution that meets the target conditions is calculated.

[0073] Specifically, this document describes the first iterative process. Since it is impossible to determine whether the initial solution meets the target conditions, the server can determine the fitness of the initialized decision parameters through the fitness function based on the average order pressing time and average driving distance of the initial solution.

[0074] Secondly, continue to adjust the initialized decision parameters, for example, randomly adjust one or several parameters in random directions, continue to perform iterative calculations, re-determine the solution, and determine the fitness of the adjusted decision parameters used in the iterative calculation.

[0075] Then, the adjustment direction of the decision parameters is determined according to the difference in fitness between the two iterative processes.

[0076] Finally, the optimal solution is obtained through multiple iterative calculation processes.

[0077] In this specification, when the server determines the adjustment direction of the decision parameter based on the difference in fitness between two iterative processes, in order to avoid searching for unnecessary solutions, the server can determine the adjustment direction of the decision parameter based on the fitting function determined in step S100.

[0078] Specifically, for each iteration process, the server may first determine the average time it takes to solve the problem in the previous iteration process as the first time, and then determine the average time it takes to solve the problem in the current iteration process as the second time.

[0079] Next, the server can determine the slopes corresponding to the first and second times in the fitting function. These slopes represent the changing trend of the average travel distance at a certain average order placement time based on historical parameters. The decision parameters need to be adjusted based on this trend.

[0080] Then, the server may determine the slope difference based on the two determined slopes.

[0081] Finally, the weight of the penalty term is re-determined based on the difference between the average order-pressing time of the solution of this iterative process and the expected order-pressing time, the slope corresponding to the second time, and the determined slope difference. Using the formula expression, the server can be based on the formula (1-β)(C i -C standard )K i +K i ·K i,i-1 β determines the weight of the penalty term, where β is a preset parameter and K i is the slope corresponding to the average pressure time (i.e., the second time) of the solution of the i-th iteration process, K i,i-1 is the slope difference between the i-th iteration process and the i-1-th iteration process. It can be seen that when the solutions of the two iterative processes are within the broken line range of different fitting functions, the weight adjustment can be made to point to the expected order-pressing time according to the slope difference. That is to say, when the order-pressing time does not fall into the target interval, the weight adjustment of the penalty item should take into account the adjustment of the order-pressing time. When the average order-pressing time of the solution of this iterative process has fallen into the target interval, that is, Ki,i-1 When it is 0, we only need to consider whether the average driving distance can be smaller. At this time, the adjustment of the penalty item weight has nothing to do with the order holding time.

[0082] In addition, in this specification, the value of the preset parameter β can be determined in different ways depending on the optimization algorithm used. For example, when using a particle swarm optimization algorithm, β can be determined based on the distance between gbest and pbest in the current iteration. When using a simulated annealing algorithm, β can be determined based on the stage parameter T. In other words, the preset parameter β can be determined based on the distance between the current solution and the global solution.

[0083] When the solution determined by the iterative process meets the target conditions, the order can be suppressed according to the decision parameters adopted in this iterative process, that is, the decision parameters adopted in the iterative process in which the solution determined meets the target conditions.

[0084] In this specification, if it is determined in step S104 that the solution of this iterative process meets the target condition, then the decision parameters used in this iterative process can achieve the effect corresponding to the target condition after the order is pushed. Therefore, the server can determine the decision parameters used in this iterative process and determine the conditions for pushing the order based on the decision parameters. Thereafter, when receiving an order to be delivered, it determines whether the order to be delivered needs to be pushed based on the determined order pushing conditions. If so, the order is pushed; otherwise, the order is not pushed.

[0085] Alternatively, when it is determined in step S104 that the solution of the current iterative process does not meet the target condition, multiple iterative processes are performed through step S106 to recalculate the solution until the solution meets the target condition. The decision parameters used in the iterative process for calculating the solution that meets the target condition are determined, and the conditions for suppressing the order are determined based on the decision parameters. Thereafter, when an order to be delivered is received, it is determined whether the order to be delivered needs to be suppressed based on the determined order suppression conditions. If so, the order suppression is performed; otherwise, the order suppression is not performed.

[0086] based on Figure 1The order push method shown in the figure first constructs a fitting function based on historical order information that characterizes the corresponding relationship between the actual average push time and the average driving distance. This fitting function can be regarded as a response to the actual situation. Then, a fitness function is constructed according to the optimization goal, and iterative calculations are performed through the optimization algorithm based on the preset mapping function and decision parameters. Moreover, for each iteration process, when the solution of the iterative calculation does not meet the target conditions, the weight of the penalty term in the fitness function is adjusted based on the slope difference of the solutions obtained in the two most recent iterative processes on the fitting function to continue the iterative calculation. When the solution of the iterative calculation meets the target conditions, the order is pushed according to the decision parameters used in the iterative process. Determining the fitting function of the average push time and the average driving distance through historical data allows the adjustment direction of the fitness function to be guided by the fitting function, which is equivalent to determining the algorithm search direction, avoiding the problem of searching in the direction of unnecessary solutions, improving computational efficiency, and reducing the cost of order push.

[0087] based on Figure 1 The order pressing process shown in the embodiment of this specification also provides a structural diagram of the order pressing device, such as Figure 3 shown.

[0088] Figure 3 This is a schematic diagram of the structure of the order pressing device provided in the embodiment of this specification, and the device includes:

[0089] A history construction module 200 determines a fitting function of the average order placement time and the average travel distance of the historical orders based on the information of each historical order, wherein the fitting function is a function in the form of multiple straight line segments;

[0090] Determination module 202, based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as a penalty term, and according to the initialized weight value of the penalty term, determines an initial fitness function;

[0091] The calculation and order placement module 204 performs iterative calculations through a preset optimization algorithm based on a preset mapping function of the average order placement time and the average driving distance and the initialized decision parameters. When the solution determined by the iterative process does not meet the target conditions, the solution of the previous iterative process of the iterative process and the slope difference corresponding to the solution of the iterative process on the fitting function are determined, the weight of the penalty term in the fitness function is adjusted according to the determined slope difference, and the fitness function is re-determined, so as to continue to perform iterative calculations through the optimization algorithm according to the re-determined fitness function, until the determined solution meets the target conditions, and the order is placed according to the decision parameters adopted in the iterative process.

[0092] Optionally, the history construction module 200 obtains several historical orders, determines several groups of historical orders based on the order placement time and a preset duration of each historical order, determines several discrete points of the average order placement time and the average driving distance in a two-dimensional space based on each group of historical orders, and determines the fitting function corresponding to the discrete points through multi-segment straight line fitting and a preset number of nodes, wherein the time span of the historical orders in each group of historical orders does not exceed the preset duration, and the number of straight lines in the fitting function corresponds to the number of nodes.

[0093] Optionally, the target conditions include: the absolute difference between the average order pressing time determined by the iterative process and the expected order pressing time falls within the target interval, the average driving distance determined by the iterative process is not greater than the average driving distance determined by other iterative processes, and the calculation and order pressing module 204 determines the average order pressing time and average driving distance contained in the solution of the iterative process before determining whether the solution determined by the iterative process meets the target conditions, and determines the average driving distance of the solutions of other iterative processes before the iterative process.

[0094] Optionally, the calculation and order pressing module 204 determines a time range as a target interval according to a preset time difference and the expected order pressing time.

[0095] Optionally, the calculation and order-pressing module 204 determines the average driving distances included in the solutions of a specified number of other iterative processes before the iterative process.

[0096] Optionally, the calculation and order pressing module 204 determines the conditions for pressing orders based on the decision parameters adopted in the iterative process. For each order to be delivered, when it is determined that the order to be delivered needs to be pressed based on the order pressing conditions, the order to be delivered is pressed.

[0097] Optionally, the calculation and order-pressing module 204 determines the average order-pressing time of the solution of the previous iterative process of the iterative process as the first time, and determines the slope corresponding to the first time on the fitting function; and determines the average order-pressing time of the solution of the iterative process as the second time, and determines the slope corresponding to the second time on the fitting function, determines the slope difference based on the two determined slopes, and redetermines the weight of the penalty term based on the difference between the average order-pressing time of the solution of the iterative process and the expected order-pressing time, the slope corresponding to the second time, and the determined slope difference.

[0098] It should be noted that Figure 1 Steps S104 and S106 constitute the process of iterative solution, so in Figure 3In the device shown, the corresponding processes of step S104 and step S106 can be executed through the same calculation and order suppression module 204, and how to suppress the order can be determined based on the decision parameters adopted by the solution that meets the target conditions.

[0099] The embodiments of this specification also provide a computer-readable storage medium, which stores a computer program. The computer program can be used to execute any one of the above-mentioned order suppression methods.

[0100] based on Figure 1 The order pressing process provided in this specification also proposes Figure 4 The electronic equipment shown. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement any of the above-mentioned order pressure methods.

[0101] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0102] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0103] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0104] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, 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.

[0105] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0106] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0110] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0111] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0112] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0113] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0114] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0116] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0117] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A method for placing an order, characterized in that: include: Determine, based on the information of each historical order, a fitting function of the average order placement time and the average travel distance of the historical orders, wherein the fitting function is a function in the form of multiple straight line segments; Based on the minimum average driving distance and the absolute difference between the average order placement time and the expected order placement time as penalty terms, the initial fitness function is determined according to the initialized penalty term weight value; Based on the preset mapping function of average order placement time and average driving distance and the initialized decision parameters, iterative calculation is performed through the preset optimization algorithm; When the solution determined by this iterative process does not meet the target condition, the solution of the previous iterative process of this iterative process and the slope difference corresponding to the solution of the current iterative process on the fitting function are determined, and the weight of the penalty term in the fitness function is adjusted according to the determined slope difference, and the fitness function is re-determined, so as to continue the iterative calculation through the optimization algorithm according to the re-determined fitness function until the determined solution meets the target condition. The order is suppressed according to the decision parameters adopted in the iterative process in which the determined solution meets the target condition. The target conditions include: the absolute difference between the average suppression time determined by this iterative process and the expected suppression time falls within the target interval, and the average driving distance determined by this iterative process is not greater than the average driving distance determined by other iterative processes.

2. The method according to claim 1, wherein Based on the information of each historical order, determine the fitting function of the average order placement time and average travel distance of the historical orders, specifically including: Obtain several historical orders, and determine several groups of historical orders based on the order placement time and the preset duration of each historical order; Based on each group of historical orders, determine several discrete points in two-dimensional space where the average order placement time and average travel distance are related. Determine the fitting function corresponding to the discrete point by fitting multiple straight lines and a preset number of nodes; The time span of the historical orders in each group of historical orders does not exceed the preset time length, and the number of straight lines in the fitting function corresponds to the number of nodes.

3. The method according to claim 1, wherein The target conditions include: the absolute difference between the average order placement time determined by the current iteration and the expected order placement time falls within the target interval, and the average driving distance determined by the current iteration is not greater than the average driving distance determined by other iterations; Before determining whether the solution determined by the current iterative process satisfies the target condition, the method further includes: Determine the average order placement time and average driving distance included in the solution of the current iterative process, and determine the average driving distance of the solutions of other iterative processes before the current iterative process.

4. The method according to claim 3, wherein The method further comprises: According to the preset time difference and the expected order placement time, a time range is determined as the target interval.

5. The method according to claim 3, wherein Determine the average driving distance of the solutions of the other iterative processes before the current iterative process, specifically including: Determine the average driving distances contained in the solutions of a specified number of other iterative processes before the current iterative process.

6. The method according to claim 1, wherein The order is suppressed based on the decision parameters adopted in the iterative process of determining that the solution satisfies the target condition, specifically including: Determining the conditions for suppressing the order based on the decision parameters used in the iterative process of determining that the solution satisfies the target condition; For each order to be delivered, when it is determined according to the order pressing conditions that the order to be delivered needs to be pressed, the order to be delivered is pressed.

7. The method according to claim 1, wherein Determining the slope difference between the solution of the previous iterative process of the current iterative process and the solution of the current iterative process on the fitting function, and adjusting the weight of the penalty term in the fitness function according to the determined slope difference, specifically including: Determine the average single-order pressing time of the solution of the previous iterative process of the current iterative process as a first time, and determine the slope corresponding to the first time on the fitting function; and determine the average single-order pressing time of the solution of the current iterative process as a second time, and determine the slope corresponding to the second time on the fitting function; Determine the slope difference based on the two determined slopes; The weight of the penalty term is re-determined based on the difference between the average order pressing time and the expected order pressing time of the solution of this iterative process, the slope corresponding to the second time, and the determined slope difference.

8. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intelligent route arrangement method for logistics distribution vehicles

    CN108921468A

  • Parameter optimization method, terminal device, and computer storage medium

    CN110376900A