A short-term subway station passenger flow prediction method

By combining EMD and EWT with LSTM neural networks, the problem of neglecting the spatial correlation between subway stations in subway passenger flow prediction is solved, thus improving the accuracy and stability of the prediction.

CN116453338BActive Publication Date: 2026-02-24NORTH CHINA UNIV OF WATER RESOURCES & ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310380093.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2026-02-24
Estimated Expiration
2043-04-11

AI Technical Summary

Technical Problem

In existing technologies, subway passenger flow prediction models consider the temporal sequence and periodicity of subway passenger flow, but ignore the spatial correlation between subway stations, resulting in low prediction accuracy.

Method used

The method of combining EMD and EWT with LSTM neural network is adopted. The subway passenger flow data is decomposed and processed, and the data is trained. The trained LSTM neural network is then used for prediction.

Benefits of technology

It improves the accuracy and precision of subway passenger flow forecasting, better reflects the spatial dependence between subway stations, reduces the impact of mode mixing, and enhances the stability of forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116453338B_ABST
    Figure CN116453338B_ABST
Patent Text Reader

Abstract

The application discloses a kind of short-term subway entrance passenger flow prediction method, comprising the following steps: A: collecting the entrance passenger flow data of several different sites in specified time range, obtain initial entrance data set;B: obtain the first residual sequence of each initial data in initial entrance data set;C: obtain the third decomposition sub-sequence of the first residual sequence of each initial data in initial entrance data set;D: all the first decomposition sub-sequence of initial data in initial data set obtained except the first sub-sequence, and the third decomposition sub-sequence of initial data, as the data set of LSTM neural network, training is obtained after training LSTM neural network;E: the entrance passenger flow data of the site to be predicted in Q days before the date to be predicted is used as initial data, and the trained LSTM neural network is used for passenger flow prediction.The application can more accurately predict short-term subway entrance passenger flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of passenger flow prediction in intelligent transportation technology, and more particularly to a method for predicting short-term subway station entry passenger flow. Background Technology

[0002] Traffic flow prediction is a crucial component of intelligent transportation. As a vital part of public transportation, subways are increasingly attracting researchers focused on accurately predicting passenger flow. Precise prediction of subway arrival passenger flow not only reveals future traffic demand, helping subway operators make more informed decisions, but also effectively prevents safety accidents caused by overcrowding. Furthermore, predicting subway arrival passenger flow aids in the planning and construction of new subway stations, thereby effectively alleviating congestion at some large stations.

[0003] In the early stages of traffic flow prediction, many researchers frequently used statistical models such as historical averages, k-nearest neighbor models, Kalman filters, ARIMA, and its variants. With the rise of machine learning, many scholars have attempted to use machine learning models to predict traffic flow, achieving better predictive results than traditional statistical models. Examples include Support Vector Machines (SVM), Recurrent Neural Networks (RNNs), and improved RNN-based models such as LSTM and GRU.

[0004] However, the prediction accuracy of a single machine learning model is limited. The aforementioned RNN-based model only considers the temporal sequence and periodicity of subway passenger flow, ignoring the overall correlation between multiple stations, resulting in low prediction accuracy. In recent years, the mainstream prediction method has combined two or more deep learning models for analysis and prediction. For example, combining a Graph Convolutional Network (GCN) to obtain the spatial correlation of subway passenger flow, and combining an LSTM to obtain the changing trend of subway entry passenger flow. Chinese invention patent application number 202211246533.9 discloses a short-term subway passenger flow prediction method based on a spatiotemporal graph convolutional network. It uses gated recurrent units to learn historical subway data to obtain the temporal dependency relationship of the subway network, obtaining a hidden state Ht that implicitly contains the historical passenger flow change characteristics; and uses a graph convolutional neural network to obtain the dynamic spatial dependency relationship of the subway network to predict passenger flow at future times. This invention, when predicting urban subway passenger flow in a spatiotemporal manner, considers not only the temporal dependencies of the subway network but also the dynamic changes in spatial dependencies. Passenger flow at all subway stations in the urban subway network at time t+1 can be obtained using a first-order approximate Cheb graph convolution. However, the accuracy of this method's prediction results still needs improvement. Summary of the Invention

[0005] The purpose of this invention is to provide a method for predicting short-term subway passenger flow, which can predict short-term subway passenger flow more accurately.

[0006] The present invention adopts the following technical solution:

[0007] A method for predicting short-term subway passenger flow includes the following steps:

[0008] A: Collect passenger flow data from several different stations within a specified time range to obtain an initial passenger flow dataset;

[0009] B: First, for each initial data point x(t) in the initial inbound dataset, EMD is performed after randomly adding several different Gaussian white noises of equal amplitude to obtain several IMF components corresponding to each initial data point; then, the mean of all IMF components at the corresponding positions of the initial data x(t) is used as the first decomposition subsequence c. i (t), and calculate the initial residual sequence r1(t) for each initial data x(t). Finally, sum the initial residual sequence r1(t) of each initial data x(t) with the corresponding first first-order decomposition subsequence c1(t) to obtain the first-order residual sequence r2(t).

[0010]

[0011] Where n is the first-order decomposition subsequence c i The number of (t) values, i = 1, 2, ..., n;

[0012] C: Take the primary residual sequence r2(t) obtained in step B and use EWT to obtain the quadratic decomposition subsequence e of the primary residual sequence r2(t). m The quadratic residual sequence r3(t) is then divided into M equal parts, and each part is added to the corresponding quadratic subsequence e. m In (t), we obtain the cubic subsequence q of each first-order residual sequence r2(t). i (t);

[0013]

[0014]

[0015] Where M represents e m The number of (t);

[0016] D: Take all the first-order decomposition subsequences c1(t) of the initial data x(t) obtained in step B, excluding the first subsequence c1(t). i (t), and the cubic decomposition subsequence q of the first residual sequence r2(t) of the initial data x(t) obtained in step C. i(t) is used as the dataset for the LSTM neural network and is divided into a training set and a test set. The constructed LSTM neural network is trained using the training set, and the sum of the obtained prediction results is used as the final prediction result. The prediction results are then tested using the test set. Finally, the trained LSTM neural network is obtained.

[0017] E: Take the passenger flow data of the station to be predicted Q days before the date to be predicted as the initial data, process it using the methods in steps A to D, and then use the trained LSTM neural network to predict the passenger flow.

[0018] Step A includes the following specific steps:

[0019] A1: Collect passenger flow data for each station within a specified time range. The passenger flow data includes the entry time, station ID, and passenger ID information.

[0020] A2: Merge and summarize the passenger flow data of each station at set time intervals to obtain the merged passenger flow data of each station.

[0021] A3: Use the merged and aggregated passenger flow data for each station to construct an initial passenger flow dataset.

[0022] Step B includes the following specific steps:

[0023] B1: First, combine the initial data x(t) in the initial entry dataset with the first Gaussian white noise ε1(t) to obtain a new time series y1(t), y1(t) = x(t) + ε1(t); where t represents the t-th subway passenger entry data after merging and summarizing each CSV file according to the time interval T;

[0024] B2: Decompose the time series y1(t) using EMD to obtain several corresponding IMF components. 11 IMF 12 ..., IMF 1i ;

[0025] B3: Following the methods in steps B1 and B2, each initial data point x(t) in the initial incoming dataset is compared with different Gaussian white noise ε2(t), ε3(t), ..., ε j Combining (t), we obtain the corresponding new time series y2(t), y3(t), ..., y3(t), ..., y4(t) j (t), y j (t)=x(t)+ε j (t); then, using EMD, the time series y2(t), y3(t), ..., y3(t) are analyzed respectively.j (t) is decomposed to obtain each time series y j (t) corresponds to several IMF components. j1 IMF j2 ..., IMF ji ; Among them, ε1(t), ε2(t),..., ε j (t) have the same amplitude;

[0026] B4: For each obtained time series y j (t) The mean of all IMF components at the corresponding position is calculated to obtain the first-order decomposition subsequence c of each initial data x(t). i (t);

[0027]

[0028] B5: After steps B1 to B4, each initial data x(t) is decomposed into a subsequence c. i The initial residual sequence r1(t) is composed of x(t) and the initial residual sequence r1(t), and the initial residual sequence r1(t) for each initial data x(t) is calculated.

[0029]

[0030]

[0031] Where n is the first-order decomposition subsequence c i The number of (t);

[0032] B6: Summing the initial residual sequence r1(t) of each initial data x(t) with the first linear subsequence c1(t) corresponding to the initial data x(t) yields the linear residual sequence r2(t);

[0033] r2(t) = r1(t) + c1(t).

[0034] Step C includes the following specific steps:

[0035] C1: Transform the first residual sequence r2(t) into a sequence R(w) using FFT, and then divide the spectrum of the sequence R(w) into N continuous segments; where FFT refers to Fast Fourier Transform; the sequence R(w) is the representation of the first residual sequence r2(t) after Fast Fourier Transform.

[0036] C2: Define the empirical scaling function φ in the bandpass filter of EWT. s (ω) and empirical wavelet function ψ s (ω);

[0037]

[0038]

[0039] Where ω represents frequency, s∈[1,N], τ s =γω s ;

[0040] z is a random number;

[0041] C3: Calculate the first-order residual sequence r2(t) and the empirical scaling function φ s The inner product of (ω), and the first-order residual sequence r2(t) and the empirical wavelet function ψ s The inner product of (ω) yields the approximation coefficients W. f (0, t) and detail factor W f (s, t);

[0042]

[0043]

[0044] C4: Calculate the quadratic decomposition subsequence e m (t);

[0045]

[0046]

[0047] in, This represents the convolution operation, m = 1, 2, 3, ..., M, e1(t) represents the first quadratic subsequence, e m (t) represents the m-th quadratic subsequence;

[0048] C5: Perform a quadratic decomposition on the primary residual sequence r2(t) to obtain the primary residual sequence r2(t) based on the quadratic decomposition subsequence e. m Expressions for r(t) and the quadratic residual sequence r3(t);

[0049]

[0050] Where M represents e m The number of (t);

[0051] C6: Divide the quadratic residual sequence r3(t) into M equal parts, and add them to each corresponding quadratic subsequence e. m In (t), we obtain the cubic subsequence q of each first-order residual sequence r2(t). i (t);

[0052]

[0053]

[0054] In step D, after two decompositions, EMD and EWT, the initial data x(t) is composed of a first-order decomposition subsequence c. i (t) and cubic decomposition subsequence q m (t) constitutes,

[0055]

[0056] In step D, both the training set and the test set are normalized; the predicted data output by the LSTM neural network is denormalized before being output.

[0057] In step D, the constructed LSTM neural network has five layers: the first layer is the first LSTM layer with 200 neurons; the second layer is the Dropout layer with a parameter of 0.4; the third layer is the second LSTM layer with 240 neurons; the fourth layer is the Dropout layer with a parameter of 0.4; and the last layer is the Dense layer with a parameter of 1.

[0058] In step E, the value of Q is 22.

[0059] In step A2, during the merging and summarizing process, the passenger entry data for each station is merged and summarized at a set time interval T. If no passengers enter the station within T minutes, the passenger entry data for that time period is filled with a message indicating that the number of passengers entering the station is 0.

[0060] In step A1, the passenger flow data for the corresponding statutory holidays is deleted.

[0061] This invention addresses the periodicity and abrupt changes in subway passenger entry data. By adding different white noises of equal amplitude each time, the extreme point characteristics of the signal are altered. Then, the corresponding IMFs obtained from multiple EMDs are averaged to cancel out the added white noise, thereby effectively suppressing mode aliasing. After EMD, the initial data with added Gaussian white noise has a small error compared to the initial data x(t) obtained by summing all the overall averaged modal components. This ensures the accuracy of subsequent data prediction.

[0062] In this invention, the initial residual sequence r1(t) is summed with the first first-order decomposition subsequence c1(t) to form the first-order residual sequence r2(t), which is then fed into the subsequent EWT module. Although the first-order residual sequence r2(t) has two characteristics that are unfavorable to neural network learning, namely high frequency and low amplitude, the adaptive frequency band selection characteristic of the subsequent EWT model can be used to effectively separate harmonics of different frequencies in complex signals, thereby reducing the complexity of the first-order residual sequence r2(t). This fully utilizes the high frequency and low amplitude characteristics of the first-order residual sequence r2(t) to improve the overall prediction performance of the model.

[0063] Considering the strong abrupt changes in the quadratic residual sequence r3(t), which are detrimental to neural network learning and cannot be eliminated, thus affecting the accuracy of subsequent predictions, this invention divides r3(t) into M equal parts, which are then added to each quadratic subsequence e. m In (t), the quadratic residual sequence r3(t) is not simply discarded, which ensures the integrity of the data. At the same time, by dividing the quadratic residual sequence r3(t) equally, the difficulty of subsequent neural network prediction is reduced, and the overall prediction accuracy of the model is further improved. Attached Figure Description

[0064] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0065] The present invention will now be described in detail with reference to the accompanying drawings and embodiments:

[0066] like Figure 1 As shown, the short-term subway passenger flow prediction method of the present invention includes the following steps:

[0067] A: Collect passenger flow data from several different stations within a specified time range to obtain an initial passenger flow dataset;

[0068] In this invention, the passenger flow data at the station can be collected using existing card-swiping devices at the station, such as turnstile card swipe data, which will not be elaborated here. The passenger flow data in the initial passenger flow dataset is usually in CSV format, and the passenger flow data for a specific station can be filtered using the pandas tool based on the Python language;

[0069] In this invention, step A includes the following specific steps:

[0070] A1: Collect passenger flow data for each station within a specified time range. The passenger flow data includes the entry time, station ID, and passenger ID information.

[0071] The passenger flow data for each station is in CSV format. Each data point in the passenger flow data represents a passenger entering the designated station to wait for their train at the corresponding time.

[0072] In this invention, considering that the passenger flow data during statutory holidays (such as New Year's Day) is quite special and differs from that of regular weekdays and weekends, the passenger flow data for the corresponding statutory holidays can be deleted.

[0073] A2: Merge and summarize the passenger flow data of each station at set time intervals to obtain the merged passenger flow data of each station.

[0074] When merging and summarizing, the passenger flow data of each station is merged and summarized according to the set time interval T. If no passengers enter the station within T minutes, the passenger entry data corresponding to that time period is filled into a message with 0 passengers entering the station.

[0075] A3: Using the merged and aggregated passenger flow data for each station, construct the initial passenger flow dataset;

[0076] The following explanation of step A is provided in conjunction with specific embodiments:

[0077] Suppose that the original data of entering and exiting Hangzhou Metro from January 1st to 25th, 2019 (a total of 25 days) has been obtained through the corresponding data collection equipment. The original data consists of 25 CSV files, each representing a summary of the entry and exit data of the 81 different stations each day. The specified stations are Qianjiang Road Station, Jinjiang Station, and Passenger Transport Center Station, which are three transfer stations. The initial entry dataset is constructed according to the following method.

[0078] A1: Using the pandas tool based on the Python language, the daily passenger flow data of the three transfer stations, Qianjiang Road Station, Jinjiang Station, and Passenger Transport Center Station, was filtered from the original dataset. Since January 1, 2019 was New Year's Day, the data for January 1, 2019 was removed. Then, the passenger flow data of the three transfer stations, Qianjiang Road Station, Jinjiang Station, and Passenger Transport Center Station, was summarized for 24 days, and finally the passenger flow data of the three transfer stations were obtained. The data was saved as 3 CSV files, and each CSV file corresponds to the passenger flow data of one station for 24 days.

[0079] A2: Set the time interval T to 5 minutes, and merge and summarize the passenger flow data of each station. That is, in the passenger flow data of each station, merge and summarize the passenger entry data within every 5 minutes; if no passengers enter the station within 5 minutes, fill the passenger entry data corresponding to that time period with a message of 0 passengers entering the station.

[0080] In this embodiment, each data entry in the merged and summarized CSV file consists of three parts: entry time, station ID, and a summary of the number of people entering the station. Since data with zero entries within the last five minutes was added and data from January 1, 2019 was removed, each CSV file contains a total of 24 * 24 * 12 = 6912 data entries.

[0081] A3: Using the merged and aggregated passenger flow data for each station, construct the initial passenger flow dataset;

[0082] In this embodiment, each data point in the initial inbound data set is one-dimensional, representing the inbound passenger flow data for each station, totaling 6912 data points.

[0083] B: First, for each initial data point x(t) in the initial inbound dataset, EMD is performed after randomly adding several different Gaussian white noises of equal amplitude to obtain several IMF components corresponding to each initial data point; then, the mean of all IMF components at the corresponding positions of the initial data x(t) is used as the first decomposition subsequence c. i (t), and calculate the initial residual sequence r1(t) for each initial data x(t). Finally, sum the initial residual sequence r1(t) of each initial data x(t) with the corresponding first first-order decomposition subsequence c1(t) to obtain the first-order residual sequence r2(t).

[0084]

[0085] r2(t) = r1(t) + c1(t);

[0086] Where n is the first-order decomposition subsequence c i The number of (t) values, i = 1, 2, ..., n;

[0087] Step B includes the following specific steps:

[0088] B1: First, combine the initial data x(t) in the initial inbound dataset with the first Gaussian white noise ε1(t) to obtain a new time series y1(t), y1(t) = x(t) + ε1(t);

[0089] Where t represents the t-th subway passenger entry data after merging and summarizing each CSV file according to the time interval T (0 < t <= 6912);

[0090] In this invention, due to the periodicity and abrupt changes in subway passenger entry data, direct EMD (Electronic Mode Decomposition) can easily lead to similar center frequencies between different modes, resulting in mode aliasing. Furthermore, experimental analysis revealed a significant error between the "decomposition-reconstruction" data obtained by summing all modal components after EMD and the initial data x(t), indicating that EMD is prone to data loss and can fatally impact subsequent data prediction. Therefore, this invention adds different types of white noise of equal amplitude to the initial data. Gaussian white noise has a uniform distribution, and after multiple averaging calculations, the added noise can be eliminated. Simultaneously, the white noise alters the pole distribution of the original signal, reducing the mode aliasing effect during EMD. Moreover, after adding Gaussian white noise and performing EMD, the error between the "decomposition-reconstruction" data obtained by summing all modal components and the initial data x(t) is small, ensuring the accuracy of subsequent data prediction.

[0091] B2: The time series y1(t) is decomposed using EMD (Empirical Mode Decomposition) to obtain several corresponding IMF components. 11 IMF 12 ..., IMF 1i ;

[0092] B3: Following the methods in steps B1 and B2, each initial data point x(t) in the initial incoming dataset is compared with different Gaussian white noise ε2(t), ε3(t), ..., ε j Combining (t), we obtain the corresponding new time series y2(t), y3(t), ..., y3(t), ..., y4(t) j (t), y j (t)=x(t)+ε j (t); then, using EMD, the time series y2(t), y3(t), ..., y3(t) are analyzed respectively. j (t) is decomposed to obtain each time series y j (t) corresponds to several IMF components. j1 IMF j2 ..., IMF ji ; Among them, ε1(t), ε2(t),..., ε j (t) have the same amplitude;

[0093] B4: For each obtained time series y j(t) The mean of all IMF components at the corresponding position is calculated to obtain the first-order decomposition subsequence c of each initial data x(t). i (t);

[0094]

[0095] The first linear subsequence of the initial data x(t)

[0096] B5: After steps B1 to B4, each initial data x(t) is decomposed into a subsequence c. i The initial residual sequence r1(t) is composed of x(t) and the initial residual sequence r1(t), and the initial residual sequence r1(t) for each initial data x(t) is calculated.

[0097]

[0098]

[0099] Where n is the first-order decomposition subsequence c i The number of (t);

[0100] B6: Summing the initial residual sequence r1(t) of each initial data x(t) with the first linear subsequence c1(t) corresponding to the initial data x(t) yields the linear residual sequence r2(t);

[0101] r2(t) = r1(t) + c1(t);

[0102] Because the first linear decomposition subsequence c1(t) and the initial residual sequence r1(t) of the initial data x(t) are highly abrupt, which is detrimental to neural network learning and cannot be eliminated, thus affecting the accuracy of subsequent predictions, this invention uses the sum of r1(t) and c1(t) as the linear residual sequence r2(t) to feed into the subsequent EWT module. Although the linear residual sequence r2(t) has two characteristics that are detrimental to neural network learning—high frequency and low amplitude—the EWT model used in the subsequent part of this invention can fully utilize these two characteristics by adaptively selecting the frequency band, turning them into advantages and improving the overall prediction performance of the model.

[0103] C: Take the primary residual sequence r2(t) obtained in step B and use EWT (Empirical Wavelet Transform) to obtain the quadratic subsequence e of the primary residual sequence r2(t). m The quadratic residual sequence r3(t) is then divided into M equal parts, and each part is added to the corresponding quadratic subsequence e. mIn (t), we obtain the cubic subsequence q of each first-order residual sequence r2(t). i (t);

[0104]

[0105]

[0106]

[0107] Where M represents e m The number of (t);

[0108] EWT can effectively separate harmonics of different frequencies in complex signals based on the characteristics of the Fourier spectrum. Its "filtering" function can greatly reduce the complexity of the first-order residual sequence r2(t), decomposing it into a quadratic subsequence that is beneficial to the learning of the neural network model. The combination of steps C and B not only makes full use of the initial residual sequence r1(t), but also further decomposes the first-order subsequence c1(t) and the initial residual sequence r1(t), which are not conducive to the learning of the neural network, reducing their complexity and improving the overall predictive performance of the model.

[0109] In this invention, step C includes the following specific steps:

[0110] C1: Transform the residual sequence r2(t) into a sequence R(w) using FFT, and then divide the spectrum of the sequence R(w) into N continuous segments;

[0111] Here, FFT refers to Fast Fourier Transform; the sequence R(w) is the representation of the first residual sequence r2(t) after Fast Fourier Transform;

[0112] C2: Define the empirical scaling function φ in the bandpass filter of EWT. s (ω) and empirical wavelet function ψ s (ω);

[0113]

[0114]

[0115] In step C1, the spectrum of R(w) is divided into N continuous segments. Therefore, during the processing, the support interval of the Fourier spectrum of R(w) is ω. s Divide into N consecutive segments, ω s The boundaries between segments are represented, so there are a total of N+1 boundaries. ω is a variable representing the frequency, where ω0 = 0, ω N =π, s∈[1,N], τ s =γωs ;

[0116]

[0117] z is a random number with no practical meaning; it is used to define β as a parameter in the range of 0 to 1.

[0118] C3: Calculate the first-order residual sequence r2(t) and the empirical scaling function φ s The inner product of (ω), and the first-order residual sequence r2(t) and the empirical wavelet function ψ s The inner product of (ω) yields the approximation coefficients W. f (0, t) and detail factor W f (s, t);

[0119]

[0120]

[0121] C4: Calculate the quadratic decomposition subsequence e m (t);

[0122]

[0123]

[0124] in, The convolution operation is represented by m = 1, 2, 3, ..., M, where e1(t) represents the first quadratic subsequence, e m (t) represents the m-th quadratic subsequence.

[0125] C5: Perform a quadratic decomposition on the primary residual sequence r2(t) to obtain the primary residual sequence r2(t) based on the quadratic decomposition subsequence e. m Expressions for r(t) and the quadratic residual sequence r3(t);

[0126]

[0127] Among them, e m (t) represents the quadratic decomposition subsequence, and the primary residual sequence r2(t) is the sum of all quadratic decomposition subsequences e. m The sum of e(t) and the quadratic residual sequence r3(t), where M represents e m The number of (t) represents the number of residuals. r3(t) represents the second residual sequence after the first residual sequence r2(t) is processed by EWT. Similar to r1(t), it is also non-eliminable.

[0128] C6: Divide the quadratic residual sequence r3(t) into M equal parts, and add them to each corresponding quadratic subsequence e. m In (t), we obtain the cubic subsequence q of each first-order residual sequence r2(t). i (t);

[0129]

[0130]

[0131] Similarly, since the quadratic residual sequence r3(t) has strong abrupt changes, which is not conducive to the learning of neural networks and cannot be eliminated, it will affect the accuracy of subsequent predictions. Therefore, in this invention, r3(t) is evenly divided into M equal parts, which are then added to each quadratic subsequence e. m In (t), the present invention distributes its complexity equally among each quadratic decomposition subsequence e by dividing the quadratic residual sequence r3(t) into equal parts. m In (t), there are two outstanding advantages. First, the quadratic residual sequence r3(t) is not simply discarded, which ensures the integrity of the data. Second, by dividing the quadratic residual sequence r3(t) equally, the difficulty of subsequent neural network prediction is reduced, and the overall prediction accuracy of the model can be further improved.

[0132] D: Take all the first-order decomposition subsequences c1(t) of the initial data x(t) obtained in step B, excluding the first subsequence c1(t). i (t), and the cubic decomposition subsequence q of the first residual sequence r2(t) of the initial data x(t) obtained in step C. i (t) is used as the dataset for the LSTM neural network and is divided into a training set and a test set. The constructed LSTM neural network is trained using the training set, and the sum of the obtained prediction results is used as the final prediction result. The prediction results are then tested using the test set. Finally, the trained LSTM neural network is obtained.

[0133] In this invention, after two decompositions, EMD and EWT, the initial data x(t) is derived from the first decomposition subsequence c. i (t) and cubic decomposition subsequence q m (t) is composed as follows:

[0134]

[0135] Since the first subsequence c1(t) in the first decomposition is part of the first residual sequence r2(t) and undergoes EWT, counting from 2, the number of subsequences after EWT of the first residual sequence r2(t) is M. Therefore, a total of n-1+M subsequences need to be fed into the LSTM neural network. Each subsequence has its own LSTM neural network, so we need to build n+M-1 neural networks corresponding to the subsequences. It is worth noting that the length of each subsequence does not change after two decompositions, so it is the same as the initial data, which is 6912.

[0136] In this embodiment, in order to improve the prediction accuracy of the LSTM neural network, both the training set and the test set are normalized; correspondingly, the prediction data output by the LSTM neural network is denormalized before being output.

[0137] In this embodiment, the constructed LSTM neural network has five layers. The first layer is the first LSTM layer with 200 neurons; the second layer is the Dropout layer with a parameter set to 0.4; the third layer is the second LSTM layer with 240 neurons; the fourth layer is the Dropout layer with a parameter set to 0.4; and the last layer is the Dense layer, which is set to 1 since only one-dimensional data needs to be output.

[0138] In this embodiment, a for loop is used to take the 1st to 60th data of each subsequence as the first group of inputs and the 61st data as the label of the first group of data; take the 2nd to 61st data as the second group of inputs and the 62nd data as the label of the second group of data; and so on, until the 6852nd to 6911th data are taken as inputs and the 6912th data is taken as the label of the last group of data, at which point the loop ends.

[0139] In this embodiment, the prediction results of the last two days after each subsequence is processed by the LSTM neural network are converted into CSV files. Since each CSV file has the same length, it is only necessary to sum the elements at the same position in all CSV files to obtain the final prediction result of the model.

[0140] E: Take the passenger flow data of the station to be predicted Q days before the date to be predicted as the initial data, process it using the methods in steps A to D, and then use the trained LSTM neural network to predict the passenger flow.

[0141] In this embodiment, the value of Q can be 22.

Claims

1. A method for predicting short-term subway passenger flow, characterized in that, Includes the following steps: A: Collect passenger flow data from several different stations within a specified time range to obtain an initial passenger flow dataset; B: First, take each initial data point from the initial incoming dataset. EMD was performed on each initial data point after randomly adding several Gaussian white noises of equal amplitude but different values ​​to obtain several IMF components corresponding to each initial data point; then the initial data... The mean of all IMF components at the corresponding position is used as the first decomposition subsequence. And calculate each initial data initial residual sequence Finally, each initial data initial residual sequence With the corresponding first-order subsequence Summing yields a first-order residual sequence. ; ; in, For a first-order decomposition of subsequences The number of ; C: The residual sequence obtained in step B. The residual sequence is obtained through EWT. Quadratic subsequence and quadratic residual sequence Then the quadratic residual sequence Divide evenly Divide into equal parts and add them to each corresponding quadratic subsequence. In this process, we obtain each first-order residual sequence. The cubic decomposition subsequence of ; ; ; Where M represents The number of; D: Take the sequence obtained in step B, excluding the first subsequence. Initial data in the initial dataset other than All first-order decomposition subsequences and the initial data obtained in step C. A first-order residual sequence The cubic decomposition subsequence of The dataset is used as the LSTM neural network and divided into a training set and a test set. The constructed LSTM neural network is trained using the training set, and the sum of the prediction results is used as the final prediction result. The prediction result is then tested using the test set. Finally, the trained LSTM neural network is obtained. E: Take the passenger flow data of the station to be predicted Q days before the date to be predicted as the initial data, process it using the methods in steps A to D, and then use the trained LSTM neural network to predict the passenger flow.

2. The short-term subway passenger flow prediction method according to claim 1, characterized in that, Step A includes the following specific steps: A1: Collect passenger flow data for each station within a specified time range. The passenger flow data includes the entry time, station ID, and passenger ID information. A2: Merge and summarize the passenger flow data of each station at set time intervals to obtain the merged passenger flow data of each station. A3: Use the merged and aggregated passenger flow data for each station to construct an initial passenger flow dataset.

3. The short-term subway passenger flow prediction method according to claim 1, characterized in that, Step B includes the following specific steps: B1: First, the initial data in the initial inbound dataset... With the first Gaussian white noise By combining these, a new time series is obtained. , ;in, This represents the first digit of the merged and summarized data from each CSV file according to time interval T. Subway passenger entry data; B2: Time series analysis via EMD The decomposition yields several corresponding IMF components. ; B3: Following the methods in steps B1 and B2, process each initial data point in the initial incoming dataset. Different Gaussian white noise By combining these, we obtain the corresponding new time series. , Then, the time series were analyzed using EMD. Decompose to obtain each time series The corresponding several IMF components , , ;in, Same amplitude; B4: For each time series obtained All at the corresponding positions Perform mean calculation to obtain each initial data point. a decomposed subsequence of ; ; B5: After steps B1 to B4, each initial data All are decomposed from a single subsequence. and initial residual sequence Composition, calculation to obtain each initial data initial residual sequence ; ; ; in, For a first-order decomposition of subsequences The number of; B6: Transfer each initial data initial residual sequence Compared with initial data The corresponding first-order subsequence Summing yields a first-order residual sequence. ; 。 4. The short-term subway passenger flow prediction method according to claim 1, characterized in that, Step C includes the following specific steps: C1: Using FFT to transform the first-order residual sequence Transform into a sequence Then the sequence The spectrum is divided into A continuous segment; where FFT refers to Fast Fourier Transform; sequence For a first-order residual sequence The representation after Fast Fourier Transform; C2: Defines the empirical scaling function in the bandpass filter of EWT. and empirical wavelet function ; ; ; in, Indicates frequency, , ; ; ; It is a random number; C3: Calculate the residual sequence. With empirical scaling function The inner product, and the first-order residual sequence With empirical wavelet function The inner product of these factors yields the approximation coefficients. and detail coefficient ; ; ; C4: Calculate the quadratic decomposition subsequence ; ; ; in, This represents the convolution operation. , This represents the first quadratic decomposition subsequence. Indicates the first A quadratic subsequence; C5: For a single residual sequence Perform a second decomposition to obtain a first-order residual sequence. Based on quadratic decomposition subsequences and quadratic residual sequence The expression; ; Where M represents The number of; C6: Transform the quadratic residual sequence Divide evenly Divide into equal parts and add them to each corresponding quadratic subsequence. In this process, we obtain each first-order residual sequence. The cubic decomposition subsequence of ; ; 。 5. The short-term subway passenger flow prediction method according to claim 1, characterized in that: In step D, after two decompositions, EMD and EWT, the initial data... Decomposed into subsequences and cubic decomposition subsequences composition, 。 6. The short-term subway passenger flow prediction method according to claim 1, characterized in that: In step D, both the training set and the test set are normalized; the predicted data output by the LSTM neural network is denormalized before being output.

7. The method for predicting short-term subway passenger flow according to claim 1, characterized in that: In step D, the constructed LSTM neural network has five layers, with the first layer being the first LSTM layer, which has 200 neurons. The second layer is a Dropout layer with a parameter set to 0.4; the third layer is the second LSTM layer with 240 neurons; the fourth layer is a Dropout layer with a parameter set to 0.4; and the last layer is a Dense layer with a parameter set to 1.

8. The method for predicting short-term subway passenger flow according to claim 1, characterized in that: In step E, the value of Q is 22.

9. The method for predicting short-term subway passenger flow according to claim 2, characterized in that: In step A2, during the merging and summarizing process, the passenger entry data for each station is merged and summarized at a set time interval T, within each T minute. If no passengers enter the station within T minutes, the passenger entry data for that time period will be filled with a message indicating that the number of passengers entering the station is 0.

10. The method for predicting short-term subway passenger flow according to claim 2, characterized in that: In step A1, the passenger flow data for the corresponding statutory holidays is deleted.

Citation Information

Patent Citations

  • Subway short-time passenger flow prediction method based on space-time diagram convolutional network

    CN115618934A

  • Logistics demand prediction method, apparatus and device, and readable storage medium

    CN115759468A