A traffic network segmentation analysis method and system based on graph theory
By constructing a traffic network diagram based on graph theory and using the multi-cycle dichotomy method, the problem of low efficiency of traffic network segmentation analysis in the existing technology is solved, fast and efficient traffic network segmentation analysis is achieved, and the segmentation cost is reduced.
Patent Information
- Application Number
- CN202410525806.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-04-29
AI Technical Summary
The existing technology lacks effective transportation network structure analysis methods, resulting in slow calculation speed and low efficiency when segmenting the transportation network.
A method based on graph theory is used to construct a transportation network diagram, determine the weight coefficient according to the importance of inter-city transportation routes, and use the multi-cycle dichotomy method to calculate the optimal strategy for dividing the transportation network. The objective function is the balance of the number of cities and traffic after division. The line has the smallest weight.
It realizes fast and efficient transportation network segmentation analysis with high calculation efficiency. It can quickly obtain urban transportation network segmentation solutions that meet the requirements and reduce segmentation costs.
Smart Images

Figure CN118116208B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aviation electronics technology, and in particular to a traffic network segmentation analysis method and system based on graph theory. Background Art
[0002] Transportation network refers to the general term for land transportation, water transportation, and air transportation. It is the link between settlements. The normal operation of the transportation network plays an important role in the country's personnel transportation, logistics supply, etc. Cutting off the transportation network means dividing one or more lines in the transportation network, so that the transportation network is divided into two or more small local area networks. When dividing the transportation network, the structural analysis of the transportation network is crucial. At present, there is no better method for analyzing the structure of the transportation network. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a graph-theory-based transportation network segmentation analysis method and system with fast calculation speed and high efficiency.
[0004] Technical solution: The graph-based traffic network segmentation analysis method of the present invention comprises the following steps:
[0005] Construct an initial traffic grid based on traffic route information between cities and cities;
[0006] Determine the weight coefficient of the traffic route according to the importance of the traffic route between cities;
[0007] Constructing a traffic network diagram according to the initial traffic grid and the weight coefficients of the traffic routes, and if there are multiple traffic routes between the two cities, merging the multiple traffic routes and updating the traffic network diagram;
[0008] Taking the minimum weight coefficient of traffic routes and the balanced number of cities after segmentation as the objective function, the multiple circular bisection method is used to calculate the optimal strategy for segmenting the traffic network.
[0009] Furthermore, the step of determining the weight coefficient of the traffic route according to the importance of the traffic route between cities includes:
[0010] No. j The weight coefficient of the traffic route is P j = L j / T ;
[0011] in L j For the j The importance of transportation routes, T It is the sum of the importance of all transportation routes.
[0012] Furthermore, constructing a traffic network diagram according to the initial traffic grid and the weight coefficients of the traffic routes, merging the multiple traffic routes if there are multiple traffic routes between two cities, and updating the traffic network diagram includes:
[0013] If there are at least two transportation routes with the same city coordinates at both ends, there are multiple transportation routes between the two cities.
[0014] Furthermore, constructing a traffic network diagram according to the initial traffic grid and the weight coefficients of the traffic routes, merging the multiple traffic routes if there are multiple traffic routes between two cities, and updating the traffic network diagram includes:
[0015] If there are multiple traffic routes between two cities, merge the multiple traffic routes into a new traffic route; add the weight coefficients of the multiple traffic routes as the weight coefficient of the new traffic route, and use the smallest serial number among the multiple traffic routes as the serial number of the new traffic route; update the traffic route serial number and weight coefficient of the initial traffic grid.
[0016] Furthermore, the objective function is to minimize the cost of traffic routes and balance the number of cities after segmentation, and to use the multiple-cycle dichotomy method to calculate the optimal strategy for segmenting the traffic network, including:
[0017] Set the target number of partitions of the traffic network graph to 2, and the objective function to: and ;in, V 1 is the total number of city nodes in partition 1, V 2 is the total number of city nodes in partition 2, K is the number of divided traffic routes, For the i The serial number of the divided traffic routes in the traffic network diagram; For the The weight coefficient of each traffic route;
[0018] The traffic network graph is thinned, partitioned and aggregated using a multiple-cycle bisection iterative method to obtain the optimal strategy for segmenting the traffic network.
[0019] Furthermore, constructing the initial traffic grid according to the traffic route information of cities and cities includes:
[0020] Map all cities to a two-dimensional coordinate system based on their coordinates;
[0021] According to the traffic route information between cities, the corresponding starting city and end city are connected to obtain the initial traffic grid.
[0022] Furthermore, constructing a traffic network diagram according to the initial traffic grid and the weight coefficients of the traffic routes, merging the multiple traffic routes if there are multiple traffic routes between two cities, and updating the traffic network diagram includes:
[0023] Take the city as the node V and the traffic routes between cities as the edge E, and build the traffic network graph G (V, E);
[0024] The node weight, all nodes adjacent to the node, and the edge weights of all nodes adjacent to the node are recorded to form a traffic map network file.
[0025] The graph-theory-based traffic network segmentation and analysis system of the present invention comprises:
[0026] An initial traffic network construction unit, used to construct an initial traffic grid based on traffic route information between cities and cities;
[0027] A traffic network diagram construction unit is used to determine the weight coefficient of the traffic route between cities according to the importance of the traffic route; construct a traffic network diagram according to the initial traffic grid and the weight coefficient of the traffic route, and if there are multiple traffic routes between two cities, merge the multiple traffic routes and update the traffic network diagram;
[0028] The segmentation strategy calculation unit is used to calculate the optimal strategy for segmenting the traffic network by using a multiple-cycle dichotomy method, taking the minimum weight coefficient of the traffic route and the balanced number of cities after segmentation as the objective function.
[0029] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the graph-theory-based traffic network segmentation analysis method is implemented.
[0030] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the graph-theory-based transportation network segmentation analysis method is implemented.
[0031] Beneficial effects: Compared with the prior art, the advantages of the present invention are: (1) the present invention converts the urban traffic network into a traffic grid and a traffic network diagram by digitally expressing the urban nodes and traffic route edges in the urban traffic network, and performs structural analysis and calculation on the traffic network diagram by using a graph cutting method; (2) the present invention uses an efficient multiple-cycle bisection method to segment the traffic lines of the urban traffic network diagram to achieve the goal of minimizing the traffic line segmentation cost; the method has high computational efficiency and can quickly calculate an urban traffic network segmentation solution that meets the requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1This is a flow chart of the traffic network segmentation and analysis method of the present invention.
[0033] Figure 2 Schematic diagram of the initial traffic grid and the importance of traffic routes according to an embodiment of the present invention.
[0034] Figure 3 This is a traffic network diagram according to an embodiment of the present invention.
[0035] Figure 4 This is a merged traffic network diagram according to an embodiment of the present invention.
[0036] Figure 5 The diagram is a schematic diagram of the data format of a traffic network diagram according to an embodiment of the present invention.
[0037] Figure 6 This is a traffic network segmentation strategy diagram according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0039] like Figure 1 As shown, the graph theory-based transportation network segmentation analysis method includes the following steps.
[0040] (1) Obtain information on cities of interest and inter-city transportation routes.
[0041] City information includes the city's serial number, name, coordinate longitude, coordinate latitude, coordinate altitude, and city importance;
[0042] Traffic route information includes route number, name, starting city number, end city number, and traffic route importance.
[0043] (2) Construct an initial traffic grid map based on city and traffic route information and display it visually. Figure 2 The figure shows the traffic grid and weight coefficients in this embodiment. This embodiment includes 10 cities and 17 traffic routes. The number after the traffic route number represents the importance of the traffic route. For example, the importance of traffic route 2 between city 1 and city 2 is 5.
[0044] (201) Convert the longitude and latitude coordinates into rectangular coordinates X and Y;
[0045] (202) Map all city points to a two-dimensional coordinate system according to rectangular coordinates X and Y;
[0046] (203) The traffic grid is obtained by connecting the starting city numbers and the ending city numbers of the traffic routes.
[0047] (3) Define the weight coefficient of the transportation line according to the importance of the inter-city transportation routes.
[0048] (301) Traverse all traffic routes and get j The importance of transportation routes L j ; The importance of this embodiment is the cost of dividing the traffic route; in practice, the importance can be determined by weighting or the like according to the transportation capacity and damage tolerance of the traffic route;
[0049] (302) Calculate the sum of the importance of all traffic routes , N is the number of traffic routes, in this embodiment N = 17, the sum of all importance T = 100, each traffic route and its importance weight is as follows Figure 3 As shown;
[0050] (303) Calculate the j The weight coefficient of the traffic route P j = L j / T .
[0051] (4) Determine whether there are multiple transportation routes between any two cities. If so, proceed to step (5); otherwise, jump to step (6).
[0052] (401) Traverse all traffic routes and get j Traffic routes X j , Y j ;
[0053] (402) j +1 to N traverse the traffic routes and get the tth traffic route X t , Y t ;
[0054] (403) Determine the rectangular coordinates of the cities on both sides of the traffic line. If X j = X t and Y j = Y t , there are multiple transportation routes between the two cities; otherwise, there are no transportation routes.
[0055] In this embodiment, there are two traffic routes between city 4 and city 7, the weight coefficient of traffic route 7 is 0.05, and the weight coefficient of traffic route 8 is 0.08.
[0056] (5) Use a weighted method to merge inter-city traffic routes and update the traffic grid.
[0057] (501) Pursuant to Article 2 j The weight coefficient of the traffic route P j and t The weight coefficient of the traffic route P t , and the weight of the traffic route is obtained by summing the weighted method. P = P j + P t ;
[0058] (502) Delete t Traffic route information.
[0059] In this embodiment, the weight coefficient of the new traffic route 7 after merging is 0.13, the original traffic route 8 is deleted, and the label of the traffic route is modified to obtain a new traffic network, such as Figure 4 shown.
[0060] (6) Construct a traffic network diagram based on the traffic grid diagram and the weight coefficients of urban traffic lines G ( V,E ).
[0061] (601) Record Points V , the number of edges E , weight recording method M ;
[0062] (602) Traverse all city nodes and record the points separately V i Weight w i , and the point V i All adjacent points V j and the edge weights w ij ;
[0063] (603) Save the generated traffic network diagram file. Figure 5 As shown, 10, 16 and 001 in the first row represent the number of points, the number of edges and the edge weight respectively. The following 10 rows represent the node numbers and weights of the 10 connected nodes respectively. For example, node 1 is connected to node 6, the edge weight is 0.04, and node 1 is connected to node 2, the edge weight is 0.05.
[0064] (7) Taking the objective function of minimizing the sum of weight coefficients of divided urban traffic lines with balanced number after division, the optimal method for traffic network division is iteratively calculated using multiple cyclic bisection method.
[0065] (701) Set the target number of partitions of the traffic network graph to 2;
[0066] (702) Set the objective function as follows: the sum of the weight coefficients of the divided urban traffic lines is minimized with balanced number after partitioning:
[0067] ;
[0068] ;
[0069] Among them, V1 is the total number of city nodes in partition 1, V2 is the total number of city nodes in partition 2, K is the number of divided traffic routes, is the serial number of the i-th divided traffic route in the traffic network graph; For the The weight coefficient of each traffic route;
[0070] (703) The MultiLevel Recursive Bisection (MLRB) method is used to perform sparse, initial partitioning and aggregation on the graph to obtain the final solution.
[0071] The traffic network segmentation strategy finally obtained in this embodiment is as follows: Figure 6 As shown, the 7th, 9th and 10th traffic routes in the traffic network diagram are deleted.
[0072] The graph-theory-based traffic network segmentation and analysis system of the present invention comprises:
[0073] An initial traffic network construction unit, used to construct an initial traffic grid based on traffic route information between cities and cities;
[0074] A traffic network diagram construction unit is used to determine the weight coefficient of the traffic route between cities according to the importance of the traffic route; construct a traffic network diagram according to the initial traffic grid and the weight coefficient of the traffic route, and if there are multiple traffic routes between two cities, merge the multiple traffic routes and update the traffic network diagram;
[0075] The segmentation strategy calculation unit is used to calculate the optimal strategy for segmenting the traffic network by using a multiple-cycle dichotomy method, taking the minimum weight coefficient of the traffic route and the balanced number of cities after segmentation as the objective function.
[0076] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the graph-theory-based traffic network segmentation analysis method is implemented.
[0077] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the graph-theory-based transportation network segmentation analysis method is implemented.
[0078] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer.
[0079] The processor is used to execute the computer program stored in the memory to implement each step of the method involved in the above embodiment.
Claims
1. A traffic network segmentation analysis method based on graph theory, characterized in that: The steps include: Construct an initial traffic grid based on traffic route information between cities and cities; Determine the weight coefficient of the traffic route according to the importance of the traffic route between cities; According to the initial traffic grid and the weight coefficients of the traffic routes, a traffic network diagram is constructed. If there are multiple traffic routes between two cities, the multiple traffic routes are merged and the traffic network diagram is updated; j The weight coefficient of the traffic route is P j = L j / T ;in L j For the j The importance of transportation routes, T is the sum of the importance of all traffic routes; if there are at least two traffic routes with the same city coordinates at both ends, there are multiple traffic routes between the two cities; if there are multiple traffic routes between the two cities, the multiple traffic routes are merged into a new traffic route; the weight coefficients of the multiple traffic routes are added together as the weight coefficient of the new traffic route, and the smallest sequence number of the multiple traffic routes is used as the sequence number of the new traffic route; the traffic route sequence number and weight coefficient of the initial traffic grid are updated; Taking the minimum weight coefficient of traffic routes and the balanced number of cities after segmentation as the objective function, the multi-cycle dichotomy method is used to calculate the optimal strategy for segmenting the traffic network; the target number of partitions of the traffic network graph is set to 2, and the objective function is: and ;in, V 1 is the total number of city nodes in partition 1, V 2 is the total number of city nodes in partition 2, K is the number of divided traffic routes, For the i The serial number of the divided traffic routes in the traffic network diagram; For the The weight coefficients of the traffic routes are calculated; the traffic network graph is thinned, partitioned and aggregated using a multiple-cycle binary iterative method to obtain the optimal strategy for segmenting the traffic network.
2. The method for segmenting and analyzing a traffic network based on graph theory according to claim 1, characterized in that: The construction of the initial traffic grid according to the traffic route information of cities and cities includes: Map all cities to a two-dimensional coordinate system based on their coordinates; According to the traffic route information between cities, the corresponding starting city and end city are connected to obtain the initial traffic grid.
3. The graph-based traffic network segmentation analysis method according to claim 1 is characterized in that: The step of constructing a traffic network diagram according to the initial traffic grid and the weight coefficients of the traffic routes, merging the multiple traffic routes if there are multiple traffic routes between the two cities, and updating the traffic network diagram includes: Take the city as the node V and the traffic routes between cities as the edge E, and build the traffic network graph G (V, E); The node weight, all nodes adjacent to the node, and the edge weights of all nodes adjacent to the node are recorded to form a traffic map network file.
4. A traffic network segmentation analysis system based on graph theory, characterized in that: include: An initial traffic network construction unit, used to construct an initial traffic grid based on traffic route information between cities and cities; A traffic network diagram construction unit is used to determine the weight coefficient of the traffic route between cities according to its importance; construct a traffic network diagram according to the initial traffic grid and the weight coefficient of the traffic route, if there are multiple traffic routes between two cities, merge the multiple traffic routes and update the traffic network diagram; j The weight coefficient of the traffic route is P j = L j / T ;in L j For the j The importance of transportation routes, T is the sum of the importance of all traffic routes; if there are at least two traffic routes with the same city coordinates at both ends, there are multiple traffic routes between the two cities; if there are multiple traffic routes between the two cities, the multiple traffic routes are merged into a new traffic route; the weight coefficients of the multiple traffic routes are added together as the weight coefficient of the new traffic route, and the smallest sequence number of the multiple traffic routes is used as the sequence number of the new traffic route; the traffic route sequence number and weight coefficient of the initial traffic grid are updated; The segmentation strategy calculation unit is used to calculate the optimal strategy for segmenting the traffic network by using the multiple-cycle dichotomy method, taking the minimum weight coefficient of the traffic route and the balanced number of cities after segmentation as the objective function; the target number of partitions of the traffic network graph is set to 2, and the objective function is: and ;in, V 1 is the total number of city nodes in partition 1, V 2 is the total number of city nodes in partition 2, K is the number of divided traffic routes, For the i The serial number of the divided traffic routes in the traffic network diagram; For the The weight coefficients of the traffic routes are calculated; the traffic network graph is thinned, partitioned and aggregated using a multiple-cycle binary iterative method to obtain the optimal strategy for segmenting the traffic network.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the graph-theory-based transportation network segmentation analysis method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the graph-theory-based transportation network segmentation analysis method according to any one of claims 1 to 3 is implemented.
