Order delivery scheduling method and device and electronic equipment

The particle swarm algorithm optimizes the order distribution plan, which solves the problem that the delivery distance and delivery time in the existing technology have not been comprehensively considered, and achieves the improvement of order distribution efficiency.

CN118982302APending Publication Date: 2024-11-19CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411329289.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In the prior art, the order distribution efficiency is low, mainly because the random allocation method fails to comprehensively consider the delivery route and delivery time, resulting in low distribution efficiency.

Method used

The particle swarm algorithm is used to iteratively optimize the initial distribution plan, calculate the shortest delivery time through the fitness function, determine the optimal distribution plan, optimize the order route and improve the distribution efficiency.

Benefits of technology

The optimal distribution solution based on particle swarm algorithm is realized, the order distribution route is optimized, the distribution efficiency is improved, and the problem of low distribution efficiency under random distribution method is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982302A_ABST
    Figure CN118982302A_ABST
Patent Text Reader

Abstract

The invention discloses an order delivery scheduling method and device and electronic equipment. The method comprises the following steps: receiving an order request of a target object, and generating an initial delivery scheme according to the order request; the initial delivery scheme is determined as primary particles, iteration is carried out on the primary particles by adopting a particle swarm algorithm, the fitness value of the particle corresponding to each iteration is determined, iteration is stopped until a preset condition is met, and the fitness value is used for representing the shortest delivery duration corresponding to each order delivery scheme; and determining the particle corresponding to the maximum fitness value as a target delivery scheme of the order request, and carrying out order delivery according to the target delivery scheme. According to the method and the device, the technical problem that the order delivery efficiency is relatively low due to the fact that a random distribution mode is generally adopted for order delivery in related technologies and the influence of the delivery distance and the delivery time is not comprehensively considered is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of task allocation, and more specifically, to a scheduling method, device and electronic equipment for order delivery. Background Art

[0002] With the popularity of online shopping, the number of online product delivery orders has increased accordingly. How to reasonably distribute delivery orders to delivery personnel so that all orders to be delivered can be completed in the shortest time is an issue that deserves great attention.

[0003] In related technologies, all orders are usually randomly assigned to the delivery personnel in the system. This random assignment method produces feasible solutions with large differences in quality, and does not comprehensively consider factors such as the shortest delivery distance and the shortest delivery time, resulting in low order delivery efficiency.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a scheduling method, device and electronic device for order delivery, so as to at least solve the technical problem that the order delivery efficiency is low because the related technology usually adopts a random allocation method for order delivery without comprehensively considering the impact of delivery distance and delivery time.

[0006] According to one aspect of an embodiment of the present application, a scheduling method for order delivery is provided, including: receiving an order request from a target object, and generating an initial delivery plan based on the order request; determining the initial delivery plan as a first-generation particle, iterating the first-generation particles using a particle swarm algorithm, and determining the fitness value of the particle corresponding to each iteration until the iteration is stopped when a preset condition is met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan; determining the particle corresponding to the maximum value of the fitness value as the target delivery plan for the order request, and delivering the order according to the target delivery plan.

[0007] Optionally, receiving an order request from a target object and generating an initial delivery plan based on the order request includes: determining a request time of the order request and number information of the delivery person; and generating an initial delivery plan for the order request based on the request time and number information.

[0008] Optionally, a particle swarm algorithm is used to iterate the first-generation particles, and the fitness value of the particles corresponding to each iteration is determined, including: determining the initial speed information of the first-generation particles, wherein the initial speed information is used to represent the order delivery sequence in the initial delivery plan; iterating the first-generation particles and the initial speed information to obtain target particles and target speed information, wherein the target particles are particles after the first-generation particles are iterated any number of times, and the target speed information is used to represent the order delivery sequence of the target particles in the corresponding delivery plan; calculating the fitness value of the target particle through a fitness function, wherein the fitness function is determined by the total delivery time and the total assembly time of the delivery plan corresponding to the target particle.

[0009] Optionally, iterating the initial generation particles and initial velocity information to obtain target particles and target velocity information includes: performing a transposition operation on the initial generation particles according to the initial velocity information to obtain target particles; initializing a learning factor, an inertia weight, an individual extreme value, and a group extreme value of the particle swarm algorithm; and determining the target velocity information according to the target particles, the learning factor, the inertia weight, the individual extreme value, and the group extreme value.

[0010] Optionally, the fitness function is determined in the following manner: determine the order distance, pickup distance, installation and maintenance time and average delivery speed of any order in the delivery plan corresponding to the target particle; determine the total delivery time based on the order distance, pickup distance and average delivery speed; determine the total installation and maintenance time based on the installation and maintenance time; determine the fitness function based on the total delivery time and the total installation and maintenance time.

[0011] Optionally, after determining the initial delivery plan as the first-generation particle, the method further includes: determining the business status of the order requests based on the number of order requests and the number of delivery personnel; when the number of order requests is greater than the number of delivery personnel, determining the business status of the order requests to be a busy state, and increasing the delivery orders in the initial delivery plan in the busy state; when the number of order requests is less than the number of delivery personnel, determining the business status of the order requests to be an idle state, and reducing the delivery orders in the initial delivery plan in the idle state.

[0012] Optionally, determine the particle set after each iteration of the first generation of particles; determine the individual extreme value in the particle set, wherein the individual extreme value is used to indicate that the local fitness value of the particle set is optimal; stop the iteration when the difference between the fitness value corresponding to the individual extreme value of the particle set and the previous generation of particle set is less than a preset threshold for multiple consecutive times; or stop the iteration when the number of iterations of the first generation of particles reaches a preset number of iterations.

[0013] According to another aspect of an embodiment of the present application, a scheduling device for order delivery is also provided, including: a receiving module, used to receive an order request from a target object, and generate an initial delivery plan based on the order request; an iteration module, used to determine the initial delivery plan as a first-generation particle, use a particle swarm algorithm to iterate the first-generation particles, and determine the fitness value of the particles corresponding to each iteration until the iteration is stopped when a preset condition is met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan; a delivery module, used to determine the particle corresponding to the maximum fitness value as the target delivery plan for the order request, and perform order delivery according to the target delivery plan.

[0014] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including: a memory and a processor; the memory is used to store program instructions; the processor is connected to the memory and is used to execute the scheduling method for implementing the above-mentioned order delivery.

[0015] According to another aspect of the embodiment of the present application, a non-volatile storage medium is further provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned order delivery scheduling method by running the computer program.

[0016] According to another aspect of the embodiments of the present application, a computer program product is also provided, including computer instructions, which implement the above-mentioned order delivery scheduling method when executed by a processor.

[0017] In an embodiment of the present application, an order request from a target object is received, and an initial delivery plan is generated based on the order request; the initial delivery plan is determined as a first-generation particle, a particle swarm algorithm is used to iterate the first-generation particles, and the fitness value of the particle corresponding to each iteration is determined until the iteration is stopped when a preset condition is met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan; the particle corresponding to the maximum value of the fitness value is determined as the target delivery plan for the order request, and the order is delivered according to the target delivery plan, thereby achieving the purpose of determining the optimal delivery plan for online orders based on the particle swarm algorithm, thereby achieving the technical effect of optimizing the order delivery route and improving the order delivery efficiency, and further solving the technical problem of low order delivery efficiency due to the fact that the related technology usually adopts a random allocation method for order delivery, without comprehensively considering the influence of the delivery distance and delivery time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] 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:

[0019] Figure 1It is a hardware structure diagram of a computer terminal for implementing a scheduling method for order delivery according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for scheduling order delivery according to an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of a gene transposition according to an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of a gene mutation according to an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a gene recombination according to an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of a scheduling process for order delivery according to an embodiment of the present application;

[0025] Figure 7 It is a structural diagram of a scheduling device for order delivery according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.

[0029] First, some nouns or terms that appear in the process of explaining the embodiments of the present application are subject to the following explanations:

[0030] Physical grid: An area can be circled on a map as a physical grid. Customers with addresses within the area will receive delivery, installation, and maintenance services from the physical grid.

[0031] Distribution station: Multiple physical grids and the delivery personnel within the grids constitute a distribution station.

[0032] In order to solve the problem of low order delivery efficiency in the related art, the present application embodiment provides a scheduling method for order delivery, which can be run on Figure 1 In the computer terminal shown, the computer terminal is described below.

[0033] The order delivery scheduling method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a scheduling method for order delivery. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0034] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the scheduling method for order delivery in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the scheduling method for order delivery described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0038] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0039] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a scheduling method for order delivery. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] Figure 2 is a flow chart of a method for scheduling order delivery according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0041] Step S202: receiving an order request from a target object, and generating an initial delivery plan according to the order request.

[0042] Step S204, determine the initial delivery plan as the first generation of particles, use the particle swarm algorithm to iterate the first generation of particles, and determine the fitness value of the particles corresponding to each iteration until the iteration is stopped when the preset conditions are met, where the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan.

[0043] Step S206: determine the particle corresponding to the maximum fitness value as the target delivery plan for the order request, and deliver the order according to the target delivery plan.

[0044] Through the above steps S202 to S206, the purpose of determining the optimal delivery plan for online orders based on the particle swarm algorithm is achieved, thereby achieving the technical effect of optimizing the order delivery route and improving the order delivery efficiency, thereby solving the technical problem of low order delivery efficiency due to the fact that the related technology usually adopts a random allocation method for order delivery without comprehensively considering the impact of the delivery distance and delivery time. The following is a detailed description.

[0045] In the embodiment of the present application, each order to be delivered has been matched with the physical grid where the address is located according to the address of the ordering customer (i.e., the target object mentioned above). Assuming that the delivery personnel all start from the delivery station, the delivery personnel need to complete different tasks according to the type of each order. For example, number card orders require delivery + real-name delivery, broadband orders require delivery + installation and maintenance, etc.; and because each delivery personnel has different proficiency, the time to complete installation and maintenance for each type of order is also different. Therefore, the embodiment of the present application combines the total delivery distance and delivery time of the operator in actual business, and adds the following conditional restrictions each time an individual order is generated:

[0046] 1. Delivery Personnel Screening

[0047] Each customer's order request belongs to a physical grid, and each distribution station governs multiple delivery personnel and multiple physical grids. That is, orders belonging to physical grid A (physical grid A belongs to distribution station A) will only be delivered by delivery personnel from distribution station A.

[0048] 2. Skill screening

[0049] The installation and maintenance skills required for each order are different. For example, SIM cards require delivery + real-name verification, and broadband requires delivery + installation and maintenance. The skills possessed by each deliveryman are different, so it is necessary to screen out deliverymen whose skills match the order skills before assigning the order to the deliveryman to ensure that all services are completed in one visit.

[0050] 3. Filter by existing order volume

[0051] When dispatching orders, we first determine the number of orders the delivery person already has. The more orders the person has, the lower the priority of the order, so as to avoid a situation where a large number of orders are piled up for the same delivery person.

[0052] 4. Order packaging

[0053] Orders from the same store and community address are packaged together for delivery as one order, reducing duplicate delivery of orders and solving the problem of multiple orders with one delivery. In the repeated delivery plan, the more orders a person takes, the better. In the case of multiple orders, the best efficiency is achieved when people are evenly distributed.

[0054] In the above process, although the calculation of the superiority of each dispatching plan has not yet begun, most of the poor delivery plans have been eliminated after screening under the above conditions, which helps to improve the superiority of the subsequent particle swarm and accelerate the convergence speed of the particle swarm algorithm.

[0055] In the above step S202, an order request from a target object is received, and an initial delivery plan is generated according to the order request, including: determining the request time of the order request and the number information of the delivery person; and generating the initial delivery plan for the order request according to the request time and number information.

[0056] In the embodiment of the present application, after receiving the customer's order request, the customer's order can be initially arranged in chronological order, and the arrangement is assumed to be o1, o2, o3, ..., o m ; and pre-set the delivery personnel's number, and initialize the delivery personnel in the order of the number, assuming that the arrangement is p1, p2, p3, ..., p n ; Arrange and combine the order arrangement and the delivery personnel arrangement to obtain gene fragment D i =[1,2,3,...,m], the gene fragment D i This is the initial delivery plan mentioned above.

[0057] In this step, by arranging the received order requests in chronological order and the delivery personnel in numerical order, an initial delivery plan can be quickly generated and the orderliness of the initial delivery plan is ensured, providing a starting point for the subsequent particle swarm optimization algorithm.

[0058] In the above step S204, the particle swarm algorithm is used to iterate the first-generation particles, and the fitness value of the particles corresponding to each iteration is determined, including: determining the initial speed information of the first-generation particles, wherein the initial speed information is used to represent the order delivery sequence in the initial delivery plan; iterating the first-generation particles and the initial speed information to obtain the target particles and the target speed information, wherein the target particles are the particles after the first-generation particles are iterated any number of times, and the target speed information is used to represent the order delivery sequence of the target particles in the corresponding delivery plan; calculating the fitness value of the target particles through the fitness function, wherein the fitness function is determined by the total delivery time and the total assembly time of the delivery plan corresponding to the target particles.

[0059] In the embodiment of the present application, based on the initial delivery plan, the PSO particle swarm algorithm is continuously iterated and adjusted to optimize the minimum delivery time, thereby determining the optimal order delivery plan. The details are as follows:

[0060] First, the initial delivery plan (i.e., the gene fragment D i =[1,2,3,...,m]) is determined as a primary particle X i-1 , initialize the initial velocity information V of the first generation of particles i-1 , the initial velocity information represents the order of the first generation of particles in the corresponding distribution plan (that is, the above-mentioned initial distribution plan), which affects the moving direction and distance of the first generation of particles in space. It should be noted that each particle corresponds to a gene fragment, so the initial velocity information V i-1 It also indicates the gene arrangement order of the first-generation particles in the corresponding gene fragment.

[0061] Secondly, the PSO particle swarm algorithm is used for iterative updating. The iterative process involves updating the position information (delivery plan) and speed information (delivery order) of each particle. Taking the first generation of particles as an example, by iterating the first generation of particles (initial delivery plan) and initial speed information (order delivery order of the initial delivery plan), a new generation of particles (i.e., the above-mentioned target particles) and a new generation of speed information (i.e., the above-mentioned target information) can be obtained. Among them, the target particle can be a particle after any number of iterations, and the target speed information indicates the order delivery order in the delivery plan corresponding to the target particle.

[0062] Specifically, iterating the initial generation particles and initial velocity information to obtain the target particles and target velocity information may include: performing a transposition operation on the initial generation particles according to the initial velocity information to obtain the target particles; initializing the learning factor, inertia weight, individual extreme value and group extreme value of the particle swarm algorithm; and determining the target velocity information according to the target particles, the learning factor, the inertia weight, the individual extreme value and the group extreme value.

[0063] In the embodiment of the present application, for the gene fragment corresponding to each particle, the position information and speed information of the particle can be updated through the gene transposition operation (i.e. the above transposition operation) to ensure that the position of the particle movement can cover every position in the area to which the particle belongs. Among them, the particle swarm algorithm formula includes the position formula and the speed formula, which are as follows:

[0064] The particle position formula is:

[0065] X i =X i-1 +V i-1 *t

[0066] Among them, X i represents the target particle, X i-1 represents the first generation of particles, V i-1 Represents the initial velocity information, and t represents the time step (usually 1).

[0067] In the process of position iteration, in order to reduce the probability of repeated movement of the first-generation particles, it is necessary to perform gene transposition operation on the gene fragments corresponding to the first-generation particles. The principle is as follows: Figure 3 Assume that the first generation particle X i-1 =[1,2,3,4,1], initial velocity information V i-1 =[5,4,2,2,3], we can use the initial velocity information V i-1 For the first generation particle X i-1 Transpose, because the initial velocity information V i-1 There are ways of gene transposition or the intensity of gene transposition, such as Figure 3 As shown in the permutation sequence in, the target particle obtained according to the permutation sequence is X i =[1,2,1,3,4].

[0068] The velocity formula of a particle is:

[0069] V i =ω*V i-1 +C1*rand()*(pbest i -x i )+C2*rand()*(gbest i -x i )

[0070] Among them, V i represents the target speed information, ω represents the inertia weight, C1 and C2 represent the learning factors, rand() represents the random parameter, pbest i Indicates individual extreme value, gbest i Represents the extreme value of the group.

[0071] In the process of velocity iteration, for the first generation of particles, we must first initialize the parameter information in the velocity formula, such as the learning factors C1 and C2, which are used to determine the velocity of the first generation of particles toward the individual extreme value pbest. i and group extreme value gbest i The intensity of movement; such as the inertia weight ω, which is used to control the degree to which the first generation of particles maintains the current speed; such as the individual extreme value pbest i and group extreme value gbest i , which is used to continuously optimize the order delivery plan corresponding to the particles.

[0072] In the above process, since the inertia weight ω is a fixed value, the group extreme value will greatly affect the flight direction of all particles, and the particle's own optimization ability will be greatly attenuated. It is possible that after just a few generations, all particles have been concentrated at the position of the global optimal solution and are close to stagnation. Therefore, in order to avoid this premature phenomenon, the inertia weight ω can be converted into a linearly changing value. The specific formula is as follows:

[0073]

[0074] Among them, ω max is the maximum inertia weight, ω min is the minimum inertia weight, t is the current iteration number, t max is the maximum number of iterations. From the formula, we can see that ω is a linear decreasing process. In the early stage of iteration, ω is large, the global search ability is strong, and the population diversity can be expanded to the maximum extent. In the later stage, ω is small, the local convergence ability is strong, and the optimization can be performed again according to the individual optimal solution to avoid premature phenomenon as much as possible.

[0075] Finally, a fitness function can be determined based on the total delivery time and total assembly time of the delivery plan corresponding to the target particle. The fitness value corresponding to the target particle is calculated through the fitness function, where the fitness value is used to evaluate the quality of the delivery plan corresponding to each particle.

[0076] In an embodiment of the present application, the fitness function can be determined in the following manner: determine the order distance, pickup distance, installation and maintenance time, and average delivery speed of any order in the delivery plan corresponding to the target particle; determine the total delivery time based on the order distance, pickup distance, and average delivery speed; determine the total installation and maintenance time based on the installation and maintenance time; determine the fitness function based on the total delivery time and the total installation and maintenance time.

[0077] Specifically, in the target particle X i In the corresponding delivery plan, the delivery person P ii The distance to deliver an order is defined as OS ii , Deliveryman P ii The distance to store pickup is defined as The delivery person P ii The time it takes to install and maintain an order is defined as 1≤P ii ≤P n ; Let the delivery person P ii The average delivery speed is The delivery time is

[0078]

[0079] From this, we can define the optimization function f(S i ),as follows:

[0080]

[0081] And the optimization function f(T i ),as follows:

[0082]

[0083] According to the above optimization function f(S i ) and f(T i ), we can get the final fitness function F(X i ),as follows:

[0084]

[0085] Through the above fitness function F(X i ), calculate the fitness value corresponding to the target particle, and record and update the individual extreme value and group extreme value of the particle set at this time, where the particle set includes all particles after any number of iterations of the initial generation of particles. The individual extreme value is used to indicate that the local fitness value of the particle set is optimal, that is, the particle corresponding to the optimal fitness value; the group extreme value is used to indicate that the global fitness value of the particle set is optimal.

[0086] In the above step S206, by comparing the fitness values ​​corresponding to all the particles obtained by iteration, the delivery plan corresponding to the particle with the largest fitness value can be determined as the target delivery plan. The target delivery plan represents the optimal solution among all the particles, which helps to guide the delivery personnel to complete the delivery of the order according to the order and route in the target delivery plan.

[0087] In the embodiment of the present application, there are some preset iteration conditions, for example: determining the particle set after each iteration of the first generation of particles; determining the individual extreme value in the particle set, wherein the individual extreme value is used to indicate that the local fitness value of the particle set is optimal; stopping the iteration when the difference between the fitness value corresponding to the individual extreme value of the particle set and the previous generation of particle set is less than a preset threshold for multiple consecutive times; or stopping the iteration when the number of iterations of the first generation of particles reaches a preset number of iterations.

[0088] Specifically, the particles obtained in each iteration process are determined as a particle set. In each iteration process, each particle in the particle set will update its own position information according to the current position information, speed information, individual extreme value and group extreme value (i.e., a new generation of particles is obtained). As the iteration process proceeds, the number of particles in the particle set will also increase, and the individual extreme value in each particle set will be determined. The individual extreme value represents the optimal local fitness value in the particle set, and also reflects the optimal distribution efficiency of the distribution plan corresponding to the particle.

[0089] Under one iterative condition, when the difference between the fitness value corresponding to the individual extreme value of the current particle set and the fitness value corresponding to the individual extreme value of the previous generation particle set is less than a preset threshold for multiple consecutive times, it is considered that the search of all particles has stabilized, and the iteration is stopped because further iteration will not bring significant performance improvement, thereby saving computing resources.

[0090] Under another iteration condition, a preset maximum number of iterations can be set. When the number of iterations of the initial generation of particles reaches the maximum number of iterations, the iteration is stopped regardless of the current degree of optimization to ensure that the running time of the algorithm is controllable.

[0091] In an embodiment of the present application, after the initial delivery plan is determined as the first-generation particle, the above-mentioned order delivery scheduling method also includes: determining the business status of the order requests based on the number of order requests and the number of delivery personnel; when the number of order requests is greater than the number of delivery personnel, determining the business status of the order requests to be a busy state, and adding delivery orders in the initial delivery plan in the busy state; when the number of order requests is less than the number of delivery personnel, determining the business status of the order requests to be an idle state, and reducing the delivery orders in the initial delivery plan in the idle state.

[0092] Specifically, according to the quantity O of the order requestm and the number of delivery persons P n Determine the current order business status.

[0093] In o m >p n In the case of m Greater than the number of delivery persons P n In the case of , the current order business status is determined to be busy. At this time, the gene fragment D corresponding to the primary particle can be mutated by the mutation factor (k∈R|0≤k<j). i Perform gene mutation operations, such as Figure 4 As shown, mn gene fragments are added to the gene fragments corresponding to the primary particles. That is, add delivery orders to the initial delivery plan to increase the number of iterations of the first generation of particles. The details are as follows:

[0094] Allocate the installation and maintenance personnel p by variable factors i The number of orders received, k i represents the number of orders received by the corresponding installation and maintenance delivery personnel, j represents the maximum number of orders that can be received (j>2), and the formula is as follows:

[0095] D n =[p1*k1,p2*k2,p3*k3,...,p n *k n ]

[0096] Among them, D n It indicates the gene fragment after adding mn gene fragments.

[0097] Total order volume

[0098] The corresponding number of combinations (number of particle sets) is

[0099] The maximum number of particle iterations is

[0100] Assume m = 5, n = 4, j = 2, then the results after mutation are kinds of particles. At this time, the particle sets are [1,2,3,4,1], [1,2,3,4,2], [1,2,3,4,3], [1,2,3,4,4].

[0101] In o m ≤p n In the case of m Less than the number of delivery persons P n In the case of , the current order business status is determined to be idle. At this time, the gene fragments corresponding to the primary generation particles can be subjected to gene recombination operations, such as Figure 5 As shown, m gene fragments are randomly intercepted from the genes corresponding to the first-generation particles, that is, the delivery orders are reduced in the initial delivery plan to reduce the number of iterations of the first-generation particles. At this time, the corresponding number of combinations (number of particle sets) is as follows:

[0102]

[0103] In the iterative process of the first generation of particles, particles are prone to fall into local optimality due to their own constraints, such as delivery service area restrictions, on-the-job delivery personnel restrictions, etc. Therefore, more new particle populations are needed to find the optimal solution for other delivery service areas. New particles are obtained by genetic recombination or mutation of the gene fragments corresponding to the first generation of particles. When the new particles are not in the original particle set, they are added to the particle group to continuously expand the local optimality of the new field, so that the local optimality of the new particles slowly approaches the global optimality. In the end, the particles that deviate from the global optimality will die out in the iteration.

[0104] Figure 6 Schematic diagram of a scheduling process for order delivery according to an embodiment of the present application. Figure 6 As shown, the customer (i.e., the target object mentioned above) places an order through the system to generate an order request; an initial delivery plan is generated according to the order request, and the initial delivery plan is determined as the first-generation particles, that is, the particle population of the initial delivery plan is initialized; the first-generation particles are iterated according to the particle swarm algorithm, and the position information and speed information of each generation of particles are updated; the fitness value of each generation of particles is determined by the fitness function, and the individual extreme value and group extreme value of each generation of particle set are recorded and updated; at the same time, according to different order business states, the gene fragments corresponding to the first-generation particles are subjected to gene mutation or gene recombination operations, and new particles that have never appeared are added to the particle population (particle set); the iteration is stopped when the preset conditions are met, and the delivery plan corresponding to the particle with the highest fitness value is used as the target delivery plan (optimal order scheduling plan) and the target delivery plan is output to deliver the order according to the delivery route and delivery sequence in the target delivery plan.

[0105] In the embodiment of the present application, the shortest delivery distance and the shortest installation and maintenance time of the delivery personnel are taken into consideration at the same time. The particle swarm algorithm is optimized based on the business characteristics to meet the requirements of multiple iterations to generate an order delivery plan with the shortest delivery time, thereby improving the delivery efficiency of the order. Among them, by performing a gene transposition operation on the gene fragments corresponding to the first-generation particles, efficient retrieval of the individual extreme values ​​of the particle set is achieved; according to the business status of the order, a gene mutation or gene recombination operation is performed to increase or decrease the number of iterations of the first-generation particles, and the local optimum of the particle set is continuously expanded, so that the local optimum of the new particles slowly approaches the global optimum, so that in the process of multiple iterations, all particles converge to a better delivery plan, thereby obtaining the optimal order delivery plan.

[0106] According to an embodiment of the present application, a scheduling device for order delivery is provided. It should be noted that the scheduling device for order delivery in the embodiment of the present application can be used to execute the scheduling method for order delivery provided in the embodiment of the present application. The following introduces the scheduling device for order delivery provided in the embodiment of the present application.

[0107] Figure 7 is a structural diagram of a scheduling device for order delivery provided according to an embodiment of the present application. Figure 7 As shown, the device comprises:

[0108] The receiving module 70 is used to receive an order request from a target object and generate an initial delivery plan according to the order request;

[0109] Iteration module 72, used to determine the initial delivery plan as the first generation of particles, use the particle swarm algorithm to iterate the first generation of particles, and determine the fitness value of the particles corresponding to each iteration until the iteration is stopped when the preset conditions are met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan;

[0110] The delivery module 74 is used to determine the particle corresponding to the maximum fitness value as the target delivery plan of the order request, and deliver the order according to the target delivery plan.

[0111] Through the receiving module 70, iterative module 72 and delivery module 74 in the above-mentioned order delivery scheduling device, the purpose of determining the optimal delivery plan for online orders based on the particle swarm algorithm is achieved, thereby achieving the technical effect of optimizing the order delivery route and improving the order delivery efficiency, and further solving the technical problem of low order delivery efficiency due to the fact that the relevant technology usually adopts a random allocation method for order delivery without comprehensively considering the impact of the delivery distance and delivery time.

[0112] In the order delivery scheduling device provided in the embodiment of the present application, the receiving module is also used to determine the request time of the order request and the number information of the delivery person; and generate an initial delivery plan for the order request based on the request time and number information.

[0113] In the order delivery scheduling device provided in the embodiment of the present application, the iteration module is also used to determine the initial speed information of the first-generation particles, wherein the initial speed information is used to represent the order delivery order in the initial delivery plan; iterate the first-generation particles and the initial speed information to obtain the target particles and the target speed information, wherein the target particles are the particles after the first-generation particles are iterated any number of times, and the target speed information is used to represent the order delivery order of the target particles in the corresponding delivery plan; calculate the fitness value of the target particle through the fitness function, wherein the fitness function is determined by the total delivery time and the total assembly and maintenance time of the delivery plan corresponding to the target particle.

[0114] In the scheduling device for order delivery provided in the embodiment of the present application, the iteration module is also used to perform a transposition operation on the initial generation particles according to the initial speed information to obtain the target particles; initialize the learning factor, inertia weight, individual extreme value and group extreme value of the particle swarm algorithm; determine the target speed information based on the target particles, learning factor, inertia weight, individual extreme value and group extreme value.

[0115] In the scheduling device for order delivery provided in the embodiment of the present application, the iteration module is also used to determine the order distance, pickup distance, installation and maintenance time and average delivery speed of any order in the delivery plan corresponding to the target particle; determine the total delivery time based on the order distance, pickup distance and average delivery speed; determine the total installation and maintenance time based on the installation and maintenance time; determine the fitness function based on the total delivery time and the total installation and maintenance time.

[0116] In the scheduling device for order delivery provided in an embodiment of the present application, the iteration module is also used to determine the individual extreme values ​​in the particle set, wherein the individual extreme values ​​are used to indicate that the local fitness value of the particle set is optimal; when the difference between the fitness values ​​corresponding to the individual extreme values ​​of the particle set and the previous generation of particle set is less than a preset threshold for multiple consecutive times, the iteration is stopped; or when the number of iterations of the first generation of particles reaches a preset number of iterations, the iteration is stopped.

[0117] An embodiment of the present application also provides an electronic device, including: a memory and a processor; the memory is used to store program instructions; the processor is connected to the memory and is used to execute the scheduling method for implementing the above-mentioned order delivery.

[0118] It should be noted that the above electronic equipment is used to execute Figure 2 The scheduling method for order delivery shown, therefore the relevant explanations in the above-mentioned scheduling method for order delivery are also applicable to the electronic device and will not be repeated here.

[0119] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned order delivery scheduling method by running the computer program.

[0120] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The order delivery scheduling method shown, therefore the relevant explanations in the above order delivery scheduling method are also applicable to the non-volatile storage medium, and will not be repeated here.

[0121] The embodiment of the present application also provides a computer program product, including computer instructions, which implement the above-mentioned order delivery scheduling method when executed by a processor.

[0122] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The order delivery scheduling method shown, therefore the relevant explanations in the above order delivery scheduling method are also applicable to the computer program product, and will not be repeated here.

[0123] The embodiment of the present application also provides a computer program, which, when executed by a processor, implements the above-mentioned order delivery scheduling method.

[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0125] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.

[0130] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for scheduling order delivery, characterized in that: include: Receive an order request from a target object and generate an initial delivery plan based on the order request; The initial delivery plan is determined as the first-generation particles, the particle swarm algorithm is used to iterate the first-generation particles, and the fitness value of the particles corresponding to each iteration is determined, and the iteration is stopped until a preset condition is met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan; The particle corresponding to the maximum value of the fitness value is determined as the target delivery plan of the order request, and the order is delivered according to the target delivery plan.

2. The method according to claim 1, characterized in that Receive an order request from a target object and generate an initial delivery plan based on the order request, including: Determine the request time and delivery person ID information of the order request; An initial delivery plan for the order request is generated according to the request time and the number information.

3. The method according to claim 1, characterized in that The particle swarm algorithm is used to iterate the first generation of particles and determine the fitness value of the particles corresponding to each iteration, including: Determining initial velocity information of the first generation of particles, wherein the initial velocity information is used to represent the order delivery order in the initial delivery plan; Iterating the first-generation particles and the initial velocity information to obtain target particles and target velocity information, wherein the target particles are particles obtained by iterating the first-generation particles any number of times, and the target velocity information is used to represent the order delivery sequence of the target particles in the corresponding delivery plan; The fitness value of the target particle is calculated by a fitness function, wherein the fitness function is determined by a total delivery time and a total assembly time of a delivery plan corresponding to the target particle.

4. The method according to claim 3, characterized in that Iterating the primary particles and the initial velocity information to obtain target particles and target velocity information includes: Performing a transposition operation on the primary generation particles according to the initial velocity information to obtain the target particles; Initializing the learning factor, inertia weight, individual extreme value and group extreme value of the particle swarm algorithm; The target velocity information is determined according to the target particle, the learning factor, the inertia weight, the individual extreme value, and the group extreme value.

5. The method according to claim 3, characterized in that The fitness function is determined in the following way: Determine the order distance, pickup distance, installation and maintenance time, and average delivery speed of any order in the delivery plan corresponding to the target particle; Determining the total delivery time based on the order distance, the pickup distance, and the average delivery speed; Determining the total installation and maintenance time based on the installation and maintenance time; The fitness function is determined according to the total delivery time and the total assembly time.

6. The method according to claim 1, characterized in that After determining the initial distribution plan as the first generation of particles, the method further includes: Determining the business status of the order request based on the quantity of the order request and the number of delivery personnel; When the number of the order requests is greater than the number of the delivery personnel, determining that the business status of the order requests is a busy state, and adding delivery orders in the initial delivery plan in the busy state; In a case where the number of the order requests is less than the number of the delivery personnel, the business state of the order requests is determined to be an idle state, and the delivery orders in the initial delivery plan are reduced in the idle state.

7. The method according to claim 1, characterized in that Stop iteration when preset conditions are met, including: Determine the particle set after each iteration of the initial generation particles; Determining an individual extreme value in the particle set, wherein the individual extreme value is used to indicate that the local fitness value of the particle set is optimal; When the difference between the fitness value corresponding to the individual extreme value of the particle set and the previous generation particle set is less than a preset threshold for multiple consecutive times, the iteration is stopped; Or when the number of iterations of the first generation of particles reaches a preset number of iterations, the iteration is stopped.

8. A dispatching device for order delivery, characterized in that: include: A receiving module, configured to receive an order request from a target object and generate an initial delivery plan based on the order request; an iteration module, configured to determine the initial delivery plan as a first-generation particle, iterate the first-generation particle using a particle swarm algorithm, and determine the fitness value of the particle corresponding to each iteration until a preset condition is met, wherein the fitness value is used to represent the shortest delivery time corresponding to each order delivery plan; The delivery module is configured to determine the particle corresponding to the maximum fitness value as the target delivery plan for the order request, and deliver the order according to the target delivery plan.

9. An electronic device, characterized in that: include: memory and processor; The memory is used to store program instructions; The processor is connected to the memory and is used to execute the scheduling method for order delivery as described in any one of claims 1 to 7.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the order delivery scheduling method according to any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the order delivery scheduling method described in any one of claims 1 to 7 is implemented.