[go: up one dir, main page]

CN108197739B - Urban rail transit passenger flow prediction method - Google Patents

Urban rail transit passenger flow prediction method Download PDF

Info

Publication number
CN108197739B
CN108197739B CN201711479681.4A CN201711479681A CN108197739B CN 108197739 B CN108197739 B CN 108197739B CN 201711479681 A CN201711479681 A CN 201711479681A CN 108197739 B CN108197739 B CN 108197739B
Authority
CN
China
Prior art keywords
passenger flow
matrix
time period
input
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711479681.4A
Other languages
Chinese (zh)
Other versions
CN108197739A (en
Inventor
田寅
温博阁
唐海川
龚明
咸晓雨
王经纬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRRC Industry Institute Co Ltd
Original Assignee
CRRC Industry Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CRRC Industry Institute Co Ltd filed Critical CRRC Industry Institute Co Ltd
Priority to CN201711479681.4A priority Critical patent/CN108197739B/en
Publication of CN108197739A publication Critical patent/CN108197739A/en
Application granted granted Critical
Publication of CN108197739B publication Critical patent/CN108197739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention provides a method for predicting passenger flow of urban rail transit, which comprises the following steps: and counting an OD distribution matrix based on the current time period of the target track traffic route, and predicting the passenger flow of the specified road section of the target track traffic route in the specified time period by using a passenger flow prediction model which is established according to prediction requirements and is obtained by training the historical OD distribution matrix of the target track traffic route. The invention can effectively simplify the passenger flow prediction process, improve the calculation speed and the calculation precision and provide powerful support for timely and reasonably managing and scheduling traffic.

Description

Urban rail transit passenger flow prediction method
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a passenger flow prediction method for urban rail transit.
Background
The rail transit is gradually a hot spot in urban traffic construction due to the advantages of land saving, large transportation capacity, stable operation time, safety, environmental protection and the like. Countries and regions such as europe, the united states, and the day have made a lot of research and development on rail transit systems, such as the DRIVE system in europe, the TRAVTEK system in the united states, the VICS system in japan, and the like. The systems analyze road network traffic information changing in real time through the vehicle-mounted induction device, calculate the optimal driving path, reasonably schedule vehicles, and achieve the purposes of evenly distributing road network traffic flows and improving the transportation efficiency.
In the research of the traffic information distribution theory, the development of a mathematical programming method, a graph theory method, a computer technology and the like provide a solid foundation for the research and the application of a reasonable traffic distribution model. However, since the urban rail transit passenger flow distribution and the road traffic flow distribution are significantly different in research objects, consideration factors, transfer problems, and the like, these research results cannot be directly applied to rail transit, and need to be analyzed in combination with rail transit characteristics.
The domestic research aiming at the problem of urban rail transit passenger flow distribution is mainly the research which is carried out by taking traveler selection behaviors as the core in the aspect of urban road traffic flow distribution. On the basis of analyzing the traffic selection behaviors of passengers, a traffic distribution model and an optimization algorithm of the rail transit passenger transport network are constructed. Meanwhile, based on the user balance principle, a passenger flow balance distribution model of the urban rail transit network is established. These methods can be used in rail transit passenger flow distribution.
The basic idea of the existing urban rail transit passenger flow prediction is as follows: starting from a passenger flow OD distribution matrix, according to the principle that the travel time of a traveler is always the shortest, and simulating the distribution state of the traveler on a rail transit planning road network according to a passenger flow distribution model. And determining the OD quantity of the passenger flow adopting the rail transit by comparing whether the traveler adopts the difference of the rail transit system in the travel time, and distributing the OD quantity to the target rail transit line to obtain the station quantity and the line section passenger flow quantity of the target rail transit line.
The traveler often has many influencing factors when selecting a travel mode and a travel route, wherein the main factors include travel time, travel distance, cost, route arrangement and the like. These factors are translated into generalized travel time in practical applications.
According to the traditional passenger flow prediction method, different models are required to be built for different target routes, wherein the models comprise the aspects of travel distance, cost, route arrangement and the like, and then the original models are corrected to predict the passenger flow. Therefore, the model building workload is large, the prediction model reuse rate is low, and the timely management and scheduling of urban rail transit are not facilitated.
Disclosure of Invention
In order to overcome the problems or at least partially solve the problems, the invention provides a passenger flow prediction method for urban rail transit, which is used for effectively simplifying a passenger flow prediction process, improving the calculation speed and the calculation precision and providing powerful support for timely and reasonable traffic management and scheduling.
The invention provides a method for predicting passenger flow of urban rail transit, which comprises the following steps: the method comprises the steps of counting an OD distribution matrix based on the current time period of a target track traffic route, utilizing a passenger flow prediction model which is established according to the structural characteristics of the OD distribution matrix and the passenger flow data characteristics and is obtained by training the historical OD distribution matrix of the target track traffic route, and predicting the passenger flow of a specified road section of the target track traffic route in a specified time period.
Further, before the step of predicting the passenger flow of the specified section of the target rail transit route in the specified time period by using the passenger flow prediction model, the method further comprises: s01, constructing an initial passenger flow prediction model of the CNN-LSTM structure based on the two-dimensional structure characteristics of the OD distribution matrix and the time correlation characteristics of the passenger flow; s02, acquiring a historical OD distribution matrix of the designated historical time period of the target track traffic route, and preprocessing the historical OD distribution matrix according to a time sequence to acquire a training sample; and S03, training the initial passenger flow prediction model by using the training sample to obtain the passenger flow prediction model.
The step of predicting the passenger flow of the specified road section of the target track traffic route in the specified time period based on the statistical OD distribution matrix of the current time period further comprises the following steps: inputting the statistical OD distribution matrix of the current time period into a passenger flow prediction model of a CNN-LSTM structure, and extracting passenger flow characteristic quantity of the current time period through a CNN convolutional neural network at the front end of the network; and predicting the passenger flow of the specified road section of the target rail transit route in the specified time period by using an LSTM neural network based on the passenger flow characteristic quantity of the current time period.
The passenger flow prediction model comprises an input layer, an output layer and a hidden layer, wherein the input layer represents the passenger flow of each section at different moments, the output layer represents the passenger flow of each section at different moments after prediction, and the hidden layer is an LSTM layer and is used for gradually correcting according to an error value of expected output and actual output so that the actual output follows the expected output.
Further, before the passenger flow prediction is performed by using the passenger flow prediction model based on the statistical OD distribution matrix of the current time period, the method further includes: preprocessing the data of the section passenger flow volume; numbering the cross section passenger flow according to a time sequence, and grouping according to a prediction time sequence; each station is set as a section, a matrix is arranged in each group, and the passenger flow volume is counted at set time intervals to form an input matrix.
Further, the method further comprises: calculating the input matrix through a hidden layer LSTM and performing activation processing through an activation function; and after the invalid data of the input matrix of the neural network is removed, integrating the input matrix into the neural network to obtain the output of the whole network.
Wherein the output of the overall network comprises the intermediate output at the current moment and the predicted output of the overall network; correspondingly, the method further comprises the following steps: and according to the passenger flow data input and predicted, loss calculation is carried out on the predicted output by utilizing the passenger flow data at the next moment, gradient calculation is carried out on each weight of the network by utilizing backward propagation, and each weight parameter is optimized.
Further, the method further comprises: the length of the input matrix is limited by setting the maximum input dimension, where padding with 0 does not meet the maximum length and truncation exceeds the maximum length.
Further, the method further comprises: and filling the preprocessed data into 299 x 299 matrix, performing feature extraction by using a CNN network, and flattening and inputting the data subjected to dimensionality reduction into an LSTM layer to accelerate the calculation speed.
The urban rail transit passenger flow prediction method provided by the invention is based on the neural network prediction model, can be used for judging passenger flow distribution in advance under the support of an OD network, can effectively simplify the passenger flow prediction process, improves the calculation speed and the calculation precision, and provides powerful support for timely and reasonable traffic management and scheduling.
Drawings
FIG. 1 is a flow chart of a method for creating a model for predicting passenger traffic flow in rail transit according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a passenger flow prediction model based on a neural network according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the LSTM layer of a passenger flow prediction model according to an embodiment of the present invention;
FIG. 4 is a flowchart of an urban rail transit passenger flow prediction method based on a CNN-LSTM neural network according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a passenger traffic prediction model pre-CNN network according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As an embodiment of the present invention, the embodiment provides a method for predicting passenger flow in urban rail transit, including: the method comprises the steps of counting an OD distribution matrix based on the current time period of a target track traffic route, utilizing a passenger flow prediction model which is established according to the structural characteristics of the OD distribution matrix and the passenger flow data characteristics and is obtained by training the historical OD distribution matrix of the target track traffic route, and predicting the passenger flow of a specified road section of the target track traffic route in a specified time period.
It can be understood that, in the embodiment, the characteristic that the neural network can extract useful features from complex data is utilized, and although each traveler has different choices of different travel distances at various time points, which are discrete and irregular data, the whole travel population is considered as a whole, individual differences are smoothed, and an overall rule is presented.
Meanwhile, considering that rail transit is taken as an important component of the whole urban traffic system, the passenger flow is predicted according to the rail transit needs, and then corresponding train lists are arranged.
After the prediction model is established, according to the data prediction basis, the passenger flow of a given road section in the target rail transit route in a given time period is predicted by using the prediction model. In the embodiment, the data prediction basis is an input determination amount, and the OD distribution matrix is obtained from the current time period statistics of the target track traffic route, for example, the OD statistical data of the current month is input to the route to be predicted. That is, the passenger flow OD matrix is used as the input of the whole network to extract the passenger flow of a certain road section in a period of time.
In one embodiment, before the passenger flow prediction is performed by using the passenger flow prediction model based on the statistical OD distribution matrix of the current time period, the method further comprises: preprocessing the data of the section passenger flow volume; numbering the cross section passenger flow according to a time sequence, and grouping according to a prediction time sequence; each station is set as a section, a matrix is arranged in each group, and the passenger flow volume is counted at set time intervals to form an input matrix.
It can be understood that the present embodiment first preprocesses the data of the cross-sectional passenger flow volume. The passenger traffic data are numbered in chronological order, i.e. grouped in a predicted chronological order. Each group has a unique number, a matrix is arranged in each group, the passenger flow is counted at intervals on the assumption that one passenger station (one section) is total, the total statistical matrix has n rows and 1 columns, and each row is the passenger flow of one node at the current time. Namely, the network inputs are:
X=(x1,x2,...,xl)T
in the formula, the vector X represents the input vector of the neural network model, X1,x2,...,xlRespectively representing the passenger flow of 1 st to l statistical nodes.
The urban rail transit passenger flow prediction method provided by the embodiment of the invention is based on the neural network prediction model, can be used for judging passenger flow distribution in advance under the support of an OD network, can effectively simplify the passenger flow prediction process, improves the calculation speed and the calculation precision, and provides powerful support for timely and reasonably managing and scheduling traffic.
Further, before the step of predicting the passenger flow of the specified road section of the target track traffic route in the specified time period by using the passenger flow prediction model, the method further includes a processing flow shown in fig. 1, where fig. 1 is a flow chart for establishing a track traffic passenger flow prediction model according to an embodiment of the present invention, and includes:
s01, constructing an initial passenger flow prediction model of the CNN-LSTM structure based on the two-dimensional structure characteristics of the OD distribution matrix and the time correlation characteristics of the passenger flow;
s02, acquiring a historical OD distribution matrix of the designated historical time period of the target track traffic route, and preprocessing the historical OD distribution matrix according to a time sequence to acquire a training sample;
and S03, training the initial passenger flow prediction model by using the training sample to obtain the passenger flow prediction model.
It will be appreciated that according to the above described embodiment, the predictive model is built from existing conditions prior to the prediction of passenger flow using the predictive model. Step S01 is to initially construct a target neural network, and determine the structure and structural parameters of the neural network model in consideration of the existing conditions. Specifically, considering that the OD matrix is two-dimensional input, a two-dimensional processing neural network is selected as a convolution neural network. The passenger flow is information related to time, so that a long-time memory network is the best to adopt, and the difficulty is that the two networks are used independently, the input dimensions are different, and an LSTM neural network is set as a prediction core.
In addition, since the OD distribution matrix is in a matrix form, the LSTM neural network cannot recognize it, and it is necessary to transform the OD distribution matrix first to extract the feature quantity. In the embodiment, the preposed CNN convolutional neural network is arranged in front of the LSTM network, the OD distribution matrix is subjected to convolutional processing, and a processing result is input into the LSTM neural network to predict future passenger flow.
As can be understood from step S02, the present embodiment predicts future data based on the historical OD distribution matrix of the track traffic route specified historical time period. The OD distribution matrix in a given historical time period is obtained through a certain way, for example, an OD distribution matrix in a certain past time period of a city subway can be obtained from a ground-drop operation company. And then preprocessing the acquired data to form a training sample set. And dividing the historical OD distribution matrix into historical OD data with the time being earlier and historical OD data with the time being later, and taking the OD data with the time being earlier and the OD data with the time being later as a group of training samples to carry out label distribution.
Step S03 may be understood as taking the historical OD data with time ahead as the input of the neural network, obtaining the prediction result through the forward calculation, and comparing the prediction result with the historical OD data with time behind in the training data. And correcting the network parameters according to the comparison result, and gradually training the neural network. And taking the neural network with the final prediction result and the training data meeting the set relationship as a final passenger flow prediction model.
Optionally, the passenger flow prediction model includes an input layer, an output layer, and a hidden layer, where the input layer represents passenger flow volumes of each section at different times, the output layer represents passenger flow volumes of each section at different times after prediction, and the hidden layer is an LSTM layer and is used to gradually correct according to an error value between an expected output and an actual output, so that the actual output follows the expected output.
It can be understood that, as shown in fig. 2, it is a schematic structural diagram of a passenger flow prediction model based on a neural network according to an embodiment of the present invention. The input layer of the neural network in the figure has t nodes which respectively represent passenger flows at different moments, and XiIt represents the traffic volume of each section at a certain moment. The output is t nodes representing the passenger flow of each time period, hiRepresenting the predicted passenger flow of each section at a certain moment. In the figure, block a is the LSTM layer of the neural network core.
Fig. 3 is a schematic diagram of an LSTM layer structure of a passenger traffic prediction model according to an embodiment of the present invention. The learning process of the neural network consists of forward propagation of the working signal and backward propagation of the error signal. In the forward propagation process, an input signal is transmitted from an input layer to an output layer through a hidden layer, if the output layer cannot obtain expected output, the process is shifted to an error signal backward propagation process, and the error between the actual output and the expected output of the network is judged and corrected layer by layer from the output end, so that the actual output of the network is closer to the expected output.
Generally, different activation functions are adopted according to different network structures, and in the embodiment of the application, relu and sigmoid functions are adopted as the activation functions.
Optionally, referring to fig. 4, as a further processing step of predicting the passenger flow of the specified road section of the target track traffic route in the specified time period based on the statistical OD distribution matrix of the current time period, a flowchart of an urban track traffic passenger flow prediction method based on the CNN-LSTM neural network in an embodiment of the present invention is shown, and the method includes:
s11, inputting the statistical OD distribution matrix of the current time period into a passenger flow prediction model with a CNN-LSTM structure, and extracting passenger flow characteristic quantity of the current time period through a CNN convolutional neural network at the front end of the network;
and S12, based on the passenger flow characteristic quantity of the current time period, predicting the passenger flow of the specified road section of the target rail transit route in the specified time period by using an LSTM neural network.
It can be understood that before the LSTM prediction network is used to predict future data according to current data, the CNN convolutional neural network is used to perform convolution operation on the input OD distribution matrix, extract the passenger flow characteristic data in the current time period, and obtain the input X ═ X (X) that the LSTM network can recognize1,x2,...,xl)T
Then, at the network input layer, the weighted activation operation is performed on the input data according to the following formula:
Figure BDA0001533529730000081
Figure BDA0001533529730000082
in the formula (I), the compound is shown in the specification,
Figure BDA0001533529730000083
representing the weighted output of the input level nodes, ωilWhich represents the weight of the input data,
Figure BDA0001533529730000084
i represents the input data at the moment t of the ith layer of the matrix, I represents the ith layer of the matrix, I is 1,2clThe weight of the state data at the last moment is shown,
Figure BDA0001533529730000085
indicating the input state value at the last moment,
Figure BDA0001533529730000086
representing the activated input layer node output, and f () representing the input layer activation function.
That is, t in the above equation is the current time, a is the input at the current time, b is the input to the network after passing through the activation function, the activation function is generally selected to be sigmoid, and the back end is the output of the whole network at the previous time.
In one embodiment, the method further comprises: calculating the input matrix through a hidden layer LSTM and performing activation processing through an activation function; and after the invalid data of the input matrix of the neural network is removed, integrating the input matrix into the neural network to obtain the output of the whole network.
It can be understood that, according to the input at the current time, the data that needs to be discarded by the network is calculated so that new data can be input, and the calculation formula is as follows:
Figure BDA0001533529730000091
Figure BDA0001533529730000092
in the formula, ωiRepresenting the input gate i phi matrix weights,
Figure BDA0001533529730000093
representing input data, ω, at time t of the ith layer of the matrixRepresents the last moment c matrix weight, sc t-1Representing the state parameter after the activation function at the last time.
The above formula processes the discarded data, and discards the unnecessary data before, wherein the weight is a number from 0 to 1, 1 is complete pass, and 0 is complete fail. After this layer of computation, the network will need the data. Where s is the input of the previous layer, x is the input of this layer, w is the weight, b is the input after the activation function, where the back end is still the output of the whole network at the previous time.
Then, calculating a network middle layer, discarding the input of the neural network, and integrating the data to be input into the network, wherein the calculation formula is as follows:
Figure BDA0001533529730000094
Figure BDA0001533529730000095
in the formula, ωicThe weights of the ic matrix are represented by,
Figure BDA0001533529730000096
representing the input at time t, s, of the ith layer of the matrixc t-1Representing the state parameter after the activation function at the last time.
Wherein, the formula is another set of weight values w, and the front is the place where the pair is forgottenForgetting some unnecessary data, weighting and accumulating newly input data, adding the data to the network at the moment, b being output at the last moment, acAs a result of passing the forgetting gate without passing the activation of the g-function. B is integrated by an activation function g, which typically takes the sigmod function.
Finally, the output of the whole network is calculated, the network output is divided into two parts, one is the intermediate output of the current time
Figure BDA0001533529730000097
And the other is the predicted output of the entire network. The calculation formula is as follows:
Figure BDA0001533529730000101
Figure BDA0001533529730000102
in the formula, ωIs the weight of the i ω matrix,
Figure BDA0001533529730000103
representing the input at time t, ω, of the ith layer of the matrixThe weights of the c co matrix are represented,
Figure BDA0001533529730000104
representing the state parameter after the activation function at time t.
Wherein, a network back-end variable, i.e. s, at the next moment needs to be calculated, and a weighted accumulation mode is specifically adopted. s is the updated state parameter input at the last moment, x is the new data input at the moment and is output as b through the f transformation function, and the f transformation function is generally a tanh function.
The predicted output at the current moment is as follows:
Figure BDA0001533529730000105
in the formula (I), the compound is shown in the specification,htthe output of the prediction of the network is represented,
Figure BDA0001533529730000106
indicating that the network output layer node is activated and then output,
Figure BDA0001533529730000107
representing the state parameter after the activation function at time t.
And performing matrix multiplication on the calculated output s and the updated s activated by the f function.
Optionally, the output of the overall network includes an intermediate output at the current time and a predicted output of the overall network; correspondingly, the method further comprises the following steps: and according to the passenger flow data input and predicted, loss calculation is carried out on the predicted output by utilizing the passenger flow data at the next moment, gradient calculation is carried out on each weight of the network by utilizing backward propagation, and each weight parameter is optimized.
It is understood that, by the above calculation, it is possible to obtain (x) from the input x (t) ═ x1,x2,...,xl)TThe output after the hidden layer calculation and the activation function processing, i.e. the predicted passenger flow data h (t) ═ h1,h2,...,hm)T. Where vector H represents the hidden layer output vector, H1,h2,...,hmRespectively representing predicted future 1 st to m predicted time period passenger flow.
Then, loss calculation is performed on the current prediction output h (t) by using input data X (t +1) at the next moment, and gradient calculation is performed on each weight by using back propagation, thereby optimizing each weight parameter. Wherein the tag output is Y ═ (Y)1,y2,...,ym)TThe value at time X (t +1) is shown.
According to the value of the label and the predicted value of the network, a loss function can be calculated according to the cross entropy:
Figure BDA0001533529730000108
where Γ (x, y) represents a loss function, y represents a tag value, k represents a matrix dimension, and x represents a network output value.
The above formula is a cross entropy calculation formula, and the deviation value y of the predicted data and the actual data is that the actual data x is the predicted data.
The weights of each matrix can be modified by back-propagation using a loss function. The gradients after calculation for the above 4 groups were as follows:
Figure BDA0001533529730000111
Figure BDA0001533529730000112
Figure BDA0001533529730000113
Figure BDA0001533529730000114
the above equations are respectively partial derivatives of the loss function to each weight, and the resultant vector is a gradient vector, x represents the network output, and y represents the label value.
The basic calculation formula of the network is as described above, so as to achieve the prediction purpose.
Further, the method further comprises: the length of the input matrix is limited by setting the maximum input dimension, where padding with 0 does not meet the maximum length and truncation exceeds the maximum length.
It can be understood that the overall implementation needs to process data, and the input data has different lengths after being processed, while the LSTM network needs to be uniform in input dimension of each dimension, so the input maximum length max _ len needs to be set here, and the input maximum length max _ len does not meet the filling of 0, and the input maximum length is truncated.
Further, the method further comprises: and filling the preprocessed data into 299 x 299 matrix, performing feature extraction by using a CNN network, and flattening and inputting the data subjected to dimensionality reduction into an LSTM layer to accelerate the calculation speed.
It can be understood that, in order to increase the processing speed of data in the LSTM network, the preprocessed data is filled into 299 × 299 matrix, the CNN network is used to perform feature extraction, and the reduced-dimension data is input into the LSTM layer in a flattened manner, so as to increase the computing speed of the whole network.
The structure of the CNN network is shown in fig. 5, which is a schematic structural diagram of a passenger traffic prediction model pre-CNN network according to an embodiment of the present invention. The Input is a filled matrix with the size of 299 x 299; and then, carrying out convolution, maximum pooling, convolution and maximum pooling, and flattening through a full connection layer to be used as input data of the LSTM network.
Wherein, in one embodiment, the convolutional layer selects a 3 x 3 matrix, the internal weights conform to (0,1) normal distribution, filled as 'same'; pooling is a 2 x 2 matrix with a step size of 4.
In another embodiment, the processed data is a two-dimensional matrix, and each group is the section passenger flow of a time segment, and the total number of the groups is n, namely n time segments.
The two-dimensional matrix is then transformed into a three-dimensional matrix, in the form: [ samples, time steps, features ]. Where features takes 1 and time steps takes the truncated maximum length max _ len. And then, performing one hot enconde processing on the label Y, and inputting the label Y into an LSTM network, wherein the whole network has 32 layers. The Loss function selects 'elementary crossbar', optimally selects 'adam', and selects the number of training rounds according to the size of the data volume.
And finally, obtaining the predicted value of the change of the passenger flow volume of each node in 32 time periods in the future through the output [ batch,32] of the LSTM network operation.
According to the predicted value obtained by network calculation, the train operation company can reasonably arrange trains on different routes and make drivers turn around more accurately. The method changes the traditional simple distribution mode of increasing train arrangement according to holidays, plays a high-efficiency and accurate distribution mode, and provides important decision support for daily arrangement of operation companies.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A passenger flow prediction method for urban rail transit is characterized by comprising the following steps:
the method comprises the steps of counting an OD distribution matrix based on the current time period of a target track traffic route, utilizing a passenger flow prediction model which is established according to the structural characteristics of the OD distribution matrix and the passenger flow data characteristics and is obtained by training the historical OD distribution matrix of the target track traffic route, and predicting the passenger flow of a specified road section of the target track traffic route in a specified time period, wherein the passenger flow prediction model is a passenger flow prediction model based on a CNN-LSTM structure.
2. The method of claim 1, further comprising, prior to the step of predicting passenger flow for the specified segment of the target rail transit route over the specified time period using the passenger flow prediction model:
s01, constructing an initial passenger flow prediction model of the CNN-LSTM structure based on the two-dimensional structure characteristics of the OD distribution matrix and the time correlation characteristics of the passenger flow;
s02, acquiring a historical OD distribution matrix of the designated historical time period of the target track traffic route, and preprocessing the historical OD distribution matrix according to a time sequence to acquire a training sample;
and S03, training the initial passenger flow prediction model by using the training sample to obtain the passenger flow prediction model.
3. The method of claim 2, wherein the step of predicting the passenger flow of the specified section of the target track traffic route within the specified time period based on the statistical OD distribution matrix of the current time period further comprises:
inputting the statistical OD distribution matrix of the current time period into a passenger flow prediction model of a CNN-LSTM structure, and extracting passenger flow characteristic quantity of the current time period through a CNN convolutional neural network at the front end of the network;
and predicting the passenger flow of the specified road section of the target rail transit route in the specified time period by using an LSTM neural network based on the passenger flow characteristic quantity of the current time period.
4. The method of claim 2, wherein the passenger traffic prediction model comprises an input layer, an output layer and an implied layer, wherein the input layer represents the traffic of each section at different time instants, the output layer represents the traffic of each section at different time instants after prediction, and the implied layer is an LSTM layer and is used for gradually modifying according to the error value of the expected output and the actual output so that the actual output follows the expected output.
5. The method of claim 4, further comprising, prior to utilizing the passenger flow prediction model for passenger flow prediction based on the statistical OD distribution matrix for the current time period: preprocessing the data of the section passenger flow volume;
numbering the cross section passenger flow according to a time sequence, and grouping according to a prediction time sequence; each station is set as a section, a matrix is arranged in each group, and the passenger flow volume is counted at set time intervals to form an input matrix.
6. The method of claim 5, further comprising:
calculating the input matrix through a hidden layer LSTM and performing activation processing through an activation function;
and after the invalid data of the input matrix of the neural network is removed, integrating the input matrix into the neural network to obtain the output of the whole network.
7. The method of claim 6, wherein the output of the overall network comprises an intermediate output at a current time and a predicted output of the overall network;
correspondingly, the method further comprises the following steps:
and according to the passenger flow data input and predicted, loss calculation is carried out on the predicted output by utilizing the passenger flow data at the next moment, gradient calculation is carried out on each weight of the network by utilizing backward propagation, and each weight parameter is optimized.
8. The method of claim 4, further comprising:
the length of the input matrix is limited by setting the maximum input dimension, where padding with 0 does not meet the maximum length and truncation exceeds the maximum length.
9. The method of claim 5, further comprising:
and filling the preprocessed data into 299 x 299 matrix, performing feature extraction by using a CNN network, and flattening and inputting the data subjected to dimensionality reduction into an LSTM layer to accelerate the calculation speed.
CN201711479681.4A 2017-12-29 2017-12-29 Urban rail transit passenger flow prediction method Active CN108197739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711479681.4A CN108197739B (en) 2017-12-29 2017-12-29 Urban rail transit passenger flow prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711479681.4A CN108197739B (en) 2017-12-29 2017-12-29 Urban rail transit passenger flow prediction method

Publications (2)

Publication Number Publication Date
CN108197739A CN108197739A (en) 2018-06-22
CN108197739B true CN108197739B (en) 2021-03-16

Family

ID=62586653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711479681.4A Active CN108197739B (en) 2017-12-29 2017-12-29 Urban rail transit passenger flow prediction method

Country Status (1)

Country Link
CN (1) CN108197739B (en)

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108960532A (en) * 2018-08-01 2018-12-07 北京交通大学 A kind of real-time passenger flow status predication in station and early warning system and method
CN109214584B (en) 2018-09-21 2022-02-08 北京百度网讯科技有限公司 Method and device for predicting passenger flow
CN110969275B (en) * 2018-09-30 2024-01-23 杭州海康威视数字技术股份有限公司 Traffic flow prediction method and device, readable storage medium and electronic equipment
CN109120463B (en) * 2018-10-15 2022-01-07 新华三大数据技术有限公司 Flow prediction method and device
CN109166317B (en) * 2018-10-29 2020-07-24 东北林业大学 Urban traffic route passing time determination method based on state characteristics
CN109886444B (en) * 2018-12-03 2023-07-11 深圳市北斗智能科技有限公司 Short-time traffic passenger flow prediction method, device, equipment and storage medium
CN109583656B (en) * 2018-12-06 2022-05-10 重庆邮电大学 Prediction method of urban rail transit passenger flow based on A-LSTM
CN110060471B (en) * 2019-04-01 2020-09-08 长安大学 A vehicle OD flow prediction model construction method and vehicle OD flow prediction method
CN110163409B (en) * 2019-04-08 2021-05-18 华中科技大学 A Convolutional Neural Network Scheduling Method Applied to Replacement Flow Shop
CN110298486B (en) * 2019-05-29 2023-06-09 成都理工大学 Rail transit passenger flow prediction method based on convolutional neural network
CN110443422B (en) * 2019-08-05 2021-11-19 北京交通大学 OD attraction degree-based urban rail transit OD passenger flow prediction method
CN110443657B (en) * 2019-08-19 2022-03-18 泰康保险集团股份有限公司 Client flow data processing method and device, electronic equipment and readable medium
CN110472800A (en) * 2019-08-23 2019-11-19 山东浪潮通软信息科技有限公司 A kind of machine tool method for predicting residual useful life based on LSTM+CNN
CN110852476A (en) * 2019-09-29 2020-02-28 华东理工大学 Passenger flow prediction method, device, computer equipment and storage medium
CN110796301B (en) * 2019-10-23 2022-11-11 广东岭南通股份有限公司 Passenger flow prediction method and device based on IC card data
CN111027202B (en) * 2019-12-04 2023-12-15 北京软通绿城科技有限公司 A digital city prediction method, device, equipment and storage medium
CN112508305A (en) * 2019-12-29 2021-03-16 山西大学 Public place entrance pedestrian flow prediction method based on LSTM
CN111582605B (en) * 2020-05-21 2023-09-12 Oppo广东移动通信有限公司 Method and device for predicting destination site, electronic equipment and storage medium
CN111626497B (en) * 2020-05-25 2023-06-30 日立楼宇技术(广州)有限公司 People flow prediction method, device, equipment and storage medium
CN112001548B (en) * 2020-08-25 2023-10-20 北京交通大学 OD passenger flow prediction method based on deep learning
CN112215408A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 Rail transit passenger flow volume prediction method and device
CN112561128B (en) * 2020-11-27 2022-06-10 武汉理工大学 A method for predicting the daily passenger volume of urban rail transit transfer to conventional bus in the future
CN112232607B (en) * 2020-12-16 2021-03-09 成都四方伟业软件股份有限公司 Subway passenger flow volume prediction method and device
CN112801377B (en) * 2021-01-29 2023-08-22 腾讯大地通途(北京)科技有限公司 Method, device, equipment and storage medium for object estimation
CN112949931B (en) * 2021-03-19 2024-03-08 北京交通大学 Method and device for predicting charging station data by mixing data driving and models
CN113537580B (en) * 2021-06-28 2024-04-09 中科领航智能科技(苏州)有限公司 Public transportation passenger flow prediction method and system based on self-adaptive graph learning
CN114170550B (en) * 2021-12-08 2025-03-28 李雪冰 A method for detecting abnormal passenger flow in public transportation
CN114463978B (en) * 2022-02-10 2024-03-29 深圳明弘电子科技有限公司 Data monitoring method based on track traffic information processing terminal
CN114842641B (en) * 2022-03-11 2024-02-09 华设设计集团股份有限公司 Multi-mode chain traffic distribution method for province domain
CN114943268A (en) * 2022-03-21 2022-08-26 昭通亮风台信息科技有限公司 A kind of public transportation passenger flow analysis method and system
CN114841415A (en) * 2022-04-12 2022-08-02 西南交通大学 Urban rail transit passenger flow prediction and multistage transportation organization method during large-scale activities
CN114912683B (en) * 2022-05-13 2024-05-10 中铁第六勘察设计院集团有限公司 System and method for predicting abnormal large passenger flow of smart city rail transit
CN116050673B (en) * 2023-03-31 2023-08-01 深圳市城市交通规划设计研究中心股份有限公司 Urban public transport passenger flow short-time prediction method based on CNN-BiLSTM
CN119417153A (en) * 2024-10-30 2025-02-11 广东华能机电集团有限公司 Urban rail transit operation dispatching method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于神经网络的高速公路出入口OD矩阵估计方法研究;王科等;《交通与计算机》;20070815;期刊第35-37页,本文第1-3页 *

Also Published As

Publication number Publication date
CN108197739A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN108197739B (en) Urban rail transit passenger flow prediction method
CN109285346B (en) Urban road network traffic state prediction method based on key road sections
CN111653088B (en) Vehicle driving quantity prediction model construction method, prediction method and system
CN109887282B (en) Road network traffic flow prediction method based on hierarchical timing diagram convolutional network
CN109272157A (en) A kind of freeway traffic flow parameter prediction method and system based on gate neural network
CN104778508B (en) A kind of public bicycles based on multisource data fusion lease Forecasting Methodology
CN112150207B (en) Online ride-hailing order demand prediction method based on spatiotemporal contextual attention network
CN112216108A (en) A traffic prediction method based on attribute-enhanced spatiotemporal graph convolution model
CN102750427B (en) Urban traffic planning simulation method and system based on multi-agent activity model
Chen et al. A multiscale-grid-based stacked bidirectional GRU neural network model for predicting traffic speeds of urban expressways
CN116307152A (en) A Spatiotemporal Interactive Dynamic Graph Attention Network for Traffic Prediction
CN116895158B (en) A traffic signal control method for urban road networks based on multi-agent Actor-Critic and GRU
Bowman et al. Modeling traffic flow using simulation and big data analytics
CN107945534A (en) A kind of special bus method for predicting based on GMDH neutral nets
CN110210664A (en) The deep learning method of multiple individual vehicle usage behavior short-term predictions
CN118968790A (en) Multi-traffic signal light control method and system based on multi-agent reinforcement learning
CN118097962A (en) Expressway cooperative management and control method and system
CN115170006B (en) Dispatching method, device, equipment and storage medium
CN113689694A (en) Traffic flow prediction method, device, equipment and readable storage medium
CN108985488A (en) The method predicted to individual trip purpose
CN116206448A (en) Method and device for predicting traffic volume based on lightweight space-time diagram convolution model
CN115565376A (en) Vehicle travel time prediction method and system fusing graph2vec and double-layer LSTM
CN112634620B (en) Road network dynamic traffic distribution method based on Encoder-Decoder deep neural network
CN109741597A (en) Bus section operation time prediction method based on improved deep forest
CN113724507A (en) Traffic control and vehicle induction cooperation method and system based on deep reinforcement learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant