Route planning method, device, computer equipment and storage medium
High-frequency demand points are extracted from transportation order data through the Apriori algorithm and route planning is carried out based on these points, which solves the problem of low transportation efficiency in the existing technology of small and medium-sized batch multi-point distribution route planning, and realizes more efficient transportation route planning.
Patent Information
- Application Number
- CN202010305627.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-04-17
AI Technical Summary
In the small batch multi-point distribution scenario, the existing route planning method is less efficient by connecting the administrative regions to the delivery routes obtained by connecting the administrative regions.
By acquiring transportation order data, the Apriori algorithm extracts the high-frequency demand point set from the order data set, and performs fixed route planning based on these high-frequency demand points to obtain fixed high-frequency routes.
Compared with fixed route planning based on administrative regions, route planning through high-frequency demand points can better fit existing transportation orders and significantly improve transportation efficiency.
Smart Images

Figure CN113537863B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a route planning method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer and artificial intelligence technology, route planning technology has emerged. Route planning is one of the main research contents of motion planning. Motion planning consists of route planning and trajectory planning. The sequence of points or curves connecting the starting point and the end point is called a route, and the strategy that constitutes the route is called route planning. In the transportation scenario of small batch multi-point distribution, transportation cost, driving distance, and delivery time are the core indicators. Therefore, it is necessary to scientifically plan the distribution points connected in series on each route in this transportation scenario.
[0003] In the current small-batch multi-point delivery route distribution scenario, the commonly used route planning method is mainly based on fixed administrative area route arrangement, and the delivery route is obtained by connecting the administrative areas in series.
[0004] However, in actual application, the transportation efficiency of this distribution route obtained by connecting administrative areas in series is low. Summary of the invention
[0005] Based on this, it is necessary to provide a route planning method, device, computer equipment and storage medium that can effectively improve transportation efficiency in response to the above technical problems.
[0006] A route planning method, the method comprising:
[0007] Acquire transport order data, wherein the transport order data includes transport date data and target address data;
[0008] Acquire an order data set according to the shipping date data and the target address data;
[0009] Obtain a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm;
[0010] A fixed route is planned according to the set of high-frequency demand points to obtain a fixed high-frequency route.
[0011] In one embodiment, acquiring the order data set according to the shipping date data and the target address data includes:
[0012] Clustering the target address data according to the geographical locations corresponding to the target address data to obtain demand points;
[0013] According to the transportation date data and the demand point, an order data set is obtained.
[0014] In one embodiment, obtaining the high-frequency demand point set corresponding to the order data set by using the Apriori algorithm includes:
[0015] Scan the order data set and take the appearing demand points as the initial frequent item set;
[0016] According to a preset support threshold, the initial frequent item set is mined by the Apriori algorithm to obtain a target frequent item set;
[0017] According to the target frequent item set, high-frequency demand points among the demand points are obtained.
[0018] In one embodiment, the performing fixed route planning according to the high-frequency demand point set to obtain the fixed high-frequency route includes:
[0019] Get the route starting address data;
[0020] Constructing a VRP (Vehicle Routing Problem, multi-loop transportation) problem model according to the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set;
[0021] Solve the VRP problem model to obtain a fixed high-frequency route.
[0022] In one embodiment, constructing the VRP problem model according to the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set includes:
[0023] Constructing a transportation distance matrix based on the distance from the route start address data to the target address data corresponding to the demand point;
[0024] Get the route point count constraint and route distance constraint;
[0025] Taking the shortest total distance as the goal, the transportation distance matrix is solved as a calculation model according to the route string point number constraint and the route distance constraint to construct a VRP problem model.
[0026] In one embodiment, after performing fixed route planning according to the high-frequency demand point set and obtaining a fixed high-frequency route, the method further includes:
[0027] Determine demand points that are not passed by the fixed high-frequency route;
[0028] A single-point direct route is constructed according to the geographical locations corresponding to the demand points that the fixed high-frequency route does not pass through.
[0029] A route planning device, comprising:
[0030] A data acquisition module, used to acquire transport order data, wherein the transport order data includes transport date data and target address data;
[0031] A set building module, used to obtain an order data set according to the shipping date data and the target address data;
[0032] An association analysis module, used to obtain a set of high-frequency demand points corresponding to the order data set through an Apriori algorithm;
[0033] The route planning module is used to plan a fixed route according to the set of high-frequency demand points to obtain a fixed high-frequency route.
[0034] In one embodiment, the set building module is used to:
[0035] Clustering the target address data according to the geographical locations corresponding to the target address data to obtain demand points;
[0036] According to the transportation date data and the demand point, an order data set is obtained.
[0037] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0038] Acquire transport order data, wherein the transport order data includes transport date data and target address data;
[0039] Acquire an order data set according to the shipping date data and the target address data;
[0040] Obtain a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm;
[0041] A fixed route is planned according to the set of high-frequency demand points to obtain a fixed high-frequency route.
[0042] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0043] Acquire transport order data, wherein the transport order data includes transport date data and target address data;
[0044] Acquire an order data set according to the shipping date data and the target address data;
[0045] Obtain a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm;
[0046] A fixed route is planned according to the set of high-frequency demand points to obtain a fixed high-frequency route.
[0047] The above-mentioned route planning method, device, computer equipment and storage medium obtain transportation order data, which includes transportation date data and target address data; obtain an order data set based on the transportation date data and target address data; obtain a high-frequency demand point set corresponding to the order data set through the Apriori algorithm; and perform fixed route planning based on the high-frequency demand point set to obtain a fixed high-frequency route. The present application determines which transportation locations are high-frequency demand points corresponding to the order through transportation order data, and then plans fixed routes based on the determined high-frequency demand points. Compared with fixed routes based on administrative regions, this is more in line with existing transportation orders and can more effectively improve transportation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A diagram of an application environment of a route planning method in an embodiment;
[0049] Figure 2 A schematic diagram of a route planning method in one embodiment;
[0050] Figure 3 In one embodiment Figure 2 Schematic diagram of the sub-process of step 203;
[0051] Figure 4 In one embodiment Figure 2 Schematic diagram of the sub-process of step 205;
[0052] Figure 5 In one embodiment Figure 2 Schematic diagram of the sub-process of step 207;
[0053] Figure 6 is a structural block diagram of a route planning device in one embodiment;
[0054] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The route planning method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the route planning server 104 through the network. When the user needs to plan a batch of future transportation orders to ensure that the multi-point transportation corresponding to the order can be carried out while ensuring the transportation efficiency, the user can submit the corresponding transportation order data to the route planning server 104 through the terminal 102 to request the route planning server 104 to perform corresponding route planning. The route planning server 104 obtains the transportation order data, and the transportation order data includes the transportation date data and the target address data; according to the transportation date data and the target address data, the order data set is obtained; through the Apriori algorithm, the high-frequency demand point set corresponding to the order data set is obtained; according to the high-frequency demand point set, a fixed route is planned to obtain a fixed high-frequency route. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the route planning server 104 can be implemented with an independent server or a server cluster composed of multiple servers.
[0057] In one embodiment, Figure 2 As shown, a route planning method is provided, which is applied to Figure 1 The route planning server 104 in FIG. 1 is used as an example to illustrate the method, which includes the following steps:
[0058] Step 201, obtaining transport order data, the transport order data including transport date data and target address data.
[0059] The transport order data refers to the data corresponding to the order submitted by the customer to transport the items to be transported from the initial address to the target address. The transport date data refers to the time point corresponding to the transportation of the items, and the target address data corresponds to the target address of the transportation of the items. For example, the transport order may be to transport item A from the initial shipping warehouse to the target address B on X month Y day. In addition, the transport order data may also include information such as the type or quantity of the items to be transported.
[0060] Specifically, when a user receives a large number of transport order data, the route planning of the present application can be used to plan some fixed routes for transport, thereby improving the transport efficiency of the transport order. The user can submit the corresponding order data to the route planning server 104, and the route planning server 104 will perform subsequent route planning. The order data submitted by the user includes the basic data for route planning, such as the transport date data corresponding to the transport and the target address data of the transport.
[0061] Step 203, acquiring an order data set according to the shipping date data and the target address data.
[0062] Among them, the order data set refers to a set of transport orders divided according to the transport date. According to the transport date data and the target address data, obtaining the order data set specifically means that the transport orders under the same transport date are divided into the same set based on the transport date. For example, if there are transport tasks to transport items to three locations A, B and D on 2018 / 1 / 1, the order data set corresponding to 2018 / 1 / 1 is (A, B, D), and if there are transport tasks to transport items to four locations A, B, D and F on 2018 / 1 / 2, the order data set corresponding to 2018 / 1 / 2 is (A, B, D, F).
[0063] Specifically, after receiving the order data, the route planning server 104 will construct a corresponding order data set based on the shipping date data and the target address data in the order data to abstract the order data and improve the overall efficiency of the route planning process.
[0064] Step 205: Obtain a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm.
[0065] Among them, the Apriori algorithm is an algorithm based on association rule mining. It uses an iterative method of layer-by-layer search to find the relationship between item sets in the database to form rules, and its process consists of connection and pruning. The concept of item set in this algorithm is a set of items. A set containing K items is a k-item set. The frequency of occurrence of an item set is the number of transactions containing the item set, which is called the frequency of the item set. If an item set meets the minimum support, it is called a frequent item set. Association rules: used to represent the implicit correlation in the data. For example, if goods need to be shipped to location A on a certain date, they often also need to be shipped to location B. In this application, the Apriori algorithm is used to perform corresponding association rule mining on the obtained order data set, and the determined frequent item set is the set of high-frequency demand points corresponding to the transportation order data, where the high-frequency demand points correspond to the target addresses of some transportations.
[0066] Specifically, the route planning server 104 is equipped with an association rule mining model built based on the Apriori algorithm. After obtaining the order data set, the route planning server 104 inputs the order data set into the association rule mining model, mines the association rules in these order data sets through the Apriori algorithm, and obtains the corresponding high-frequency demand point set.
[0067] Step 207, perform fixed route planning based on the high-frequency demand point set to obtain a fixed high-frequency route.
[0068] The fixed high-frequency route refers to a fixed route for transportation operations on the transportation date corresponding to the transportation date data, and the fixed high-frequency route includes multiple different transportation target addresses. Truck drivers can use the fixed high-frequency route as the transportation route to transport the items to be transported corresponding to the transportation order data from the initial address to the target address. Fixed route planning refers to the process of planning and obtaining the required fixed high-frequency route based on the determined high-frequency demand points and the pre-set route string point limit and route distance limit.
[0069] Specifically, after determining the high-frequency demand points, the route planning server 104 can perform corresponding path planning to determine a fixed high-frequency route, and when the corresponding transportation order is completed through the fixed high-frequency route, the transportation efficiency can be effectively improved. Specifically, in one embodiment, a corresponding VRP model can be constructed based on the high-frequency demand points that need to be connected in series, the distance between the high-frequency demand points, the route string point number limit and the route distance limit, and then the VRP model is solved to obtain the corresponding fixed high-frequency route.
[0070] The above-mentioned route planning method obtains transportation order data, which includes transportation date data and target address data; obtains an order data set based on the transportation date data and the target address data; obtains a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm; and performs fixed route planning based on the set of high-frequency demand points to obtain a fixed high-frequency route. The present application determines which transportation locations are high-frequency demand points corresponding to the order through transportation order data, and then plans fixed routes based on the determined high-frequency demand points. Compared with fixed routes based on administrative regions, this is more in line with existing transportation orders and can more effectively improve transportation efficiency.
[0071] In one embodiment, Figure 3 As shown, step 203 includes:
[0072] Step 302: cluster the target address data according to the geographical locations corresponding to the target address data to obtain demand points.
[0073] Step 304, obtaining an order data set according to the transportation date data and the demand point.
[0074] Among them, the geographical location can specifically include the longitude and latitude data corresponding to the target address, and clustering specifically refers to clustering the target address data with similar distances together. Multiple target addresses clustered together correspond to a demand point, and the geographical location corresponding to the demand point is the center point of the cluster, while the target address that cannot be clustered can be regarded as a demand point separately. The order data set is a set constructed based on all demand points within the same shipping date. In one embodiment, the target address data can be clustered by DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm. In another embodiment, the target address data can be clustered by Kmeans (k-means clustering algorithm).
[0075] Specifically, since the target locations of some transportations are close to each other, in order to reduce the amount of calculation in the subsequent calculation process, the target addresses in the transportation order data can be clustered according to the geographical locations corresponding to the target address data, thereby reducing the number of target addresses involved in the calculation process and improving the calculation efficiency of high-frequency demand point calculations and the planning efficiency of fixed high-frequency routes. In this embodiment, by clustering the target address data and obtaining the demand points, the effect of reducing the amount of calculation and improving the efficiency of route planning can be achieved.
[0076] In one embodiment, Figure 4 As shown, step 205 includes:
[0077] Step 401 , scan the order data set and take the appearing demand points as the initial frequent item set.
[0078] Step 403: According to a preset support threshold, the initial frequent item set is mined by the Apriori algorithm to obtain a target frequent item set.
[0079] Step 405: Obtain high-frequency demand points among the demand points according to the target frequent item set.
[0080] Among them, the initial frequent item set refers to a set containing all demand points, which contains all the demand points that appear, including high-frequency demand points and non-high-frequency demand points. Support specifically refers to how likely the association rule is to appear. The preset support threshold is an upper and lower limit of support that a user can specify. In this application, the user can set the minimum support threshold according to the number of routes that need to be planned and the strength of the correlation between the demand points between the routes that need to be guaranteed. For the same transportation order data, the higher the preset support threshold, the fewer high-frequency demand points are obtained, the number of routes will be reduced accordingly, and the stronger the correlation between the demand points between the routes. The lower the preset support threshold, the more high-frequency demand points are obtained, the number of routes will increase, and the correlation between the demand points between the routes is relatively weaker. The target frequent item set is a target set obtained based on the initial frequent item set, and the elements in the set are the high-frequency demand points among the demand points.
[0081] Specifically, the route planning server 104 can scan all order data sets and use the demand points that appear as the initial frequent item set. Then, according to the preset support threshold specified by the user, the initial frequent item set is mined through the Apriori algorithm to obtain the target frequent item set. Finally, according to the target frequent item set, the high-frequency demand points in the demand points are obtained. For example, in a specific embodiment, the route planning method of the present application is specifically used to plan a fixed high-frequency route for the transportation route corresponding to the order data within a 4-day time window, involving target demand points including five regions D1, D2, D3, D4, and D5. On the first day, the goods need to be transported to the three demand points D1, D3, and D4. On the second day, the goods need to be transported to the three demand points D2, D3, and D5. On the third day, the goods need to be transported to the four demand points D1, D2, D3, and D5. On the fourth day, the goods need to be transported to the two demand points D2 and D5. The preset minimum support threshold is 50%. There are four order data sets, namely {D1, D3, D4, D5}, {D2, D3, D5}, {D1, D2, D3, D5} and {D2, D5}. The corresponding initial frequent item sets are {D1, D2, D3, D4, D5}. Two of the four order data sets contain data D1, and the support of D1 is 50%. Three of the four order data sets contain data D2, and the support is 75%. The support of D3 is 75%. The support of D4 is 25%. The support of D5 is 75%. The support of D4 is lower than the preset minimum support threshold of 50%. The corresponding demand point D4 is pruned. The frequent item set corresponding to the initial frequent item set is {D1, D2, D3, D5}, and then the candidate frequent binaries are generated by linking the elements in the frequent item set, including {D1, D2}, {D1, D3}, {D1, D5}, {D2, D3}, {D2, D5}, {D3, D5}. Then their support is obtained, which is 25%, 50%, 25%, 50%, 75%, and 50% respectively. Among them, {D1, D2} and {D1, D5} have a support of less than 50% and are pruned. The real frequent two-item set is {D1, D3}, {D2, D3}, {D2, D5}, {D3, D5}. Then the corresponding candidate frequent three-item set is generated by linking, specifically {D1, D2, D3}, {D1, D3, D5} and {D2, D3, D5}. The corresponding support is 25%, 25% and 50% respectively. At this time, the frequent three-item set obtained is only one group {D2, D3, D5}. When the number of frequent item sets is 0 or 1, the mining ends, and the frequent item set finally obtained is the target frequent item set. The target frequent item set, that is, the demand points D2, D3 and D5 in the frequent three-item set, are the high-frequency demand points mined by the Apriori algorithm.In this embodiment, the Apriori algorithm is used to determine high-frequency demand points among the demand points, and then corresponding fixed high-frequency routes can be constructed based on the high-frequency demand points to improve the efficiency of route planning.
[0082] like Figure 5 As shown, step 207 specifically includes:
[0083] Step 502, obtaining route starting address data.
[0084] Step 504: construct a VRP problem model based on the route start address data and the target address data corresponding to the demand points in the high-frequency demand point set.
[0085] Step 506, solving the VRP problem model to obtain a fixed high-frequency route.
[0086] The route starting address can specifically refer to the shipping starting point corresponding to the transport order. The VRP problem, or multi-loop transport problem, refers to designing appropriate routes for a series of customer demand points so that vehicles can pass through them in an orderly manner, and meet certain constraints, such as cargo demand, shipping volume, delivery time, vehicle load limit, mileage limit, time limit, etc., to achieve certain optimization goals, such as the shortest mileage, the least cost, the shortest time, the smallest fleet size, and high vehicle utilization.
[0087] Specifically, after determining which points are high-frequency demand points, the route planning server 104 adds some constraints in the actual transportation process, and then builds a corresponding VRP problem model based on the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set, and determines the fixed high-frequency route by solving the VRP problem model. For example, in a specific embodiment, the shortest total target distance can be taken as the goal, and the corresponding maximum string point number constraint, single line maximum distance constraint and transportation volume constraint can be added to build the corresponding VRP problem model, and then the fixed high-frequency route is built by solving the VRP problem model. In this embodiment, the VRP problem model is constructed and then solved to obtain a fixed high-frequency route, thereby improving the efficiency of route planning.
[0088] In one embodiment, step 504 includes: constructing a transportation distance matrix based on the distance from the route starting address data to the target address data corresponding to the demand point; obtaining the route string point number constraint and the route distance constraint; taking the shortest total distance as the goal, solving the transportation distance matrix as a calculation model based on the route string point number constraint and the route distance constraint, and constructing a VRP problem model.
[0089] Among them, the route point number constraint refers to how many high-frequency demand points a fixed high-frequency route can pass through, and the route distance constraint refers to the distance from the starting point of a fixed high-frequency route to the last demand point of the route. Since in the actual transportation process, cargo transportation is subject to the constraints of vehicle cargo capacity and vehicle mileage, these constraints can be added to construct the corresponding VRP problem model.
[0090] Specifically, first, the distance from the route starting address data to the target address data corresponding to the demand point can be used to construct the corresponding transportation distance matrix, and then the route string point number constraint and route distance constraint can be obtained. And with the shortest total distance of these high-frequency demand points in series as the goal, the transportation distance matrix is solved as a calculation model by adding the route string point number constraint and the route distance constraint to construct a VRP problem model. Then, the route planning goal, multiple fixed high-frequency routes, can be obtained by solving the VRP problem model. In this embodiment, by adding corresponding route constraints in the VRP problem model, the practicality of the planned fixed high-frequency routes can be effectively improved.
[0091] In one embodiment, step 207 includes:
[0092] Identify demand points that are not served by fixed high-frequency routes.
[0093] Construct a single-point direct route based on the geographical locations of demand points that are not passed by fixed high-frequency routes.
[0094] Among them, a single-point direct route refers to a fixed route that goes directly from the initial address to the target address. Since a fixed high-frequency route can only include high-frequency demand points on the road, and does not pay special attention to non-high-frequency demand points, at this time, a single-point direct route can be constructed to achieve route planning for these non-high-frequency demand points. Then, all transportation orders are completed through the fixed high-frequency route and the constructed single-point direct route.
[0095] Specifically, the demand points involved in the fixed high-frequency routes can be determined first, and then the demand points can be obtained based on clustering, and the demand points can be found and determined which demand points are not passed by the fixed high-frequency routes, and then the transportation management of the demand points not passed by the fixed high-frequency routes can be realized through the single-point direct route. In this embodiment, the path management of the demand points not passed by the fixed high-frequency routes can be realized by constructing a single-point direct route, which can effectively improve the coverage of the path management and improve the efficiency of transportation.
[0096] It should be understood that although Figure 2-5The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0097] In one embodiment, Figure 6 As shown, a route planning device is provided, including: a data acquisition module 601, a set construction module 603, an association analysis module 605 and a route planning module 607, wherein:
[0098] The data acquisition module 601 is used to acquire the transport order data, which includes the transport date data and the target address data.
[0099] The set building module 603 is used to obtain the order data set according to the shipping date data and the target address data.
[0100] The association analysis module 605 is used to obtain a set of high-frequency demand points corresponding to the order data set through the Apriori algorithm.
[0101] The route planning module 607 is used to plan a fixed route according to a set of high-frequency demand points to obtain a fixed high-frequency route.
[0102] In one embodiment, the set building module 603 is specifically used to: cluster the target address data according to the geographical location corresponding to the target address data to obtain the demand points; and obtain the order data set according to the transportation date data and the demand points.
[0103] In one embodiment, the association analysis module 605 is specifically used to: scan the order data set and take the appearing demand points as the initial frequent item set; mine the initial frequent item set through the Apriori algorithm according to the preset support threshold to obtain the target frequent item set; and obtain the high-frequency demand points among the demand points according to the target frequent item set.
[0104] In one embodiment, the route planning module 607 is specifically used to: obtain route starting address data; construct a VRP problem model based on the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set; solve the VRP problem model to obtain a fixed high-frequency route.
[0105] In one embodiment, the route planning module 607 is also used to: construct a transportation distance matrix based on the distance from the route starting address data to the target address data corresponding to the demand point; obtain the route string point number constraint and the route distance constraint; with the shortest total distance as the goal, solve the transportation distance matrix as a calculation model based on the route string point number constraint and the route distance constraint, and construct a VRP problem model.
[0106] In one embodiment, a single-point direct route planning module is also included, which is used to: determine demand points that the fixed high-frequency routes have not passed through; and construct a single-point direct route according to the geographical locations corresponding to the demand points that the fixed high-frequency routes have not passed through.
[0107] For the specific definition of the route planning device, please refer to the definition of the route planning method above, which will not be repeated here. Each module in the above route planning device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0108] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store route planning data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a route planning method is implemented.
[0109] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0110] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0111] Obtaining transportation order data, which includes transportation date data and destination address data;
[0112] Get the order data set based on the shipping date data and the target address data;
[0113] Through the Apriori algorithm, obtain the high-frequency demand point set corresponding to the order data set;
[0114] Fixed route planning is performed based on a set of high-frequency demand points to obtain fixed high-frequency routes.
[0115] In one embodiment, when the processor executes the computer program, the following steps are also implemented: clustering the target address data according to the geographical location corresponding to the target address data to obtain the demand points; and obtaining the order data set according to the transportation date data and the demand points.
[0116] In one embodiment, when the processor executes the computer program, the following steps are also implemented: scanning the order data set, taking the appearing demand points as the initial frequent item set; mining the initial frequent item set through the Apriori algorithm according to a preset support threshold, and obtaining the target frequent item set; and obtaining the high-frequency demand points among the demand points according to the target frequent item set.
[0117] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining route starting address data; constructing a VRP problem model based on the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set; solving the VRP problem model to obtain a fixed high-frequency route.
[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: constructing a transportation distance matrix based on the distance from the route starting address data to the target address data corresponding to the demand point; obtaining the route string point number constraint and the route distance constraint; taking the shortest total distance as the goal, solving the transportation distance matrix as a calculation model based on the route string point number constraint and the route distance constraint, and constructing a VRP problem model.
[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining demand points that the fixed high-frequency routes do not pass through; and constructing a single-point direct route based on the geographical locations corresponding to the demand points that the fixed high-frequency routes do not pass through.
[0120] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0121] Obtaining transportation order data, which includes transportation date data and destination address data;
[0122] Get the order data set based on the shipping date data and the target address data;
[0123] Through the Apriori algorithm, obtain the high-frequency demand point set corresponding to the order data set;
[0124] Fixed route planning is performed based on a set of high-frequency demand points to obtain fixed high-frequency routes.
[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: clustering the target address data according to the geographical location corresponding to the target address data to obtain the demand points; and obtaining the order data set according to the transportation date data and the demand points.
[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: scanning the order data set, taking the appearing demand points as the initial frequent item set; mining the initial frequent item set through the Apriori algorithm according to a preset support threshold, and obtaining the target frequent item set; obtaining the high-frequency demand points among the demand points according to the target frequent item set.
[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining route starting address data; constructing a VRP problem model based on the route starting address data and the target address data corresponding to the demand points in the high-frequency demand point set; solving the VRP problem model to obtain a fixed high-frequency route.
[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: constructing a transportation distance matrix based on the distance from the route starting address data to the target address data corresponding to the demand point; obtaining the route string point number constraint and the route distance constraint; taking the shortest total distance as the goal, solving the transportation distance matrix as a calculation model based on the route string point number constraint and the route distance constraint, and constructing a VRP problem model.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining demand points that the fixed high-frequency routes do not pass through; and constructing a single-point direct route based on the geographical locations corresponding to the demand points that the fixed high-frequency routes do not pass through.
[0130] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0132] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A route planning method, the method comprising: Acquire transport order data, wherein the transport order data includes transport date data and target address data; Clustering the target address data according to the geographical locations corresponding to the target address data to obtain demand points; Acquire an order data set according to the transportation date data and the demand point; Scan the order data set and take the appearing demand points as the initial frequent item set; According to a preset support threshold, the initial frequent item set is mined by the Apriori algorithm to obtain a target frequent item set, wherein the preset support threshold is set based on the number of routes to be planned and the correlation of demand points between routes to be guaranteed; According to the target frequent item set, obtaining high-frequency demand points among the demand points; Plan fixed routes based on a set of high-frequency demand points to obtain fixed high-frequency routes; The fixed route planning is performed according to the high-frequency demand point set to obtain the fixed high-frequency route, which includes: Get the route starting address data; Constructing a transportation distance matrix based on the distance from the route start address data to the target address data corresponding to the high-frequency demand point; Obtaining a route point number constraint and a route distance constraint, wherein the route point number constraint is the number constraint of high-frequency demand points that a fixed high-frequency route passes through, and the route distance constraint is the distance constraint from the starting point of a fixed high-frequency route to the last high-frequency demand point; Taking the shortest total distance as the goal, solving the transportation distance matrix as a calculation model according to the route string point number constraint and the route distance constraint, and constructing a VRP problem model; Solve the VRP problem model to obtain a fixed high-frequency route.
2. The method according to claim 1, characterized in that The geographical location corresponding to the target address data includes longitude and latitude data corresponding to the target address.
3. The method according to claim 1, characterized in that The clustering of the target address data according to the geographical location corresponding to the target address data to obtain the demand point includes: According to the geographical location corresponding to the target address data, the target address data is clustered by using the DBSCAN clustering algorithm to obtain the demand points.
4. The method according to claim 1, characterized in that After the fixed route is planned according to the set of high-frequency demand points and the fixed high-frequency route is obtained, the method further includes: Determine demand points that are not passed by the fixed high-frequency route; A single-point direct route is constructed according to the geographical locations corresponding to the demand points that the fixed high-frequency route does not pass through.
5. A route planning device, characterized in that: The device comprises: A data acquisition module, used to acquire transport order data, wherein the transport order data includes transport date data and target address data; A set building module, used to cluster the target address data according to the geographical location corresponding to the target address data to obtain the demand point; and to obtain the order data set according to the transportation date data and the demand point; The association analysis module is used to scan the order data set and take the appearing demand points as the initial frequent item set; according to a preset support threshold, the initial frequent item set is mined by the Apriori algorithm to obtain a target frequent item set, wherein the preset support threshold is set based on the number of routes to be planned and the correlation of demand points between routes to be guaranteed; according to the target frequent item set, high-frequency demand points among the demand points are obtained; The route planning module is used to plan fixed routes based on a set of high-frequency demand points and obtain fixed high-frequency routes; The route planning module is specifically used to obtain route starting address data; construct a transportation distance matrix based on the distance from the route starting address data to the target address data corresponding to the high-frequency demand point; obtain route string point number constraint and route distance constraint, the route string point number constraint is the number constraint of high-frequency demand points passed by a fixed high-frequency route, and the route distance constraint is the distance constraint from the starting point of a fixed high-frequency route to the last high-frequency demand point; with the shortest total distance as the goal, solve the transportation distance matrix as a calculation model based on the route string point number constraint and the route distance constraint, and construct a VRP problem model; solve the VRP problem model to obtain a fixed high-frequency route.
6. The device according to claim 5, characterized in that The geographical location corresponding to the target address data includes longitude and latitude data corresponding to the target address.
7. The device according to claim 5, characterized in that The route planning module is specifically used to: cluster the target address data according to the geographical location corresponding to the target address data by using the DBSCAN clustering algorithm to obtain the demand points.
8. The device according to claim 5, characterized in that It also includes a single-point direct route planning module, which is used to: determine the demand points that the fixed high-frequency route does not pass through; and construct a single-point direct route according to the geographical locations corresponding to the demand points that the fixed high-frequency route does not pass through.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
A method and apparatus for dividing a logistics region
CN109003028A
Method, system and equipment for optimizing receiving and sending path
CN109697523A
Logistics processing method and device, electronic equipment and storage medium
CN110348679A