Introduction

Complex network has been widely used in various researches since it was proposed. At present, the definition of complex network in the scientific community can be roughly divided into two categories: the first category is the network which is more complex and significant than the completely regular network and the completely random network in a large number of actual complex systems; the other is the definition put forward by Qian Xuesen and widely used in network research. At the beginning of complex network research, people focused on the simplest regular network. The connection rules of the nodes in the regular network are clear and the statistical results of static characteristics are basically the same, which makes it easy to describe the intricate relations among the research objects. In reality, most of the network has no fixed rules to follow, which is not fully applicable to the regular network. The random graph theory was proposed by Hungarian scholars Paul Erdesh and Alfred Rainy, who initiated the systematic study of complex network theory in mathematics, and created the random network based on that. The small-world network model has similar average distance characteristics with random network model and has similar average cluster coefficient characteristics with regular network model. Most of the complex networks formed in the real world are not random networks, and the degree distribution of their nodes is in a strongly uneven and unbalanced ordered state, that is, a small number of nodes have a large number of edges, which play a dominant role in the evolution process of the network, while most of the other nodes have only a small number of edges. The Matthew effect of node degree shows the heterogeneity of complex network. Therefore, the concept of scale-free network model is proposed, and accordingly, the BA scale-free network is proposed.

Many scholars have done some research on the analysis and optimization of public transit network. However, the main weighting method of network linking is to take the geographical space distance among adjacent bus stations in the city, passenger flow or the number of different routes as the weight of the weighted network linking, considering that the element is too single to comprehensively reflect the passenger flow transport state among adjacent stations. Second, in the study of network, scholars seldom combine the massive subway and bus card swiping data with the application of line network optimization to further observe and analyze the urban bus line network. Moreover, the research object of line network optimization is mostly a single bus network, without considering the impact of rail transit on urban public transport network. Even in the optimization of composite network, it mainly focuses on the optimization of bus and subway connection or the optimization of operation schedule. Therefore, in combination with previous studies, this paper takes Beijing's bus network and the bus–subway complex network as the case study to construct an unauthorized undirected network and make a comparative analysis of the structure of routes and stations. Based on the characteristics of public transportation and the characteristics of public transportation, a new method of network edge weighting is proposed. At the same time, the optimized model of public transit network is constructed with the improved network efficiency as the optimization objective, and the practical and feasible optimization method of public transit network is provided.

Literature review

Research on urban weighted traffic network

In the study of the public transport network, the strength of the nodes in the complex network is different due to the different interactions between the stations. Therefore, the weight setting of network nodes and edges often has an important influence on the study of the status quo of the public transport system [40,41]. In recent years, the weight of the links of public transport network is mainly the passenger flow between adjacent stations, the geographical distance, the time or the number of routes passing through the stations.

Huang Ailing took the dynamic passenger flow between stations as the weight of the linking edges to study the characteristic metrics and system dynamics behavior of Beijing bus network, and found that in addition to the commonness of the complex network, the urban bus network also has the autonomy of residents in the choice of ride, which is different from the general network [16]. Some scholars also took the passenger flow between subway stations as the weight of connecting edges, and evaluated and analyzed the destruct-resistance of Chengdu subway network by calculating the bearing pressure between nodes with different strength and connecting edges [8, 12, 19, 26, 35]. Some scholars to the site through the line between the number of public transport networks in Shanghai as the edge weights of the node clustering coefficient and correlation study found that the whole Shanghai passenger flow distribution is more uniform but local distribution difference is bigger, the node degrees obey exponential distribution and site saturated flow and its connection is superlinear density [9, 15, 24, 37]. Chen obtained the travel time of conventional bus and rail transit stations with the help of GPS technology and GIS technology and took it as the weight. By evaluating the reliability of travel time, he planned the travel path under the multi-mode travel network and effectively improved the service capacity of the urban bus network system [4]. Zheng took the geographical distance between bus stops as the weight of the P-space network, and improved the transfer characteristics and average shortest path length of Chengdu's bus network with Floyd's shortest circuit algorithm under the condition of minimum transfers, and achieved good results [38]. In addition, Chen Guannan, Zhou Yangyazhi, Zheng Xiao and other scholars have also conducted empirical studies on the public transport networks of different cities in China using weighted indicators such as passenger flow and distance [3]. In the construction of double network, to study the dynamic characteristics of urban public traffic network, Du using method and Space-P and Space-R method, respectively established the transit network and bus lines network, and through the transfer to the network bus stops and routes in the network link between bus lines to build a new class of double bus network model [1, 11, 36, 38, 39]. Chen Xiaoming proposed a mutually motivating collaborative optimization method of double-layer urban traffic network, that is, the identification and screening method of importance degree of nodes in network topology was introduced into the double-layer network structure optimization to optimize the station layout and connection relationship of the existing network [7, 14, 19, 29].

Study on optimization of urban bus network

The application of an intelligent bus system provides massive data resources for bus network optimization. Using IC card data to optimize bus network has become a research hotspot. Song Zihang calculated the OD matrix of passengers' bus travel using the bus GPS and IC card data, optimized the bus line network in Beijing through genetic algorithm, and analyzed the effectiveness of the optimization scheme through index evaluation [28]. Qi Zhongping also used the bus GPS and IC card data to observe the time of passengers on and off the bus and the running time of the station to estimate the time and economic cost of the vehicle stopping. With this as the starting point, he proposed the optimization method of bus lane by grouping optimization and improved the bus line network [10, 13, 27]. Liu Xiaofei and other scholars, based on the idea of system science, put forward the optimization model of public transport network and built a multi-intelligence dynamic optimization system by taking the public transport IC card data as the adjustment means of adding and removing routes [17, 20, 25]. Wu analyzed the characteristics of bus travel, introduced the concept of bus travel continuity, and put forward the calculation method of bus passenger flow OD using IC card data, which has played an important role in the optimization of bus network in real line engineering [31]. Chen Shaohui, Wang Zhengjiang and other scholars are also using the data of bus card swiping to conduct in-depth research on the optimization of line network [5, 18, 21, 23, 30].

With the rapid development of subway, many researches on bus network optimization based on rail transit are emerging constantly. Chen and some scholars based on the backbone role of subway in public transportation built an optimization model with the goal of minimizing the travel time of bus lines within the influence range of rail transportation and proposed a feasible adjustment method after solving the optimization using genetic algorithm [2, 32, 33]. Yuan Changwe, considering the interaction between subway and conventional bus, proposed an urban bus network optimization method combining qualitative and quantitative methods from two aspects of bus network structure layout and transfer optimization, aiming at maximizing the transfer efficiency [34]. Chen Suping and other scholars have proposed an evaluation method for urban bus network optimization based on the balanced operation of rail transit and considering the interests of enterprises, passengers, bus service quality and network efficiency, and analyzed the key factors to make decisions on the optimization plan of line network [6]. Lu Hanyu constructed a double-layer network model based on the travel demands of passengers in the conventional bus network under the influence of rail transit, calculated the travel probability of the upper-layer network using the nested Logit model, and then transferred the departure intervals of different periods into the upper-layer model to jointly solve the optimization objectives such as passenger waiting time and travel cost [22].

Research design

Subway-bus double-layer model characteristics analysis

Subway-bus double-layer network model

With the development of complex network research, there are more and more researches on linking complex network with urban traffic network. Urban public transport network system is a complex and dynamic giant system. Through the study, the model of public transport route network has the characteristics of BA scale-free network. In general, urban traffic network model can be divided into urban rail transit layer and urban bus layer. The mathematical model often used in construction is described as follows:

$$ G^{{\text{double }}} = G^{U} + G^{L} , $$
(1)
$$ V^{{\text{double }}} = V^{U} + V^{L} , $$
(2)
$$ E^{{\text{double }}} = E^{U} + E^{C} + E^{L} , $$
(3)
$$ {\mathbf{W}}^{{\text{double }}} = {\mathbf{W}}^{U} + {\mathbf{W}}^{C} + {\mathbf{W}}^{L} , $$
(4)
$$ {\mathbf{A}}^{{\text{double }}} = \left[ {\begin{array}{*{20}l} {{\mathbf{A}}_{{N^{U} \times N^{U} }}^{U} } \hfill & {{\mathbf{A}}_{{N^{0} \times N^{L} }}^{C} } \hfill \\ {{\mathbf{A}}_{{N^{L} \times N^{U} }}^{C} } \hfill & {{\mathbf{A}}_{{N^{L} \times N^{L} }}^{L} } \hfill \\ \end{array} } \right]. $$
(5)

No representation subway-bus double-layer network is \(G^{{\text{double }}} = \left( {G^{U} ,G^{L} } \right)\), The upper layer network \(G^{U} = \left( {V^{U} ,E^{U} ,\quad W^{U} } \right)\) represents the regular bus network, underlying network \(G^{L} = \left( {V^{L} ,E^{L} ,W^{L} } \right)\) represents the urban rail transit network. Where \(V\) is the set of nodes is denoted by \(V = \left\{ {V_{1} ,V_{2} , \ldots ,V_{n} } \right\}\), \(n\) is the total number of nodes in the network, \(E\) is the edge \(e_{ij}\) of \(V_{i}\) and \(V_{j}\) in the network \(G\), represented as \(E = \left\{ {e_{ij} = \left( {v_{i} ,v_{j} } \right)} \right\}\), \(E^{c}\) is the interlayer edges that connect the nodes of a double-layer network; \({\mathbf{W}}\) is the connection matrix of undirected graph \(G\), represents the connection of nodes within the network, \({\mathbf{W}} = \left\{ {w_{ij} } \right\}_{n \times n} ,w_{ij} > 0\) is O–D edge between \(V_{i}\) and \(V_{j}\), if \(w_{ij} = 0\) means edge is inexistence, \(W^{c}\) represents the connection of edges between layers; according to the connection matrix \({\mathbf{W}}\), the adjacency matrix of the complex network can be further obtained \(A = \left\{ {a_{ij} } \right\}_{n \times n}\), \({\varvec{a}}_{ij} = \left\{ {\begin{array}{*{20}c} {{\varvec{d}}_{ij} \times {\varvec{w}}} & {\left( {v_{i} ,v_{j} } \right) \in E} \\ 0 & {\left( {v_{i} ,v_{j} } \right) \notin E} \\ \end{array} ,\quad } \right.d_{ij}\) is the distance between O–D station \(v_{i}\) and\(v_{j}\), \(a_{ij} = d_{ij} \times w\) represents when there is a path between any two nodes, values in the adjacency matrix \(a_{ij}\) equal the weight of the edge \(e_{ij}\), the definition \(a_{ij} = 0\) eliminates any possibility of self-connection. In addition, assume (no difference between upstream and downstream) that there are paths from arbitrary from \(v_{i}\) to \(v_{j}\), there is a same path between \(v_{j}\) and \(v_{i}\). Then the subway-bus double-layer network is abstracted into an undirected network \(A^{{\text{double }}} = \left[ {\begin{array}{*{20}c} {{\mathbf{A}}_{{N^{v} \times N^{v} }}^{U} } & {{\mathbf{A}}_{{N^{0} \times N^{L} }}^{C} } \\ {{\mathbf{A}}_{{N^{L} \times N^{U} }}^{C} } & {{\mathbf{A}}_{{N^{L} \times N^{L} }}^{L} } \\ \end{array} } \right]\), \(A_{{N^{U} \times N}}^{U}\) and \(A_{{N^{L} \times N^{L} }}^{L}\) represent the adjacency matrix of the inner path of the upper and lower layer networks respectively, \(A_{N}^{C} U_{xN} L\) and \(A_{N} L_{ \times N} U\) represents the adjacency matrix of an interlayer path connecting the upper and lower layers of a network [7], \(A^{{\text{double }}}\) is symmetric matrix.

Urban bus network is a vast network of multiple bus stops and complex bus routes. In research, the real network is often abstracted into L space, C space and P space [2, 27]. L spatial network model is the topological structure model that is closest to the actual distribution of public transportation. It takes adjacent stations as nodes and constructs edges. P spatial network model, also known as bus transfer network, can clearly describe the transfer relationship between bus stations in the bus system. It takes bus stations as nodes and establishes connections between all stations on the same line. C space network model abstractions bus lines as nodes and constructs edges between lines with common stations. To study the topology and circuit of the network, the L space network model and C space network model are used to construct the public transportation network of Beijing. At the same time, to study the public transportation system under the influence of rail transit, the complex bus network is combined with the complex subway network, and the construction method of bus–subway complex network is proposed. Its construction steps are as follows:

Firstly, the public transport network and subway network are, respectively, constructed, and the L space network and C space network are, respectively, constructed. As shown in Fig. 1a, the upper layer is the complex bus network, and network nodes B1, B2, B3, B4 and B5 correspond to bus stations. The lower layer is a complex subway network, and network nodes S1, S2 and S3 correspond to subway stations. Second, identify the bus stops connecting with the subway, establish a circular buffer zone with a radius of 500 m with the subway station as the center, find the bus stops in the buffer zone, that is, the bus stops that can connect with the subway station, and mark them. As shown in Fig. 1b, bus stations B3 and B5 connect with subway station S2 and mark them as C1, C2 and C3. Finally, the connecting side of subway station and the corresponding bus station is constructed. Because the transfer distance between the subway and the bus station in the buffer zone is short, the corresponding bus station should inherit the adjacent bus station of the subway station when connecting the bus and subway composite network. As shown in Fig. 1c, bus transfer stations C1 and C2 within the buffer zone C3 of subway station inherit their adjacent subway stations S1 and S3, and corresponding four connecting edges are constructed. Similarly, subway stations will inherit the adjacent subway stations corresponding to bus stations. As shown in Fig. 1d, subway station C3 inherits the adjacent bus stations B1, B3 and B4 of bus transfer stations C1 and C2, and correspondingly constructs three connecting edges.

Fig. 1
figure 1

Example of composite network model construction

Based on the above methods, 299 subway stations and 5897 bus stations were constructed in the main urban area of Beijing, and the bus stations were found in the circular buffer zone of subway stations as the connection to construct the bus and subway composite network of Beijing. According to the complex network modeling method, its C-space model is visualized as shown in Fig. 2.

Fig. 2
figure 2

C-Space model of Beijing bus–subway composite network

Static geometric features of complex networks

With the integration and development of statistics, system science and other theories in traffic complex network theory, many concepts have been proposed to describe the structural statistical characteristics of complex networks. Common ones include path length, clustering coefficient, degree, and betweenness centrality.

1. Path length

The shortest path in a complex network is the path with the least number of nodes in all the paths between any two nodes. In a network with N nodes, the average path length of the network is the average of the shortest path length \(d_{{{\text{ij}}}}\) of all node combinations. The path length here specifically refers to the edge distance, as shown in Eq. 6:

$$ L = \frac{2}{{N\left( {N + 1} \right)}}\mathop \sum \limits_{i \ge j} d_{ij} . $$
(6)

2. Clustering coefficient

The aggregation property describes the degree of interconnectedness in a complex network. The clustering coefficient is the ratio of the number of closed triples \(N_{i}\) to the number of all triples \(Tr_{i}\). In a complex network, the clustering coefficient of node I is expressed as Formula 7:

$$ C_{i} = \frac{{N_{i} }}{{Tr_{i} }}. $$
(7)

3. Degrees

Degree refers to the importance of a node to the network, and is the number of nodes adjacent to the node, that is, the degree value \(k_{i}\) of node i is the number of nodes j adjacent to it, as shown in Eq. 8:

$$ ki = \mathop \sum \limits_{j} a_{ij} = \mathop \sum \limits_{j} a_{ji} . $$
(8)

The average node degree in the network is the average degree of the network \(\left\langle k \right\rangle\), as shown in Formula 9:

$$ \left\langle k \right\rangle = \frac{1}{N}\mathop \sum \limits_{i} a_{ij} = \frac{1}{N}\mathop \sum \limits_{i} k_{i} . $$
(9)

4. Betweenness centrality

The definition of the interface \(B_{k}\) of node K is as follows: in a network, the ratio of the number of shortest paths through node K \(d_{{{\text{ij}}}} \left( k \right)\) to the number of all shortest paths \(d_{{{\text{ij}}}}\). In addition to node degree, node intermedium is another important index to measure the importance of nodes, as shown in Formula 10:

$$ B_{k} = \mathop \sum \limits_{i \ne j \ne k} d_{ij} \left( k \right)/\mathop \sum \limits_{i \ne j \ne k} d_{ij} . $$
(10)

Network efficiency

As an important objective function of network structure optimization, network efficiency can be used as an evaluation index of network operation status. The definition of bus network efficiency \(E\left( G \right)\) is shown in Formula 11:

$$ E\left( G \right) = \frac{1}{{N_{{\text{s}}} }}\mathop \sum \limits_{i \ne j} {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {d_{ij} }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${d_{ij} }$}}, $$
(11)

where \(N_{{\text{s}}}\) is the number of shortest paths in the entire network, and \(d_{{{\text{ij}}}}\) is the shortest path value of site I and site J. The higher the network efficiency, the better the circulation performance between nodes and the higher the accessibility. On the contrary, the worse the circulation performance between nodes, the lower the accessibility.

Improvement of network efficiency definition based on traveling big data

Travel time impedance function

Urban public transport mainly includes ground bus and rail transit, so the time of residents taking public transport also includes the time of ground bus and rail transit. At the same time, the transfer between different lines also increases the travel time cost of residents. Thus, the surface bus ride time, rail transit ride time and cumulative transfer time constitute the time function of residents’ public transportation travel together, and its mathematical expression is shown in Formula 12:

$$ t_{{{\text{od}}}} = \mathop \sum \limits_{{\left( {i,j} \right) \in R\left( {{\text{o}},{\text{d}}} \right)}} \left[ {\theta_{ij} t_{{{\text{b}}\left( {i,j} \right)}} + \left( {1 - \theta_{ij} } \right)t_{{{\text{s}}\left( {i,j} \right)}} } \right] + \sum \left( {W_{{\text{b}}} + W_{{{\text{bs}}}} } \right), $$
(12)

\(t_{{{\text{od}}}}\) is the time it takes residents to travel by public transportation from stop O to stop D, \(t_{{b\left( {i,j} \right)}}\) is the time taken by bus on ij during the trip, \(t_{{{\text{s}}\left( {i,j} \right)}}\) is the time taken by subway on the iJ section of the trip, \(\theta_{ij}\) is whether to take bus on iJ during the trip. If you take the bus, \(\theta_{ij} = 1\); otherwise, \(\theta_{ij} = 0\), \(W_{{\text{b}}}\) is the time it takes passengers to transfer between bus routes during a trip, \(W_{{{\text{bs}}}}\) is the time it takes passengers to transfer between buses and subways during a trip.

Traffic efficiency

Most studies of weighted complex networks take the passenger flow, time or number of lines between stations as the weights of nodes' edges. Although the emphasis of these methods is different, there are still some limitations to the overall improvement of urban traffic network. Therefore, this paper puts forward the concept of traffic efficiency, which takes passenger flow and time factors in the network into comprehensive consideration. The traffic travel efficiency is the passenger flow transport efficiency between adjacent stations, that is, the ratio of the number of passengers between adjacent stations and the time spent. The more efficient the traffic is, the more passengers are transported per unit time. Its mathematical expression is in Formula 13:

$$ e_{ij} = n_{ij} /t_{ij} , $$
(13)

where

\(e_{{{\text{ij}}}}\) is the traffic efficiency between station I and J, \(n_{{{\text{ij}}}}\) is the number of passengers transported by public transportation between stations I and J, \(t_{{{\text{ij}}}}\) is the travel time of residents between stations I and J (the average of upstream and downstream), defined by Formula (12).

Traffic efficiency takes into account the passenger flow and travel time of public transportation between adjacent stations. On the one hand, the less time the transport unit passenger takes, the greater the weight of the link, and the higher the transport efficiency. On the other hand, the greater the number of passengers per unit driving time, the greater the weight and the better the mobility of the section. In practical application, the load time of the congested road section in rush hours is long and the traffic efficiency is low. Therefore, a congested section can be identified and optimized. At the same time, in the bus—subway composite network, the subway tends to have greater traffic efficiency, greater passenger flow and less running time. Therefore, traffic form efficiency can be quantified in the form of data to quantify the importance of subway in the public transportation network.

Improvements in the efficiency of urban public transport networks

In real networks, the importance of connecting edges is often different, and different weights of connecting edges also make the circulation capacity of nodes in the network vary greatly. The traditional complex network takes the minimum value of the number of path nodes as the value of the shortest path length in the network efficiency, which makes the traditional network efficiency only show the connectivity between nodes, but it is limited in the overall evaluation of the real network. Therefore, to better describe the flow capacity between nodes in the network, this paper proposes a weighted traffic network efficiency calculation method. Its mathematical expression is in Formula 14:

$$ E\left( G \right) = \frac{1}{{N_{s} }}\mathop \sum \limits_{i \ne j} \max \left( {\frac{{W_{ij\left( k \right)} }}{{l_{ij\left( k \right)} }}} \right), $$
(14)

\(W_{{{\text{i j }}\left( {\text{ k }} \right)}}\) is when node I to node J, the total of all connecting edge weights in path K, \(l_{{{\text{ij}}\left( k \right)}}\) is node I to Node J, the number of sections in path K.

Then \(\max (W_{ij\left( k \right)} /l_{ij\left( k \right)} )\) represents node I to node J, and the path with the maximum average traffic travel efficiency is found out from multiple feasible paths to calculate the weight. It can be seen that the actual meaning of the improved network efficiency is the average value of the maximum unit weight of all paths in the network.

\(N_{{\text{s}}}\) is the number of site pair collections that participate in the calculation.

Experiment, results and discussion

Design of structural adjustment mechanism of urban bus network

With the combination of lines, stations and network conditions, the overall network efficiency can be improved by adjusting the sites with low efficiency and improving the sites with high efficiency under limited conditions. The specific optimization process is as follows (see Fig. 3):

Fig. 3
figure 3

Specific optimization process

Because too many nodes are deleted or important nodes are deleted in the network, the operability with the actual network planning will be greatly reduced. To avoid this situation, this paper starts from the actual properties of the site, conducts site filtering first, and sets the following site filtering constraints:

$$ {\text{ND}}_{{{\text{del}}}} \subset \lambda {\text{RP}}_{{{\text{del}}}} , $$
(15)
$$ {\text{ND}}_{{{\text{add}}}} \subset \beta {\text{RP}}_{{{\text{add}}}} . $$
(16)

The meaning of each variable is as follows:

\({\text{ND}}_{{{\text{del}}}}\): plan to delete a collection of sites.

\({\text{RP}}_{{{\text{del}}}}\): a collection of sites that can be deleted.

\(\lambda\): site delete number control parameters.

\({\text{ND}}_{{{\text{add}}}}\): plan to increase the collection of sites.

\({\text{RP}}_{{{\text{add}}}}\): the collection of sites can be increased.

\(\beta\): increase the number of control parameters at the site.

Equations 10 and 11, respectively, represent the quantitative constraint of the final decision for site deletion and site addition. In the final decision to adjust the number of sites, operational costs, geographical location and other realistic factors should be taken into account to avoid the excessive adjustment of the number of sites that will affect the daily life of citizens. Therefore, the total number of sites added or deleted should be limited. This can be achieved by adjusting parameters \(\lambda\) and \(\beta\). Due to the large cost and impact of rail, based subway station and route adjustment, it is not suitable for batch adjustment and optimization. Therefore, this study takes bus stations as adjustment objects, considers all bus stations as adjustable stations, adjusts the overall structure of the network, and uses the improved network efficiency to calculate the changes of the network. On the premise of not affecting the basic structure of the overall network, combining with the adjustment range of Beijing public transport network in practice, to fully reflect the efficiency changes after adjustment, this paper takes \(\lambda \) as 0.05 and \(\beta \) as 0.05.

Regulation mechanism of urban bus network structure

Considering the practical operability of site planning, based on the current situation of existing network structure, this paper uses passenger travel data to calculate the passenger flow of each station and the efficiency of connecting edges between networks. Through the method of site deletion and increase, the structure of public transportation network is adjusted to achieve the purpose of improving the overall network efficiency. Specific rules for adding or deleting sites are as follows.

Removal rules of the site

According to the observation of the actual traffic data, the passenger flow in the stations of the same line is also unevenly distributed. It can be seen from the passenger flow data of the stations that when some stations are separated by only one station, fewer passengers will get on and off at the intermediate station, while most passengers who get on at the two stations will not get off at the intermediate station. It can be seen that if the passenger flow of intermediate stations is less, parking here will increase the travel time of most passengers. If you delete this site, although it will cause a small number of passengers to lose, but can significantly reduce the ride time, reduce operating costs. The steps to remove the site are as follows:

  1. 1.

    Calculate the network efficiency of the initial network.

  2. 2.

    Calculate the total weight of each site, the mathematical formula is as follows:

    $$ W_{i} = \mathop \sum \limits_{j} ed_{ij} , $$
    (17)

where \(W_{{\text{i}}}\) is the sum of connecting weight of site i, and \(ed_{{{\text{ij}}}}\) is the weight of site i and directly connected site j.

3. Select site I with the minimum sum of weights to join the site set \({\text{ND}}_{{{\text{del}}}}\) to be deleted.

4. If site I is deleted, the edges between the site to be deleted and the adjacent sites are deleted, and the edge efficiency of deletion is added to the weight of the adjacent edges. The sample and formula are shown below (see Fig. 4):

$$ ed_{jk}^{^{\prime}} = ed_{jk} + ed_{ij} . $$
(18)
Fig. 4
figure 4

An example of site deletion

  1. 5.

    Determine whether the set \({\text{ND}}_{{{\text{del}}}}\) of sites to be deleted meets the quantity constraint. If not, go back to step II.

  2. 6.

    The remaining sites form the new network.

New rules of the site

Based on the observation of actual traffic data, it can be found that the passenger flow of some adjacent stations in the bus network is large, and the number of passengers transported in the section during the peak period is much larger than that of other stations. This indicates that the passenger flow of these stations is more attractive, the bus load rate is higher, and the number of existing stations is more difficult to meet the passenger demand. Therefore, more stations should be added between stations to share the passenger flow pressure of the stations and improve the level of public transport service and network efficiency. The steps for adding a new site are as follows:

  1. 1.

    Based on the network after site deletion, select the site with the greatest efficiency between sites for i and j.

  2. 2.

    Add a site m between site pairs, and add the collection \({\text{ND}}_{{{\text{add}}}}\) of sites to be added.

  3. 3.

    The average efficiency of the upstream and downstream of the site is calculated, and the total weight of the original connecting edge after the split is taken as the connecting edge weight of the newly added site (see Fig. 5).

$$ ed_{{{\text{mj}}}} = \frac{1}{n}\mathop \sum \limits_{t = 1}^{n} ed_{{jk_{t} }} $$
(19)
$$ ed_{mi} = \frac{1}{n}\mathop \sum \limits_{t = 0}^{n} ed_{{il_{t} }} , $$
(20)

where \(ed_{{{\text{mj}}}}\) is the link weight of the newly added site m and its upstream site j, \(ed_{{jk_{t} }}\) is the connecting weight of site J and its upstream site \(k_{t}\), \(ed_{mi}\) is the link weight of the newly added site m and its downstream site i, \(ed_{{il_{t} }}\) A is the connecting weight of site i and its upstream site \(l_{t}\).

Fig. 5
figure 5

Site addition example

  1. 4.

    Determine whether the set \(ND_{{{\text{add}}}}\) of sites to be added meets the quantity constraint. If not, step I is returned.

  2. 5.

    Based on the improved network efficiency, the network efficiency after increasing the site is recalculated.

Analysis of topology characteristics of Beijing public transport network

In this paper, L network model and C network model are, respectively, used to construct the bus network and the bus–subway composite network to carry out statistics on their average path length, clustering coefficient, degree, intermediate number and other static characteristics, to grasp the overall topology characteristics of Beijing's public transport network, as shown in Table 1.

Table 1 Characteristics statistics of Beijing public transport network and composite network

From the perspective of the composite station network, the public transportation system accounts for the majority of the 741 public transportation lines and 6196 stations in Beijing. In the L-Space network that shows the connectivity of stations between systems, the composite network can see that an average trip needs to pass 20.12 stations, and only 3.25 stations can be reached in one stop. In contrast, it can be seen from the bus network that an average trip needs to go through 22.16 stops, and only 2.19 stops can be reached at one stop, indicating that the addition of subway system significantly shortens the route of bus stops. The clustering coefficient of the composite network is 0.234, which is greater than 0.139 of the bus network, showing that there is a stronger correlation between the composite network sites. However, the two are basically the same in terms of the number of interfaces to measure the importance of the sites.

In the C-Space network, which shows the system's line transfer characteristics, the average passenger needs to transfer 1.43 times for a trip in the composite line network, and the average line is connected to 38.07 lines that can transfer at the same station. Passengers in the bus network need to make an average of 1.75 transfers per trip. One line is connected to 32.56 lines on average, and the connectivity with other lines is lower than that of the composite network. In terms of the clustering coefficient that reflects the competitive relationship between routes, the average clustering coefficient of the public transport system is 0.524, which is basically consistent with the composite network. It can be seen from the fact that the number of far medium of composite network is larger than that of a bus network that the addition of subway improves the control ability of line in passenger flow conversion and the importance of the central route to a certain extent.

As can be seen from Table 1, the bus lines and stations in Beijing can basically meet the daily travel needs of residents. However, the comparison results of the network structure show that there is still room for optimization of the topology characteristics of the Beijing bus network. Although the number of subway lines and stations in Beijing is small, the addition of the subway significantly reduces the number of stations and transfers that residents pass through, which greatly improves the public transportation experience of passengers.

Simulation of the wire mesh structure adjustment model

"Beijing Municipal Transportation Card" provides massive data support for accurate research and optimization of Beijing's public transportation system. For the convenience of calculation, this paper uses the credit card swiping data in March 2017 and the route of public transportation stations within the second Ring Road in the central urban area of Beijing to conduct a simulation experiment for the morning rush hour (7:00–10:00) with serious congestion in Beijing. A total of 784 sites are included in the above region. Under the condition of adding the weight of the positive and negative side connection between the two sites, the efficiency between 1,418 pairs of sites needs to be calculated.

IC card data can be used to track the public transport travel of every resident who swipes a card. By collating and statistics of the data, the passenger flow of each bus stop during the study period can be obtained, and its distribution is shown in Fig. 6. On this basis, the weight of connecting edges between stations in the traffic network can be calculated, and the improved network efficiency formula is used to calculate the public transport network in Beijing, and the overall efficiency of the existing network is 3.07 people/(section × Minutes). The morning peak passenger flow in central Beijing totaled about 470,000, carrying an average of 15.6 passengers per hour.

Fig. 6
figure 6

Passenger flow distribution of bus stops

Based on the existing network structure and state, the network is simulated, adjusted and optimized according to the site regulation mechanism described above as follows:

Results of site deletion

Based on the network composed of peak passenger traffic, the sum of the weights of each site was counted, and the 40 sites with the minimum sum of weights were selected to form the set of sites to be deleted. The 10 sites with the smallest results are shown in Table 2. Delete all the sites in the collection from the network, and recalculate the weight of adjacent edges of the sites according to the method of site deletion, to form a new traffic network, and take it as the basic network to increase the sites in the next stage.

Table 2 The sites to be deleted and their weights and values

Results of site addition

On the transportation network formed by the deletion of stations, the weight of connecting edges among the remaining stations in the network is counted, and the corresponding station pairs of 40 connecting edges with the largest weight are selected to form the station pair set of stations to be added, among which the top 10 station pairs with the largest weight are shown in Table 3. Then, according to the method of adding sites, new sites are inserted in turn and combined with the efficiency of adjacent sites, the weight of new sites is calculated to get the final network structure.

Table 3 Part of the site to be added to the edge and its weight

Network efficiency calculation results of site adjustment

Recalculate the global efficiency of the network after site deletion and addition. After calculation, without changing the total number of network nodes, the overall network efficiency is improved to 3.13 people/(road section × Min) by reasonably adjusting some stations. That is to say, after the optimization of the network, it is estimated that about 480,000 passengers can be transported in the morning peak, which is 10000 times higher than the initial state before the improvement. Considering that this paper analyzes the efficiency of public transport network in the central city of Beijing during the morning rush hours on weekdays, the overall transport capacity can be increased by 10,000 person-times only by optimizing some bus stops under the given conditions of the network vehicles, the simulation results still have certain optimization effect and practical application value.

Public transit system is an important part of urban public transportation. The planning adjustment of public transit system involves a wide range and needs enough scientific methods and foundations to support decision-making. The model is based on a large number of passengers swiping card data, looking for a breakthrough in the problems reflected by the real data, and providing scientific and reasonable support for intelligent traffic. On the other hand, the data used in the model are not constrained by time and space, which can provide a reference for intelligent transportation network planning in different regions. As the most basic and representative traffic data, the card swiping data and route are easy to obtain in the transportation system and bear the characteristics of residents' daily use of public transportation. Therefore, although this paper only simulates and optimizes the bus network in the central urban area of Beijing, this research method can be extended to other cities, especially big cities with serious traffic congestion. Integrating local travel data with traffic planning is undoubtedly one of the key directions for the development of intelligent bus.

Conclusions

In this paper, based on the structural data of bus and subway network, a subway-bus double-layer network is constructed, and analyzed using the complex network visualization analysis software Gephi. Taking the improved traffic efficiency as the optimization objective and the addition and deletion of stations as the optimization means, the model of public transit network optimization is constructed by setting the actual constraint conditions. Finally, the real data of public transportation in Beijing are used to carry out the simulation experiment, and the feasibility of the application of the optimization model in the current traffic is analyzed. The simulation results show that the proposed optimization method can improve the network efficiency of the Beijing public transport network by 2.12%.

Compared with existing studies, this study using the subway and bus ride data, the traffic efficiency is defined and taken as the weight of the connecting edges. The passenger flow and travel time between adjacent stations are comprehensively considered, which makes up for the shortage of using a single index as the weight in existing studies. The solution of the optimization model is put forward by the main means of deleting and adding stations, which is of reference significance to the optimization research of public transit network.

Based on the real data of the Beijing subway and bus ride data, the simulation experiment is carried out to get the optimization scheme of the Beijing bus network. It provides a new idea and method to improve the traditional line network optimization process. In the actual process of public transit network structure optimization, the deletion and addition of stops often rely on the experience of experts and the survey of residents, and the lack of scientific and rigor makes the optimization result difficult to predict. In this paper, a new method of adding and deleting sites is proposed based on network efficiency, and the results of site modification are predicted by numerical analysis, which makes the improvement process more scientific, rigorous, intuitive and effective.

Although this paper has made some research results, due to my limited energy, time and research level, this paper still has some limitations, which need to be further studied, specifically in the following two aspects:

  1. 1.

    The subway ride data can only obtain the arrival and exit time of passengers, the research cannot accurately obtain the running time of each subway station and the time of passengers' transfer inside the subway. In this paper, the average time of the two is determined by a questionnaire survey. In the following research, more accurate subway operation and passenger transfer time can be obtained by obtaining subway GIS data or conducting field investigation and simulation, so that passenger travel time impedance function can better fit residents' travel time.

  2. 2.

    There are many ways to solve the optimization of bus network. After analyzing the bus network in Beijing in 2017, this paper only solves the optimization model by deleting and adding bus stops without changing the original network size. The following research can analyze and optimize the bus network of more cities. For the public transport system with fewer bus lines and larger space for optimization, the optimization solution methods such as line increase, line reduction, line extension and line shortening can be used to study and realize, to make the direction of bus network optimization more diversified.