A method and apparatus for generating a stream path region, a computer readable storage medium
Patent Information
- Application Number
- CN202210459488.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-04-27
AI Technical Summary
[0003]现有路区调整方案通常为人工将相邻的路区调整至新增一片路区,但是,人工往往无法准确计算最优的调整方案,即在改动路区尽可能少的情况下实现路区的均衡,容易出现调整后的路区单量不均衡
[0065]本发明实施例提供了一种生成物流路区的方法及装置、计算机可读存储介质,上述方法包括基于预设路区信息判断路区的位置,得到路区布局信息;所述预设路区信息包括路区名称、路区编号、路区单量以及路区边界;基于所述路区单量,以及目标路区数量,得到目标单量;其中,所述目标路区数量指生成新路区后的路区个数;基于所述路区布局信息、所述目标单量和所述路区单量,筛选调整方案;对目标方案对应的目标路区进行拆分,得到新路区并生成对应的新路区边界,其中,所述目标方案为所述调整方案中的任意一个方案。
Smart Images

Figure CN117010606B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics management technology, and in particular to a method and apparatus for generating logistics routes, and a computer-readable storage medium. Background Technology
[0002] Currently, logistics stations typically handle delivery or pickup tasks within a fixed area. This area is further subdivided into smaller zones, collectively known as "road zones." Each road zone is staffed with dedicated logistics personnel to complete the delivery tasks within that zone. When new logistics personnel are added to a road zone, a new road zone needs to be designated within the existing station's delivery area. The conventional approach is for operations staff to select the road zone with the heaviest workload, such as the zone with the highest number of delivery orders, and split it into two road zones, or to adjust adjacent road zones to create a new road zone.
[0003] The existing road zone adjustment scheme usually involves manually moving adjacent road zones to a new road zone. However, manual methods often cannot accurately calculate the optimal adjustment scheme, that is, to achieve a balance of road zones with as few changes as possible, which can easily lead to an imbalance in the number of orders in the adjusted road zones. Summary of the Invention
[0004] The present invention aims to provide a method and apparatus for generating logistics routes, as well as a computer-readable storage medium, which can divide new routes based on newly added logistics personnel and achieve a balance of delivery order volume in each route under a station.
[0005] The technical solution of this invention is implemented as follows:
[0006] This invention provides a method for generating logistics route zones, comprising:
[0007] The location of a road zone is determined based on preset road zone information to obtain road zone layout information; the preset road zone information includes road zone name, road zone number, number of road zones, and road zone boundaries;
[0008] Based on the number of orders in the road area and the number of target road areas, the target number of orders is obtained; wherein, the number of target road areas refers to the number of road areas after the new road areas are generated;
[0009] Based on the road area layout information, the target order volume, and the road area order volume, an adjustment plan is selected;
[0010] The target road area corresponding to the target scheme is split to obtain a new road area and generate the corresponding new road area boundary, wherein the target scheme is any one of the adjustment schemes.
[0011] In the above scheme, the step of determining the location of a road area based on preset road area information to obtain road area layout information includes:
[0012] According to a preset distance, the boundary of the road area corresponding to the first road area is moved to obtain the first sub-road area;
[0013] Determine whether the first sub-path area and the second sub-path area overlap, and obtain the corresponding determination result;
[0014] Wherein, the first road zone and the second road zone are either any one of the road zones;
[0015] Based on the judgment result, the road area layout information is obtained.
[0016] In the above scheme, obtaining the road area layout information based on the judgment result includes:
[0017] If the determination result indicates that there is an overlapping portion between the first sub-road area and the second road area, then the road area layout information indicates that the first road area and the second road area are adjacent.
[0018] If the determination result is that there is no overlap between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are not adjacent.
[0019] In the above scheme, the target order volume is obtained based on the number of orders in the road area and the number of target road areas, including:
[0020] The individual traffic counts in the aforementioned road areas are summed to obtain the total individual traffic count.
[0021] The target number of orders is obtained by dividing the total number of orders by the number of target road areas.
[0022] In the above scheme, the step of filtering and adjusting the scheme based on the road area layout information, the target order volume, and the road area order volume includes:
[0023] Based on the road zone layout information, the target number of orders, and the number of orders in the road zone, a corresponding network flow model is constructed; the network flow model represents the scheduling relationship of the number of orders in the road zones between the road zones corresponding to the preset road zone information.
[0024] Based on the network flow model, the corresponding minimum cost maximum flow path is selected as the adjustment scheme; wherein, the minimum cost maximum flow path represents the directed edge between the road areas with the minimum cost and the maximum flow, the cost represents the distance between the road areas, and the flow represents the number of road area units that can be allocated between the road areas.
[0025] In the above scheme, the step of constructing a corresponding network flow model based on the road area layout information, the target number of orders, and the number of orders in the road area includes: comparing the number of orders in the road area corresponding to the target number of orders and a preset tolerance value to determine the corresponding source and sink.
[0026] Based on the road area layout information, the source point and the sink point are connected by the directed edge to construct the network flow model; wherein, the traffic in the road area is scheduled according to the direction of the directed edge, and the direction of the directed edge is from the source point to the sink point.
[0027] In the above scheme, the step of comparing the number of traffic items in the corresponding road area based on the target traffic item and the preset tolerance value to determine the corresponding source and sink points includes:
[0028] The target quantity and the preset tolerance value are summed to determine the summation result;
[0029] If the number of individual nodes in the road area is greater than the summation result, then the road area is the source node;
[0030] If the number of individual traffic items in the corresponding traffic area is less than the summation result, then the traffic area is the sink point.
[0031] In the above scheme, the step of selecting the minimum cost maximum flow path as the adjustment scheme based on the network flow model includes:
[0032] Based on the cost, the flow rate, and the network flow model, the directed edges between the target source and the target sink are filtered to obtain the minimum cost maximum flow path as the adjustment scheme; wherein, the target source is the road area where the number of individual traffic is greater than the target number of individual traffic, and the target sink is the road area where the number of individual traffic is less than the target number of individual traffic.
[0033] In the above scheme, the step of splitting the target road area corresponding to the target scheme to obtain new road areas and generating corresponding new road area boundaries includes:
[0034] According to the target scheme, the number of traffic items in the road area of the target source point is allocated to the target sink point until the number of traffic items in the road area of the target sink point is an integer multiple of the target number of traffic items, thus obtaining the target road area; the integer is an integer greater than or equal to 2;
[0035] The target road area is split to obtain the new road area, and the corresponding boundary of the new road area is generated based on the new road area.
[0036] In the above scheme, the step of allocating the traffic volume of the target source point to the target sink point according to the target scheme, until the traffic volume of the target source point is an integer multiple of the target traffic volume, to obtain the target road area, includes:
[0037] Adjust the initial road zone boundary corresponding to the target sink point until the target sink point overlaps with the target source point, and obtain the corresponding overlapping area;
[0038] Based on the number of road zones corresponding to the overlapping areas, the boundary of the target road zone is determined until the number of road zones corresponding to the boundary of the target road zone is an integer multiple of the target number, thus obtaining the target road zone.
[0039] In the above scheme, adjusting the initial road zone boundary corresponding to the target sink point until the target sink point overlaps with the target source point, and obtaining the corresponding overlapping area, includes:
[0040] Move the common edge between the initial road zone boundary and the target source point until the target source point and the target sink point overlap to obtain the corresponding overlapping area.
[0041] In the above scheme, the step of splitting the target road area to obtain the new road area, and generating the corresponding boundary of the new road area based on the new road area, includes:
[0042] The segmentation location is determined based on the target order volume and the target road area;
[0043] Based on the cutting position, the target road area is split to obtain the new road area, and the corresponding boundary of the new road area is generated according to the new road area.
[0044] This invention provides a device for generating logistics route areas, comprising:
[0045] The judgment unit is used to determine the location of a road area based on preset road area information and obtain road area layout information; the preset road area information includes road area name, road area number, number of road areas, and road area boundary.
[0046] The processing unit is used to obtain the target number of orders based on the number of orders in the road area and the number of target road areas; wherein, the number of target road areas refers to the number of road areas after the new road areas are generated;
[0047] The filtering unit is used to filter adjustment schemes based on the road layout information, the target order volume, and the road order volume.
[0048] The splitting unit is used to select a target scheme from the adjustment scheme, split the target road area corresponding to the target scheme, and obtain a new road area;
[0049] The generation unit is used to generate the corresponding new road zone boundary based on the new road zone.
[0050] In the above scheme, the judgment unit is further configured to move the boundary of the road area corresponding to the first road area according to a preset distance to obtain a first sub-road area; determine whether the first sub-road area overlaps with the second road area and obtain a corresponding judgment result; wherein the first road area and the second road area are both any one of the road areas; and obtain the road area layout information according to the judgment result.
[0051] In the above scheme, the judgment unit is further configured to, if the judgment result is that there is an overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are adjacent; if the judgment result is that there is no overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are not adjacent.
[0052] In the above scheme, the processing unit is further used to accumulate the number of individual traffic items in the road area to obtain a total number of individual traffic items; and to obtain the target number of individual traffic items by dividing the total number of individual traffic items by the number of target road areas.
[0053] In the above scheme, the filtering unit is further configured to construct a corresponding network flow model based on the road area layout information, the target order quantity, and the road area order quantity; the network flow model represents the scheduling relationship of the road area order quantity between the road areas corresponding to the preset road area information; and based on the network flow model, the minimum cost maximum flow path is selected as the adjustment scheme; wherein, the minimum cost maximum flow path represents the directed edge between the road areas with the minimum cost and the maximum flow, the cost represents the distance between the road areas, and the flow represents the road area order quantity that can be allocated between the road areas.
[0054] In the above scheme, the filtering unit is further configured to compare the number of traffic in the corresponding road area according to the target traffic and the preset tolerance value to determine the corresponding source and sink; and to connect the source and sink through the directed edge according to the road area layout information to construct the network flow model; wherein the traffic in the road area is scheduled according to the direction of the directed edge, and the direction of the directed edge is from the source to the sink.
[0055] In the above scheme, the filtering unit is further used to sum the target order quantity and the preset tolerance value to determine the summation result; if the order quantity of the road area corresponding to the road area is greater than the summation result, then the road area is the source point; if the order quantity of the road area corresponding to the road area is less than the summation result, then the road area is the sink point.
[0056] In the above scheme, the filtering unit is further configured to filter the directed edges between the target source and the target sink based on the cost, the flow, and the network flow model, thereby obtaining the minimum cost maximum flow path as the adjustment scheme; wherein, the target source is the road area where the number of road area transactions is greater than the target number of transactions, and the target sink is the road area where the number of road area transactions is less than the target number of transactions.
[0057] In the above scheme, the filtering unit is further configured to allocate the number of road area orders from the target source point to the target sink point according to the target scheme, until the number of road area orders at the target sink point is an integer multiple of the target number of orders, thereby obtaining the target road area; the integer is an integer greater than or equal to 2;
[0058] In the above scheme, the filtering unit is further used to adjust the initial road area boundary corresponding to the target sink point to overlap with the target source point, and obtain the corresponding overlapping area; determine the target road area boundary according to the road area quantity corresponding to the overlapping area, until the road area quantity corresponding to the target road area boundary is an integer multiple of the target quantity, and obtain the target road area.
[0059] In the above scheme, the filtering unit is also used to move the common edge of the initial road area boundary and the target source point to overlap the target source point and the target sink point to obtain the corresponding overlapping area.
[0060] In the above scheme, the splitting unit is further configured to determine the splitting position based on the target order quantity and the target road area; and split the target road area based on the splitting position to obtain the new road area.
[0061] This invention provides a device for generating logistics route areas, comprising:
[0062] Memory, used to store executable data instructions;
[0063] The processor, when executing executable instructions stored in the memory, implements a method for generating logistics routes as described in the embodiments of the present invention.
[0064] This invention provides a computer-readable storage medium storing executable instructions for inducing a processor to execute a method for generating a logistics route area as described in this invention.
[0065] This invention provides a method and apparatus for generating logistics routes, as well as a computer-readable storage medium. The method includes determining the location of a route based on preset route information to obtain route layout information; the preset route information includes route name, route number, route quantity, and route boundary; obtaining a target quantity based on the route quantity and the target number of routes; wherein the target number of routes refers to the number of routes after generating new routes; selecting and adjusting schemes based on the route layout information, the target quantity, and the route quantity; splitting the target routes corresponding to the target schemes to obtain new routes and generating corresponding new route boundaries, wherein the target scheme is any one of the adjustment schemes.
[0066] In this embodiment of the invention, after adjusting the number of traffic items in the target road area to an integer multiple of the average number of traffic items in the road area, the target road area is split to obtain new road areas. This ensures that the number of traffic items in the new road areas is the average number of traffic items in the road areas, thus guaranteeing the balance between road areas when adding new road areas. Attached Figure Description
[0067] Figure 1 An optional flowchart illustrating the method for generating logistics route areas provided in this embodiment of the invention. Figure 1 ;
[0068] Figure 2 A flowchart illustrating an adjacency matrix algorithm provided in an embodiment of the present invention;
[0069] Figure 3 A schematic diagram of a network flow model structure provided in an embodiment of the present invention;
[0070] Figure 4 This is a schematic diagram of the layout of the road area under a station provided in an embodiment of the present invention;
[0071] Figure 5 An optional flowchart illustrating the method for generating logistics route areas provided in this embodiment of the invention. Figure 2 ;
[0072] Figure 6 A schematic diagram of the structure of a device for generating logistics routes provided in an embodiment of the present invention. Figure 1 ;
[0073] Figure 7 A schematic diagram of the structure of a device for generating logistics routes provided in an embodiment of the present invention. Figure 2 . Detailed Implementation
[0074] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0075] Figure 1This is an optional flowchart illustrating the method for generating logistics route areas provided in this embodiment of the invention. Figure 1 ,like Figure 1 As shown, an embodiment of the present invention provides a method for generating logistics routes, comprising:
[0076] S101. Determine the location of the road area based on the preset road area information to obtain the road area layout information; the preset road area information includes the road area name, road area number, number of road areas, and road area boundaries.
[0077] In this embodiment of the invention, the device for generating logistics routes is applicable to logistics scenarios involving express delivery, freight, and less-than-truckload (LTL) shipments where the current route conditions are obtained. This embodiment of the invention does not impose any limitations.
[0078] In this embodiment of the invention, the logistics route area generation device determines the location of each route area in the station based on preset route area information, and obtains route area layout information based on the determined location of the route area.
[0079] In this embodiment of the invention, the preset road area information includes the road area name, road area number, road area order quantity, and road area boundary; wherein, the road area order quantity refers to the average number of orders delivered in the road area each month. When the device generating the logistics road area obtains the express logistics scenario of the current road area situation, the order quantity refers to the number of express orders; the area enclosed by the road area boundary is the road area, the road area boundary is a geometric polygon, and the coordinates of the points on the polygon are latitude and longitude coordinates. For example, if the road area boundary is octagonal, the coordinates of the points on the road area boundary can be [113.1507,22.6839], [113.1415,22.6932], [113.1404,22.7037], [113.1428,22.7039], [113.1565,22.6915], [113.156,22.6908], [113.1507,22.6839].
[0080] In this embodiment of the invention, the preset road area information consists of multiple road area information, each corresponding to a road area. In practical applications, an adjacency matrix algorithm can be used to determine whether road areas are adjacent to each other to obtain road area layout information; wherein, if the boundaries of two road areas have a common edge, then the two road areas are adjacent.
[0081] For example, to determine whether road area A and road area B are adjacent, the edge L1 of road area A corresponding to the boundary 'a' of road area A, which is closer to the side of road area B, is moved a preset distance towards road area B. Then, based on the coordinates of the points corresponding to the road area boundaries, it is determined whether there is an overlapping area between road area A and road area B. If there is an overlapping area between road area A and road area B, then road area A and road area B are adjacent, and edge L1 is the common edge of road area A and road area B. If there is no overlapping area between road area A and road area B, then road area A and road area B are not adjacent.
[0082] For example, when it is necessary to determine whether road area i and road area j are adjacent, a proximity matrix a can also be defined. ij ∈A, for each road zone boundary Polygon i Calculate the Polygon boundary of each road zone. i Polygon, the boundary with other road zones j (j != i) Does a common edge exist? When there is a common edge between the boundaries of road regions i and j, a ij =1, at this time, road area i and road area j are adjacent. When there is no common edge between the road area boundaries corresponding to road area i and road area j, a ij =0, at this time, road area i and road area j are not adjacent.
[0083] In this embodiment of the invention, to ensure the work efficiency of logistics personnel, the scheduling (transfer) of orders within a road zone can only be carried out between two adjacent road zones. Therefore, the order volume within a road zone can be adjusted by expanding or shrinking the range of the road zone boundaries corresponding to two adjacent road zones.
[0084] Figure 2 This is a flowchart illustrating an adjacency matrix algorithm provided in an embodiment of the present invention, as shown below. Figure 2 As shown, for example, when road area A and road area B are adjacent, if it is necessary to allocate the quantity of road area B to road area A, it is necessary to expand the range of road area boundary a corresponding to road area A and reduce the range of road area boundary b corresponding to road area B. At this time, the common edge L1 of road area A and road area B can be moved to the required position to obtain L2, road area B is trimmed along the common edge L2, and the trimmed part is assigned to road area A, thereby allocating the quantity of road area B to road area A.
[0085] It is understandable that the logistics route generation device adjusts the routes based on the route layout information to obtain new routes; and based on the route layout information, the scheduling direction of the route order volume between routes can be obtained. By scheduling the route order volume of the new route and other routes according to the above scheduling direction, the balance of the route order volume can be guaranteed.
[0086] In some embodiments of the present invention, S101 may further include S1011-S1013, as follows:
[0087] S1011. Move the boundary of the first road zone corresponding to the preset distance to obtain the first sub-road zone.
[0088] In some embodiments of the present invention, it is applicable to scenarios where the scope of any one of the road zones is expanded.
[0089] In some embodiments of the present invention, the logistics route generation device moves the edge of the route boundary corresponding to the first route by a preset distance away from the midpoint to obtain a first sub-route; wherein, the first route is any one of the routes, and the first sub-route is the range after the boundary of the first route is moved by a preset distance.
[0090] In some embodiments of the present invention, the boundary of the first road zone may have at least three sides. In practical applications, the logistics road zone generation device can move at least three sides simultaneously by a preset distance. Each of the at least three sides should move in a direction away from the center of the first road zone to expand the range of the first road zone.
[0091] It is understandable that after expanding the scope of the first road zone to obtain the first sub-road zone, the road zones adjacent to the first road zone can be obtained by considering the overlap between the first sub-road zone and other road zones.
[0092] S1012. Determine whether the first sub-road area and the second road area overlap, and obtain the corresponding judgment result; wherein, the first road area and the second road area are both any one of the road areas.
[0093] In some embodiments of the present invention, it is applicable to scenarios where it is necessary to determine whether a first sub-road area overlaps with other road areas.
[0094] In some embodiments of the present invention, the logistics route area generation device determines whether the first sub-route area and the second route area overlap and obtains the corresponding determination result; wherein, the second route area is any one of the route areas.
[0095] In some embodiments of the present invention, the logistics route generation device can determine whether the first sub-route area and the second route area overlap based on whether the route area boundaries corresponding to the first sub-route area and the second route area intersect, and obtain the corresponding determination result; it can also determine whether the first sub-route area and the second route area overlap based on whether there is an overlapping area between the first sub-route area and the second route area, and obtain the corresponding determination result.
[0096] It is understandable that by observing the overlap between the first sub-road area and other road areas, the road areas adjacent to the first road area can be obtained, thus providing road area layout information, which facilitates the subsequent determination of adjustment plans.
[0097] S1013. Based on the judgment result, the road layout information is obtained.
[0098] In some embodiments of the present invention, it is applicable to scenarios where road layout information is obtained.
[0099] In some embodiments of the present invention, the logistics route area generation device obtains the corresponding route area layout information based on the judgment result obtained in S1012.
[0100] In some embodiments of the present invention, if the determination result is that there is an overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are adjacent.
[0101] In some embodiments of the present invention, if the determination result is that there is no overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are not adjacent.
[0102] Understandably, by using the road zone layout information, the adjacency of all road zones can be obtained. Based on the adjacency of all road zones, the order volume of each road zone can be scheduled to achieve a balance of order volume among the various road zones.
[0103] S102. Based on the number of orders in each road area and the number of target road areas, obtain the target number of orders; where the number of target road areas refers to the number of road areas after the new road areas are generated.
[0104] In this embodiment of the invention, the target number of units in each road zone after the new road is generated is obtained.
[0105] In this embodiment of the invention, the logistics route generation device obtains the target order quantity based on the order quantity of the route and the target route quantity.
[0106] In this embodiment of the invention, before generating a new road zone, it is necessary to determine the target order volume for each road zone after the new road zone is generated. This means calculating the average order volume of each road zone after the new road zone is added, to ensure a balance in order volume among the road zones after the new road zone is generated. Specifically, when calculating the target order volume, the order volume of all road zones at the station can be obtained first, and then divided by the total order volume of all road zones by the target number of road zones after the new road zone is added, thus obtaining the target order volume. For example, when the order volume of road zone i is d... i When the number of road zones under a station is n, the target order volume can be
[0107] In some embodiments of the present invention, S102 may further include S1021-S1022, as follows:
[0108] S1021. Accumulate the number of individual items in the road area to obtain the total number of individual items.
[0109] In some embodiments of the present invention, it is applicable to scenarios where the number of orders in all road zones of a station is obtained.
[0110] In some embodiments of the present invention, the logistics route generation device accumulates the order volume of the route area under the station to obtain the total order volume.
[0111] It is understandable that the target order volume after generating a new road area can be obtained based on the total order volume of the road area under the station. The road area is then divided according to the target order volume to obtain the new road area, which can ensure the balance between road areas.
[0112] S1022. The target number of units is obtained by dividing the total number of units by the number of target road areas.
[0113] In some embodiments of the present invention, it is applicable to scenarios where a target quantity is obtained.
[0114] In some embodiments of the present invention, the logistics route generation device divides the total order value by the target route quantity to obtain the corresponding quotient, which is the target order quantity.
[0115] In some embodiments of the present invention, if there is a remainder when the total number of individual items is divided by the number of target road zones, then when generating a new road zone, a portion of the individual items in one or more road zones with a large number of individual items can be allocated to other adjacent areas. Specifically, when there is only one road zone with a large number of individual items, the number of the portion of individual items is equal to the remainder; when there are multiple road zones with a large number of individual items, the sum of the number of the portion of individual items is equal to the remainder.
[0116] It is understandable that dividing the road area according to the target order volume to obtain new road areas can ensure the balance between road areas.
[0117] S103. Based on road layout information, target order volume, and road order volume, select and adjust the plan.
[0118] In this embodiment of the invention, it is applicable to scenarios where an adjustment plan for adjusting a road area is obtained based on a target order volume.
[0119] In this embodiment of the invention, the logistics route generation device filters and obtains adjustment schemes based on route layout information, target order quantity, and route order quantity, and uses these schemes to adjust the routes to obtain new routes.
[0120] In this embodiment of the invention, before selecting an adjustment plan, the logistics route generation device can first construct a network flow model based on the route layout information, target order volume, and route order volume. Network flow is an important model in algorithmic competitions, consisting of two parts: network and flow. The network is essentially a directed graph, where the edge weights are called capacity. Additionally, it has a source and a sink. Flow, as the name suggests, is like water flow or electric current, possessing their properties. If we imagine the network as a water pipe network, then the flow is the water flowing within it. The flow on each edge cannot exceed its capacity, and for all points except the source and sink (i.e., relay points), the inflow is equal to the outflow. In this embodiment, based on the target order volume and route order volume, it is determined whether the route needs to be expanded to increase the route order volume or reduced to decrease the route order volume. Then, a network flow model can be constructed using directed edges. This model can determine the flow direction of route order volume between routes when adjusting routes to obtain new routes.
[0121] In the embodiment of the present invention, a road area can be represented by two nodes in a network flow model, the two nodes being a source node and a sink node respectively. When the number of orders in a road area is excessive, the aforementioned road area in the network flow model is a source node, and when the number of orders in a road area is too small, the aforementioned road area in the network flow model is a sink node. For example, road area i (0≤i<n) is represented by two nodes, the two nodes being the source node v 2i and the sink node v 2i+1 , the source node v 2i and the sink node v 2i+1 are connected by a directed edge e 2i->2i+1 , wherein the flow upper limit of the aforementioned directed edge e 2i->2i+1 should be infinity INF, the cost is 1 or 0, the flow represents the maximum number of road area orders that the source node v 2i can allocate to the sink node v 2i+1 , and the cost represents the cost required to adjust the number of roadside orders at the source node v 2i to the sink node v 2i+1 . If the number of road area orders at the source node v 2i is allocated to the sink node v 2i+1 and other road areas need to be passed through, the cost is 1; if the source node v 2i and the sink node v 2i+1 are adjacent, that is, when the number of road area orders at the source node v 2i is allocated to the sink node v 2i+1 and no other road areas need to be passed through, the cost is 0. When the source node v 2i is the target source node v 2n , the flow upper limit of the directed edge e 2n established for the target source node v 2n->2i is d i -m, and the cost is 0; when the sink node v 2i+1 is the target sink node v 2n+1 , the flow upper limit of the directed edge e 2n+1 established for the target sink node v 2i+1->2n+1 is m-d i , and the cost is 0. If two road areas are adjacent, that is, road area i is adjacent to road area j, two directed edges are established for road area i and road area j, wherein the directed edge e 2i+1->2j established from the sink node of road area i to the source node of road area j has a flow upper limit of infinity and a cost of 0; the directed edge e 2j+1->2i established from the source node of road area i to the sink node of road area j has a flow upper limit of infinity and a cost of 0.
[0122] In the embodiment of the present invention, when adding a new road zone, the road zones need to be split to obtain a new road zone. The adjustment scheme is a scheme that takes any one of all road zones as the target road zone, and adjusts the number of orders in the road zones, so that the number of orders in the target road zone is an integer multiple of the target order volume, and the integer is greater than or equal to 2. Exemplarily, taking road zone k (0≤k<n) as the target road zone, when the number of orders d in road zone k k >2*m+ε, it indicates that the number of orders d in road zone k k after splitting is greater than the target order volume m, then it is taken as the source point v 2k , at this time, between the target source point v 2n and the source point v 2k a directed edge e is established 2n->2k , the directed edge e 2n->2k has a flow upper limit of d k -2*m, and a cost of 0. When the number of orders d in road zone k k <2*m-ε, it indicates that the number of orders d in road zone k k after splitting is less than the target order volume m, then it is taken as a sink point, at this time, between the target source point v 2n and the source point v 2k a directed edge e is established 2k+1->2n+1 , the flow upper limit is 2*m-d k , and the cost is 0.
[0123] Figure 3 is a schematic structural diagram of a network flow model provided in an embodiment of the present invention. As shown in Figure 3 , in the embodiment of the present invention, exemplarily, there are 6 road zones under the site, and the 6 road zones are v0, v1, v2, v3, v4, v5, v6 and v7 respectively; wherein, the road zones with excessive number of orders are v0, v2, v4 and v6, that is, the set S is {0, 2, 4, 6}; v0 is adjacent to v3 and v6, v1 is adjacent to v2, v3 is adjacent to v4 and v7, v2 is adjacent to v5, and v6 is adjacent to v4. For v0, v2 and v4, directed edges e1, e3, e5 are established; for adjacent road zones, directed edges e0, e2, e4, e6, e7, e8, e9 are established. The flow upper limits and costs corresponding to the above directed edges e0, e1, e2, e3, e4, e5, e6, e7, e8, e9 are as follows:
[0124] e0: the flow upper limit is d6-m, and the cost is 0;
[0125] e1: the flow upper limit is infinity, and the cost is 1;
[0126] e2: the flow upper limit is infinity, and the cost is 0;
[0127] e3: the flow upper limit is infinity, and the cost is 1;
[0128] e4: Traffic limit is d6-m, cost is 0;
[0129] e5: Unlimited traffic, cost is 1;
[0130] e6: Traffic limit is 2*m-d7, cost is 0;
[0131] e7: Unlimited data usage, zero cost;
[0132] e8: Unlimited traffic limit, zero cost;
[0133] e9: Unlimited traffic limit, zero cost.
[0134] In this embodiment of the invention, the logistics route generation device allocates the order volume of other routes that need to be separated to an enumerated route area, increasing the order volume of the enumerated route area to an integer multiple of the target order volume. Then, the enumerated route area is split to create a new route area. For example, Figure 4 This is a schematic diagram of the layout of a road zone under a station provided in an embodiment of the present invention, as shown below. Figure 4 As shown; there are three road zones under the station, namely Road Zone 0, Road Zone 1 and Road Zone 2. The target order volume is 1000, the order volume of Road Zone 0 and Road Zone 2 is 1500, and the order volume of Road Zone 1 is 1000. When a new road zone needs to be added, Road Zone 1 can be selected as the target road zone. When splitting Road Zone 1 to obtain the new road zone, the 500 order volumes of Road Zone 0 and Road Zone 2 are allocated to Road Zone 1, so that the order volume of Road Zone 1 increases to 2000. Then, Road Zone 1 is divided to obtain Road Zone 1 with 1000 order volumes and the new road zone with 1000 order volumes.
[0135] In this embodiment of the invention, after the logistics route generation device completes the construction of the network flow model, it can select suitable paths from the network flow model as adjustment schemes. These suitable paths can be minimum-cost maximum-flow paths. Minimum-cost maximum-flow paths represent directed edges between routes that minimize cost while maximizing flow; cost represents the distance between routes; and flow represents the number of routes that can be allocated between routes. For example, the target source point v... 2n With the target sink v 2n+1 The distance between the two points is converted into the cost between them. The source and destination points v are obtained by running the Shortest Path Faster Algorithm (SPFA). 2n With the target sink v 2n+1 The shortest path between the source and destination points, while ensuring the target source point v 2n The maximum flow to each road zone is obtained from the destination source point v. 2n With the target sink v 2n+1The minimum-cost augmenting path is found between the two points, and augmentation is performed using this path until no other augmenting path can be found. This augmenting path is the minimum-cost maximum flow path. Each minimum-cost maximum flow path has a starting road area A, an ending road area B, and a flow f; f represents the number of units transferred from the starting road area A to the ending road area B.
[0136] In this embodiment of the invention, there can be one or more adjustment schemes. When there is only one adjustment scheme, it is the target scheme. The logistics route area generation device can be configured to store a candidate set of adjustment schemes. When the logistics route area generation device filters adjustment schemes, it obtains an adjustment scheme and saves it to the candidate set of adjustment schemes.
[0137] Understandably, based on the network flow model, the adjustment schemes corresponding to splitting different road zones into new road zones are obtained, allowing users to select the corresponding adjustment schemes and split the corresponding road zones according to their actual needs. This improves the applicability of the above-mentioned logistics road zone generation device and expands its scope of use.
[0138] In some embodiments of the present invention, S103 may further include S1031-S1032, as follows:
[0139] S1031. Based on the road area layout information, target order volume, and road area order volume, construct the corresponding network flow model; the network flow model represents the scheduling relationship of road area order volume between road areas corresponding to the preset road area information.
[0140] In some embodiments of the present invention, it is applicable to scenarios of constructing network flow models.
[0141] In some embodiments of the present invention, the logistics route area generation device obtains the scheduling relationship of the route area order volume between routes based on the route area layout information, the target order volume, and the route area order volume. The route areas are then connected by directed edges according to the above scheduling relationship, thereby completing the construction of the corresponding network flow model.
[0142] Understandably, the network flow model provides a clear understanding of the scheduling relationships between individual road zones, thereby improving the efficiency of adjusting road zones to add new ones.
[0143] In some embodiments of the present invention, S1031 may further include S10311-S10312, as follows:
[0144] S10311. Based on the target single volume and the preset tolerance value, compare the single volume of the corresponding road area to determine the corresponding source and sink points.
[0145] In some embodiments of the present invention, it is applicable to scenarios where the range of a road area needs to be reduced or expanded.
[0146] In some embodiments of the present invention, the logistics zone generation apparatus compares the zone order volume corresponding to the zone with the target order volume and the preset tolerance value, so as to determine whether the above-mentioned zone serves as a source point or a sink point in the network flow model.
[0147] It can be understood that comparing the zone order volume corresponding to the zone with the target order volume and the preset tolerance value to determine the corresponding source point and sink point facilitates the subsequent construction of the network flow model.
[0148] In some embodiments of the present invention, S10311 may further include S103111 to S103113, as follows:
[0149] S103111: Sum the target order volume and the preset tolerance value, and determine the summation result.
[0150] In some embodiments of the present invention, after the target order volume and the preset tolerance value are obtained, the two are summed to obtain the summation result.
[0151] In some embodiments of the present invention, a tolerance value may be set for a zone, that is, when a new zone is divided according to the target order volume, an error may exist between the actual order volume of each zone and the target order volume, and the above-mentioned error should be within the range of the tolerance value, for example: when the total order volume of all zones of a station cannot be exactly divided by the target number of zones, the remainder, that is, the remaining zone order volume, may be split according to the tolerance value and distributed to adjacent zones.
[0152] S103112: If the zone order volume corresponding to the zone is greater than the summation result, the zone is a source point.
[0153] In some embodiments of the present invention, the logistics zone generation apparatus compares the zone order volume corresponding to the zone with the summation result, and the obtained comparison result shows that the zone order volume corresponding to the zone is greater than the summation result, which means that the zone order volume of the above-mentioned zone is excessive, and the zone order volume needs to be distributed to other zones, that is, the above-mentioned zone is taken as a source point when constructing the network flow model.
[0154] For example, if d_i>m+ε, it means that the zone order volume of zone i is excessive, the scope of zone i needs to be reduced, and the zone order volume is distributed to other zones. At this time, the set of zones with excessive zone order volume may be set as S; if d_i<m-ε, it means that the order volume of zone i is too small, the scope of zone i needs to be expanded to accept order volume from other zones. At this time, the set of zones with too small zone order volume may be set as T. d_i is the zone order volume, m is the target order volume, and ε is the tolerance value.
[0155] S103113: If the zone order volume corresponding to the zone is less than the summation result, the zone is a sink point.
[0156] In some embodiments of the present invention, if the number of individual road sections corresponding to a road section is less than the summation result, then the road section is the sink point.
[0157] In some embodiments of the present invention, the logistics route generation device compares the route order volume corresponding to the route with the summation result. If the comparison result is that the route order volume corresponding to the route is less than the summation result, it means that the route order volume of the above route is too small and it needs to receive the order volume of other route divisions. That is, the above route is used as the sink when constructing the network flow model.
[0158] Understandably, comparing the number of individual traffic in a given road area with the sum of the target number of individual traffic and the preset tolerance value helps determine the corresponding source and sink points, facilitating the subsequent construction of the network flow model.
[0159] S10312. Based on the road area layout information, the source and sink are connected by directed edges to construct a network flow model; wherein, the traffic volume of the road area is scheduled according to the direction of the directed edges, and the direction of the directed edges is from the source to the sink.
[0160] In some embodiments of the present invention, it is applicable to scenarios of constructing network flow models.
[0161] In some embodiments of the present invention, the logistics route generation device connects the source and sink points through directed edges based on the route layout information and the scheduling direction of the route order volume to construct a network flow model.
[0162] Understandably, by constructing a network flow model using directed edges, the scheduling relationship of individual traffic between road zones can be understood more clearly.
[0163] S1032. Based on the network flow model, select the minimum cost maximum flow path as the adjustment scheme; where the minimum cost maximum flow path represents the directed edge between road areas with the minimum cost and the maximum flow, the cost represents the distance between road areas, and the flow represents the number of road area units that can be allocated between road areas.
[0164] In some embodiments of the present invention, the application is suitable for scenarios in which an adjustment scheme is obtained.
[0165] In some embodiments of the present invention, the logistics route generation device selects the minimum cost maximum flow path as an adjustment scheme based on the network flow model.
[0166] In some embodiments of the present invention, directed edges between the target source and the target sink are filtered according to cost, flow and network flow model to obtain the minimum cost maximum flow path as an adjustment scheme, wherein the target source is a road area with a road area quantity greater than the target quantity, and the target sink is a road area with a road area quantity less than the target quantity.
[0167] In some embodiments of the present invention, the logistics route generation device filters the directed edges between the target source and the target sink from the network flow model based on cost and flow rate, thereby obtaining the minimum cost maximum flow path as an adjustment scheme.
[0168] Understandably, using the minimum cost maximum flow path as an adjustment scheme improves the efficiency of adjusting road areas and reduces the cost of adjusting road areas.
[0169] S104. The target road area corresponding to the target scheme is split to obtain a new road area and generate the corresponding new road area boundary; wherein, the target scheme is any one of the adjustment schemes.
[0170] In this embodiment of the invention, the scenario is applicable to the selection of a target scheme and the subsequent splitting of the target road area in the target scheme to obtain a new road area.
[0171] In this embodiment of the invention, the logistics route area generation device adjusts the route area according to the target plan to obtain a target route area that meets the preset requirements. Then, the target route area is split to obtain a new route area, and a corresponding new route area boundary is generated based on the new route area.
[0172] In this embodiment of the invention, the target solution can be selected by the user (regional operation manager) from the adjustment scheme obtained in S103. The target solution can be selected based on the actual needs of the site at present, such as the solution with the fewest road areas to adjust or the solution with the most balanced number of orders in the road areas after adjustment.
[0173] In this embodiment of the invention, the logistics route area generation device generates a polygonal buffer that meets preset requirements, calculates the overlapping area of adjacent routes between the polygonal buffer and the route area corresponding to the target destination, and determines the range of adjacent routes that need to be allocated to the route area corresponding to the target destination. The preset requirement is that the number of routes corresponding to the polygonal buffer is twice the target number of routes, and the route area corresponding to the target destination is included within the polygonal buffer. In practical applications, the route area corresponding to the target source point in the target scheme can be one or more. For example, if the route area corresponding to the target destination is route area B, a polygonal buffer containing twice the target number of routes is generated based on the route area boundary b corresponding to route area B. At this time, the polygonal buffer should overlap with the adjacent routes of route area B to obtain an overlapping area C. The intersection of area C and the route area A corresponding to the target source point is calculated to obtain area D. Let the number of routes corresponding to area D be K. In practical applications, K can be obtained by averaging the area or by projecting the number of routes onto area D according to coordinates. Next, the distance d between the edge of the polygonal buffer zone and the road zone boundary b is calculated when K is equal to the flow rate f between road zone A and road zone B. This calculates the expanded area of the polygonal buffer zone based on the road zone boundary b. The distance d can be obtained using a bisection method. After obtaining the distance d, region D can be reduced in road zone A and expanded into road zone B. A larger distance d results in a larger K; a smaller distance d results in a smaller K.
[0174] In this embodiment of the invention, after the road area adjustment is completed, the road area corresponding to the target sink will become a target road area with twice the target order volume. At this time, the target road area is split into new road areas, so that the order volume of the split new road areas is the target order volume, thereby achieving the purpose of adding new road areas. Specifically, when splitting the target road area, a straight line parallel to the short side of the smallest bounding rectangle can be used to determine the cutting position of the target road area through a bisection method. Then, based on the above cutting position, the target road area is divided into two parts and corresponding new road area boundaries are generated.
[0175] Understandably, this ensures that when new road areas are added, the order volume in the adjusted road areas is balanced and the delivery areas are reasonable.
[0176] In some embodiments of the present invention, S104 may further include S1041-S1042, as follows:
[0177] S1041. According to the target plan, the number of road area traffic from the target source point is allocated to the target sink point until the number of road area traffic is an integer multiple of the target traffic, thus obtaining the target road area; the integer is an integer greater than or equal to 2.
[0178] In some embodiments of the present invention, it is applicable to scenarios where the number of individual road sections is adjusted to obtain a target road section.
[0179] In some embodiments of the present invention, the logistics route area generation device divides the route area order volume of the target source point in the target plan into the target destination point until the route area order volume is an integer multiple of the target order volume, such as twice. That is, the route area corresponding to the target source point is reduced, while the route area corresponding to the target destination point is expanded, until the route area order volume corresponding to the expanded route area of the target destination point is twice the target order volume. At this time, the route area after the expansion of the target destination point is the target route area.
[0180] Understandably, this ensures a balanced distribution of orders across newly added road zones.
[0181] In some embodiments of the present invention, S1041 may further include S10411-S10412, as follows:
[0182] S10411. Adjust the initial road zone boundary corresponding to the target sink point until the target sink point overlaps with the target source point, and obtain the corresponding overlapping area.
[0183] In some embodiments of the present invention, it is applicable to scenarios where the boundary range of a new road zone is calculated.
[0184] In some embodiments of the present invention, the logistics route generation device adjusts the initial route boundary corresponding to the target sink point, so that the initial route boundary expands to overlap with the route corresponding to the target source point, and obtains the corresponding overlapping area.
[0185] In some embodiments of the present invention, the common edge between the initial road zone boundary and the target source point is moved to overlap with the target source point and the target sink point to obtain the corresponding overlapping area.
[0186] In some embodiments of the present invention, the logistics route generation device moves the common edge between the initial route boundary and the target source point so that the target source point and the target sink point overlap, and obtains the corresponding overlapping area.
[0187] It is understandable that by adjusting the size of the road area corresponding to the target source point and the target sink point, the scheduling of road area traffic can be achieved, thus ensuring the balance of road area traffic allocation.
[0188] S10412. Determine the target road area boundary based on the road area volume corresponding to the overlapping area until the road area volume corresponding to the target road area boundary is an integer multiple of the target volume, and obtain the target road area.
[0189] In some embodiments of the present invention, it is applicable to scenarios where a target road area is obtained.
[0190] In some embodiments of the present invention, the logistics route generation device determines the target route boundary based on the route order volume corresponding to the overlapping area. When the sum of the route order volume corresponding to the overlapping area and the route order volume corresponding to the target destination is an integer multiple of the target order volume, that is, the route order volume corresponding to the target route boundary is an integer multiple of the target order volume, the target route is obtained. The target route is the range enclosed by the target route boundary.
[0191] Understandably, by adjusting the size or shape of the road zone boundaries, the scheduling of road zone traffic can be achieved, thus expanding the scheduling range of road zone traffic and ensuring a balanced road zone traffic volume for newly added road zones.
[0192] S1042. The target road area is split to obtain a new road area, and the corresponding new road area boundary is generated based on the new road area.
[0193] In some embodiments of the present invention, it is applicable to scenarios where new road zone boundaries are generated.
[0194] In some embodiments of the present invention, a logistics route area generation device is used to divide the route area volume of the target route area equally, thereby splitting the target route area to obtain a new route area, and then generating the corresponding new route area boundary based on the latitude and longitude of each point in the new route area.
[0195] Understandably, the order volume of the new road area obtained in this way is the target order volume, which ensures the balance of order volume in the road areas under the station.
[0196] In some embodiments of the present invention, S1042 may further include S10421-S10422, as follows:
[0197] S10421. Determine the segmentation location based on the target order volume and target road area.
[0198] In some embodiments of the present invention, it is applicable to scenarios where the splitting location of a target road zone is determined.
[0199] In some embodiments of the present invention, the logistics route generation device determines the cutting position on the target route, such that the route order volume of the new route obtained by splitting the target route according to the cutting position is equal to the target order volume.
[0200] Understandably, the order volume of the new road area obtained in this way is the target order volume, which ensures the balance of order volume in the road areas under the station.
[0201] S10422. Based on the segmentation location, the target road area is split to obtain a new road area, and the corresponding new road area boundary is generated according to the new road area.
[0202] In some embodiments of the present invention, it is applicable to scenarios where target road areas are split.
[0203] In some embodiments of the present invention, the logistics route generation device splits the target route into two parts according to the cutting position to obtain a new route, and generates a corresponding new route boundary based on the new route.
[0204] In some embodiments of the present invention, the segmentation location can be obtained using a bisection method. After splitting the target road area into two parts, one part is the new road area, and the other part is the target sink point.
[0205] Understandably, the order volume of the new road area obtained in this way is the target order volume, which ensures the balance of order volume in the road areas under the station.
[0206] Figure 5 This is an optional flowchart illustrating the method for generating logistics route areas provided in this embodiment of the invention. Figure 2 ,like Figure 5 As shown, an embodiment of the present invention provides a method for generating logistics routes, including:
[0207] S201. Obtain road area information (preset road area information).
[0208] In some embodiments of the present invention, road area information refers to detailed information about each road area under a station, and the road area information is stored in the device.
[0209] S202. Based on the road area information, calculate the road area adjacency matrix and obtain the calculation results (road area layout information).
[0210] In some embodiments of the present invention, the logistics route generation device can obtain the positional relationship between routes by calculating the route adjacency matrix, such as whether route 1 and route 2 are adjacent.
[0211] S203. Determine the equilibrium target (target unit quantity).
[0212] In some embodiments of the present invention, the balancing target refers to the number of road zone orders that each road zone should correspond to after the addition of a new road zone.
[0213] S204. Enumerate and split the road regions from the road regions to obtain the target source point and the target sink point.
[0214] In some embodiments of the present invention, the logistics route generation device enumerates and splits the route from the route, that is, it attempts to split each route. If the number of orders in the route after splitting is greater than the balance target, then the route is the target source point; if the number of orders in the route after splitting is less than the balance target, then the route is the target sink point.
[0215] S205. Based on the calculation results and the equilibrium objective, determine the source and sink points, and connect the source and sink points with directed edges to construct a network flow model.
[0216] In some embodiments of the present invention, the directed edges should point from road regions with a single instance count greater than the equilibrium target to road regions with a single instance count less than the equilibrium target. The road regions with a single instance count greater than the equilibrium target are the source nodes, and the road regions with a single instance count less than the equilibrium target are the sink nodes.
[0217] S206. The minimum cost maximum flow path between the target sink and the target source in the network flow model is obtained through the minimum cost maximum flow algorithm as an adjustment scheme.
[0218] In some embodiments of the present invention, the road region serving as the source point may be the target sink point.
[0219] S207. Save the adjustment plan to the candidate plan set, and repeat S204-S206 until all road areas have been enumerated and split.
[0220] S208. Determine the target scheme from the candidate scheme set, adjust the number of road areas according to the target scheme to obtain the target road area, split the target road area and redraw the boundary to obtain the new road area and the boundary of the new road area.
[0221] Understandably, by constructing the road area as a network flow model, an adjustment scheme is obtained based on the network flow model to adjust the number of road area traffic in the target road area to an integer multiple of the equilibrium target. According to any one of the adjustment schemes, the number of road area traffic is adjusted to obtain the target road area. Then, the target road area is split to obtain new road areas. This can make the number of road area traffic in the new road area equal to the average number of road area traffic, ensuring the balance between road areas when adding new road areas. Moreover, different adjustment schemes can be selected according to actual needs to achieve the purpose of adding new road areas, thus expanding the scope of application.
[0222] Figure 6 A schematic diagram of the structure of a device for generating logistics routes provided in an embodiment of the present invention. Figure 1 ,like Figure 6 As shown, this embodiment of the invention provides a logistics route area generation device 5, corresponding to a method for generating logistics routes. The logistics route area generation device 5 includes:
[0223] The judgment unit 51 is used to determine the location of a road area based on preset road area information to obtain road area layout information; the preset road area information includes road area name, road area number, number of road areas, and road area boundary.
[0224] Processing unit 52 is used to obtain target order volume based on the order volume of the road area and the number of target road areas; wherein, the number of target road areas refers to the number of road areas after generating new road areas;
[0225] The filtering unit 53 is used to filter adjustment schemes based on the road layout information, the target order volume, and the road order volume.
[0226] The splitting unit 54 is used to select a target scheme from the adjustment scheme, split the target road area corresponding to the target scheme, and obtain a new road area;
[0227] The generation unit 55 is used to generate the corresponding new road zone boundary based on the new road zone.
[0228] In some embodiments of the present invention, the judgment unit 51 is further configured to move the boundary of the road area corresponding to the first road area according to a preset distance to obtain a first sub-road area; determine whether the first sub-road area overlaps with the second road area and obtain a corresponding judgment result; wherein the first road area and the second road area are both any one of the road areas; and obtain the road area layout information according to the judgment result.
[0229] In some embodiments of the present invention, the judgment unit 51 is further configured to, if the judgment result is that there is an overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are adjacent; if the judgment result is that there is no overlapping part between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are not adjacent.
[0230] In some embodiments of the present invention, the processing unit 52 is further configured to accumulate the number of individual traffic items in the road area to obtain a total number of individual traffic items; and to obtain the target number of individual traffic items by dividing the total number of individual traffic items by the number of target road areas.
[0231] In some embodiments of the present invention, the filtering unit 53 is further configured to construct a corresponding network flow model based on the road area layout information, the target number of orders, and the number of orders in the road area; the network flow model represents the scheduling relationship of the number of orders in the road area between the road areas corresponding to the preset road area information; and the minimum cost maximum flow path is selected as the adjustment scheme based on the network flow model; wherein, the minimum cost maximum flow path represents the directed edge between the road areas with the minimum cost and the maximum flow, the cost represents the distance between the road areas, and the flow represents the number of orders in the road area that can be allocated between the road areas.
[0232] In some embodiments of the present invention, the filtering unit 53 is further configured to compare the traffic volume corresponding to the traffic volume of the traffic volume according to the target traffic volume and the preset tolerance value to determine the corresponding source and sink; and to connect the source and sink through the directed edge according to the traffic volume layout information to construct the network flow model; wherein the traffic volume of the traffic volume is scheduled according to the direction of the directed edge, and the direction of the directed edge is from the source to the sink.
[0233] In some embodiments of the present invention, the filtering unit 53 is further configured to sum the target quantity and the preset tolerance value to determine the summation result; if the quantity of the road area corresponding to the road area is greater than the summation result, then the road area is the source point; if the quantity of the road area corresponding to the road area is less than the summation result, then the road area is the sink point.
[0234] In some embodiments of the present invention, the filtering unit 53 is further configured to filter the directed edges between the target source and the target sink based on the cost, the flow rate and the network flow model, thereby obtaining the minimum cost maximum flow path as the adjustment scheme; wherein the target source is a road area with a road area quantity greater than the target quantity, and the target sink is a road area with a road area quantity less than the target quantity.
[0235] In some embodiments of the present invention, the filtering unit 53 is further configured to allocate the number of road area transactions of the target source point to the target sink point according to the target scheme, until the number of road area transactions of the target sink point is an integer multiple of the target number of transactions, thereby obtaining the target road area; the integer is an integer greater than or equal to 2.
[0236] In some embodiments of the present invention, the filtering unit 53 is further configured to adjust the initial road zone boundary corresponding to the target sink point to overlap with the target source point, and obtain the corresponding overlapping area; determine the target road zone boundary according to the road zone quantity corresponding to the overlapping area, until the road zone quantity corresponding to the target road zone boundary is an integer multiple of the target quantity, and obtain the target road zone.
[0237] In some embodiments of the present invention, the filtering unit 53 is further configured to move the common edge of the initial road area boundary and the target source point to overlap the target source point and the target sink point to obtain a corresponding overlapping area.
[0238] In some embodiments of the present invention, the splitting unit 54 is further configured to determine the splitting position based on the target single quantity and the target road area; and split the target road area based on the splitting position to obtain the new road area.
[0239] Figure 7 A schematic diagram of the structure of a device for generating logistics routes provided in an embodiment of the present invention. Figure 2 ,like Figure 7As shown, this embodiment of the invention provides a logistics route area generation device 6, corresponding to a method for generating logistics routes. The logistics route area generation device 6 includes a processor 61, a memory 62, and a communication bus 64. The memory 62 communicates with the processor 61 through the communication bus 64. The memory 62 stores one or more programs executable by the processor 61. When the one or more programs are executed, the processor 61 executes the logistics route area generation method as described in this embodiment of the invention. Specifically, the logistics route area generation device 6 further includes a communication component 63 for data transmission, wherein the processor 61 has at least one such component.
[0240] In this embodiment of the invention, the various components in the logistics route generation device 6 are coupled together via a bus 64. It is understood that the bus 64 is used to achieve communication and connection between these components. In addition to a data bus, the bus 64 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The general labeled all buses as "via bus 64".
[0241] This invention provides a computer-readable storage medium storing executable instructions for inducing a processor to execute a method for generating a logistics route area as described in this invention.
[0242] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0243] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0244] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0245] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0246] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A method for generating logistics route zones, characterized in that, include: The location of the road area is determined based on the preset road area information, and the road area layout information is obtained; The preset road area information includes the road area name, road area number, number of road area transactions, and road area boundaries; Based on the number of orders in the road area and the number of target road areas, the target number of orders is obtained; wherein, the number of target road areas refers to the number of road areas after the new road areas are generated; Based on the road area layout information, the target order volume, and the road area order volume, an adjustment plan is selected; The target road area corresponding to the target scheme is split to obtain a new road area and generate the corresponding new road area boundary, wherein the target scheme is any one of the adjustment schemes.
2. The method according to claim 1, characterized in that, The process of determining the location of a road zone based on preset road zone information to obtain road zone layout information includes: According to a preset distance, the boundary of the road area corresponding to the first road area is moved to obtain the first sub-road area; Determine whether the first sub-road area and the second road area overlap, and obtain the corresponding determination result; wherein, the first road area and the second road area are both any one of the road areas; Based on the judgment result, the road area layout information is obtained.
3. The method according to claim 2, characterized in that, The step of obtaining the road area layout information based on the judgment result includes: If the determination result indicates that there is an overlapping portion between the first sub-road area and the second road area, then the road area layout information indicates that the first road area and the second road area are adjacent. If the determination result is that there is no overlap between the first sub-road area and the second road area, then the road area layout information is that the first road area and the second road area are not adjacent.
4. The method according to any one of claims 1 to 3, characterized in that, Based on the number of orders in the aforementioned road area and the number of target road areas, the target order volume is obtained, including: The individual traffic counts in the aforementioned road areas are summed to obtain the total individual traffic count. The target number of orders is obtained by dividing the total number of orders by the number of target road areas.
5. The method according to claim 4, characterized in that, The step of selecting and adjusting a plan based on the road layout information, the target order volume, and the order volume in the road area includes: Based on the road zone layout information, the target number of orders, and the number of orders in the road zone, a corresponding network flow model is constructed; the network flow model represents the scheduling relationship of the number of orders in the road zones between the road zones corresponding to the preset road zone information. According to the network flow model, the minimum cost maximum flow path is selected as the adjustment scheme; wherein, the minimum cost maximum flow path represents the directed edge between the road areas with the minimum cost and the maximum flow, the cost represents the distance between the road areas, and the flow represents the number of road area units that can be allocated between the road areas.
6. The method according to claim 5, characterized in that, The step of constructing a corresponding network flow model based on the road area layout information, the target number of orders, and the number of orders in the road area includes: Based on the target number of traffic and the preset tolerance value, the traffic volume of the corresponding road area is compared to determine the corresponding source and sink points. Based on the road area layout information, the source point and the sink point are connected by the directed edge to construct the network flow model; wherein, the traffic in the road area is scheduled according to the direction of the directed edge, and the direction of the directed edge is from the source point to the sink point.
7. The method according to claim 6, characterized in that, The step of comparing the traffic volume of the corresponding road area with the target traffic volume and the preset tolerance value to determine the corresponding source and sink points includes: The target quantity and the preset tolerance value are summed to determine the summation result; If the number of individual nodes in the road area is greater than the summation result, then the road area is the source node; If the number of individual items in the corresponding road area is less than or equal to the summation result, then the road area is the sink point.
8. The method according to any one of claims 5-7, characterized in that, The step of selecting the minimum-cost maximum flow path as the adjustment scheme based on the network flow model includes: Based on the cost, the flow rate, and the network flow model, the directed edges between the target source and the target sink are filtered to obtain the minimum cost maximum flow path as the adjustment scheme; wherein, the target source is the road area where the number of individual traffic is greater than the target number of individual traffic, and the target sink is the road area where the number of individual traffic is less than the target number of individual traffic.
9. The method according to claim 8, characterized in that, The step of splitting the target road area corresponding to the target scheme to obtain new road areas and generating corresponding new road area boundaries includes: According to the target scheme, the number of traffic items in the road area of the target source point is allocated to the target sink point until the number of traffic items in the road area of the target sink point is an integer multiple of the target number of traffic items, thus obtaining the target road area; wherein, the integer is an integer greater than or equal to 2; The target road area is split to obtain the new road area, and the corresponding boundary of the new road area is generated based on the new road area.
10. The method according to claim 9, characterized in that, The step of allocating the traffic volume of the target source point to the target sink point according to the target scheme, until the traffic volume of the target source point is an integer multiple of the target traffic volume, to obtain the target road area, includes: Adjust the initial road zone boundary corresponding to the target sink point until the target sink point overlaps with the target source point, and obtain the corresponding overlapping area; Based on the number of road zones corresponding to the overlapping areas, the boundary of the target road zone is determined until the number of road zones corresponding to the boundary of the target road zone is an integer multiple of the target number, thus obtaining the target road zone.
11. The method according to claim 9, characterized in that, The step of splitting the target road area to obtain the new road area, and generating the corresponding boundary of the new road area based on the new road area, includes: The segmentation location is determined based on the target order volume and the target road area; Based on the cutting position, the target road area is split to obtain the new road area, and the corresponding boundary of the new road area is generated according to the new road area.
12. A device for generating logistics route areas, characterized in that, include: The judgment unit is used to determine the location of the road area based on the preset road area information and obtain the road area layout information; The preset road area information includes the road area name, road area number, number of road area transactions, and road area boundaries; The processing unit is used to obtain the target number of orders based on the number of orders in the road area and the number of target road areas; wherein, the number of target road areas refers to the number of road areas after the new road areas are generated; The filtering unit is used to filter adjustment schemes based on the road layout information, the target order volume, and the road order volume. A splitting unit is used to split the target road area corresponding to the target scheme to obtain a new road area; wherein, the target scheme is any one of the adjustment schemes; The generation unit is used to generate the corresponding new road zone boundary based on the new road zone.
13. A device for generating logistics route areas, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, It stores executable instructions for causing a processor to execute, thereby implementing the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Distribution area division method and device
CN110363414A
Method and device for determining collection and delivery area, electronic equipment and medium
CN112529281A