Expressway shortest path fitting method based on graph partitioning technology
Through the shortest path fitting method of highways based on graph partitioning technology, the problem of excessive memory usage of parameters in the middle of the highway billing module is solved, and more efficient path fitting and computing performance is achieved.
Patent Information
- Application Number
- CN202510024778.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the memory of the intermediate parameters loaded by the highway billing module is too large, resulting in insufficient computing performance and cannot meet the increasingly complex demand of the highway road network structure.
The shortest path fitting method of highways based on graph partitioning technology is adopted. By constructing a highway road network model, key hub nodes are selected, graph partitioning is performed, the shortest path intermediate parameters between any two hub nodes in each partition are calculated, and path fitting is performed in combination with the intermediate parameters of the boundary hub nodes.
It effectively reduces the memory usage of intermediate parameters, improves the computational efficiency of path fitting, solves the problem of excessive memory usage of billing modules, and ensures the performance of path fitting.
Smart Images

Figure CN119889076A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of intelligent transportation technology, and in particular to a highway shortest path fitting method based on graph partitioning technology. Background Art
[0002] At 0:00 on January 1, 2020, the project of canceling provincial boundary toll stations on expressways completed the whole network connection switch, and all 487 provincial boundary toll stations across the country were cancelled, realizing the quick toll collection of inter-provincial vehicles without stopping, which greatly improved the timeliness and convenience of inter-provincial logistics and transportation. After the network connection switch, the whole network system adopts the segmented billing method, and the ETC exit lane does not display the full toll, and ETC users cannot know the toll in time. In order to meet the travel needs of ETC users, the Ministry of Transport organized the "Tenth Campaign" on the basis of canceling the provincial boundary station project. On May 6, 2020, the national expressways successfully completed the fee display optimization project of "one trip, one payment, one inspection, and one bill", and the toll system gradually operated stably.
[0003] Before and after the operation of the national "one network", the travel and billing methods of expressways have undergone major changes in accordance with the unified technical plan of the Ministry of Transport. Before the cancellation of provincial border stations, each province adopted a closed billing and collection mode. Inter-provincial vehicles need to stop and pay when passing through provincial border stations, and the toll collection systems of each province will conduct fitting billing on their own; after the cancellation of provincial border stations, a segmented billing mode is adopted. Inter-provincial vehicles no longer need to stop and pay when passing through provincial borders, and the exit toll stations can conduct fitting billing through the inter-provincial online billing interface of the Ministry Center. In order to implement this billing method, the Ministry Center compiled and released an overall technical plan. First, a large number of gantry systems were newly built by each province to provide basic equipment support for the implementation of segmented billing. Secondly, a unified billing module implementation specification was formulated to restrict the function, performance, packaging and interface of the billing module. Then, each province implemented the billing module fitting billing function according to the billing module specification, and then packaged and uploaded it to the Ministry Center's rate parameter management system. Finally, the Ministry Center uniformly dispatched and managed the billing modules and parameters of each province. On the one hand, the billing modules and parameters were sent to the gantry system to conduct segmented billing transactions for the gantry system. On the other hand, cross-provincial online billing requests were initiated to the Ministry Center in the toll station lanes of the exit provinces. The Ministry Center called the billing modules of each province one by one according to the province through which the vehicle passed to complete the fee calculation and assembly of the billing results, and finally completed the one-time cross-provincial toll calculation.
[0004] In order to complete the toll calculation of inter-provincial vehicles, the Ministry Center needs to load and call the national billing module. Therefore, in the technical solution of the Ministry Center, there are strict requirements for the memory resource occupancy and computing performance of the billing modules in each province. The path fitting algorithm of the vehicle is generally a greedy algorithm with low computing efficiency. In order to meet the requirements of computing performance, the common practice is to calculate the intermediate parameters of the path fitting and the billing parameters in advance when the billing module is initialized and load them into the memory together, which can greatly improve the computing efficiency of the path fitting. However, with the continuous development of expressways, the highway network structure of the province is becoming more and more complex, which directly leads to the memory occupancy of the billing module gradually approaching the memory occupancy threshold required by the Ministry Center. Among them, the path fitting intermediate parameters occupy the most memory. Although expanding the memory occupancy threshold can solve the urgent need for coal, it cannot solve the problem of sustainable development. If all provinces require the expansion of memory occupancy, the server resources of the Ministry Center cannot support unlimited expansion. Therefore, studying how to compress the intermediate parameters to achieve path fitting is of great significance to the networked toll collection system.
[0005] How to compress path fitting parameters and how to balance parameter compression and computational performance have become a major research focus of highway vehicle trajectory restoration algorithms. Summary of the invention
[0006] The present invention solves the problem of excessive memory usage of intermediate parameters loaded by the billing module in the prior art, and proposes a highway shortest path fitting method based on graph partitioning technology, which can effectively reduce the memory usage of intermediate parameters and has good path fitting performance. The present invention is achieved through the following technical solutions:
[0007] A method for fitting the shortest path of a highway based on graph partitioning technology comprises the following steps:
[0008] S1: Construct a highway network model based on the routing nodes and mileage tables in the road section in the billing parameters;
[0009] S2: Based on the highway network model, a key hub node is selected; the hub node is a hub interchange node in the highway network model after the routing nodes are aggregated;
[0010] S3: According to the key hub nodes, the highway network model is preliminarily divided into regions using a graph partitioning technology to obtain a plurality of first highway network partitions;
[0011] S4: determining the boundary hub nodes of the first expressway network partition, and re-dividing the region according to the determined boundary hub nodes to obtain a plurality of second expressway network partitions;
[0012] S5: Calculate the intermediate parameters of the shortest path between any two hub nodes in each of the second highway network partitions to obtain a first set of intermediate parameters; the intermediate parameters include information of the starting hub node, information of the ending hub node, and mileage information from the starting hub node to the ending hub node, and the intermediate parameters of the shortest path refer to the mileage of the intermediate parameters as the shortest path mileage from the starting hub node to the ending hub node;
[0013] S6: Based on the first intermediate parameter set and the odometer within the road section, calculate the intermediate parameters of the shortest path between any two of the boundary hub nodes to obtain a second intermediate parameter set;
[0014] S7: For any two toll stations, fitting is performed on the shortest paths of the first intermediate parameter set and the second intermediate parameter set to obtain the shortest path between the two toll stations.
[0015] Specifically, S1 includes the following steps:
[0016] S101: Acquire all charging parameters and extract routing node data and odometer data in the road section in the charging parameters respectively, and obtain a routing node set and an odometer set in the road section; the routing node is the connection relationship between road sections in the highway network model; the odometer in the road section includes the mileage between any two stations in the same road section, the charging unit combination, and the ETC gantry combination;
[0017] S102: polling each routing node in the routing node set, aggregating multiple virtual site codes of the same routing node, taking the smallest virtual site code as the hub node of the corresponding routing node, and obtaining a hub node set;
[0018] S103: polling each hub node in the hub node set to obtain the odometer data of the road section corresponding to each hub node; wherein each odometer data of the road section includes the odometer data of the road section with the site code of the current hub node as the starting point and the site code of other hub nodes as the end point;
[0019] S104: Grouping the odometer data in the road section corresponding to each of the hub nodes, wherein the odometer data in the road section contained in each group has a common target gantry, and the target gantry is the first gantry in the odometer data in each road section;
[0020] S105: extracting the odometer data of the road section corresponding to the shortest path in each group respectively as the odometer data set of the first road section;
[0021] S106: constructing a highway network model by taking each hub node in the hub node set as a vertex and each odometer data in the first road section odometer data set as an edge.
[0022] Specifically, S2 includes the following steps:
[0023] S201: Determine the number of partitions of the highway network model;
[0024] S202: Determine the center point location range of each partition of the highway network model according to the geographic spatial distribution characteristics of the highway network model;
[0025] S203: Select a hub node with the largest number of neighbor hub nodes as a key hub node; wherein the selected hub node is within the center point position range of each partition, and only one key hub node is selected for each partition.
[0026] The number of partitions in S21 is determined according to user input. The user determines the number of partitions by analyzing the highway network model, and then inputs the determined number into the execution entity, so that the execution entity can receive the input number of partitions of the highway network model.
[0027] Specifically, S3 includes the following steps:
[0028] S301: Divide the total number of hub nodes in the hub node set by the number of partitions of the highway network model, and round up the result to obtain an upper limit threshold of the total number of hub nodes that each partition of the highway network model can contain;
[0029] S302: excluding the key hub nodes from the hub node set, and the remaining hub nodes form a hub node set to be allocated;
[0030] S303: taking each of the key hub nodes as the initial hub node of the partition to which the key hub node belongs;
[0031] S304: For each partition of the highway network model, poll each hub node in the partition, select a hub node whose at least one neighbor hub node is not in the current partition, and obtain a first hub node set;
[0032] S305: For each partition of the highway network model, select a hub node in the first hub node set that has the least number of neighbor hub nodes in the set of hub nodes to be allocated as a second hub node;
[0033] S306: Selecting, from among all hub nodes adjacent to the second hub node in the set of hub nodes to be allocated, a hub node that is not in the partition to which the second hub node belongs and has the smallest site code as a third hub node;
[0034] S307: adding the third hub node to the partition to which the second hub node belongs;
[0035] S308: removing the third hub node from the set of hub nodes to be allocated;
[0036] S309: looping the above steps S304-S308 until the total number of hub nodes in the partition of the highway network model reaches the upper limit threshold or the set of hub nodes to be allocated is empty;
[0037] S310: Finally, multiple first expressway network partitions are obtained.
[0038] Specifically, S4 includes the following steps:
[0039] S401: For each of the first highway network partitions, poll all hub nodes in the partition, and if the currently polled hub node has a neighbor hub node that is not in the current partition, mark the connection line formed between the currently polled hub node and the neighbor hub node that is not in the current partition as a boundary connection line, and record it in a boundary connection line set;
[0040] S402: polling each boundary link in the boundary link set, and for two hub nodes on a boundary link, respectively finding the number of times the two hub nodes appear in the boundary link set, if the number of times they appear is different, selecting the hub node with a larger number of times as the boundary hub node; if the number of times they appear is the same, selecting the hub node with a smaller site code among the two hub nodes as the boundary hub node;
[0041] S403: Record the information of the original partition and associated partition of each of the boundary hub nodes, and re-divide the regions according to the boundary hub nodes determined in S402 to obtain a plurality of second highway network partitions.
[0042] Specifically, S5 includes the following steps:
[0043] S501: For each of the second highway network partitions, all hub nodes in the partition and all boundary hub nodes associated with the partition jointly form a partition hub node set of the partition;
[0044] S502: Perform a Cartesian product operation on the partition hub node set itself to obtain a first Cartesian product;
[0045] S503: For each pair of hub nodes in the first Cartesian product, if two hub nodes in the current pair of hub nodes are the same, the mileage of the intermediate parameters of the two hub nodes is set to 0; otherwise, the mileage of the intermediate parameters of the two hub nodes is set to infinity;
[0046] S504: Add all intermediate parameters with a mileage of 0 to the first queue;
[0047] S505: Take out a piece of intermediate parameter data from the head of the queue of the first queue head, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a first starting hub node and a first ending hub node;
[0048] S506: Acquire all data starting from the first terminating hub node and ending at other adjacent hub nodes of the first terminating hub node in the partition hub node set except the first starting hub node from the odometer set within the road section, to obtain a second odometer set within the road section;
[0049] S507: traverse the mileage table set in the second road section, and for a piece of data in the mileage table set in the second road section, take the terminating hub node of the data, if the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the first terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data, and add the intermediate parameter from the first starting hub node to the terminating hub node of the data to the end of the first queue;
[0050] S508: loop the above steps S505-S507 until there is no data in the first queue;
[0051] S509: For all the intermediate parameters in the current second highway network partition, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a first intermediate parameter set, wherein the first intermediate parameter set includes the intermediate parameters of the shortest path between any two hub nodes in the partition to which the first intermediate parameter set belongs.
[0052] Specifically, S6 includes the following steps:
[0053] S601: Establishing a border hub node set, wherein the border hub node set includes all border hub nodes;
[0054] S602: Perform a Cartesian product operation on the boundary hub node set itself to obtain a second Cartesian product;
[0055] S603: For each pair of hub nodes in the second Cartesian product, if two hub nodes in the current pair of hub nodes are the same, the mileage of the intermediate parameters of the two hub nodes is set to 0; otherwise, the mileage of the intermediate parameters of the two hub nodes is set to infinity;
[0056] S604: For any boundary hub node intermediate parameter, if a record whose starting hub node is the same as the starting hub node of the current boundary hub node intermediate parameter and whose ending hub node is the same as the ending hub node of the current boundary hub node intermediate parameter can be found in the first intermediate parameter set corresponding to all adjacent partitions of the current boundary hub node intermediate parameter or the mileage table set within the road section, then compare the mileage of the record with the mileage of the current boundary hub node intermediate parameter. If the mileage of the current boundary hub node intermediate parameter is greater, then update the mileage of the current boundary hub node intermediate parameter to the mileage of the record;
[0057] S605: adding intermediate parameters of all border hub nodes whose mileage is not infinitely large to the second queue;
[0058] S606: Take out a piece of intermediate parameter data from the head of the second queue, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a second starting hub node and a second ending hub node;
[0059] S607: Obtain all data starting from the second terminating hub node and ending at other boundary hub nodes from the odometer set within the road section and the first intermediate parameter set corresponding to the partition adjacent to the second terminating hub node, to obtain a third odometer set within the road section;
[0060] S608: traverse the mileage meter set within the third road section, and for a piece of data in the mileage meter set within the third road section, take the terminal hub node of the data, if the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the second terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data to the sum of the intermediate parameter mileage from the second starting hub node to the second terminating hub node and the mileage from the second terminating hub node to the terminating hub node of the data, and add the intermediate parameter from the second starting hub node to the terminating hub node of the data to the end of the second queue;
[0061] S609: looping the above steps S606-S608 until there is no data in the second queue;
[0062] S610: For the intermediate parameters of all boundary hub nodes, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a second set of intermediate parameters, wherein the second set of intermediate parameters includes the intermediate parameters of the shortest path between any two boundary hub nodes.
[0063] Specifically, S7 includes the following steps:
[0064] S701: searching, according to the odometer set in the road section, for a hub node closest to a starting toll station and a hub node closest to a terminating toll station, to obtain at least one starting hub node and at least one terminating hub node, wherein the number of starting hub nodes is no more than 2 and the number of terminating hub nodes is no more than 2;
[0065] S702: Determine a starting zone and an ending zone according to the starting hub node and the ending hub node, wherein the starting zone is the zone to which the starting toll station belongs, and the ending zone is the zone to which the ending toll station belongs;
[0066] S703: From the first intermediate parameter set corresponding to the starting partition, obtain the shortest path from the starting hub node to all boundary hub nodes of the starting partition, and obtain the starting partition shortest path set; from the first intermediate parameter set corresponding to the end partition, obtain the shortest path from the terminating hub node to all boundary hub nodes of the end partition, and obtain the end partition shortest path set;
[0067] S704: Obtain the shortest paths from all boundary hub nodes of the starting partition to all boundary hub nodes of the end partition from the second intermediate parameter set to obtain a boundary shortest path set;
[0068] S705: Concatenate all shortest paths between the starting toll station and the starting hub node, the ending toll station and the ending hub node, the starting partition shortest path set, the ending partition shortest path set, and the boundary shortest path set to generate an alternative path result set;
[0069] S706: Select the shortest path from the starting toll station to the ending toll station from the candidate path result set to obtain the shortest path data information between two toll stations.
[0070] The effective effects of the present invention are:
[0071] The present invention provides a method for fitting the shortest path of a highway based on graph partitioning technology, the method comprising: constructing a highway network model based on routing nodes in billing parameters and mileage meters within a road section, which can restore the characteristic information of the highway network model losslessly without introducing toll station parameters, and can provide basic data support for the partitioning of the highway network in subsequent processes; based on the highway network model, selecting key hub nodes, and using the key hub nodes as the starting nodes of each partition, which can avoid repeated calculations for balanced partitioning when using a graph partitioning algorithm to partition the road network, can solve the NP-hard problem of graph partitioning, and ensure fast and effective partitioning; according to the key hub nodes, using the graph partitioning technology to perform preliminary regional division of the highway network model to obtain multiple first highway network partitions, and using the graph partitioning technology can ensure that the number of intermediate parameters of each partition is not unbalanced, and at the same time ensure to minimize the edge divisions between regions; to determine the boundary hub nodes of the first expressway network partition, to determine the region to which the toll station belongs, to make the partition more complete, and to re-divide the region according to the determined boundary hub nodes to obtain multiple second expressway network partitions; to calculate the intermediate parameters of the shortest path between any two hub nodes in each of the second expressway network partitions to obtain a first intermediate parameter set, which can quickly find the intermediate parameters of the shortest path between any two hub nodes in the partition; based on the first intermediate parameter set, to calculate the intermediate parameters of the shortest path between any two of the boundary hub nodes to obtain a second intermediate parameter set, which can quickly find the intermediate parameters of the shortest path between any two boundary hub nodes; finally, for any two toll stations, the shortest paths of the first intermediate parameter set and the second intermediate parameter set are fitted to obtain the shortest path information between the two toll stations. The original shortest path intermediate parameter algorithm needs to calculate the shortest path intermediate parameters between the virtual site codes of any two hub nodes in the entire road network. With the development of expressways, the increase in hub nodes will lead to a geometric increase in intermediate parameters. In the present invention, the hub nodes are divided into blocks and boundary nodes, and the intermediate parameters in the region and the intermediate parameters of the boundary nodes are calculated respectively. The original single-layer intermediate parameters can be split into layers, which greatly compresses the magnitude of the intermediate parameters, thereby effectively reducing the memory usage of the intermediate parameters, and at the same time has better path fitting performance.Taking the highway network of a certain province in early 2024 as an example, there are 103 hub nodes, and these 103 hub nodes contain 218 virtual station codes. The original shortest path intermediate parameter algorithm needs to calculate more than 4.7w (218*218) intermediate parameters; after the 103 hub nodes are divided into 5 zones by the method provided by the present invention, on average, there are about 25 hub nodes in each partition that need to calculate the intermediate parameters (the boundary nodes belong to multiple partitions, and there are about 50 virtual sites in the partition), and 16 boundary nodes (36 virtual sites). The total number of intermediate data that needs to be calculated is reduced to about 1.4w, saving 70% of the memory space occupancy, thereby effectively reducing the memory occupancy of the intermediate parameters, and solving the problem of excessive memory occupancy of the intermediate parameters loaded by the billing module in the prior art.
[0072] The present invention can construct a highway network model based on a set of routing nodes and a set of odometers within a road section, with hub nodes as vertices of the graph and odometer data within a road section formed by adjacent hub nodes as edges. In this way, the characteristic information of the highway network model can be restored losslessly without introducing toll station parameters.
[0073] The present invention can select a hub node with the most neighbor hub nodes as a key hub node for each partition of the highway network according to the geographical spatial distribution characteristics of the highway network, and use the key hub node as the starting node of each partition. This can avoid repeated calculations for balanced partitioning when using a graph partitioning algorithm to partition the network, and can solve the NP-hard problem of graph partitioning technology.
[0074] The present invention can use the key hub node as the initial node, use the idea of NE (Neighbor Expansion) algorithm to gradually expand the partition, and finally complete the preliminary partition. In this way, it can be ensured that the nodes in the partition can form a connected graph, and at the same time, the edge division with other partitions is as small as possible, ensuring that the number of intermediate parameters of each partition is not unbalanced.
[0075] The present invention can determine the boundary hub nodes of the first expressway network partition so that toll stations between adjacent hub nodes belonging to different partitions have clear partition affiliation, thereby making the partition more complete.
[0076] The present invention can obtain the first intermediate parameter set by calculating the intermediate parameters of the shortest path between any two hub nodes in each second highway network partition. In this way, the intermediate parameters of the shortest path between any two hub nodes in the partition can be found more quickly, making the execution efficiency of the path fitting step higher.
[0077] The present invention can obtain the second intermediate parameter set by calculating the intermediate parameters of the shortest path between any two boundary hub nodes. In this way, the intermediate parameters of the shortest path between any two boundary hub nodes can be found more quickly, making the execution efficiency of the path fitting step higher.
[0078] The present invention can obtain the shortest path information between two toll stations by combining the first intermediate parameter set and the second intermediate parameter set, connecting two toll stations, adjacent hub nodes in the same road section of the two toll stations, and the shortest path of the boundary hub node of the partition to which the toll station belongs. In this way, the intermediate parameters of each partition and the intermediate parameters of the boundary hub node in the region can be calculated separately, which greatly compresses the magnitude of the intermediate parameters, thereby effectively reducing the memory usage of the intermediate parameters, and at the same time has better path fitting performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 The accompanying drawing is a flow chart of the main body of the solution of the present invention;
[0080] Figure 2 The accompanying drawing is a schematic diagram of a routing node of the present invention;
[0081] Figure 3 The accompanying drawings are schematic diagrams of characteristic points of the present invention;
[0082] Figure 4 The accompanying drawing is a schematic diagram of the hub node-based partitioning of the present invention;
[0083] Figure 5 The accompanying drawing is a schematic diagram of the boundary hub distribution after hub node partitioning according to the present invention;
[0084] Figure 6 The accompanying drawing is a schematic diagram of the fusion of three boundary hubs of the present invention;
[0085] Figure 7 The accompanying drawing is a schematic diagram of the boundary line after the boundary hub is fused according to the present invention;
[0086] Figure 8 The accompanying drawing is a schematic diagram of the fusion of two boundary hubs of the present invention;
[0087] Fig. 9 The accompanying drawing is a schematic diagram of partitioning after merging boundary nodes of the present invention;
[0088] Fig.10 The accompanying drawing is a schematic diagram of path fitting using intermediate parameters according to the present invention. DETAILED DESCRIPTION
[0089] The present invention discloses a method for fitting the shortest path of a highway based on graph partitioning technology, which can be executed by a processor or an electronic device with processing capability, such as Figure 1As shown, the method comprises the following steps:
[0090] S1, build a highway network model based on the routing nodes and mileage tables in the road section in the billing parameters.
[0091] S101: Acquire all charging parameters and extract routing node data and odometer data in the road section in the charging parameters respectively, and obtain a routing node set and an odometer set in the road section; the routing node is the connection relationship between road sections in the highway network model; the odometer in the road section includes the mileage between any two stations in the same road section, the charging unit combination, and the ETC gantry combination;
[0092] S102: polling each routing node in the routing node set, aggregating multiple virtual site codes of the same routing node, taking the smallest virtual site code as the hub node of the corresponding routing node, and obtaining a hub node set;
[0093] S103: polling each hub node in the hub node set to obtain the odometer data of the road section corresponding to each hub node; wherein each odometer data of the road section includes the odometer data of the road section with the site code of the current hub node as the starting point and the site code of other hub nodes as the end point;
[0094] S104: Grouping the odometer data in the road section corresponding to each of the hub nodes, wherein the odometer data in the road section contained in each group has a common target gantry, and the target gantry is the first gantry in the odometer data in each road section;
[0095] S105: extracting the odometer data of the road section corresponding to the shortest path in each group respectively as the odometer data set of the first road section;
[0096] S106: constructing a highway network model by taking each hub node in the hub node set as a vertex and each odometer data in the first road section odometer data set as an edge.
[0097] In order to partition the highway network in the subsequent process of this application, it is necessary to build a highway network model. The construction of the highway network model can be achieved by processing the routing nodes (hub interchange node information) in the billing parameters and the odometer information in the road section. In this way, the characteristic information of the highway network model can be restored losslessly without introducing toll station parameters.
[0098] Among them, the routing node represents the connection relationship between road sections in the highway network model. Routing node records are generated where multiple different highways intersect and connect. A routing node record uses the virtual site codes of two different road sections to indicate that one road section has a connection relationship with another road section.
[0099] For example, Figure 2 As shown in the figure, Longqiaoluo connects three expressway sections, namely the expressway section where Longqiao Toll Station (No. 3805) and Mawu Toll Station (No. 3804) are located, the expressway section where Fuling South Toll Station (No. 3202) is located, and the expressway section where Fuling West Toll Station (No. 3108) is located. Three different virtual station codes (3898, 3201, and 3198) are defined for the three sections at Longqiaoluo, which will generate three routing node records of 3198-3898, 3198-3201, and 3201-3898; similarly, Ma'anluo indicates that two sections are connected, and a routing node record of 3398-3899 will be generated.
[0100] The present application can aggregate routing nodes into hub interchange nodes (referred to as hub nodes) in a highway network as point information in a highway network model.
[0101] Among them, the mileage table within the section contains the mileage information between any two stations (including virtual stations) within the same section, as well as the toll unit combination information and ETC gantry combination information within the same section. The edge information between hub nodes can be obtained through the mileage table within the section. If two hub nodes are adjacent, the mileage record between the two hub nodes can be queried through the mileage table within the section; if there are multiple hub nodes in the same section, the mileage table within the section will have records across hub nodes. In order to obtain the connection relationship between adjacent hub nodes, for the mileage table records within the section with the same starting node, the mileage table record within the section with the smallest toll unit (shortest path) can be selected to generate the connection relationship between adjacent hub nodes.
[0102] S2, based on the highway network model, selecting key hub nodes; the hub nodes are hub interchange nodes in the highway network model after the routing nodes are aggregated.
[0103] S201: Determine the number of partitions of the highway network model;
[0104] S202: Determine the center point location range of each partition of the highway network model according to the geographic spatial distribution characteristics of the highway network model;
[0105] S203: Select a hub node with the largest number of neighbor hub nodes as a key hub node; wherein the selected hub node is within the center point position range of each partition, and only one key hub node is selected for each partition.
[0106] In the embodiment of the present application, the distribution characteristics of key hub nodes are analyzed in combination with the highway network model, and key hub nodes are selected, mainly to find the key feature points of the graph partition, which are used to initialize the initial nodes of the graph partition. The usual graph partitioning problem is an NP-hard problem, and achieving uniform or balanced graph partitioning has a high computational complexity. The rate parameter compiler determines the key hub nodes of the partition based on experience, and uses these key hub nodes as the starting nodes of each partition. This can avoid repeated calculations for balanced partitioning when using the graph partitioning algorithm to partition the road network. In this way, the NP-hard problem caused by using graph partitioning technology to partition the highway network model can be effectively solved, and fast and effective partitioning can be performed.
[0107] For example, experts in this field combine the highway network model to find the sparser and less dense parts, and then try to minimize the segmentation of the road section, and then determine an area. Figure 4 For example, first determine the E partition, which includes 20-30 hub nodes, then try to ensure that other partitions also include 20-30 hub nodes, continue to find sections with fewer divisions to determine the range, and finally determine the five partitions of A, B, C, D, and E. After determining the number of partitions, then input the number of partitions to the execution subject (such as a processor or an electronic device with processing capabilities), so that the execution subject (such as a processor or an electronic device with processing capabilities) can receive the input number of partitions. Combined with the highway network model, from the overall geographic space perspective and the density of each hub node, analyze the distribution characteristics of the hub nodes, so as to determine the center point position range of each partition. Within the center point range of each partition, select a hub node with the largest degree (the most neighbor hub nodes) as the key hub node (i.e., feature point), where the neighbor hub nodes may not be within the center point range of each partition.
[0108] For example, take the road network map of a province as an example. Figure 3 As shown, it is divided into 5 areas. Five hub nodes A, B, C, D, and E can be selected as key hub nodes (feature points). Each feature point has four adjacent hub nodes in its respective area.
[0109] S3, according to the key hub nodes, using graph partitioning technology to perform preliminary regional division of the highway network model to obtain a plurality of first highway network partitions.
[0110] S301: Divide the total number of hub nodes in the hub node set by the number of partitions of the highway network model, and round up the result to obtain an upper limit threshold of the total number of hub nodes that each partition of the highway network model can contain;
[0111] S302: excluding the key hub nodes from the hub node set, and the remaining hub nodes form a hub node set to be allocated;
[0112] S303: taking each of the key hub nodes as the initial hub node of the partition to which the key hub node belongs;
[0113] S304: For each partition of the highway network model, poll each hub node in the partition, select a hub node whose at least one neighbor hub node is not in the current partition, and obtain a first hub node set;
[0114] S305: For each partition of the highway network model, select a hub node in the first hub node set that has the least number of neighbor hub nodes in the set of hub nodes to be allocated as a second hub node;
[0115] S306: Selecting, from among all hub nodes adjacent to the second hub node in the set of hub nodes to be allocated, a hub node that is not in the partition to which the second hub node belongs and has the smallest site code as a third hub node;
[0116] S307: adding the third hub node to the partition to which the second hub node belongs;
[0117] S308: removing the third hub node from the set of hub nodes to be allocated;
[0118] S309: looping the above steps S304-S308 until the total number of hub nodes in the partition of the highway network model reaches the upper limit threshold or the set of hub nodes to be allocated is empty;
[0119] S310: Finally, multiple first expressway network partitions are obtained.
[0120] In the embodiment of the present application, after the key hub nodes are used as the initial nodes of the corresponding partitions, all hub nodes in the highway network model need to be divided into various partitions. In order to ensure the balance of the number of hub nodes in each partition, the hub nodes in the partition can form a connected graph (that is, any two hub nodes in the partition are connected), and the graph partitioning technology can be used to divide the hub nodes in the highway network model into different areas.
[0121] The core idea of using graph partitioning technology to partition the highway network model in combination with key hub nodes is to use key hub nodes as initial nodes and gradually expand the partition using the idea of NE (Neighbor Expansion) algorithm. This ensures that the hub nodes in the partition can form a connected graph, while minimizing the edge divisions with other regions and ensuring that the number of intermediate parameters in each partition is not unbalanced.
[0122] S4, determining the boundary hub nodes of the first highway network partition, and re-dividing the area according to the determined boundary hub nodes to obtain multiple second highway network partitions.
[0123] S401: For each of the first highway network partitions, poll all hub nodes in the partition, and if the currently polled hub node has a neighbor hub node that is not in the current partition, mark the connection line formed between the currently polled hub node and the neighbor hub node that is not in the current partition as a boundary connection line, and record it in a boundary connection line set;
[0124] S402: polling each boundary link in the boundary link set, and for two hub nodes on a boundary link, respectively finding the number of times the two hub nodes appear in the boundary link set, if the number of times they appear is different, selecting the hub node with a larger number of times as the boundary hub node; if the number of times they appear is the same, selecting the hub node with a smaller site code among the two hub nodes as the boundary hub node;
[0125] S403: Record the information of the original partition and associated partition of each of the boundary hub nodes, and re-divide the regions according to the boundary hub nodes determined in S402 to obtain a plurality of second highway network partitions.
[0126] like Figure 4 As shown, after different hub nodes are divided into different zones in the embodiment of the present application, the highway network has completed the preliminary zone division, but at this time, it has not been determined which zone the toll stations between adjacent zones belong to, that is, it has not been determined which zone the toll stations between two adjacent hub nodes belonging to different zones belong to. Figure 5As shown in the figure, after the hub nodes are divided into regions, two adjacent hub nodes belonging to different partitions (the hub nodes circled in the figure) constitute a cross-regional hub node combination. The toll stations on the middle sections of these cross-regional hub node combinations do not belong to any partition. In order to solve this problem and make each toll station have its own clear partition, it is necessary to fuse these cross-regional hub node combination data. After fusion, the hub nodes on the boundary line are the boundary hub nodes, and each partition will be bounded by the fused boundary hub nodes. In this way, the toll stations between adjacent hub nodes belonging to different partitions can have clear partition affiliation, making the partition more complete.
[0127] For example, Figure 6 As shown in the figure, there are three partitions, Partition 1, Partition 2 and Partition 3. Partition 1 has hub node B, Partition 2 has hub node A, and Partition 3 has hub node C. Hub node A is adjacent to hub node B, and hub node A is adjacent to hub node C, forming two boundary connection lines AB and AC. Because hub node A appears twice, while hub node B and hub node C only appear once, hub node A is defined as a boundary hub node. Hub node A is a common boundary hub node for partitions 1, 2, and 3. After this definition, the new partition logical boundary line will be as follows Figure 7 As shown, the toll station in the middle of the border connecting line AB belongs to zone 1, and the toll station in the middle of the border connecting line AC belongs to zone 3.
[0128] For example, Figure 8 As shown in the figure, two partitions are adjacent, hub node A is in partition 2, hub node B is in partition 1, hub node A is adjacent to hub node B, forming a boundary connection line AB. Because the code of hub node A (4299) is smaller than the code of hub node B (4896), hub node A is defined as a boundary hub node.
[0129] In this embodiment, the highway network partition after the fusion processing of steps S41-S43 is as follows: Fig. 9 As shown, 14 hub nodes are defined as boundary hub nodes.
[0130] S5, calculate the intermediate parameters of the shortest path between any two hub nodes in each of the second highway network divisions to obtain a first set of intermediate parameters; the intermediate parameters include the starting hub node information, the ending hub node information, and the mileage information from the starting hub node to the ending hub node, and the intermediate parameters of the shortest path refer to the mileage of the intermediate parameters as the shortest path mileage from the starting hub node to the ending hub node.
[0131] S501: For each of the second highway network partitions, all hub nodes in the partition and all boundary hub nodes associated with the partition jointly form a partition hub node set of the partition;
[0132] S502: Perform a Cartesian product operation on the partition hub node set itself to obtain a first Cartesian product;
[0133] S503: For each pair of hub nodes in the first Cartesian product, if two hub nodes in the current pair of hub nodes are the same, the mileage of the intermediate parameters of the two hub nodes is set to 0; otherwise, the mileage of the intermediate parameters of the two hub nodes is set to infinity;
[0134] S504: Add all intermediate parameters with a mileage of 0 to the first queue;
[0135] S505: Take out a piece of intermediate parameter data from the head of the queue of the first queue head, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a first starting hub node and a first ending hub node;
[0136] S506: Acquire all data starting from the first terminating hub node and ending at other adjacent hub nodes of the first terminating hub node in the partition hub node set except the first starting hub node from the odometer set within the road section, to obtain a second odometer set within the road section;
[0137] S507: traverse the mileage table set in the second road section, and for a piece of data in the mileage table set in the second road section, take the terminating hub node of the data, if the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the first terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data, and add the intermediate parameter from the first starting hub node to the terminating hub node of the data to the end of the first queue;
[0138] S508: loop the above steps S505-S507 until there is no data in the first queue;
[0139] S509: For all the intermediate parameters in the current second highway network partition, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a first intermediate parameter set, wherein the first intermediate parameter set includes the intermediate parameters of the shortest path between any two hub nodes in the partition to which the first intermediate parameter set belongs.
[0140] In an embodiment of the present application, combined with the mileage meter within the road section, the intermediate parameters of the shortest path between any two hub nodes in each partition can be calculated. In this way, the intermediate parameters of the shortest path between any two hub nodes in the partition can be found more quickly, making the execution efficiency of the path fitting step higher.
[0141] S6, based on the first intermediate parameter set and the odometer within the road section, calculate the intermediate parameters of the shortest path between any two of the boundary hub nodes to obtain a second intermediate parameter set.
[0142] S601: Establishing a border hub node set, wherein the border hub node set includes all border hub nodes;
[0143] S602: Perform a Cartesian product operation on the boundary hub node set itself to obtain a second Cartesian product;
[0144] S603: For each pair of hub nodes in the second Cartesian product, if two hub nodes in the current pair of hub nodes are the same, the mileage of the intermediate parameters of the two hub nodes is set to 0; otherwise, the mileage of the intermediate parameters of the two hub nodes is set to infinity;
[0145] S604: For any boundary hub node intermediate parameter, if a record whose starting hub node is the same as the starting hub node of the current boundary hub node intermediate parameter and whose ending hub node is the same as the ending hub node of the current boundary hub node intermediate parameter can be found in the first intermediate parameter set corresponding to all adjacent partitions of the current boundary hub node intermediate parameter or the mileage table set within the road section, then compare the mileage of the record with the mileage of the current boundary hub node intermediate parameter. If the mileage of the current boundary hub node intermediate parameter is greater, then update the mileage of the current boundary hub node intermediate parameter to the mileage of the record;
[0146] S605: adding intermediate parameters of all border hub nodes whose mileage is not infinitely large to the second queue;
[0147] S606: Take out a piece of intermediate parameter data from the head of the second queue, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a second starting hub node and a second ending hub node;
[0148] S607: Obtain all data starting from the second terminating hub node and ending at other boundary hub nodes from the odometer set within the road section and the first intermediate parameter set corresponding to the partition adjacent to the second terminating hub node, to obtain a third odometer set within the road section;
[0149] S608: traverse the mileage meter set within the third road section, and for a piece of data in the mileage meter set within the third road section, take the terminal hub node of the data, if the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the second terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data to the sum of the intermediate parameter mileage from the second starting hub node to the second terminating hub node and the mileage from the second terminating hub node to the terminating hub node of the data, and add the intermediate parameter from the second starting hub node to the terminating hub node of the data to the end of the second queue;
[0150] S609: looping the above steps S606-S608 until there is no data in the second queue;
[0151] S610: For the intermediate parameters of all boundary hub nodes, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a second set of intermediate parameters, wherein the second set of intermediate parameters includes the intermediate parameters of the shortest path between any two boundary hub nodes.
[0152] In the embodiment of the present application, only the intermediate parameters of the shortest path within the partition obtained in step S5 are available, and the path information of two hub nodes across partitions cannot be calculated. The intermediate parameter information of the shortest path between any two boundary hub nodes is also required. In this way, the intermediate parameters of the shortest path between any two boundary hub nodes can be found more quickly, making the execution efficiency of the path fitting step higher.
[0153] S7, for any two toll stations, fitting the shortest paths of the first intermediate parameter set and the second intermediate parameter set to obtain the shortest path between the two toll stations.
[0154] S701: searching, according to the odometer set in the road section, for a hub node closest to a starting toll station and a hub node closest to a terminating toll station, to obtain at least one starting hub node and at least one terminating hub node, wherein the number of starting hub nodes is no more than 2 and the number of terminating hub nodes is no more than 2;
[0155] S702: Determine a starting zone and an ending zone according to the starting hub node and the ending hub node, wherein the starting zone is the zone to which the starting toll station belongs, and the ending zone is the zone to which the ending toll station belongs;
[0156] S703: From the first intermediate parameter set corresponding to the starting partition, obtain the shortest path from the starting hub node to all boundary hub nodes of the starting partition, and obtain the starting partition shortest path set; from the first intermediate parameter set corresponding to the end partition, obtain the shortest path from the terminating hub node to all boundary hub nodes of the end partition, and obtain the end partition shortest path set;
[0157] S704: Obtain the shortest paths from all boundary hub nodes of the starting partition to all boundary hub nodes of the end partition from the second intermediate parameter set to obtain a boundary shortest path set;
[0158] S705: Concatenate all shortest paths between the starting toll station and the starting hub node, the ending toll station and the ending hub node, the starting partition shortest path set, the ending partition shortest path set, and the boundary shortest path set to generate an alternative path result set;
[0159] S706: Select the shortest path from the starting toll station to the ending toll station from the candidate path result set to obtain the shortest path data information between two toll stations.
[0160] In the embodiment of the present application, after the above steps S5 and S6, we obtain the intermediate parameters of the shortest path between any two boundary hub nodes (the second intermediate parameter set) and the intermediate parameters of the shortest path between any two hub nodes in the partition (the first intermediate parameter set), and connect the shortest paths of two toll stations, the adjacent hub nodes in the same section of the two toll stations, and the boundary hub nodes of the partition to which the toll stations belong, and we can obtain the shortest path information between the two toll stations. In this way, the intermediate parameters of each partition and the intermediate parameters of the boundary hub nodes in the region can be calculated separately, which greatly compresses the magnitude of the intermediate parameters, thereby effectively reducing the memory usage of the intermediate parameters, and having better path fitting performance.
[0161] For example, let the starting toll station be S1 and the terminal toll station be S2. According to the mileage table in the road section, find the adjacent hub nodes A1 and A2 in the same road section of toll station S1 and the adjacent hub nodes B1 and B2 in the same road section of toll station S2 (because the toll station belongs to a single road section, there is at least one and at most two adjacent hub nodes in the same road section of toll stations. Here, it is taken as an example that each toll station in the same road section has two adjacent hub nodes). According to the adjacent hub nodes of the starting toll station S1 and the adjacent hub nodes of the terminal toll station S2, determine the partition to which the starting toll station S1 belongs as the starting partition and the partition to which the terminal toll station S2 belongs as the terminal. From the first intermediate parameter set corresponding to the starting partition, the shortest paths from the hub nodes A1 and A2 to all the boundary hub nodes R1, R2...Rn of the starting partition are obtained, and the shortest path set of the starting partition is obtained; from the first intermediate parameter set corresponding to the end partition, the shortest paths from the hub nodes B1 and B2 to all the boundary hub nodes R1`, R2`...Rn` of the end partition are obtained, and the shortest path set of the end partition is obtained. From the second intermediate parameter set, the shortest paths from the boundary hub nodes R1, R2...Rn of the starting partition to the boundary hub nodes R1`, R2`...Rn` of the end partition are obtained, and the boundary shortest path set is obtained. All the shortest paths between the starting toll station S1 and the hub nodes A1 and A2, the terminal toll station S2 and the hub nodes B1 and B2, as well as the starting partition shortest path set, the terminal partition shortest path set and the boundary shortest path set are connected in series to generate an alternative path result set, and the shortest path from the starting toll station S1 to the terminal toll station S2 in the alternative path result set is selected to obtain the shortest path data information between the two toll stations.
[0162] In an embodiment of the present application, by obtaining a set of routing nodes and a set of odometers within a road section, constructing a highway network model, selecting key hub nodes, using graph partitioning technology to divide the highway network model into regions, determining the boundary hub nodes of the highway network partitions, calculating the intermediate parameters of the shortest path between any two hub nodes in each highway network partition, calculating the intermediate parameters of the shortest path between any two boundary hub nodes, and performing shortest path data fitting processing operations, the intermediate parameters of each partition in the region and the intermediate parameters of the boundary hub nodes can be calculated separately, and the original single-layer intermediate parameters can be split into layers, which greatly compresses the magnitude of the intermediate parameters, thereby effectively reducing the memory usage of the intermediate parameters, and at the same time having good path fitting performance.
Claims
1. A highway shortest path fitting method based on graph partitioning technology, characterized in that: The following steps are involved: S1: Construct a highway network model based on the routing nodes and mileage tables in the road section in the billing parameters; S2: Based on the highway network model, a key hub node is selected; the hub node is a hub interchange node in the highway network model after the routing nodes are aggregated; S3: According to the key hub nodes, the highway network model is preliminarily divided into regions using a graph partitioning technology to obtain a plurality of first highway network partitions; S4: determining the boundary hub nodes of the first expressway network partition, and re-dividing the regions according to the determined boundary hub nodes to obtain a plurality of second expressway network partitions; S5: Calculate the intermediate parameters of the shortest path between any two hub nodes in each of the second highway network partitions to obtain a first set of intermediate parameters; the intermediate parameters include information of the starting hub node, information of the ending hub node, and mileage information from the starting hub node to the ending hub node, and the intermediate parameters of the shortest path refer to the mileage of the intermediate parameters as the shortest path mileage from the starting hub node to the ending hub node; S6: Based on the first intermediate parameter set and the odometer within the road section, calculate the intermediate parameters of the shortest path between any two of the boundary hub nodes to obtain a second intermediate parameter set; S7: For any two toll stations, fitting processing is performed on the shortest paths of the first intermediate parameter set and the second intermediate parameter set to obtain the shortest path between the two toll stations.
2. The highway shortest path fitting method based on graph partitioning technology according to claim 1 is characterized in that: S1 includes the following steps: S101: Acquire all charging parameters and extract routing node data and odometer data in the road section from the charging parameters respectively to obtain a routing node set and an odometer set in the road section; The routing node is the connection relationship between sections in the highway network model; the mileage table within the section includes the mileage between any two stations in the same section, the toll unit combination, and the ETC gantry combination; S102: polling each routing node in the routing node set, aggregating multiple virtual site codes of the same routing node, taking the smallest virtual site code as the hub node of the corresponding routing node, and obtaining a hub node set; S103: polling each hub node in the hub node set to obtain the odometer data of the road section corresponding to each hub node; wherein each odometer data of the road section includes the odometer data of the road section with the site code of the current hub node as the starting point and the site code of other hub nodes as the end point; S104: Grouping the odometer data in the road section corresponding to each of the hub nodes, wherein the odometer data in the road section contained in each group has a common target gantry, and the target gantry is the first gantry in the odometer data in each road section; S105: extracting the odometer data of the road section corresponding to the shortest path in each group respectively as the odometer data set of the first road section; S106: constructing a highway network model by taking each hub node in the hub node set as a vertex and each odometer data in the first road section odometer data set as an edge.
3. The highway shortest path fitting method based on graph partitioning technology according to claim 1 is characterized in that: S2 includes the following steps: S201: Determine the number of partitions of the highway network model; S202: Determine the center point location range of each partition of the highway network model according to the geographic spatial distribution characteristics of the highway network model; S203: Select a hub node with the largest number of neighbor hub nodes as a key hub node; wherein the selected hub node is within the center point position range of each partition, and only one key hub node is selected for each partition.
4. The highway shortest path fitting method based on graph partitioning technology according to claim 3 is characterized in that: The number of partitions in S21 is determined according to user input. The user determines the number of partitions by analyzing the highway network model, and then inputs the determined number into the execution entity, so that the execution entity can receive the input number of partitions of the highway network model.
5. The highway shortest path fitting method based on graph partitioning technology according to claim 3 or 4 is characterized in that: S3 includes the following steps: S301: Divide the total number of hub nodes in the hub node set by the number of partitions of the highway network model, and round up the result to obtain an upper limit threshold of the total number of hub nodes that each partition of the highway network model can contain; S302: excluding the key hub nodes from the hub node set, and the remaining hub nodes form a hub node set to be allocated; S303: taking each of the key hub nodes as the initial hub node of the partition to which the key hub node belongs; S304: For each partition of the highway network model, poll each hub node in the partition, select a hub node whose at least one neighbor hub node is not in the current partition, and obtain a first hub node set; S305: For each partition of the highway network model, select a hub node in the first hub node set that has the least number of neighbor hub nodes in the set of hub nodes to be allocated as a second hub node; S306: Selecting, from among all hub nodes adjacent to the second hub node in the set of hub nodes to be allocated, a hub node that is not in the partition to which the second hub node belongs and has the smallest site code as a third hub node; S307: adding the third hub node to the partition to which the second hub node belongs; S308: removing the third hub node from the set of hub nodes to be allocated; S309: looping the above steps S304-S308 until the total number of hub nodes in the partition of the highway network model reaches the upper limit threshold or the set of hub nodes to be allocated is empty; S310: Finally, multiple first expressway network partitions are obtained.
6. The highway shortest path fitting method based on graph partitioning technology according to claim 5 is characterized in that: S4 includes the following steps: S401: For each of the first highway network partitions, poll all hub nodes in the partition, and if the currently polled hub node has a neighbor hub node that is not in the current partition, mark the connection line formed between the currently polled hub node and the neighbor hub node that is not in the current partition as a boundary connection line, and record it in a boundary connection line set; S402: polling each boundary link in the boundary link set, and for two hub nodes on a boundary link, respectively finding the number of times the two hub nodes appear in the boundary link set, and if the number of times the two hub nodes appear is different, selecting the hub node with a larger number of times as the boundary hub node; If the number of occurrences is the same, the hub node with the smaller site code among the two hub nodes is selected as the boundary hub node; S403: Record the information of the original partition and associated partition of each of the boundary hub nodes, and re-divide the regions according to the boundary hub nodes determined in S402 to obtain a plurality of second highway network partitions.
7. The highway shortest path fitting method based on graph partitioning technology according to claim 1 is characterized in that: S5 includes the following steps: S501: For each of the second highway network partitions, all hub nodes in the partition and all boundary hub nodes associated with the partition jointly form a partition hub node set of the partition; S502: Perform a Cartesian product operation on the partition hub node set itself to obtain a first Cartesian product; S503: For each pair of hub nodes in the first Cartesian product, if two hub nodes in the current pair of hub nodes are the same, setting the mileage of the intermediate parameters of the two hub nodes to 0; Otherwise, the mileage of the intermediate parameters of these two hub nodes is set to infinity; S504: Add all intermediate parameters with a mileage of 0 to the first queue; S505: Take out a piece of intermediate parameter data from the head of the queue of the first queue head, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a first starting hub node and a first ending hub node; S506: Acquire all data starting from the first terminating hub node and ending at other adjacent hub nodes of the first terminating hub node in the partition hub node set except the first starting hub node from the odometer set within the road section, to obtain a second odometer set within the road section; S507: traverse the mileage table set in the second road section, and for a piece of data in the mileage table set in the second road section, take the terminating hub node of the data, if the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the first terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the first starting hub node to the terminating hub node of the data, and add the intermediate parameter from the first starting hub node to the terminating hub node of the data to the end of the first queue; S508: loop the above steps S505-S507 until there is no data in the first queue; S509: For all the intermediate parameters in the current second highway network partition, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a first intermediate parameter set, wherein the first intermediate parameter set includes the intermediate parameters of the shortest path between any two hub nodes in the partition to which the first intermediate parameter set belongs.
8. The highway shortest path fitting method based on graph partitioning technology according to claim 1 is characterized in that: S6 includes the following steps: S601: Establishing a border hub node set, wherein the border hub node set includes all border hub nodes; S602: Perform a Cartesian product operation on the boundary hub node set itself to obtain a second Cartesian product; S603: For each pair of hub nodes in the second Cartesian product, if two hub nodes in the current pair of hub nodes are the same, the mileage of the intermediate parameters of the two hub nodes is set to 0; otherwise, the mileage of the intermediate parameters of the two hub nodes is set to infinity; S604: For any boundary hub node intermediate parameter, if a record whose starting hub node is the same as the starting hub node of the current boundary hub node intermediate parameter and whose ending hub node is the same as the ending hub node of the current boundary hub node intermediate parameter can be found in the first intermediate parameter set corresponding to all adjacent partitions of the current boundary hub node intermediate parameter or the mileage table set within the road section, then compare the mileage of the record with the mileage of the current boundary hub node intermediate parameter. If the mileage of the current boundary hub node intermediate parameter is greater, then update the mileage of the current boundary hub node intermediate parameter to the mileage of the record; S605: adding intermediate parameters of all border hub nodes whose mileage is not infinitely large to the second queue; S606: Take out a piece of intermediate parameter data from the head of the second queue, determine the starting and ending hub nodes of the current intermediate parameter data, and obtain a second starting hub node and a second ending hub node; S607: Acquire all data starting from the second terminating hub node and ending at other boundary hub nodes from the odometer set within the road section and the first intermediate parameter set corresponding to the partition adjacent to the second terminating hub node, to obtain a third odometer set within the road section; S608: traverse the mileage meter set within the third road section, and for a piece of data in the mileage meter set within the third road section, take the terminal hub node of the data, if the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data is greater than the intermediate parameter mileage from the first starting hub node to the first terminating hub node plus the mileage from the second terminating hub node to the terminating hub node of the data, then update the intermediate parameter mileage from the second starting hub node to the terminating hub node of the data to the sum of the intermediate parameter mileage from the second starting hub node to the second terminating hub node and the mileage from the second terminating hub node to the terminating hub node of the data, and add the intermediate parameter from the second starting hub node to the terminating hub node of the data to the end of the second queue; S609: looping the above steps S606-S608 until there is no data in the second queue; S610: For the intermediate parameters of all boundary hub nodes, filter out the intermediate parameters with mileage of 0 and infinite mileage to obtain a second set of intermediate parameters, wherein the second set of intermediate parameters includes the intermediate parameters of the shortest path between any two boundary hub nodes.
9. The highway shortest path fitting method based on graph partitioning technology according to claim 1 is characterized in that: S7 includes the following steps: S701: searching, according to the odometer set in the road section, for a hub node closest to a starting toll station and a hub node closest to a terminating toll station, to obtain at least one starting hub node and at least one terminating hub node, wherein the number of starting hub nodes is no more than 2 and the number of terminating hub nodes is no more than 2; S702: Determine a starting zone and an ending zone according to the starting hub node and the ending hub node, wherein the starting zone is the zone to which the starting toll station belongs, and the ending zone is the zone to which the ending toll station belongs; S703: From the first intermediate parameter set corresponding to the starting partition, obtain the shortest path from the starting hub node to all boundary hub nodes of the starting partition, and obtain the starting partition shortest path set; from the first intermediate parameter set corresponding to the end partition, obtain the shortest path from the terminating hub node to all boundary hub nodes of the end partition, and obtain the end partition shortest path set; S704: Obtain the shortest paths from all boundary hub nodes of the starting partition to all boundary hub nodes of the end partition from the second intermediate parameter set to obtain a boundary shortest path set; S705: Concatenate all shortest paths between the starting toll station and the starting hub node, the ending toll station and the ending hub node, the starting partition shortest path set, the ending partition shortest path set, and the boundary shortest path set to generate an alternative path result set; S706: Select the shortest path from the starting toll station to the ending toll station from the candidate path result set to obtain the shortest path data information between two toll stations.
Citation Information
Cited By
Position-based information processing method and device
CN121480909A