Rail transit passenger flow volume prediction method and device based on multi-feature fusion mechanism

By adopting a multi-feature fusion mechanism in the prediction of rail transit passenger flow, using discrete wavelet transform, Fourier transform and variational modal decomposition to extract features, combined with self-attention mechanism, the existing methods are solved in capturing multiple features and processing long-term The difficulty in sequence improves prediction accuracy and achieves more accurate passenger flow prediction.

CN119151047APending Publication Date: 2024-12-17JILIN INST OF CHEM TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411172438.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing rail transit passenger flow prediction methods have problems of gradient vanishing and gradient explosion when capturing the intrinsic relationships between multiple features and processing long sequences, resulting in inaccurate prediction results.

Method used

Discrete wavelet transform, discrete Fourier transform and variational modal decomposition extract the high-frequency, low-frequency and modal features of the rail transit passenger flow time series, perform multi-feature integration and standardization, combining the probability sparse self-attention mechanism and the multi-head attention mechanism Build encoders and decoders to improve the capture capability of predictive models.

Benefits of technology

Through the multi-feature fusion mechanism, the ability to capture time series data information is enhanced, the accuracy of rail transit passenger flow prediction is improved, and the future passenger flow situation can be predicted more accurately, helping subway operators to reasonably allocate resources and optimize line layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151047A_ABST
    Figure CN119151047A_ABST
Patent Text Reader

Abstract

The invention discloses a rail transit passenger flow volume prediction method and device based on a multi-feature fusion mechanism, and relates to the technical field of passenger flow prediction, and the method comprises the steps: obtaining a rail transit passenger flow volume data set, and carrying out the preprocessing, and obtaining a rail transit passenger flow volume time sequence; discrete wavelet transform, discrete Fourier transform and variational mode decomposition are adopted to perform characteristic decomposition on the rail transit passenger flow volume time sequence to obtain high-frequency, low-frequency, frequency and mode characteristic data, and multi-characteristic integration and standardization operation are performed to obtain standardized multi-characteristic representation of the rail transit passenger flow volume; constructing a multi-feature representation input encoder and a decoder of a long-term capture mechanism, and training and testing based on the standardized multi-feature representation of the rail transit passenger flow volume to obtain a rail transit passenger flow volume prediction model; and predicting the passenger flow data of the target station in the future natural day by using the rail transit passenger flow prediction model. According to the invention, the accuracy of track traffic passenger flow prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of passenger flow prediction, and in particular to a method and device for predicting rail transit passenger flow based on a multi-feature fusion mechanism. Background Art

[0002] Time series is a high-dimensional numerical sequence obtained at the same time interval according to a certain data collection method. Time series forecasting is a process of predicting future behavior by mining information from current and past data. It plays a key role in many other fields such as economics, environment, and industry. The purpose of time series forecasting is to make more accurate decisions and provide data with reference value through forecasting technology.

[0003] Rail transit passenger flow forecasting is an important issue in the field of transportation. It can help transportation management departments better plan and dispatch transportation resources, improve transportation efficiency, and improve the service level of the transportation system. With the rapid improvement of economic strength and the urgent needs of urban development, many cities have carried out large-scale urban rail transit construction. Accurately predicting the passenger flow of urban rail transit has become an important issue in rail transit management. Rail transit passenger flow forecasting can help transportation managers predict future passenger flow, thereby adjusting transportation capacity and optimizing train schedules to meet passenger travel needs. It can also provide a basis for the layout of future rail transit lines and stations, and continuously improve the service level of the transportation system.

[0004] The patent (CN114973653A) discloses a method for predicting traffic passenger flow based on a spatiotemporal graph convolutional network. The method includes the following steps: obtaining traffic passenger flow data information, and then using a linear interpolation method to complete the missing data information; taking the traffic passenger flow data and the adjacency matrix of each node in the graph convolutional network as input in chronological order, and allowing the graph convolutional network to extract its spatial features; based on the spatial features extracted from the graph convolutional network, dynamically designing a gated recurrent unit so that it can better combine spatiotemporal information while extracting temporal features, thereby improving the accuracy of traffic passenger flow prediction and better meeting people's living needs.

[0005] The patent (CN117252311A) discloses a rail transit passenger flow prediction method based on an improved LSTM network, which includes the following steps: obtaining the original data of total passenger flow and feature data related to rail transit; preprocessing the original data of total passenger flow and using the meteorological warning in the feature to calculate the meteorological warning index; performing feature selection on the preprocessed features and total passenger flow data, and dividing each type of data into a training set and a test set; sending the training set to the constructed improved LSTM network for training; sending the test set to the trained improved LSTM network for prediction to obtain the rail transit passenger flow prediction value; and correcting the rail transit passenger flow prediction value using the event correction method, thereby improving the accuracy of rail transit passenger flow prediction, helping subway operators to rationally allocate resources, and improving operational efficiency and passenger satisfaction.

[0006] The patent (CN117112931A) discloses a method for predicting rail transit passenger flow based on multimodal information fusion, which includes the following steps: obtaining feature vectors of urban points of interest, then constructing a directed graph based on rail transit stations and the positional relationship between rail transit stations and points of interest, extracting feature vectors of rail transit stations, crawling social media texts of various time periods, and extracting public travel interest feature vectors from them; fusing public travel interest feature vectors, rail transit station feature vectors, and historical passenger flow feature vectors based on a multi-head cross-attention model; and using an LSTM network to predict the passenger flow feature vector for the next time period. This method combines the features of urban points of interest and the text features of social media to predict rail transit passenger flow and improve prediction accuracy.

[0007] The patent (CN117935555A) discloses a traffic flow prediction method based on a bidirectional GRU hypergraph convolution model. This method uses a covariance-based dynamic adjacency matrix to replace the adjacency matrix between nodes in the actual situation, and extracts the spatial correlation and heterogeneity of nodes in the road historical data from the two perspectives of the road network dynamic adjacency matrix and its corresponding hypergraph. The traffic prediction network model is used to train the adaptive network parameters of the target road section through historical traffic data and its road network dynamic adjacency matrix and its corresponding hypergraph, and the traffic data of the target road section for a certain period of time before the time to be predicted is obtained. Combined with the trained traffic prediction network model, the traffic prediction data of the target road section in the target period is obtained. This method captures the functional spatial correlation from a global perspective and the time-varying spatial correlation from a local perspective, thereby improving the accuracy of traffic prediction.

[0008] In addition, Laird et al. used the discrete features of the sequence to extract statistical rules, and then achieved prediction based on the obtained rules. The decomposition algorithm was applied to decompose the time series into multiple subsequences to obtain more feature information. Chen et al. extracted high-frequency and low-frequency features of multi-scale information through discrete wavelet decomposition, and then input the feature information into a two-stage attention mechanism to obtain the prediction results. The model fully considers the high-frequency and low-frequency feature information, and fuses these two types of information to form multi-scale feature information for prediction. Therefore, the model not only captures the frequency feature information but also obtains the relevant information generated during the fusion process. Huang et al. considered nonlinear and non-smooth feature information, captured modal features through empirical mode decomposition (EMD), and constructed a prediction model. However, although these models use additional extracted feature information to improve prediction performance, they do not extract more comprehensive and implicit feature information, which weakens their information utilization ability and hinders the improvement of prediction ability.

[0009] In summary, the existing rail transit passenger flow prediction methods mainly focus on recurrent neural networks, graph neural networks, and predictions based on extracted features, including mainstream neural network methods such as RNN, LSTM, GRU, etc. These methods are difficult to adapt to the capture of the intrinsic relationship between multiple features, and there is still a risk of gradient vanishing and gradient explosion problems when the sequence is too long, which leads to inaccurate prediction results. Therefore, it is hoped that a rail transit passenger flow prediction method that outputs more accurate results can be provided to facilitate the rational allocation of resources by subway operators. Summary of the invention

[0010] The purpose of this application is to provide a rail transit passenger flow prediction method and device based on a multi-feature fusion mechanism, which can improve the accuracy of rail transit passenger flow prediction.

[0011] To achieve the above objectives, this application provides the following solutions:

[0012] In the first aspect, the present application provides a rail transit passenger flow prediction method based on a multi-feature fusion mechanism, comprising:

[0013] Acquire and preprocess a rail transit passenger flow data set to obtain a rail transit passenger flow time series; the rail transit passenger flow data set includes passenger flow data of a target station on several consecutive historical natural days;

[0014] Discrete wavelet transform is used to decompose the characteristics of rail transit passenger flow time series to obtain high-frequency characteristic data and low-frequency characteristic data;

[0015] Discrete Fourier transform is used to decompose the characteristics of rail transit passenger flow time series to obtain frequency characteristic data;

[0016] The variational mode decomposition is used to perform feature decomposition on the rail transit passenger flow time series to obtain the modal feature data;

[0017] Perform multi-feature integration and standardization operations on high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data to obtain a standardized multi-feature representation of rail transit passenger flow;

[0018] An encoder for multi-feature representation input and a decoder for long-term capture mechanism are constructed, and training and testing are performed based on the standardized multi-feature representation of rail transit passenger flow to obtain a rail transit passenger flow prediction model; the encoder for multi-feature representation input adopts several layers of probabilistic sparse self-attention mechanism and self-attention distillation operation; the decoder for the long-term capture mechanism adopts several layers of probabilistic sparse self-attention mechanism with shielded multi-head attention, time-dependent mechanism and multi-head attention mechanism;

[0019] The rail transit passenger flow prediction model is used to predict the passenger flow data of the target station in the next natural day.

[0020] Optionally, discrete wavelet transform is used to perform feature decomposition on the rail transit passenger flow time series to obtain high-frequency feature data and low-frequency feature data, specifically including:

[0021] Given a rail transit passenger flow time series X = {x1, x2, ..., x n}, high-pass filter H = {h1, h2, ..., h n} and low-pass filter L = {l1, l2, ..., l n}; where x n represents the nth sample in the rail transit passenger flow time series, h n Represents the n-th dimension component of the high-pass filter, l n Represents the component of the nth dimension of the low-pass filter;

[0022] Using formula and The high-frequency and low-frequency features of each dimension of the rail transit passenger flow time series are decomposed to obtain high-frequency feature data and low-frequency feature data; where x i (h) represents the high-frequency features after decomposition of the i-th dimension, x i (l) represents the low-frequency features after decomposition in the i-th dimension, * represents the convolution operation, and x i+1 (h) represents the high-frequency features after decomposition in the i+1th dimension, x i+1 (l) represents the low-frequency features after decomposition in the i+1th dimension.

[0023] Optionally, discrete Fourier transform is used to perform feature decomposition on the rail transit passenger flow time series to obtain frequency feature data, specifically including:

[0024] Given a rail transit passenger flow time series X = {x1, x2, ..., x n}; where x n represents the nth sample in the rail transit passenger flow time series;

[0025] Using formula Decompose the rail transit passenger flow time series to obtain frequency characteristic data; among them, X f represents the frequency characteristic, x n represents the nth sample in the rail transit passenger flow time series, L n represents the length of the rail transit passenger flow time series, k represents the frequency domain index of the rail transit passenger flow time series, j represents the imaginary unit, and e represents the base of the natural logarithm.

[0026] Optionally, variational modal decomposition is used to perform feature decomposition on the rail transit passenger flow time series to obtain modal feature data, specifically including:

[0027] Perform Hilbert transform on the rail transit passenger flow time series to obtain the unilateral spectrum of the sequence, and use the mixed index to estimate the central frequency of each sequence to construct a constrained variational problem

[0028]

[0029] in, The modal characteristics of The eigenmode function components, Indicates The center frequency, represents the total number of intrinsic mode function components, δ represents the Dirac distribution, δ t represents the partial derivative of Dirac distribution at time t, j represents the imaginary unit, and X represents the time series of rail transit passenger flow;

[0030] By multiplying the analytical signal with the Lagrangian operator, the central bandwidth of the analytical signal is modulated to the corresponding baseband, and the constrained variational problem is transformed into an unconstrained variational equation.

[0031]

[0032] Among them, α represents the penalty factor, λ represents the Lagrangian operator;

[0033] Continuous update using alternating direction multiplier method and λ are used to solve the unconstrained variational equation to obtain the eigenmode function components and center frequencies and determine the modal characteristic data.

[0034] Optionally, multi-feature integration and standardization operations are performed on the high-frequency feature data, the low-frequency feature data, the frequency feature data and the modal feature data to obtain a standardized multi-feature representation of rail transit passenger flow, specifically including:

[0035] Multi-feature integration of high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data is performed to obtain a multi-feature representation of rail transit passenger flow X Feature ={X h , X l , X f , X imf}; where X h represents high frequency features, X l represents low-frequency features, X f Represents the frequency characteristics, X imf Represents modal characteristics;

[0036] Using formula The multi-feature representation of rail transit passenger flow is standardized into a distribution with a mean of 0 and a standard deviation of 1, and a standardized multi-feature representation of rail transit passenger flow is obtained; The standardized multi-feature representation of rail transit passenger flow, X mean represents the mean of the multi-feature representation of rail transit passenger flow, X std Indicates the standard deviation of the multi-feature representation of rail transit passenger flow.

[0037] Optionally, the expression of the probabilistic sparse self-attention mechanism is:

[0038]

[0039] in, represents the probabilistic sparse attention weight, d represents the input dimension, Q represents the query, K represents the key, and V represents the value. is a sparse matrix of the same size as Q, The values ​​of K and V are derived from the standardized multi-feature representation of rail transit passenger flow.

[0040] Optionally, the expression of the self-attention distillation operation is:

[0041]

[0042] Among them, X out denotes the output of the self-attention distillation operation, MaxPool(·) denotes the maximum pooling operation, Conv1d(·) denotes the one-dimensional convolution filter, ELU(·) denotes the ELU activation function, represents the input of the self-attention distillation operation, [·] ABRepresents an attention block, which contains a multi-layer probabilistic sparse self-attention mechanism.

[0043] Optionally, a long short-term memory unit is introduced into the time-dependent mechanism;

[0044] The expression of the updating process of the long short-term memory unit is:

[0045]

[0046] in, Indicates The hidden state of the layer and the decoder at The combination of the input of the layer, σ(·) represents the Sigmoid activation function, tanh(·) represents the Tanh activation function, W f , W i , W o , W c and b f , b i , b o , b c are parameters to be learned. Respectively represent The forget gate unit, input gate unit, output gate unit, cell state and hidden state of the layer;

[0047] The expression of the time-dependent mechanism is:

[0048]

[0049] in, Indicates The hidden state of the layer, Indicates The hidden state of the layer, Indicates that the decoder is The input of the layer, f1(·) represents the long short-term memory unit, W h , W c , W x are parameters to be learned. The standardized multi-feature representation of rail transit passenger flow is The characteristics of the layer, Indicates The time-dependent characteristics of the layers, Indicates the time-dependent mechanism in The output of the layer.

[0050] Optionally, stacking the multi-head attention mechanism using a fully connected layer;

[0051] The expression of the multi-head attention mechanism is:

[0052]

[0053] in, Indicates that the multi-head attention mechanism is The output of the layer, Concat(·) represents the full connection operation, Indicates Placeholder for layers, Indicates the time-dependent mechanism in The output of the layer.

[0054] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the rail transit passenger flow prediction method based on a multi-feature fusion mechanism.

[0055] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0056] The present application provides a rail transit passenger flow prediction method and device based on a multi-feature fusion mechanism. The rail transit passenger flow time series is obtained by preprocessing the acquired rail transit passenger flow data set, and the high-frequency and low-frequency features of the rail transit passenger flow time series are extracted by discrete wavelet transform (Discrete Wavelet Transform, DWT), the frequency features are extracted by discrete Fourier transform (Discrete Fourier Transform, DFT), and the modal features are extracted by variational mode decomposition (Variational Mode Decomposition, VMD), and then integrated to obtain a standardized multi-feature representation of the rail transit passenger flow. By constructing an encoder for multi-feature representation input and a decoder for a long-term capture mechanism and training them, a rail transit passenger flow prediction model is obtained to realize the prediction of rail transit passenger flow. This application proposes a multi-feature capture mechanism, which can more effectively and comprehensively mine the data information contained in time series data through DWT, DFT and VMD algorithms, thereby improving the ability to capture multi-feature information and giving a higher weight to the time dimension of the feature sequence. The deep time attention mechanism can effectively capture deep time features and enhance the processing ability of time information, thereby improving the accuracy of rail transit passenger flow prediction and achieving the purpose of predicting the passenger flow of the station where the line is located in a certain day in the future. By accurately predicting the passenger flow of a station, public transportation routes can be better planned, stations can be reasonably laid out, the coverage and service quality of the transportation network can be improved, and support can be provided for the sustainable development of the city and the solution of traffic congestion problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 A flow chart of a rail transit passenger flow prediction method based on a multi-feature fusion mechanism provided in this application;

[0059] Figure 2 A specific flow chart of the rail transit passenger flow prediction method based on a multi-feature fusion mechanism provided in this application. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] This application proposes a rail transit passenger flow prediction method and device based on a multi-feature fusion mechanism. First, a rail transit passenger flow data set of a certain city is obtained and preprocessed to obtain a rail transit passenger flow time series; secondly, the high-frequency, low-frequency, frequency and modal features implicit in the rail transit passenger flow time series are extracted, and a multi-feature sequence representation based on the rail transit passenger flow time series is constructed, and an encoder with a multi-head mechanism and a decoder model with a long-term capture mechanism are established; finally, the model is trained to obtain the optimal model parameters, thereby realizing the prediction of rail transit passenger flow. This application realizes the prediction of passenger flow at the station where the line is located within a certain day in the future, solving the problem that the existing model fails to effectively grasp the future passenger flow.

[0062] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0063] In an exemplary embodiment, the present application provides a rail transit passenger flow prediction method based on a multi-feature fusion mechanism. Figure 1 and Figure 2 As shown, the rail transit passenger flow prediction method based on a multi-feature fusion mechanism provided in an embodiment of the present application includes the following steps 1 to 7.

[0064] Step 1: Obtain a rail transit passenger flow data set and preprocess it to obtain a rail transit passenger flow time series. The rail transit passenger flow data set includes passenger flow data of a target station on several consecutive historical natural days.

[0065] For example, the rail transit passenger flow data set used is the card swiping data of subway gates in various cities from August to November of a certain year. Based on the original data, the passenger flow data information of the corresponding date and corresponding card swiping location can be sorted out to construct the rail transit passenger flow data set.

[0066] Step 2: Use discrete wavelet transform to decompose the characteristics of the rail transit passenger flow time series to obtain high-frequency characteristic data and low-frequency characteristic data. The processing process of the discrete wavelet transform algorithm is as follows:

[0067] Given a rail transit passenger flow time series X = {x1, x2, ..., x n}, given a low-pass filter L = {l1, l2, ..., l n} and high-pass filter H = {h1, h2, ..., h n}, the high-frequency feature and low-frequency feature decomposition of the i+1th dimension can be calculated by formulas (1) and (2) respectively:

[0068]

[0069] Among them, x n represents the nth sample in the rail transit passenger flow time series, h n Represents the n-th dimension component of the high-pass filter, l n Represents the component of the nth dimension of the low-pass filter, x i (h) represents the high-frequency features after decomposition of the i-th dimension, x i (l) represents the low-frequency features after decomposition in the i-th dimension, * represents the convolution operation, and x i+1 (h) represents the high-frequency features after decomposition in the i+1th dimension, x i+1 (l) represents the low-frequency features after decomposition in the i+1th dimension.

[0070] Finally, the high-frequency characteristics of rail transit passenger flow after decomposition in the i+1th dimension can be obtained through the above process. and low frequency characteristics where x n (h) represents the nth component of the high-frequency feature, x n (l) represents the nth component of the low-frequency feature.

[0071] Step 3: Use discrete Fourier transform to decompose the rail transit passenger flow time series to obtain frequency characteristic data. The processing process of the discrete Fourier transform algorithm is as follows:

[0072] Given a rail transit passenger flow time series X = {x1, x2, ..., x n}Transformed to X f The discrete Fourier transform of can be obtained by formula (3):

[0073]

[0074] Among them, X f represents the frequency characteristic, x n represents the nth sample in the rail transit passenger flow time series, L n represents the length of the rail transit passenger flow time series, k represents the frequency domain index of the rail transit passenger flow time series, j represents the imaginary unit, and e represents the base of the natural logarithm.

[0075] Logarithmic Expression It can be expressed as a combination of sine and cosine according to Euler's formula and can be calculated by formula (4):

[0076] e -jx =cosx+j sinx (4)

[0077] Therefore, the discrete Fourier transform can be redefined as formula (5):

[0078]

[0079] Finally, the frequency characteristics of rail transit passenger flow X can be obtained f ={x1(f), x2(f), ..., x n (f)}, where x n (f) represents the frequency domain value of the nth element.

[0080] Step 4: Use variational mode decomposition to perform feature decomposition on the rail transit passenger flow time series to obtain modal feature data. The processing process of the variational mode decomposition algorithm is as follows:

[0081] First, the one-sided spectrum of the sequence is obtained by Hilbert transform, and the center frequency of each sequence is estimated by the mixing index. The bandwidth of each mode can be obtained by H1-Gaussian smoothing. The constrained variation problem can be calculated by formula (6):

[0082]

[0083] in, The modal characteristics of Intrinsic mode function (IMF) components, Indicates The center frequency, represents the total number of IMF components, δ represents the Dirac distribution, δ t represents the partial derivative of Dirac distribution at time t, j represents the imaginary unit, and X represents the time series of rail transit passenger flow.

[0084] Secondly, the central bandwidth of the analysis signal is modulated to the corresponding baseband by multiplying the analysis signal with the Lagrangian operator. The constrained variational problem is transformed into an unconstrained variational equation, as shown in formula (7):

[0085]

[0086] Among them, α represents the penalty factor and λ represents the Lagrangian operator.

[0087] Finally, the alternating direction method of multipliers (ADMM) is used to continuously update and λ to obtain the IMF components and frequencies. Specifically, by fixing the Lagrangian operator λ, we alternately optimize and to minimize the Lagrangian function.

[0088] renew By minimizing The Lagrangian function is used to update As shown in formula (8):

[0089]

[0090] renew By minimizing The Lagrangian function is used to update As shown in formula (9):

[0091]

[0092] Update the Lagrangian operator λ, as shown in formula (10):

[0093]

[0094] Among them, epo represents the number of iterations, and Represent X and u respectively k and the Fourier transform of λ, τ represents the update factor. In the iterative process, the solution set of the original problem will be continuously optimized and converge to the optimal solution under certain conditions.

[0095] Therefore, the intrinsic mode characteristics IMF of rail transit passenger flow can be obtained by formula (11):

[0096]

[0097] in, is a non-decreasing function, the signal envelope is non-negative, Indicates the number of intrinsic mode features IMF obtained. Finally, the intrinsic mode features of rail transit passenger flow are obtained.

[0098] Step 5: Perform multi-feature integration and standardization operations on high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data to obtain a standardized multi-feature representation of rail transit passenger flow.

[0099] Step 2 obtains the high-frequency characteristics of rail transit passenger flow X h ={x1(h), x2(h), ..., x n (h)} and low-frequency features X l ={x1(l), x2(l), ..., x n (l)}, step 3 obtains the rail transit passenger flow frequency characteristic X f ={x1(f), x2(f), …, x n (f)} and step 4 to obtain the intrinsic mode characteristics of rail transit passenger flow Perform multi-feature integration to obtain a multi-feature representation of rail transit passenger flow X Feature ={X h , X l , X f , X imf}.

[0100] Given a multi-feature representation X Feature ={X h , X l , X f , X imf}, and standardize it to a distribution with a mean of 0 and a standard deviation of 1. The standardized data set is recorded as The formula for the standardization operation is shown in (12):

[0101]

[0102] Among them, X mean For X Feature The mean value of X std For X Feature The standard deviation of Represents the standardized data set, that is, the standardized multi-feature representation of rail transit passenger flow.

[0103] Step 6: Construct an encoder for multi-feature representation input and a decoder for long-term capture mechanism, and train and test based on the standardized multi-feature representation of rail transit passenger flow to obtain a rail transit passenger flow prediction model. The encoder for multi-feature representation input adopts several layers of probabilistic sparse self-attention mechanism and self-attention distillation operation. The decoder for the long-term capture mechanism adopts several layers of probabilistic sparse self-attention mechanism with shielded multi-head attention, time-dependent mechanism and multi-head attention mechanism.

[0104] The encoder of the multi-feature representation input uses several layers of ProbSparse self-attention mechanism and self-attention distillation operation to capture the main features related to the multi-feature sequence, and generates a focused feature map and transmits it to the next layer to reduce the input cost of processing long sequences. The ProbSparse self-attention mechanism is calculated by formula (13):

[0105]

[0106] in, represents the ProbSparse attention weight, d represents the input dimension, is a sparse matrix of the same size as Q, which contains only the Top-u queries under the sparsity metric M(Q, K), where Q, K, and V represent the query and the key and value to be queried, respectively. Under the control of the constant sampling factor c, by setting u = c ln L Q , so that ProbSparse only needs to calculate O(ln L Q ) dot product, the layer memory usage remains at O(L K l Q ). Where u represents the random sampling size, L Q , L K represents the length of Q and K, and O(·) represents the time complexity. Under the multi-head view, this attention generates different sparse query key pairs for each head, thus avoiding serious information loss. The values ​​of K and V are derived from As a natural consequence of the ProbSparse self-attention mechanism, the input representation of the self-attention distillation operation is obtained by formula (14):

[0107]

[0108] Here, norm(·) represents the regularization operation.

[0109] The self-attention distillation operation is calculated by formula (15).

[0110]

[0111] Among them, X out denotes the output of the self-attention distillation operation, MaxPool(·) denotes the maximum pooling operation, Conv1d(·) denotes the one-dimensional convolution filter, ELU(·) denotes the ELU activation function, represents the input of the self-attention distillation operation, [·] AB represents the attention block, which contains a multi-layer probabilistic sparse self-attention mechanism. After passing through a one-dimensional convolution filter in the time dimension, ELU(·) is used to process the multi-head attention block. The MaxPooling layer is constructed to achieve the halving operation. Finally, the output vector of the encoder is obtained in Represents the nth component of the encoder's output vector.

[0112] The decoder of the long-term capture mechanism consists of three parts: Masked ProbSparse self-attention mechanism, time-dependent mechanism and multi-head attention mechanism. By setting the target dot product of the input sequence to negative infinity -α∝, the masked multi-head attention is applied to the ProbSparse self-attention mechanism calculated by formula (13) to prevent each position from participating in the next position, thereby avoiding autoregression. The time-dependent mechanism can be learned from formula (16) Output to The mapping:

[0113]

[0114] in, Indicates The hidden state of the layer, Indicates The hidden state of the layer, Indicates that the decoder is The input of the layer, f1(·) represents the long short-term memory unit. In order to better capture the long-term temporal dependency, the long short-term memory (LSTM) unit is introduced into the temporal dependency mechanism. The update process of the LSTM unit is as shown in formulas (17)-(21):

[0115]

[0116]

[0117] in, Indicates The hidden state of the layer and the decoder at The combination of the input of the layer, σ(·) represents the Sigmoid activation function, tanh(·) represents the Tanh activation function, Wf , W i , W o , W c and b f , b i , b o , b c are parameters to be learned. Respectively represent The forget gate unit, input gate unit, output gate unit, cell state, and hidden state of the layer.

[0118] The hidden state and context vector are combined through linear projection operation to obtain the representation of time-dependent mechanism. To increase the focus on the original time series, is added to the deep temporal mechanism to obtain the final output representation of the time-dependent mechanism, calculated by equations (22) and (23):

[0119]

[0120] Among them, W h , W c , W x are parameters to be learned. express In the The characteristics of the layer, Indicates The time-dependent characteristics of the layers, Indicates the time-dependent mechanism in The output of the layer.

[0121] Will The representation is input into the multi-head attention mechanism with labels, and then the multi-head attention mechanism is stacked using a fully connected layer. This process reduces the time cost of long-term prediction. The prediction vector can be obtained by formula (24):

[0122]

[0123] in, Indicates that the multi-head attention mechanism is The output of the layer, Concat(·) represents the full connection operation, Indicates The final prediction vector is obtained Where t represents the predicted future horizon, that is, the length that needs to be predicted. Assuming that there are 21 stations on a rail transit line, and the rail transit passenger flow data of all stations in the next day are predicted, the predicted future horizon t should be set to 21.

[0124] Step 7: Use the rail transit passenger flow prediction model to predict the passenger flow data of the target station in the next natural day.

[0125] Exemplarily, the training data and test data are first divided into 8:2, and then the standardized multi-feature representation of the training data is used to train the encoder and decoder to obtain the optimal model parameters. Then, the optimal model parameters are loaded, and the standardized multi-feature representation of the test data is used to evaluate the model performance, and the rail transit passenger flow prediction model is determined. Finally, based on actual needs, the rail transit passenger flow prediction model is used to predict the rail transit passenger flow results of the stations on the line in a certain day in the future.

[0126] In the performance evaluation process of the model, based on the loss function, the error between the predicted value and the actual value of the rail transit passenger flow data is judged, and the mean square error (MSE) and mean absolute error (MAE) are used to determine the accuracy of the prediction. The mean square error is calculated by formula (25), and the mean absolute error is calculated by formula (26):

[0127]

[0128] Among them, N t is the total number of test samples, y t is the true value of the tth test sample, is the predicted value of the tth test sample.

[0129] Based on the rail transit passenger flow dataset of the above-mentioned city, this application and other methods are used for prediction respectively, and the comparison of prediction results is shown in Table 1.

[0130] Table 1 Comparison of prediction results of this application and other methods

[0131]

[0132] This application obtains a rail transit passenger flow time series by preprocessing the acquired rail transit passenger flow data set, and uses the extracted feature information of the rail transit passenger flow time series to input into the model for prediction, which improves the accuracy of rail transit passenger flow prediction while being interpretable, and predicts the rail transit passenger flow situation of the station where the line is located in a certain day in the future through the model, which can provide a certain reference to the subway and reasonably arrange the track times. This application proposes the following three innovations in time series prediction: 1. Propose a multi-feature capture mechanism. Through VMD, DWT and DFT algorithms, different feature information of time series data is extracted respectively to enrich the feature representation of time series data. 2. Propose a multi-feature integration mechanism. The extracted multi-feature information is integrated as the feature information of rail transit passenger flow to reduce the impact of the missing original data information on the model, instead of inputting the multi-feature information into a single channel for training. 3. A decoder with a time-dependent mechanism is proposed to pay more attention to information transmission in the time dimension. This decoding strategy combines the time-dependent mechanism with multi-feature information, which can effectively obtain deep time features and enhance the ability to process time information.

[0133] Compared with the prior art, the present application has the following advantages: 1. The prior art only considers a single feature information, and does not fully consider the significant impact of multiple features. The time series prediction mechanism proposed in the present application fully considers the multiple feature information contained in the original time series, such as frequency features, high-frequency features, low-frequency features, and modal features, etc., enriching the information utilization ability of the model and greatly improving the prediction performance. It can provide a more accurate prediction model for the subway, so that the subway group can reasonably arrange the subway trains and frequencies. 2. The prior art only considers the time dimension, but does not consider the time factor at a deeper level. In the deep time attention mechanism proposed in the present application, the time dimension and the corresponding value information are learned simultaneously, making full use of the deep information implicit in the time dimension, improving the information capture ability in the time dimension, and then improving the prediction accuracy, and being able to output more accurate rail transit passenger flow prediction results.

[0134] In an exemplary embodiment, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0135] In an exemplary embodiment, the present application further provides a computer-readable storage medium storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0136] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant legal provisions.

[0138] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0139] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A rail transit passenger flow prediction method based on a multi-feature fusion mechanism, characterized in that: include: Acquire and preprocess a rail transit passenger flow data set to obtain a rail transit passenger flow time series; the rail transit passenger flow data set includes passenger flow data of a target station on several consecutive historical natural days; Discrete wavelet transform is used to decompose the characteristics of rail transit passenger flow time series to obtain high-frequency characteristic data and low-frequency characteristic data; Discrete Fourier transform is used to decompose the characteristics of rail transit passenger flow time series to obtain frequency characteristic data; The variational mode decomposition is used to perform feature decomposition on the rail transit passenger flow time series to obtain the modal feature data; Perform multi-feature integration and standardization operations on high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data to obtain a standardized multi-feature representation of rail transit passenger flow; An encoder for multi-feature representation input and a decoder for long-term capture mechanism are constructed, and training and testing are performed based on the standardized multi-feature representation of rail transit passenger flow to obtain a rail transit passenger flow prediction model; the encoder for multi-feature representation input adopts several layers of probabilistic sparse self-attention mechanism and self-attention distillation operation; the decoder for the long-term capture mechanism adopts several layers of probabilistic sparse self-attention mechanism with shielded multi-head attention, time-dependent mechanism and multi-head attention mechanism; The rail transit passenger flow prediction model is used to predict the passenger flow data of the target station in the next natural day.

2. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: Discrete wavelet transform is used to decompose the characteristics of rail transit passenger flow time series to obtain high-frequency characteristic data and low-frequency characteristic data, including: Given a rail transit passenger flow time series X = {x1, x2, ..., x n }、High pass filter H={h1,h2,...,h n } and low-pass filter L={l1,l2,...,l n }; where x n represents the nth sample in the rail transit passenger flow time series, h n Represents the n-th dimension component of the high-pass filter, l n Represents the component of the nth dimension of the low-pass filter; Using formula and The high-frequency and low-frequency features of each dimension of the rail transit passenger flow time series are decomposed to obtain high-frequency feature data and low-frequency feature data; where x i (h) represents the high-frequency features after decomposition of the i-th dimension, x i (l) represents the low-frequency features after decomposition in the i-th dimension, * represents the convolution operation, and x i+1 (h) represents the high-frequency features after decomposition in the i+1th dimension, x i+1 (l) represents the low-frequency features after decomposition in the i+1th dimension.

3. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: Discrete Fourier transform is used to decompose the characteristics of the rail transit passenger flow time series to obtain frequency characteristic data, including: Given a rail transit passenger flow time series X = {x1, x2, ..., x n }; where x n represents the nth sample in the rail transit passenger flow time series; Using formula Decompose the rail transit passenger flow time series to obtain frequency characteristic data; among them, X f represents the frequency characteristic, x n represents the nth sample in the rail transit passenger flow time series, L n represents the length of the rail transit passenger flow time series, k represents the frequency domain index of the rail transit passenger flow time series, j represents the imaginary unit, and e represents the base of the natural logarithm.

4. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: The variational mode decomposition is used to perform feature decomposition on the rail transit passenger flow time series to obtain modal feature data, including: Perform Hilbert transform on the rail transit passenger flow time series to obtain the unilateral spectrum of the sequence, and use the mixed index to estimate the central frequency of each sequence to construct a constrained variational problem in, The modal characteristics of The eigenmode function components, Indicates The center frequency, represents the total number of intrinsic mode function components, δ represents the Dirac distribution, δ t represents the partial derivative of Dirac distribution at time t, j represents the imaginary unit, and X represents the time series of rail transit passenger flow; By multiplying the analytical signal with the Lagrangian operator, the central bandwidth of the analytical signal is modulated to the corresponding baseband, and the constrained variational problem is transformed into an unconstrained variational equation. Among them, α represents the penalty factor, λ represents the Lagrangian operator; Continuous update using alternating direction multiplier method and λ are used to solve the unconstrained variational equation to obtain the eigenmode function components and center frequencies and determine the modal characteristic data.

5. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: Multi-feature integration and standardization operations are performed on high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data to obtain a standardized multi-feature representation of rail transit passenger flow, including: Multi-feature integration of high-frequency feature data, low-frequency feature data, frequency feature data and modal feature data is performed to obtain a multi-feature representation of rail transit passenger flow X Feature ={X h , X l , X f , X imf }; where X h represents high frequency features, X l represents low-frequency features, X f Represents the frequency characteristics, X imf Represents modal characteristics; Using formula The multi-feature representation of rail transit passenger flow is standardized into a distribution with a mean of 0 and a standard deviation of 1, and a standardized multi-feature representation of rail transit passenger flow is obtained; The standardized multi-feature representation of rail transit passenger flow, X mean represents the mean of the multi-feature representation of rail transit passenger flow, X std Indicates the standard deviation of the multi-feature representation of rail transit passenger flow.

6. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: The expression of the probabilistic sparse self-attention mechanism is: in, represents the probabilistic sparse attention weight, d represents the input dimension, Q represents the query, K represents the key, and V represents the value. is a sparse matrix of the same size as Q, The values ​​of K and V are derived from the standardized multi-feature representation of rail transit passenger flow.

7. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: The expression of the self-attention distillation operation is: Among them, X out denotes the output of the self-attention distillation operation, MaxPool(·) denotes the maximum pooling operation, Conv1d(·) denotes the one-dimensional convolution filter, ELU(·) denotes the ELU activation function, represents the input of the self-attention distillation operation, [·] AB Represents an attention block, which contains a multi-layer probabilistic sparse self-attention mechanism.

8. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: Introducing long short-term memory units into the time-dependent mechanism; The expression of the updating process of the long short-term memory unit is: in, Indicates The hidden state of the layer and the decoder at The combination of the input of the layer, σ(·) represents the Sigmoid activation function, tanh(·) represents the Tanh activation function, W f , W i , W o , W c and b f , b i , b o , b c are parameters to be learned. Respectively represent The forget gate unit, input gate unit, output gate unit, cell state and hidden state of the layer; The expression of the time-dependent mechanism is: in, Indicates The hidden state of the layer, Indicates The hidden state of the layer, Indicates that the decoder is The input of the layer, f1(·) represents the long short-term memory unit, W h , W c , W x are parameters to be learned. The standardized multi-feature representation of rail transit passenger flow is The characteristics of the layer, Indicates The time-dependent characteristics of the layers, Indicates the time-dependent mechanism in The output of the layer.

9. The rail transit passenger flow prediction method based on multi-feature fusion mechanism according to claim 1 is characterized in that: Stacking the multi-head attention mechanism using fully connected layers; The expression of the multi-head attention mechanism is: in, Indicates that the multi-head attention mechanism is The output of the layer, Concat(·) represents the full connection operation, Indicates Placeholder for layers, Indicates the time-dependent mechanism in The output of the layer.

10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the rail transit passenger flow prediction method based on a multi-feature fusion mechanism as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Automatic driving simulation test feature selection method

    CN120030315A