A method for optimizing public transportation networks by comprehensively considering network connectivity and commuting demand
By clustering bus trajectories using K-paths extended by the Lauid algorithm, combining the linear aggregation value of commuting needs and network connectivity, the bus network is optimized, which solves the problem that the existing technology cannot consider both network connectivity and commuting needs, and achieves efficient and economical bus network optimization.
Patent Information
- Application Number
- CN202210435139.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-04-24
AI Technical Summary
The existing bus route optimization methods cannot consider both network connectivity and commuting needs, making it difficult to effectively alleviate traffic pressure and improve the sustainability of the bus network in urbanized areas.
By obtaining vehicle positioning data, mapping trajectory data to the road network, clustering the trajectory sets using K-paths extended by the Lloyd algorithm, computing the linear aggregate value of commuting requirements and network connectivity, and outputting a new bus line.
It has achieved the optimization of the bus network, improve network connectivity and meet commuting needs without increasing construction costs, and provide more convenient bus routes to adapt to urban changes.
Smart Images

Figure CN114970960B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data mining, and in particular to a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand. Background Art
[0002] With the rapid development of urbanization, more and more people are living in metropolitan areas. A major side effect of urbanization is that traffic jams become more frequent and severe due to the increase of human activities in a limited space, which leads to unnecessary energy consumption during traffic jams. Public transportation (e.g., buses, subways) not only saves fuel and reduces congestion, but also provides a safe, affordable and convenient way to travel.
[0003] A good bus network can not only ease the pressure of urban traffic, but also help promote sustainable development and improve the quality of life. Strengthening the bus network with new bus routes can narrow this gap and therefore has the potential to shift people from private transportation to public transportation. To achieve this goal, new routes are planned based on new needs discovered in commuting records. However, existing studies do not fully meet the requirements of route planning: for cities with extensive bus coverage, building new bus stations is usually unnecessary and costly. In contrast, due to the connectivity of the road network, connecting two unconnected existing stations does not incur any additional construction costs. However, most existing studies require the construction of new bus stations. In addition to meeting the commuting needs of passengers, the ideal transportation network should also be as connected and convenient for passengers to transfer as possible, that is, new bus routes should be connected to existing routes to provide more transfer options. At present, there is no work on bus route optimization that considers both connectivity and commuting needs. There are still major challenges in designing scalable algorithms for large-scale trajectory data. In addition, many algorithms require users to make hyperparameter choices, and it is also challenging to adjust them appropriately.
[0004] Therefore, how to improve the public transportation network has become a problem that technicians in this field need to solve. Summary of the invention
[0005] The present invention provides a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand, which can overcome certain or some defects of the prior art.
[0006] According to the present invention, a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand comprises the following steps:
[0007] Step 1: Obtain vehicle positioning data, and combine the positioning data generated by each passenger transportation route into a track data;
[0008] Step 2: Map all collected trajectory data to the actual road network;
[0009] Step 3: Input the trajectory set to K-paths extended by Lloyd's algorithm to cluster the trajectory set; randomly select k paths from the trajectory set as the initial centroid paths, find the nearest centroid paths for the remaining trajectories in the trajectory set, and update the centroid path of each cluster by selecting existing trajectories that minimize the sum of distances to all other trajectories in the cluster;
[0010] Step 4: Based on all centroid paths, calculate the linear aggregation value that maximizes commuting demand and network connectivity, and output the new path composed of the centroid paths under the linear aggregation value to obtain a new bus route.
[0011] Preferably, in step one, the vehicle positioning data includes vehicle ID, time, vehicle latitude and longitude, and passenger status.
[0012] Preferably, in step 2, the deviated positioning points are treated as missing values.
[0013] Preferably, the missing value processing is to fill in the points that are missing five times or more in a row by using the mean interpolation method; the points that are missing less than five times are discarded.
[0014] Preferably, in step 3, the processed data set is pushed to the model, and the model iteratively calculates the nearest centroid trajectory to each trajectory and assigns it, and the centroid trajectory is recalculated in each iteration. Pivot tables, inverted indexes, and graph traversal algorithms are used to accelerate the selection of existing trajectories as centroid trajectories.
[0015] As a preferred method, the model training is specifically as follows: the data on each processed trajectory is encoded and compressed, and the encoding method adopts the incremental encoding method; the compressed data is pushed into the K-paths extended on the Lloyd algorithm for iterative calculation; the distance calculation formula between the trajectory to be assigned and the centroid trajectory is:
[0016] EBD(T 1 ,T 2 )=max(|T 1 |,|T 2 |)-|T 1 ∩T 2 |
[0017] Among them, T 1 ,T 2 represents two trajectories;
[0018] In each iteration, the previous centroid path u′ to all k-1 clusters needs to be maintained jThe lower bound distance lb(i, j) and the upper bound distance ub(i); after each update, the current center of mass u j and the previous center of mass u′ j In cluster S j The distance between them will be calculated as the centroid drift cd(j); before calculating the distance between the trajectory and the new centroid path, the stored boundary is updated with the centroid drift according to the triangle inequality; where:
[0019] lb(i, j) = EBD(T i ,u j ′)
[0020] ub(i)=EBD(T i ,u a′(i) )
[0021] cd(j)=EBD(u′ j ,u j ).
[0022] ua′(i) represents the trajectory T in the previous iteration i The centroid trajectory of cluster S is assigned to.
[0023] As a preferred method, the linear aggregation formula of commuting demand and network connectivity is as follows:
[0024]
[0025]
[0026] Among them, d (μ) represents the sum of the number of common edges between the route μ and the trajectories in the given dataset; λ (μ) represents the connectivity increment for route μ, O λ (μ) = λ(G′ r )-λ(G r ),λ(G′ r ) represents G′ r The connectivity of the transportation network, λ(G r ) represents G r The connectivity of the transportation network, G r represents the old bus network, G′ r represents the new bus network enriched by the route μ; w represents the weight, D represents the set of trajectories in the given bus network; d max represents the sum of the first k values in the edge list sorted in descending order of commuting demand, λ max Represents the sum of the first k values in the edge list sorted in descending order of connectivity increment.
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] (1) The present invention adopts the bus network optimization under comprehensive consideration of network connectivity and commuting demand, and can optimize the bus network according to the vehicle positioning point data. Taking into account the user's commuting needs and the existing bus network connectivity, the K-paths under the Lloyd algorithm are used to cluster all trajectories to obtain the most representative k routes. Then, under the constraints of network connectivity and commuting demand, the maximum linear aggregation value of network connectivity and commuting demand among the k routes is calculated, and the route under this value is output to obtain a new bus route.
[0029] (2) The present invention deploys the model on a server and proposes recommended routes for optimizing a city's bus network to achieve more convenient bus routes.
[0030] (3) The present invention collects data on vehicle location points, uses the historical model as a pre-training model for fine-tuning, and continuously iterates and updates the model to achieve the purpose of adapting to urban changes and constantly adapting to new bus routes. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flow chart of a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand in Example 1. DETAILED DESCRIPTION
[0032] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0033] Example 1
[0034] like Figure 1 As shown, this embodiment provides a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand, which includes the following steps:
[0035] Step 1: Obtain vehicle positioning data, and combine the positioning data generated by each passenger transportation route into a track data;
[0036] The vehicle location data is obtained from Microsoft Research Asia and government portals. The vehicle location data includes vehicle ID, time, vehicle latitude and longitude, and passenger status.
[0037] Step 2: Map all collected trajectory data to the actual road network;
[0038] For the deviated positioning points, they are treated as missing values. The missing value treatment is to fill the points that are missing five times or more in a row by using the mean interpolation method; the points that are missing less than five times are discarded.
[0039] Step 3: Input the trajectory set to K-paths extended by Lloyd's algorithm to cluster the trajectory set; randomly select k paths from the trajectory set as the initial centroid paths, find the nearest centroid paths for the remaining trajectories in the trajectory set, and update the centroid path of each cluster by selecting existing trajectories that minimize the sum of distances to all other trajectories in the cluster;
[0040] The processed data set is pushed to the model, and the model iteratively calculates the nearest centroid trajectory for each trajectory and assigns it. The centroid trajectory is recalculated in each iteration. Pivot tables, inverted indexes, and graph traversal algorithms are used to accelerate the selection of existing trajectories as centroid trajectories to achieve better visualization results.
[0041] The model training is as follows: the data on each processed trajectory is encoded and compressed, and the encoding method is incremental encoding; the compressed data is pushed into the K-paths extended by the Lloyd algorithm for iterative calculation; the distance calculation formula between the trajectory to be assigned and the centroid trajectory is:
[0042] EBD(T 1 ,T 2 )=max(|T 1 |,|T 2 |)-|T 1 ∩T 2 |
[0043] Among them, T 1 ,T 2 Represents two trajectories; the advantage of using such a distance metric is that it can greatly reduce the computational complexity and improve the efficiency of the algorithm; and the accuracy of the distance metric is still very high on the data set.
[0044] In each iteration, the previous centroid path u′ to all k-1 clusters needs to be maintained j The lower bound distance lb(i, j) and the upper bound distance ub(i); after each update, the current center of mass u j and the previous center of mass u′ j In cluster S j The distance between them will be calculated as the centroid drift cd(j); before calculating the distance between the trajectory and the new centroid path, the stored boundary is updated with the centroid drift according to the triangle inequality; where:
[0045] lb(i,j)=EBD(T i ,u j ′)
[0046] ub(i)=EBD(T i ,u a′(i) )
[0047] cd(j)=EBD(u′ j ,u j ).
[0048] ua′(i) represents the trajectory T in the previous iteration i The centroid trajectory of cluster S is assigned to.
[0049] The code is as follows:
[0050]
[0051]
[0052] For the refinement of the centroid path, pivot tables, inverted indexes, and graph traversal algorithms are used to accelerate the selection of existing trajectories as centroid trajectories to achieve better visualization results. The specific code is as follows:
[0053]
[0054]
[0055] Step 4: Based on all centroid paths, calculate the linear aggregation value that maximizes commuting demand and network connectivity, and output the new path composed of the centroid paths under the linear aggregation value to obtain a new bus route.
[0056] The linear aggregation formula of commuting demand and network connectivity is as follows:
[0057]
[0058]
[0059] Among them, d (μ) represents the sum of the number of common edges between the route μ and the trajectories in the given dataset; λ (μ) represents the connectivity increment for route μ, O λ (μ) = λ(G′ r )-λ(G r ),λ(G′ r ) represents G′ r The connectivity of the transportation network, λ(G r ) represents G r The connectivity of the transportation network, G r represents the old bus network, G′ r represents the new bus network enriched by the route μ; w represents the weight, D represents the set of trajectories in the given bus network; d max represents the sum of the first k values in the edge list sorted in descending order of commuting demand, λ maxRepresents the sum of the first k values in the edge list sorted in descending order of connectivity increment.
[0060] This embodiment focuses on deployment on the server, but is not limited to the server and also includes mobile terminals of various brands. After the proprietary model is deployed on the user side, this embodiment can continuously iterate and update the model according to the newly collected data to adapt to new bus routes.
[0061] The data used in the experiment are T-driver data and NYC data, which are relatively popular data sets in the current field. The T-driver data set contains 250,997 trajectories, 126,827 edges, and a total distance of more than 9 million kilometers. The NYC data contains 407,122 commuting records, with 365,050 edges. This data set deletes trajectories that have missed five consecutive positioning points. After preprocessing, the data set has 31 million positioning points and 616,047 trajectories, which are used for training models.
[0062] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. A method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand, characterized in that: The following steps are involved: Step 1: Obtain vehicle positioning data, and combine the positioning data generated by each passenger transportation route into a track data; Step 2: Map all collected trajectory data to the actual road network; Step 3: Input the trajectory set to K-paths extended by Lloyd's algorithm to cluster the trajectory set; randomly select k paths from the trajectory set as the initial centroid paths, find the nearest centroid paths for the remaining trajectories in the trajectory set, and update the centroid path of each cluster by selecting existing trajectories that minimize the sum of distances to all other trajectories in the cluster; In step 3, the processed data set is pushed to the model, and the model iteratively calculates the nearest centroid trajectory for each trajectory and assigns it. The centroid trajectory is recalculated in each iteration. Pivot tables, inverted indexes, and graph traversal algorithms are used to accelerate the selection of existing trajectories as centroid trajectories. The model training is as follows: the data on each processed trajectory is encoded and compressed, and the encoding method is incremental encoding; the compressed data is pushed into the K-paths extended by the Lloyd algorithm for iterative calculation; the distance calculation formula between the trajectory to be assigned and the centroid trajectory is: EBD(T1, T2)=max(|T1|, |T2|)-|T1∩T2| Among them, T1 and T2 represent two trajectories; In each iteration, the previous centroid path u′ to all k-1 clusters needs to be maintained j The lower bound distance lb(i, j) and the upper bound distance ub(i); after each update, the current center of mass u j and the previous center of mass u′ j In cluster S j The distance between them will be calculated as the centroid drift cd(j); before calculating the distance between the trajectory and the new centroid path, the stored boundary is updated with the centroid drift according to the triangle inequality; where: lb(i,j)=EBD(T i ,u j ′) ub(i)=EBD(T i ,u a′(i) ) cd(j)=EBD(u j you j ); ua′(i) represents the trajectory T in the previous iteration i The centroid trajectory of the cluster S to which it is assigned; Step 4: Based on all centroid paths, calculate the linear aggregation value that maximizes commuting demand and network connectivity, and output the new path composed of the centroid paths under the linear aggregation value to obtain a new bus route.
2. According to claim 1, a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand, characterized in that: In step 1, the vehicle positioning data includes vehicle ID, time, vehicle latitude and longitude, and passenger status.
3. According to claim 1, a method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand, characterized in that: In step 2, the deviated positioning points are treated as missing values.
4. The method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand according to claim 3, characterized in that: Missing value processing is to fill in the points that are missing five or more times in a row by using the mean interpolation method; points that are missing less than five times are discarded.
5. The method for optimizing a public transportation network by comprehensively considering network connectivity and commuting demand according to claim 1, characterized in that: The linear aggregation formula of commuting demand and network connectivity is as follows: Among them, d (μ) represents the sum of the number of common edges between the route μ and the trajectories in the given dataset; λ (μ) represents the connectivity increment for route μ, O λ (μ) = λ(G′ r )-λ(G r ),λ(G′ r ) represents G′ r The connectivity of the transportation network, λ(G r ) represents G r The connectivity of the transportation network, G r represents the old bus network, G′ r represents the new bus network enriched by the route μ; w represents the weight, D represents the set of trajectories in the given bus network; d max represents the sum of the first k values in the edge list sorted in descending order of commuting demand, λ max Represents the sum of the first k values in the edge list sorted in descending order of connectivity increment.
Citation Information
Patent Citations
Road network traffic flow key flow direction and critical path analysis method
CN109767615A
Method for constructing commuting path based on vehicle track analysis
CN110084308A