Parcel loading and unloading method and device
Through the simulation annealing algorithm, the transportation path is planned and parcel placement information is optimized, and the problem of low package loading and unloading efficiency is solved, achieving a fast and efficient loading and unloading process.
Patent Information
- Application Number
- CN202310623155.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, the package loading and unloading efficiency is low, the transportation line planning speed is slow, and the package placement is insufficiently combined with the destination, resulting in a long loading and unloading time for vehicles and low efficiency.
Use simulated annealing algorithm to plan the origin and multiple destinations, generate transportation paths, and before the vehicle reaches the next destination, it is based on the package placement information of the previous destination and the package information of the to-unload truck at the next destination. , calculate the package placement information for the next destination to optimize the loading and unloading process.
Quickly plan transportation paths, reduce human interference, improve parcel loading and unloading efficiency, and optimize unloading and loading through real-time calculations to improve the transportation efficiency of the entire process.
Smart Images

Figure CN119067546A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of logistics distribution, and in particular to a package loading and unloading method and device. Background Art
[0002] At present, the driving routes of vehicles delivering goods from sorting centers to various destinations (such as outlets and sorting centers) are based on the driver's experience on the one hand and the algorithm's recommended routes on the other. When the vehicle arrives at the destination to unload the parcels, the parcels are usually unloaded in full or half of the vehicle, and then reloaded for transportation.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] Although the existing technology has planned the transportation routes, the planning speed is slow, and the placement of packages is not fully integrated with each destination, resulting in a long time for vehicles to load and unload packages and low efficiency. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a package loading and unloading method and device to solve the technical problem of low package loading and unloading efficiency.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a package loading and unloading method is provided, comprising:
[0007] The simulated annealing algorithm is used to plan the origin and multiple destinations to generate transportation routes;
[0008] During the process of the vehicle transporting according to the transport route, in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold, the package placement information of the next destination is determined according to the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination; wherein the previous destination and the next destination are adjacent destinations.
[0009] Optionally, a simulated annealing algorithm is used to plan the origin and multiple destinations to generate a transportation path, including:
[0010] Step 1: In response to the current temperature being greater than a temperature threshold, a new transportation path is randomly generated and an evaluation function is used to calculate an index value of the new transportation path;
[0011] Step 2: Compare the index value of the current transport path with the index value of the new transport path;
[0012] Step 3: In response to the index value of the new transport path being greater than or equal to the index value of the current transport path, the new transport path is used as the current transport path and the current temperature is cooled and annealed;
[0013] In response to the index value of the new transport path being less than the index value of the current transport path, judging whether to use the new transport path as the current transport path and perform cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature;
[0014] Step 4: Repeat steps 1 to 3 until the current temperature is less than or equal to the temperature threshold, thereby outputting a transportation route.
[0015] Optionally, judging whether to use the new transport path as the current transport path and performing cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature includes:
[0016] Divide the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value;
[0017] Calculating the intermediate result value of the difference value using an exponential function;
[0018] Randomly generate a random number, wherein the random number is greater than zero and less than one;
[0019] In response to the intermediate result value being greater than the random number, the new transport path is used as the current transport path and the current temperature is subjected to temperature reduction annealing.
[0020] Optionally, the evaluation function is expressed as follows:
[0021]
[0022] Among them, dist(i, i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
[0023] Optionally, calculating the parcel placement information of the next destination according to the parcel placement information of the previous destination, the parcel information to be unloaded at the next destination, and the parcel information to be loaded at the next destination includes:
[0024] Clear the information of the packages to be unloaded at the next destination from the package placement information of the previous destination, and obtain the placement information of the packages after unloading at the next destination;
[0025] The package placement function is used to calculate the package placement information after unloading at the next destination and the packages to be loaded at the next destination to obtain the package placement information of the next destination.
[0026] Optionally, a package placement function is used to calculate the package placement information after unloading at the next destination and the package information to be loaded at the next destination to obtain the package placement information of the next destination, including:
[0027] Step 1: Determine a set of available placement areas in the carriage according to the placement information of the unloaded packages at the next destination;
[0028] Step 2: traverse each area in the set of available placement areas, and place the packages to be loaded at the next destination into the carriage one by one, thereby obtaining new package placement information for the next destination;
[0029] Step 3: Compare the current package placement information of the next destination with the new package placement information of the next destination;
[0030] Step 4: In response to the new package placement information of the next destination being superior to the current package placement information of the next destination, the new package placement information of the next destination is used as the current package placement information of the next destination;
[0031] Step 5: Repeat steps 1 to 4 until no better new package placement information of the next destination is found, thereby outputting the package placement information of the next destination.
[0032] Optionally, comparing the current package placement information of the next destination with the new package placement information of the next destination includes:
[0033] Calculate the new number of layers of the carriage and the loading ratio of each layer according to the new package placement information of the next destination;
[0034] Comparing the current number of layers and the loading ratio of each layer of the carriage with the new number of layers and the loading ratio of each layer of the carriage;
[0035] In response to the current number of layers of the carriage being the same as the new number of layers of the carriage, the current loading ratio of each layer of the carriage is compared with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer; in response to the current loading ratio of the lower layer of the carriage being greater than the new loading ratio of the lower layer of the carriage, it is determined that the current package placement information of the next destination is better than the new package placement information of the next destination; in response to the current loading ratio of the lower layer of the carriage being less than the new loading ratio of the lower layer of the carriage, it is determined that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0036] In response to the current number of layers of the carriage being greater than the new number of layers of the carriage, determining that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0037] In response to the current number of parcel placement layers of the carriage being less than the new number of parcel placement layers of the carriage, it is determined that the current parcel placement information of the next destination is superior to the new parcel placement information of the next destination.
[0038] In addition, according to another aspect of an embodiment of the present invention, there is provided a package loading and unloading device, comprising:
[0039] The routing module is used to generate transportation routes by planning the origin and multiple destinations using the simulated annealing algorithm;
[0040] A calculation module is used to determine the package placement information of the next destination according to the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold during the process of the vehicle transporting according to the transportation route, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination; wherein the previous destination and the next destination are adjacent destinations.
[0041] Optionally, the path module is further used to:
[0042] Step 1: In response to the current temperature being greater than a temperature threshold, a new transportation path is randomly generated and an evaluation function is used to calculate an index value of the new transportation path;
[0043] Step 2: Compare the index value of the current transport path with the index value of the new transport path;
[0044] Step 3: In response to the index value of the new transport path being greater than or equal to the index value of the current transport path, the new transport path is used as the current transport path and the current temperature is cooled and annealed;
[0045] In response to the index value of the new transport path being less than the index value of the current transport path, judging whether to use the new transport path as the current transport path and perform cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature;
[0046] Step 4: Repeat steps 1 to 3 until the current temperature is less than or equal to the temperature threshold, thereby outputting a transportation route.
[0047] Optionally, the path module is further used to:
[0048] Divide the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value;
[0049] Calculating the intermediate result value of the difference value using an exponential function;
[0050] Randomly generate a random number, wherein the random number is greater than zero and less than one;
[0051] In response to the intermediate result value being greater than the random number, the new transport path is used as the current transport path and the current temperature is subjected to temperature reduction annealing.
[0052] Optionally, the evaluation function is expressed as follows:
[0053]
[0054] Among them, dist(i, i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
[0055] Optionally, the calculation module is further used for:
[0056] Clear the information of the packages to be unloaded at the next destination from the package placement information of the previous destination, and obtain the placement information of the packages after unloading at the next destination;
[0057] The package placement function is used to calculate the package placement information after unloading at the next destination and the packages to be loaded at the next destination to obtain the package placement information of the next destination.
[0058] Optionally, the calculation module is further used for:
[0059] Step 1: Determine a set of available placement areas in the carriage according to the placement information of the unloaded packages at the next destination;
[0060] Step 2: traverse each area in the set of available placement areas, and place the packages to be loaded at the next destination into the carriage one by one, thereby obtaining new package placement information for the next destination;
[0061] Step 3: Compare the current package placement information of the next destination with the new package placement information of the next destination;
[0062] Step 4: In response to the new package placement information of the next destination being superior to the current package placement information of the next destination, the new package placement information of the next destination is used as the current package placement information of the next destination;
[0063] Step 5: Repeat steps 1 to 4 until no better new package placement information of the next destination is found, thereby outputting the package placement information of the next destination.
[0064] Optionally, the calculation module is further used for:
[0065] Calculate the new number of layers of the carriage and the loading ratio of each layer according to the new package placement information of the next destination;
[0066] Comparing the current number of layers and the loading ratio of each layer of the carriage with the new number of layers and the loading ratio of each layer of the carriage;
[0067] In response to the current number of layers of the carriage being the same as the new number of layers of the carriage, the current loading ratio of each layer of the carriage is compared with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer; in response to the current loading ratio of the lower layer of the carriage being greater than the new loading ratio of the lower layer of the carriage, it is determined that the current package placement information of the next destination is better than the new package placement information of the next destination; in response to the current loading ratio of the lower layer of the carriage being less than the new loading ratio of the lower layer of the carriage, it is determined that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0068] In response to the current number of layers of the carriage being greater than the new number of layers of the carriage, determining that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0069] In response to the current number of parcel placement layers of the carriage being less than the new number of parcel placement layers of the carriage, it is determined that the current parcel placement information of the next destination is superior to the new parcel placement information of the next destination.
[0070] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:
[0071] one or more processors;
[0072] a storage device for storing one or more programs,
[0073] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.
[0074] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0075] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0076] One embodiment of the above invention has the following advantages or beneficial effects: because the simulated annealing algorithm is used to plan the origin and multiple destinations, thereby generating a transportation route, and when the next destination is about to be reached, the technical means of calculating the package placement information of the next destination is based on the package placement information of the previous destination and the package information to be unloaded and loaded at the next destination, so as to overcome the technical problem of low package loading and unloading efficiency in the prior art. The embodiment of the present invention can not only quickly plan the transportation route, but also guide the driver to place the package loading and unloading at the sorting center or outlet, reducing the interference of human factors on the loading and unloading of the vehicle; and the embodiment of the present invention combines the transportation route with the package placement, and before arriving at the next destination, the vehicle space after the package needs to be unloaded and the package placement information of the next destination are calculated in real time, which is convenient for loading and unloading of the package at the next destination, thereby improving the package loading and unloading efficiency of the whole process of vehicle transportation.
[0077] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0079] Figure 1 is a flow chart of a parcel loading and unloading method according to an embodiment of the present invention;
[0080] Figure 2 is a flow chart of generating a transportation path using a simulated annealing algorithm according to an embodiment of the present invention;
[0081] Figure 3 is a flow chart of calculating package placement information of the next destination according to an embodiment of the present invention;
[0082] Figure 4 is a schematic diagram of a layered structure in a carriage according to an embodiment of the present invention;
[0083] Figure 5 is a schematic diagram of a parcel handling device according to an embodiment of the present invention;
[0084] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0085] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0086] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0087] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0088] Figure 1is a flow chart of a method for loading and unloading a package according to an embodiment of the present invention. As an embodiment of the present invention, Figure 1 As shown, the package loading and unloading method may include:
[0089] Step 101, using a simulated annealing algorithm to plan the origin and multiple destinations, thereby generating a transportation route.
[0090] First, the location information of the origin (such as the sorting center) and the location information of multiple destinations (such as outlets and sorting centers) are obtained, and then the simulated annealing algorithm is used to plan the origin sorting center to multiple destinations, thereby generating a transportation path. The driver arrives at each destination in turn according to the planned transportation path. Using the simulated annealing algorithm to plan the path can simplify the calculation process and can process the path planning in parallel, thereby improving the efficiency of path planning.
[0091] Optionally, a simulated annealing algorithm is used to plan the origin and multiple destinations to generate a transportation path, including:
[0092] Step 1: In response to the current temperature being greater than a temperature threshold, a new transportation path is randomly generated and an evaluation function is used to calculate an index value of the new transportation path;
[0093] Step 2: Compare the index value of the current transport path with the index value of the new transport path;
[0094] Step 3: In response to the index value of the new transport path being greater than or equal to the index value of the current transport path, the new transport path is used as the current transport path and the current temperature is cooled and annealed;
[0095] In response to the index value of the new transport path being less than the index value of the current transport path, judging whether to use the new transport path as the current transport path and perform cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature;
[0096] Step 4: Repeat steps 1 to 3 until the current temperature is less than or equal to the temperature threshold, thereby outputting a transportation route.
[0097] In the embodiment of the present invention, a new transport path is first randomly generated and the index value of the new transport path is calculated using an evaluation function, and the index value of the current transport path is compared with the index value of the new transport path; if the index value of the new transport path is greater than or equal to the index value of the current transport path, it means that the new transport path is better than the current transport path, and the new transport path is used as the current transport path and the current temperature is cooled and annealed; if the index value of the new transport path is less than the index value of the current transport path, it means that it is impossible to determine whether the new transport path is better than the current transport path, and then further according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature, it is determined whether to use the new transport path as the current transport path and cool and anneal the current temperature. Repeat the above steps until the current temperature is less than or equal to the temperature threshold, and then output the current transport path.
[0098] Optionally, judging whether to use the new transport path as the current transport path and to cool down the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature, includes: dividing the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value; using an exponential function to calculate an intermediate result value of the difference value; randomly generating a random number, wherein the random number is greater than zero and less than one; in response to the intermediate result value being greater than the random number, using the new transport path as the current transport path and to cool down the current temperature. If the index value of the new transport path is less than the index value of the current transport path, it means that it is impossible to determine whether the new transport path is better than the current transport path. The present application uses a random number method to judge whether to use the new transport path as the current transport path and to cool down the current temperature. Since the probability that the index value of the new transport path is greater than the index value of the current transport path is the same as the probability that the index value of the current transport path is greater than the index value of the new transport path, a random number is randomly generated between zero and one. Whether the intermediate result value is greater than the random number is used to determine whether to use the new transport path as the current transport path and to cool down the current temperature for annealing.
[0099] Optionally, the evaluation function is expressed as follows:
[0100]
[0101] Among them, dist(i, i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
[0102] The evaluation function Q is an indicator for measuring the quality of the transportation path. The embodiment of the present invention uses the inverse of the total transportation distance to calculate. If the distance is larger, the index value is smaller, and the result will be discarded. If the distance is smaller, the index value is larger, and the result will be retained. Therefore, by comparing the size of the index value, the optimal transportation path can be planned.
[0103] Step 102, in the process of the vehicle transporting according to the transport route, in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold, the package placement information of the next destination is determined according to the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination; wherein the previous destination and the next destination are adjacent destinations.
[0104] When the vehicle is at the departure point, the vehicle is loaded. Specifically, the length, width and height information of the packages to be transported are collected, and the packages are numbered in sequence. The numbering principle is that the packages delivered first have larger numbers and the heavier packages have smaller numbers. That is, the principle of delivering first and placing later, and the heavy packages do not press the light ones. The depth-first search algorithm is used to partition and layer the space in the car, output the package placement information in the car, and then load the car. After loading is completed, the packages are transported to the next destination.
[0105] When the vehicle is transporting along the transport route, the distance between the current position of the vehicle and the next destination is calculated in real time to determine whether the distance between the current position of the vehicle and the next destination is less than a distance threshold; if so, the package placement information of the next destination is calculated based on the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination. When the vehicle arrives at the next destination, the package is unloaded according to the package information to be unloaded at the next destination, and then loaded according to the package placement information of the next destination.
[0106] For example, if the transport route is {1, 6, 4, 2, 5, 3}, and the previous destination is sorting center 4, when the vehicle is driving to sorting center 2 along the transport route, the distance between the current position of the vehicle and sorting center 2 is calculated in real time, and it is determined whether the current distance between the vehicle and sorting center 2 is less than the distance threshold. If so, the parcel placement information of sorting center 2 is calculated based on the parcel placement information of sorting center 4, the parcel information to be unloaded of sorting center 2, and the parcel information to be loaded of sorting center 2. When the vehicle arrives at sorting center 2, it unloads according to the parcel information to be unloaded of sorting center 2, and then loads according to the parcel placement information of the sorting center.
[0107] Optionally, the package placement information of the next destination is calculated based on the package placement information of the previous destination, the package information to be unloaded at the next destination, and the packages to be loaded at the next destination, including: clearing the package information to be unloaded at the next destination from the package placement information of the previous destination to obtain the package placement information after unloading at the next destination; using a package placement function to calculate the package placement information after unloading at the next destination and the packages to be loaded at the next destination to obtain the package placement information of the next destination.
[0108] First, initialize two car data structures, car_1 and car_2 respectively; then call the package placement function packagePut(car_1, the package information to be loaded at the origin), output the package placement information at the origin and update it to car_1, load the car according to the package placement information at the origin, and drive the vehicle to the next destination, denoted as Z. Real-time detection is performed to see if the distance between the current position of the vehicle and the next destination is less than the distance threshold, and the location of the package is placed. If so, it means that the vehicle is about to reach the destination Z, then the package information with the destination Z in car_1 is cleared, and the cleared result is assigned to car_2, car_1 remains unchanged, at this time car_1 is the car data structure to be unloaded, and car_2 is the car data structure that has been unloaded; then read the package information to be loaded at the destination Z, and call the package placement function packagePut(car_2, the package information to be loaded at the destination Z), output the package placement information at the destination Z, and finally assign the result to car_1, that is, car_1 = car_2. Drive the vehicle to the next destination and repeat the above steps without further ado until the transportation task is completed.
[0109] Optionally, a package placement function is used to calculate the package placement information after unloading and the package information to be loaded at the next destination to obtain the package placement information of the next destination, including:
[0110] Step 1: Determine a set of available placement areas in the carriage according to the placement information of the unloaded packages at the next destination;
[0111] Step 2: traverse each area in the set of available placement areas, and place the packages to be loaded at the next destination into the carriage one by one, thereby obtaining new package placement information for the next destination;
[0112] Step 3: Compare the current package placement information of the next destination with the new package placement information of the next destination;
[0113] Step 4: In response to the new package placement information of the next destination being superior to the current package placement information of the next destination, the new package placement information of the next destination is used as the current package placement information of the next destination;
[0114] Step 5: Repeat steps 1 to 4 until no better new package placement information of the next destination is found, thereby outputting the package placement information of the next destination.
[0115] First, obtain the set of available placement areas in the carriage, and then place the packages to be loaded at the next destination one by one in the carriage. After the packages are placed, compare the current package placement information of the next destination with the new package placement information of the next destination. If the new package placement information of the next destination is better than the current package placement information of the next destination, then use the new package placement information that is better than the next destination as the current package placement information of the next destination, and then repeat the above steps; if the current package placement information of the next destination is better than the new package placement information of the next destination, then do not process it and repeat the above steps. Until no better new package placement information of the next destination is found, then output the package placement information of the next destination.
[0116] Comparing the current package placement information of the next destination with the new package placement information of the next destination, including: calculating the new number of placement layers of the carriage and the loading ratio of each layer according to the new package placement information of the next destination; comparing the current number of placement layers of the carriage and the loading ratio of each layer with the new number of placement layers of the carriage and the loading ratio of each layer; in response to the current number of placement layers of the carriage and the new number of placement layers of the carriage, comparing the current loading ratio of each layer of the carriage with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer; in response to the current loading ratio of the lower layer of the carriage being greater than the new loading ratio of the lower layer of the carriage, determining the next The current parcel placement information of the destination is better than the new parcel placement information of the next destination; in response to the current loading ratio of the lower layer of the carriage being less than the new loading ratio of the lower layer of the carriage, it is determined that the new parcel placement information of the next destination is better than the current parcel placement information of the next destination; in response to the current number of placement layers of the carriage being greater than the new number of placement layers of the carriage, it is determined that the new parcel placement information of the next destination is better than the current parcel placement information of the next destination; in response to the current number of placement layers of the carriage being less than and equal to the new number of placement layers of the carriage, it is determined that the current parcel placement information of the next destination is better than the new parcel placement information of the next destination.
[0117] According to the various embodiments described above, it can be seen that the embodiment of the present invention uses a simulated annealing algorithm to plan the origin and multiple destinations, thereby generating a transportation route, and when it is about to reach the next destination, it calculates the technical means of the package placement information of the next destination based on the package placement information of the previous destination and the package information to be unloaded and loaded at the next destination, thereby solving the technical problem of low package loading and unloading efficiency in the prior art. The embodiment of the present invention can not only quickly plan the transportation route, but also guide the driver to place the package loading and unloading at the sorting center or outlet, reducing the interference of human factors on the loading and unloading of the vehicle; and the embodiment of the present invention combines the transportation route with the package placement, and before arriving at the next destination, it calculates the vehicle space after the package needs to be unloaded and the package placement information of the next destination in real time, which is convenient for loading and unloading of the package at the next destination, thereby improving the package loading and unloading efficiency of the whole process of vehicle transportation.
[0118] Figure 2 is a flow chart of using a simulated annealing algorithm to generate a transport path according to an embodiment of the present invention. As another embodiment of the present invention, Figure 2 As shown, using the simulated annealing algorithm to generate a transportation path may include the following steps:
[0119] Step 201, initializing the current temperature T, the current transportation path X, the temperature threshold T_min and the constant a.
[0120] Initialize a current temperature T, which is in a high temperature state. The temperature threshold T_min is the lower limit of the temperature. The constant a is used to control the speed of cooling annealing, and its value is between 0 and 1. For example, the origin is numbered 1, and there are 5 destinations that need to be transported, numbered 2, 3, 4, 5, and 6, then the randomly initialized current transportation path can be {1, 3, 4, 2, 6, 5}.
[0121] Step 202 , determining whether the current temperature T is greater than a temperature threshold; if so, executing step 203 ; if not, executing step 210 .
[0122] Step 203: randomly generate a new transportation path Y and use an evaluation function to calculate an index value Q(Y) of the new transportation path.
[0123] The evaluation function is expressed as follows:
[0124]
[0125] Among them, dist(i, i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
[0126] It should be noted that a new transport path Y can be generated by randomly exchanging two nodes of the current transport path X or reversing the order.
[0127] Step 204 , calculating the difference between the index value Q(X) of the current transport path and the index value Q(Y) of the new transport path, which is expressed as dE=Q(Y)−Q(X).
[0128] Step 205 , determining whether the difference dE between the index value Q(X) of the current transport path and the index value Q(Y) of the new transport path is greater than or equal to zero; if so, executing step 206 ; if not, executing step 208 .
[0129] Step 206, using the new transport path as the current transport path, that is, using Y to replace X, and then jumping to step 207.
[0130] Step 207, performing cooling annealing on the current temperature T.
[0131] The following formula is used for cooling annealing:
[0132] T=a*T
[0133] Among them, the larger the value of a is, the slower the cooling speed is; conversely, the smaller the value of a is, the faster the cooling speed is.
[0134] Step 208: Divide the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value, and use an exponential function to calculate an intermediate result value of the difference value, that is, the value of exp(dE / T).
[0135] Step 209, determine whether the intermediate result value is greater than a random number of random(0,1); if so, execute step 206; if not, execute step 207.
[0136] Step 210, output the current transportation route X.
[0137] Figure 3 is a flow chart of calculating the package placement information of the next destination according to an embodiment of the present invention. As another embodiment of the present invention, Figure 3 As shown, calculating the package placement information of the next destination may include the following steps:
[0138] Step 301, initialize the car data structure bestCar of the global optimal placement and the current car data structure currentCar.
[0139] Step 302, determine whether the package number V is L; if so, execute step 305; if not, execute step 303.
[0140] Define the package set to be loaded at the next destination as packageList, with the number of packages L (package numbers from 0 to L-1). If the package number is L, it means that all the packages to be loaded have been placed, then execute step 305; if the package number is not L, it means that there are still packages that have not been loaded and need to continue loading, then execute step 303.
[0141] Step 303, determining a set of available placement areas areaList in the carriage according to the placement information of the unloaded packages at the next destination.
[0142] Step 304, traverse each placeable area in the placeable area set areaList, place the package numbered V in the placeable area area in the carriage, and update the placeable area set areaList in the carriage.
[0143] Through steps 302 to 304, the packages to be loaded at the next destination are placed one by one in the car, so as to obtain new package placement information of the next destination and update it to currentCar.
[0144] Step 305, according to the new package placement information of the next destination, calculate the new number of layers of the carriage and the loading ratio of each layer.
[0145] The loading ratio of each layer is equal to the volume already placed on that layer divided by the total volume of that layer.
[0146] Step 306, whether the current number of layers of the carriage is greater than the new number of layers of the carriage and the loading ratio of each layer; if so, execute step 310; if not, execute step 307.
[0147] Step 307, whether the current number of layers of the carriage is equal to the new number of layers of the carriage and the loading ratio of each layer; if so, execute step 308; if not, execute step 302.
[0148] Step 308, compare the current loading ratio of each layer of the carriage with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer, and determine whether the current loading ratio of each layer of the carriage is less than the new loading ratio of each layer of the carriage; if so, execute step 310; if not, execute step 302.
[0149] That is to say, if the number of layers is different, the smaller the number of layers, the more in line with the principle of placing the packages from bottom to top, which is in line with on-site operations; if the number of layers is the same, then calculate the loading ratio of each layer, and compare from the bottom to the top. The higher the loading ratio, the better the placement strategy. It should be noted that the loading ratio of the first layer is compared first. If the loading ratio of the first layer is the same, then compare the loading ratio of the second layer, and so on. No further explanation is given.
[0150] Step 310: Use the new package placement information of the next destination as the current package placement information of the next destination and save it in bestCar.
[0151] Repeat step 302 to step 310 until no new package placement information of a better next destination is found, and output the package placement information of the next destination in bestCar.
[0152] like Figure 4 As shown, the cuboid ABCD-EFGH represents the carriage. If a package needs to be placed now, the innermost area of the carriage will obviously be given priority, that is, the spatial area AIJK-LMNO. Then the area ABCD-EFGH will be layered into multiple spatial areas, namely the area AIJK-LMNO, the area LMNO-EPRQ, the area KJTD-QRSH and the area IBCT-PFGS. Among them, the area LMNO-EPRQ is the second layer area, and the rest are the first layer areas. When placing packages, the lower layer areas are given priority.
[0153] Figure 5 Schematic diagram of a parcel handling device according to an embodiment of the present invention. Figure 5 As shown, the package loading and unloading device 500 includes a path module 501 and a calculation module 502; wherein the path module 501 is used to plan the origin and multiple destinations using a simulated annealing algorithm to generate a transportation path; the calculation module 502 is used to, in the process of the vehicle transporting according to the transportation path, in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold, determine the package placement information of the next destination based on the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination.
[0154] Optionally, the path module 501 is further used for:
[0155] Step 1: In response to the current temperature being greater than a temperature threshold, a new transportation path is randomly generated and an evaluation function is used to calculate an index value of the new transportation path;
[0156] Step 2: Compare the index value of the current transport path with the index value of the new transport path;
[0157] Step 3: In response to the index value of the new transport path being greater than or equal to the index value of the current transport path, the new transport path is used as the current transport path and the current temperature is cooled and annealed;
[0158] In response to the index value of the new transport path being less than the index value of the current transport path, judging whether to use the new transport path as the current transport path and perform cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature;
[0159] Step 4: Repeat steps 1 to 3 until the current temperature is less than or equal to the temperature threshold, thereby outputting a transportation route.
[0160] Optionally, the path module 501 is further used for:
[0161] Divide the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value;
[0162] Calculating the intermediate result value of the difference value using an exponential function;
[0163] Randomly generate a random number, wherein the random number is greater than zero and less than one;
[0164] In response to the intermediate result value being greater than the random number, the new transport path is used as the current transport path and the current temperature is subjected to temperature reduction annealing.
[0165] Optionally, the evaluation function is expressed as follows:
[0166]
[0167] Among them, dist(i, i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
[0168] Optionally, the calculation module 502 is further used for:
[0169] Clear the information of the packages to be unloaded at the next destination from the package placement information of the previous destination, and obtain the placement information of the packages after unloading at the next destination;
[0170] The package placement function is used to calculate the package placement information after unloading at the next destination and the packages to be loaded at the next destination to obtain the package placement information of the next destination.
[0171] Optionally, the calculation module 502 is further used for:
[0172] Step 1: Determine a set of available placement areas in the carriage according to the placement information of the unloaded packages at the next destination;
[0173] Step 2: traverse each area in the set of available placement areas, and place the packages to be loaded at the next destination into the carriage one by one, thereby obtaining new package placement information for the next destination;
[0174] Step 3: Compare the current package placement information of the next destination with the new package placement information of the next destination;
[0175] Step 4: In response to the new package placement information of the next destination being superior to the current package placement information of the next destination, the new package placement information of the next destination is used as the current package placement information of the next destination;
[0176] Step 5: Repeat steps 1 to 4 until no better new package placement information of the next destination is found, thereby outputting the package placement information of the next destination.
[0177] Optionally, the calculation module 502 is further used for:
[0178] Calculate the new number of layers of the carriage and the loading ratio of each layer according to the new package placement information of the next destination;
[0179] Comparing the current number of layers and the loading ratio of each layer of the carriage with the new number of layers and the loading ratio of each layer of the carriage;
[0180] In response to the current number of layers of the carriage being the same as the new number of layers of the carriage, the current loading ratio of each layer of the carriage is compared with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer; in response to the current loading ratio of the lower layer of the carriage being greater than the new loading ratio of the lower layer of the carriage, it is determined that the current package placement information of the next destination is better than the new package placement information of the next destination; in response to the current loading ratio of the lower layer of the carriage being less than the new loading ratio of the lower layer of the carriage, it is determined that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0181] In response to the current number of layers of the carriage being greater than the new number of layers of the carriage, determining that the new package placement information of the next destination is better than the current package placement information of the next destination;
[0182] In response to the current number of parcel placement layers of the carriage being less than the new number of parcel placement layers of the carriage, it is determined that the current parcel placement information of the next destination is superior to the new parcel placement information of the next destination.
[0183] It should be noted that the specific implementation content of the package loading and unloading device of the present invention has been described in detail in the above-mentioned package loading and unloading method, so the repeated content will not be described again here.
[0184] Figure 6 An exemplary system architecture 600 is shown to which a parcel handling method or a parcel handling device according to an embodiment of the present invention may be applied.
[0185] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0186] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0187] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0188] The server 605 may be a server that provides various services, such as a backend management server (for example only) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as the item information query request, and feed back the processing results to the terminal device.
[0189] It should be noted that the parcel loading and unloading method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the parcel loading and unloading device is generally disposed in the server 605 .
[0190] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0191] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0192] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0193] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0194] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0195] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0196] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0197] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a path module and a calculation module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.
[0198] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device implements the following method: using a simulated annealing algorithm to plan the origin and multiple destinations, thereby generating a transportation path; in the process of the vehicle transporting according to the transportation path, in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold, according to the package placement information of the previous destination and the package information to be unloaded at the next destination and the package information to be loaded at the next destination, the package placement information of the next destination is determined, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination.
[0199] As another aspect, an embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0200] According to the technical solution of the embodiment of the present invention, the simulated annealing algorithm is used to plan the origin and multiple destinations, thereby generating a transportation route, and when the next destination is about to be reached, the technical means of calculating the package placement information of the next destination is based on the package placement information of the previous destination and the package information to be unloaded and loaded at the next destination. Therefore, the technical problem of low package loading and unloading efficiency in the prior art is overcome. The embodiment of the present invention can not only quickly plan the transportation route, but also guide the driver to place the package loading and unloading at the sorting center or outlet, reducing the interference of human factors on the loading and unloading of the vehicle; and the embodiment of the present invention combines the transportation route with the package placement, and before arriving at the next destination, the vehicle space that needs to be unloaded and the package placement information of the next destination are calculated in real time, which is convenient for loading and unloading of the next destination package, thereby improving the package loading and unloading efficiency of the whole process of vehicle transportation.
[0201] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A package loading and unloading method, characterized in that: include: The simulated annealing algorithm is used to plan the origin and multiple destinations to generate transportation routes; During the process of the vehicle transporting according to the transport route, in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold, the package placement information of the next destination is determined according to the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination; wherein the previous destination and the next destination are adjacent destinations.
2. The method according to claim 1, characterized in that The simulated annealing algorithm is used to plan the origin and multiple destinations to generate transportation routes, including: Step 1: In response to the current temperature being greater than a temperature threshold, a new transportation path is randomly generated and an evaluation function is used to calculate an index value of the new transportation path; Step 2: Compare the index value of the current transport path with the index value of the new transport path; Step 3: In response to the index value of the new transport path being greater than or equal to the index value of the current transport path, the new transport path is used as the current transport path and the current temperature is cooled and annealed; In response to the index value of the new transport path being less than the index value of the current transport path, judging whether to use the new transport path as the current transport path and perform cooling annealing on the current temperature according to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature; Step 4: Repeat steps 1 to 3 until the current temperature is less than or equal to the temperature threshold, thereby outputting a transportation route.
3. The method according to claim 2, characterized in that According to the difference between the index value of the new transport path and the index value of the current transport path and the current temperature, determining whether to use the new transport path as the current transport path and performing cooling annealing on the current temperature includes: Divide the difference between the index value of the new transport path and the index value of the current transport path by the current temperature to obtain a difference value; Calculating the intermediate result value of the difference value using an exponential function; Randomly generate a random number, wherein the random number is greater than zero and less than one; In response to the intermediate result value being greater than the random number, the new transport path is used as the current transport path and the current temperature is subjected to temperature reduction annealing.
4. The method according to claim 2, characterized in that The evaluation function is expressed as follows: Among them, dist(i,i+1) represents the distance between the previous destination and the next destination, and n represents the total number of destinations.
5. The method according to claim 1, characterized in that Calculating the parcel placement information of the next destination according to the parcel placement information of the previous destination, the parcel information to be unloaded at the next destination, and the parcel information to be loaded at the next destination, including: Clear the information of the packages to be unloaded at the next destination from the package placement information of the previous destination, and obtain the placement information of the packages after unloading at the next destination; The package placement function is used to calculate the package placement information after unloading at the next destination and the packages to be loaded at the next destination to obtain the package placement information of the next destination.
6. The method according to claim 5, characterized in that The package placement function is used to calculate the package placement information after unloading at the next destination and the package information to be loaded at the next destination to obtain the package placement information of the next destination, including: Step 1: Determine a set of available placement areas in the carriage according to the placement information of the unloaded packages at the next destination; Step 2: traverse each area in the set of available placement areas, and place the packages to be loaded at the next destination into the carriage one by one, thereby obtaining new package placement information for the next destination; Step 3: Compare the current package placement information of the next destination with the new package placement information of the next destination; Step 4: In response to the new package placement information of the next destination being superior to the current package placement information of the next destination, the new package placement information of the next destination is used as the current package placement information of the next destination; Step 5: Repeat steps 1 to 4 until no better new package placement information of the next destination is found, thereby outputting the package placement information of the next destination.
7. The method according to claim 6, characterized in that Comparing the current package placement information of the next destination with the new package placement information of the next destination, including: Calculate the new number of layers of the carriage and the loading ratio of each layer according to the new package placement information of the next destination; Comparing the current number of layers and the loading ratio of each layer of the carriage with the new number of layers and the loading ratio of each layer of the carriage; In response to the current number of layers of the carriage being the same as the new number of layers of the carriage, the current loading ratio of each layer of the carriage is compared with the new loading ratio of each layer of the carriage in order from the lower layer to the upper layer; in response to the current loading ratio of the lower layer of the carriage being greater than the new loading ratio of the lower layer of the carriage, it is determined that the current package placement information of the next destination is better than the new package placement information of the next destination; in response to the current loading ratio of the lower layer of the carriage being less than the new loading ratio of the lower layer of the carriage, it is determined that the new package placement information of the next destination is better than the current package placement information of the next destination; In response to the current number of parcel placement layers of the carriage being greater than the new number of parcel placement layers of the carriage, determining that the new parcel placement information of the next destination is superior to the current parcel placement information of the next destination; In response to the current number of parcel placement layers of the carriage being less than the new number of parcel placement layers of the carriage, it is determined that the current parcel placement information of the next destination is superior to the new parcel placement information of the next destination.
8. A package handling device, characterized in that: include: The routing module is used to generate transportation routes by planning the origin and multiple destinations using the simulated annealing algorithm; A calculation module is used to determine the package placement information of the next destination according to the package placement information of the previous destination, the package information to be unloaded at the next destination, and the package information to be loaded at the next destination in response to the distance between the current position of the vehicle and the next destination being less than a distance threshold during the process of the vehicle transporting according to the transportation route, so that the vehicle loads the package according to the package placement information of the next destination after completing the unloading of the package at the next destination; wherein the previous destination and the next destination are adjacent destinations.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
