Method, device, medium and electronic equipment for processing path data

By identifying the nodes to be optimized and the distance limit in the path, and calculating the adjustment distance, the problem of insufficient accuracy in solving the lower bound of OTSP is solved, and the accurate calculation of the lower bound of the path length is realized, which guides the termination and solution approximation of the OTSP solution algorithm.

CN111061988BActive Publication Date: 2026-07-21BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SANKUAI ONLINE TECH CO LTD
Filing Date
2019-12-18
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively solve the lower bound of the Open Traveling Salesman Problem (OTSP), resulting in insufficient accuracy in path optimization.

Method used

By identifying the nodes to be optimized and the distance limits in the path, the adjustment distance is calculated, thereby determining the lower bound of the path length and improving the accuracy of the lower bound calculation.

Benefits of technology

An effective scheme for solving the lower bound of OTSP is provided, which improves the accuracy of the lower bound calculation and can be used as the termination condition and the basis for judging the approximation degree of other OTSP solving algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111061988B_ABST
    Figure CN111061988B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, medium, and electronic device for processing path data, relating to the field of data processing technology. The path comprises a set of N nodes. The method includes: determining the h-th node as the current path endpoint, and obtaining the distance D between the i-th node and the current path endpoint. ih ; Obtain the distance limit S corresponding to the i-th node. i According to distance D ih With distance limit S i The size relationship between nodes determines the node j to be optimized; the distance limit S of the node j to be optimized is used as the basis for this optimization. j Calculate the adjustment distance; based on the adjustment distance, determine the lower bound of the path length corresponding to the current path endpoint. This technical solution provides an effective method for finding the lower bound solution to the Open-ended Traveling Salesman Problem (OTSP). It can also determine a relatively accurate lower bound of the path length, and can be used as a basis for terminating calculations of other OTSP solving algorithms and judging how close their solutions are to the optimal solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and more specifically, to a method for processing path data, an apparatus for processing path data, and a computer-readable medium and electronic device for implementing the above-described method for processing path data. Background Technology

[0002] To save resources and reduce transportation costs, transportation routes need to be optimized based on factors such as the location of nodes along the route. Route optimization is also widely used in transportation processes in railways, roads, and aviation. Among the route optimization problems mentioned above are the Traveling Salesman Problem (TSP) and the Open Traveling Salesman Problem (OTSP). Both TSP and OTSP are considered typical nondeterministic polynomial (NP) problems.

[0003] Existing technologies offer some heuristic schemes for solving the lower bound of the TSP (Thinking Power Spread), such as the paper "A Fast Estimation Method for the Lower Bound of Symmetric TSP" published in the 12th issue of *Systems Engineering—Theory & Practice* (pp. 84-88). However, existing technologies have not yet provided an effective technical solution for solving the lower bound of the OTSP (Over-the-Top Spread). Therefore, there is an urgent need to provide a technical solution for solving the lower bound of the OTSP.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a method for processing path data, a device for processing path data, a computer-readable medium and an electronic device, and to provide a technical solution for solving the lower bound of OTSP, which is beneficial to improving the accuracy of determining the lower bound of OTSP.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] According to a first aspect of the present disclosure, a method for processing path data is provided, wherein the path comprises a node set consisting of N nodes, the method comprising:

[0008] Determine the h-th node as the current path endpoint, and obtain the distance D between the i-th node and the current path endpoint. ih ;

[0009] Obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h;

[0010] Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance;

[0011] Based on the adjusted distance, determine the lower bound of the path length corresponding to the current path endpoint.

[0012] In some embodiments of this disclosure, based on the foregoing scheme, the distance limit S corresponding to the i-th node is obtained. i ,include:

[0013] Obtain the distance D between the i-th node and the k-th node in the node set. ik , where k takes the value of an integer in the range [1, N], and is not equal to i or h;

[0014] According to the distance D ik The length of the distance D ik Sort in reverse order and determine the distance D of the first M items. ik The distance limit S corresponding to the i-th node i , where M is a positive integer.

[0015] In some embodiments of this disclosure, based on the foregoing scheme, according to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, including:

[0016] If any of the distances D ih All are greater than the distance limit S. i Then, the nodes in the node set other than the current path endpoint are taken as the node to be optimized, resulting in a first node set containing at least one node to be optimized.

[0017] In some embodiments of this disclosure, based on the foregoing scheme, based on the distance limit S of the node j to be optimized j Calculate the adjustment distance, including:

[0018] For any node j1 in the first node set u Obtain the node j1 u Distance L between the current path endpoint j1uh , where u takes the value of an integer in the range [1, N], and u is not equal to h;

[0019] Calculate the distance L j1uh and the node j1 u The first difference between the distance limits is used to obtain the node j1. u The corresponding sub-adjustment distance;

[0020] The minimum value of the sub-adjustment distance in the first node set is determined to be the adjustment distance.

[0021] In some embodiments of this disclosure, based on the foregoing scheme, according to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, including:

[0022] If the distance D ih There exists a target distance less than or equal to the distance limit S. i Then the node corresponding to the target distance is taken as the node to be optimized j, and a second node set containing at least one node to be optimized is obtained.

[0023] In some embodiments of this disclosure, based on the foregoing scheme, the distance limit S i Including the first limit and the second limit, wherein:

[0024] Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance, including:

[0025] For any node j2 in the second node set v Obtain the second set of nodes excluding node j2. v Other than the reference node, the node j2 is obtained. v The corresponding reference node set, where v is a positive integer less than or equal to the number of nodes in the second node set;

[0026] For any reference node j3 in the set of reference nodes w Calculate the reference node j3 w The difference between the corresponding first limit and the second limit is used to obtain the second difference, where w is a positive integer less than or equal to the number of nodes in the reference node set;

[0027] The sum of all second differences in the reference node set is calculated to obtain node j2. v The corresponding sub-adjustment distance;

[0028] The minimum value of the sub-adjustment distance in the second node set is determined to be the adjustment distance.

[0029] In some embodiments of this disclosure, based on the foregoing scheme and the adjusted distance, determining the lower bound of the path length corresponding to the current path endpoint includes:

[0030] Obtain the base distance corresponding to the current path endpoint;

[0031] Based on the adjusted distance and the base distance, determine the lower bound of the path length corresponding to the current path endpoint.

[0032] According to a second aspect of the present disclosure, a path data processing apparatus is provided, comprising: an acquisition module, a node to be optimized determination module, an adjustment distance calculation module, and a length lower bound determination module. Wherein:

[0033] The aforementioned acquisition module is used to: determine the h-th node as the current path endpoint, and acquire the distance D between the i-th node and the current path endpoint. ih ;

[0034] The aforementioned node determination module is used to: obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h;

[0035] The aforementioned distance calculation module is used to: adjust the distance calculation based on the distance limit S of the node j to be optimized. j Calculate the adjustment distance;

[0036] The aforementioned length lower bound determination module is used to: determine the length lower bound of the path corresponding to the current path endpoint based on the adjusted distance.

[0037] According to a third aspect of the present disclosure, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the path data processing method as described in the first aspect of the above embodiments.

[0038] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the path data processing method as described in the first aspect of the above embodiments.

[0039] The technical solutions provided in this disclosure may have the following beneficial effects:

[0040] In the embodiments provided in this disclosure, firstly, any node in the path (the h-th node) is taken as the current path endpoint, and the distance D between each of the other nodes in the path (the i-th node) and the current path endpoint is obtained. ih Then, obtain the distance limit S corresponding to the i-th node. i And based on that distance D ih The distance limit S mentioned above i The size relationship between the nodes determines the node j to be optimized; further, based on the determined distance limit S of the node j to be optimized... j Calculate the adjustment distance; finally, based on the adjustment distance, determine the lower bound of the path length corresponding to the current path endpoint.

[0041] As can be seen, this technical solution provides an effective method for finding the lower bound solution to the Open Traveling Salesman Problem (OTSP). Furthermore, by determining the adjustment distance based on the node to be optimized, a larger lower bound value for the path length is determined, thereby improving the accuracy of the lower bound value calculation. Simultaneously, given that this technical solution yields a highly accurate lower bound value, it can be used as a basis for terminating the calculation of other OTSP solving algorithms and judging how close their solutions are to the optimal solution. In other words, this technical solution can be used to determine whether the solutions obtained by other OTSP solving algorithms necessarily meet preset requirements, thus providing better guidance for whether the solutions obtained by these OTSP solving algorithms meet accuracy requirements or whether the calculation should be terminated early.

[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0044] Figure 1 A schematic diagram of a system architecture for implementing a path data processing method in an exemplary embodiment of this disclosure is shown.

[0045] Figure 2 A flowchart illustrating a method for processing path data according to an embodiment of the present disclosure is shown;

[0046] Figure 3 A flowchart illustrating a method for determining the distance limit of a node according to an embodiment of the present disclosure is shown.

[0047] Figure 4A flowchart illustrating a method for determining a node to be optimized according to an embodiment of the present disclosure is shown;

[0048] Figure 5 A schematic diagram of node relationships according to an embodiment of the present disclosure is shown;

[0049] Figure 6 A flowchart illustrating a method for determining an adjusted distance according to an embodiment of the present disclosure is shown;

[0050] Figure 7 A flowchart illustrating a method for determining an adjusted distance according to another embodiment of the present disclosure is shown;

[0051] Figure 8 A flowchart illustrating a method for processing path data according to another embodiment of the present disclosure is shown;

[0052] Figure 9 A schematic diagram of a path data processing apparatus according to an embodiment of the present disclosure is shown;

[0053] Figure 10 This diagram illustrates the structure of a computer storage medium in an exemplary embodiment of this disclosure; and,

[0054] Figure 11 A schematic diagram of the structure of an electronic device in an exemplary embodiment of this disclosure is shown. Detailed Implementation

[0055] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.

[0056] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0057] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0058] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0059] This example implementation first provides a system architecture for implementing a method for processing path data, which can be applied to various data processing scenarios. (Reference) Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as the medium for providing communication links between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0060] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send request commands, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as image processing applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0061] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0062] Server 105 can be a server that provides various services, such as determining the h-th node as the current path endpoint and obtaining the distance D between the i-th node and the current path endpoint. ih (For example only). Server 105 can obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized (this is just an example). Furthermore, server 105 can also optimize the node j based on its distance limit S. j Calculate the adjustment distance. Finally, based on the adjustment distance, server 105 determines the lower bound of the path length corresponding to the current path endpoint.

[0063] The main difference between the Open-ended Traveling Salesman Problem (OTSP) and the basic Traveling Salesman Problem (TSP) lies in two scenarios. One scenario is where the traveler is not required to return to their starting point after completing the task; the other scenario is where, if the traveler is required to return to their starting point after completing the task, they must return along the original outbound route. Therefore, the travel route / path in the OTSP is open-ended, while the travel route / path in the TSP is closed-ended.

[0064] OTSP (Over-the-Top Service) is widely used in logistics and distribution, as well as route optimization for various modes of transportation. In an exemplary embodiment, the marketing scenario covered by this technical solution could be: when a logistics and distribution company does not have its own dedicated delivery fleet or its own fleet of vehicles is insufficient, it must rent vehicles to meet customer demand. Since rented vehicles generally do not need to return to the distribution center after completing their tasks, their routes are open. In addition, OTSP is also used for route optimization in rail, road, and air transportation, such as the routes of trains, buses, and airplanes.

[0065] This technical solution provides a method and apparatus for processing path data, a computer storage medium, and an electronic device. The method for processing path data is described below:

[0066] Figure 2 A schematic flowchart of a path data processing method according to an embodiment of the present disclosure is shown. The path data processing method provided in this embodiment overcomes, to at least a certain extent, the aforementioned problems existing in the prior art.

[0067] In this embodiment, the execution entity of the path data processing method can be a device with computing capabilities, such as a server. (Reference) Figure 2 The path data processing method provided in this embodiment includes:

[0068] Step S210: Determine the h-th node as the current path endpoint, and obtain the distance D between the i-th node and the current path endpoint. ih ;

[0069] Step S220: Obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h;

[0070] Step S230, based on the distance limit S of the node j to be optimized j Calculate the adjustment distance; and,

[0071] Step S240: Based on the adjusted distance, determine the lower bound of the path length corresponding to the current path endpoint.

[0072] exist Figure 2 The technical solution provided in the illustrated embodiment offers an effective method for finding the lower bound solution to the Open Traveling Salesman Problem (OTSP). Furthermore, by determining the adjustment distance based on the node to be optimized, a larger lower bound value for the path length is determined, thereby improving the accuracy of the lower bound value calculation. Simultaneously, given that this technical solution yields a highly accurate lower bound value, it can serve as a basis for terminating calculations of other OTSP solving algorithms and judging the closeness of their solutions to the optimal solution. In other words, this technical solution can be used to determine whether the solutions obtained by other OTSP solving algorithms necessarily meet preset requirements, thus providing better guidance for determining whether the solutions obtained by these OTSP solving algorithms meet accuracy requirements or whether to terminate calculations prematurely.

[0073] In an exemplary embodiment, suppose a vehicle departs from a warehouse (which can be denoted as node 0) and needs to deliver goods to N locations (which can be denoted as N nodes). For example, the set of these N nodes is denoted as G1. In the set G1, the distance between any two nodes is symmetrical; that is, if the distance between node a and node b is dis(a, b), then dis(a, b) = dis(b, a). After completing the delivery task, the vehicle does not need to return to the original warehouse (node ​​0) or return along the original route.

[0074] It should be noted that the method for determining the "distance" (e.g., dis(a, b)) between nodes as described in this technical solution is as follows:

[0075] (1) Obtain the actual geographical distance between two nodes; (2) The time a vehicle takes to travel from one node to another, and further convert the distance based on the time taken; (3) The monetary cost a vehicle incurs to travel from one node to another, and further convert the distance based on the monetary cost incurred.

[0076] This technical solution can determine a lower bound on the total distance traveled by the vehicle after visiting each location (and only once). Furthermore, given the high accuracy of the lower bound solution obtained by this technical solution, for lower bound approximate solutions to this problem obtained through other OTSP solutions, the lower bound on the total distance given by this technical solution can be used to determine the approximation degree between these approximate solutions and the optimal solution.

[0077] The specific implementation methods of this technical solution are described below:

[0078] In an exemplary embodiment, this technical solution uses the h-th node as the current path endpoint, where h takes values ​​of 1, 2, 3, ..., N, to iteratively calculate the lower bound solution of the computation path. When h takes any value: in step S210, the distance D between the i-th node and the aforementioned current path endpoint (i.e., the h-th node) is also obtained. ih , where i belongs to G1-{h}.

[0079] In an exemplary embodiment, the distance between any two nodes in the above path can be determined to obtain a distance matrix dis(x, y), where x, y ∈ G1+{0 nodes}. This embodiment can conveniently obtain from this distance matrix the distance D between the i-th node (when i = 1) and the current path endpoint (i.e., the h-th node). 1h =dis(1, h), the distance D between the i-th node (when i=2) and the current path endpoint (i.e., the h-th node). 2h =dis(2, h), the distance D between the i-th node (when i=N) and the current path endpoint (i.e., the h-th node). Nh =dis(N,h).

[0080] For example, the distance D between the i-th node and the current path endpoint (i.e., the h-th node) is... ih Used to combine the distance limit S corresponding to the i-th node i To determine the node to be optimized, further, in step S220, the distance limit S corresponding to the i-th node is obtained. i .

[0081] In an exemplary embodiment, the distance limit S can also be obtained based on the distance matrix described above. i . Specifically, Figure 3 A flowchart illustrating a method for determining the distance limit of a node according to an embodiment of the present disclosure is shown. (Reference) Figure 3 The method embodiment shown in the figure includes:

[0082] Step S310: Obtain the distance D between the i-th node and the k-th node in the node set. ik Where k takes the value of an integer in the range [1, N], and is not equal to i or h; and in step S320, according to the distance D ik The length of the distance D ik Sort in reverse order and determine the distance D of the first M items. ik The distance limit S corresponding to the i-th node i , where M is a positive integer.

[0083] Taking node i=2 as an example, the distance D is obtained in step S310. ikIncluding [D] 21 =dis(2,1)=1 km, D 23 =dis(2,3)=3 kilometers, D 24 =dis(2,4)=2.5 km, ...,D 2N =dis(2, N)]; Further, in step S320, based on the distance D ik The length of the distance D ik Perform reverse sorting (i.e., sorting by distance values ​​from smallest to largest) to obtain [D] 21 =dis(2,1)=1 km, D 24 =dis(2,3)=2.5 km, D 23 =dis(2,2)=3 km...]. Therefore, when M is 3, the distance limit S2 (denoted as "dim()" in this article) corresponding to the node i=2 includes: the shortest distance limit dim(2,1)=dis(2,1), the first distance limit dim(2,2)=dis(2,4), and the second distance limit dim(2,3)=dis(2,3).

[0084] Similarly, when i = 1, 3, 4, ..., N, the distance limits for each node can be determined: dim(i,1), dim(i,2), and dim(i,3).

[0085] In an exemplary embodiment, distance D is determined according to the above embodiments. ih With distance limit S i Then, in step S220: according to the distance D ih With the distance limit S i The size relationship between them determines the nodes to be optimized.

[0086] in, Figure 4 A flowchart illustrating a method for determining a node to be optimized according to an embodiment of the present disclosure is shown. (See also:) Figure 4 The method embodiment shown in the figure includes steps S410-S430.

[0087] For example, in this technical solution, the h-th node is taken as the current path endpoint. According to the OTSP requirement, there exists one and only one node in the node set G1-{h} that is connected to the current path endpoint (h-th node). Therefore, in step S410 of this technical solution, the distance D is determined. ih There exists a target distance less than or equal to the distance limit S. i This allows for the determination of different sets of nodes to be optimized based on different circumstances.

[0088] In an exemplary embodiment, if the distance Dih There is no target distance less than or equal to the distance limit S. i In other words, for any i ∈ G1-{h}, the distance between the h-th node and the i-th node of the current path endpoint is greater than the distance limit S corresponding to the i-th node. i (For example, the first distance limit is dim(i, 2); that is, dis(i, h) > dim(i, 2)). This means that any point in the path with node h as the current endpoint is not connected to node h.

[0089] To meet the requirements of OTSP, further adjustments are needed to determine the set of nodes to be optimized, so that one of the nodes is eventually connected to the h-th node, the endpoint of the current path. In this technical solution, in this case, step S420 is performed: the nodes in the node set other than the current endpoint of the path are taken as the node j to be optimized, resulting in a first node set containing at least one node to be optimized.

[0090] In an exemplary embodiment, if the distance D ih There exists a target distance less than or equal to the distance limit S. i That is, there exists a target distance such that D ih =dis(i,h)=dim(i,1), or dis(i,h)=dim(i,2). That is to say, in the path with the h-th node as the current path endpoint, there exists a node i (i.e., the node corresponding to the target distance mentioned above) that is connected to the current path endpoint h.

[0091] For example, refer to Figure 5 The set of nodes connected to the current path endpoint can be denoted as G2. Nodes in the set G2 are schematically connected to the h-th node (the current path endpoint) by directed line segments.

[0092] It should be noted that: if there is one and only one target distance such that D i’h =dis(i', h) = dim(i, 1), or dis(i', h) = dim(i, 2); that is, there is only one node in the node set G2. In other words, in the path with node h as the current endpoint, there is exactly one node i' (i.e., the node corresponding to the target distance mentioned above) connected to the current endpoint h. Therefore, there is no need to adjust the path corresponding to the current endpoint. In other words, in this case, the node set to be optimized is empty.

[0093] Additionally, if there exist two or more i∈S1-{h} such that dis(i,h)=dim(i,1) or dis(i,h)=dim(i,2), that is, the number of nodes in the node set G2 is at least two. In other words, in the path with the h-th node as the current path endpoint, there exist two or more nodes i∈G1-{h} connected to the current path endpoint.

[0094] To meet the requirements of OTSP, further adjustments are needed, namely, determining the set of nodes to be optimized so that a certain node in G2 is eventually connected to the current path endpoint node h. In this technical solution, in this case, step S430 is executed, and the node corresponding to the target distance is taken as the node to be optimized j, resulting in a second set of nodes (i.e., the above-mentioned node set G2) containing at least one node to be optimized.

[0095] In the exemplary embodiments, reference continues to be made to... Figure 2 After determining the set of nodes to be optimized, in step S230, based on the distance limit S of the node j to be optimized... j Calculate the adjustment distance.

[0096] For example, for the first set of nodes to be optimized determined in step S420, in Figure 6 The illustrated embodiment provides a specific implementation method for determining the adjustment distance; while for determining the second set of nodes to be optimized in step S430, it will be... Figure 7 The illustrated embodiment provides a specific implementation method for determining the adjustment distance. The following will describe each method in detail. Figure 6 and Figure 7 The illustrated embodiments are explained below:

[0097] Figure 6 A flowchart illustrating a method for determining an adjusted distance according to an embodiment of the present disclosure is shown, specifically for the case of the first set of nodes determined in step S420, as a specific implementation of step S230. (See reference...) Figure 6 The technical solution shown in the figure includes steps S610-S630.

[0098] In step S610, for any node j1 in the first node set u Obtain the node j1 u Distance L between the current path endpoint j1uh .

[0099] In an exemplary embodiment, as can be seen from the above embodiments, the first node set is G1-{}, for any node j1 u ∈G1-{h}, determine node j1 in the above distance matrix. uThe distance L between the current path endpoint (node ​​h) and the current path endpoint j1uh , such as: L 1h =dis(1,h),L 2h =dis(2,h), ...L Nh =dis(N,h).

[0100] In step S620, the distance L is calculated. j1uh and the node j1 u The first difference between the distance limits is used to obtain the node j1. u The corresponding sub-adjustment distance.

[0101] In an exemplary embodiment, node j1 u The distance limit is set to the first distance limit: dim(j1) u 2) Calculate the first difference mentioned above according to the following formula, that is, the difference between node j1 and node j1. u The corresponding sub-adjustment distance Adjust(h,j1) u ):

[0102] Adjust(h,j1 u ) = dis(j1 u ,h)-dim(j1 u 2) Formula 1

[0103] In step S630, the minimum value of the sub-adjustment distance in the first node set is determined to be the adjustment distance.

[0104] In an exemplary embodiment, the adjustment distance Adjust(h) is determined according to the following formula:

[0105]

[0106] Therefore, according to Formula 2, any node belonging to the first node set (i.e., j1) u ∈G1-{h}), obtain the sub-adjustment distance Adjust(h,j1) u The minimum node (e.g., j1) u’ ), and set node j1 u’ The corresponding sub-adjustment distance is used as the aforementioned adjustment distance. Simultaneously, in the path corresponding to the h-th node of the current path endpoint, there is exactly one and only node j1. u’ That is, it connects to the h-th node, satisfying the OTSP requirements.

[0107] Figure 7 A flowchart illustrating a method for determining the adjusted distance according to another embodiment of this disclosure is shown, specifically for the case of the second set of nodes determined in step S430, as a specific implementation of step S230. (See also...) Figure 7 The technical solution shown in the figure includes steps S710-S740.

[0108] In step S710, for any node j2 in the second node set v Obtain the second set of nodes excluding node j2. v Other than the reference node, the node j2 is obtained. v The corresponding reference node set, where v is a positive integer less than or equal to the number of nodes in the second node set.

[0109] For example, continue to refer to Figure 5 For any node j2 in the node set G2 (i.e., the second node set mentioned above) v Get the other nodes in the node set G2 as node j2. v The corresponding set of reference nodes can be represented as: G2-{j2} v}

[0110] In step S720, for any reference node j3 in the set of reference nodes... w (can be represented as j3) w ∈G2-{j2 v}), calculate the reference node j3 w The difference between the corresponding first limit and the second limit is used to obtain the second difference, where w is a positive integer less than or equal to the number of nodes in the reference node set.

[0111] For example, first obtain node j2 v Each reference node j3 in the corresponding set of reference nodes w Distance limits, such as: first limit dim(j3) w ,2) and the second limit dim(j3) w 3). The specific method for determining the distance limit is the same as... Figure 3 The embodiments shown are the same and will not be described again here.

[0112] In step S730, the sum of all second differences in the reference node set is calculated to obtain node j2. v The corresponding sub-adjustment distance.

[0113] For example, node j2 is calculated according to the following formula three. v The corresponding sub-adjustment distance Adjust(h,j2) v ), that is, the above node j1 u The corresponding sub-adjustment distance Adjust(h,j1) u ).

[0114]

[0115] In step S740, the minimum value of the sub-adjustment distance in the second node set is determined to be the adjustment distance.

[0116] For example, the adjustment distance Adjust(h) is determined according to the following formula:

[0117]

[0118] In an exemplary embodiment, the equivalent calculation method of Formula 4 is as shown in Formula 5:

[0119]

[0120] According to Formula 5 above, we can directly use any node j2 in the second node set. v The corresponding distance limit (i.e., dim(j2) v ,3) and dim(j2 v ,2)) Determined.

[0121] Therefore, according to Formula 4 or Formula 5, any node belonging to the second node set (i.e., j2) v ∈G2), obtain the sub-adjustment distance Adjust(h,j2). v The minimum node of ) (e.g., j2) v’ ), and put node j2 v’ The corresponding sub-adjustment distance is used as the aforementioned adjustment distance. Simultaneously, in the path corresponding to the h-th node of the current path endpoint, there is exactly one and only node j2. v’ That is, it connects to the h-th node, satisfying the OTSP requirements.

[0122] In the exemplary embodiments, reference continues to be made to... Figure 2 ,for Figure 6 and Figure 7 After determining the aforementioned adjustment distance, the technical solution provided in the illustrated embodiment proceeds to step S240: based on the adjustment distance, a lower bound value for the length of the path corresponding to the current path endpoint is determined. The specific implementation of step S240 will be discussed below. Figure 8 The embodiments shown are described in detail.

[0123] Figure 8 A flowchart illustrating a method for processing path data according to another embodiment of this disclosure is shown, with reference to... Figure 8 The technical solution shown in the figure includes steps S810-S891.

[0124] In step S810, a distance matrix is ​​obtained regarding the distances between nodes in the path.

[0125] In step S820, the current path endpoint h = 1 is initialized.

[0126] For example, the current path endpoint is the h-th node, where h takes values ​​from G1 in sequence, specifically: 1, 2, 3, ..., N.

[0127] In step S830, set G2 is obtained, where node i' in G2 satisfies {D i’h =dis(i', h) = dim(i', 1), or dis(i', h) = dim(i', 2)}, and node i' belongs to G1; and calculate the base distance baseBound(h).

[0128] In an exemplary embodiment, the specific implementation of obtaining the above set G2 includes: determining whether there exists a node i' such that the distance D i’h =dis(i',h) is less than or equal to the first distance limit dim(i',2) mentioned above. The specific implementation method is the same as that of step S410, and will not be repeated here.

[0129] In an exemplary embodiment, when the h-th node is taken as the current path endpoint, the base distance of the path (denoted as baseBound(h)) is calculated as follows: Formula 6

[0130]

[0131] In this technical solution, the lower bound of the path length corresponding to the current path endpoint can be determined by using the base distance (baseBound(h)) determined by Formula 6 above and the adjustment distance Adjust(h) determined in the embodiment of step S230.

[0132] In step S840, it is determined whether the number of nodes in set G2 is greater than 0.

[0133] For example, if there are no nodes in G2, it means that for any i ∈ G1-{h}, the distance between the h-th node of the current path endpoint and the i-th node is greater than the distance limit S corresponding to the i-th node. i (For example, if the first distance limit is dim(i, 2); that is, dis(i, h) > dim(i, 2)); then step S863 is executed. Specifically, in step S863, through... Figure 6 The example shown calculates the adjustment distance Adjust(h).

[0134] For example, if there are nodes in G2, then step S850 is executed to further determine whether the number of nodes in set G2 is greater than 1.

[0135] If the number of nodes in set G2 is greater than 1, it means that there exist 2 or more i∈S1-{h} such that dis(i,h)=dim(i,1) or dis(i,h)=dim(i,2); then proceed to step S862. Specifically, in step S862: through Figure 7 The example shown calculates the adjustment distance Adjust(h).

[0136] If a node in set G2 is equal to 1, it means that there is one and only one target distance such that D i’h =dis(i', h) = dim(i, 1), or dis(i', h) = dim(i, 2); At this time, in the path with node h as the current path endpoint, there is exactly one node i' (i.e., the node corresponding to the target distance mentioned above) connected to the current path endpoint h. Therefore, there is no need to adjust the path corresponding to the current path endpoint. Then, proceed to step S861. Specifically, in step S861: determine that the adjustment distance Adjust(h) = 0.

[0137] In an exemplary embodiment, the specific execution process of steps S840 to S861 / S862 / S863 can also be based on... Figure 5 The node relationship diagram shown is implemented. (Reference) Figure 5 The set of nodes satisfies: G2∪G3=G1-{h}. Specifically:

[0138] (1) If the number of nodes in the node set G2, |G2|, is 1, then there is no need to adjust the path corresponding to the current path endpoint. That is, execute step S861.

[0139] (2) If the number of nodes in the node set G2 is |G2| = 0, then at this time (Empty), G3 = G1 - {h}. This indicates that the distance between the h-th node and the i-th node at the current path endpoint is greater than the first distance limit dim(i, 2) corresponding to the i-th node; that is, execute step S863.

[0140] (3) If the number of nodes in the node set G2 is |G2|>=2, it means that there are at least two i∈S1-{h} such that dis(i,h)=dim(i,1) or dis(i,h)=dim(i,2); then execute step S862.

[0141] After determining the adjustment distance Adjust(h) through the above embodiments, in step S870, the lower bound value of the path length bound(h) corresponding to the current path endpoint is calculated.

[0142] For example, the base distance Adjust(h) corresponding to the current path endpoint is obtained; and the lower bound value bound(h) of the path length corresponding to the current path endpoint is determined based on the adjusted distance Adjust(h) and the base distance baseBound(h). Specifically, bound(h) is determined by Formula 7.

[0143] bound(h)=baseBound(h)+Adjust(h) Formula 7

[0144] After determining the base distance Adjust(h) corresponding to the current path endpoint using Formula 7, h is updated. Specifically, in step S880, h is updated to h+1.

[0145] Further, in step S890: determine whether the updated h is greater than N.

[0146] For example, if it is determined that the updated h is less than or equal to N, it means that the end point of the path (i.e., the Nth node) has not yet been reached, and step S830 is executed to perform iterative calculation; for example, if it is determined that the updated h is greater than N, it means that the iterative calculation has ended, and in step S891, the minimum value of the extreme lower bound value bound(h) Bound for h belonging to the above-mentioned node set G1 is calculated, and the minimum value of the path length lower bound value Bound determined by this technical solution is output. For example, the minimum value of the lower bound value bound(h) Bound is calculated according to Formula 8.

[0147] Bound = min h∈S1 bound(h) Formula 8

[0148] This technical solution provides an effective method for finding the lower bound solution to the Open Traveling Salesman Problem (OTSP). Furthermore, by determining the adjustment distance based on the node to be optimized, a larger lower bound value for the path length is determined, thereby improving the accuracy of the lower bound value calculation. Simultaneously, given the high accuracy of the lower bound value obtained through this technical solution, it can be used as a basis for terminating the calculation of other OTSP solving algorithms and judging how close their solutions are to the optimal solution. In other words, this technical solution can be used to determine whether the solutions obtained by other OTSP solving algorithms necessarily meet preset requirements, thus providing better guidance for whether the solutions obtained by these OTSP solving algorithms meet accuracy requirements or whether to terminate the calculation prematurely, and has high practical application value.

[0149] Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a processor (including CPU and GPU). When the computer program is executed by the CPU, it performs the functions defined by the methods provided in this disclosure. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

[0150] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the methods according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0151] The following describes an embodiment of the apparatus disclosed herein, which can be used to execute the path data processing method described above.

[0152] Figure 9 A schematic diagram of a path data processing apparatus according to an embodiment of the present disclosure is shown, wherein the path comprises a node set consisting of N nodes. (See reference...) Figure 9 The path data processing device 900 provided in this embodiment includes: an acquisition module 901, a node determination module 902, an adjustment distance calculation module 903, and a length lower bound determination module 904.

[0153] in:

[0154] The aforementioned acquisition module 901 is used to: determine the h-th node as the current path endpoint, and acquire the distance D between the i-th node and the current path endpoint. ih ;

[0155] The aforementioned node determination module 902 is used to: obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h;

[0156] The aforementioned distance calculation module 903 is used to: adjust the distance calculation based on the distance limit S of the node j to be optimized. j Calculate the adjustment distance;

[0157] The aforementioned length lower bound determination module 904 is used to: determine the length lower bound of the path corresponding to the current path endpoint based on the adjusted distance.

[0158] In some embodiments of this disclosure, based on the foregoing scheme, the acquisition module 901 is specifically used for:

[0159] Obtain the distance D between the i-th node and the k-th node in the node set. ik Where k takes the value of an integer in the range [1, N], and is not equal to i or h; and,

[0160] According to the distance D ik The length of the distance D ik Sort in reverse order and determine the distance D of the first M items. ik The distance limit S corresponding to the i-th node i , where M is a positive integer.

[0161] In some embodiments of this disclosure, based on the foregoing scheme, the above-mentioned node determination module 902 is specifically used for:

[0162] If any of the distances D ih All are greater than the distance limit S. i Then, the nodes in the node set other than the current path endpoint are taken as the node to be optimized, resulting in a first node set containing at least one node to be optimized.

[0163] In some embodiments of this disclosure, based on the foregoing scheme, the aforementioned distance calculation module 903 is specifically used for:

[0164] For any node j1 in the first node set u Obtain the node j1 u Distance L between the current path endpoint j1uh , where u takes the value of an integer in the range [1, N], and u is not equal to h;

[0165] Calculate the distance L j1uh and the node j1 u The first difference between the distance limits is used to obtain the node j1. u The corresponding sub-adjustment distance; and,

[0166] The minimum value of the sub-adjustment distance in the first node set is determined to be the adjustment distance.

[0167] In some embodiments of this disclosure, based on the foregoing scheme, the above-mentioned node determination module 902 is further specifically used for:

[0168] If the distance D ih There exists a target distance less than or equal to the distance limit S. iThen the node corresponding to the target distance is taken as the node to be optimized j, and a second node set containing at least one node to be optimized is obtained.

[0169] In some embodiments of this disclosure, based on the foregoing scheme, the distance limit Si includes a first limit and a second limit, wherein:

[0170] The aforementioned distance calculation module 903 is also specifically used for:

[0171] Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance, including:

[0172] For any node j2 in the second node set v Obtain the second set of nodes excluding node j2. v Other than the reference node, the node j2 is obtained. v The corresponding reference node set, where v is a positive integer less than or equal to the number of nodes in the second node set;

[0173] For any reference node j3 in the set of reference nodes w Calculate the reference node j3 w The difference between the corresponding first limit and the second limit is used to obtain the second difference, where w is a positive integer less than or equal to the number of nodes in the reference node set;

[0174] The sum of all second differences in the reference node set is calculated to obtain node j2. v The corresponding sub-adjustment distance; and,

[0175] The minimum value of the sub-adjustment distance in the second node set is determined to be the adjustment distance.

[0176] In some embodiments of this disclosure, based on the foregoing scheme, the aforementioned length lower bound determination module 904 is specifically used for:

[0177] Obtain the base distance corresponding to the current path endpoint; and,

[0178] Based on the adjusted distance and the base distance, determine the lower bound of the path length corresponding to the current path endpoint.

[0179] Since the functional modules of the path data processing apparatus in the example embodiments of this disclosure correspond to the steps of the example embodiments of the path data processing method described above, for details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the path data processing method described above.

[0180] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0181] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0182] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0183] In exemplary embodiments of this disclosure, a computer storage medium capable of implementing the above-described methods is also provided. It stores a program product capable of implementing the methods described in this specification. In some possible embodiments, various aspects of this disclosure can also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0184] refer to Figure 10 As shown, a program product 1000 for implementing the above-described method according to an embodiment of the present disclosure is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0185] The above-described program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0186] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0187] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0188] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0189] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0190] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0191] The following reference Figure 11 To describe an electronic device 1100 according to such an embodiment of the present disclosure. Figure 11 The electronic device 1100 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0192] like Figure 11 As shown, the electronic device 1100 is manifested in the form of a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including storage unit 1120 and processing unit 1110).

[0193] The aforementioned storage unit stores program code, which can be executed by the aforementioned processing unit 1110, causing the processing unit 1110 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the aforementioned processing unit 1110 can perform, as follows: Figure 2 As shown in step S210, determine the h-th node as the current path endpoint, and obtain the distance D between the i-th node and the current path endpoint. ih Step S220: Obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between the nodes determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h; Step S230, based on the distance limit S of the node j to be optimized. j Calculate the adjustment distance; and, in step S240, determine the lower bound of the path length corresponding to the current path endpoint based on the adjustment distance.

[0194] For example, the processing unit 1110 described above can also perform the following: Figures 3 to 8 The method for processing path data shown in any of the diagrams.

[0195] Storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 11201 and / or cache memory 11202, and may further include a read-only memory (ROM) 11203.

[0196] Storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0197] Bus 1130 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0198] Electronic device 1100 can also communicate with one or more external devices 1200 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 1100, and / or with any device that enables electronic device 1100 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1150. Furthermore, I / O interface 1150 is connected to display unit 1140 to transmit content to be displayed to display unit 1140 for user viewing.

[0199] Furthermore, electronic device 1100 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 1160. As shown in the figure, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0200] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0201] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0202] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for processing path data, characterized in that, This method is applied to route optimization scenarios in logistics distribution and various modes of transportation. The path includes a set of nodes consisting of a starting node and N delivery location nodes. Determine the h-th node as the current path endpoint, and obtain the distance D between the i-th node and the current path endpoint. ih ; Obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h; Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance; Based on the adjusted distance, determine the lower bound of the path length corresponding to the current path endpoint; The distance between the nodes is determined based on the actual geographical distance between the corresponding locations, the distance converted from travel time, or the distance converted from monetary cost. Obtain the distance limit S corresponding to the i-th node. i ,include: Obtain the distance D between the i-th node and the k-th node in the node set. ik , where k takes the value of an integer in the range [1, N], and is not equal to i or h; According to the distance D ik The length of the distance D ik Sort the distance values ​​in ascending order and determine the first M distances D. ik The distance limit S corresponding to the i-th node i Where M is a positive integer; According to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, including: If the distance D ih There exists a target distance less than or equal to the distance limit S. i Then the node corresponding to the target distance is taken as the node to be optimized j, and a second node set containing at least one node to be optimized is obtained; The distance limit S i Including the first limit and the second limit, wherein: Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance, including: For any node j2 in the second node set v Obtain the second set of nodes excluding node j2. v Other than the reference node, the node j2 is obtained. v The corresponding reference node set, where v is a positive integer less than or equal to the number of nodes in the second node set; For any reference node j3 in the set of reference nodes w Calculate the reference node j3 w The difference between the corresponding first limit and the second limit is used to obtain the second difference, where w is a positive integer less than or equal to the number of nodes in the reference node set; The sum of all second differences in the reference node set is calculated to obtain node j2. v The corresponding sub-adjustment distance; The minimum value of the sub-adjustment distance in the second node set is determined to be the adjustment distance.

2. The method for processing path data according to claim 1, characterized in that, According to the distance D ih With the distance limit S i The size relationship between nodes determines the node j to be optimized, and also includes: If any of the distances D ih All are greater than the distance limit S. i Then, the nodes in the node set other than the current path endpoint are taken as the node to be optimized, resulting in a first node set containing at least one node to be optimized.

3. The method for processing path data according to claim 2, characterized in that, Based on the distance limit S of the node j to be optimized j Calculating the adjustment distance also includes: For any node j1 in the first node set u Obtain the node j1 u Distance L between the current path endpoint j1uh , where u takes the value of an integer in the range [1, N], and u is not equal to h; Calculate the distance L j1uh and the node j1 u The first difference between the distance limits is used to obtain the node j1. u The corresponding sub-adjustment distance; The minimum value of the sub-adjustment distance in the first node set is determined to be the adjustment distance.

4. The method for processing path data according to any one of claims 1 to 3, characterized in that, Based on the adjusted distance, determine the lower bound of the path length corresponding to the current path endpoint, including: Obtain the base distance corresponding to the current path endpoint; Based on the adjusted distance and the base distance, determine the lower bound of the path length corresponding to the current path endpoint.

5. A path data processing apparatus, characterized in that, For logistics distribution and transportation route optimization scenarios of various modes of transportation, the path includes a node set consisting of a starting node and N delivery location nodes, and the device includes: The acquisition module is used to: determine the h-th node as the current path endpoint, and acquire the distance D between the i-th node and the current path endpoint. ih ; The module for determining nodes to be optimized is used to: obtain the distance limit S corresponding to the i-th node. i According to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, where the values ​​of i, j, and h are all integers in the range [1, N], and i is not equal to h, and j is not equal to h; Adjust the distance calculation module to: based on the distance limit S of the node j to be optimized. j Calculate the adjustment distance; The length lower bound determination module is used to: determine the length lower bound of the path corresponding to the current path endpoint based on the adjusted distance; The distance between the nodes is determined based on the actual geographical distance between the corresponding locations, the distance converted from travel time, or the distance converted from monetary cost. Obtain the distance limit S corresponding to the i-th node. i ,include: Obtain the distance D between the i-th node and the k-th node in the node set. ik , where k takes the value of an integer in the range [1, N], and is not equal to i or h; According to the distance D ik The length of the distance D ik Sort the distance values ​​in ascending order and determine the first M distances D. ik The distance limit S corresponding to the i-th node i Where M is a positive integer; According to the distance D ih With the distance limit S i The size relationship between them determines the node j to be optimized, including: If the distance D ih There exists a target distance less than or equal to the distance limit S. i Then the node corresponding to the target distance is taken as the node to be optimized j, and a second node set containing at least one node to be optimized is obtained; The distance limit S i Including the first limit and the second limit, wherein: Based on the distance limit S of the node j to be optimized j Calculate the adjustment distance, including: For any node j2 in the second node set v Obtain the second set of nodes excluding node j2. v Other than the reference node, the node j2 is obtained. v The corresponding reference node set, where v is a positive integer less than or equal to the number of nodes in the second node set; For any reference node j3 in the set of reference nodes w Calculate the reference node j3 w The difference between the corresponding first limit and the second limit is used to obtain the second difference, where w is a positive integer less than or equal to the number of nodes in the reference node set; The sum of all second differences in the reference node set is calculated to obtain node j2. v The corresponding sub-adjustment distance; The minimum value of the sub-adjustment distance in the second node set is determined to be the adjustment distance.

6. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the path data processing method as described in any one of claims 1 to 4.

7. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method for processing path data as described in any one of claims 1 to 4.