Path optimization method and device, electronic equipment and storage medium

By calculating the geographical location distribution density of the waybill unloading points and performing group optimization, the problem of neglecting geographical density distribution in the existing technology is solved, and more reasonable path planning and lower transportation costs are achieved.

CN120218804APending Publication Date: 2025-06-27SHANSHU TECH (BEIJING) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510378893.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing path optimization methods lack consideration for the geographical density of the waybill, resulting in the optimization stagnation at the suboptimal solution, and the optimization results do not meet actual business needs.

Method used

By calculating the geographical location distribution density of the waybill unloading point, the waybill is divided into multiple groups using preset grouping rules and grouping quantity. After local optimization, the number of groups is gradually reduced until the global optimization solution is obtained.

Benefits of technology

It improves the rationality of path planning, reduces transportation costs, improves computing efficiency, reduces local optimal risks, and optimizes the results more in line with business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218804A_ABST
    Figure CN120218804A_ABST
Patent Text Reader

Abstract

The invention discloses a path optimization method and device, electronic equipment and a storage medium. The path optimization method comprises the steps of calculating latitude and longitude distribution density of unloading points of all waybills according to the unloading points of all the waybills at a current delivery point; dividing all the waybills into N groups by adopting a preset grouping rule and a grouping number according to the distribution density; carrying out intra-group waybill combination and exchange on the waybills in each group so as to carry out local optimization; and regrouping all the waybills subjected to local optimization, gradually reducing the grouping number, and outputting an optimization result when N is equal to 1 as a global optimization solution. By dynamically adjusting the grouping strategy and combining geographical orientation and distance characteristics, the problems that a traditional method is prone to falling into local optimum and ignores geographical density distribution and optimization results break away from service requirements are solved. The method has the technical effects that the transportation cost is reduced, the calculation efficiency is improved, the local optimal risk is reduced, and the interpretability is remarkably enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of logistics transportation, and particularly to a path optimization method, apparatus, electronic device, and storage medium. Background Art

[0002] The Vehicle Routing Problem (VRP) is a key research direction in the field of logistics and transportation. Its goal is to reduce transportation costs and improve scheduling efficiency by reasonably planning the driving routes of vehicles. Traditional VRP solving methods usually rely on heuristic algorithms (such as Large Neighborhood Search, LNS), and achieve local optimization by dynamically adjusting the solution space. Specifically, it includes: ① generating an initial solution based on the nearest neighbor principle or heuristic method; ② performing trip exchange and merging on the basis of the initial solution to optimize the overall transportation cost; ③ continuously optimizing in the solution space through heuristic algorithms, but it is easy to fall into local optimality. The main defect of the above methods is that the fixed neighborhood search strategy limits the solution space exploration ability, resulting in the optimization stagnating at sub-optimal solutions, and the optimization results lack consistency with actual scheduling experience and are difficult to be accepted by business personnel.

[0003] In actual business, the distribution of waybills is usually closely related to geographical locations. However, existing methods mainly optimize based on factors such as vehicle capacity and path length, lacking consideration of the geographical density of waybills. Therefore, existing solutions are difficult to avoid local optimality, and the optimization results do not conform well to actual business requirements. Summary of the Invention

[0004] Embodiments of this application provide a path optimization method, apparatus, electronic device, and storage medium to solve the problem that existing path optimization methods lack consideration of the geographical density of waybills, resulting in the optimization stagnating at sub-optimal solutions, the optimization results lacking consistency with actual scheduling experience, and being difficult to be accepted by business personnel.

[0005] In a first aspect, embodiments of this application provide a path optimization method, including:

[0006] S101. Calculate the longitude and latitude distribution density of all waybills according to the geographical locations of the unloading points of all waybills at the current pick-up point;

[0007] S102. Divide all the waybills into N groups according to the distribution density using a preset grouping rule and the number of groups, where N>1;

[0008] S103. Perform local optimization by merging and exchanging the waybills within each group for each group of waybills;

[0009] S104. Re - group all the waybills after local optimization, and gradually reduce the number of groups. Repeat step S103 for the updated waybill groups until N = 0 to stop repeating. At the same time, output the optimization result when N = 1 as the global optimization solution.

[0010] In a possible embodiment, calculating the longitude - latitude distribution density of all waybills according to the geographical locations of the unloading points of all waybills at the current pick - up point includes:

[0011] Construct a longitude - latitude coordinate system with the due north direction as the latitude coordinate and the due east direction as the longitude coordinate;

[0012] Obtain the longitude - latitude coordinate points of the current pick - up point and the longitude - latitude coordinate points of the unloading points of all waybills respectively;

[0013] Calculate the azimuth angle of the waybill unloading point relative to the pick - up point according to the longitude - latitude coordinate points of the pick - up point and the longitude - latitude coordinate points of the waybill unloading point.

[0014] In a possible embodiment, calculating the longitude - latitude distribution density of all waybills according to the geographical locations of the unloading points of all waybills at the current pick - up point further includes:

[0015] Correct the azimuth angle so that the range of the azimuth angle is [0°, 360°]. The azimuth angle refers to the angle rotated clockwise from the due north direction to the target point in the longitude - latitude coordinate system.

[0016] In a possible embodiment, dividing all the waybills into N groups according to the distribution density using a preset grouping rule and the number of groups includes:

[0017] Calculate the normalized longitude - latitude coordinate points of the waybill unloading points projected onto the unit circle according to the azimuth angle;

[0018] Calculate the relative distance from the waybill unloading point to the pick - up point according to the longitude - latitude coordinate points of the current pick - up point and the longitude - latitude coordinate points of the waybill unloading point;

[0019] Perform normalization processing on the relative distance to obtain the normalized distance from the waybill unloading point to the pick - up point;

[0020] Cluster the unloading points into N groups using a clustering analysis algorithm according to the normalized longitude - latitude coordinate points and the normalized distance.

[0021] In a possible embodiment, locally optimizing by merging and exchanging the waybills within each group for each group includes:

[0022] S1031. Within the current group, move one or more waybills within a vehicle trip to another vehicle trip;

[0023] S1032 Calculate the combined transportation cost within the group waybill;

[0024] S1033. If the combined transportation cost remains unchanged or increases, replace the moving waybill and repeat steps S1031 and S1032. If the combined transportation cost decreases and meets the transportation constraint conditions, accept the combination;

[0025] S1034. Move to the next group and repeat steps S1031 to S1033.

[0026] In a possible embodiment, the local optimization by combining and exchanging the waybills within each group further includes:

[0027] S1131. Within the current group, exchange one or more waybills within one train trip with one or more waybills within another train trip;

[0028] S1132 Calculate the transportation cost after the waybill exchange within the group;

[0029] S1133. If the transportation cost after the exchange remains unchanged or increases, replace the exchanged waybills and repeat steps S1131 and S1132. If the transportation cost after the exchange decreases, accept the exchange;

[0030] S1134. Move to the next group and repeat steps S1131 to S1133.

[0031] In a possible embodiment, the regrouping of all the waybills after local optimization and gradually reducing the number of groups includes:

[0032] Iteratively group the waybills after local optimization using a linear decreasing strategy;

[0033] Reduce at least one group in each iteration.

[0034] In a second aspect, an embodiment of the present application provides a path optimization device, which is characterized by including:

[0035] A calculation module, configured to calculate the longitude and latitude distribution density of the unloading points of all waybills according to the unloading points of all waybills at the current pick-up point;

[0036] A grouping module, configured to divide all the waybills into N groups according to the distribution density using a preset grouping rule and the number of groups, where N>1;

[0037] A local optimization module, configured to perform local optimization on the waybills within each group by combining and exchanging the waybills within the group;

[0038] A dynamic optimization module, which is used to regroup all the waybills after local optimization, gradually reduce the number of groups, repeat step S103 for the updated waybill groups until N = 0 to stop repeating, and output the optimization result when N = 1 as the global optimization solution.

[0039] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. Among them, the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute a path optimization method described in the first aspect above.

[0040] In a fourth aspect, a computer-readable storage medium provided by the present application includes program codes, and when the storage medium runs on an electronic device, the program codes are used to cause the electronic device to execute a path optimization method described in the first aspect above.

[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when the processor of the electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device executes a path optimization method described in the first aspect above.

[0042] The beneficial effects of the present application are as follows:

[0043] An embodiment of the present application provides a path optimization method, device, electronic device and storage medium. Among them, the path optimization method includes: First, calculate the longitude and latitude distribution density of the unloading points of all waybills at the current pick-up point; Secondly, divide all the waybills into N groups according to the distribution density using a preset grouping rule and the number of groups, where N>1; Further, perform local optimization by merging and swapping the waybills within each group for the waybills within each group; Finally, regroup all the waybills after local optimization, gradually reduce the number of groups, repeat the above step for the updated waybill groups until N = 0 to stop repeating, and output the optimization result when N = 1 as the global optimization solution. The present invention solves the problems that the traditional method is prone to fall into local optimum, ignores the geographical density distribution and the optimization result deviates from the business requirements by dynamically adjusting the grouping strategy and combining geographical orientation and distance features. Its technical effects include: the path planning is more in line with the radial transportation logic, reducing the transportation cost, improving the calculation efficiency, and reducing the risk of local optimum; the optimization result conforms to the operation habits of business personnel, and the interpretability is significantly enhanced. The present invention can be widely applied to the logistics scheduling system to support the efficient allocation and intelligent management of transportation resources.

[0044] Other features and advantages of the present application will be described in the subsequent specification, and will, in part, be obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings required for use in the description of the embodiments or the related art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0046] Figure 1 It is a flowchart of the implementation of a path optimization method in an embodiment of the present application;

[0047] Figure 2 It is a schematic diagram of the process of initial grouping of all waybills in an embodiment of the present application;

[0048] Figure 3 It is a schematic diagram of the local optimization result of the initial grouping of waybills in an embodiment of the present application;

[0049] Figure 4 It is a schematic diagram of local optimization after reducing the grouping of waybills in an embodiment of the present application;

[0050] Figure 5 It is a schematic diagram of the structure of a path optimization device in an embodiment of the present application;

[0051] Figure 6 It is a schematic diagram of a hardware composition structure of an electronic device in an embodiment of the present application. Detailed Embodiments

[0052] To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application. Without conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0053] The following briefly introduces the design concept of the embodiments of the present application:

[0054] In the prior art, the heuristic algorithm is a commonly used solution method for the vehicle routing optimization problem. The process is as follows: First, an initial solution is generated through the heuristic algorithm; then, vehicle trips are exchanged and merged based on the initial solution to optimize the overall transportation cost; finally, the heuristic algorithm is used to continuously optimize in the solution space to obtain the final optimization plan. The heuristic algorithm is an algorithm constructed based on intuition or experience, aiming to quickly find a relatively good solution rather than the optimal solution by simplifying the problem or restricting the search space and using rules or experience. The core idea of the heuristic algorithm is to make quick decisions by simplifying the problem or restricting the search space and using rules or experience. Therefore, the prior art has problems such as inflexible optimization rules, being easily trapped in local optima, and deviating from specific business logics and the operating habits of business personnel. Therefore, in this application, by calculating the longitude and latitude distribution density of all the unloading points of the waybills, simulating the manual dispatching method in actual business, fully considering the geographical location distribution of all the unloading points of the waybills including the azimuth angle and distance, and then performing grouped optimization based on this and gradually reducing the grouped iterative optimization, the global optimal solution is finally obtained. In this way, the optimization result better meets the actual business needs, satisfies the operating habits of business personnel, the optimization plan is easier to understand and accept, and the overall optimization process is more flexible, realizing the strategy from local optimization to global optimization, reducing the influence of local optima, reducing unnecessary calculations, improving the algorithm convergence speed, and further improving the quality of the final solution.

[0055] The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present application, and are not used to limit the present application. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0056] As Figure 1 shown, it is the implementation flowchart of a path optimization method provided by an embodiment of the present application. Here, the server is used as the execution entity for introduction. The specific implementation process of this method is as follows:

[0057] S101. Calculate the longitude and latitude distribution density of all waybills according to the geographical locations of all the unloading points of the waybills at the current pick-up point.

[0058] Among them, a waybill refers to the transportation demand for a group of goods / services from the origin A to the destination B within a specified time. It records information such as the origin and destination of the order, the time window, and the order type. The waybill details contain information such as the volume, weight, quantity, and service content of the goods.

[0059] In this embodiment, the geographical locations of all waybill unloading points can be the positions measured in practice or the positions marked on a known map. The longitude and latitude distribution density of all waybills includes, but is not limited to, data sets such as the direction and linear distance of all waybill unloading points relative to the pick-up point. For example, if the geographical location of a waybill unloading point relative to the pick-up point is 36° west of north and the linear distance is 20 kilometers, the similar data sets of all waybills at this pick-up point constitute the longitude and latitude density distribution.

[0060] In some embodiments, the specific implementation of step S101 includes:

[0061] First, a longitude and latitude coordinate system is constructed with the due north direction as the latitude coordinate and the due east direction as the longitude coordinate;

[0062] Then, the longitude and latitude coordinate points of the current pick-up point and the longitude and latitude coordinate points of all waybill unloading points are obtained respectively;

[0063] Finally, according to the longitude and latitude coordinate points of the pick-up point and the longitude and latitude coordinate points of the waybill unloading point, the azimuth angle of the waybill unloading point relative to the pick-up point is calculated.

[0064] In this embodiment, the geographical location distribution of waybills is digitally represented by constructing a longitude and latitude coordinate system, which is convenient for calculating and analyzing the optimal solution. Specifically, a rectangular coordinate system is constructed on a plane. The abscissa is the longitude coordinate, and the positive direction of the abscissa is the due east direction; the ordinate is the latitude coordinate, and the positive direction of the ordinate is the due north direction. Taking the pick-up point as the origin, the azimuth angle degree relative to the due north direction of the unloading point of each waybill is calculated. Then, the coordinates of the pick-up point in the rectangular coordinate system are: P=(x p ,y p ), where x p represents the longitude of the longitude and latitude coordinate of the waybill pick-up point; y p represents the latitude of the longitude and latitude coordinate of the waybill pick-up point. The coordinates of the unloading point of waybill i are: D i =(x i ,y i ), where: x i represents the longitude of the longitude and latitude coordinate of the waybill unloading point; y i represents the latitude of the longitude and latitude coordinate of the waybill unloading point. The direction of the unloading point of waybill i relative to the pick-up point is represented by the azimuth angle θ i , and the specific definition is: the angle rotated clockwise from the due north direction to the target point. The azimuth angle is calculated according to the coordinate points of the pick-up point and the unloading point.

[0065] In some embodiments, the specific implementation of step S101 further includes:

[0066] The azimuth angle is corrected so that the range of the azimuth angle is [0°, 360°]. The azimuth angle refers to the angle from the due north direction rotating clockwise to the target point in the longitude and latitude coordinate system.

[0067] In practice, in order to further define the representation method of the azimuth angle and avoid direction confusion or negative values, it is necessary to correct the azimuth angle so that its angle range is [0°, 360°]. The specific calculation formula of the azimuth angle is as follows:

[0068]

[0069] The azimuth angle range is converted to [0°, 360°] using the following formula:

[0070]

[0071] In this embodiment, by accurately quantifying the direction distribution of the unloading points, a reliable data basis is provided for azimuth angle grouping.

[0072] S102. According to the distribution density, all the waybills are divided into N groups, where N > 1, using a preset grouping rule and the number of groups.

[0073] In practical applications, when the waybills are initially grouped, that is, during initialization grouping, the grouping rule and the number of groups are preset according to the specific business scenario and transportation requirements. The number of groups N is an input of the algorithm, generally determined by business personnel according to the specific business scenario. For example, for XX City, it can be based on the number of administrative regions, with the aim of ensuring that the waybills in the same administrative region are delivered together as much as possible.

[0074] The waybills are grouped according to the distribution density of the waybill longitude and latitude. More specifically, first, the azimuth angles of the waybill unloading points are grouped according to the angle values.

[0075] In some implementation manners, the implementation manner of step S102 includes:

[0076] Calculate the normalized longitude and latitude coordinate points of the waybill unloading point projected onto the unit circle according to the azimuth angle;

[0077] Calculate the relative distance from the waybill unloading point to the pick-up point according to the longitude and latitude coordinate points of the current pick-up point and the longitude and latitude coordinate points of the waybill unloading point;

[0078] Perform normalization processing on the relative distance to obtain the normalized distance from the waybill unloading point to the pick-up point;

[0079] According to the normalized longitude and latitude coordinate points and the normalized distance, use the clustering analysis algorithm to cluster the unloading points into N groups.

[0080] In practice, a clustering algorithm is used to group all waybills at the same unloading point into N groups. Specifically, the azimuth angle is normalized by normalizing it to the unit circle. The formula for projecting the angular information of the azimuth angle onto the unit circle is:

[0081] x′ i = cosθ i ,y′ i = sinθ i , (3)

[0082] where x′ i represents the longitude of the longitude and latitude coordinates of the normalized projection of the unloading point of waybill i onto the unit circle; y′ i represents the latitude of the longitude and latitude coordinates of the normalized projection of the unloading point of waybill i onto the unit circle. At this time, each unloading point D i is represented by a point D′ on the unit circle i =(x′ i ,y′ i )=(cosθ i ,sinθ i ) representing its azimuth angle.

[0083] Furthermore, calculate the normalized distance of the waybill unloading point from the pick-up point to eliminate the original information about the distance of the unloading point. The key lies in the clustering of the azimuth angle. First, calculate the actual relative distance r i of the waybill unloading point relative to the pick-up point:

[0084]

[0085] Then, calculate the normalized distance r′ i of the waybill unloading point relative to the pick-up point based on the relative distance:

[0086]

[0087] Finally, based on the obtained point D′ i =(x′ i ,y′ i ) of the normalized unit circle and the normalized distance r′ i , use the K-Means algorithm for clustering. Cluster the unloading points radiating by angle into N groups.

[0088] In this embodiment, by normalizing the distance between the waybill unloading point and the pick-up point, the influence of distance on clustering is eliminated, focusing on the azimuth angle characteristics, and ensuring that the grouping logic meets the requirements of radial transportation.

[0089] As shown in the appendix Figure 2As shown in the figure, it is a schematic diagram of the initial grouping process for all waybills in the embodiment of the present application. Taking the grouping quantity N = 5 as an example, the line segments of different colors in the attached drawing represent all waybills. The common endpoint P of these line segments is the origin of the rectangular coordinate system. All waybills are divided into five groups according to the azimuth angle of each unloading point. The direction indicated by the large red arrow in the attached drawing is the position of azimuth angle separation, and 4 separation points divide all waybills into 5 groups.

[0090] S103. Respectively perform local optimization on the waybills within each group by merging and exchanging the waybills within the group.

[0091] In this embodiment, within each distribution density group, the waybills are merged and exchanged according to the heuristic algorithm to ensure the rationality of local optimization and reduce the influence of local optimality. This is to further optimize the restricted search space in the heuristic algorithm. According to experience, the longitude and latitude of the orders are partitioned, and optimization is preferentially performed within the partitions.

[0092] In some embodiments, in step S103, the method for merging the waybills within the group includes:

[0093] S1031. Within the current group, move one or more waybills within a vehicle trip to another vehicle trip;

[0094] S1032. Calculate the transportation cost after merging the waybills within this group;

[0095] S1033. If the transportation cost after merging remains unchanged or increases, then replace the waybills to be moved and repeat steps S1031 and S1032. If the transportation cost after merging decreases and meets the transportation constraint conditions, then accept the merge;

[0096] S1034. Move to the next group and repeat steps S1031 to S1033.

[0097] Among them, a vehicle trip specifically refers to: a set of a series of pick-up, delivery, and visit tasks provided by the same carrier, with a specified departure place and destination, and assigned to the same transportation equipment; or can be generalized as a set of task travel arrangements that meet transportation constraints and billing constraints calculated based on the given waybills. That is, after a group of waybills are processed by the vehicle routing problem algorithm, they are assigned to a certain vehicle for transportation under the condition of meeting various constraints.

[0098] In this embodiment, by attempting to merge the waybills within the group, move one or more waybills of a vehicle trip to another vehicle trip, calculate the total cost after merging. If the cost decreases and meets the constraints (such as load, time window, etc.), then accept the merge. The purpose is to minimize the overall cost by merging the waybills, and at the same time, minimize the number of vehicle trips as much as possible to reduce the total transportation cost.

[0099] In some embodiments, in step S103, the method for exchanging waybills within a group includes:

[0100] S1131. Within the current group, exchange one or more waybills within a certain train trip with one or more waybills within another train trip;

[0101] S1132 Calculate the transportation cost after the waybill exchange within the group;

[0102] S1133. If the transportation cost after the exchange remains unchanged or increases, then replace the exchanged waybills and repeat steps S1131 and S1132. If the transportation cost after the exchange decreases, then accept the exchange;

[0103] S1134. Move to the next group and repeat steps S1131 to S1133.

[0104] In this embodiment, by attempting to exchange waybills within the group, one or more waybills of one train trip are exchanged with one or more waybills of another train trip, and the total cost after the exchange is calculated. If the cost decreases and meets the constraints (such as load, time window, etc.), then the exchange is accepted. The purpose is to minimize the overall cost by exchanging waybills.

[0105] Merging and exchanging are common methods of heuristic algorithms. The ultimate goal of this embodiment is to limit the merging and exchanging within the group to improve efficiency and effectiveness.

[0106] As shown in the appendix Figure 3 This is a schematic diagram of the local optimization result after merging and exchanging the initial grouping of waybills in the embodiment of the present application. For all waybills at the same pick-up point P, the results obtained after grouping and local optimization within the group are shown by the 5 curves in the attached figure. In practice, when merging and exchanging waybills within the group, to improve the operation efficiency, the calculation program of the path optimization device can be set to perform multi-threaded parallel calculation according to the number of groups.

[0107] This embodiment combines geographical density and azimuth angle features for dynamic grouping optimization, avoiding the problem of far and near separation caused by traditional clustering, and improving the rationality and business fit of path planning.

[0108] S104. Re-group all the waybills after local optimization, and gradually reduce the number of groups. Repeat step S103 for the updated waybill grouping until N = 0 and stop repeating. At the same time, output the optimization result when N = 1 as the global optimization solution.

[0109] As shown in the appendix Figure 4 This is a schematic diagram of the process of merging and exchanging after reducing the number of waybill groups in the embodiment of the present application. Specifically, after reducing the waybill grouping from 5 groups to 4 groups, the effect after re-performing in-group merging and exchange calculation for local optimization is shown.

[0110] In this embodiment, by gradually reducing the number of groups, the results of the previous optimization are considered for the in-group optimization at each layer, the scope of progressive expansion optimization is carried out, the mutation risk of path planning is reduced, and the stability of the solution is improved.

[0111] In some embodiments, in step S104, the re-grouping of all waybills after local optimization and gradually reducing the number of groups includes:

[0112] Iteratively group the waybills after local optimization using a linear decreasing strategy;

[0113] At least one group is reduced in each iteration.

[0114] In this embodiment, by gradually reducing the number of groups one by one, the waybills after in-group local optimization are iteratively optimized. When all waybills are grouped into one group, global merging and swapping are performed to generate the final optimized solution, ensuring the optimal overall path planning.

[0115] Based on the same inventive concept, an embodiment of the present application also provides a path optimization device. As Figure 5 shown, it is a schematic structural diagram of the path optimization device 500, which may include:

[0116] A calculation module 501, configured to calculate the longitude and latitude distribution density of all waybills according to the geographical locations of the unloading points of all waybills at the current pick-up point;

[0117] A grouping module 502, configured to divide all the waybills into N groups according to the distribution density using a preset grouping rule and the number of groups, where N>1;

[0118] A local optimization module 503, configured to perform local optimization on the waybills within each group by merging and swapping the waybills within the group;

[0119] A dynamic optimization module 504, configured to re-group all the waybills after local optimization and gradually reduce the number of groups, repeat step S103 for the updated waybill groups until N = 0 and stop repeating, and output the optimization result when N = 1 as the global optimization solution.

[0120] The path optimization device provided by the embodiment of the present application calculates the longitude and latitude distribution density of waybills through a calculation module according to the geographical locations of the unloading points of all waybills, then initially groups the waybills according to the longitude and latitude distribution density of the waybills through a grouping module, and then obtains local optimization solutions by performing intra-group optimization on each waybill group through a local optimization module. Finally, the dynamic optimization module gradually reduces the number of waybill groups and iterates the local optimization steps. When all waybills are grouped into one group, global merging and swapping are performed to generate the final optimization solution, ensuring that the overall path planning is optimal. In this way, the obtained optimized result has a path planning that is more in line with the radial transportation logic, reduces transportation costs, improves calculation efficiency, reduces the risk of local optimality, and at the same time ensures that the optimized result conforms to the operation habits of business personnel, and the interpretability is significantly enhanced.

[0121] In some possible implementation manners, the path optimization device according to the present application may at least include a processor and a memory. Among them, the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to execute the steps in the path optimization method according to various exemplary implementation manners of the present application described in this specification. For example, the processor may execute the steps as Figure 1 shown.

[0122] At least one processor 601, and a memory 602 connected to at least one processor 601. In the embodiment of the present application, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 In is taken as an example that the processor 601 and the memory 602 are connected through a bus 600. The bus 600 may be divided into an address bus, a data bus, a control bus, etc. Alternatively, the processor 601 may also be referred to as a controller, and there is no limitation on the name.

[0123] In the embodiment of the present application, the memory 602 stores instructions executable by at least one processor 601. By executing the instructions stored in the memory 602, at least one processor 601 may execute the path optimization method discussed above. The processor 601 may implement Figure 5 the functions of each module in the device shown.

[0124] Among them, the processor 601 is the control center of the device, and can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory 602 and calling the data stored in the memory 602, various functions of the device and process data, so as to monitor the device as a whole.

[0125] In a possible design, the processor 601 may include one or more processing units. The processor 601 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 601 either. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.

[0126] The processor 601 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method for implementing the test framework based on large-data volume calculation disclosed in combination with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0127] As a non-volatile computer-readable storage medium, the memory 602 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 602 may include at least one type of storage medium. For example, it may include flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 602 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0128] By programming the design of the processor 601, the code corresponding to the path optimization method introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute when running Figure 1The steps of the path optimization method in the illustrated embodiment. How to design and program the processor 601 is a well-known technique to those skilled in the art and will not be elaborated here.

[0129] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions that, when run on a computer, cause the computer to execute the test framework implementation method based on large data volume calculations described above.

[0130] In some possible implementation manners, various aspects of the path optimization method provided by the present application can also be implemented in the form of a program product, which includes program code that, when the program product runs on a device, is used to cause the control device to execute the steps in the path optimization method according to various exemplary embodiments of the present application described above in this specification.

[0131] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0132] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0133] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the steps specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps for the functions specified in one block or a plurality of blocks.

[0135] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A path optimization method, characterized in that: include: S101. Calculate the latitude and longitude distribution density of all waybills based on the geographical location of all waybill unloading points at the current pickup point; S102. Divide all the waybills into N groups according to the distribution density using a preset grouping rule and grouping quantity, where N>1; S103. Merge and exchange the waybills in each group for local optimization; S104. Regroup all waybills after local optimization and gradually reduce the number of groups. Repeat step S103 for the updated waybill groups until N=0, and output the optimization result when N=1 as the global optimization solution.

2. The method according to claim 1, characterized in that: The latitude and longitude distribution density of all waybills is calculated based on the geographical location of all waybill unloading points at the current pickup point, including: Take the due north direction as the latitude coordinate and the due east direction as the longitude coordinate to construct a longitude and latitude coordinate system; Get the longitude and latitude coordinates of the current pickup point and all waybill unloading points respectively; Based on the longitude and latitude coordinates of the pickup point and the latitude and longitude coordinates of the waybill unloading point, calculate the azimuth of the waybill unloading point relative to the pickup point.

3. The method according to claim 2, characterized in that: The latitude and longitude distribution density of all waybills is calculated based on the geographical location of all waybill unloading points at the current pickup point, and also includes: The azimuth is corrected so that the range of the azimuth is [0°, 360°]. The azimuth refers to the angle rotated clockwise from the north direction to the target point in the latitude and longitude coordinate system.

4. The method according to claim 2, characterized in that: The method of dividing all the waybills into N groups according to the distribution density by using a preset grouping rule and a preset number of groups includes: Calculate the normalized longitude and latitude coordinates of the waybill unloading point projected onto the unit circle according to the azimuth; Calculate the relative distance from the waybill unloading point to the pickup point based on the latitude and longitude coordinates of the current pickup point and the latitude and longitude coordinates of the waybill unloading point; Normalizing the relative distance to obtain a normalized distance from the waybill unloading point to the pickup point; According to the normalized longitude and latitude coordinate points and the normalized distances, a cluster analysis algorithm is used to cluster the unloading points into N groups.

5. The method according to claim 1, characterized in that: The locally optimizing the merging and exchanging of waybills in each group includes: S1031. In the current group, move one or more waybills in one train to another train; S1032 calculates the combined transportation cost in the group waybill; S1033. If the combined transportation cost remains unchanged or increases, then replace the moved waybill and repeat steps S1031 and S1032. If the combined transportation cost decreases and meets the transportation constraints, then accept the merger; S1034. Enter the next group and repeat steps S1031 to S1033.

6. The method according to claim 1, characterized in that: The locally optimizing the merging and exchanging of the waybills in each group separately also includes: S1131. In the current group, one or more waybills in one train are exchanged with one or more waybills in another train; S1132 calculates the transportation cost after the waybill exchange in the group; S1133. If the transportation cost after the exchange remains unchanged or increases, then replace the exchanged waybill and repeat steps S1131 and S1132. If the transportation cost after the exchange decreases, then accept the exchange; S1134. Enter the next group and repeat steps S1131 to S1133.

7. The method according to claim 1, characterized in that: All waybills after local optimization will be regrouped and the number of groups will be gradually reduced, including: A linear decreasing strategy is used to iteratively group the locally optimized waybills; Each iteration reduces at least one group.

8. A path optimization device, characterized in that: include: A calculation module is used to calculate the longitude and latitude distribution density of all waybills based on the geographical location of all waybill unloading points at the current pickup point; A grouping module, used to divide all the waybills into N groups according to the distribution density using a preset grouping rule and grouping quantity, where N>1; The local optimization module is used to locally optimize the merging and exchange of waybills within each group; The dynamic optimization module is used to regroup all waybills after local optimization and gradually reduce the number of groups, repeat step S103 for the updated waybill groups until N=0, and output the optimization result when N=1 as the global optimization solution.

9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the methods in claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods described in claims 1 to 7.