Intercity passenger flow prediction method based on holiday and festival passenger flow trend similarity

By integrating spatiotemporal features and holiday trend features, and utilizing dynamic convolution and LSTM networks in conjunction with the Prophet model, the problem of large prediction errors in intercity passenger flow during holidays in existing technologies has been solved, achieving accurate intercity passenger flow prediction.

CN119338507AActive Publication Date: 2025-01-21SOUTHEAST UNIV
View PDF 3 Cites 0 Cited by

Patent Information

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

Smart Images

  • Figure CN119338507A_ABST
    Figure CN119338507A_ABST
Patent Text Reader

Abstract

The invention discloses an inter-city passenger flow prediction method based on holiday and festival passenger flow trend similarity, and relates to the field of inter-city passenger flow prediction. The method comprises the following steps: firstly, acquiring inter-city passenger flow data through data acquisition, calculating a trend characteristic matrix, and fusing the trend characteristic matrix and the inter-city passenger flow data to obtain initial training data; secondly, acquiring a view variable group in a future prediction period by using the initial training data, defining a main view variable, and aggregating information features in space and time dimensions to obtain a space-time variable; calculating and converting space-time coding information according to the space-time variable and the view variable group; and finally, based on holiday and festival passenger flow trend similarity features, calculating a holiday feature matrix, extracting and fusing holiday trend features, and finally obtaining an inter-city passenger flow prediction result of a future holiday. According to the invention, the prediction accuracy and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of inter-city passenger flow, in particular to an inter-city passenger flow prediction method based on holiday passenger flow trend similarity. Background Art

[0002] With the development of regional economy and urban agglomeration, the connectivity of inter-city population is increasing, forming characteristics that are completely different from the intra-city traffic demand. Due to the differences in population size, economic conditions and cultural customs among cities, the prediction of inter-city mobility has become more complicated. In addition, the existence of holiday effect further increases the difficulty of inter-city passenger flow prediction. During holidays, the demand for inter-city travel usually increases significantly, resulting in significant fluctuations in inter-city passenger flow, which brings great pressure to traffic management.

[0003] Most existing traffic demand forecasting methods rely on historical data from the same period. However, since intercity passenger flow data during holidays are usually collected annually, the occurrence of special events may lead to inconsistencies between historical data and current travel patterns. Therefore, forecasting methods that rely solely on historical data are prone to large errors and are difficult to effectively deal with passenger flow fluctuations during holidays. This requires analyzing and learning similar traffic patterns from holidays with similar passenger flow change trends, so as to better predict intercity passenger flow change trends during future holidays. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends. The present invention is based on the similarity characteristics of passenger flow change trends on different holidays, integrates spatiotemporal characteristics with the similarity of holiday passenger flow trends, and effectively improves the accuracy of inter-city passenger flow prediction during holidays.

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

[0006] According to the intercity passenger flow prediction method based on the similarity of holiday passenger flow trends proposed by the present invention, based on the similarity characteristics of passenger flow change trends on different holidays, the intercity passenger flow during future holidays is predicted by integrating spatiotemporal characteristics and holiday trend characteristics; the details are as follows:

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

[0008] Using the initial training data, obtain the horizon variable group for the future prediction period and define the main horizon variables;

[0009] Aggregate the information features of the main visual field variables in the spatial dimension and the temporal dimension to obtain the spatiotemporal variables;

[0010] Calculate the coding information of each future moment according to the spatiotemporal variables and the visual field variable group, and further transform it into spatiotemporal coding information;

[0011] Based on the similarity characteristics of passenger flow trends on different holidays, the holiday feature matrix is ​​calculated using inter-city passenger flow data and the trend characteristics of holidays are extracted;

[0012] The spatiotemporal coding information is integrated with the trend characteristics of holidays to obtain the inter-city passenger flow data for future holidays.

[0013] As a further optimization scheme of the inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to the present invention, the inter-city passenger flow data X is expressed as: Among them, N represents the total number of directed city pairs, T represents the time length of each directed city pair, and X i is the total number of people moving from the starting city to the ending city in the i-th city pair every day, i = 1, 2, 3, ..., N, Indicates that the dimension of the variable is T×N.

[0014] As a further optimization scheme of the inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, the trend feature matrix is ​​obtained by calculating the statistical features of the predicted pd days before the holiday for the time series of each city pair, pd = 1, 2, 3, ..., 5, and the statistical features include the mean value, difference, slope of linear regression, standard deviation, daily year-on-year growth rate, time lag feature and difference feature, thereby obtaining statistical feature information, and performing principal component analysis on the statistical feature information and retaining the variance of var, 90% ≤ var ≤ 95%, to obtain the trend feature matrix Among them, M represents the sum of the principal component characteristics of all variables, It indicates that the dimension of the variable is M×T.

[0015] As a further optimization scheme of the intercity passenger flow prediction method based on holiday passenger flow trend similarity described in the present invention, the trend feature matrix is ​​fused with the intercity passenger flow data to obtain initial training data, as follows: the trend feature matrix TF and the intercity passenger flow data X are used as the input of the first fully connected network FC1, and the initial training data is output

[0016] As a further optimization scheme of the inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, the calculation method of the field of view variables in the field of view variable group is as follows:

[0017]

[0018] Among them, FV jrepresents the field of view variable at step j, FV j-1 represents the field of view variable at step j-1, t represents the length of the prediction period, and DConv() refers to the process of dynamic convolution;

[0019] When j = 1, FV j The calculation method is:

[0020]

[0021] Among them, BN() represents batch normalization, ReLU() represents the activation function, and k c1 and k c2 Represents the convolution kernel size that generates the weight matrix, s c represents the step length, p c Represents filling, Unfold(X F ,k u ,p u ,s u ,d) means to change the variable X F Decompose into multiple parts for convolution operation, so as to obtain X F ', X F ' represents the whole of multiple parts available for convolution operation, k u Indicates that the convolution kernel size of Unfold() is the same as the size of its dynamic convolution kernel, s u represents the step length, p u represents filling, d represents expansion 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 The calculation method is as follows:

[0023]

[0024] Among them, Unfold(FV j-1 ,k u ,p u ,s u ,d) means to change the variable FV j-1 Decompose into multiple parts for convolution operation to obtain FV j-1 ', FV j-1 ' represents the whole of multiple parts available for convolution operation, W(FV j-1 ) is the weight obtained by dynamic convolution;

[0025] The field of view variable FV at step k k Defined as the main field of view variable, where k=t / / 2.

[0026] As a further optimization scheme of the inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, the main visual field variables are respectively aggregated in the spatial dimension and the time dimension to obtain spatiotemporal variables, wherein the information feature aggregation process in the spatial dimension refers to:

[0027] First, a long short-term memory network LSTM is used to analyze the main visual field variable FV k Encode spatial information and obtain T hidden variables in, Indicates that the variable dimension is T×hiddenL, where hiddenL represents the hidden variable dimension in the LSTM model, and the cell variable

[0028]

[0029] in, and are the hidden state and cell state of the ti-th step, ti=1,2,3,...,T, and They are the hidden state and cell state of the previous step, respectively. Space-LSTM() is a long short-term memory network.

[0030] Secondly, using H sl and C sl Calculate the weights and weight the variables CV to get CVs. CVs represents the weighted variables. The calculation process is:

[0031]

[0032] Among them, V ω , W ω , U ω is the parameter matrix, ω τ represents the weighted variable for the τth step, ω τi represents the weighted variable for the τi-th step, ω τ ' represents the weighted variable after softmax normalization, the value range of τ is [1, T], Tanh() is the activation function, and are the hidden state and cell state of the τ-1th step, respectively, where CV={CV1,...,CV τ ,...,CV T}, CV τ represents the τth element of CV, CVs={CVs1,...,CVs τ ,...,CVs T}, CVs τ represents the τth element of CVs, Indicates that the dimension of the variable is T×N.

[0033] As a further optimization scheme of the inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, the main visual field variables are aggregated in the spatial dimension and the time dimension to obtain spatiotemporal variables; wherein the information feature aggregation process in the time dimension refers to:

[0034] First, we use a long short-term memory network LSTM to encode the information of CVs and obtain a hidden variable set H about time. tl : in,

[0035]

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

[0037] Secondly, for the hidden variable set at different times Information aggregation is performed to obtain the spatiotemporal variable Sv. The specific calculation method is as follows:

[0038]

[0039] Where τ=1,2,...,T, express and The cosine similarity between is the hidden state of the τth step, for and The cosine similarity between τ is the hidden variable aggregation weight at time τ, where the spatiotemporal variables Indicates that the variable dimension is hiddenL, which represents the hidden variable dimension in the LSTM model.

[0040] As a further optimization scheme of the inter-city passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, the coding information of each future moment is calculated according to the spatiotemporal variables and the view variable group, and further converted into spatiotemporal coding information; specifically as follows:

[0041] Calculating the encoded information at each future moment means:

[0042] First, the first LSTM model is used to perform an operation on each visual field variable in the visual field variable group. Each operation uses the initial cell state and the initial hidden state, that is, the all-zero state, and the output hidden layer variable is used as the encoding result of the first LSTM model. The encoding process of the first LSTM model is expressed as:

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

[0044] Among them, C j and H j Represent the cell state and hidden state of the jth step respectively, C0 and H0 represent the initial cell state and initial hidden state respectively, and share-LSTM() represents the first LSTM model;

[0045] Secondly, the second LSTM model is used to re-encode the encoding result of the first LSTM model. The structure of the first LSTM model and the second LSTM model are exactly the same. k , H k , Sv and C k As input, H k and C k is the main field of view variable FV k The hidden state and cell state obtained after encoding using the first LSTM model;

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

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

[0048] Among them, H k ' and C k ' is the hidden state and cell state obtained by the second LSTM model. As the secondary encoding result, all the visual field variables are encoded by the first LSTM model and the second LSTM model to obtain a secondary encoding array H set , t represents the predicted time length, hiddenL represents the hidden variable dimension in the LSTM model, and main-LSTM() represents the second LSTM model;

[0049] The spatiotemporal coding information is obtained by using a second fully connected network FC2 to set The dimension is transformed to obtain the space-time encoding information

[0050] As a further optimization scheme of the intercity passenger flow prediction method based on the similarity of holiday passenger flow trends described in the present invention, based on the similarity characteristics of passenger flow change trends on different holidays, the holiday feature matrix is ​​calculated using intercity passenger flow data and the trend characteristics of the holiday are extracted; wherein,

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

[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 X with the holiday time series of m days in terms of change trend, m>n, and interpolate from left to right until the number of interpolation reaches mn, the obtained time series X' is: X'={X 1 ,(X 1 +X 2 ) / 2,X 2 ,(X 2 +X 3 ) / 2,X 3 ,...,X n}, thereby aligning two holidays of different lengths;

[0053] Secondly, feature marking is performed based on the aligned holidays. Assuming that a certain day is the lth day of a holiday with a length of n, feature nl is established, and dates that meet this feature are marked as 1, and the rest of the dates are marked as 0, thereby obtaining a binary holiday feature matrix HL; extracting holiday trend features means using the Prophet model to fit and predict the aligned and marked holiday data to obtain the inter-city passenger flow trend features of future holidays;

[0054] The Prophet model includes trend part, seasonal part and holiday part. The holiday feature y(t p )The calculation process is:

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

[0056] Among them, g(t p) is a trend feature term used to describe time t p The non-periodic change of s(t p ) is a seasonal characteristic term, used to describe the time t p Periodic characteristics; h(t p )=HL represents the holiday effect, which is used to describe the impact of special events on time t p The degree of influence, ε p is the error term, representing the random changes that cannot be explained by the model, and assuming that the error follows a normal distribution; by integrating the calculation results of the Prophet model, the trend characteristics of the holiday are obtained

[0057] As a further optimization scheme of the inter-city passenger flow prediction method based on holiday passenger flow trend similarity described in the present invention, the spatiotemporal coding information is fused with the trend characteristics of the holiday to obtain the inter-city passenger flow data of the future holiday; wherein, fusion refers to the process of combining the trend characteristics of the holiday Information encoded in space and time As the input of the third fully connected network FC3, the inter-city passenger flow forecast data for future holidays is output

[0058] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0059] The present invention not only takes into account the temporal and spatial characteristics of intercity passenger flow, but also effectively captures the changing patterns of intercity passenger flow by identifying the trend similarities between holidays, thereby achieving accurate prediction of intercity passenger flow during holidays, effectively making up for the error defects of the prior art, being more in line with actual conditions, and being convenient for engineering practice applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a technical flow chart of the present invention. DETAILED DESCRIPTION

[0061] In order to further understand the present method, the preferred embodiments of the present method are described below in conjunction 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 on the claims of the present method. The description in this section is only for typical examples, and the present method is not limited to the scope of the examples. The combination of different examples, the mutual replacement of some technical features in different examples, and the mutual replacement of the same or similar prior art means with some technical features in the examples are also within the scope of the description and protection of the present method.

[0062] A method for predicting inter-city passenger flow based on the similarity of holiday passenger flow trends is proposed. Based on the similarity characteristics of passenger flow change trends on different holidays, the inter-city passenger flow during future holidays is predicted by integrating spatiotemporal characteristics and holiday trend characteristics. The details are as follows:

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

[0064] Using the initial training data, obtain the horizon variable group for the future prediction period and define the main horizon variables;

[0065] Aggregate the information features of the main visual field variables in the spatial dimension and the temporal dimension to obtain the spatiotemporal variables;

[0066] Calculate the coding information of each future moment according to the spatiotemporal variables and the visual field variable group, and further transform it into spatiotemporal coding information;

[0067] Based on the similarity characteristics of passenger flow trends on different holidays, the holiday feature matrix is ​​calculated using inter-city passenger flow data and the trend characteristics of holidays are extracted;

[0068] The spatiotemporal coding information is integrated with the trend characteristics of holidays to obtain the inter-city passenger flow data for future holidays.

[0069] This embodiment uses the intercity passenger flow data (including 1568 city pairs) from January 1, 2023 to September 28, 2023 (a total of 271 days) as input data for an intercity passenger flow prediction method that integrates spatiotemporal characteristics with the similarity of holiday passenger flow trends, as shown in Table 1, and takes the intercity passenger flow during the National Day holiday from September 29, 2023 to October 6, 2023 as the prediction target. The flow chart of the method is as follows Figure 1 As shown, the specific steps include:

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

[0071]

[0072]

[0073] A. Trend feature fusion: In this embodiment, the inter-city passenger flow data is shown in the table. The inter-city passenger flow data can be expressed in mathematical form as follows: Among them, 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 who moved from the starting city to the end city of the ith city pair every day (a total of 271 days) was recorded; the trend feature matrix was obtained by calculating the statistical characteristics of the three days before the predicted holiday (taking pd = 3) for the time series of each city pair, including the mean, difference, slope of linear regression, standard deviation, daily month-on-month growth rate, time lag characteristics and difference characteristics, and then the statistical feature information was obtained by performing principal component analysis on the statistical feature information and retaining 95% of the variance to obtain 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 refers to taking the trend feature matrix TF and the intercity passenger flow data X as the input of the fully connected network FC1 (the number of hidden layers is 3, the dimensions of the hidden variables in 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) to output the initial training data

[0074] B. Calculate the visual field variable: The method for calculating the visual field variable is as follows:

[0075]

[0076] Among them, FV i represents the field of view variable of the i-th step, t=8 represents the number of days of prediction (the number of days of the National Day holiday: 8 days), DConv refers to the process of dynamic convolution, when j=1, FV j The calculation method is:

[0077]

[0078] Among them, BN() represents batch normalization, ReLU() represents the activation function, and k c1 and k c2 represents the convolution kernel size that generates the weight matrix, K=3 represents the convolution kernel size of dynamic convolution, s c represents the step length, p c Represents filling, Unfold(X F ,k u ,p u ,s u ,d) means to change the variable X F Decompose into multiple parts for convolution operation, so as to obtain X F ', X F ' represents the whole of multiple parts available for convolution operation, k u Indicates that the convolution kernel size of Unfold() is the same as the size of its dynamic convolution kernel, s u represents the step length, p u represents filling, d represents expansion 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] When j≠1, FV j The calculation method is as follows:

[0080]

[0081] Among them, Unfold(FV j-1 ,k u ,p u ,s u ,d) means to change the variable FV j-1 Decompose into multiple parts for convolution operation to obtain FV j-1 ', FV j-1 ' represents the whole of multiple parts available for convolution operation, W(FV j-1 ) is the weight obtained by dynamic convolution; the field of view variable FV of step k k Defined as the main visual field variable, where k = t / / 2, i.e. k = 4;

[0082] C. Time and space aggregation:

[0083] First, the information feature aggregation process is performed in the spatial dimension, which means that a long short-term memory network (LSTM) is used to aggregate the main visual field variable FV k Encode the information and obtain T (271) hidden variables in (hiddenL=64 represents the hidden variable dimension in the LSTM model) and cell variables in It can be briefly expressed as:

[0084]

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

[0086] Secondly, using H sl and C sl Calculate the weights and weight the variables CV to get CVs. CVs represents the weighted variables. The calculation process is:

[0087]

[0088] Among them, V ω , W ω , U ω is the parameter matrix, ω τ represents the weighted variable for the τth step, ω τi represents the weighted variable for the τi-th step, ω τ ' represents the weighted variable after softmax normalization, the value range of τ is [1, T], Tanh() is the activation function, and are the hidden state and cell state of the τ-1th step, respectively, where CV={CV1,...,CV τ ,...,CV T}, CV τ represents the τth element of CV, CVs={CVs1,...,CVs τ ,...,CVs T}, CVs τ represents the τth element of CVs, Indicates that the dimension of the variable is T×N.

[0089] Then, the information feature aggregation process in the time dimension means first using a long short-term memory network LSTM to encode the CVs information and obtain a hidden variable set H about time. tl : in,

[0090]

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

[0092] Secondly, for the hidden variable set at different times Information aggregation is performed to obtain the spatiotemporal variable Sv. The specific calculation method is as follows:

[0093]

[0094] Where τ=1,2,...,T, express and The cosine similarity between is the hidden state of the τth step, for and The cosine similarity between τ is the hidden variable aggregation weight at time τ, where the spatiotemporal variables Indicates that the variable dimension is hiddenL, which represents the hidden variable dimension in the LSTM model.

[0095] D. Spatiotemporal coding: Calculating the coding information for each future moment means first using the first LSTM model to perform an operation on each view variable in the view variable group. Each operation uses the initial cell state and the initial hidden state, that is, the all-zero state, and uses the output hidden layer variable as the coding result of the first LSTM model. The coding process of the first LSTM model is expressed as:

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

[0097] Among them, C j and H j Represent the cell state and hidden state of the jth step respectively, C0 and H0 represent the initial cell state and initial hidden state respectively, and share-LSTM() represents the first LSTM model;

[0098] Secondly, the main visual field variable FV k The LSTM encoding result of the first LSTM model is re-encoded using the second LSTM model. The structures of the first LSTM model and the second LSTM model are exactly the same. k , H k , Sv and C k As input, H k and C k is the main field of view variable FV k The hidden state and cell state obtained after encoding the second LSTM model;

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

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

[0101] Among them, H k ' and C k' is the hidden state and cell state obtained by the second LSTM model. As the secondary encoding result, all the visual field variables are encoded by the first LSTM model and the second LSTM model to obtain a secondary encoding array H set , t represents the predicted time length, hiddenL represents the hidden variable dimension in the first LSTM model and the second LSTM model, and main-LSTM() represents the second LSTM model;

[0102] The spatiotemporal coding information is obtained by using a second fully connected network FC2 (in this embodiment, the second fully connected network FC2 only includes one linear layer) to set The dimension is transformed to obtain the space-time 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 expressed as Align the Labor Day holiday with the National Day holiday, which is 8 days long, in terms of change trends, and interpolate from left to right until the number of interpolations reaches 3. The resulting time series is: Thus, two holidays of different lengths are aligned; secondly, the aligned holidays are marked with features. Assuming that a certain day is the i-th day of a holiday with a length of n, the feature "ni" is established, and the dates that meet this feature are marked as 1, and the rest of the dates are marked as 0, thus obtaining a binary holiday feature matrix HL; finally, the Prophet model is used to fit and predict the aligned and marked holiday data to obtain the inter-city passenger flow trend characteristics of future holidays; by integrating the prediction results of each single variable, the trend characteristics of the holiday are obtained

[0104] F. Fusion prediction: by incorporating the trend features of holidays Information encoded in space and time As the input of a fully connected network FC3 (the number of hidden layers is 3, the dimensions of the hidden variables in 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), the output is the inter-city passenger flow forecast data for the future holidays The actual and predicted data of intercity passenger flow during future holidays are shown in Table 2 and Table 3 respectively.

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

[0106]

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

[0108]

[0109]

[0110] The description and application of the present method here are illustrative, and it is not intended to limit the scope of the present method to the above-mentioned embodiments. The related descriptions of the effects or advantages involved in the specification may not be reflected in the actual experimental examples due to the uncertainty of the specific condition parameters or other factors, and the related descriptions of the effects or advantages are not used to limit the scope of the invention. The deformation and changes of the embodiments disclosed here are possible, and the replacement of the embodiments and the various equivalent parts are well known to those of ordinary skill in the art. It should be clear to those skilled in the art that, without departing from the spirit or essential characteristics of the present method, the present method can be implemented in other forms, structures, arrangements, proportions, and with other components, materials and parts. Without departing from the scope and spirit of the present method, other deformations and changes can be made to the embodiments disclosed here.

Claims

1. A method for predicting inter-city passenger flow based on similarity of holiday passenger flow trends, characterized in that: Based on the similarity characteristics of passenger flow change trends during different holidays, the intercity passenger flow during future holidays is predicted by integrating spatiotemporal characteristics and holiday trend characteristics; the details are as follows: Collect intercity passenger flow data, and calculate the trend feature matrix of the intercity passenger flow data based on the collected intercity passenger flow data; merge the trend feature matrix with the intercity passenger flow data to obtain initial training data; Using the initial training data, obtain the horizon variable group for the future prediction period and define the main horizon variables; Aggregate the information features of the main visual field variables in the spatial dimension and the temporal dimension to obtain the spatiotemporal variables; Calculate the coding information of each future moment according to the spatiotemporal variables and the visual field variable group, and further transform it into spatiotemporal coding information; Based on the similarity characteristics of passenger flow trends on different holidays, the holiday feature matrix is ​​calculated using inter-city passenger flow data and the trend characteristics of holidays are extracted; The spatiotemporal coding information is integrated with the trend characteristics of holidays to obtain the inter-city passenger flow data for future holidays.

2. The inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to claim 1 is characterized in that: The intercity passenger flow data X is expressed as: Among them, N represents the total number of directed city pairs, T represents the time length of each directed city pair, and X i is the total number of people moving from the starting city to the ending city in the i-th city pair every day, i = 1, 2, 3, ..., N, Indicates that the dimension of the variable is T×N.

3. The inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to claim 2 is characterized in that: The trend feature matrix is ​​obtained by calculating the statistical features of the predicted pd days before the holiday for each city pair time series, pd = 1, 2, 3, ..., 5, and the statistical features include the mean, difference, slope of linear regression, standard deviation, daily year-on-year growth rate, time lag features and differential features, thereby obtaining statistical feature information. The trend feature matrix is ​​obtained by performing principal component analysis on the statistical feature information and retaining the variance of var, 90% ≤ var ≤ 95%. Among them, M represents the sum of the principal component characteristics of all variables, It indicates that the dimension of the variable is M×T.

4. The inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to claim 3 is characterized in that: The trend feature matrix is ​​integrated with the 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 the input of the first fully connected network FC1, and the initial training data is output 5. The method for predicting inter-city passenger flow based on similarity of holiday passenger flow trends according to claim 4, characterized in that: The calculation method of the visual field variable in the visual field variable group is as follows: Among them, FV j represents the field of view variable at step j, FV j-1 represents the field of view variable at step j-1, t represents the length of the prediction period, and DConv() refers to the process of dynamic convolution; When j = 1, FV j The calculation method is: Among them, BN() represents batch normalization, ReLU() represents the activation function, and k c1 and k c2 Represents the convolution kernel size that generates the weight matrix, s c represents the step length, p c Represents filling, Unfold(X F ,k u ,p u ,s u ,d) means to change the variable X F Decompose into multiple parts for convolution operation, so as to obtain X F ', X F ' represents the whole of multiple parts available for convolution operation, k u Indicates that the convolution kernel size of Unfold() is the same as the size of its dynamic convolution kernel, s u represents the step length, p u represents filling, d represents expansion 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; When j≠1, FV j The calculation method is as follows: Among them, Unfold(FV j-1 ,k u ,p u ,s u ,d) means to change the variable FV j-1 Decompose into multiple parts for convolution operation to obtain FV j-1 ', FV j-1 ' represents the whole of multiple parts available for convolution operation, W(FV j-1 ) is the weight obtained by dynamic convolution; The field of view variable FV at step k k Defined as the main field of view variable, where k=t / / 2.

6. The method for predicting inter-city passenger flow based on holiday passenger flow trend similarity according to claim 5, characterized in that: The main visual field variables are aggregated in the spatial dimension and the temporal dimension to obtain the spatiotemporal variables. The information feature aggregation process in the spatial dimension refers to: First, a long short-term memory network LSTM is used to analyze the main visual field variable FV k Encode spatial information and obtain T hidden variables in, Indicates that the variable dimension is T×hiddenL, where hiddenL represents the hidden variable dimension in the LSTM model, and the cell variable in, and are the hidden state and cell state of the ti-th step, ti=1,2,3,...,T, and They 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 Calculate the weights and weight the variables CV to get CVs. CVs represents the weighted variables. The calculation process is: Among them, V ω , W ω , U ω is the parameter matrix, ω τ represents the weighted variable for the τth step, ω τi represents the weighted variable for the τi-th step, ω τ' represents the weighted variable after softmax normalization, the value range of τ is [1, T], Tanh() is the activation function, and are the hidden state and cell state of the τ-1th step, respectively, where CV={CV1,...,CV τ ,...,CV T }, CV τ represents the τth element of CV, CVs={CVs1,...,CVs τ ,...,CVs T }, CVs τ represents the τth element of CVs, Indicates that the dimension of the variable is T×N.

7. The inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to claim 6, characterized in that: The main visual field variables are aggregated in the spatial dimension and the temporal dimension to obtain the spatiotemporal variables; wherein the information feature aggregation process in the temporal dimension refers to: First, we use a long short-term memory network LSTM to encode the information of CVs and obtain a hidden variable set H about time. tl : in, in, and are the hidden state and cell state of the current step, ti=1,2,3,...,T, and They are the hidden state and cell state of the previous step, respectively. Time-LSTM is a long short-term memory network. Secondly, for the hidden variable set at different times Information aggregation is performed to obtain the spatiotemporal variable Sv. The specific calculation method is as follows: Where τ=1,2,...,T, express and The cosine similarity between is the hidden state of the τth step, for and The cosine similarity between τ is the hidden variable aggregation weight at time τ, where the spatiotemporal variables Indicates that the variable dimension is hiddenL, which represents the hidden variable dimension in the LSTM model.

8. The method for predicting inter-city passenger flow based on similarity of holiday passenger flow trends according to claim 7, characterized in that: The coding information of each future moment is calculated based on the spatiotemporal variables and the visual field variable group, and further converted into spatiotemporal coding information; the details are as follows: Calculating the encoded information at each future moment means: First, the first LSTM model is used to perform an operation on each visual field variable in the visual field variable group. Each operation uses the initial cell state and the initial hidden state, that is, the all-zero state, and the output hidden layer variable is used as the encoding result of the first LSTM model. The encoding process of the first LSTM model is expressed as: (H j ,C j )=share-LSTM(FV j ,H0,C0) Among them, C j and H j Represent the cell state and hidden state of the jth step respectively, C0 and H0 represent the initial cell state and initial hidden state respectively, and share-LSTM() represents the first LSTM model; Secondly, the second LSTM model is used to re-encode the encoding result of the first LSTM model. The structure of the first LSTM model and the second LSTM model are exactly the same. k , H k , Sv and C k As input, H k and C k is the main field of view variable FV k The hidden state and cell state obtained after encoding using the first LSTM model; The mathematical form used by 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 ' is the hidden state and cell state obtained by the second LSTM model. As the secondary encoding result, all the visual field variables are encoded by the first LSTM model and the second LSTM model to obtain a secondary encoding array H set , t represents the predicted time length, hiddenL represents the hidden variable dimension 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 set The dimension is transformed to obtain the space-time encoding information 9. The method for predicting inter-city passenger flow based on similarity of holiday passenger flow trends according to claim 8, characterized in that: Based on the similarity characteristics of passenger flow change trends on different holidays, the holiday feature matrix is ​​calculated using inter-city passenger flow data and the trend characteristics of holidays are extracted; The calculation method of the holiday feature matrix is: 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 X with the holiday time series of m days in terms of change trend, m>n, and interpolate from left to right until the number of interpolation reaches mn, the obtained time series X' is: X'={X 1 ,(X 1 +X 2 ) / 2,X 2 ,(X 2 +X 3 ) / 2,X 3 ,...,X n }, thereby aligning two holidays of different lengths; Secondly, feature marking is performed based on the aligned holidays. Assuming that a certain day is the lth day of a holiday with a length of n, feature nl is established, and dates that meet this feature are marked as 1, and the rest of the dates are marked as 0, thereby obtaining a binary holiday feature matrix HL; extracting holiday trend features means using the Prophet model to fit and predict the aligned and marked holiday data to obtain the inter-city passenger flow trend features of future holidays; The Prophet model includes trend part, seasonal part and holiday part. The holiday feature y(t p )The calculation process is: y(t p )=g(t p )+s(t p )+h(t p )+ε p Among them, g(t p ) is a trend feature term used to describe time t p The non-periodic change of s(t p ) is a seasonal characteristic term, used to describe the time t p Periodic characteristics; h(t p )=HL represents the holiday effect, which is used to describe the impact of special events on time t p The degree of influence, ε p is the error term, representing the random changes that cannot be explained by the model, and assuming that the error follows a normal distribution; by integrating the calculation results of the Prophet model, the trend characteristics of the holiday are obtained 10. The inter-city passenger flow prediction method based on holiday passenger flow trend similarity according to claim 9, characterized in that: The spatiotemporal coding information is integrated with the trend characteristics of the holiday to obtain the inter-city passenger flow data for the future holiday. Fusion refers to integrating the trend characteristics of the holiday Information encoded in space and time As the input of the third fully connected network FC3, the inter-city passenger flow forecast data for future holidays is output

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

  • Forecasting long duration floating holidays in online traffic

    US11775936B1