An intercity passenger flow prediction method based on holiday passenger flow trend similarity

By integrating spatiotemporal characteristics and holiday trend characteristics into an intercity passenger flow forecasting method, and utilizing long short-term memory networks and fully connected networks, the problem of large forecasting errors during holidays in existing technologies is solved, and accurate intercity passenger flow forecasting is achieved.

CN119338507BActive Publication Date: 2025-11-25SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411261093.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-11-25
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing intercity passenger flow forecasting methods rely on historical data from the same period, which makes it difficult to effectively cope with passenger flow fluctuations during holidays, resulting in large forecasting errors and difficulty in dealing with traffic management pressures during holidays.

Method used

The intercity passenger flow prediction method based on the similarity of passenger flow trends during holidays integrates spatiotemporal features and holiday trend features, calculates trend feature matrices and holiday feature matrices using intercity passenger flow data, and combines long short-term memory networks and fully connected networks for prediction to capture the changing patterns of intercity passenger flow.

Benefits of technology

It improves the accuracy of intercity passenger flow forecasting during holidays, effectively addresses passenger flow fluctuations during holidays, reduces forecasting errors, and facilitates traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338507B_ABST
    Figure CN119338507B_ABST
Patent Text Reader

Abstract

The application discloses an intercity passenger flow prediction method based on holiday passenger flow trend similarity, and relates to the intercity passenger flow prediction field. First, intercity passenger flow data is obtained through data collection, and a trend feature matrix is calculated; the trend feature matrix is fused with the intercity passenger flow data to obtain initial training data; second, a view variable group of a future prediction period is acquired by using the initial training data, and main view variables are defined; information features are aggregated in the spatial and time dimensions to obtain space-time variables; then, space-time coding information is calculated and converted according to the space-time variables and the view variable group; finally, a holiday feature matrix is calculated based on holiday passenger flow trend similarity features, holiday trend features are extracted and fused, and finally, intercity passenger flow prediction results of a future holiday are obtained. The application improves the accuracy and reliability of prediction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intercity passenger flow, and particularly relates to an intercity passenger flow prediction method based on holiday passenger flow trend similarity. BACKGROUND

[0002] With the development of regional economy and urban agglomeration, intercity population connectivity is increasingly enhanced, forming characteristics different from the traffic demand within the city. Due to the differences in population size, economic conditions and cultural customs of each city, the prediction of intercity flow becomes more complex. In addition, the existence of holiday effect further increases the difficulty of intercity passenger flow prediction. During holidays, intercity travel demand usually increases significantly, resulting in significant fluctuations in intercity passenger flow, thereby bringing great pressure to traffic management.

[0003] Most of the existing traffic demand prediction methods rely on historical data of the same period. However, since the intercity passenger flow data during holidays is usually collected annually, the occurrence of special events may lead to inconsistencies between historical data and current travel patterns. Therefore, the prediction method relying solely on historical data is prone to large errors and is difficult to effectively cope with the fluctuations in passenger flow during holidays, which requires analyzing and learning similar traffic patterns from passenger flow change trends similar holidays, so as to better predict the intercity passenger flow change trend during future holidays. SUMMARY

[0004] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art and provide an intercity passenger flow prediction method based on holiday passenger flow trend similarity. The present application is based on the similarity characteristics of different holiday passenger flow change trends, and fuses the spatio-temporal characteristics and holiday passenger flow trend similarity, effectively improving the accuracy of intercity passenger flow prediction during holidays.

[0005] The present application adopts the following technical solutions to solve the above technical problems:

[0006] According to the intercity passenger flow prediction method based on holiday passenger flow trend similarity provided by the present application, the similarity characteristics of different holiday passenger flow change trends are adopted, and the spatio-temporal characteristics and holiday trend characteristics are fused to predict the intercity passenger flow during future holidays. Specifically as follows:

[0007] Collect intercity passenger flow data, calculate the trend feature matrix of intercity passenger flow data according to the collected intercity passenger flow data, and fuse the trend feature matrix with the intercity passenger flow data to obtain initial training data;

[0008] Obtain the view variable group of the future prediction period by using the initial training data, and define the main view variable;

[0009] Aggregate the information features of the main view variable in the spatial dimension and the time dimension to obtain the spatio-temporal variable.

[0010] The encoding information of each future time is calculated according to the space-time variable and the field of view variable group, and is further converted into space-time encoding information;

[0011] Based on the similarity characteristics of the change trend of passenger flow in different holidays, a holiday feature matrix is calculated by using intercity passenger flow data, and trend characteristics of the holidays are extracted;

[0012] The space-time encoding information and the trend characteristics of the holidays are fused to obtain intercity passenger flow data in the future holidays.

[0013] As a further optimization scheme of the intercity passenger flow prediction method based on the holiday passenger flow trend similarity, the intercity passenger flow data X is represented as: Wherein, N represents the total number of directed city pairs, T represents the time length of each directed city pair, X i is the total number of people flowing from the starting city to the terminal city of the i-th city pair per day, i=1, 2, 3,..., N, represents the dimension of the variable T*N.

[0014] As a further optimization scheme of the intercity passenger flow prediction method based on the holiday passenger flow trend similarity, the trend feature matrix is calculated by calculating the statistical characteristics of the predicted holidays pd days before each city pair, pd=1, 2, 3,..., 5, the statistical characteristics include mean, difference, slope of linear regression, standard deviation, day-on-day growth rate, time lag characteristics and difference characteristics, so as to obtain statistical characteristic information, and the principal component analysis is performed on the statistical characteristic information, and the variance var is retained, 90%≤var≤95%, so as to obtain the trend feature matrix Wherein, M represents the sum of the principal component characteristic numbers of all variables, represents the dimension of the variable M*T.

[0015] As a further optimization scheme of the intercity passenger flow prediction method based on the holiday passenger flow trend similarity, the trend feature matrix and the intercity passenger flow data are fused to obtain initial training data, which is as follows: the trend feature matrix TF and the intercity passenger flow data X are taken as the input of the first full connection network FC1, and the initial training data

[0016] As a further optimization scheme of the intercity passenger flow prediction method based on the holiday passenger flow trend similarity, the calculation method of the field of view variable in the field of view variable group is as follows:

[0017]

[0018] Wherein, FV jFV represents the field of view variable of the jth step j-1 FV represents the field of view variable of the j-1th step, t represents the prediction time period length, and DConv() represents the process of dynamic convolution.

[0019] When j = 1, FV j is calculated as follows:

[0020]

[0021] wherein BN() represents batch normalization, ReLU() represents an activation function, k c1 and k c2 represent the convolution kernel size for generating the weight matrix, s c represents the step length, p c represents padding, Unfold(X F ,k u ,p u ,s u ,d) represents decomposing the variable X F into multiple parts available for convolution operation, thereby obtaining X F ', X F ' represents the whole of the multiple parts available for convolution operation, k u represents the convolution kernel size of Unfold(), which is the same as the size of its dynamic convolution kernel, s u represents the step length, p u represents padding, and d represents the dilation rate, W(X F ) is the weight obtained by dynamic convolution, Conv1() is the first one-dimensional convolution, and Conv2() is the second one-dimensional convolution.

[0022] When j ≠ 1, FV j is calculated as follows:

[0023]

[0024] wherein Unfold(FV j-1 ,k u ,p u ,s u ,d) represents decomposing the variable FV j-1 into multiple parts available for convolution operation, thereby obtaining FV j-1 ', FV j-1 ' represents the whole of the multiple parts available for convolution operation, and W(FV j-1 ) is the weight obtained by dynamic convolution.

[0025] The field of view variable FV k of the kth step is defined as the main field of view variable, wherein k = t / / 2.

[0026] As a further optimization scheme of the intercity passenger flow prediction method based on holiday passenger flow trend similarity, the information features of the main field of view variable are aggregated in the spatial dimension and the time dimension to obtain a space-time variable. The information feature aggregation process in the spatial dimension is as follows:

[0027] First, a long short-term memory network (LSTM) is used to encode the spatial information of the main field of view variable FV k to obtain T hidden variables wherein, represents a variable dimension of T x hiddenL, hiddenL represents the hidden variable dimension in the LSTM model, and the cell variable

[0028]

[0029] wherein, and are the hidden state and the cell state at the ti step, ti = 1, 2, 3,..., T, and are the hidden state and the cell state at the previous step, and space-LSTM() is a long short-term memory network.

[0030] Secondly, the H sl and C sl are used to calculate the weight and to weight the variable CV to obtain CVs, wherein CVs represents the weighted variable, and the calculation process is as follows:

[0031]

[0032] wherein, V ω , W ω , and U ω are parameter matrices, ω τ represents the weighted variable at the τ step, ω τi represents the weighted variable at the τi step, ω τ ' represents the weighted variable after softmax normalization, the value range of τ is [1, T], and Tanh() is an activation function, and are the hidden state and the cell state at the τ-1 step, wherein CV = {CV1,..., CV τ ,..., CV T}, CV τ represents the τth element of CV, CVs = {CVs1,..., CVs τ ,..., CVs T}, and CVs τ represents the τth element of CVs. The dimension of the variable represents T*N.

[0033] As a further optimization scheme of the intercity passenger flow prediction method based on holiday passenger flow trend similarity, the information features of the main view variable are aggregated in the spatial dimension and the time dimension to obtain a space-time variable; wherein the information feature aggregation process in the time dimension is:

[0034] First, the CVs are also encoded by a long short-term memory network (LSTM) to obtain a set of time-related hidden variables H tl : Wherein,

[0035]

[0036] Wherein, and are the hidden state and cell state of the current step, respectively, ti=1,2,3,...,T, and are the hidden state and cell state of the previous step, respectively, and time-LSTM is a long short-term memory network.

[0037] Second, the hidden variable set H at different times is aggregated to obtain a space-time variable Sv, and the specific calculation method is as follows:

[0038]

[0039] Wherein, τ=1,2,...,T, represents the cosine similarity between and , is the hidden state of the τth step, is the cosine similarity between and , and λ τ is the hidden variable aggregation weight at time τ, wherein the space-time variable represents the variable dimension hiddenL, and hiddenL represents the hidden variable dimension in the LSTM model.

[0040] As a further optimization scheme of the intercity passenger flow prediction method based on holiday passenger flow trend similarity, the encoding information of each future time is calculated according to the space-time variable and the view variable group, and is further converted into space-time encoding information; the specific method is as follows:

[0041] Calculating the encoding information of each future time means:

[0042] Firstly, the first LSTM model is used to perform an operation on each field of view variable in the field of view variable group, and the initial cell state and the initial hidden state, i.e., all zero states, are used in each operation, and the output hidden layer variable is taken as the encoding result of the first LSTM model, and the encoding process of the first LSTM model is represented as:

[0043] (H j ,C j )=share-LSTM(FV j ,H0,C0)

[0044] wherein C j and H j represent the cell state and the hidden state at the jth step, C0and H0represent the initial cell state and the initial hidden state, and share-LSTM() represents the first LSTM model;

[0045] Secondly, the second LSTM model is used to perform secondary encoding on the encoding result of the first LSTM model, and the structure of the first LSTM model and the second LSTM model is completely the same, and FV k , H k , Sv and C k are taken as inputs, wherein H k and C k are the hidden state and the cell state obtained after the main field of view variable FV k is encoded by the first LSTM model;

[0046] The mathematical form of the second LSTM model is:

[0047] (H' k ,C' k )=main-LSTM(FV k ,H k +Sv,C k )

[0048] wherein H k ' and C k ' are the hidden state and the cell state obtained by the second LSTM model, as the secondary encoding result, and all the field of view variables are encoded through the first LSTM model and the second LSTM model, and then a secondary encoding array H set , t represents the predicted time length, hiddenL represents the dimension of the hidden variable in the LSTM model, and main-LSTM() represents the second LSTM model;

[0049] The spatio-temporal encoding information is obtained by transforming the dimension of H set using a second full connection network FC2

[0050] As a further optimization scheme of the intercity passenger flow prediction method based on the similarity of holiday passenger flow trends, a holiday feature matrix is calculated using intercity passenger flow data based on the similarity characteristics of the change trends of different holidays, and trend features of the holidays are extracted.

[0051] The calculation method of the holiday feature matrix is as follows:

[0052] First, for a holiday with a length of n days, the time series is X = {X 1 , X 2 ,..., X l ,..., X n}, X l represents the time series value of the lth day of the holiday, 1≤l≤n; align the change trends of the time series of the holiday with a length of m days, m>n, from left to right, and interpolate until the number of interpolations reaches m-n, to obtain the time series X' as follows: X' = {X 1 ,(X 1 +X 2 ) / 2,X 2 ,(X 2 +X 3 ) / 2,X 3 ,...,X n}, thereby aligning the two holidays with different lengths.

[0053] Second, according to the aligned holiday, a feature is labeled, assuming that a day is the lth day of a holiday with a length of n, a feature n-l is established, and the dates that meet this feature are labeled as 1, and the remaining dates are labeled as 0, thereby obtaining a binary holiday feature matrix HL; the trend features of the holidays are extracted by fitting and predicting the data after alignment and labeling of the holidays using the Prophet model to obtain the trend features of the future holidays.

[0054] The Prophet model includes a trend part, a seasonal part, and a holiday part, and the holiday feature y(t p ) is calculated as follows:

[0055] y(t p ) = g(t p ) + s(t p ) + h(t p ) + ε p

[0056] where g(t p) is a trend feature item for describing the non-periodic change at time t p ; s(t p ) is a seasonal feature item for describing the periodic feature at time t p ; h(t p ) = HL represents the holiday effect for describing the influence degree of special events on time t p ; and epsilon p is an error item representing the random change that cannot be explained by the model, and the error is assumed to be normally distributed; by integrating the calculation results of the Prophet model, the trend feature of the holiday is obtained

[0057] As a further optimization scheme of the intercity passenger flow prediction method based on holiday passenger flow trend similarity, the spatiotemporal coding information and the trend feature of the holiday are fused to obtain the intercity passenger flow data of the future holiday; wherein the fusion refers to taking the trend feature of the holiday and the spatiotemporal coding information as the input of the third fully connected network FC3, and outputting the intercity passenger flow prediction data of the future holiday

[0058] Compared with the prior art, the above technical scheme has the following technical effects:

[0059] The present application not only considers the spatiotemporal characteristics of intercity passenger flow, but also effectively captures the change rule of intercity passenger flow by identifying the trend similarity between holidays, realizes the accurate prediction of intercity passenger flow during holidays, effectively makes up for the error defects of the prior art, is more in line with the actual situation requirements, and is convenient for engineering practice application. BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 The technical flowchart of the present application. DETAILED DESCRIPTION

[0061] In order to further understand the present method, the preferred embodiments of the present method will be described below in combination with examples, but it should be understood that these descriptions are only for further illustrating the features and advantages of the present method, and are not limitations of the claims of the present method. The description in this part is only for typical examples, and the present method is not limited to the scope described in the examples. The combination of different examples, the mutual replacement of some technical features in different examples, and the mutual replacement of some technical features in the same or similar prior art means are also within the scope of the description and protection of the present method.

[0062] An intercity passenger flow prediction method based on holiday passenger flow trend similarity, which is based on the similarity of different holiday passenger flow change trends, uses the fusion of space-time characteristics and holiday trend characteristics to predict the intercity passenger flow during future holidays; the specific steps are as follows:

[0063] Collect intercity passenger flow data, calculate the trend feature matrix of intercity passenger flow data according to the collected intercity passenger flow data, and fuse the trend feature matrix with the intercity passenger flow data to obtain initial training data;

[0064] Use the initial training data to obtain the view variable group of the future prediction period, and define the main view variable;

[0065] Aggregate the information characteristics of the main view variable in the spatial dimension and the time dimension to obtain the space-time variable;

[0066] Calculate the encoding information of each future time according to the space-time variable and the view variable group, and further convert it into space-time encoding information;

[0067] Based on the similarity of different holiday passenger flow change trends, calculate the holiday feature matrix using intercity passenger flow data and extract the trend characteristics of the holiday;

[0068] Fuse the space-time encoding information and the trend characteristics of the holiday to obtain the intercity passenger flow data of the future holiday.

[0069] In this embodiment, the intercity passenger flow data from January 1, 2023 to September 28, 2023 (a total of 271 days) (including 1568 city pairs) is used as the input data of a fusion of space-time characteristics and holiday passenger flow trend similarity intercity passenger flow prediction method, as shown in Table 1, and the intercity passenger flow during the National Day holiday from September 29, 2023 to October 6, 2023 is used as the prediction target, and the flow chart of the method is shown in Figure 1 , and the specific steps include:

[0070] Table 1: Intercity passenger flow data (input data)

[0071]

[0072]

[0073] A. Trend feature fusion: In this embodiment, the intercity passenger flow data is shown in the table, and the intercity passenger flow data can be represented in mathematical form as: where N=1568 represents the total number of directed city pairs, T=271 represents the time length of each directed city pair (variable dimension, unit: day), X iThe total number of people (a total of 271 days) of the i-th city to the daily population flow from the starting city to the end city is recorded; the trend feature matrix is obtained by calculating the statistical features of the predicted holiday 3 days (taking pd=3) from the time series of each city pair, including the mean, difference, slope of linear regression, standard deviation, day-on-day growth rate, time lag feature and difference feature, so as to obtain the statistical feature information, and the trend feature matrix TF∈R M×T , where M=3189 represents the sum of the principal component feature numbers of 1568 variables (city pairs); the fusion of the trend feature matrix and the intercity passenger flow data means that the trend feature matrix TF and the intercity passenger flow data X are taken as the input of the full connection network FC1 (the number of hidden layers is 3, the dimensions of hidden variables of each layer are 64, 256 and 64 respectively, and the ReLU activation function and the Dropout layer with dropout=0.2 are set between adjacent hidden layers), and the initial training data

[0074] B. Calculate the field of view variable: the field of view variable is calculated as follows:

[0075]

[0076] , where FV i represents the field of view variable of the i-th step, t=8 represents the prediction number of prediction days (the number of National Day holidays: 8 days), and DConv represents the process of dynamic convolution. When j=1, the calculation method of FV j is as follows:

[0077]

[0078] , where BN() represents batch normalization, ReLU() represents an activation function, k c1 and k c2 represent the convolution kernel size of the weight matrix, K=3 represents the convolution kernel size of dynamic convolution, s c represents the step length, p c represents padding, Unfold(X F , k u , p u , s u , d) represents that the variable X F is decomposed into a plurality of parts available for convolution operation, so as to obtain X F ', X F ' represents the whole of the plurality of parts available for convolution operation, k u represents the convolution kernel size of Unfold(), and the size of its dynamic convolution kernel is the same, s u represents the step length, p u represents padding, and d represents the inflation rate, W(XF ) is the weight obtained by dynamic convolution, Conv1() is the first one-dimensional convolution, and Conv2() is the second one-dimensional convolution;

[0079] FV j when j≠1, FV

[0080]

[0081] wherein, Unfold(FV j-1 ,k u ,p u ,s u ,d) represents that the variable FV j-1 is decomposed into multiple parts available for convolution operation, thereby obtaining FV j-1 ', FV j-1 ' represents the whole of the multiple parts available for convolution operation, W(FV j-1 ) is the weight obtained by dynamic convolution; the field of view variable FV k of the kth step is defined as the main field of view variable, wherein k=t / / 2, i.e., k=4;

[0082] C. Spatio-temporal aggregation:

[0083] First, the information feature aggregation process in the spatial dimension is to first encode the main field of view variable FV k using a long short-term memory network (LSTM) to obtain T (271) hidden variables wherein (hiddenL=64 represents the hidden variable dimension in the LSTM model) and cell variables wherein can be briefly represented as:

[0084]

[0085] wherein, and are the hidden state and cell state of the ti step, ti=1, 2, 3,..., T, and are the hidden state and cell state of the previous step, and space-LSTM() is a long short-term memory network.

[0086] Secondly, the weights are calculated using H sl and C sl , and the variable CV is weighted to obtain CVs, wherein CVs represents the weighted variable, and the calculation process is:

[0087]

[0088] wherein V ω , W ω , U ω are parameter matrices, ω τ denotes the weighting variable of the τth step, ω τi denotes the weighting variable of the τth i step, ω τ ' denotes the weighting variable after softmax normalization, τ ranges from 1 to T, and Tanh() is an activation function, and are the hidden state and cell state of the (τ-1)th step, respectively, wherein CV={CV1,...,CV τ ,...,CV T}, CV τ denotes the τth element of CV, CVs={CVs1,...,CVs τ ,...,CVs T}, CVs τ denotes the τth element of CVs, denotes the dimension of the variable T x N.

[0089] Then, the information feature aggregation process in the time dimension is as follows: first, the information of CVs is encoded by using a long short-term memory network (LSTM) to obtain a set of hidden variables H tl with respect to time: wherein,

[0090]

[0091] wherein, and are the hidden state and cell state of the current step, respectively, and t i = 1, 2, 3,..., T, and are the hidden state and cell state of the previous step, respectively, and time-LSTM is a long short-term memory network.

[0092] Secondly, the set of hidden variables H at different times is aggregated to obtain a spatiotemporal variable Sv, and the specific calculation method is as follows:

[0093]

[0094] wherein τ = 1, 2,..., T, denotes the cosine similarity between and , is the hidden state of the τth step, iscosine similarity between and , λ τ is the hidden variable aggregation weight at time τ, where the spatio-temporal variable represents the variable dimension is hiddenL, and hiddenL represents the hidden variable dimension in the LSTM model.

[0095] D. Spatio-temporal encoding: the encoding information of each future time is calculated. First, each field of view variable in the field of view variable group is operated by using the first LSTM model, each operation uses the initial cell state and the initial hidden state, i.e. all zero state, and the output hidden layer variable is used as the encoding result of the first LSTM model, and the encoding process of the first LSTM model is represented as:

[0096] (H j ,C j )=share-LSTM(FV j ,H0,C0)

[0097] where C j and H j represent the cell state and hidden state of the jth step, C0and H0represent the initial cell state and the initial hidden state, and share-LSTM() represents the first LSTM model.

[0098] Secondly, the LSTM encoding result of the main field of view variable FV k is encoded by using the second LSTM model, and the structure of the first LSTM model and the second LSTM model is completely the same, and FV k , H k , Sv and C k are used as inputs, where H k and C k are the hidden state and cell state obtained after the second LSTM model is encoded for the main field of view variable FV k .

[0099] The mathematical form of the second LSTM model is:

[0100] (H' k ,C' k )=main-LSTM(FV k ,H k +Sv,C k )

[0101] where H k ' and C kis the hidden state and cell state obtained by the second LSTM model, as a secondary encoding result, all the field of view variables are encoded by the first LSTM model and the second LSTM model, and a secondary encoding array H is obtained set , t represents the predicted time length, hiddenL represents the dimension of the hidden variable in the first LSTM model and the second LSTM model, and main-LSTM() represents the second LSTM model;

[0102] The spatio-temporal encoding information is obtained by using the second fully connected network FC2 (in this embodiment, the second fully connected network FC2 only contains one linear layer) to transform the dimension of H set to obtain the spatio-temporal encoding information

[0103] E. Holiday feature extraction: first, for the 5-day Labor Day holiday (April 29, 2023 to May 3, 2023), the time series can be represented as Align the change trend of the Labor Day holiday with the National Day holiday with a holiday length of 8 days, interpolate from left to right, until the number of interpolations reaches 3, and the time series obtained is: Thus, the two holidays with different lengths are aligned; secondly, according to the aligned holidays, a feature is marked, assuming that a day is the i-th day of a holiday with a length of n, a feature "n-i" is established, and the dates that meet this feature are marked as 1, and the rest are marked as 0, thereby obtaining a binary holiday feature matrix HL; finally, the Prophet model is used to fit and predict the data after the alignment and marking of the holidays, to obtain the intercity passenger flow trend feature of the future holiday; by integrating the prediction results of each single variable, the trend feature of the holiday is obtained

[0104] F. Fusion prediction: by combining the trend feature of the holiday with the spatio-temporal encoding information as the input of a fully connected network FC3 (the number of hidden layers is 3, and the dimensions of the hidden variables of each layer are 64, 256 and 64 respectively, and ReLU activation function and dropout = 0.2 Dropout layer are set between adjacent hidden layers), the intercity passenger flow prediction data of the future holiday is output The real data and prediction data of the intercity passenger flow of the future holiday are shown in Tables 2 and 3, respectively.

[0105] Table 2 Real data of intercity passenger flow during the National Day holiday

[0106]

[0107] Table 3: Forecast data of intercity passenger flow during National Day holiday

[0108]

[0109]

[0110] The description and application of the method herein are illustrative, and not intended to limit the scope of the method to the examples provided. The description of effects or advantages related thereto in the specification may not be achieved in actual experimental examples due to uncertainty of specific conditions or other factors, and the description of effects or advantages related thereto is not intended to limit the scope of the invention. Variations and changes of the embodiments disclosed herein are possible, and various components of the embodiments are known to those of ordinary skill in the art. It should be clear to those skilled in the art that the method can be implemented in other forms, structures, arrangements, proportions, and with other components, materials and parts without departing from the spirit or essential characteristics of the method. Other variations and changes of the embodiments disclosed herein can be made without departing from the scope and spirit of the method.

Claims

1. A method for predicting intercity passenger flow based on the similarity of passenger flow trends during holidays, characterized in that, Based on the similarity of passenger flow trends during different holidays, this study uses a fusion of spatiotemporal features and holiday trend features to predict intercity passenger flow during future holidays; the details are as follows: Collect intercity passenger flow data, calculate the trend feature matrix of the intercity passenger flow data based on the collected intercity passenger flow data, and fuse the trend feature matrix with the intercity passenger flow data to obtain the initial training data; Use the initial training data to obtain the visual field variable set for the future prediction period, and define the main visual field variables; The spatiotemporal variables are obtained by aggregating the information features of the main field variables in the spatial and temporal dimensions, respectively. The encoded information for each future moment is calculated based on the spatiotemporal variables and the field of vision variables, and then further transformed into spatiotemporal encoded information; Based on the similarity of passenger flow trends during different holidays, we use intercity passenger flow data to calculate the holiday feature matrix and extract the trend features of the holidays. By fusing spatiotemporal coding information with holiday trend characteristics, intercity passenger flow data for future holidays can be obtained; The method for calculating the holiday feature matrix is ​​as follows: First, for a holiday with a length of n days, the time series is X = {X} 1 ,X 2 ,...,X l ,...,X n }, X l This represents the time series value of day l of the holiday, 1 ≤ l ≤ n; Align X with the time series of a holiday with a length of m days in terms of trend, m > n, and interpolate from left to right until the number of interpolations reaches mn, resulting in the time series X': X' = {X 1 ,(X 1 +X 2 ) / 2,X 2 ,(X 2 +X 3 ) / 2,X 3 ,...,X n This allows for the alignment of two holidays of different lengths. Secondly, feature labeling is performed based on the aligned holidays. Assuming a certain day is the l-th day of a holiday of length n, feature nl is established, and dates that meet this feature are labeled as 1, while the remaining dates are labeled as 0, thus obtaining a binary holiday feature matrix HL. Extracting holiday trend features refers to using the Prophet model to fit and predict the aligned and labeled holiday data to obtain the intercity passenger flow trend features of future holidays. The Prophet model includes a trend component, a seasonal component, and a holiday component, with holiday characteristics y(t) p The calculation process is as follows: y(t p )=g(t p )+s(t p )+h(t p )+ε p Among them, g(t) p The trend feature is used to describe time t. p Non-periodic changes; s(t) p () represents the seasonal characteristic term, used to describe time t. p Periodicity; h(t) p ) = HL represents the holiday effect, used to describe the effect of a special event on time t. p The degree of influence, ε p The error term represents random variations that the model cannot explain, and it is assumed that the error follows a normal distribution. By integrating the calculation results of the Prophet model, the trend characteristics of the holiday are obtained.

2. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 1, characterized in that, Intercity passenger flow data X is represented as: Where N represents the total number of directed city pairs, T represents the time length of each directed city pair, and X... i Let i be the total number of daily population movements from the origin city to the destination city for the i-th city, where i = 1, 2, 3, ..., N. The dimension of the variable is T×N.

3. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 2, characterized in that, The trend feature matrix is ​​obtained by calculating the statistical characteristics of the predicted holiday days pd for each city pair's time series, where pd = 1, 2, 3, ..., 5. The statistical characteristics include the mean, difference, slope of the linear regression, standard deviation, day-on-day growth rate, time lag characteristics, and difference characteristics. Principal component analysis is then performed on these statistical characteristics, retaining the variance of var (90% ≤ var ≤ 95%), to obtain the trend feature matrix. Where M represents the sum of the principal component eigenvalues ​​of all variables. The dimension of the variable is M×T.

4. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 3, characterized in that, The trend feature matrix is ​​fused with intercity passenger flow data to obtain the initial training data, as follows: The trend feature matrix TF and the intercity passenger flow data X are used as inputs to the first fully connected network FC1, and the output is the initial training data.

5. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 4, characterized in that, The calculation method for the field of vision variables in the field of vision variable group is as follows: Among them, FV j FV represents the field of view variable at step j. j-1 represents the field of view variable at step j-1, t represents the prediction time period length, and DConv() refers to the dynamic convolution process; When j=1, FV j The calculation method is as follows: Where BN() represents batch normalization, ReLU() represents the activation function, and k c1 and k c2 s represents the size of the convolution kernel that produces the weight matrix. c p represents the step size. c Represents filling, Unfold(X) F ,k u ,p u ,s u ,d) means that variable X F Decompose it into multiple parts that can be used for convolution operations to obtain X. F ', X F ' represents the whole of multiple parts that can be used for convolution operations, k u This indicates that the kernel size of Unfold() is the same as the size of its dynamic kernel, s u p represents the step size. u W(X) represents the filling, d represents the expansion rate, and W(X) represents the expansion rate. F ) represents the weights obtained by dynamic convolution, Conv1() is the first one-dimensional convolution, and Conv2() is the second one-dimensional convolution; When j≠1, FV j The calculation method is as follows: Among them, Unfold(FV j-1 ,k u ,p u ,s u ,d) indicates that the variable FV j-1 It is decomposed into multiple parts that can be used for convolution operations, thus obtaining FV. j-1 ', FV j-1 ' represents the entirety of multiple parts available for convolution operations, W(FV) j-1 The weights are obtained through dynamic convolution. The field of view variable FV at step k k Defined as the primary field of view variable, where k = t / / 2.

6. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 5, characterized in that, The main field variables are aggregated in terms of information features in both spatial and temporal dimensions to obtain spatiotemporal variables. The process of aggregating information features in the spatial dimension refers to: First, a Long Short-Term Memory (LSTM) network is used to analyze the main field variable FV. k Spatial information encoding is performed to obtain T hidden variables. in, This indicates that the variable dimension is T×hiddenL, where hiddenL represents the dimension of hidden variables in the LSTM model, and cellular variables. in, and These represent the hidden state and cell state at step ti, where ti = 1, 2, 3, ..., T. and These are the hidden state and cell state of the previous step, respectively. Space-LSTM() is a long short-term memory network. Secondly, using H sl and C sl The weights are calculated and the variables CV are weighted to obtain CVs, where CVs represents the weighted variables. The calculation process is as follows: Among them, V ω W ω U ω It is a parameter matrix, ω τ Let ω represent the weighted variable at the τ-th step. τi Let ω represent the weighted variable at the τi-th step. τ ' represents the weighted variable after softmax normalization, τ takes values ​​in the range [1,T], and Tanh() is the activation function. and Let be the hidden state and the cell state at the (τ-1)th step, respectively, where CV = {CV1, ..., CV2} τ ,...,CV T }, CV τ Let CVs represent the τ-th element of CVs, where CVs = {CVs1, ..., CVs} τ ,...,CVs T }, CVs τ This represents the τ-th element of CVs. The dimension of the variable is T×N.

7. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 6, characterized in that, The main field variables are aggregated in both spatial and temporal dimensions to obtain spatiotemporal variables; the process of aggregating information features in the temporal dimension refers to: First, we use a Long Short-Term Memory (LSTM) network to encode the information of the CVs, obtaining a set of hidden variables H related to time. tl : in, in, and These are the hidden state and cell state for the current step size, ti = 1, 2, 3, ..., T. and These are the hidden state and cell state of the previous step, respectively; time-LSTM is a long short-term memory network. Secondly, the set of hidden variables at different times Information is aggregated to obtain the spatiotemporal variable Sv. The specific calculation method is as follows: Where τ = 1, 2, ..., T, express and Cosine similarity between them Let τ be the hidden state at step τ. for and Cosine similarity between them, λ τ Aggregate weights for the hidden variables at time τ, where the spatiotemporal variables are... The variable dimension is indicated by hiddenL, where hiddenL represents the dimension of hidden variables in the LSTM model.

8. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 7, characterized in that, The encoded information for each future moment is calculated based on the spatiotemporal variables and the field of view variables, and then further transformed into spatiotemporal encoded information; specifically as follows: Calculating the encoded information for each future time step refers to: First, the first LSTM model is used to perform an operation on each field-of-view variable in the field-of-view variable group. Each operation uses the initial cell state and the initial hidden state, i.e., the all-zero state. The output hidden layer variables are used as the encoding result of the first LSTM model. The encoding process of the first LSTM model is represented as follows: (H j ,C j )=share-LSTM(FV j ,H0,C0) Among them, C j and H j Let C0 and H0 represent the cell state and hidden state at step j, respectively, and let share-LSTM() represent the first LSTM model. Secondly, the encoding result of the first LSTM model is encoded a second time using the second LSTM model. The first and second LSTM models have the same structure, and the FV is then encoded. k H k , Sv and C k As input, where H k and C k For the main field of view variable FV k The hidden states and cell states obtained after encoding using the first LSTM model; The mathematical form used in the second LSTM model is: (H' k ,C' k )=main-LSTM(FV k ,H k +Sv,C k ) Among them, H k 'and C k The hidden states and cell states obtained from the second LSTM model are used as secondary encoding results. All field variables are then encoded using both the first and second LSTM models, resulting in a secondary encoding array H. set , t represents the prediction time length, hiddenL represents the dimension of hidden variables in the LSTM model, and main-LSTM() represents the second LSTM model; The spatiotemporal coding information is obtained by using a second fully connected network FC2 to process H. set The spatiotemporal encoded information is obtained by transforming the dimensions.

9. The intercity passenger flow prediction method based on the similarity of holiday passenger flow trends according to claim 8, characterized in that, By fusing spatiotemporal coding information with holiday trend characteristics, intercity passenger flow data for future holidays can be obtained; where fusing refers to integrating holiday trend characteristics... Spatiotemporal coding information As input to the third fully connected network FC3, the output is intercity passenger flow forecast data for future holidays.

Citation Information

Patent Citations

  • Urban rail transit passenger flow prediction method based on similar day selection

    CN115169638A

  • Traffic flow prediction method based on multi-feature fusion

    CN117727175A