Urban rail transit passenger flow prediction method based on multi-factor algorithm

By using a multi-factor algorithm in urban rail transit passenger flow prediction, combining factor analysis and BP neural network model, and optimizing model parameters using particle swarm optimization algorithm, the problems of insufficient prediction accuracy and low computing efficiency in the existing technology are solved, and efficient and accurate passenger flow prediction is achieved.

CN120087527APending Publication Date: 2025-06-03BEIJING METRO NETWORK ADMINISTRATION CO LTD

Patent Information

Application Number
CN202510137817.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The prior art has insufficient prediction accuracy and low computational efficiency in urban rail transit passenger flow prediction, making it difficult to meet the needs of efficient, accurate and reliable passenger flow prediction.

Method used

Using a multi-factor algorithm method, a factor analysis mathematical model and BP neural network model are constructed by collecting historical passenger flow data and relevant indicator factors that affect passenger flow, and combining with particle swarm optimization algorithm, model parameters are optimized to improve prediction accuracy.

Benefits of technology

It realizes rapid and accurate prediction of passenger flows in stations, lines and networks, improves prediction accuracy and computing efficiency, and provides reliable data support for the optimal allocation and operation management of urban rail transit resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087527A_ABST
    Figure CN120087527A_ABST
Patent Text Reader

Abstract

The invention relates to an urban rail transit passenger flow prediction method based on a multi-factor algorithm. The method comprises the following steps: collecting urban rail transit historical passenger flow data and related index factor sample data influencing passenger flow; constructing a factor analysis mathematical model, analyzing a plurality of index factors influencing the passenger flow, determining a common factor, and calculating a score; constructing a BP neural network model, taking the common factor score as input, and obtaining an optimal parameter set through a particle swarm optimization algorithm; generating a BP neural network prediction model for urban rail transit passenger flow prediction based on the optimal parameter set, and training through sample data to obtain an optimal BP neural network prediction model; and performing real-time passenger flow prediction based on the trained BP neural network prediction model. According to the method, the problems of insufficient prediction precision, low calculation efficiency and the like in the prior art can be solved, and the purpose of rapidly and accurately predicting the passenger flow of the station, the line and the line network is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail transit passenger flow prediction, and particularly to an urban rail transit passenger flow prediction method based on a multi-factor algorithm. Background Art

[0002] With the continuous expansion of the urban scale and the acceleration of the urbanization process, urban rail transit, as an efficient and convenient public transportation mode, has developed rapidly. The scale of the line network continues to increase, and with its advantages of safety, punctuality, convenience, and comfort, it is favored by the majority of passengers. However, the continuous increase in the passenger flow has also brought huge challenges to the operation and management of urban rail transit. How to accurately predict the inbound and outbound passenger flow of each station on the urban rail transit line is crucial for optimizing resource allocation, improving operation efficiency, enhancing service levels, and ensuring traffic safety. For example, based on accurate passenger flow prediction data, it is possible to scientifically and reasonably formulate the train operation diagrams of each line, accurately adjust the departure intervals, and efficiently dispatch and schedule the station customer service personnel, etc.

[0003] In recent years, many domestic and foreign enterprises, universities, and research institutions have carried out in-depth research on rail transit passenger flow prediction and achieved a series of results. The existing prediction methods mainly include methods based on statistical theories (such as time series analysis, regression analysis, etc.), methods based on mathematical models (such as regression models, ARIMA models, neural network models, etc.), methods based on machine learning (such as decision tree algorithms, support vector machine algorithms, random forest algorithms, etc.), and methods based on big data (such as data mining, deep learning), etc.

[0004] Although these methods have their own characteristics, they also have certain limitations:

[0005] (1) From the perspective of prediction accuracy, the passenger flow prediction at the whole line network level is relatively accurate, the prediction accuracy of a single line is the second, and the prediction error for a single station is relatively large;

[0006] (2) From the perspective of calculation efficiency, it often takes a long time to complete the calculation, especially for large-scale or even super-large-scale urban rail transit systems.

[0007] It can be seen that the existing methods are difficult to meet the requirements of efficient, accurate, and reliable passenger flow prediction, and still cannot provide strong support for the daily operation management and passenger service of rail transit. Summary of the Invention

[0008] To solve the above technical problems existing in the prior art, the purpose of the present invention is to provide an urban rail transit passenger flow prediction method based on a multi-factor algorithm, so as to solve the problems of insufficient prediction accuracy and low calculation efficiency in the prior art, and achieve the purpose of quickly and accurately predicting the passenger flow of stations, lines, and line networks, providing reliable data support for the optimal allocation of urban rail transit resources, reasonable train dispatching, customer service personnel allocation, and scheduling.

[0009] To achieve the above invention purpose, the present invention provides an urban rail transit passenger flow prediction method based on a multi-factor algorithm, including the following steps:

[0010] Step S1: Collect historical passenger flow data of urban rail transit and sample data of relevant index factors affecting passenger flow;

[0011] Step S2: Construct a factor analysis mathematical model, analyze various index factors affecting passenger flow, determine common factors, and calculate scores;

[0012] Step S3: Construct a BP neural network model, use the common factor scores as input, and obtain the best parameter set through the particle swarm optimization algorithm;

[0013] Step S4: Generate a BP neural network prediction model for urban rail transit passenger flow prediction based on the best parameter set, and obtain the optimal BP neural network prediction model through training with sample data;

[0014] Step S5: Conduct real-time passenger flow prediction based on the trained BP neural network prediction model.

[0015] According to a technical solution of the present invention, in the step S1, the historical passenger flow data includes at least the passenger flow data of one of a single station, a single line, or the entire line network, and any passenger flow data includes passenger flow OD information with a time granularity of T minutes;

[0016] The relevant index factors affecting passenger flow include environmental factors and conditional factors. The environmental factors include at least the permanent population, the number of people going to work, various POI indexes, the number of bus routes, and the land use mixing index around the target station. The conditional factors include at least weekdays or holidays, peak tourist seasons or off-peak tourist seasons;

[0017] The various POI indexes include at least residential POI index, office POI index, commercial and entertainment POI index, tourist attraction POI index, education POI index, hospital POI index, transportation hub POI index, and large venue POI index.

[0018] According to a technical solution of the present invention, in the step S2, the factor analysis mathematical model is expressed as:

[0019]

[0020] The matrix form is: x = Af + ε,

[0021] where f = [f 1 , f 2 ,..., f m T are the various indicators affecting passenger flow and serve as the common factors of the factor analysis mathematical model; ε = [ε 1 , ε 2 ,..., ε n T are the special indicators affecting passenger flow and serve as the special factors of the factor analysis mathematical model; A = (a αβ ) n×m is the factor loading matrix, a αβ (α = 1, 2,..., n; β = 1, 2,..., m);

[0022] The factor analysis mathematical model is an orthogonal factor model. The factor loading matrix is calculated by the principal component analysis method to determine the common factors affecting passenger flow and calculate the common factor scores.

[0023] According to a technical solution of the present invention, in the step S2, it specifically includes:

[0024] Step S21: Obtain the sample data of the various index factors affecting passenger flow as the original data;

[0025] Step S22: Conduct a KMO test and a Bartlett spherical test on the original sample data. If the conditions are not met, further select the sample data;

[0026] Step S23: Calculate the mean and variance of the sample data and standardize the original sample data;

[0027] Step S24: Calculate the correlation coefficient matrix of the sample;

[0028] Step S25: Calculate the eigenvalues and eigenvectors of the correlation coefficient matrix;

[0029] Step S26: Determine the number of common factors according to the cumulative contribution rate required by the system;

[0030] Step S27: Calculate the factor loading matrix;

[0031] Step S28: Rotate the loading matrix to obtain the rotated factor loading matrix;

[0032] Step S29: Calculate the common factor scores according to the rotated factor loading matrix.

[0033] ​​According to a technical solution of the present invention, in the step S3, the common factor score is used as an input, which is expressed as: where \(i = 1, 2, \cdots, p\), \(p\) is the number of common factors. Through deep learning with the PSO - BP neural network and training samples, the optimal passenger flow prediction BP neural network is output.

[0034] The BP neural network adopts a three - layer structure. The number of nodes in the input layer is determined by the number of common factors obtained from factor analysis, and the number of nodes in the output layer is the number of time periods into which the passenger flow data is divided.

[0035] According to a technical solution of the present invention, in the step S3, it specifically includes:

[0036] Step S31: Initialize the passenger flow prediction BP neural network. Using the common factor score as the input and the predicted passenger flow data as the output, determine the number of hidden layer nodes and construct the BP neural network.

[0037] Step S32: Initialize the particle swarm optimization algorithm PSO. Each particle represents a set of weights and thresholds of the BP neural network, with the dimension being \(D\) and the number of particles being \(N\). Assign initial values to the position and velocity of each particle. Set the individual optimal position of the particle as the current position of the particle, and set the maximum number of iterations of the particle swarm optimization algorithm as \(K\).

[0038] Step S33: Update the velocity and position of the particles.

[0039] Step S34: Calculate the fitness value of the particles, and determine the individual optimal position and the global optimal position.

[0040] Step S35: Repeat Step S33 and Step S34 until the iteration termination condition is met to obtain the best parameter set.

[0041] According to a technical solution of the present invention, in the step S31, determining the number of hidden layer nodes is expressed as:

[0042]

[0043] where the value of the number of nodes in the input layer is the score of the common factors obtained from factor analysis, the number of nodes is the number \(p\) of common factors obtained from factor analysis; the number of nodes in the output layer is the number of time periods into which the passenger flow data is divided, and one passenger flow prediction value is output for each time period; \(\theta\) is an empirical parameter, usually taking values from 10 to 100.

[0044] According to a technical solution of the present invention, in the step S32, the fitness function of the particle swarm optimization algorithm PSO is set as the mean square error of BP neural network training. Calculate the fitness value of each particle through the fitness function, and use the position of the particle with the minimum fitness value as the initial value of the global optimal position. Then there is:

[0045] x i = [x i1 , x i2 ,..., x iD T , representing the position of the \(i\)th (\(i = 1, 2,..., N\)) particle;

[0046] ν i = [ν i1 , ν i2 ,..., ν iD T , representing the velocity of the \(i\)th (\(i = 1, 2,..., N\)) particle;

[0047] pbest i = [pbest i1 , pbest i2 ,..., pbest iD T , representing the optimal position searched by the \(i\)th particle itself, i.e., the individual optimal position;

[0048] gbest = [gbest 1 , gbest 2 ,..., gbest D T , representing the optimal position searched by the entire particle swarm currently, i.e., the global optimal position.

[0049] According to a technical solution of the present invention, in the step S33, the velocity iteration formula of the particle is expressed as:

[0050]

[0051] where \(t\) and \(t + 1\) respectively represent the \(t\)th and \((t + 1)\)th iterations; represents the velocity of particle \(i\) in the next iteration \(t + 1\); \(\omega\) is the inertia weight, which controls the retention degree of the particle velocity and affects the global search ability of the algorithm; is the velocity of particle \(i\) in the current iteration \(t\); \(c\) 1 and \(c\) 2 are acceleration coefficients, representing the individual learning factor and the social learning factor respectively, which control the degree of the particle approaching the individual optimal and the global optimal; \(r\) 1 and \(r\) 2 are random numbers in the interval \([0, 1]\), which add randomness to the algorithm; \(pbest\) i is the individual optimal position found by particle \(i\) so far; \(gbest\) is the global optimal position found by the entire particle swarm so far;

[0052] The position iteration formula of the particle: ​​​​

[0053]

[0054] Among them, is the position of particle i at the next iteration t + 1; is the position of particle i at the current iteration; is the velocity of particle i at the next iteration.

[0055] According to a technical solution of the present invention, in the step S4, it specifically includes:

[0056] Step S41, obtaining passenger flow sample data and dividing it into two parts: training samples and test samples;

[0057] Step S42, based on the individual optimal position and the global optimal position, calculating the weights and thresholds of the BP neural network, assigning the corresponding parameters of the BP neural network, and generating a PSO - BP neural network model;

[0058] Step S43, feeding the prepared training sample data into the BP neural network model optimized by PSO for training to obtain the trained PSO - BP neural network model, denoted as the FA - PSO - BP neural network model.

[0059] Compared with the prior art, the present invention has the following beneficial effects:

[0060] The present invention proposes a method for predicting urban rail transit passenger flow based on a multi - factor algorithm, which can adapt to passenger flow prediction in more scenarios, and has strong applicability both when the environmental variables are in a stable state and in a fluctuating state. Moreover, the passenger flow prediction method of the present invention can not only predict the inbound and outbound passenger flow of stations, lines, and line networks under normal conditions on weekdays and holidays, but also predict the passenger flow affected by disturbances such as peak tourist seasons and off - peak seasons. Additionally, the present invention can be used to predict the regional passenger flow during the planning period to assist in the planning and design of newly built subway lines and stations.

[0061] The present invention, through dimensionality reduction and particle swarm optimization, improves the learning efficiency and prediction accuracy of the BP neural network, providing strong data support for the increasingly large - scale urban rail transit operation management, resource optimization allocation, train operation regulation, and optimal personnel allocation. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0063] Figure 1 Schematically shows a flowchart of a method for predicting urban rail transit passenger flow based on a multi-factor algorithm in an embodiment of the present invention;

[0064] Figure 2 Schematically shows the architecture diagram of the FA-PSO-BP neural network model in an embodiment of the present invention;

[0065] Figure 3 Schematically shows the structural schematic diagram of the BP neural network in an embodiment of the present invention;

[0066] Figure 4 Schematically shows the comparison diagram of predicted data and actual data in an embodiment of the present invention. Detailed implementation manners

[0067] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0068] For passenger flow prediction, there are many factors affecting passenger flow, such as environmental parameters such as the permanent population, the number of people going to work, the residential POI index, the office POI index, the commercial and entertainment POI index, the tourist attraction POI index, the education POI index, the hospital POI index, the transportation hub POI index, the large venue POI index, the number of bus routes, the land use mix index, etc. In addition, it is also related to weekdays, holidays (such as national legal holidays), peak tourist seasons, off-peak tourist seasons, and is also affected by factors such as weather, other traffic conditions, national and local policies, ticket systems and fares. These factors may all affect the number of passengers taking the subway. As a multivariate statistical analysis method, factor analysis is used to analyze and refine these numerous influencing factors, analyze and summarize them into comprehensive factors, and achieve the purpose of simplification, dimensionality reduction, improving the learning speed, and improving the prediction accuracy. Therefore, combining the BP neural network of factor analysis (FA) and particle swarm optimization (PSO) can obtain a more efficient and accurate method for predicting urban rail transit passenger flow.

[0069] As Figure 1 shown, a method for predicting urban rail transit passenger flow based on a multi-factor algorithm of the present invention includes parts such as data collection, factor analysis, neural network model construction and optimization, model generation and training, prediction and verification.

[0070] First, based on various factors affecting passenger flow, the statistical method of factor analysis (FA) is used for analysis. According to the correlation relationships among numerous factors and with passenger flow, the analysis is summarized into a few comprehensive factors affecting passenger flow as common factors to reduce the variable dimension and achieve the purpose of rapid calculation. Then, based on the common factors, a BP neural network model optimized by particle swarm optimization (PSO) is trained to form an optimal PSO-BP neural network model, which solves the problems that the BP neural network is prone to falling into local optimal solutions and has a slow training speed. Finally, the purpose of quickly and accurately predicting the passenger flow of stations, lines, and line networks is achieved, providing data support for the optimal allocation of urban rail transit resources, the reasonable dispatching of trains, the allocation of customer service personnel, and scheduling.

[0071] As Figures 1 to 3 shown, a method for predicting urban rail transit passenger flow based on a multi-factor algorithm of the present invention specifically includes the following steps:

[0072] Step S1: Collect historical passenger flow data of urban rail transit and sample data of related index factors affecting passenger flow;

[0073] Comprehensively collect historical passenger flow data of urban rail transit. The historical passenger flow data includes at least the passenger flow data of one of a single station, a single line, or the whole line network. Any passenger flow data includes passenger flow OD information with a time granularity of T minutes. Usually, T is taken as 5, and the specific value can be adjusted as needed;

[0074] The related index factors affecting passenger flow include environmental factors and conditional factors. The environmental factors include at least the permanent population, the number of people going to work, various POI indexes, the number of bus routes, and the land use mixing index around the target station. The conditional factors include at least weekdays or holidays, peak tourist seasons or off-peak tourist seasons;

[0075] The various POI indexes include at least residential POI index, office POI index, commercial entertainment POI index, tourist attraction POI index, education POI index, hospital POI index, transportation hub POI index, and large venue POI index.

[0076] Usually, the factors for predicting station passenger flow include: environmental factors and conditional factors around the station;

[0077] The factors for predicting line passenger flow include: environmental factors and conditional factors within the radiation range of the line;

[0078] The factors for predicting line network passenger flow include: environmental factors and conditional factors within the radiation range of the whole line network.

[0079] Step S2: Construct a factor analysis mathematical model, analyze various index factors affecting passenger flow, determine common factors, and calculate scores;

[0080] The factor analysis mathematical model is expressed as:

[0081]

[0082] In matrix form: x = Af + ε,

[0083] where f = [f 1 , f 2 ,..., f m T are the various indicators affecting passenger flow and serve as the common factors of the factor analysis mathematical model; ε = [ε 1 , ε 2 ,..., ε n T are the special indicators affecting passenger flow and serve as the special factors of the factor analysis mathematical model; A = (a αβ ) n×m is the factor loading matrix, a αβ (α = 1, 2,..., n; β = 1, 2,..., m);

[0084] The factor analysis mathematical model is an orthogonal factor model. The factor loading matrix is calculated by the principal component analysis method to determine the common factors affecting passenger flow and calculate the common factor scores.

[0085] Based on the factor analysis (FA) algorithm for passenger flow influencing factors, the goals of simplification, dimensionality reduction, learning speed improvement, and prediction accuracy improvement are achieved. It has strong applicability under both stable and fluctuating environmental variables. It can not only predict the inbound and outbound passenger flow of stations, lines, and line networks under normal conditions on weekdays and holidays, but also predict the passenger flow under the influence of disturbances such as peak and off-peak tourist seasons. It can also predict the regional passenger flow during the planning period through the present invention to assist in the planning and design of newly built subway lines and stations.

[0086] Step S3: Construct a BP neural network model, the structure of which is as Figure 3 shown. Using the common factor scores as the input, the optimal parameter set is obtained through the particle swarm optimization algorithm;

[0087] Taking the common factor scores as the input is expressed as: where i = 1, 2,..., p (p is the number of common factors). Through deep learning with the PSO-BP neural network and training samples, the optimal passenger flow prediction BP neural network is output;

[0088] The BP neural network adopts a three-layer structure. The number of nodes in the input layer is determined by the number of common factors obtained from factor analysis, and the number of nodes in the output layer is the number of time periods into which the passenger flow data is divided.

[0089] ​​Step S4: Generate a BP neural network prediction model for urban rail transit passenger flow prediction based on the optimal parameter set, and obtain the optimal BP neural network prediction model through training with sample data, specifically including:

[0090] Step S41: Obtain passenger flow sample data and divide it into two parts: training samples and test samples;

[0091] Step S42: Calculate the weights and thresholds of the BP neural network based on the individual optimal position and the global optimal position, assign the corresponding parameters of the BP neural network, and generate a PSO-BP neural network model;

[0092] Step S43: Assign the prepared training sample data to the BP neural network model optimized by PSO for training to obtain the trained PSO-BP neural network model, denoted as the FA-PSO-BP neural network model, whose structure is as Figure 2 shown.

[0093] In the present invention, a mathematical model for factor analysis of urban rail transit passenger flow (FA model) is constructed, and the particle swarm optimization (PSO) algorithm is introduced to give full play to the advantages of FA in dimension reduction and PSO in being fast and accurate, providing an optimal solution for the optimization training of the BP neural network, and solving the problems that the BP neural network is prone to falling into local optimal solutions and has a slow training speed.

[0094] Furthermore, in the early stage of constructing the BP neural network, the particle swarm optimization (PSO) algorithm is introduced to optimize the weights and thresholds of the BP neural network, improving the learning efficiency and prediction accuracy of the neural network.

[0095] Step S5: Conduct real-time passenger flow prediction based on the trained BP neural network prediction model. In step S5, it also includes: using the test sample data for simulation verification based on the trained FA-PSO-BP neural network model, calculating the error between the predicted passenger flow output and the test sample data, and after evaluating that the error range meets the preset accuracy requirements, real-time passenger flow prediction can be carried out for urban rail transit stations, lines, and the entire network. If not satisfied, additional training sample data needs to be added for further optimization learning until the accuracy requirements are met.

[0096] In some embodiments of the present invention, step S2 specifically includes:

[0097] Step S21: Obtain the sample data of various index factors affecting passenger flow as the original data, then there is:

[0098]

[0099] where m is the number of indexes and n is the number of groups of sample data.

[0100] Step S22: Conduct a KMO test and a Bartlett spherical test on the original sample data. It is required that the KMO value > 0.5 and the Bartlett spherical test value < 0.05. Meeting the conditions indicates that the sample data comes from a normal distribution population and is suitable for further analysis. If the conditions are not met, further select the sample data;

[0101] Step S23: Calculate the mean and variance of the sample data, and standardize the original sample data to eliminate the influence of dimensions and make different variables comparable, which is expressed as:

[0102] Still denoted as x αβ ;

[0103] Step S24: Calculate the correlation coefficient matrix R = (r αβ ). The correlation coefficient matrix can reflect the correlation between various index factors, so there is:

[0104]

[0105] Among them,

[0106] Step S25: Calculate the eigenvalues and eigenvectors of the correlation coefficient matrix R;

[0107] By performing eigenvalue decomposition on the correlation coefficient matrix R through |λE - R| = 0, the eigenvalues λ α (α = 1, 2,..., m) and the corresponding eigenvectors e α (α = 1, 2,..., m) can be obtained.

[0108] Step S26: Determine the number of common factors according to the cumulative contribution rate required by the system;

[0109] Calculate the variance contribution rate of the eigenvectors:

[0110]

[0111] Passenger flow prediction is analyzed according to the factors with a cumulative contribution rate greater than 85%, and the number of common factors p (p ≤ m) is determined.

[0112] Step S27: Calculate the factor loading matrix A. The factor loading matrix reflects the relationship between the common factors and the original indicators, which is expressed as:

[0113]

[0114] Step S28: Rotate the loading matrix to obtain the rotated factor loading matrix to make the factor structure clearer and facilitate the interpretation of the actual meaning of the common factors;

[0115] Step S29: Calculate the common factor scores based on the rotated factor loading matrix, then we have:

[0116]

[0117] The common factors are obtained through factor analysis. Through factor analysis, numerous complex influencing factors can be attributed to a few comprehensive factors as common factors, achieving the goals of simplification and dimensionality reduction, thereby improving the learning speed and prediction accuracy of the model.

[0118] In some embodiments of the present invention, in combination with Figure 3 , step S3 specifically includes:

[0119] Step S31: Initialize the passenger flow prediction BP neural network and determine the number of hidden layer nodes. The number of hidden layer nodes can be calculated according to a specific formula, expressed as:

[0120]

[0121] Among them, the value of the number of input layer nodes is the score of the common factors obtained through factor analysis, the number of nodes is the number p of the common factors obtained through factor analysis; the number of output layer nodes is the number of time periods into which the passenger flow data is divided, and a passenger flow prediction value is output for each time period; θ is an empirical parameter, usually taking a value of 10 - 100. In addition, passenger flow sample data can be obtained simultaneously in this step and divided into two parts: training samples and test samples;

[0122] Step S32: Initialize the particle swarm optimization algorithm PSO. Each particle represents a set of weights and thresholds of the BP neural network, with dimension D and particle number N. Assign initial values to the position and velocity of each particle, set the individual optimal position of the particle to the current position of the particle, and set the maximum number of iterations of the particle swarm optimization algorithm to K; the fitness function of the particle swarm optimization algorithm PSO is set to the mean square error of the BP neural network training. Calculate the fitness value of each particle through the fitness function, and use the position of the particle with the minimum fitness value as the initial value of the global optimal position, then we have:

[0123] x i =[x i1 ,x i2 ,...,x iD T , representing the position of the i-th (i = 1, 2,..., N) particle;

[0124] ν i =[ν i1 ,ν i2 ,...,ν iD T , representing the velocity of the i-th (i = 1, 2,..., N) particle; ​​

[0125] pbest i = [pbest i1 , pbest i2 ,..., pbest iD T , representing the optimal position searched by the \(i\)-th particle itself, that is, the individual optimal position;

[0126] gbest = [gbest 1 , gbest 2 ,..., gbest D T , representing the optimal position searched by the entire particle swarm currently, that is, the global optimal position.

[0127] Step S33: Update the velocity and position of the particle;

[0128] The velocity iteration formula of the particle is expressed as:

[0129]

[0130] where \(t\) and \(t + 1\) represent the \(t\)-th and \((t + 1)\)-th iterations respectively; represents the velocity of particle \(i\) in the next iteration \(t + 1\); \(\omega\) is the inertia weight, which controls the retention degree of the particle velocity and affects the global search ability of the algorithm; is the velocity of particle \(i\) in the current iteration \(t\); \(c\) 1 and \(c\) 2 are acceleration coefficients, representing the individual learning factor and the social learning factor respectively, which control the degree of the particle approaching the individual optimal and the global optimal; \(r\) 1 and \(r\) 2 are random numbers in the interval \([0, 1]\), adding randomness to the algorithm; pbest i is the individual optimal position found by particle \(i\) so far; gbest is the global optimal position found by the entire particle swarm so far;

[0131] The position iteration formula of the particle:

[0132]

[0133] where, is the position of particle \(i\) in the next iteration \(t + 1\); is the position of particle \(i\) in the current iteration; is the velocity of particle \(i\) in the next iteration.

[0134] ​​The velocity iteration formula contains parameters such as inertia weight, acceleration coefficient, and random number, which respectively control the retention degree of particle velocity, the degree of approaching the individual optimal and global optimal, and add randomness to the algorithm; the position iteration formula calculates the new position of the particle according to the updated velocity.

[0135] Step S34: Calculate the fitness value of the particle, and determine the individual optimal position and the global optimal position;

[0136] Calculate the fitness value of each particle, and calculate the individual optimal position and the global optimal position based on the fitness value. Compare the current position of each particle with its individual optimal position. If the current position is better, update its individual optimal position to the current position; compare the individual optimal position of each particle with the global optimal position of the entire particle swarm. If the individual optimal position is better, update the global optimal position to the individual optimal position.

[0137] Step S35: Repeat Step S33 and Step S34 until the iteration termination condition is met to obtain the best parameter set.

[0138] For example, the termination condition can be set to reach the maximum number of iterations K or the fitness value of the particle satisfies the judgment condition.

[0139] The following uses specific embodiments to illustrate the present invention.

[0140] The index factors of rail transit are usually relatively concentrated in some major cities. Therefore, taking the Beijing urban rail transit as an example, it includes the number of permanent residents, the number of people going to work, the number of residential POIs, the number of office POIs, the number of commercial and entertainment POIs, the number of tourist attraction POIs, the number of education POIs, the number of hospital POIs, the number of transportation hub POIs, the number of large venue POIs, the number of bus routes, the land use mix index, etc., and is also related to factors such as weekdays, holidays, peak tourist seasons, and off-peak tourist seasons, and is also affected by factors such as weather, other traffic conditions, national and local policies, ticket systems and fares.

[0141] 1. Select the index factors affecting passenger flow as shown in Table 1 below.

[0142] Table 1 Related index factors affecting passenger flow

[0143]

[0144] 2. Calculate the eigenvalue and cumulative contribution rate

[0145] The present invention uses SPSS to analyze the selected 12 index factors, and obtains the cumulative contribution rate of the eigenvalues of the index factors (in descending order), as shown in Table 2 below. It can be seen that the cumulative contribution rate of the top 4 items in order of size has reached 88.673%, exceeding 85%. Therefore, the number of common factors is set to 4.

[0146] Table 2 Eigenvalues and cumulative contribution rates of key indicator factors affecting passenger flow

[0147]

[0148] 3. Calculate the public factor scores as shown in Table 3.

[0149] Table 3 Public factor scores

[0150]

[0151]

[0152] The present invention collects historical data of typical subway stations. Taking the inbound passenger flow data every 5 minutes at a certain subway station from September to November 2024 during weekdays from 8:00 to 10:00 as an example, simulation verification is carried out. The input is the public factor score, and the output is the predicted value of the inbound passenger flow every 5 minutes. Among them, 80% of the data is selected as the training set, and the remaining 20% is selected as the test set. The learning rate of the BP neural network is set to 0.1, and the maximum number of iterations is set to 10000; in the particle swarm optimization algorithm, the inertia parameter is selected to be 0.5. Through the calculation of the FA-PSO-BP model, the differences between the predicted value and the actual value are as follows Figure 4 as shown

[0153] From Figure 4 it can be seen that the predicted inbound passenger flow curve optimized by FA dimensionality reduction and PSO fits very well with the actual inbound passenger flow curve, while the BP neural network without FA dimensionality reduction and PSO optimization has a slightly lower fitting degree with the actual value. The predicted passenger flow of the FA-PSO-BP model is closer to the actual value than that of the BP model. It can be seen that the BP neural network optimized by FA dimensionality reduction and PSO has higher prediction accuracy.

[0154] According to one aspect of the present invention, there is provided an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the above one or more computer programs are stored in the memory. When the electronic device runs, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes a method for predicting urban rail transit passenger flow based on a multi-factor algorithm as described in any one of the above technical solutions.

[0155] According to one aspect of the present invention, there is provided a computer-readable storage medium for storing computer instructions, and when the computer instructions are executed by a processor, a method for predicting urban rail transit passenger flow based on a multi-factor algorithm as described in any one of the above technical solutions is implemented.

[0156] In addition, it should be noted that the present invention can be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present invention can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0157] Embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0158] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0159] It should also be noted that in the present invention, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or terminal device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or terminal device including the said element.

[0160] Finally, it should be noted that the above description is the preferred embodiment of the present invention. It should be pointed out that although the preferred embodiments of the present invention have been described, for those skilled in the art of this technology, once they know the basic creative concept of the present invention, without departing from the principle described in the present invention, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

Claims

1. A method for predicting passenger flow of urban rail transit based on a multi-factor algorithm, characterized in that: The following steps are involved: Step S1, collecting historical passenger flow data of urban rail transit and sample data of relevant indicator factors affecting passenger flow; Step S2: construct a factor analysis mathematical model, analyze various index factors affecting passenger flow, determine common factors and calculate scores; Step S3, constructing a BP neural network model, taking the common factor scores as input, and obtaining the optimal parameter set through a particle swarm optimization algorithm; Step S4: generating a BP neural network prediction model for urban rail transit passenger flow prediction based on the optimal parameter set, and obtaining the optimal BP neural network prediction model through training with sample data; Step S5: Perform real-time passenger flow prediction based on the trained BP neural network prediction model.

2. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 1 is characterized in that: In step S1, the historical passenger flow data includes at least passenger flow data of a single station, a single line or the entire line network, and any passenger flow data includes passenger flow OD information with a time granularity of T minutes; The relevant index factors affecting passenger flow include environmental factors and conditional factors. The environmental factors at least include the number of permanent residents, the number of commuters, various POI indexes, the number of bus routes, and the land use mixed index around the target station. The conditional factors at least include working days or holidays, tourist peak seasons or tourist off-seasons. The various POI indexes include at least a residential POI index, an office POI index, a commercial and entertainment POI index, a tourist attraction POI index, an educational POI index, a hospital POI index, a transportation hub POI index, and a large venue POI index.

3. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 1 is characterized in that: In step S2, the factor analysis mathematical model is expressed as: The matrix form is: x = Af + ε, Where f=[f1,f2,...,f m ] T are the various indicators that affect passenger flow, serving as the common factors of the factor analysis mathematical model; ε=[ε1,ε2,...,ε n ] T is a special index that affects passenger flow and is used as a special factor in the factor analysis mathematical model; A = (a αβ ) n×m is the factor loading matrix, a αβ (α=1,2,...,n; β=1,2,...,m); The factor analysis mathematical model is an orthogonal factor model, which calculates the factor loading matrix through principal component analysis, determines the common factors affecting passenger flow, and calculates the common factor scores.

4. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 3 is characterized in that: The step S2 specifically includes: Step S21, obtaining sample data of various index factors affecting passenger flow as original data; Step S22, perform KMO test and Bartlett sphericity test on the original sample data, and if the conditions are not met, further select sample data; Step S23, calculating the mean and variance of the sample data, and performing standardization processing on the original sample data; Step S24, calculating the correlation coefficient matrix of the samples; Step S25, calculating the eigenvalues ​​and eigenvectors of the correlation coefficient matrix; Step S26, determining the number of common factors according to the cumulative contribution rate required by the system; Step S27, calculating the factor loading matrix; Step S28, rotating the loading matrix to obtain a rotated factor loading matrix; Step S29: Calculate the common factor scores based on the rotated factor loading matrix.

5. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 1 is characterized in that: In step S3, the common factor score is taken as input, which is expressed as: Where i = 1, 2, ..., p, p is the number of common factors, deep learning is performed through the PSO-BP neural network and training samples, and the optimal passenger flow prediction BP neural network is output; The BP neural network adopts a three-layer structure. The number of nodes in the input layer is determined by the number of common factors obtained by factor analysis, and the number of nodes in the output layer is the number of time periods divided by the passenger flow data.

6. The method for predicting passenger flow of urban rail transit based on a multi-factor algorithm according to claim 5 is characterized in that: The step S3 specifically includes: Step S31, initialize the passenger flow prediction BP neural network, use the common factor scores as input, output the predicted passenger flow data, determine the number of hidden layer nodes, and construct the BP neural network; Step S32, initializing the particle swarm optimization algorithm PSO, each particle represents a set of weights and thresholds of the BP neural network, the dimension is D, the number of particles is N, the position and velocity of each particle are assigned initial values, the individual optimal position of the particle is set to the current position of the particle, and the maximum number of iterations of the particle swarm optimization algorithm is set to K; Step S33, updating the speed and position of the particle; Step S34, calculating the fitness value of the particle, and determining the individual optimal position and the global optimal position; Step S35, repeat step S33 and step S34 until the iteration termination condition is met, and the optimal parameter set is obtained.

7. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 6 is characterized in that: In step S31, the number of hidden layer nodes is determined, which is expressed as: Among them, the value of the number of nodes in the input layer is the score of the common factor obtained by factor analysis, and the number of nodes is the number p of common factors obtained by factor analysis; the number of nodes in the output layer is the number of time periods divided by the passenger flow data, and a passenger flow prediction value is output for each time period; θ is an empirical parameter, usually with a value of 10-100.

8. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 6 is characterized in that: In step S32, the fitness function of the particle swarm algorithm PSO is set to the mean square error of BP neural network training, and the fitness value of each particle is calculated by the fitness function. The particle position with the smallest fitness value is taken as the initial value of the global optimal position, then: x i =[x i1 ,x i2 ,...,x iD ] T , represents the position of the i-th (i=1,2,...,N) particle; ν i =[ν i1 ,ν i2 ,...,v iD ] T , represents the velocity of the i-th (i=1,2,...,N) particle; pbest i =[pbest i1 ,pbest i2 ,...,pbest iD ] T , which means the optimal position searched by the i-th particle itself, that is, the individual optimal position; gbest=[gbest1,gbest2,...,gbest D ] T , which indicates the optimal position currently searched by the entire particle swarm, that is, the global optimal position.

9. The method for predicting passenger flow of urban rail transit based on a multi-factor algorithm according to claim 8, characterized in that: In step S33, the particle velocity iteration formula is expressed as: Among them, t and t+1 represent the tth and t+1th iterations respectively; represents the speed of particle i at the next iteration t+1; ω is the inertia weight, which controls the degree of retention of particle speed and affects the global search ability of the algorithm; is the speed of particle i at the current iteration t; c1 and c2 are acceleration coefficients, representing the individual learning factor and the social learning factor, respectively, which control the degree to which the particle approaches the individual optimum and the global optimum; r1 and r2 are random numbers in the interval [0,1], which add randomness to the algorithm; pbest i is the individual best position found by particle i so far; gbest is the global best position found by the entire particle swarm so far; Particle position iteration formula: in, is the position of particle i at the next iteration t+1; is the position of particle i in the current iteration; is the velocity of particle i in the next iteration.

10. The urban rail transit passenger flow prediction method based on a multi-factor algorithm according to claim 1 is characterized in that: The step S4 specifically includes: Step S41, obtaining passenger flow sample data and dividing it into two parts: training samples and test samples; Step S42: based on the individual optimal position and the global optimal position, the weight and threshold of the BP neural network are calculated, the corresponding parameters of the BP neural network are assigned, and a PSO-BP neural network model is generated; Step S43: assign the prepared training sample data to the BP neural network model optimized by PSO for training, and obtain the trained PSO-BP neural network model, which is recorded as FA-PSO-BP neural network model.

Citation Information

Patent Citations

  • Urban short-term traffic flow prediction method based on GCN-IPSO-LSTM combined model

    CN116721537A

Cited By

  • Risk identification and collaborative management method and system for passenger flow buffer area of subway station

    CN120450456A

  • A subway station passenger flow buffer zone risk identification and collaborative management method and system

    CN120450456B

  • Ammeter data acquisition regulation and control method

    CN120711587A

  • Multi-factor coupling subway ventilation air conditioner load and comfort level prediction method and system

    CN120763495A

  • Multi-factor coupled subway ventilation air conditioning load and comfort degree prediction method and system

    CN120763495B