Method, device, computer equipment and storage medium for generating routing sequence
By filtering and classifying historical routing nodes and generating routing sequences in combination with historical usage frequency, the problem of difficulty in routing planning in the existing technology is solved, and efficient, diverse and high-quality routing sequence generation is achieved.
Patent Information
- Application Number
- CN202011566722.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-12-25
AI Technical Summary
The prior art is difficult to take into account both search scale and search flexibility in routing planning, resulting in inefficiency.
By determining the logistics transportation start and end point of the to-process logistics, the matching target historical routes are selected from multiple historical routes, the routing nodes are classified, the routing nodes whose historical usage frequency is within the preset range, and the routing sequence is generated by arranging and combining.
It achieves a balance between search scale and search flexibility, generates diverse and high-quality routing sequences, reduces search complexity and improves routing quality.
Smart Images

Figure CN114692917B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device and storage medium for generating a routing sequence. Background Art
[0002] With the continuous development of the logistics industry, in order to improve freight transportation efficiency and reduce transportation costs, logistics service providers often need to carry out route planning to obtain paths to guide the efficient transportation of goods.
[0003] In the prior art, when performing route planning, graph search algorithms or empirical rule restriction methods are mainly used. However, the route search scope of the graph search algorithm is too broad. In a complex transportation network, the search scale of the graph search algorithm is too large, which can easily lead to low efficiency. Although the empirical rule restriction method can reduce the search scale through past experience, it also causes the search process to lose flexibility. The above-mentioned route planning methods are difficult to balance the search scale and search flexibility. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device and storage medium for generating a routing sequence in response to the above technical problems.
[0005] A method for generating a routing sequence, the method comprising:
[0006] In response to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and select a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes;
[0007] Classifying multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set;
[0008] Acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively;
[0009] The logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node are arranged and combined to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0010] Optionally, the step of selecting a target historical route that matches the logistics transportation starting point and the logistics transportation end point from the plurality of historical routes includes:
[0011] Obtaining a starting point routing node corresponding to the logistics transportation starting point and a terminal routing node corresponding to the logistics transportation terminal;
[0012] According to the start nodes and end nodes corresponding to the plurality of historical routes, the historical routes whose start nodes are the same as the start route node and whose end nodes are the same as the end route node are screened out as the target historical routes.
[0013] Optionally, the classifying a plurality of routing nodes in the target historical route to obtain a front-end node set and a back-end node set includes:
[0014] Determine whether the logistics transportation starting point and the logistics transportation end point are in the same preset area;
[0015] When the logistics transportation starting point and the logistics destination are in the same preset area, obtaining the historical usage frequency corresponding to each routing node in the target historical route, and obtaining a first number of routing nodes with the highest historical usage frequency from the multiple routing nodes;
[0016] The first number of routing nodes are divided into a front-end node set and a back-end node set.
[0017] Optionally, the classifying the multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set further includes:
[0018] When the logistics transportation starting point and the logistics destination are not in the same preset area, determining a second number of front-end routing nodes in the same preset area as the logistics transportation starting point from the multiple routing nodes of the target historical route to obtain a front-end node set;
[0019] A third number of routing nodes are obtained from routing nodes other than the front-end routing nodes in the target historical route to obtain a back-end node set.
[0020] Optionally, acquiring at least one target front-end routing node and at least one target back-end routing node having a historical usage frequency within a preset range from the front-end node set and the back-end node set, respectively, comprises:
[0021] Sort the routing nodes in the front-end node set according to the historical usage frequencies corresponding to the respective routing nodes in the front-end node set, and determine at least one routing node at the top of the sort as the target front-end routing node;
[0022] as well as,
[0023] The routing nodes in the backend node set are sorted according to the historical usage frequencies corresponding to the respective routing nodes in the backend node set, and at least one routing node at the top of the sorting is determined as the target backend routing node.
[0024] Optionally, the arranging and combining the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node to generate a routing sequence includes:
[0025] Acquire multiple preset routing sequence templates; the multiple routing sequence templates correspond to different numbers and / or types of routing nodes;
[0026] According to the fourth number corresponding to the front-end routing nodes and the fifth number corresponding to the back-end routing nodes in each routing sequence template, the fourth number of front-end routing nodes are screened out from the at least one target front-end routing node, and the fifth number of back-end routing nodes are screened out from the at least one target back-end routing node;
[0027] For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences; each routing sequence includes at least the logistics transportation starting point and the logistics transportation end point.
[0028] Optionally, each routing node in the routing sequence template has a corresponding sorting priority, and the priorities of the logistics transportation starting point, the front-end routing node, the back-end routing node and the logistics transportation end point are reduced in sequence;
[0029] For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences, including:
[0030] For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, the fourth number of front-end routing nodes and the fifth number of back-end routing nodes are sorted according to the sorting priority to generate multiple routing sequences.
[0031] A device for generating a routing sequence, the device comprising:
[0032] A historical route screening module is used to respond to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and screen out a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes;
[0033] A routing node set acquisition module, used for classifying multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set;
[0034] A target node acquisition module, used to acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively;
[0035] A routing sequence generation module is used to arrange and combine the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0036] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0037] 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 any of the above methods are implemented.
[0038] The above-mentioned method, device, computer equipment and storage medium for generating a routing sequence determine the logistics transportation starting point and logistics transportation end point of the logistics to be processed, and select the target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes, classify multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set, and respectively obtain at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set, and then the logistics transportation starting point, the logistics transportation end point, at least one target front-end routing node and at least one target back-end routing node can be arranged and combined to generate a routing sequence, thereby achieving a balance between search scale and search flexibility. By using the historical usage frequency as the selection probability of the routing node in the historical route matching the flow direction, a diverse and high-quality routing sequence can be obtained in a suitable search space, and by classifying the routing nodes and determining the front-end routing nodes and the back-end routing nodes, the routing nodes can be initially positioned, the search complexity can be reduced, and unreasonable routing can be avoided, thereby improving the routing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 An application environment diagram of a method for generating a routing sequence in an embodiment;
[0040] Figure 2A schematic diagram of a flow chart of a method for generating a routing sequence in an embodiment;
[0041] Figure 3 A schematic diagram of a flow chart of a routing node sorting and combining step in one embodiment;
[0042] Figure 4 Generate an overall flow diagram for a routing sequence in one embodiment;
[0043] Figure 5 A schematic diagram of classification of a transfer station in an embodiment;
[0044] Figure 6 is a structural block diagram of a routing sequence generating device in one embodiment;
[0045] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] 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.
[0047] The present application provides a method for generating a routing sequence, which can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through the network, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0048] In one embodiment, Figure 2 As shown, a method for generating a routing sequence is provided, and the method is applied to Figure 1 The server in the example is used for explanation. It should be understood that the method can also be used independently in the terminal. Specifically, the method may include the following steps:
[0049] Step 201, in response to a route planning request for logistics to be processed, determine the logistics transportation starting point and logistics transportation end point of the logistics to be processed, and select a target historical route that matches the logistics transportation starting point and logistics transportation end point from multiple historical routes.
[0050] As an example, the logistics to be processed may refer to the process in which items flow from the logistics transportation starting point to the logistics transportation end point. For example, this process may include transportation, storage, loading and unloading, packaging, circulation processing, distribution and other processes; or, the logistics to be processed may also be the items being transported, which are transported from the designated logistics transportation starting point to the logistics transportation end point. The transported items may be individual items or multiple items, such as the goods sent by merchants in an e-commerce mall to each user, or the items transported in large quantities by importers and exporters.
[0051] A route can be a path from a starting point to an end point. For example, a route can be a path that an item takes from a logistics transportation starting point to a logistics transportation end point. Among them, multiple historical routes can include any one or more of the following types of routes: land routes, air routes, and water routes. Land routes can refer to routes for transportation by ground transportation, such as motor vehicles, non-motor vehicles, trains, and high-speed rail transportation; air routes can refer to routes for transportation by air transportation, such as cargo planes, manned aircraft, drones, etc.; water routes can refer to routes for transportation by water transportation, such as routes for transportation by ships. In each historical route, one or more types of transportation methods can be included.
[0052] In actual applications, in order to plan the transportation route of the logistics to be processed, the user can generate a route planning request for the logistics to be processed through the terminal and send it to the server. In response to the received route planning request, the server can determine the logistics transportation starting point and logistics transportation end point corresponding to the logistics to be processed, and filter out the target historical route that matches the logistics transportation starting point and logistics transportation end point from multiple historical routes of the items that have been transported in the past.
[0053] In a specific implementation, the specified logistics transportation starting point and logistics transportation end point can be input through the terminal, and then the route planning request carrying the logistics transportation starting point and logistics transportation end point can be sent to the server. The server can read the information from the request, and the input method of the logistics transportation starting point and the logistics transportation end point can be manual input by the user or input through other devices, such as using a device with an image acquisition function to scan the QR code or barcode information corresponding to the logistics to be processed, or obtaining the logistics transportation starting point and / or logistics transportation end point through OCR recognition technology.
[0054] Step 202: classify multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set.
[0055] As an example, a historical route may include multiple routing nodes, wherein a routing node may be a functional node for collecting, distributing and / or transferring items in a logistics network. In actual applications, a routing node may be a transfer yard, a transfer station, a distribution yard, or a transfer center. A routing node may concentrate, exchange, and transfer items collected from other nodes in the logistics network, thereby realizing the flow of items from dispersion to concentration and then to dispersion in the logistics network.
[0056] In practical applications, after determining the target historical route, multiple routing nodes in the route can be determined, and the multiple routing nodes can be classified to obtain a front-end node set and a back-end node set, wherein the front-end node set can include one or more routing nodes classified as front-end routing nodes (frontHub), and the back-end node set can include one or more routing nodes classified as back-end routing nodes (termHub).
[0057] Step 203: Acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set, respectively.
[0058] After the routing nodes are classified, at least one target front-end routing node with a historical usage frequency within a preset range can be obtained from the front-end node set, and at least one back-end routing node with a historical usage frequency within a preset range can be obtained from the back-end node set.
[0059] Specifically, the preset range may be within a preset sorting range. For example, multiple front-end nodes in the front-end node set may be arranged in descending order according to the historical usage frequency (i.e., the nodes with higher historical usage frequency are arranged first, and the nodes with lower historical usage frequency are arranged last), and one or more front-end routing nodes within the preset sorting range are determined as target front-end routing nodes, such as determining the first m front-end routing nodes as target front-end routing nodes. Alternatively, the preset range may also be a preset frequency range, that is, the front-end routing nodes whose historical usage frequencies belong to the preset frequency range are determined as target routing nodes. The method for determining the target back-end routing node is similar to that of the target front-end routing node, and will not be elaborated in this application. It should be understood that when selecting the target front-end routing node and the target back-end routing node, the historical usage frequency and / or preset range used as the screening basis may be the same or different. For example, the selection of the target front-end routing node adopts the historical usage frequency f 1 The target backend routing node is selected based on the historical usage frequency f 2 .
[0060] Step 204, the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node are arranged and combined to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0061] After obtaining the target front-end routing node and the target back-end routing node, the logistics transportation starting point, the logistics transportation end point, the target front-end routing node and the target back-end routing node can be arranged and combined to generate one or more routing sequences. The routing sequence includes the routes for transporting the logistics to be processed.
[0062] In this embodiment, by determining the logistics transportation starting point and logistics transportation end point of the logistics to be processed, and screening out the target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes, multiple routing nodes in the target historical route are classified to obtain a front-end node set and a back-end node set, and at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range are obtained from the front-end node set and the back-end node set, respectively, and then the logistics transportation starting point, the logistics transportation end point, at least one target front-end routing node and at least one target back-end routing node can be arranged and combined to generate a routing sequence, thereby achieving a balance between search scale and search flexibility. By using the historical usage frequency as the selection probability of the routing node in the historical route matching the flow direction, a diverse and high-quality routing sequence can be obtained in a suitable search space, and by classifying the routing nodes and determining the front-end routing nodes and the back-end routing nodes, the routing nodes can be initially positioned, the search complexity can be reduced, unreasonable routing can be avoided, and the routing quality can be improved.
[0063] In one embodiment, the step of selecting a target historical route that matches the logistics transportation starting point and the logistics transportation end point from a plurality of historical routes may include the following steps:
[0064] Obtain a starting point routing node corresponding to the starting point of the logistics transportation, and a terminal routing node corresponding to the terminal of the logistics transportation; according to the starting nodes and terminal nodes corresponding to each of the multiple historical routes, filter out the historical routes whose starting nodes are the same as the starting point routing node and whose terminal nodes are the same as the terminal routing node as the target historical routes.
[0065] In practical applications, the logistics transportation starting point and the logistics transportation terminal can be a specific address, such as No. 305, Dongfeng Middle Road, Yuexiu District, Guangzhou City, Guangdong Province. When transporting items, the items to be shipped can be collected at the shipping address and transferred to the routing node in the area where the logistics transportation starting point is located for collection and distribution. After being transported through the logistics network, it is finally transported to the routing node corresponding to the area where the logistics transportation terminal is located. The staff picks up the items to be shipped from the routing node and finally transports them to the logistics transportation terminal. Based on this, the starting point routing node (srcHub) corresponding to the logistics transportation starting point can be a routing node in the area where the logistics transportation starting point is located, and the terminal routing node (desHub) corresponding to the logistics transportation terminal can be a routing node in the area where the logistics transportation terminal is located. Or, in another example, the logistics transportation starting point can be the starting point routing node, and the logistics transportation terminal can be the terminal routing node.
[0066] After determining the starting routing node and the end routing node, the starting node and the end routing node corresponding to each of the multiple historical routing nodes can be obtained, wherein the starting node is the routing node as the starting point in the historical routing, and the end routing node is the routing node as the end point in the historical routing. For multiple historical routes, the historical route with the same starting node as the starting routing node and the same end routing node as the end routing node can be determined as the target historical route.
[0067] In this embodiment, by screening out historical routes whose starting node is the same as the starting point routing node and whose end point node is the same as the end point routing node as the target historical route, routes with the same logistics flow direction can be screened out from multiple historical routes as the target historical route, and a suitable search space can be provided for the screening of subsequent routing nodes based on historical experience, thereby effectively reducing the scale of the subsequently generated routing sequence and avoiding the search space being too large or too small.
[0068] In one embodiment, the step of classifying the multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set may include the following steps:
[0069] Determine whether the logistics transportation starting point and the logistics transportation end point are in the same preset area; when the logistics transportation starting point and the logistics end point are in the same preset area, obtain the historical usage frequency corresponding to each routing node in the target historical route, and obtain a first number of routing nodes with the highest historical usage frequency from the multiple routing nodes; divide the first number of routing nodes into a front-end node set and a back-end node set.
[0070] In a specific implementation, the routing nodes in the target historical route can be classified according to the logistics flow characteristics of the logistics to be processed. Specifically, it can be determined whether the logistics transportation starting point and the logistics transportation end point are in the same preset area, wherein the preset area can be determined based on the logistics transportation starting point. In one example, the administrative division to which the logistics transportation starting point belongs can be obtained, such as the province, autonomous region or municipality to which the logistics transportation starting point belongs. Of course, the administrative division can also be a further subdivided area, such as a city, district, etc. By determining whether the logistics transportation starting point and the logistics transportation end point are in the same preset area, it can be determined whether the logistics to be processed is logistics with a same-city flow direction, that is, it operates within the preset area. In another example, the preset area can be a designated area, such as an area with a radius of x kilometers with the logistics transportation starting point as the center.
[0071] When the logistics transportation starting point and the logistics transportation end point are in the same preset area, the historical usage frequency corresponding to each routing node in the target historical route can be determined, and the first number of routing nodes with the highest historical usage frequency can be obtained, and the routing nodes are divided to obtain a front-end node set and a back-end node set. The first number of routing nodes can be two or more routing nodes.
[0072] In practical applications, the target historical route can be one or more routes. When the target historical route is multiple target historical routes, the historical usage frequency corresponding to each routing node in all target historical routes can be obtained, and according to the historical usage frequency, the multiple routing nodes of each target historical route are arranged in descending order, and the first number of routing nodes at the top of the sorting are determined, and the routing nodes are classified to obtain the front-end node set and the back-end node set. When classifying, for the first number of routing nodes, the preset number of routing nodes at the top of the historical usage frequency can be divided into the front-end node set, and the remaining other routing nodes can be divided into the back-end node set. Of course, the division can also be performed randomly, or it can be combined with other classification rules, such as according to the turnover speed, turnover rate, service quality, service fee, number of items that can be processed, and other factors of each routing node.
[0073] In this embodiment, when the logistics transportation starting point and the logistics end point are in the same preset area, by obtaining the first number of routing nodes with the highest historical usage frequency, the first number of routing nodes are divided into a front-end node set and a back-end node set. For the unprocessed logistics in the same city flow direction, the routing nodes can be preliminarily located in advance, providing a basis for subsequently reducing the complexity of routing sequence search; and, when generating the routing sequence, there is no need to perform real-time processing operations on the data, and only query operations can be performed when calling.
[0074] In one embodiment, the step of classifying the plurality of routing nodes in the target historical route to obtain a front-end node set and a back-end node set may further include the following steps:
[0075] When the logistics transportation starting point and the logistics terminal are not in the same preset area, a second number of front-end routing nodes in the same preset area as the logistics transportation starting point are determined from multiple routing nodes of the target historical route to obtain a front-end node set; a third number of back-end routing nodes are obtained from routing nodes other than the front-end routing nodes in the target historical route to obtain a back-end node set.
[0076] When the logistics transportation starting point and the logistics transportation end point are not in the same preset area, it can be determined that the logistics to be processed is not in the same city flow direction, that is, the logistics to be processed needs to pass through different areas. In order to determine the routing nodes within the preset range of the logistics transportation starting point, give the routing nodes a preliminary positioning, and improve the feasibility of the subsequently generated routing sequence, the routing nodes in the same preset area as the logistics transportation starting point can be determined from the multiple routing nodes of the target historical route, that is, the front-end routing nodes, and the second number of front-end routing nodes can be determined as the front-end node set. Specifically, when obtaining the second number of front-end routing nodes, the multiple front-end routing nodes can be sorted in descending order according to the historical usage frequency corresponding to each front-end routing node, and the second number of front-end routing nodes with the highest sorting can be determined as the front-end node set; the second number of front-end routing nodes can be one or more front-end routing nodes.
[0077] For the routing nodes other than the front-end routing nodes in the target historical routing nodes, they can be determined as back-end routing nodes, and a third number of back-end routing nodes can be obtained therefrom as a back-end node set. Specifically, the multiple back-end routing nodes can be sorted in descending order according to the historical usage frequency corresponding to each back-end routing node, and the third number of back-end routing nodes at the top of the sort can be determined as the back-end node set; the third number of back-end routing nodes can be one or more back-end routing nodes.
[0078] In this embodiment, a second number of front-end routing nodes in the same preset area as the starting point of the logistics transportation are determined to obtain a front-end node set, and a third number of back-end routing nodes are obtained from routing nodes other than the front-end routing nodes in the target historical route to obtain a back-end node set. For the unprocessed logistics with non-same-city flows, the routing nodes can be preliminarily located in advance, providing a basis for subsequently reducing the complexity of routing sequence searches. In addition, there is no need to perform real-time data processing operations when generating the routing sequence. After the historical usage frequency is counted and stored, only query operations can be performed when calling.
[0079] In one embodiment, the acquiring, from the front-end node set and the back-end node set respectively, at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range may include the following steps:
[0080] According to the historical usage frequency corresponding to each routing node in the front-end node set, the routing nodes in the front-end node set are sorted, and at least one routing node with the highest sorting is determined as the target front-end routing node; and according to the historical usage frequency corresponding to each routing node in the back-end node set, the routing nodes in the back-end node set are sorted, and at least one routing node with the highest sorting is determined as the target back-end routing node.
[0081] In a specific implementation, the target front-end routing node and the target back-end routing node can be selected from the front-end node set and the back-end node set according to the law of large numbers. Specifically, after obtaining the front-end node set, the routing nodes in the front-end node set can be sorted according to the historical usage frequency corresponding to each routing node, and at least one routing node with the highest sorting can be determined as the target front-end routing node. Through this screening method, high-quality routing nodes can be obtained in combination with the law of large numbers, covering multiple selection factors at one time, avoiding calculations for the transportation capacity, item carrying conditions, service quality, etc. of different routing nodes, and effectively reducing the search complexity.
[0082] Accordingly, for the backend node set, the routing nodes in the backend node set may be sorted according to the historical usage frequency corresponding to each routing node, and at least one routing node at the top of the sort may be determined as the target backend routing node.
[0083] In this embodiment, the target front-end routing node or the target back-end routing node is determined according to the historical usage frequency, and the search for the initially located routing nodes is implemented according to the law of large numbers, which effectively strikes a balance between the search time and the search quality, and the search complexity is only O(1).
[0084] In one embodiment, Figure 3 As shown, the arrangement and combination of the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node to generate a routing sequence may include the following steps:
[0085] Step 301: Acquire multiple preset routing sequence templates.
[0086] In a specific implementation, after determining the target front-end routing node and the target back-end routing node, multiple preset routing sequence models can be obtained, wherein multiple routing sequence templates can correspond to different numbers and / or types of routing nodes. Specifically, the following parameters can be included in the multiple routing sequence templates: the type of routing node and the number of routing nodes of each type.
[0087] Step 302: According to the fourth number of front-end routing nodes corresponding to each routing sequence template and the fifth number of back-end routing nodes corresponding to each routing sequence template, a fourth number of front-end routing nodes are screened out from the at least one target front-end routing node, and a fifth number of back-end routing nodes are screened out from the at least one target back-end routing node.
[0088] After obtaining multiple routing sequence templates, for each routing sequence template, the front-end routing nodes can be screened out from the target front-end routing nodes, and the back-end routing nodes can be screened out from the target back-end routing nodes according to the fourth number corresponding to the front-end routing nodes and the fifth number of the back-end routing nodes in the routing sequence template. The fourth number is less than or equal to the number of the target front-end routing nodes, and the fifth number is less than or equal to the number of the target back-end routing nodes.
[0089] Step 303: for each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences.
[0090] Specifically, since the generated routing sequence is a routing sequence for the logistics to be processed, each routing sequence includes at least a logistics transportation starting point and a logistics transportation end point. In practical applications, for each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the fourth number of front-end routing nodes and the fifth number of back-end routing nodes determined according to the template can be arranged and combined according to the routing sequence template, thereby obtaining multiple routing sequences corresponding to each routing sequence template.
[0091] In this embodiment, for each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences. The arrangement and combination are performed on the basis of preliminary positioning of the routing nodes. It is possible to generate multiple routing sequences according to reasonable routing sequence templates, effectively improving the feasibility and routing quality of the routing sequence, and providing a basis for subsequently improving the routing search efficiency while reasonably reducing the scale of the routing sequence.
[0092] In one embodiment, each routing node in the routing sequence template may have a corresponding sorting priority, wherein the sorting priority may be the priority of the relative position order of each routing node in the routing sequence template. For different types of nodes, the priorities of the logistics transportation starting point, the front-end routing node, the back-end routing node, and the logistics transportation end point are reduced in sequence. For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences, which may include the following steps:
[0093] For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, the fourth number of front-end routing nodes and the fifth number of back-end routing nodes are sorted according to the sorting priority to generate multiple routing sequences.
[0094] In a specific implementation, after determining the sorting priority corresponding to each node, the logistics transportation starting point, logistics transportation end point, front-end routing node and back-end routing node can be sorted according to the priority. Specifically, the logistics transportation starting point is at the front of the sequence. When the fourth number corresponding to the front-end routing node is not zero, the front-end routing node is sorted after the logistics transportation starting point. If the fourth number is two or more, the historical usage frequency of each front-end routing node can be further obtained. The front-end routing node with a higher historical usage frequency has a higher sorting priority than the front-end routing node with a lower historical usage frequency.
[0095] When the fifth number corresponding to the back-end routing node is not zero, if the front-end routing node already exists in the routing sequence, the back-end routing node can be sorted after the front-end routing node. If the fifth number is two or more, the historical usage frequency of each back-end routing node is further obtained. The back-end routing node with a higher historical usage frequency has a higher sorting priority than the back-end routing node with a lower historical usage frequency.
[0096] For example, the following multiple routing sequences can be obtained according to the routing sequence template:
[0097] (1) Logistics transportation starting point (srcHub) > Logistics transportation destination (desHub);
[0098] (2) Logistics transportation starting point (srcHub) > front-end routing node (frontHub) > logistics transportation end point (desHub);
[0099] (3) Logistics transportation starting point (srcHub) > back-end routing node > logistics transportation end point (desHub);
[0100] (4) Logistics transportation starting point (srcHub) > front-end routing node (frontHub) > back-end routing node (termHub) > logistics transportation end point (desHub);
[0101] (5) Logistics transportation starting point (srcHub) > front-end routing node 1 (frontHub_1) > front-end routing node 2 (frontHub_2) > logistics transportation end point (desHub);
[0102] (6) Logistics transportation starting point (srcHub) > front-end routing node (frontHub) > back-end routing node 1 (termHub_1) > back-end routing node 2 (termHub_2) > logistics transportation end point (desHub).
[0103] Among them, the historical usage frequency of the front-end routing node 1 is higher than the historical usage frequency of the front-end routing node 2, and the historical usage frequency of the back-end routing node 1 is higher than the historical usage frequency of the back-end routing node 2.
[0104] In this embodiment, the logistics transportation starting point, logistics transportation end point, front-end routing node and back-end routing node are sorted according to the sorting priority to generate multiple routing sequences, which can obtain multiple reasonable routing combinations, effectively improve the routing quality, and lay the foundation for improving the routing search efficiency in the later stage.
[0105] In order to enable those skilled in the art to better understand the above steps, the embodiment of the present application is illustrated below by using an example, but it should be understood that the embodiment of the present application is not limited to this.
[0106] like Figure 4 As shown, the flow direction of the logistics to be processed input by the user can be obtained, and the historical route (i.e. the target historical route in this application) can be determined based on the flow direction, and the transfer site information corresponding to the historical route can be obtained. Further, it can be determined whether the flow direction of the logistics to be processed is the same city flow direction.
[0107] If not, we can determine whether the transit station passed in the historical route is in the same province or city as the originating transit station (i.e., the starting point routing node corresponding to the logistics transportation starting point in this application), and obtain the front-end transit station set and the back-end transit station set based on the judgment result. Figure 5 As shown, the transfer station in the same province or city as the starting point of the logistics transportation can be used as the front-end routing node, and other routing nodes other than the front-end routing node can be used as the back-end routing node. In the front-end transfer station set and the back-end transfer station set, the candidate front-end transfer station (i.e., the target front-end routing node in this application) and the candidate back-end transfer station (i.e., the target back-end routing node in this application) can be determined based on the historical usage frequency.
[0108] If the flow direction of the logistics to be processed is within the city, since the historical route is the same as the flow direction of the logistics to be processed, the transfer station in the historical route is in the same province and city as the originating transfer station, and it can be used as the front-end transfer station set. However, in order to give different positioning to multiple routing nodes, the m items with the highest historical usage frequency can be selected and divided into candidate front-end transfer stations and candidate back-end transfer stations.
[0109] After obtaining the candidate front-end transfer sites and the candidate back-end transfer sites, multiple groups of routing sequences can be constructed according to the routing sequence template.
[0110] It should be understood that although Figure 1-5 The 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 1-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.
[0111] In one embodiment, Figure 6 As shown, a device for generating a routing sequence is provided, and the device may include:
[0112] The historical route screening module 601 is used to respond to the route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and screen out the target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes;
[0113] A routing node set acquisition module 602 is used to classify multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set;
[0114] The target node acquisition module 603 is used to acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively;
[0115] The routing sequence generation module 604 is used to arrange and combine the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0116] In one embodiment, the historical route screening module 601 includes:
[0117] The starting and ending point acquisition submodule is used to acquire the starting point routing node corresponding to the starting point of the logistics transportation, and the ending point routing node corresponding to the ending point of the logistics transportation;
[0118] The target historical route determination submodule is used to filter out the historical routes whose starting nodes are the same as the starting route node and whose ending nodes are the same as the ending route node according to the starting nodes and ending nodes corresponding to the multiple historical routes, as the target historical routes.
[0119] In one embodiment, the routing node set acquisition module 602 includes:
[0120] A regional relationship determination submodule is used to determine whether the logistics transportation starting point and the logistics transportation end point are in the same preset area;
[0121] A routing node determination submodule, for obtaining the historical usage frequency corresponding to each routing node in the target historical route when the logistics transportation starting point and the logistics destination are in the same preset area, and obtaining a first number of routing nodes with the highest historical usage frequency from the multiple routing nodes;
[0122] The routing node classification submodule is used to divide the first number of routing nodes into a front-end node set and a back-end node set.
[0123] In one embodiment, the routing node set acquisition module 602 further includes:
[0124] A front-end node set acquisition submodule is used to determine a second number of front-end routing nodes in the same preset area as the logistics transportation starting point from a plurality of routing nodes of the target historical route when the logistics transportation starting point and the logistics destination are not in the same preset area, and obtain a front-end node set;
[0125] The back-end node set acquisition submodule is used to acquire a third number of routing nodes from routing nodes other than the front-end routing nodes in the target historical route to obtain a back-end node set.
[0126] In one embodiment, the target node acquisition module 603 includes:
[0127] A target front-end routing node acquisition submodule is used to sort the routing nodes in the front-end node set according to the historical usage frequency corresponding to each routing node in the front-end node set, and determine at least one routing node at the top of the sorting as the target front-end routing node;
[0128] as well as,
[0129] The target backend routing node acquisition submodule is used to sort the routing nodes in the backend node set according to the historical usage frequency corresponding to each routing node in the backend node set, and determine at least one routing node at the top of the sort as the target backend routing node.
[0130] In one embodiment, the routing sequence generation module 604 includes:
[0131] A routing sequence template acquisition submodule is used to acquire a plurality of preset routing sequence templates; the plurality of routing sequence templates correspond to different numbers and / or types of routing nodes;
[0132] a routing node extraction submodule, configured to filter out a fourth number of front-end routing nodes from the at least one target front-end routing node and a fifth number of back-end routing nodes from the at least one target back-end routing node according to a fourth number corresponding to the front-end routing nodes and a fifth number corresponding to the back-end routing nodes in each routing sequence template;
[0133] The node arrangement and combination submodule is used to arrange and combine the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes for each routing sequence template to generate multiple routing sequences; each routing sequence at least includes the logistics transportation starting point and the logistics transportation end point.
[0134] In one embodiment, each routing node in the routing sequence template has a corresponding sorting priority, and the priorities of the logistics transportation starting point, the front-end routing node, the back-end routing node, and the logistics transportation end point are reduced in sequence;
[0135] The node arrangement and combination submodule is specifically used to sort the logistics transportation starting point, the logistics transportation end point, the fourth number of front-end routing nodes and the fifth number of back-end routing nodes for each routing sequence template according to the sorting priority to generate multiple routing sequences.
[0136] For the specific definition of a routing sequence generation device, please refer to the definition of a routing sequence generation method mentioned above, which will not be repeated here. Each module in the above-mentioned routing sequence generation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned 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.
[0137] 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 routing 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 method for generating a routing sequence is implemented.
[0138] 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.
[0139] 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:
[0140] In response to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and select a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes;
[0141] Classifying multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set;
[0142] Acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively;
[0143] The logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node are arranged and combined to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0144] In one embodiment, when the processor executes the computer program, it also implements other steps in the above embodiment.
[0145] 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:
[0146] In response to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and select a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes;
[0147] Classifying multiple routing nodes in the target historical route to obtain a front-end node set and a back-end node set;
[0148] Acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively;
[0149] The logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node are arranged and combined to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
[0150] In one embodiment, when the computer program is executed by a processor, other steps in the above embodiments are also implemented.
[0151] 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 can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can 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).
[0152] 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.
[0153] The above-mentioned 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 method for generating a routing sequence, It is characterized in that The method comprises: In response to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and select a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes; When the logistics transportation starting point and the logistics transportation end point are in the same preset area, obtaining at least two routing nodes from multiple routing nodes of the target historical route, and dividing the at least two routing nodes into a front-end node set and a back-end node set; When the logistics transportation starting point and the logistics transportation end point are not in the same preset area, a second number of front-end routing nodes in the same preset area as the logistics transportation starting point are determined from multiple routing nodes in the target historical route to obtain a front-end node set, and a third number of routing nodes are obtained from routing nodes in the target historical route other than the front-end routing nodes to obtain a back-end node set; Acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively; The logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node are arranged and combined to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
2. The method according to claim 1, It is characterized in that The step of selecting a target historical route that matches the logistics transportation starting point and the logistics transportation end point from the plurality of historical routes includes: Obtaining a starting point routing node corresponding to the logistics transportation starting point and a terminal routing node corresponding to the logistics transportation terminal; According to the start nodes and end nodes corresponding to the plurality of historical routes, the historical routes whose start nodes are the same as the start route node and whose end nodes are the same as the end route node are screened out as the target historical routes.
3. The method according to claim 1, It is characterized in that The acquiring at least two routing nodes from a plurality of routing nodes of the target historical route comprises: Obtaining the historical usage frequency corresponding to each routing node in the target historical route; A first number of routing nodes with the highest historical usage frequencies are obtained from the plurality of routing nodes.
4. The method according to any one of claims 1 to 3, It is characterized in that The acquiring, from the front-end node set and the back-end node set respectively, at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range comprises: Sort the routing nodes in the front-end node set according to the historical usage frequencies corresponding to the respective routing nodes in the front-end node set, and determine at least one routing node at the top of the sort as the target front-end routing node; as well as, The routing nodes in the backend node set are sorted according to the historical usage frequencies corresponding to the respective routing nodes in the backend node set, and at least one routing node at the top of the sorting is determined as the target backend routing node.
5. The method according to claim 1, It is characterized in that The step of arranging and combining the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node, and the at least one target back-end routing node to generate a routing sequence includes: Acquire multiple preset routing sequence templates; the multiple routing sequence templates correspond to different numbers and / or types of routing nodes; According to the fourth number corresponding to the front-end routing nodes and the fifth number corresponding to the back-end routing nodes in each routing sequence template, the fourth number of front-end routing nodes are screened out from the at least one target front-end routing node, and the fifth number of back-end routing nodes are screened out from the at least one target back-end routing node; For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences; each routing sequence includes at least the logistics transportation starting point and the logistics transportation end point.
6. The method according to claim 5, It is characterized in that Each routing node in the routing sequence template has a corresponding sorting priority, and the priorities of the logistics transportation starting point, the front-end routing node, the back-end routing node and the logistics transportation end point decrease in sequence; For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, and the corresponding fourth number of front-end routing nodes and the fifth number of back-end routing nodes are arranged and combined to generate multiple routing sequences, including: For each routing sequence template, the logistics transportation starting point, the logistics transportation end point, the fourth number of front-end routing nodes and the fifth number of back-end routing nodes are sorted according to the sorting priority to generate multiple routing sequences.
7. A device for generating a routing sequence, It is characterized in that The device comprises: A historical route screening module is used to respond to a route planning request for the logistics to be processed, determine the logistics transportation starting point and the logistics transportation end point of the logistics to be processed, and screen out a target historical route that matches the logistics transportation starting point and the logistics transportation end point from multiple historical routes; A routing node set acquisition module is used to, when the logistics transportation starting point and the logistics transportation end point are in the same preset area, acquire at least two routing nodes from multiple routing nodes of the target historical route, and divide the at least two routing nodes into a front-end node set and a back-end node set; when the logistics transportation starting point and the logistics transportation end point are not in the same preset area, determine a second number of front-end routing nodes in the same preset area as the logistics transportation starting point from multiple routing nodes of the target historical route to obtain a front-end node set, and acquire a third number of routing nodes from routing nodes other than the front-end routing nodes in the target historical route to obtain a back-end node set; A target node acquisition module, used to acquire at least one target front-end routing node and at least one target back-end routing node whose historical usage frequency is within a preset range from the front-end node set and the back-end node set respectively; A routing sequence generation module is used to arrange and combine the logistics transportation starting point, the logistics transportation end point, the at least one target front-end routing node and the at least one target back-end routing node to generate a routing sequence; the routing sequence includes at least one route for the logistics to be processed.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, It is 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 6 are implemented.
Citation Information
Patent Citations
Logistics positioning control method
CN104200352A
A logistics node determination method and device
CN109919532A