Transportation path generation method and device
By identifying and transforming intersecting paths in the ant colony algorithm, updating pheromones, and generating a new set of transportation paths, the problem of the ant colony algorithm easily getting trapped in local optima is solved, and shorter and more efficient transportation path planning is achieved.
Patent Information
- Application Number
- CN202410613216.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, ant colony algorithms are prone to getting stuck in local optima when planning transportation routes, resulting in longer route distances, lower transportation efficiency, and higher human and material costs.
By determining whether the transportation path set includes intersecting paths, converting intersecting paths into non-intersecting paths, updating pheromones, generating a new transportation path set, and filtering out target paths that meet business requirements.
This improves the efficiency of shorter transportation routes, reduces manpower and material costs, and ensures that the selected routes better meet business needs.
Smart Images

Figure CN120975688A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a method and device for generating a transportation path. BACKGROUND
[0002] The robot system can move to a corresponding position according to a received instruction to perform a corresponding task. For example, in a logistics warehouse business scenario, the robot system performs a picking task from a plurality of goods points according to a received moving route, and transports the picked goods to a warehouse delivery port. As can be seen, path planning for the robot system is an important link in the goods distribution and storage process. Generally, an ant colony algorithm is used to plan a transportation path for the robot system, a plurality of transportation paths capable of completing a task are determined, and then a transportation path meeting business requirements is selected from the plurality of transportation paths.
[0003] In the process of implementing the present application, the inventors have found that the prior art at least has the following problems:
[0004] According to the ant colony algorithm, the transportation path is prone to local optimization, resulting in a long transportation path, low transportation efficiency, and high labor and material costs. SUMMARY
[0005] Therefore, the embodiments of the present application provide a method and device for generating a transportation path, which can make the selected target path meet business requirements and quickly find a target path with shorter distance and higher transportation efficiency.
[0006] To achieve the above object, according to a first aspect of the embodiments of the present application, a method for generating a transportation path is provided, comprising:
[0007] In response to receiving a path generation request, a plurality of corresponding goods points are determined, and a set of transportation paths for passing through the plurality of goods points is generated;
[0008] It is judged whether the set of transportation paths includes intersecting paths, and in the case where the set of transportation paths includes intersecting paths, the intersecting paths are converted into non-intersecting paths;
[0009] In the set of transportation paths not including intersecting paths, a target path corresponding to the path generation request is selected.
[0010] Optionally, the set of transportation paths for passing through the plurality of goods points is generated, comprising:
[0011] repeating the following steps until a preset local optimal condition is detected: determining an arrangement order of the plurality of goods points according to pheromones between the plurality of goods points; generating a corresponding transportation path according to the arrangement order; the local optimal condition comprises: a number of generated transportation paths is equal to an integer multiple of a preset iteration number;
[0012] regarding the generated plurality of transportation paths as a transportation path set of the plurality of goods points.
[0013] Optionally, after the intersecting path is converted into the non-intersecting path, the method further comprises: updating the pheromones between the goods points passed by the non-intersecting path;
[0014] Before screening the target path corresponding to the path generation request, the method further comprises: judging whether the transportation path set meets a preset iteration stop condition; in a case where the transportation path set does not meet the iteration stop condition, repeating the following steps until the transportation path set meets the iteration stop condition: generating a new transportation path according to the updated pheromones between the plurality of goods points, and storing the new transportation path to the transportation path set.
[0015] Optionally, determining the arrangement order of the plurality of goods points according to the pheromones between the plurality of goods points comprises:
[0016] From the plurality of goods points, a starting point is determined, the starting point is stored to a preset selected point set, and a goods point in the plurality of goods points that is not stored to the selected point set is regarded as an unselected point.
[0017] Repeating the following steps until the selected point set includes the plurality of goods points: determining a weighted pheromone between the starting point and each unselected point according to the pheromone and heuristic information between the starting point and each unselected point; determining a total weighted pheromone between the starting point and all unselected points according to the weighted pheromone; screening a successor point corresponding to the starting point from the unselected points according to the weighted pheromone and the total weighted pheromone; storing the successor point to the selected point set, and taking the successor point as the starting point.
[0018] Optionally, in a case where the transportation path set does not include the intersecting path, the method further comprises:
[0019] Screening a temporary target path in the transportation path set;
[0020] Updating the pheromones between the goods points passed by the transportation paths other than the temporary target path in the transportation path set;
[0021] generate a new set of transportation paths according to the updated pheromone between the plurality of goods points;
[0022] store the temporary target path to the new set of transportation paths, and filter out a target path corresponding to the path generation request from the new set of transportation paths.
[0023] Optionally, update the pheromone between the goods points passed by the other transportation paths in the set of transportation paths, including:
[0024] determine an average distance between the plurality of goods points;
[0025] compare the distance between the goods points passed by the other transportation paths with the average distance to obtain a comparison result;
[0026] determine an information weight between the goods points passed by the other transportation paths according to the comparison result;
[0027] update the pheromone between the goods points passed by the other transportation paths according to the information weight.
[0028] Optionally, before generating the new set of transportation paths according to the updated pheromone between the plurality of goods points, the method further includes:
[0029] determine a total distance of the temporary target path;
[0030] determine a path number of the transportation paths included in the set of transportation paths;
[0031] update the pheromone between the plurality of goods points according to the total distance and the path number.
[0032] According to a second aspect of the embodiments of the present application, a device for generating a transportation path is provided, including:
[0033] a generating module, configured to determine a plurality of goods points corresponding to a path generation request, and generate a set of transportation paths for passing through the plurality of goods points;
[0034] a judging module, configured to judge whether the set of transportation paths includes intersecting paths, and convert the intersecting paths into non-intersecting paths in the case that the set of transportation paths includes the intersecting paths;
[0035] a filtering module, configured to filter out a target path corresponding to the path generation request from the set of transportation paths which does not include the intersecting paths.
[0036] Optionally, the generating a set of transportation paths for passing through the plurality of goods points includes:
[0037] repeating the following steps until a preset local optimal condition is detected: determining an arrangement order of the plurality of goods points according to pheromones between the plurality of goods points; generating a corresponding transportation path according to the arrangement order; the local optimal condition comprises: a number of generated transportation paths is equal to an integer multiple of a preset iteration number;
[0038] taking the generated plurality of transportation paths as a transportation path set of the plurality of goods points.
[0039] Optionally, the device further comprises: a first updating module configured to update the pheromones between the goods points passed by the disjoint paths.
[0040] The device further comprises: a second determining module configured to determine whether the transportation path set meets a preset iteration stop condition; and a second generating module configured to, in a case where the transportation path set does not meet the iteration stop condition, repeat the following steps until the transportation path set meets the iteration stop condition: generating a new transportation path according to the updated pheromones between the plurality of goods points, and storing the new transportation path to the transportation path set.
[0041] Optionally, determining the arrangement order of the plurality of goods points according to the pheromones between the plurality of goods points comprises:
[0042] determining a starting point from the plurality of goods points, storing the starting point to a preset selected point set, and taking the goods points in the plurality of goods points that are not stored to the selected point set as unselected points.
[0043] repeating the following steps until the selected point set comprises the plurality of goods points: determining a weighted pheromone between the starting point and each unselected point according to a pheromone and heuristic information between the starting point and each unselected point; determining a total weighted pheromone between the starting point and all unselected points according to the weighted pheromones; screening a successor point corresponding to the starting point from the unselected points according to the weighted pheromone and the total weighted pheromone; storing the successor point to the selected point set, and taking the successor point as the starting point.
[0044] Optionally, the device further comprises:
[0045] a second screening module configured to screen a temporary target path from the transportation path set.
[0046] a second updating module configured to update the pheromones between the goods points passed by the transportation paths other than the temporary target path in the transportation path set.
[0047] a third generating module, configured to generate a new transport path set according to the updated pheromone between the plurality of goods points;
[0048] a second screening module, configured to store the temporary target path to the new transport path set, and screen out a target path corresponding to the path generation request from the new transport path set.
[0049] Optionally, in the transport path set, the pheromone between the goods points passed by the other transport paths except the temporary target path is updated, including:
[0050] determining an average distance between the plurality of goods points;
[0051] comparing the distance between the goods points passed by the other transport paths with the average distance to obtain a comparison result;
[0052] determining an information weight between the goods points passed by the other transport paths according to the comparison result;
[0053] updating the pheromone between the goods points passed by the other transport paths according to the information weight.
[0054] Optionally, the apparatus further includes:
[0055] a first determining module, configured to determine a total distance of the temporary target path;
[0056] a second determining module, configured to determine a path quantity of the transport paths included in the transport path set;
[0057] a third updating module, configured to update the pheromone between the plurality of goods points according to the total distance and the path quantity.
[0058] According to a third aspect of embodiments of the present application, an electronic device is provided, including:
[0059] one or more processors;
[0060] a storage device configured to store one or more programs,
[0061] when the one or more programs are executed by the one or more processors, the one or more processors implement the method in any of the above embodiments.
[0062] According to a fourth aspect of embodiments of the present application, a computer readable medium is provided, which stores a computer program, and the program is executed by a processor to implement the method in any of the above embodiments.
[0063] An embodiment of the above application has the following advantages or beneficial effects: in the case where the set of transport paths includes intersecting paths, the intersecting paths are converted into non-intersecting paths, which can make the selected target paths more in line with business requirements and help find target paths with shorter distances and higher transport efficiency; in the process of generating transport paths, the intersecting paths included in the transport paths are eliminated at intervals or after a certain number of transport paths are generated, which can ensure that the finally selected target paths are not intersecting paths, make the target paths have shorter distances and higher transport efficiency; the set of transport paths is determined according to pheromones, the pheromones are updated after the intersecting paths are eliminated, and a new set of transport paths is generated, which can help explore new transport paths and more easily select transport paths in line with business requirements and avoid blindly generating new transport paths; based on pheromones and heuristic information, the arrangement order between the cargo points is determined, which can improve the arrangement efficiency and accuracy of the cargo points and make the arranged cargo points more in line with business requirements; in the case where the intersecting paths are not included, the pheromones between all the cargo points are updated, which can increase the possibility of other transport paths as target paths and make the selected target paths more in line with business requirements.
[0064] Further effects of the above non-conventional optional mode will be described in the following in combination with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0065] The accompanying drawings are used to better understand the application and do not constitute an improper limitation on the application. Among them:
[0066] Figure 1 is a schematic diagram of the main process of the transport path generation method according to an embodiment of the application;
[0067] Figure 2 is a schematic diagram of the conversion of intersecting paths according to a reference embodiment of the application;
[0068] Figure 3 is a schematic diagram of the overall process of the generation of transport paths according to a reference embodiment of the application;
[0069] Figure 4 is a schematic diagram of the main process of the transport path generation method according to a reference embodiment of the application;
[0070] Figure 5 is a schematic diagram of the main process of the transport path generation method according to another reference embodiment of the application;
[0071] Figure 6 is a schematic diagram of the main process of the transport path generation method according to still another reference embodiment of the application;
[0072] Figure 7is a schematic diagram of main modules of a transport path generation apparatus according to an embodiment of the present application;
[0073] Figure 8 is an exemplary system architecture diagram in which embodiments of the present application can be applied;
[0074] Figure 9 is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing embodiments of the present application. DETAILED DESCRIPTION
[0075] Exemplary embodiments of the present application are described herein below with reference to the accompanying drawings, which include various details of the embodiments of the present application to assist in understanding them. These should be considered as merely exemplary. Thus, those of ordinary skill in the art will recognize various changes, modifications, and improvements that can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, descriptions of known functions and constructions are omitted in the following description for clarity and conciseness.
[0076] It should be noted that in the technical solutions of the present application, the collection, use, storage, sharing and transfer of user personal information and other processing comply with relevant laws and regulations, and the user is informed and the user's consent or authorization is obtained, and when applicable, the user personal information is subjected to de-identification and / or anonymization and / or encryption technical processing.
[0077] The robot system can move to the corresponding position according to the received instructions and perform the corresponding task. For example, in a logistics warehouse business scenario, the robot system performs a picking task from multiple goods points according to the received moving route, and transports the picked goods to the warehouse delivery port. As can be seen, the path planning of the robot system is an important link in the goods distribution and storage process. Usually, an ant colony algorithm is used to plan the transport path of the robot system, a plurality of transport paths capable of completing the task are determined, and then a transport path meeting the business requirements is selected from the plurality of transport paths.
[0078] According to the ant colony algorithm to plan the transport path, it is easy to fall into local optimization, resulting in a longer transport path and lower transport efficiency, and consuming more manpower and material resources in the goods transportation process.
[0079] Therefore, according to a first aspect of an embodiment of the present application, a transport path generation method is provided.
[0080] Figure 1 is a schematic diagram of the main flow of the transport path generation method according to an embodiment of the present application. As shown in Figure 1 The transport path generation method according to an embodiment of the present application mainly includes the following steps S101 to S103.
[0081] In step S101, in response to receiving the path generation request, a plurality of corresponding goods points are determined, and a set of transportation paths passing through the plurality of goods points is generated.
[0082] The execution subject of the embodiment of the present application analyzes the received path generation request, and determines a plurality of goods points for which path planning needs to be performed. Specifically, a goods point is a position in a logistics warehouse for storing goods, and a robot system can perform a picking task or a restocking task at the goods point.
[0083] After determining the plurality of goods points, a plurality of transportation paths are generated, and the plurality of transportation paths are combined into a set of transportation paths. The transportation paths pass through the plurality of goods points, that is, the lines connecting the plurality of goods points form the transportation paths, and each transportation path passes through each goods point only once. Specifically, a starting point is selected from the plurality of goods points, and then the next passing goods point is determined according to the transportation information between the goods points until the plurality of goods points corresponding to the path generation request are passed. The transportation information between the goods points includes the distance between the goods points, the road conditions (for example, whether there are obstacles, whether the road surface is flooded, whether the road surface is a ceramic tile road or a stone slab road), and the like. The passing order of the goods points is taken as the corresponding transportation path, and the above-mentioned generation process of the transportation path is repeatedly performed to generate a plurality of transportation paths.
[0084] For example, there are four goods points, goods point A1, goods point A2, goods point A3, and goods point A4. Goods point A1 is taken as the starting point. Among goods point A2, goods point A3, and goods point A4, goods point A2 has the smallest distance from goods point A1, so goods point A2 is taken as the next passing point. Among goods point A3 and goods point A4, goods point A3 has the smallest distance from goods point A2, so goods point A3 is taken as the next passing point. Finally, goods point A4 is taken as the last passing goods point, thereby obtaining a transportation path "goods point A1-goods point A2-goods point A3-goods point A4". Then, in the case where the starting point is still goods point A1, other goods points are selected as the next passing goods points, thereby generating new transportation paths; or, other goods points are selected as the starting points, thereby generating new transportation paths. The generated plurality of transportation paths are taken as the set of transportation paths.
[0085] Generating a plurality of transportation paths according to the distance, road conditions, and the like can explore new transportation paths as much as possible, provide a data basis for screening target paths, and help find transportation paths that are shorter, have higher transportation efficiency, and meet business requirements.
[0086] In step S102, it is judged whether the set of transportation paths includes intersecting paths, and in the case where the set of transportation paths includes intersecting paths, the intersecting paths are converted into non-intersecting paths.
[0087] After the set of transportation paths is obtained, it is judged whether the set of transportation paths includes intersecting paths. Specifically, intersecting paths refer to transportation paths having intersection points. The multiple transportation paths included in the set of transportation paths are traversed, and the routes passed through by each transportation path are recorded. In the process of traversing a single transportation path, it is judged whether a route that has been passed through before is passed through, and in the case where a route that has been passed through before is passed through, it is indicated that the transportation path has an intersection point, i.e., the transportation path is an intersecting path, and after the traversal of a single transportation path is completed, a route that has not been passed through before is passed through, which indicates that the transportation path does not have an intersection point, i.e., the transportation path is not an intersecting path.
[0088] Figure 2 FIG. 1 is a schematic diagram of the conversion of intersecting paths according to an exemplary embodiment of the present application. As shown in FIG. 1, in the intersecting path conversion process 201, the path between the goods location 2 and the goods location 4 intersects with the path between the goods location 3 and the goods location 5, and in the intersecting path conversion process 202, the path between the goods location 7 and the goods location 9 intersects with the path between the goods location 8 and the goods location 10. Figure 2
[0089] In the case where the transportation path is an intersecting path, multiple goods locations adjacent to the intersection point in the intersecting path are determined, and the multiple goods locations adjacent to the intersection point are taken as adjacent goods locations. Since the old paths between the adjacent goods locations have intersection points, the old paths between the adjacent goods locations are first eliminated, and then the adjacent goods locations are traversed, and new paths that do not have intersection points are determined between the adjacent goods locations, the old paths in the intersecting path are replaced with the new paths, so that the intersecting path is converted into a non-intersecting path, and the non-intersecting path is a transportation path that does not have intersection points.
[0090] As shown in FIG. 1, in the intersecting path conversion process 201, the path between the goods location 2 and the goods location 4 is deleted, and a new path is generated between the goods location 2 and the goods location 3, and a new path is generated between the goods location 4 and the goods location 5, and in the intersecting path conversion process 202, the path between the goods location 7 and the goods location 9 is deleted, and a new path is generated between the goods location 7 and the goods location 8, and a new path is generated between the goods location 9 and the goods location 10. Figure 2
[0091] It should be noted that, in the case of the existence of intersection points in the transportation path, the path length of the transportation path is longer than that of the transportation path without intersection points, and the efficiency of the cargo transportation is also lower. For example, as shown in FIG. 2, the path length from the cargo point 2 to the cargo point 4 is greater than the path length from the cargo point 2 to the cargo point 3, and the path length from the cargo point 3 to the cargo point 5 is greater than the path length from the cargo point 4 to the cargo point 5, so in the intersection path conversion process 201, the path length of the intersection path is greater than the path length of the non-intersection path. Figure 2
[0092] In the case of determining that the transportation path set includes the intersection path, the intersection path is converted into the non-intersection path, so that the target path screened out is more in line with the business requirements, and it is beneficial to find a target path with shorter distance, higher transportation efficiency and shorter transportation time.
[0093] In step S103, the target path corresponding to the path generation request is screened out from the transportation path set without the intersection path.
[0094] After the intersection path is converted into the non-intersection path, all the transportation paths included in the transportation path set are non-intersection paths. The target path is screened out from the transportation path set without the intersection path. For example, the path lengths of all the transportation paths in the transportation path set are determined, and the transportation path with the shortest path length is taken as the target path. For another example, the traversal times of all the transportation paths in the transportation path set are determined, i.e., the times required for moving from the starting point of the transportation path to the ending point of the transportation path, and the transportation path with the shortest traversal time is taken as the target path.
[0095] The target path is screened out from the transportation path set without the intersection path, so that the target path screened out is more in line with the business requirements, and it is beneficial to find a target path with shorter distance, higher transportation efficiency and shorter transportation time.
[0096] According to a reference embodiment of the present application, when generating a transportation path set for passing through a plurality of cargo points, the following steps are repeated: first, the arrangement order of the plurality of cargo points is determined according to the pheromone between the plurality of cargo points. Specifically, the pheromone is a value converted from the transportation information between the cargo points, and the pheromone is used to determine the arrangement order of the cargo points. The pheromones between different cargo points can be the same or different. The pheromones between the cargo points include basic pheromones and estimated pheromones. The basic pheromones between the plurality of cargo points are the same, and the estimated pheromones between the plurality of cargo points are related to the transportation information between the cargo points.
[0097] For example, the calculation formula of the pheromone τ ij between the cargo point i and the cargo point j is: τ ij = τ0+1 / d ij , τmin ≤τ0≤τ max wherein τ0 represents a basic pheromone, the basic pheromone being set between a maximum pheromone τ max and a minimum pheromone τ min , d ij represents a Euclidean distance between the goods location i and the goods location j, 1 / d ij represents an estimated pheromone between the goods location i and the goods location j, the estimated pheromone being equal to the inverse of the Euclidean distance of the goods location; preferably, the value of τ0+1 / d ij is close to τ max , i.e. the Euclidean distance between the goods locations is much greater than 1.
[0098] After determining the pheromone between the goods locations, a first location is determined from the plurality of goods locations, the pheromone between the first location and other goods locations in the plurality of goods locations is determined, and the goods location with the largest pheromone between the first location is determined as a second location after the first location. Then the pheromone between the second location and other goods locations except the first location and the second location is determined, and the goods location with the largest pheromone between the second location is determined as a third location after the second location. In this way, the plurality of goods locations is sorted until the sorting is completed. According to the sorting order, a corresponding transportation path is generated, the first location is the starting location of the transportation path, and the last location is the ending location of the transportation path.
[0099] The above process of generating the transportation path is repeated until a pre-set local optimal condition is reached, wherein the local optimal condition includes: the number of generated transportation paths is equal to an integer multiple of the pre-set iteration number. One transportation path is generated after each iteration, and the number of generated transportation paths is equal to the number of iterations that have been completed so far. For example, in the case where the pre-set iteration number is 5, in the case where the number of iterations that have been completed so far is a multiple of 5, such as 5, 10, 15, etc., i.e. in the case where the transportation path set includes 5, 10, 15, etc. transportation paths, the generated plurality of transportation paths are taken as the transportation path set of the plurality of goods locations. Then it is determined whether the transportation path set includes intersecting paths, and in the case where the transportation path set includes intersecting paths, the intersecting paths are converted into non-intersecting paths.
[0100] It should be noted that when the process of generating the transportation path according to the pheromone is performed for a period of time, the iteration number is large, and the local optimal problem is prone to occur, resulting in the existence of intersecting paths in the generated transportation path and the inability to generate new transportation paths. Therefore, in order to solve the above problem, the iteration number n t is pre-set, and every time the process of generating the transportation path passes through an integer multiple of the iteration number, for example, in the case where the number of iterations that have been completed so far is n t, 2n t , 3n t In the case of the above, the generation process of the transport path is trapped in a local optimum problem, and the intersecting path needs to be eliminated and a new transport path is generated; then it is determined whether the transport path set includes the intersecting path, if yes, the intersecting path is converted into a non-intersecting path, and then the iteration is continued until the next determination link is reached or the iteration is terminated, otherwise, the iteration is directly continued until the next determination link is reached or the iteration is terminated.
[0101] In the process of generating the transport path, after a certain number of transport paths are generated, the intersecting path included in the transport path is eliminated, which can ensure that the target path finally screened out is not an intersecting path, so that the distance of the target path is shorter and the transport efficiency is higher.
[0102] According to another embodiment of the present application, after the intersecting path is converted into a non-intersecting path, the method further includes updating the pheromone between the goods points passed by the non-intersecting path. Specifically, the goods points passed by the non-intersecting path are determined, the pheromone between the goods points and the number of goods points are determined, and the pheromone between the goods points is updated according to the pheromone between the goods points and the number of goods points.
[0103] Exemplarily, the intersecting path is: goods point B1-goods point B2-goods point B4-goods point B3-goods point B5-goods point B6, and the non-intersecting path obtained after the conversion of the intersecting path includes: goods point B1-goods point B2-goods point B3-goods point B4-goods point B5-goods point B6, and the calculation formula for updating the pheromone of the six goods points is: τ B12 = τ B23 = τ B34 = τ B45 = τ B56 = (τ' B12 + τ' B24 + τ' B43 + τ' B35 + τ' B56 ) / x-1, wherein τ' B12 represents the pheromone between the goods point B1 and the goods point B2 in the intersecting path, and the pheromone between other points in the intersecting path is calculated in the same way, τ B12Pij represents the pheromone between the cargo location B1 and the cargo location B2 in the disjoint path, the pheromone between other locations in the disjoint path is represented in the same way, and x represents the number of cargo locations in the disjoint path. The value of x is greater than or equal to 4, preferably, x = 6. Generally, the intersection point in the intersecting path is the intersection point of two paths formed by four cargo locations, and two cargo locations adjacent to the four cargo locations are determined around the four cargo locations.
[0104] Before the target path corresponding to the path generation request is screened out, the method further comprises: judging whether the set of transport paths meets a pre-set iteration stop condition. The iteration stop condition is a condition for stopping the generation of the transport paths, and the iteration stop condition comprises: the number of the transport paths included in the set of transport paths is greater than or equal to a pre-set total amount of the transport paths, the number of execution times of the generation process of the transport paths is greater than or equal to a pre-set total amount of the number of execution times, and the like.
[0105] In the case where the set of transport paths does not meet the iteration stop condition, the following steps are repeated until the set of transport paths meets the iteration stop condition: generating a new transport path according to the updated pheromone between the plurality of cargo locations, and storing the new transport path to the set of transport paths. That is, in the case where the iteration stop condition is not met, the new transport path is continuously generated according to the pheromone, the new transport path is stored to the set of transport paths, the pheromone is updated, and the new transport path is generated according to the pheromone until the number of the transport paths included in the set of transport paths is greater than or equal to the total amount of the transport paths, or the number of execution times of the generation process of the transport paths is greater than or equal to the total amount of the number of execution times.
[0106] The set of transport paths is determined according to the pheromone, the pheromone is updated after the intersecting paths are eliminated, and the new set of transport paths is generated, which is beneficial to explore the new transport paths and more easily screen out the transport paths meeting the business requirements, and avoids blindly generating the new transport paths.
[0107] According to another embodiment of the present application, when the arrangement order of the plurality of cargo locations is determined according to the pheromone between the plurality of cargo locations, a starting location is first determined from the plurality of cargo locations, the starting location is stored to a pre-set set of selected locations, and the cargo locations in the plurality of cargo locations which are not stored to the set of selected locations are regarded as unselected locations.
[0108] The following steps are repeated: according to the pheromone and heuristic information between the starting point and each unselected point, the weighted pheromone between the starting point and each unselected point is determined. Specifically, the heuristic information is a value converted from the transportation information between the cargo points, the transportation information on which the pheromone and the heuristic information are based is different, and the heuristic information is used to determine the arrangement order of the cargo points together with the pheromone. The heuristic information between different cargo points can be the same or different. For example, the pheromone and the heuristic information of the same unselected point are multiplied to obtain the weighted pheromone corresponding to the unselected point.
[0109] According to the weighted pheromone, the total weighted pheromone between the starting point and all unselected points is determined. For example, the weighted pheromones of all unselected points are summed to obtain the total weighted pheromone. According to the weighted pheromone of the unselected point and the total weighted pheromone, the movement probability corresponding to each unselected point is determined, that is, the probability of moving from the starting point to the unselected point, that is, the probability of the unselected point being arranged after the starting point. According to the movement probability, the successor point corresponding to the starting point is selected from the plurality of unselected points, and the unselected point with the largest probability is taken as the successor point of the starting point. The successor point is stored in the selected point set, and the successor point is taken as the starting point to continue the above process of determining the successor point of the starting point until the selected point set includes the plurality of cargo points, that is, until there is no unselected point.
[0110] The calculation formula of the movement probability of moving from the starting point m to the unselected point n is: wherein α is a pheromone factor, indicating the importance of the pheromone to the calculation of the movement probability, and the value range is [1, 4], β is a heuristic information factor, indicating the importance of the heuristic information to the calculation of the movement probability, and the value range is [3, 5], η n represents the heuristic information of the unselected point n, and the calculation formula of the heuristic information is: mn η n = 1 / d n mn k represents the total number of the plurality of cargo points, and allowed k represents the unselected point set.
[0111] Based on the pheromone and the heuristic information, the arrangement order between the cargo points is determined, which can improve the arrangement efficiency and accuracy of the cargo points, and make the arranged cargo points meet the business requirements.
[0112] According to one reference embodiment of the present application, in the case that the transportation path set does not include intersecting paths, the method further comprises: screening a temporary target path in the transportation path set. The temporary target path is the transportation path with the shortest path length and the shortest traversal time that meets the business requirements in the current transportation path set.
[0113] In the transport path set, the pheromones between cargo locations traversed by other transport paths besides the temporary target path are updated. Specifically, the path lengths of other transport paths besides the temporary target path are determined, and the pheromones of these other transport paths are updated based on their path lengths. For example, the other transport paths are sorted according to their path lengths. Based on the sorting results, the pheromone increments of the other transport paths are determined. The pheromones of each transport path are multiplied by their corresponding pheromone increments to obtain the updated pheromones. For instance, the other transport paths besides the temporary target path include transport path C1, transport path C2, and transport path C3. Transport path C1 is the shortest and ranks 3rd, transport path C2 is the longest and ranks 1st, and transport path C3 is of medium length and ranks 2nd. Therefore, each pheromone involved in transport path C1 is multiplied by 3 to obtain the updated pheromone, each pheromone involved in transport path C2 is multiplied by 2 to obtain the updated pheromone, and each pheromone involved in transport path C3 is multiplied by 1 to obtain the updated pheromone.
[0114] A new set of transport routes is generated based on the updated pheromones between multiple cargo locations. Temporary target routes are stored in the new set of transport routes. From the new set of transport routes, the target routes corresponding to the route generation requests are selected. For example, the target routes with the shortest path length and the shortest traversal time are selected from the new set of transport routes.
[0115] Updating the pheromones between cargo locations, without excluding intersecting paths, can increase the likelihood of other transportation routes being the target routes, making the selected target routes more in line with business needs.
[0116] According to another possible embodiment of the present invention, when updating the pheromones between cargo points traversed by other transportation routes (excluding temporary target routes) in a transportation route set, the average distance between multiple cargo points is first determined. The distances between cargo points traversed by other transportation routes are compared with the average distance to obtain a comparison result, i.e., determining whether the distances corresponding to other transportation routes are greater than the average distance. Based on the comparison result, the information weights between cargo points traversed by other transportation routes are determined; different comparison results correspond to different information weights. Based on the information weights, the pheromones between cargo points traversed by other transportation routes are updated.
[0117] For example, updated pheromones for other transport routes The calculation formula is: Where, d mean d represents the average distance between multiple cargo locations. ij Represents the i-th cargo location v i and the j-th cargo location v jthe distance between the i-th goods point and the j-th goods point, specifically, wherein x i represents the lateral distance between the i-th goods point and a reference point in the goods warehouse, y i represents the longitudinal distance between the i-th goods point and the reference point in the goods warehouse, τ ij (t) represents the pheromone between the i-th goods point and the j-th goods point before updating, T best represents the temporary target path.
[0118] In the case of not including the intersecting path, the pheromone between the goods points is updated, which can increase the possibility of other transportation paths as the target path, so that the selected target path is more in line with the business demand.
[0119] According to another embodiment of the present application, the pheromone between the goods points is updated after each transportation path is generated, specifically, the updated pheromone τ ij (t) between the i-th goods point and the j-th goods point is calculated according to the following formula: ij (t) = (1-ρ)τ ij (t-1+Δτ ij (t, wherein ρ represents the pheromone evaporation coefficient, τ ij (t-1) represents the pheromone before updating, Δτ ij (t represents the pheromone increment, specifically, the calculation formula of the pheromone increment is: wherein Q represents the pheromone constant, and the value range is [10, 1000], L k represents the path length of the transportation path.
[0120] According to another embodiment of the present application, before generating a new set of transportation paths according to the updated pheromone between the goods points, the method further comprises: determining the total distance of the temporary target path; determining the number of paths of the transportation paths included in the set of transportation paths; updating the pheromone between the goods points according to the total distance and the number of paths. Specifically, the calculation formula of the updated pheromone τ between the i-th goods point and the j-th goods point before generating the new transportation path is: wherein τ ij (t-1) represents the pheromone before updating, Δτ ij (t represents the reciprocal of the total distance of the temporary target path, represents that the temporary target path is selected from the t transportation paths.
[0121] The pheromone between the cargo points is updated without the intersecting path, which can increase the possibility of other transport paths as target paths, so that the selected target path is more in line with the business requirements.
[0122] Figure 3 is a schematic diagram of the overall flow of the transport path generation according to an embodiment of the present application. As an example, the execution subject of the embodiment of the present application initializes a plurality of cargo points in response to receiving a path generation request; initializes the pheromone between the plurality of cargo points; traverses the plurality of cargo points according to the pheromone to generate a set of transport paths; determines a temporary target path from the set of transport paths; judges whether the temporary target path is an intersecting path, if yes, converts the intersecting path into a non-intersecting path; otherwise, updates the pheromone between the plurality of cargo points; then, traverses the plurality of cargo points according to the updated pheromone, and updates the set of transport paths according to the traversal result; and determines the target path corresponding to the path generation request from the new set of transport paths.
[0123] Figure 4 is a schematic diagram of the main flow of the transport path generation method according to an embodiment of the present application. As shown in Figure 4 , the transport path generation method can include:
[0124] Step S401, in response to receiving a path generation request, determining a plurality of corresponding cargo points;
[0125] Step S402, determining the arrangement order of the plurality of cargo points according to the pheromone between the plurality of cargo points;
[0126] Step S403, generating the corresponding transport path according to the arrangement order, and storing the transport path to the set of transport paths;
[0127] Step S404, judging whether the number of generated transport paths is equal to an integer multiple of the iteration number, if yes, jumping to step S405, otherwise, jumping to step S402;
[0128] Step S405, judging whether the set of transport paths includes an intersecting path, if yes, jumping to step S406, otherwise, jumping to step S407;
[0129] Step S406, converting the intersecting path into a non-intersecting path;
[0130] Step S407, screening out the target path corresponding to the path generation request from the set of transport paths without the intersecting path.
[0131] The specific implementation content of the transport path generation method according to an embodiment of the present application has been described in detail in the above transport path generation method, and therefore the repeated content will not be described here.
[0132] Figure 5 is a schematic diagram of the main flow of the transport path generation method according to another reference embodiment of the present application. As shown in Figure 5 , the transport path generation method can include:
[0133] Step S501, in response to receiving a path generation request, determining a plurality of corresponding goods points;
[0134] Step S502, determining the arrangement order of the plurality of goods points according to the pheromone between the plurality of goods points;
[0135] Step S503, generating the corresponding transport path according to the arrangement order, and storing the transport path to the transport path set;
[0136] Step S504, determining whether the number of generated transport paths is equal to an integer multiple of the iteration number, if yes, jumping to step S505, otherwise, jumping to step S502;
[0137] Step S505, determining whether the transport path set includes intersecting paths, if yes, jumping to step S506, otherwise, jumping to step S508;
[0138] Step S506, converting the intersecting paths into non-intersecting paths;
[0139] Step S507, updating the pheromone between the goods points corresponding to the other transport paths except the non-intersecting paths;
[0140] Step S508, determining whether the number of generated transport paths is equal to the total number of iterations, if yes, jumping to step S510, otherwise, jumping to step S509;
[0141] Step S509, updating the pheromone between the plurality of goods points;
[0142] Step S510, filtering out the target path corresponding to the path generation request from the transport path set not including intersecting paths.
[0143] The specific implementation content of the transport path generation method of the above-mentioned another reference embodiment of the present application has been described in detail in the transport path generation method described above, and therefore the repeated content will not be described here.
[0144] Figure 6 is a schematic diagram of the main flow of the transport path generation method according to another reference embodiment of the present application. As shown in Figure 6 , the transport path generation method can include:
[0145] Step S601, in response to receiving the path generation request, determining a plurality of corresponding goods points;
[0146] Step S602, according to the pheromone between the plurality of goods points, determining the arrangement order of the plurality of goods points;
[0147] Step S603, according to the arrangement order, generating a corresponding transport path, and storing the transport path to the transport path set;
[0148] Step S604, determining whether the transport path set includes an intersection path, if yes, jumping to step S605, otherwise, jumping to step S606;
[0149] Step S605, converting the intersection path into a non-intersection path;
[0150] Step S606, in the transport path set not including the intersection path, filtering out the target path corresponding to the path generation request.
[0151] The specific implementation content of the transport path generation method of the above-mentioned another embodiment of the present application has been described in detail in the transport path generation method described above, and therefore the repeated content will not be described here.
[0152] According to a second aspect of an embodiment of the present application, a transport path generation device is provided.
[0153] Figure 7 is a schematic diagram of the main modules of the transport path generation device according to an embodiment of the present application, as shown in Figure 7 The transport path generation device 700 mainly includes:
[0154] The generation module 701 is configured to determine a plurality of corresponding goods points in response to receiving the path generation request, and generate a transport path set for passing through the plurality of goods points;
[0155] The determination module 702 is configured to determine whether the transport path set includes an intersection path, and convert the intersection path into a non-intersection path in the case that the transport path set includes the intersection path;
[0156] The filtering module 703 is configured to filter out the target path corresponding to the path generation request in the transport path set not including the intersection path.
[0157] According to an embodiment of the present application, the generation of the transport path set for passing through the plurality of goods points includes:
[0158] repeating the following steps until a preset local optimal condition is detected: determining an arrangement order of the plurality of goods points according to pheromones between the plurality of goods points; generating a corresponding transportation path according to the arrangement order; the local optimal condition comprises that a number of the generated transportation paths is equal to an integer multiple of a preset iteration number;
[0159] the generated plurality of transportation paths are taken as a transportation path set of the plurality of goods points.
[0160] According to another embodiment of the present application, the transportation path generating device 700 further comprises a first updating module configured to update the pheromones between the goods points passed by the disjoint paths.
[0161] The transportation path generating device 700 further comprises a second determining module configured to determine whether the transportation path set meets a preset iteration stop condition; and a second generating module configured to, in a case where the transportation path set does not meet the iteration stop condition, repeat the following steps until the transportation path set meets the iteration stop condition: generating a new transportation path according to the updated pheromones between the plurality of goods points, and storing the new transportation path to the transportation path set.
[0162] According to another embodiment of the present application, determining an arrangement order of the plurality of goods points according to pheromones between the plurality of goods points comprises:
[0163] determining a starting point from the plurality of goods points, storing the starting point to a preset selected point set, and taking the plurality of goods points not stored to the selected point set as unselected points;
[0164] repeating the following steps until the selected point set comprises the plurality of goods points: determining a weighted pheromone between the starting point and each unselected point according to a pheromone and heuristic information between the starting point and each unselected point; determining a total weighted pheromone between the starting point and all unselected points according to the weighted pheromones; screening a successor point corresponding to the starting point from the unselected points according to the weighted pheromone and the total weighted pheromone; storing the successor point to the selected point set, and taking the successor point as the starting point.
[0165] According to another embodiment of the present application, the transportation path generating device 700 further comprises:
[0166] a second screening module configured to screen a temporary target path from the transportation path set.
[0167] a second updating module, configured to update pheromone between the goods points passed by the other transport paths except the temporary target path in the transport path set;
[0168] a third generating module, configured to generate a new transport path set according to the updated pheromone between the plurality of goods points;
[0169] a second screening module, configured to store the temporary target path to the new transport path set, and screen the target path corresponding to the path generation request in the new transport path set.
[0170] According to another embodiment of the present application, the updating of the pheromone between the goods points passed by the other transport paths except the temporary target path in the transport path set comprises:
[0171] determining an average distance between the plurality of goods points;
[0172] comparing the distance between the goods points passed by the other transport paths with the average distance to obtain a comparison result;
[0173] determining an information weight between the goods points passed by the other transport paths according to the comparison result;
[0174] updating the pheromone between the goods points passed by the other transport paths according to the information weight.
[0175] According to an embodiment of the present application, the transport path generation device 700 further comprises:
[0176] a first determining module, configured to determine a total distance of the temporary target path;
[0177] a second determining module, configured to determine a path number of the transport paths included in the transport path set;
[0178] a third updating module, configured to update the pheromone between the plurality of goods points according to the total distance and the path number.
[0179] It should be noted that the specific implementation of the transport path generation device in the embodiments of the present application has been described in detail in the above transport path generation method, and thus the repeated content will not be described here.
[0180] According to the technical scheme of the embodiment of the present application, in the case that the transport path set includes intersecting paths, the intersecting paths are converted into non-intersecting paths, so that the target path screened out is more in line with the business requirements, and a target path with shorter distance and higher transport efficiency can be found; in the process of generating the transport path, the intersecting paths included in the transport path are eliminated every certain period of time or after a certain number of transport paths are generated, so that the target path screened out finally is not an intersecting path, the distance of the target path is shorter, and the transport efficiency is higher; the pheromone is used to determine the transport path set, the pheromone is updated after the intersecting paths are eliminated, and a new transport path set is generated, which is beneficial to explore a new transport path and screen out a transport path in line with the business requirements more easily, and blind generation of a new transport path is avoided; the pheromone and heuristic information are used to determine the arrangement order between the cargo points, so that the arrangement efficiency and accuracy of the cargo points are improved, and the arranged cargo points are more in line with the business requirements; in the case that the intersecting paths are not included, the pheromone between all the cargo points is updated, so that the possibility of other transport paths as target paths is increased, and the target path screened out is more in line with the business requirements.
[0181] According to a third aspect of the embodiments of the present application, an electronic device is provided, including: one or more processors; a storage device configured to store 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 provided in the first aspect of the embodiments of the present application.
[0182] According to a fourth aspect of the embodiments of the present application, a computer readable medium is provided, and the computer readable medium stores a computer program, when the program is executed by a processor, the method provided in the first aspect of the embodiments of the present application is implemented.
[0183] Figure 8 An exemplary system architecture 800 to which the method of generating a transport path or the apparatus of generating a transport path according to the embodiments of the present application can be applied is shown.
[0184] As shown in Figure 8 The system architecture 800 can include terminal devices 801, 802, 803, a network 804 and a server 805. The network 804 is used to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0185] The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 801, 802, 803, such as path planning applications, warehouse logistics applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like (only as examples).
[0186] The terminal devices 801, 802, 803 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0187] The server 805 can be a server providing various services, such as a background management server providing support for upstream generation requests for transportation paths sent by the terminal devices 801, 802, 803 (only as an example). The background management server can determine a plurality of goods points corresponding to the path generation request in response to receiving the path generation request, generate a set of transportation paths for passing through the plurality of goods points; determine whether the set of transportation paths includes intersecting paths, and in the case where the set of transportation paths includes intersecting paths, convert the intersecting paths into non-intersecting paths; in the set of transportation paths not including intersecting paths, filter out a target path corresponding to the path generation request; and feed back the generation of the transportation path (only as an example) to the terminal device.
[0188] It should be noted that the transportation path generation method provided by the embodiments of the present application is generally executed by the server 805, and accordingly, the transportation path generation device is generally arranged in the server 805. The transportation path generation method provided by the embodiments of the present application can also be executed by the terminal devices 801, 802, 803, and accordingly, the transportation path generation device can be arranged in the terminal devices 801, 802, 803.
[0189] It should be understood that Figure 8 The number of terminal devices, networks, and servers in the above description is only illustrative. Any number of terminal devices, networks, and servers can be provided according to the needs of implementation.
[0190] Reference will now be made to Figure 9 which shows a structural schematic diagram of a computer system 900 of a terminal device suitable for use to implement the embodiments of the present application. Figure 9 The terminal device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0191] As Figure 9As shown, the computer system 900 includes a central processing unit (CPU) 901 which can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 902 or loaded into a random access memory (RAM) 903 from a storage section 908. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0192] Connected to the I / O interface 905 are an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a display device such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as necessary. A removable recording medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 910 as necessary, so that a computer program read therefrom is installed into the storage section 908 as necessary.
[0193] In particular, the processes described above with reference to the flow charts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable recording medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-described functions defined in the system of embodiments of the present disclosure are performed.
[0194] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 embodiments of the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the embodiments of the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a carrier wave in a carrier wave part, in which computer-readable program codes are carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, transmit, propagate or transport a program for use by or in conjunction with an instruction execution system, device or apparatus. The program codes contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0195] The flowcharts and block diagrams in the drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of codes which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, can be implemented by special-purpose hardware-based systems which perform the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0196] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. The modules described can also be arranged in a processor, for example, a processor can be described as including a generating module, a determining module, and a screening module, wherein the names of the modules do not constitute a limitation on the modules themselves in some cases, for example, the generating module can also be described as a "module for generating a set of transportation paths".
[0197] As another aspect, the embodiments of the present application also provide a computer readable medium, which can be included in the device described in the above embodiments, or can exist independently without being assembled into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the device, the device implements the following method: in response to receiving a path generation request, determining a plurality of goods locations corresponding to the path generation request, generating a set of transportation paths for passing through the plurality of goods locations; determining whether the set of transportation paths includes intersecting paths, and in the case that the set of transportation paths includes intersecting paths, converting the intersecting paths into non-intersecting paths; and in the set of transportation paths not including intersecting paths, screening a target path corresponding to the path generation request.
[0198] According to the technical scheme of the embodiments of the present application, in the case that the set of transportation paths includes intersecting paths, the intersecting paths are converted into non-intersecting paths, which can make the screened target path more in line with business requirements and be conducive to finding a target path with shorter distance and higher transportation efficiency; in the process of generating transportation paths, the intersecting paths included in the transportation paths are eliminated every certain period of time or after a certain number of transportation paths are generated, which can ensure that the finally screened target path is not an intersecting path, so that the target path has shorter distance and higher transportation efficiency; the set of transportation paths is determined according to pheromones, the pheromones are updated after the intersecting paths are eliminated, and a new set of transportation paths is generated, which is conducive to exploring a new transportation path and more easily screening a transportation path in line with business requirements, and avoids blindly generating a new transportation path; the arrangement order between the goods locations is determined based on the pheromones and heuristic information, which can improve the arrangement efficiency and accuracy of the goods locations and make the arranged goods locations more in line with business requirements; in the case that the set of transportation paths does not include intersecting paths, the pheromones between all the goods locations are updated, which can increase the possibility of other transportation paths as target paths, so that the screened target path is more in line with business requirements.
[0199] The above specific embodiments do not constitute a limitation on the protection scope of the embodiments of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations, and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A method for generating a transportation route, characterized in that, include: In response to receiving a route generation request, multiple corresponding cargo locations are determined, and a set of transportation routes for passing through the multiple cargo locations is generated. Determine whether the set of transportation routes includes intersecting paths. If the set of transportation routes includes intersecting paths, convert the intersecting paths into non-intersecting paths. In the set of transport paths that do not include intersecting paths, the target path corresponding to the path generation request is selected.
2. The method according to claim 1, characterized in that, Generating a set of transport routes passing through the multiple cargo locations includes: Repeat the following steps until a pre-set local optimum condition is detected: determine the arrangement order of the multiple cargo locations based on the pheromones between them; generate the corresponding transportation path based on the arrangement order; the local optimum condition includes: the number of generated transportation paths is equal to an integer multiple of the pre-set number of iterations; The generated multiple transportation routes are used as a set of transportation routes for the multiple cargo locations.
3. The method according to claim 2, characterized in that, After converting the intersecting paths into non-intersecting paths, the method further includes: updating the pheromones between the cargo points traversed by the non-intersecting paths; Before selecting the target path corresponding to the path generation request, the method further includes: determining whether the transportation path set meets the preset iteration stop condition; if the transportation path set does not meet the iteration stop condition, repeating the following steps until the transportation path set meets the iteration stop condition: generating a new transportation path based on the updated pheromone between the multiple cargo locations, and storing the new transportation path in the transportation path set.
4. The method according to claim 2, characterized in that, Determining the arrangement order of the multiple cargo locations based on the pheromones between them includes: From the plurality of cargo points, determine the starting point, store the starting point in a pre-set set of selected points, and designate the cargo points that are not stored in the set of selected points as unselected points. Repeat the following steps until the selected point set includes the multiple cargo points: determine the weighted pheromone between the starting point and each unselected point based on the pheromone and heuristic information between the starting point and each unselected point; determine the total weighted pheromone between the starting point and all unselected points based on the weighted pheromone; select the successor point corresponding to the starting point from the unselected points based on the weighted pheromone and the total weighted pheromone; store the successor point in the selected point set, and use the successor point as the starting point.
5. The method according to claim 1, characterized in that, If the set of transport routes does not include intersecting routes, the method further includes: From the set of transportation routes, temporary target routes are selected; In the transport path set, update the pheromones between cargo locations traversed by other transport paths besides the temporary target path; A new set of transport routes is generated based on the updated pheromones between the multiple cargo locations; The temporary target path is stored in the new transportation path set, and the target path corresponding to the path generation request is selected from the new transportation path set.
6. The method according to claim 5, characterized in that, In the set of transport routes, updating the pheromones between cargo locations traversed by other transport routes besides the temporary target route includes: Determine the average distance between the plurality of cargo locations; The distances between the cargo locations along the other transportation routes are compared with the average distance to obtain a comparison result; Based on the comparison results, the information weights between the cargo locations traversed by the other transportation routes are determined; Based on the information weights, the pheromones between the cargo locations along the other transportation routes are updated.
7. The method according to claim 5, characterized in that, Before generating a new set of transport routes based on the updated pheromones among the multiple cargo locations, the method further includes: Determine the total distance of the temporary target path; Determine the number of transportation routes included in the transportation route set; Based on the total distance and the number of paths, the pheromones between the multiple cargo locations are updated.
8. A transportation route generation device, characterized in that, include: The generation module is used to respond to a received route generation request, determine multiple corresponding cargo locations, and generate a set of transportation routes passing through the multiple cargo locations; The determination module is used to determine whether the transportation route set includes intersecting paths, and if the transportation route set includes intersecting paths, convert the intersecting paths into non-intersecting paths; The filtering module is used to filter out the target path corresponding to the path generation request from a set of transportation paths that do not include intersecting paths.
9. An electronic device, characterized in that, include: One or more processors; Storage device, used to store 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 as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.