Intercity OD passenger flow prediction method based on space-time association virtual graph

By constructing an OD virtual graph and a timing similarity virtual graph, using the feature update method of the timing similarity spatial adjacency virtual graph, the shortcomings of intercity passenger flow space-time dependence and dynamic change modeling in the existing technology are solved, and prediction accuracy and stability are improved.

CN120217282APending Publication Date: 2025-06-27SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510223044.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing technology has shortcomings in modeling the space-time dependence and complex dynamic changes of intercity passenger flow, and has failed to effectively capture the interaction between temporal and spatial characteristics, resulting in limited prediction accuracy.

Method used

The intercity OD passenger flow prediction method based on the space-time correlation virtual graph is adopted. By constructing the OD virtual graph and the time-sequence similarity virtual graph, the feature update method of the time-sequence similarity spatial adjacency virtual graph is used to realize the precise extraction and fusion of space-time features.

Benefits of technology

It improves the accuracy and stability of intercity passenger flow forecasting, especially during special periods such as holidays, which can more comprehensively capture the dynamic changes in passenger flow and maintain high prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217282A_ABST
    Figure CN120217282A_ABST
Patent Text Reader

Abstract

The invention discloses an inter-city OD passenger flow prediction method based on a space-time association virtual graph, and relates to the field of inter-city OD passenger flow prediction and big data analysis. Obtaining intercity OD passenger flow data and date information and holiday information of a corresponding time period, calculating a time code, and converting the time code to obtain a time-varying parameter; oD virtual diagrams are respectively constructed from two dimensions of a starting point and an ending point of the passenger flow data, and the OD virtual diagrams and the inter-city OD passenger flow data are mapped by using time-varying parameters to obtain initial space-time coding information; constructing a time sequence similarity virtual graph, and fusing the initial space-time coding information with the time sequence similarity virtual graph to generate a dynamic space-time parameter; global feature coding information is obtained; extracting holiday trend characteristics in the inter-city OD passenger flow data; and fusing the global feature coding information and the holiday trend features, and predicting inter-city passenger flow data in the future holiday period. The method improves the prediction accuracy and reliability, and provides scientific decision support for traffic planning and travel management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of intercity OD passenger flow prediction and big data analysis, and particularly to an intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph. Background Art

[0002] With the continuous improvement of transportation infrastructure and the increasing diversification of intercity transportation modes, the cross-city movement of people has become more frequent and convenient. Accurately predicting the spatio-temporal distribution of intercity passenger flow is not only an important basis for traffic management departments to formulate scientific dispatching strategies, but also helps to optimize the allocation of public transportation resources and improve travel efficiency. However, the spatio-temporal distribution of intercity passenger flow is affected by multiple factors, such as economic ties, geographical location, city size, holiday effects, etc., making the passenger flow exhibit complex dynamic change characteristics and increasing the prediction difficulty. Currently, data-driven prediction methods have become the mainstream, but traditional methods still have many deficiencies in modeling the spatio-temporal dependence and complex dynamic changes of intercity passenger flow.

[0003] Existing research mainly uses spatio-temporal prediction models based on deep learning. For example, graph convolutional networks (GCNs) are used to model spatial correlations, and LSTMs or GRUs are used to model temporal features. However, these methods usually process time and space features separately and fail to effectively capture the interaction between the two, resulting in limited prediction accuracy. In addition, models such as GCN mainly learn spatial relationships by updating node features, while the core of intercity passenger flow is the flow relationship between origins and destinations. Traditional GCNs are difficult to directly model the flow characteristics of OD (Origin-Destination) data, affecting the accurate prediction of intercity passenger flow. At the same time, current spatial modeling methods are mostly based on geographical adjacency relationships and do not fully consider the attribute similarity and flow trend similarity between cities, resulting in insufficient spatial feature expression ability. Therefore, there is an urgent need for an intercity passenger flow prediction method that can integrate time dynamic changes and spatial topological features and make full use of the attribute relationships between cities to improve the accuracy and stability of prediction. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide an intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph. The present invention aims to improve the accuracy of cross-city passenger flow prediction, especially during special periods such as holidays. This method constructs an OD virtual graph based on the passenger flow similarity in the fused time dimension and adopts a feature update method for the temporal similarity spatial adjacency virtual graph to achieve more accurate spatio-temporal feature extraction and fusion, so as to improve the OD passenger flow prediction accuracy.

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

[0006] An intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph proposed by the present invention includes:

[0007] Obtain intercity OD passenger flow data and the date information and holiday information corresponding to its corresponding time period, calculate a time code based on the date information and holiday information, and convert the time code to obtain a time-varying parameter;

[0008] Construct OD virtual graphs from the starting point and ending point dimensions of the passenger flow data respectively, and use the time-varying parameter to map the OD virtual graphs and the intercity OD passenger flow data to obtain initial spatio-temporal coding information;

[0009] Construct a time-series similarity virtual graph based on the similarity between different intercity OD passenger flow data in the time dimension, and fuse the initial spatio-temporal coding information with the time-series similarity virtual graph to generate dynamic spatio-temporal parameters;

[0010] Update the features of the dynamic spatio-temporal parameters from the starting point, ending point, and time dimensions of the intercity OD passenger flow data to obtain global feature coding information;

[0011] Extract the holiday trend features in the intercity OD passenger flow data;

[0012] Fuse the global feature coding information with the holiday trend features to predict the intercity passenger flow data during future holidays.

[0013] As a further optimized scheme of the intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph described in the present invention, obtain intercity OD passenger flow data and the date information and holiday information corresponding to its corresponding time period, calculate a time code based on the date information and holiday information, and convert the time code to obtain a time-varying parameter; including:

[0014] The intercity OD passenger flow data ODMs is expressed as ODMs = {ODM(t1), ODM(t2),..., ODM(t T )}, where t1, t2,..., t T represent the time representations of different days of the data, t v is the time representation of the v-th day, 1 ≤ v ≤ T, T represents the total time length of the intercity OD passenger flow data, ODM(t1), ODM(t2),..., ODM(t T ) respectively represent the OD passenger flow matrices corresponding to the times t1, t2,..., t T , ODM(t v ) is the OD passenger flow matrix corresponding to the time t v , the dimension of each passenger flow matrix is N × N, N represents the total number of cities, the rows and columns of the passenger flow matrix respectively represent the origin city O and the destination city D, and the values in the passenger flow matrix reflect the corresponding OD passenger flow volume;

[0015] The date information and holiday information corresponding to the corresponding time period of the intercity OD passenger flow data refer to: in the set of moments {t1, t2,..., t T}, each day corresponds to a unique date information and holiday information;

[0016] The calculation method of the time encoding is as follows:

[0017]

[0018] Among them, E t represents the time encoding at time t, r week represents the position of the current moment in a week, 1 ≤ r week ≤ 7, h start and h end respectively represent the start and end dates of the holiday closest to the current date, p week is the encoded value after normalizing r week , p holiday represents the position of the current moment t in the holiday, HL represents the total number of days of the holiday closest to the current date, d num is the number of days from the current date to the next holiday, which is 0 if the current date t is in the holiday, f ph represents the influence parameter before the holiday, k is the parameter controlling the influence slope, k determines the change speed of the influence with the increase of days, pre impact represents the number of days of the influence of the holiday on the days before the holiday, f hl represents the holiday length influence parameter;

[0019] The time-varying parameter is:

[0020]

[0021] Among them, L1, L2, R1, R2, and S are learnable parameters, σ is a non-linear activation function, G t is the core encoding parameter, d time is a hyperparameter representing the dimension of the core encoding parameter, P t represents the time-varying parameter, MLP(*) represents a multi-layer perceptron, represents a dimension of d time ×d time .

[0022] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph described in the present invention, OD virtual graphs are constructed respectively from the two dimensions of the starting point and the ending point of the passenger flow data, including:

[0023] For the intercity OD passenger flow data ODMs, the information is aggregated to obtain a time series from the O and D perspectives respectively. The information aggregation process from the O perspective is as follows:

[0024]

[0025] Among them, O series is the OD passenger flow generation volume of all cities at different times obtained by summing ODMs from the O perspective, Nor T () represents normalization processing in the time dimension, and respectively represent the OD passenger flow generation volumes of the i-th origin city and the j-th origin city at all times, ||||2 represents the second norm, and S O represents the result of aggregating information from the O perspective, that is, the OD passenger flow generation similarity virtual graph, represents a dimension of N×N;

[0026] The process of aggregating information from the D perspective is as follows:

[0027]

[0028] Among them, D series is the OD passenger flow attraction volume of all cities at different times obtained by summing ODMs from the D perspective, and respectively represent the OD passenger flow attraction volumes of the i-th destination city and the j-th destination city at all times, ||||2 represents the second norm, and S D represents the result of aggregating information from the D perspective, that is, the OD passenger flow attraction similarity virtual graph, S O and S D are collectively referred to as the OD virtual graph.

[0029] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph described in the present invention, mapping the OD virtual graph and the intercity OD passenger flow data using time-varying parameters to obtain the initial spatio-temporal coding information; including:

[0030] Mapping the OD virtual graph and the intercity OD passenger flow data using time-varying parameters means performing data transformation using a fully connected network, and the specific operation is as follows:

[0031] STE = FC1[concat(S O , S D , ODMs)]

[0032] Among them, FC1 represents a fully connected network using the time-varying parameter P t as the hidden unit parameter and the ReLU function as the activation function, and STE represents the initial spatio-temporal coding information, d erepresents the dimension of encoding, and concat() represents the merging operation. represents the dimension as: d e ×N×N.

[0033] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph of the present invention, a temporal similarity virtual graph is constructed, including: calculating the cosine similarity of the time series between any two OD pairs, and using the cosine similarity as the adjacency relationship between any two OD pairs, so as to obtain a spatial adjacency matrix based on temporal similarity, that is, a temporal similarity virtual graph.

[0034] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph of the present invention, a temporal similarity virtual graph is constructed, including:

[0035]

[0036] where i o and i d represent the starting city index of the intercity OD passenger flow data ODMs, j o and j d represent the starting city index of the intercity OD passenger flow data ODMs, t represents the time, and p and q represent the spatial indices of the spatial adjacency matrix SAM based on temporal similarity. SAM p,q represents the value of SAM in the p-th row and q-th column. represents the value of ODMs in the i o -th row and j o -th column at the t-th moment. represents the value of ODMs in the i d -th row and j d -th column at the t-th moment.

[0037] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph of the present invention, the initial spatio-temporal encoding information is fused with the temporal similarity virtual graph through the graph convolutional network GCN to generate dynamic spatio-temporal parameters; including:

[0038] Taking the temporal similarity virtual graph SAM as the adjacency matrix of each OD, and taking the initial spatio-temporal encoding information STE as the feature vector, so as to use GCN for information fusion.

[0039]

[0040] where represents the normalized temporal similarity virtual graph, L represents the total number of layers of virtual graph convolution, and H lr represents the feature matrix of the lr-th layer, Hlr+1 is the feature matrix of the (l_r + 1)-th layer, σ() represents the activation function ReLU, and W lr represents the learnable parameter matrix of the l_r-th layer, and the feature matrix output by the last layer is selected as the dynamic spatio-temporal parameter DST.

[0041] As a further optimization scheme of the intercity OD passenger flow prediction method based on spatio-temporal correlation virtual graph of the present invention, the dynamic spatio-temporal parameters are updated in terms of features from the origin, destination, and time dimensions of the intercity OD passenger flow data to obtain global feature encoding information, including:

[0042] Step (1), define the operation rule: Define the operation of "★" as: where the tensor E is the data to be mapped, and its dimension is d1×d2×d3. denotes the mapping operation on d1, then the input dimension I of the mapping matrix A = d1, the output dimension K is set, and the dimension of the mapping matrix A is K×I, so the "★" operation is calculated as: where A1 and A2 are both parameter matrices, and there are and J represents the intermediate hidden dimension. denotes the matrix multiplication operation on d1, σ represents the activation function, and d1, d2, d3 are the tensor dimensions. represents the dimension of J×I. is the dimension of K×J.

[0043] Step (2), feature update:

[0044] According to the operation definition in step (1), the feature update is expressed as:

[0045] E upd = DST + concat[(DST★ O W u1 ★ e W u2 ),(DST★ D W u3 ★ e W u4 )]★ e W u5

[0046] where E upd represents the operation result of the feature update. ★ O 、★ e 、★ D respectively represent the ★ operation on the origin city dimension, destination city dimension, and encoding dimension, and W u1 、Wu2 , W u3 , W u4 , and W u5 are parameter matrices for learning;

[0047] Step (3), 3D multi-head attention mechanism:

[0048] According to the operation definition in step (1), the 3D multi-head attention mechanism is expressed as:

[0049]

[0050] where E att represents the operation result of the 3D multi-head attention mechanism, represents E at the h-th layer att , H is the total number of operation layers, W a1 , W a2 , W a3 , W a4 , and W a5 are learnable parameter matrices, softm() represents the softmax operation, and O att , D att , T att respectively represent the results obtained by using the attention mechanism for the origin city dimension, destination city dimension, and time dimension;

[0051] Step (4), forward propagation:

[0052] According to the operation definition in step (1), the forward propagation operation is expressed as:

[0053] GE = (E att + E att ★ e W f1 ) ★ e W f2

[0054] GE represents the global feature encoding information, represents the dimension of τ × N × N, τ represents the length of the future time period to be predicted, and W f1 and W f2 are learnable parameter matrices.

[0055] As a further optimization scheme of the intercity OD passenger flow prediction method based on the spatio-temporal correlation virtual graph described in the present invention, extracting the holiday trend characteristics from the intercity OD passenger flow data means: using the Prophet model to fit and predict the aligned and marked data of the holidays to obtain the intercity passenger flow trend characteristics of future holidays; the Prophet model includes a trend part, a seasonal part, and a holiday part, and the calculation process of the holiday feature y(t) at time t is:

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

[0057] Among them, g(t) is the trend function at time t, which is used to describe the non-periodic changes of the time series; s(t) is the seasonal function at time t, which is used to describe the periodic changes; h(t) represents the holiday effect at time t, which is used to describe the impact of holidays on OD passenger flow, ε t is the error term at time t, ε t Used to represent random changes that cannot be explained by the Prophet model, and assuming that the error follows a normal distribution, ε t ~N(0,σ 2 ), σ is the standard deviation; by summarizing the prediction results of each OD by the Prophet model, the trend characteristics of the holiday are obtained The dimension is τ×N×N, where τ represents the length of the future time period to be predicted and N represents the total number of cities.

[0058] As a further optimization scheme of the inter-city OD passenger flow prediction method based on the spatiotemporal correlation virtual graph described in the present invention, fusing the global feature encoding information with the holiday trend feature refers to using a fully connected network FC2 to integrate the holiday trend feature Incorporate global feature encoding information Output the inter-city OD passenger flow forecast data for the future time period The dimension is τ×N×N, where τ represents the length of the future time period to be predicted and N represents the total number of cities.

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

[0060] (1) The present invention can effectively improve the accuracy of inter-city passenger flow prediction by comprehensively considering the similarity of urban attributes, historical passenger flow time series characteristics and OD flow patterns.

[0061] (2) Compared with existing methods, the spatiotemporal similarity feature aggregation strategy of the present invention can capture the dynamic changes of passenger flow more comprehensively, especially in scenarios with drastic passenger flow fluctuations such as holidays, while still maintaining a high prediction accuracy.

[0062] (3) In addition, the feature extraction and updating method based on the virtual graph makes the model adaptable to different types of urban agglomerations and different time periods, and can be widely used in intelligent traffic management, public transportation optimization, urban planning, and holiday passenger flow control. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1This is the technical flow chart of the present invention. Detailed implementation manners

[0064] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0065] To further understand the present method, the preferred implementation manners of the present method will be described below in conjunction with embodiments. However, it should be understood that these descriptions are only for further explaining the features and advantages of the present method, rather than limiting the claims of the present method. The descriptions in this part are only for typical embodiments, and the present method is not limited to the scope described in the embodiments. Combinations of different embodiments, mutual replacement of some technical features in different embodiments, and mutual replacement of the same or similar prior art means and some technical features in the embodiments are also within the scope of description and protection of the present method.

[0066] An intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph, which is based on the historical passenger flow time series characteristics and OD flow patterns, and uses dynamic spatio-temporal similarity feature aggregation and a method for updating the spatial adjacency virtual graph features based on temporal similarity to predict the intercity OD passenger flow data during future holidays; specifically as follows:

[0067] Obtain the intercity OD passenger flow data and the date information and holiday information corresponding to the corresponding time periods, calculate the time encoding based on the date information and holiday information, and further transform to obtain the time-varying parameters;

[0068] Construct OD virtual graphs from the two dimensions of the starting point and the ending point of the passenger flow respectively, and use the time-varying parameters to map the OD virtual graphs and the OD passenger flow data to obtain the initial spatio-temporal encoding information;

[0069] Construct a temporal similarity virtual graph based on the similarity between different OD passenger flows in the time dimension, and fuse the initial spatio-temporal encoding information with the temporal similarity virtual graph through the graph convolutional network GCN to generate dynamic spatio-temporal parameters;

[0070] Update the features of the dynamic spatio-temporal parameters from the dimensions of the starting point, the ending point and the time of the passenger flow based on the attention mechanism to obtain the global feature encoding information;

[0071] Extract the holiday trend features in the intercity OD passenger flow data;

[0072] Fuse the global feature encoding information with the holiday trend features to predict the intercity passenger flow data during future holidays.

[0073] In this embodiment, 26 cities in the urban agglomeration in the Yangtze River Delta region are used as the research area. The cities in the research area include Shanghai, Nanjing, Suzhou, Wuxi, Changzhou, Zhenjiang, Yangzhou, Taizhou, Yancheng, Nantong, Hangzhou, Ningbo, Jiaxing, Huzhou, Shaoxing, Jinhua, Zhoushan, Taizhou, Hefei, Wuhu, Ma'anshan, Chuzhou, Tongling, Anqing, Chizhou and Xuancheng. And the intercity OD passenger flow data of this research area from January 1, 2023 to September 28, 2023 (a total of 271 days) is used as the input data of an intercity OD passenger flow prediction method based on a spatio-temporal correlation virtual graph, and the intercity OD passenger flow during the National Day holiday from September 29, 2023 to October 6, 2023 (a total of 8 days) is used as the prediction target. The flowchart of the method is as Figure 1 shown, and specifically includes the following steps:

[0074] A. Acquisition of time-varying parameters: In the set of time instants {t1, t2,..., t T}, each time instant (day) corresponds to unique date information and holiday information. The calculation method of the time encoding is as follows:

[0075]

[0076] where, E t represents the time encoding at time t, r week represents the position of the current time in a week (from 1 to 7), h start and h end represent the start and end dates of the holiday closest to the current date respectively, p week is the encoded value after normalizing r week , p holiday represents the position of the current time t in the holiday, HL represents the total length (number of days) of the holiday closest to the current date, d num is the number of days from the current date to the next holiday (0 if the current date t is in the holiday), f ph represents the influence parameter before the holiday, k is a parameter controlling the influence slope (taking the value of 0.2 in this embodiment), which determines the change speed of the influence with the increase of the number of days, pre impact represents the number of days of the influence of the holiday on the days before the holiday (taking the value of 2 in this embodiment), f hl represents the holiday length influence parameter.

[0077] The conversion method of the time-varying parameters is as follows:

[0078]

[0079] where L1, L2, R1, R2 and S are learnable parameters, σ is a non-linear activation function, G tis the core coding parameter, d time is a hyperparameter representing the dimension of the core coding parameter (taking the value of 8 in this embodiment), P t represents the time-varying parameter, and MLP(*) represents the multi-layer perceptron, represents the dimension as: d time ×d time .

[0080] B. Spatiotemporal relationship mapping: For the intercity OD passenger flow data ODMs, the information is aggregated from the O and D dual perspectives to obtain time series. The information aggregation process from the O perspective is represented in mathematical form as:

[0081]

[0082] where, O series is the OD passenger flow generation volume of all cities at different times obtained by summing ODMs from the O perspective, (in this embodiment, the number of cities N = 26); Nor T () represents the normalization process in the time dimension, and respectively represent the OD passenger flow generation volumes of the i-th origin city and the j-th origin city at all times, || ||2 represents the second norm, and S O represents the result of aggregating information from the O perspective, that is, the OD passenger flow generation similarity virtual graph, represents the dimension as N×N;

[0083] The information aggregation process from the D perspective is represented in mathematical form as:

[0084]

[0085] where, D series is the OD passenger flow attraction volume of all cities at different times obtained by summing ODMs from the D perspective, Nor T () represents the normalization process in the time dimension, and respectively represent the OD passenger flow attraction volumes of the i-th destination city and the j-th destination city at all times, || ||2 represents the second norm, and S D represents the result of aggregating information from the D perspective, that is, the OD passenger flow attraction similarity virtual graph, S O and S D are collectively referred to as the OD virtual graph.

[0086] The mapping of OD virtual graphs and OD passenger flow data using time-varying parameters refers to using a fully connected network for data transformation. The specific operation is as follows:

[0087] STE = FC1[concat(S O ,S D ,ODMs)]

[0088] Among them, FC1 represents a fully connected network that uses the time-varying parameter P t as the hidden unit parameter and the ReLU function as the activation function. STE represents the initial spatio-temporal coding information, where d e represents the dimension of the encoding (in this embodiment, the dimension of the encoding d e = 32), concat() represents the merge operation, is of dimension: d e ×N×N;

[0089] C. Temporal similarity enhancement: By calculating the cosine similarity of the time series between any two OD pairs and using the similarity value as the adjacency relationship between any two OD pairs, a spatial adjacency matrix based on temporal similarity, that is, a temporal similarity virtual graph, can be obtained. Specifically, it can be expressed as:

[0090]

[0091] Among them, i o ,i d represents the starting city index of the intercity OD passenger flow data ODMs, j o ,j d represents the starting city index of the intercity OD passenger flow data ODMs, t represents the time, p and q represent the spatial indices of the spatial adjacency matrix SAM based on temporal similarity, SAM p,q represents the value of SAM in the p-th row and q-th column, represents the value of ODMs in the i-th o row and j o -th column at the t-th moment, represents the value of ODMs in the i-th d row and j d -th column at the t-th moment.

[0092] The fusion of the initial spatio-temporal coding information with the temporal similarity virtual graph through GCN means using the temporal similarity virtual graph SAM as the adjacency matrix of each OD and the initial spatio-temporal coding information STE as the feature vector, and then using GCN for information fusion. It can be expressed in mathematical form as:

[0093]

[0094] Among them, represents the normalized temporal similarity virtual graph, L represents the total number of layers of virtual graph convolution (in this embodiment, the total number of layers is 3, and the dimensions are: 64, 256, and 64), and H lr represents the feature matrix of the lr-th layer, and H lr+1 is the feature matrix of the (lr + 1)-th layer, σ() represents the activation function (ReLU), and W lr represents the learnable parameter matrix of the lr-th layer, and the feature matrix output by the last layer is selected as the dynamic spatio-temporal parameter DST. Among them,

[0095] D. Global feature evolution: mainly includes the following steps:

[0096] (1) Define the operation rule: Define the operation of the "★" operation as: Among them, the tensor E is the data to be mapped, and its dimension is d1×d2×d3. represents the mapping operation on d1. Then the input dimension of the mapping matrix A is I = d1, and the output dimension K is set according to needs. The dimension of the mapping matrix A is K×I. Then the "★" operation can be calculated as: Among them, both A1 and A2 are parameter matrices, and there are and J represents the intermediate hidden dimension. represents the matrix multiplication operation on d1, σ represents the activation function, and d1, d2, and d3 are the tensor dimensions. Here, only the operation rule is defined, and the dimensions can take any values. represents the dimension of J×I. is the dimension of K×J;

[0097] (2) Feature update: According to the above operation definition, the feature update can be expressed as:

[0098] E upd = DST + concat[(DST★ O W u1 ★ e W u2 ),(DST★ D W u3 ★ e W u4 )]★ e W u5

[0099] Among them, represents the operation result of feature update. ★ O 、★ e 、★ Drespectively represent performing operation ★ on the origin city dimension, destination city dimension, and coding dimension (e represents the coding dimension, i.e., d e = 32), W u1 , W u2 , W u3 , W u4 and W u5 are learnable parameter matrices;

[0100] (3) Three-dimensional multi-head attention mechanism: According to the above operation definitions, the three-dimensional multi-head attention mechanism can be expressed as:

[0101]

[0102] where E att represents the operation result of the three-dimensional multi-head attention mechanism, represents E of the h-th layer att , H is the total number of operation layers, W a1 , W a2 , W a3 , W a4 and W a5 are learnable parameter matrices, softm represents the softmax operation, O att , D att , T att respectively represent the results obtained by using the attention mechanism on the origin city dimension, destination city dimension, and time dimension (in this embodiment, the hidden layer dimension of the LSTM is 128).

[0103] (4) Forward propagation: According to the above operation definitions, the forward propagation operation can be expressed as:

[0104] GE = (E att + E att ★ e W f1 )★ e W f2

[0105] represents the global feature coding information, represents the dimension of τ × N × N, τ represents the length of the future time period to be predicted (in this embodiment, predicting the OD passenger flow for the next 8 days, i.e., τ = 8), W f1 and W f2 are learnable parameter matrices;

[0106] E. Holiday feature extraction: Use the Prophet model to fit and predict the aligned and labeled data of holidays to obtain the intercity passenger flow trend features of future holidays;

[0107] The Prophet model includes a trend part, a seasonal part, and a holiday part. The calculation process of the holiday feature y(t) at time t is as follows:

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

[0109] where g(t) is the trend function at time t, which is used to describe the non-periodic change of the time series; s(t) is the seasonal function at time t, which is used to describe the periodic change; h(t) represents the holiday effect at time t, which is used to describe the influence degree of holidays on OD passenger flow, and ε t is used to represent the random change that cannot be explained by the Prophet model, and it is assumed that the error follows a normal distribution, ε t ~N(0, σ 2 ), where σ is the standard deviation; by summarizing the prediction results of the Prophet model for each OD, the trend characteristics of the holiday are obtained

[0110] F. Fusion prediction: Through a fully connected network FC2 (in this embodiment, the fully connected network FC2 has a total of 3 hidden layers, and the dimensions of the hidden layers are 64, 256, and 64 respectively), the holiday trend characteristics are incorporated into the global feature encoding information to output the predicted data of intercity OD passenger flow in the future time period

[0111] The description and application of the present method are illustrative, and it is not intended to limit the scope of the present method to the above embodiments. The relevant descriptions of the effects or advantages involved in the specification may not be reflected in the actual experimental examples due to the uncertainty of specific condition parameters or other factors. The relevant descriptions of the effects or advantages are not used to limit the scope of the invention. The deformations and changes of the disclosed embodiments here are possible, and the substitutions and equivalent various components of the embodiments are well known to those of ordinary skill in the art. Those skilled in the art should clearly understand 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 disclosed embodiments here.

[0112] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for predicting inter-city OD passenger flow based on a spatiotemporal correlation virtual graph, characterized in that: include: Obtain inter-city OD passenger flow data and the date information and holiday information of the corresponding time period, calculate the time code based on the date information and holiday information, and convert the time code into a time-varying parameter; The OD virtual graph is constructed from the starting point and the end point of the passenger flow data, and the OD virtual graph and the inter-city OD passenger flow data are mapped using time-varying parameters to obtain the initial spatiotemporal coding information. Based on the similarity of different inter-city OD passenger flow data in the time dimension, a temporal similarity virtual graph is constructed, and the initial spatiotemporal coding information is fused with the temporal similarity virtual graph to generate dynamic spatiotemporal parameters. Update the dynamic spatiotemporal parameters from the starting point, end point and time dimension of the inter-city OD passenger flow data to obtain global feature coding information; Extract holiday trend features from inter-city OD passenger flow data; The global feature encoding information is integrated with the holiday trend features to predict the inter-city passenger flow data during future holidays.

2. According to the method of claim 1, the inter-city OD passenger flow prediction method based on the spatiotemporal correlation virtual graph is characterized in that: Obtain intercity OD passenger flow data and the date information and holiday information of the corresponding time period, calculate the time code based on the date information and holiday information, and convert the time code into time-varying parameters; including: The inter-city OD passenger flow data ODMs is represented by ODMs = {ODM(t1), ODM(t2), ..., ODM(t T )}, where t1, t2, ..., t T The time representation of different days of data, t v is the time representation of the vth day, 1≤v≤T, T represents the total time length of the inter-city OD passenger flow data, ODM(t1),ODM(t2),...,ODM(t T ) respectively represent the time periods at t1, t2, ..., t T The corresponding OD passenger flow matrix at the time, ODM(t v ) is at t v The OD passenger flow matrix corresponding to the time. The dimension of each passenger flow matrix is ​​N×N, where N represents the total number of cities. The rows and columns of the passenger flow matrix represent the starting city O and the destination city D respectively. The values ​​in the passenger flow matrix reflect the corresponding OD passenger flow. The date information and holiday information of the corresponding period of the intercity OD passenger flow data refer to: T }, each day corresponds to unique date information and holiday information; The time code is calculated as: Among them, E t represents the time code at time t, r week Indicates the current time's position in a week, 1≤r week ≤7,h start and h end Respectively represent the start and end dates of the holiday closest to the current date, p week Yes week The normalized encoding, p holiday Indicates the current time t's position in the holiday, HL indicates the total number of days of the nearest holiday to the current date, d num is the number of days from the current date to the next holiday. If the current date t is a holiday, it is 0. ph represents the impact parameter before the holiday, k is the parameter that controls the slope of the impact, and k determines the speed at which the impact changes with the number of days. impact Indicates the number of days before the holiday that the holiday affects, f hl Indicates the parameter affecting the length of vacation; The time-varying parameters are: Among them, L1, L2, R1, R2 and S are learnable parameters, σ is a nonlinear activation function, G t is the core encoding parameter, d time is a hyperparameter representing the dimension of the core encoding parameters, P t represents a time-varying parameter, MLP(*) represents a multi-layer perceptron, Indicates dimension d time ×d time .

3. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 2 is characterized in that: Construct OD virtual graphs from the starting point and end point of passenger flow data, including: For intercity OD passenger flow data ODMs, information is aggregated from both O and D perspectives to obtain time series. The aggregation process from O perspective is: Among them, O series is the OD passenger flow of all cities at different times obtained by summing up the ODMs from the perspective of O. Nor T () indicates normalization in the time dimension. and denote the OD passenger flow of the i-th starting city and the j-th starting city at all times, || ||2 denotes the second norm, S O It represents the result of aggregating information from the O perspective, that is, the virtual graph of OD passenger flow similarity. Indicates that the dimension is N×N; The process of aggregating information from the perspective of D is: Among them, D series is the OD passenger flow attracted by all cities at different times by summing up the ODMs from the perspective of D. and They represent the OD passenger flow attracted by the i-th destination city and the j-th destination city at all times, ||||2 represents the second norm, S D represents the result of aggregating information from the D perspective, i.e., the OD passenger flow attracts similar virtual graphs, S O and S D Collectively referred to as OD virtual graphs.

4. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 3 is characterized in that: The OD virtual map and inter-city OD passenger flow data are mapped using time-varying parameters to obtain initial spatiotemporal coding information; including: Mapping the OD virtual graph and intercity OD passenger flow data using time-varying parameters refers to using a fully connected network to perform data transformation. The specific operations are as follows: STE=FC1[concat(S O ,S D (ODMs)] Among them, FC1 represents the use of time-varying parameters P t As hidden unit parameters, ReLU function as the fully connected network activation function, STE represents the initial spatiotemporal encoding information, d e Indicates the dimension of the encoding, concat() indicates the merging operation, Indicates dimension: d e ×N×N.

5. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 1 is characterized in that: Constructing a temporal similarity virtual graph includes: calculating the cosine similarity of the time series between any two OD pairs, and taking the cosine similarity as the adjacency relationship between any two ODs, thereby obtaining a spatial adjacency matrix based on temporal similarity, namely, a temporal similarity virtual graph.

6. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 2 is characterized in that: Construct a temporal similarity virtual graph, including: Among them, i o 、i d represents the starting city index of inter-city OD passenger flow data ODMs, j o 、j d represents the starting city index of the inter-city OD passenger flow data ODMs, t represents the time, p and q represent the spatial index of the spatial adjacency matrix SAM based on time series similarity, SAM p,q represents the value of SAM at row p and column q, Indicates that ODMs are in the ith position at the tth moment o Row j o The value of the column, Indicates that ODMs are in the ith position at the tth moment d Row j d The value of the column.

7. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 6 is characterized in that: The initial spatiotemporal coding information is fused with the temporal similarity virtual graph through the graph convolutional network GCN to generate dynamic spatiotemporal parameters; including: The temporal similarity virtual graph SAM is used as the adjacency matrix of each OD, and the initial spatiotemporal encoding information STE is used as the feature vector, so as to use GCN for information fusion; in, represents the normalized temporal similarity virtual graph, L represents the total number of virtual graph convolution layers, and H lr represents the feature matrix of the lrth layer, H lr+1 is the feature matrix of the lr+1th layer, σ() represents the activation function ReLU, W lr represents the learnable parameter matrix of the lrth layer, and selects the feature matrix output by the last layer as the dynamic spatiotemporal parameter DST.

8. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 7 is characterized in that: Based on the attention mechanism, the dynamic spatiotemporal parameters are updated from the starting point, end point and time dimension of the inter-city OD passenger flow data to obtain global feature encoding information; including: Step (1), define the operation rules: define the operation of the "★" operation as: Among them, tensor E is the data to be mapped, and its dimension is d1×d2×d3. Indicates that a mapping operation is performed on d1, then the input dimension of the mapping matrix A is I=d1, and the output dimension is set to K. The dimension of the mapping matrix A is K×I, and the "★" operation is calculated as: Where A1 and A2 are both parameter matrices, and there are and J represents the intermediate hidden dimension, Indicates matrix multiplication operation for d1, σ represents activation function, d1, d2, d3 are tensor dimensions, Represents the dimension as J×I, To represent the dimension is K×J; Step (2), feature update: According to the operation definition in step (1), the feature update is expressed as: E upd =DST+concat[(DST★ O W u1 ★ e W u2 ),(DST★ D W u3 ★ e W u4 )]★ e W u5 Among them, E upd represents the result of feature update operation, ★ O ,★ e ,★ D Respectively represent the ★ operation on the starting city dimension, the end city dimension and the coding dimension, W u1 , W u2 , W u3 , W u4 and W u5 is the parameter matrix for learning; Step (3), 3D multi-head attention mechanism: According to the operation definition in step (1), the three-dimensional multi-head attention mechanism is expressed as: Among them, E att Represents the operation result of the three-dimensional multi-head attention mechanism, represents the E of the hth layer att , H is the total number of operation layers, W a1 , W a2 , W a3 , W a4 and W a5 is a learnable parameter matrix, softm() represents the softmax operation, O att , D att , T att They represent the results obtained by using the attention mechanism on the starting city dimension, the end city dimension, and the time dimension respectively; Step (4), forward propagation: According to the operation definition in step (1), the forward propagation operation is expressed as: GE=(E att +E att ★ e W f1 )★ e W f2 GE represents the global feature encoding information, The dimension is τ×N×N, where τ represents the length of the future time period to be predicted and W f1 and W f2 is the learnable parameter matrix.

9. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 1 is characterized in that: Extracting holiday trend features from inter-city OD passenger flow data means: using the Prophet model to fit and predict the aligned and marked data of holidays to obtain the inter-city passenger flow trend features of future holidays; The Prophet model includes trend part, seasonal part and holiday part. The calculation process of holiday feature y(t) at time t is: y(t)=g(t)+s(t)+h(t)+ε t Among them, g(t) is the trend function at time t, which is used to describe the non-periodic changes of the time series; s(t) is the seasonal function at time t, which is used to describe the periodic changes; h(t) represents the holiday effect at time t, which is used to describe the impact of holidays on OD passenger flow, ε t is the error term at time t, ε t Used to represent random changes that cannot be explained by the Prophet model, and assuming that the error follows a normal distribution, ε t ~N(0,σ 2 ), σ is the standard deviation; by summarizing the prediction results of each OD by the Prophet model, the trend characteristics of the holiday are obtained The dimension is τ×N×N, where τ represents the length of the future time period to be predicted and N represents the total number of cities.

10. The inter-city OD passenger flow prediction method based on a spatiotemporal correlation virtual graph according to claim 1, characterized in that: The fusion of global feature encoding information and holiday trend features refers to using a fully connected network FC2 to integrate the holiday trend features Incorporate global feature encoding information Output the inter-city OD passenger flow forecast data for the future time period The dimension is τ×N×N, where τ represents the length of the future time period to be predicted and N represents the total number of cities.