Method for predicting short-time passenger flow of urban rail transit station during large-scale activity
By constructing a short-term passenger flow prediction model of convolutional neural network, attention mechanism and long-short-term memory neural network, the prediction problem of large fluctuations in passenger flow at urban rail transit stations during large-scale events is solved, and efficient and accurate passenger flow prediction is achieved, which enhances the The processing power and prediction accuracy of the model.
Patent Information
- Application Number
- CN202410644497.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-08-23
AI Technical Summary
During large-scale events, the passenger flow at urban rail transit stations fluctuates greatly. Existing short-term passenger flow prediction models are difficult to predict accurately, resulting in operational inconvenience. Moreover, a single model has problems of over-fitting and high data requirements when dealing with non-linear passenger flow.
Convolutional neural network, attention mechanism and long-short-term memory neural network are used to build a short-term passenger flow prediction model for large-scale events. By acquiring and preprocessing passenger flow data in and out of rail transit stations, time-sharing passenger flow statistics and similarity measurement are performed, combined with onehot coding and Normalization processing, constructing a historical data matrix for prediction.
It improves the prediction accuracy and model processing efficiency, broadens the prediction time span while maintaining detailed time granularity, effectively eliminates redundant data, enhances feature extraction and attention mechanisms, and improves the accuracy of passenger flow prediction.
Smart Images

Figure CN118536661A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rail transit, and in particular relates to a method for predicting short-term passenger flow at urban rail transit stations during large-scale activities. Background Art
[0002] With the rapid increase in the number of large-scale events held in China, the passenger flow of subway stations around some event venues and stations around scenic spots is prone to a surge in passenger flow, resulting in frequent large passenger flows in rail transit. Due to the limited transportation capacity of urban rail transit, the huge passenger flow at the station may cause a large number of passengers to be unable to get on the train and stranded on the platform. In serious cases, train delays may occur, causing great trouble to the safe operation and efficient transportation of urban rail transit. Accurate passenger flow forecasting can provide early warning of passenger flow peaks; however, most existing models mainly predict passenger flow on regular weekdays or weekends. The urban rail passenger flow forecast under large-scale event conditions has the characteristics of large gradient changes and large passenger flow fluctuations, making it more difficult to predict.
[0003] Traditional short-term passenger flow prediction schemes are mainly based on mathematical statistics prediction models. In recent years, machine learning and deep learning passenger flow prediction models have been widely used in urban rail systems. Urban rail transit passenger flow shows strong non-stationarity, randomness and nonlinearity. Passenger flow prediction methods based on mathematical statistics are generally based on the assumption of stationarity and are difficult to capture nonlinear relationships in passenger flow sequences. Traditional machine learning models can capture nonlinear characteristics in passenger flow sequences, but are prone to overfitting during processing; deep learning models such as Transformer models often require a large amount of data, are complex to calculate, and are difficult to determine parameters; at the same time, a single model has certain shortcomings. The combined model can make up for the shortcomings of a single algorithm and improve prediction accuracy by combining the advantages of two or three models; in addition, there are few prediction models based on passenger flow of large-scale events. The patent with application number 202210733762.7 discloses a method for predicting short-term passenger flow during holidays for urban rail transit. It has high data requirements and requires social media data in addition to historical passenger flow; the patent with application number 202210398501.4 discloses a method for predicting passenger flow and organizing multi-level transportation for urban rail transit during large-scale events, but only focuses on the passenger flow at subway stations near the venue during large-scale events, rather than the passenger flow during the event; in addition, most short-term passenger flow prediction models focus on single-step prediction, which results in a shorter prediction time and reduced applicability when the time granularity is finer; and when the time granularity is too large, detailed information will be lost.
[0004] In summary, it is necessary to develop a short-term passenger flow prediction method for urban rail transit in large-scale event scenarios to guide the safe operation and efficient transportation of urban rail transit systems. Summary of the invention
[0005] The purpose of the present invention is to provide a method for predicting short-term passenger flow at urban rail transit stations during large-scale events, so as to solve the problem of large passenger flow fluctuations and high prediction difficulty during large-scale events.
[0006] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a method for predicting short-term passenger flow at urban rail transit stations during large-scale events, the method comprising:
[0007] Obtain the passenger flow data of urban rail transit in and out of the station;
[0008] The in-and-out passenger flow data is counted based on the rail transit station number and the set time interval to obtain the time-divided passenger flow;
[0009] Perform onehot encoding on the activity time to obtain the activity code, concatenate the passenger flow data and the activity code according to time and perform normalization to obtain the historical data matrix;
[0010] Construct a short-term passenger flow prediction model for large-scale events based on convolutional neural networks, attention mechanisms, and long short-term memory neural networks;
[0011] Use the trained short-term passenger flow prediction model to predict the passenger flow during the target period.
[0012] As a further improvement of one embodiment of the present invention, the method also includes that obtaining the urban rail transit inbound and outbound passenger flow data includes obtaining the original AFC data of the urban rail transit, extracting the main field content in the original AFC data, and eliminating abnormal data that does not meet the set inbound and outbound requirements for the station, thereby obtaining the inbound and outbound passenger flow data.
[0013] As a further improvement of an embodiment of the present invention, the method also includes that the main fields include record ID, transaction type, inbound line number, inbound station number, outbound line number, outbound station number, inbound time, and outbound time.
[0014] As a further improvement of an embodiment of the present invention, the method further includes: the set entry and exit requirements include:
[0015] The entry and exit points must not be the same station, the entry and exit times must be within the track operation hours, and the time interval between entry and exit must not exceed the specified time.
[0016] As a further improvement of an embodiment of the present invention, the method further includes: the statistics of inbound and outbound passenger flow data based on the rail transit station number and the set time interval include:
[0017] According to the rail transit station number, filter out the inbound and outbound passenger flow data whose inbound or outbound station number matches the rail transit station number, divide it according to the rail transit station number, sort it according to the time when the card swiping occurs, group it according to the time interval, count the passenger flow of each group, and obtain the time-sharing passenger flow.
[0018] As a further improvement of an embodiment of the present invention, the method further includes that obtaining the passenger flow data includes:
[0019] The Pearson coefficient is used to measure the similarity of daily time-sharing passenger flows on different dates, and the daily time-sharing passenger flows that meet the set correlation coefficient requirements are selected to form passenger flow data;
[0020] The similarity coefficient calculation formula is expressed as:
[0021] Among them, r is the correlation coefficient, s is the station number, X s,j is the time-sharing passenger flow of station number s on the i-th day.
[0022] As a further improvement of an embodiment of the present invention, the method further includes that the set correlation coefficient requirement includes that the similarity coefficient of daily time-sharing passenger flow must be greater than 0.5.
[0023] As a further improvement of an embodiment of the present invention, the method further includes that performing onehot encoding on the activity time to obtain the activity code includes:
[0024] Each time interval that is within the active time period is encoded as 1, and the remaining time intervals are encoded as 0.
[0025] As a further improvement of an embodiment of the present invention, the method further includes that the step of splicing the passenger flow data and the activity code according to time and performing normalization processing to obtain a historical data matrix includes:
[0026] The passenger flow data and activity codes are spliced according to the principle of the same time, and the data is scaled to the range of (0, 1) using the normalization method, and the historical passenger flow data matrix is obtained as follows:
[0027]
[0028] Among them, p t is the historical data matrix within the set time interval, n is the number of stations, T is the time step, X n,T is the passenger flow entering the station numbered n at the Tth time step.
[0029] As a further improvement of an embodiment of the present invention, the method further includes: the short-term passenger flow prediction model includes:
[0030] The historical passenger flow data matrix is input into the convolutional neural network layer and the attention layer. The output of the convolutional neural network layer is multiplied by the output of the attention layer. The calculation result is input into the long short-term memory neural network layer. The output of the long short-term memory neural network layer is expanded into a one-dimensional vector and input into the fully connected layer. The output of the fully connected layer is the passenger flow prediction value of the urban rail transit station.
[0031] Compared with the prior art, the method for predicting short-term passenger flow at urban rail transit stations during large-scale events provided by the present invention uses a similarity measurement method to screen passenger flow data, which can effectively eliminate redundant data and improve model processing efficiency; using a multi-step prediction method, the prediction model can have a larger prediction time span on the basis of maintaining a finer prediction time granularity, thereby improving the prediction accuracy of the model while broadening the prediction time span; using a convolutional network structure to extract features, combining the attention mechanism to calculate different weights of the data hidden layer, and using a long short-term memory neural network layer to learn the time series characteristics of passenger flow and the internal change laws of the time series, by performing feature extraction, feature learning and selective attention on passenger flow data, the prediction accuracy can be more effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is an overall flow chart of the method for predicting short-term passenger flow at urban rail transit stations during large-scale events described in the present invention.
[0033] Figure 2 It is a model framework schematic diagram of a large-scale event short-term passenger flow prediction model of the short-term passenger flow prediction method for urban rail transit stations during large-scale events described in the present invention.
[0034] Figure 3 It is a schematic diagram of the convolutional network structure of the method for predicting short-term passenger flow at urban rail transit stations during large-scale events described in the present invention.
[0035] Figure 4 It is a schematic diagram of the attention mechanism structure of the method for predicting short-term passenger flow at urban rail transit stations during large-scale events described in the present invention.
[0036] Figure 5 It is a schematic diagram of the long short-term memory neural network structure of the method for predicting short-term passenger flow at urban rail transit stations during large-scale events described in the present invention.
[0037] Figure 6 This is a comparison chart of the prediction results of the baseline model. Figure 6 (a) is a comparison chart of the prediction results of the ConvLSTM model. Figure 6 (b) is a comparison chart of the prediction results of the LSTM-CNN model. Figure 6 (c) is a comparison chart of the prediction results of the LSTM-Attention model. Figure 6 (d) is a comparison chart of the prediction results of the CNN-ATT-LSTM model.
[0038] Figure 7 This is a heat map of passenger flow similarity on days of large-scale events in 2019. DETAILED DESCRIPTION
[0039] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0040] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0041] In the first embodiment of the present invention, the present invention provides a method for predicting short-term passenger flow at urban rail transit stations during large-scale activities, such as Figures 1 to 5 As shown, the method includes,
[0042] S1: Acquire original AFC data of urban rail transit, and pre-process the original AFC data to obtain in-and-out passenger flow data;
[0043] S2: Counting the in-and-out passenger flow data based on the rail transit station number and the set time interval to obtain the time-divided passenger flow;
[0044] S3: Perform similarity measurement on the daily time-sharing passenger flow, and select the time-sharing passenger flow that meets the set correlation coefficient requirements to form the passenger flow data;
[0045] S4: Onehot encode the activity time to obtain the activity code, concatenate the passenger flow data and the activity code according to time and perform normalization to obtain the historical passenger flow data matrix;
[0046] S5: Construct a short-term passenger flow prediction model for large-scale events based on convolutional neural networks, attention mechanisms, and long short-term memory neural networks;
[0047] S6: Input the historical data matrix into the trained short-term passenger flow prediction model to predict the passenger flow during the target period.
[0048] In a specific implementation of the present invention, the preprocessing of the original AFC data includes: extracting the main field content in the original AFC data, and eliminating abnormal data that does not meet the set entry and exit requirements for the site.
[0049] In a specific embodiment of the present invention, the main fields include record ID, transaction type, inbound line number, inbound station number, outbound line number, outbound station number, inbound time, and outbound time.
[0050] In a specific embodiment of the present invention, the set entry and exit requirements include: the entry and exit stations must not be the same station, the entry and exit times must be within the track operation time, and the entry and exit time interval must not exceed 4 hours.
[0051] In a specific embodiment of the present invention, the statistics of inbound and outbound passenger flow data based on the rail transit station number and the set time interval include: obtaining the rail transit station number of the adjacent study area, screening out the inbound and outbound passenger flow data whose inbound station number or outbound station number matches the rail transit station number, and dividing them according to the rail transit station number, and then sorting them according to the time when the card swiping occurred, grouping them according to the time interval, and counting the passenger flow of each group to obtain the time-sharing passenger flow.
[0052] Specifically, filter the inbound and outbound passenger flow data of Nanjing Olympic Sports Center Station, sort the passenger inbound and outbound data according to the time of card swiping, set the time interval to 10 minutes, aggregate the sorted inbound and outbound data according to the subway station number and the 10-minute time interval, and obtain the passenger flow in each time interval.
[0053] In a specific embodiment of the present invention, the similarity measurement of the daily time-sharing passenger flow includes: using the Pearson coefficient to measure the similarity of the daily time-sharing passenger flow on different dates, and the similarity coefficient calculation formula is expressed as:
[0054]
[0055] Among them, r is the correlation coefficient, s is the station number, X s,j is the time-sharing passenger flow of station number s on the i-th day.
[0056] It should be noted that daily time-sharing passenger flow refers to the statistics of time-sharing passenger flow based on days.
[0057] In a specific implementation of the present invention, the set correlation coefficient requirement includes screening out the time-sharing passenger flows with a daily time-sharing passenger flow similarity coefficient greater than 0.5 as passenger flow data.
[0058] In a specific embodiment of the present invention, the onehot encoding of the activity time to obtain the activity code includes encoding each time interval within the activity time period as 1, and encoding the remaining time intervals as 0; specifically, a large-scale event is held from 19:00 to 22:00 on a certain day, and each time interval within this period is encoded as 1, and the other time intervals are encoded as 0.
[0059] In a specific embodiment of the present invention, the normalization of the passenger flow data and the coded data includes splicing the passenger flow data and the coded data of the rail transit station during the large-scale event according to the principle of the same time, and scaling the data to the range of (0, 1) using a normalization method, and obtaining a historical data matrix as follows:
[0060]
[0061] Among them, p t is the historical data matrix within the set time interval, n is the number of stations, T is the time step, X n,T is the passenger flow entering the station at the Tth time step of the station numbered n. In this embodiment, the time step is 18.
[0062] In a specific embodiment of the present invention, Figure 2 As shown, the short-term passenger flow prediction model includes: a convolutional neural network layer, an attention layer, a long short-term memory neural network layer and a fully connected network layer; the convolutional neural network CNN in the model performs convolution and pooling operations on the historical passenger flow data matrix, and keeps the length and width of the input data unchanged after the operation, and obtains the output result as a feature matrix; the attention mechanism layer adaptively learns the weights of each feature of the historical passenger flow data matrix, and maps the output of the historical passenger flow data matrix to a range of 0 to 1. The features that are more relevant to the target value have greater weights, and a weight matrix representing the importance of the features is obtained; the feature matrix and the weight matrix are point-multiplied, and the calculation result is used as the input of the long short-term memory neural network LSTM layer, and the output vector is obtained through the LSTM layer and Dropout layer of the neuron, and the output vector is expanded into a one-dimensional vector and input into the fully connected layer, and the output of the fully connected layer is the passenger flow prediction value of the urban rail transit station.
[0063] In a specific embodiment of the present invention, Figure 3 As shown, the convolutional neural network CNN includes: the convolutional neural network is formed by stacking multiple layers of one-dimensional networks, each layer includes a convolution layer, a pooling layer, and a nonlinear layer. The convolution layer performs a convolution operation on the input, and each layer of neurons is locally connected to the previous layer. The weights of the convolution kernel are shared by all neurons. Sampling aggregation is achieved through the pooling layer, and the convolution output is downsampled to retain strong features. A hierarchical structure of more abstract features is extracted through the stacking of each layer;
[0064] The convolution calculation formula is expressed as:
[0065] in, The value of the kth convolution layer; tanh is the activation function; W k is the convolution kernel of the kth layer, b k is the corresponding bias value.
[0066] In a specific embodiment of the present invention, the following is used in the short-term passenger flow prediction model of large-scale activities: Figure 4 The attention mechanism shown in the figure is used to enhance the key information in the input data; Figure 3 As shown in the figure, after the data is convolved, X is obtained; then it passes through the Squeeze module and the Excitation module; the feature map of each channel is converted into a feature vector Z∈R through the global average pooling operation. c , c is the number of channels, and then the weight Q of each channel is learned through the fully connected layer and nonlinear activation function; finally, for each channel, the corresponding feature map is multiplied by the weight to obtain the weighted feature map X ' , the whole process is calculated as:
[0067] X′=X*sigmoid(W 2 *ReLU(W 1 *Pool(X)))
[0068] Among them, Pool represents the global average pooling operation; ReLU and sigmoid represent activation functions; W 1 and W 2 Represents the fully connected layer parameters.
[0069] It should be noted that the ATTENTION mechanism is used to enhance the key information in the input sequence and to recalibrate the feature importance through a process based on assigning different importances.
[0070] In a specific embodiment of the present invention, Figure 5 As shown in Figure 1, the long short-term memory neural network model LSTM consists of three parts: input layer, recurrent hidden layer, and output layer. The recurrent hidden layer, i.e., the repetitive module, contains the forget gate f. t , input gate i t , output gate O t and memory units; memory units run directly down the entire chain without any activation function; the input gate determines how much of the input is saved to the current state; the forget gate determines how much of the memory unit at the previous moment is saved to the unit at the current moment; the output gate determines how much of the current memory unit is output to the unit in the next layer;
[0071] Calculate the forget gate f of the long short-term memory neural networkt , input gate i t , output gate O t The formula for the sum unit memory is as follows:
[0072] i t =σ(W i ·[h t-1 ,X t ']+b i )
[0073] f t =σ(W f ·[h t-1 ,X t ']+b f )
[0074] O t =σ(W O ·[h t-1 ,X t ']+b O )
[0075]
[0076] Among them, W i , W f , W o , W c is the weighting matrix; b i 、b f 、b o 、b c is the deviation to be trained; σ is the gate activation function; tanh is the hyperbolic tangent function.
[0077] Current Unit C t and h t The recursion formula is as follows
[0078]
[0079]
[0080] in, Represents element-wise multiplication.
[0081] In a specific embodiment, the number of convolutional network layers, nonlinear layers, convolution kernel size kernelsize, batch size and learning rate are set, and the short-term passenger flow prediction model of the target station is trained using the historical data matrix. The historical data matrix of the target station is input into the short-term passenger flow prediction model, and the passenger flow data of the subsequent 6 time steps are predicted based on the passenger flow data of the first 18 time steps, which is expressed as:
[0082] [Y t+1 ,…,Yt+k ]=f(P t )
[0083] Among them, f is the mapping function of the deep learning model, P t Represents the passenger flow matrix of a station within a set time interval.
[0084] In the second embodiment of the present invention, taking Nanjing Metro Olympic Sports Center Station as an example, the number of convolutional network layers is set to 2, the nonlinear layer is RELU, the kernel size is set to 5, the batch size of the input data for training is selected to be 6, the model optimizer is Adam, and the learning rate is 0.005 for model verification. The simulation results are as follows: Figures 6-7 shown.
[0085] The subway station near Nanjing Olympic Sports Center, which is suitable for hosting large-scale events, was selected as the research object, namely Nanjing Olympic Sports Center Station on Nanjing Metro Line 10. The passenger flow data of large-scale event days from April to October 2019 was selected as training data, and November 2, 2019 was used as prediction data. The data mainly includes entry time, transaction time, transaction type, transaction equipment number, entry station number, transaction line, transaction station, and ticket type; the original data sample is shown in Table 1.
[0086] Table 1 Original passenger transaction records
[0087]
[0088]
[0089] The processed data set is passenger entry and exit records. The data is sorted by time and aggregated by Olympic Sports Center Station and 10-minute time granularity. Finally, the entry and exit passenger flow sequence at the 10-minute time granularity is obtained, and the passenger flow sequence is spliced with the activity code. Some results are shown in Table 2.
[0090] Table 2 Data preprocessing results of Olympic Sports Center Station
[0091]
[0092] The similarity measurement is performed on the passenger flow data of Nanjing Olympic Sports Center Station. According to the similarity evaluation results, the passenger flow on the day of large-scale events at the station is selected as training data. The training data examples are shown in Table 3.
[0093] Table 3. Format of training data for short-term passenger flow prediction
[0094]
[0095] The similarity heat map of passenger flow on the day of the major event in 2019 is as follows: Figure 7shown.
[0096] When training the model, 80% of the data is selected as training data, 20% of the data is selected as validation data, and the batch size is 6.
[0097] Before training, all data need to be normalized; after obtaining the prediction results, they are inversely normalized to the original scale range to facilitate evaluation of the results.
[0098] The mean absolute error (MAE) and root mean square error (RMSE) are used as performance indicators for evaluating the experiment. MAE is the average value of the absolute error, reflecting the actual situation of the error. RMSE is used to measure the deviation between the predicted value and the actual value, and is more sensitive to outliers. The specific calculation formulas for the two are as follows:
[0099]
[0100]
[0101] Where n is the number of samples; y i is the true value; is the predicted value.
[0102] The proposed model is subjected to ablation experiments and compared with the following six models to prove the effectiveness of the model. The prediction performance comparison results of different models are shown in Table 4.
[0103] The six models compared with the CNN-ATTENTION-LSTM deep learning network prediction model (large-scale event short-term passenger flow prediction model) proposed in the present invention are: ARIMA, LSTM, CNN, ConvLSTM, LSTM-CNN, LSTM-Attention;
[0104] The following is a detailed description of the six models mentioned above.
[0105] ARIMA: combines elements of autoregression and moving average to predict future trends in time series data;
[0106] LSTM: used to process and predict time series data, with strong memory and the ability to capture long-term dependencies;
[0107] CNN: extracts features through convolution operations and hierarchical structures, and is used to process and recognize data with a grid structure;
[0108] ConvLSTM: Each unit contains a memory unit, input gate, forget gate, output gate, and a convolution operation; it can model the input sequence and generate the output sequence as needed;
[0109] LSTM-CNN: It is composed of LSTM and CNN models. Its parameters and model input and output are consistent with the model mentioned in this chapter.
[0110] LSTM-Attention: It is composed of LSTM and Attention models, and its parameters, inputs, and outputs are consistent with the model mentioned in this chapter.
[0111] Table 4 Comparison of prediction performance of different models
[0112]
[0113]
[0114] First, in order to verify the effectiveness of the Attention mechanism, the LSTM-CNN model is trained. From Table 4, it can be seen that the effect of this model is not as good as that of LSTM-CNN-ATT, which means that the Attention mechanism can help the model focus on important information during the model training process, so that the model can better capture key information to help model training; To verify the role of the CNN module, the LSTM-Attention model is trained. From Table 3, it can be seen that its effect is not as good as that of the LSTM-CNN-ATT model, which means that the CNN module uses convolution kernels for feature extraction and mapping, which reduces complexity and makes the training effect better; Figure 6 The training results of some models are plotted, where the solid line represents the true value and the dotted line represents the predicted value; the results show that the LSTM-CNN-ATT model has the best prediction effect on urban rail transit passenger flow during large-scale events.
[0115] In summary, the method for predicting short-term passenger flow at urban rail transit stations during large-scale events provided by the present invention uses a similarity measurement method to screen passenger flow data, which can effectively eliminate redundant data and improve model processing efficiency; using a multi-step prediction method, the prediction model can have a larger prediction time span on the basis of maintaining a finer prediction time granularity, thereby improving the prediction accuracy of the model while broadening the prediction time span; using a convolutional network structure to extract features, combining the attention mechanism to calculate different weights of the data hidden layer, and using a long short-term memory neural network layer to learn the time series characteristics of passenger flow and the internal change laws of the time series, by performing feature extraction, feature learning and selective attention on passenger flow data, the prediction accuracy can be more effectively improved.
[0116] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the modules described above can refer to the corresponding process in the aforementioned method implementation, and will not be repeated here.
[0118] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0119] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0120] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0121] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned implementation modes, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned implementation modes, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various implementation modes of the present application.
Claims
1. A method for predicting short-term passenger flow at urban rail transit stations during large-scale events, characterized in that: include, Obtain the passenger flow data of urban rail transit in and out of the station; The in-and-out passenger flow data is counted based on the rail transit station number and the set time interval to obtain the time-divided passenger flow; Perform onehot encoding on the activity time to obtain the activity code, concatenate the passenger flow data and the activity code according to time and perform normalization to obtain the historical data matrix; Construct a short-term passenger flow prediction model for large-scale events based on convolutional neural networks, attention mechanisms, and long short-term memory neural networks; Use the trained short-term passenger flow prediction model to predict the passenger flow during the target period.
2. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1 is characterized by: The acquisition of the in-and-out passenger flow data of urban rail transit includes: Obtain the original AFC data of urban rail transit, extract the main field content in the original AFC data, eliminate the abnormal data that does not meet the set entry and exit requirements for the station, and then obtain the entry and exit passenger flow data.
3. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 2 is characterized in that: The main fields include: Record ID, transaction type, inbound line number, inbound station number, outbound line number, outbound station number, inbound time, outbound time.
4. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 2 is characterized in that: The entry and exit requirements include: The entry and exit points must not be the same station, the entry and exit times must be within the track operation hours, and the time interval between entry and exit must not exceed the specified time.
5. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1 is characterized by: The statistics of inbound and outbound passenger flow data based on the rail transit station number and the set time interval include: According to the rail transit station number, filter out the inbound and outbound passenger flow data whose inbound or outbound station number matches the rail transit station number, divide it according to the rail transit station number, sort it according to the time when the card swiping occurs, group it according to the time interval, count the passenger flow of each group, and obtain the time-sharing passenger flow.
6. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1 is characterized by: Acquiring the passenger flow data includes: The Pearson coefficient is used to measure the similarity of daily time-sharing passenger flows on different dates, and the daily time-sharing passenger flows that meet the set correlation coefficient requirements are selected to form passenger flow data; The similarity coefficient calculation formula is expressed as: Among them, r is the correlation coefficient, s is the station number, X s,j is the time-sharing passenger flow of station number s on the i-th day.
7. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 6 is characterized by: The set correlation coefficient requirement includes that the similarity coefficient of daily time-sharing passenger flow must be greater than 0.
5.
8. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1 is characterized by: The onehot encoding of the activity time to obtain the activity code comprises: Each time interval that is within the active time period is encoded as 1, and the remaining time intervals are encoded as 0.
9. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1 is characterized by: The process of splicing passenger flow data and activity codes according to time and performing normalization processing to obtain a historical data matrix includes: The passenger flow data and activity codes are spliced according to the principle of the same time, and the data is scaled to the range of (0, 1) using the normalization method, and the historical passenger flow data matrix is obtained as follows: Among them, p t is the historical data matrix within the set time interval, n is the station number, T is the time step, X n,T is the passenger flow entering the station numbered n at the Tth time step.
10. The method for predicting short-term passenger flow at urban rail transit stations during large-scale events according to claim 1, characterized in that: The short-term passenger flow prediction model includes: The historical passenger flow data matrix is input into the convolutional neural network layer and the attention layer. The output of the convolutional neural network layer is multiplied by the output of the attention layer. The calculation result is input into the long short-term memory neural network layer. The output of the long short-term memory neural network layer is expanded into a one-dimensional vector and input into the fully connected layer. The output of the fully connected layer is the passenger flow prediction value of the urban rail transit station.
Citation Information
Cited By
Regional traffic flow prediction method and system
CN119516775A
Urban rail transit station-oriented supersaturated passenger flow pre-control method
CN120096650A
