Urban spatiotemporal data prediction method based on time-guided causal structure learning
Through the time-guided causal structure learning method, a dynamic spatiotemporal causal graph is constructed, which solves the problem of low causal stability assumption and model generalization performance in the existing technology, and achieves more accurate and robust urban spatiotemporal data prediction.
Patent Information
- Application Number
- CN202411117220.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-15
AI Technical Summary
The existing urban spatiotemporal data prediction methods are difficult to model dynamic causal structures, resulting in low generalization performance of the model and the causal relationship changes within different time periods. The existing method assumes that the causal relationship is stable and cannot adapt to the rapidly changing urban spatiotemporal data.
A time-guided causal structure learning method is proposed, by constructing multiple series enhanced spatio-temporal causal feature extraction modules and fusion prediction modules, including causal debias modules, time-guided causal graph learners and cross-time slice causal transmission modules. Learn dynamic spatiotemporal causal graphs, establish dynamic causal associations across time slices, and obtain more robust spatiotemporal causal characteristics.
It improves the accuracy and robustness of urban spatiotemporal data prediction, enhances the generalization performance of the model, can effectively capture dynamic causal structures, and adapt to rapidly changing urban spatiotemporal data.
Smart Images

Figure CN118643949B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of spatiotemporal data mining, and specifically is a method for predicting urban spatiotemporal data based on time-guided causal structure learning. Background Art
[0002] Urban spatiotemporal data intuitively reflects the underlying rules of urban system operation in the real world. Mining valuable knowledge from urban spatiotemporal data and exploring implicit spatiotemporal dependencies can help understand and predict most social and natural phenomena, and are widely used in intelligent transportation, urban planning, health care, and environmental management.
[0003] In the prior art, most methods use spatiotemporal graph networks to handle the spatiotemporal correlation between variables (nodes). Thanks to large-scale and evenly distributed datasets, these models usually model homogeneous spatiotemporal dependencies and have good prediction performance. However, existing prediction methods all model the spatial correlation within the same time slice rather than the spatial causal association across time slices. In most cases, the spatial correlation within the same time slice is completely generated by the spatial causal association across time slices. For example, the correlation of traffic flow in two regions is introduced by the departure and arrival traffic flow between the two places in the past period of time. Modeling only this superficial intra-slice spatial correlation will reduce the generalization performance of the model.
[0004] Causality is considered a basic axiom. In the past decade, researchers have been committed to learning causal relationships from historical urban spatiotemporal data, also known as causal structure learning. The key to causal structure learning is to construct a causal graph, which connects causal nodes through directed edges to characterize the strength of causal relationships. Mainstream methods can be divided into prior-based methods, static causal-based methods, and dynamic causal-based methods. Prior-based methods use known differential equations to generate causal graphs. The CausalGNN model introduces the SIRD model as prior knowledge to model causal relationships in epidemic prediction tasks, which improves the interpretability and prediction performance of the model. However, in real scenarios, most data sets lack clear causal structures, and such models are difficult to generalize. Static causal-based methods assume that causal relationships are stable in different time periods. For example, the CCHMM model constructs a static causal graph to model the generation process of multimodal traffic flows. However, causal relationships in the real world are usually time-varying. For example, the traffic flow in the hospital area is affected by different areas at different times (weekday mornings, holidays) and presents differentiated travel patterns. The STNSCM model uses self-attention between nodes to construct a dynamic causal graph. However, without any prior knowledge, it is almost impossible for the model to learn accurate causal relationships. Generally speaking, the causal graphs between nodes in the same time period should be similar. For example, the office area should have a similar attraction to the traffic flow of the surrounding residential areas every weekday morning. Therefore, time location can be used as an effective prior knowledge to guide the generation of causal graphs.
[0005] Analyzing and solving the urban spatiotemporal data prediction problem from a causal perspective can effectively avoid the interference of spatiotemporal false correlations. Due to the complex and high-dimensional characteristics of urban spatiotemporal data, there are three challenges in applying causal theory to urban spatiotemporal data prediction tasks: (1) Restoring potential confounding factors. Confounding factors are the key to removing false correlations in spatiotemporal data. However, in real scenarios, confounding factors are often invisible. Therefore, the model needs to have the ability to mine potential confounding factors from historical observation data; (2) Capturing dynamic causal structures. Existing methods assume that causal structures are stable, which is not suitable for real scenarios. It is necessary to propose a method to model dynamic causal structures to adapt to rapidly changing urban spatiotemporal data. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention models the generation process of spatiotemporal data based on causal theory, and proposes a method for predicting urban spatiotemporal data based on time-guided causal structure learning, thereby effectively improving the accuracy, robustness and generalization of the prediction model.
[0007] The technical solution of the present invention is as follows:
[0008] A method for predicting urban spatiotemporal data based on time-guided causal structure learning, characterized by comprising the following steps:
[0009] S1: Collect historical urban spatiotemporal data in the area to be predicted, standardize the historical urban spatiotemporal data, and obtain a standard data set;
[0010] S2: construct a prediction model based on time-guided causal structure learning, the prediction model includes multiple series-connected enhanced spatiotemporal causal feature extraction modules and a fusion prediction module, each enhanced spatiotemporal causal feature extraction module includes a causal debiasing module, a time-guided causal graph learner and a cross-time slice causal transfer module;
[0011] S3: Using the standard data set to train the prediction model;
[0012] S4: Apply the trained prediction model to the prediction of future urban spatiotemporal data.
[0013] Preferably, the urban spatiotemporal data includes: passenger flow, electricity consumption or water resource consumption.
[0014] Preferably, the standardization process in S1 is: dividing the region to be predicted into N The urban spatiotemporal data of each sub-region in each time period are counted.
[0015] Preferably, the prediction model based on time-guided causal structure learning is as follows:
[0016]
[0017] in, For the t -1 period enhances the spatiotemporal causal characteristics and t Time segment enhances spatiotemporal causal characteristics The correlation model, is the predictor, Indicates t Time period city spatiotemporal data, Indicates t+ Urban spatiotemporal data predicted for 1 period.
[0018] Preferably, the causal debiasing module consists of a potential confounding estimator part and a causal intervention part; wherein the potential confounding estimator part constructs a hierarchical matrix to N The sub-regions are divided into areas with different confounding factors, and the spatiotemporal characteristics of each type of area are extracted through parallel time domain encoders; the causal intervention part passes the spatiotemporal characteristics of each type of area through independent gated recursive units, and generates unbiased spatiotemporal causal characteristics through a backdoor adjustment formula.
[0019] Preferably, the causal debiasing module includes the following model:
[0020]
[0021] Among them, confounding factors C Obeying discrete uniform distribution, p Confounding factors C Total p Class, coming soon N Sub-regions are divided into p Class area, , Indicates the input i Category Area t -1 period of urban spatiotemporal data The corresponding prediction model, where i =1,2,… p , Indicates i Category Area t The time period enhances the spatiotemporal causal characteristics, Indicates i Category Area t -1 period enhances the spatiotemporal causal characteristics, Indicates i Confounding factors, express The co-occurrence probability of .
[0022] Preferably, the spatiotemporal causal features extracted by the causal debiasing module are as follows:
[0023]
[0024] in, Indicates t The spatiotemporal causal characteristics of the time period, represents the batch normalization operation, Indicates i Category Area t The spatiotemporal causal features extracted by time periods, i =1,2,… p , Represents a matrix concatenation operation on the node dimension;
[0025]
[0026] in, Indicates i Category Area t -1 period extracted enhanced spatiotemporal causal features, represents the sigmoid activation function, , , , , and are all learnable weights, Indicates i Category Area t Urban spatiotemporal data of the time period, represents the tanh activation function, To initialize the zero matrix, represents the temporal position embedding layer, Indicates t Time period and location information, Represents element-wise matrix multiplication.
[0027] Preferably, the time-guided causal graph learner generates a causal transfer matrix, and the process is as follows:
[0028] (1) Based on and Construct the dynamic feature matrix for all regions:
[0029]
[0030] in For the t The dynamic feature matrix of all regions in the time period, For the t -1 Dynamically enhanced feature matrix for all regions in the time period, and All are projection matrices;
[0031] (2) Based on and Generate from Time period to Causal transfer matrix across time slices .
[0032] Preferably, the causal transfer process in the cross-time slice causal transfer module is as follows:
[0033] (1)
[0034] in, Indicates t The final output features of the cross-time slice causal transfer module, represents the ReLU activation function, l Indicates l Layer causal transmission, L represents the total number of causal transmission layers, Indicates The output features of the layer, , Indicates Layer network parameter weights, Indicates Layer network bias;
[0035] (2) Generating enhanced spatiotemporal causal features :
[0036] .
[0037] Preferably, the fusion prediction module takes the output of multiple series-connected enhanced spatiotemporal causal feature extraction modules as input, and generates the urban spatiotemporal data prediction results using stacked fully connected layers and Relu activation functions:
[0038]
[0039] in, For the t +1 period forecast city spatiotemporal data, , , and are all learnable parameters. For the Q Enhanced spatiotemporal causal features extracted within time periods.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention proposes a method for predicting urban spatiotemporal data based on time-guided causal structure learning. The prediction method utilizes information such as time position in urban spatiotemporal data to learn a dynamic spatiotemporal causal graph and establish dynamic causal associations across time slices, thereby constructing a spatial causal transmission process across time slices, enhancing the spatiotemporal causal representation, and obtaining more robust spatiotemporal causal features, thereby improving the accuracy of urban spatiotemporal data prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. The features and advantages of the present invention can be more clearly understood by referring to the drawings. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 It is a schematic diagram of the urban spatiotemporal data prediction method based on time-guided causal structure learning proposed in the present invention.
[0044] Figure 2 It is a schematic diagram of time domain causal intervention in the present invention. DETAILED DESCRIPTION
[0045] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0047] The present invention provides a method for predicting urban spatiotemporal data based on time-guided causal structure learning, such as Figure 1 As shown, the prediction method first collects urban spatiotemporal data within the area to be predicted and constructs a standard data set based on it; then builds a prediction model based on time-guided causal structure learning, the prediction model includes multiple serially connected enhanced spatiotemporal causal feature extraction modules and a fusion prediction module; uses the standard data set to train the prediction model; finally, applies the trained prediction model to the prediction of future urban spatiotemporal data.
[0048] Example 1
[0049] For ease of understanding, the present invention is described in more detail by taking the flow of people in a city as an example.
[0050] Step 1: Collect the passenger flow data by collecting the traffic information such as shared bicycles, taxis, and bus orders, and then standardize the passenger flow information to divide the area to be predicted into N For each sub-region, the flow of people in each time period is counted, including the number of inflows and outflows. The inflows refer to the number of people arriving at the region by various modes of transportation during the same time period, and the outflows refer to the number of people leaving the region by various modes of transportation during the same time period. This is used as the standard data set.
[0051] No. t The flow of people in all sub-regions during the period is recorded as , a total of Q The flow of people in all sub-regions during the period as a standard dataset.
[0052] Step 2: Build a prediction model based on time-guided causal structure learning (TGCSRN).
[0053] The prediction model based on time-guided causal structure learning includes multiple series-connected enhanced spatiotemporal causal feature extraction modules and a fusion prediction module, each of which includes a causal debiasing module, a time-guided causal graph learner, and a cross-time slice causal transfer module. The input historical passenger flow is stratified into clusters with different confounding factors through a potential confounding estimator in the causal debiasing module, and the spatiotemporal features of each cluster are extracted through a private encoder, and unbiased spatiotemporal causal features are constructed using backdoor adjustment. Then, through the time-guided causal graph learner, the time position information is fused to reconstruct the cross-time slice causal transfer matrix. Finally, the cross-time slice causal transfer module uses unbiased spatiotemporal causal features to input into the fusion prediction module, map to the passenger flow space, and output the predicted value.
[0054] (1) Causal debiasing module
[0055] Cause and effect diagram Figure 2 As shown, there are six variables in total. t -1 period (i.e. the previous period) passenger flow , No. t Time period (i.e. current time period) passenger flow , No. t +1 period (i.e. the next period) predicts the flow of people, t The time period (i.e. the current time period) enhances the spatiotemporal causal characteristics , No. t -1 period (i.e. the previous period) enhances the spatiotemporal causal characteristics , confounding factors C .
[0056] Through modeling Make predictions, where is a predictor that maps the learned enhanced spatiotemporal causal features of the current period to the flow space to output the predicted value, which is generally achieved through a fully connected layer. , confounding factors C Through the backdoor path exist and If the confounding factors C According to the value of the stratification is broken down into:
[0057]
[0058] in, Indicates t Time period flow, confounding factors C Obeying discrete uniform distribution, p Confounding factors C Total pClass, coming soon N Sub-regions are divided into p Class area, , Indicates the input i Category Area t -1 period of traffic The corresponding prediction model, where i =1,2,… p , Indicates i Category Area t The time period enhances the spatiotemporal causal characteristics, Indicates i Category Area t -1 period to enhance the spatiotemporal causal characteristics, Indicates i Confounding factors, express The co-occurrence probability of .
[0059] Due to the imbalance of the dataset, Confounding factors C cannot be combined with equal probability, resulting in the extracted It tends to express frequently occurring general timing dependencies. In order to eliminate false correlations, a backdoor adjustment formula is used. replace , thus cutting off Backdoor path to eliminate confounding factors C The false correlation It can be decomposed by the following formula:
[0060]
[0061] In order to Confounding factors C Fair combination, setting up confounding factors C It obeys the discrete uniform distribution, that is, , is the total number of selectable values for the confounding factors.
[0062] Since the confounding factors are not visible in the data set, the present invention designs a potential confounding estimator part to stratify the historical flow of people according to the confounding factors, and assumes a learnable stratification matrix ,in N is the total number of sub-regions. The present invention performs regularization on the hierarchical matrix based on the Gumbel Softmax method, so that only one element in each row of the hierarchical matrix is 1, and the rest of the elements are 0. Regularized hierarchical matrix The historical flow of people in each area is divided into clusters with different confounding factors. After that, the time domain causal features of each area are extracted through parallel time domain encoders. t Confounding factors within time period The value is i Spatial-temporal causal characteristics of region-like , the expression is as follows:
[0063]
[0064] in, Indicates i Category Area t -1 period extracted enhanced spatiotemporal causal features, represents the sigmoid activation function, , , , , and are all learnable weights, Indicates i Category Area t Traffic flow during the period, represents the tanh activation function, To initialize the zero matrix, represents the temporal position embedding layer, Indicates t Time period and location information.
[0065] Finally, the spatiotemporal causal features extracted from various regions are combined to obtain the t Time-space causal characteristics :
[0066]
[0067] in, t Indicates t Time period, Indicates i Category Area t The spatiotemporal causal features extracted by time periods, i =1,2,… p , represents the matrix concatenation operation on the node dimension, BatchNorm Represents batch normalization operation, which prevents gradient disappearance and speeds up model convergence.
[0068] (2) Time-guided Causal Graph Learner
[0069] How to model the dynamic nature of causal relationships and how to add prior knowledge to guide the generation of causal graphs are the keys to recovering causal relationships from human traffic. In order to model dynamic causal relationships, the present invention first generates a dynamic feature matrix for all regions:
[0070]
[0071] in For the t The dynamic feature matrix of all regions in the time period, For the t -1 Dynamically enhanced feature matrix for all regions in the time period, and Both are projection matrices.
[0072] In order to enhance the interpretability of the model and reduce the difficulty of training, the time position information matrix is used Guide the projection matrix generation process:
[0073]
[0074] in , , , is a learnable parameter, For the t Time period and location information, For the t -1 Time period location information.
[0075] First For example, the Class area to Causal Effects of Region-like As follows:
[0076]
[0077] in, express No. i OK, express No. j OK.
[0078] Use the softmax function to normalize the causal effect:
[0079]
[0080] The final generated from arrive Causal transfer matrix across time slices .
[0081] (3) Cross-time slice causal transfer module
[0082] In order to transfer the information in the spatiotemporal causal characteristics of the previous period to the current period, the present invention designs a cross-time slice causal transfer module.
[0083] First Taking the class region as an example, the causal transfer process is defined as:
[0084]
[0085] For all regions, the causal transfer process can be generalized as:
[0086]
[0087] in, Indicates t The final output features of the cross-time slice causal transfer module, represents the ReLU activation function, l Indicates l Layer causal transmission, L represents the total number of causal transmission layers, Indicates The output features of the layer, , Indicates Layer network parameter weights, Indicates Layer network bias.
[0088] Finally, the enhanced spatiotemporal causal features are generated as follows:
[0089] .
[0090] (4) Fusion prediction module.
[0091] The present invention maps the extracted enhanced spatiotemporal causal features to the human traffic space to generate a prediction result. The prediction result is generated using a stacked fully connected layer and a Relu activation function, as shown in the following formula:
[0092]
[0093] in, For the t +1 predicted flow of people during the time period, , , and are all learnable parameters. For the Q Enhanced spatiotemporal causal features extracted within the period (i.e., the last period).
[0094] The present invention uses L2-norm as the prediction loss , and designed a multi-objective loss function to train the prediction model, as shown below:
[0095]
[0096] in, represents the total loss function, is the sparseness loss, , which aims to make the causal transfer matrix sparse to prevent overfitting as a hyperparameter controlling the balance.
[0097] Step 3: Using the standard data set to train the prediction model;
[0098] Step 4: Input the historical flow of people in the area to be predicted into the trained prediction model and output the future flow of people in each area.
[0099] The New York City pedestrian flow dataset and the Xicheng District pedestrian flow dataset of Beijing are used to train the prediction model. The New York City pedestrian flow dataset used intercepts the statistical data from April 1, 2016 to June 30, 2016, and is divided into 75 sub-areas. The Xicheng District pedestrian flow dataset of Beijing intercepts the statistical data from January 1, 2021 to December 31, 2022, and is divided into 235 sub-areas. The time interval of the two datasets is 30 minutes, and the datasets are divided into training set (70%), validation set (10%), and test set (20%) in the time dimension. In this embodiment, the historical three-hour regional pedestrian flow is used to predict the regional pedestrian flow in the next 30 minutes.
[0100] The prediction model based on time-guided causal structure learning of the present invention is trained. The data is Z-score standardized, and all parameters in the prediction model based on time-guided causal structure learning are randomly initialized.
[0101] Training was performed using an Intel(R) Core(TM) i9-10980XE CPU and a GeForce RTX3090 GPU on a Linux operating system, with the batch parameter set to 64 and the initial learning rate set to 0.001.
[0102] With the help of the Adam optimization algorithm and the exponential decay dynamic learning rate strategy, the deep learning model was trained on the complete dataset for 200 cycles. The model was verified using the loss function in each training cycle, and then the optimal model was saved based on the loss function value. The Early Stopping strategy was used during the training process, and the training was terminated early when the loss function value did not decrease for 50 consecutive cycles.
[0103] The prediction results of the above embodiment are compared with the prior art, and regional passenger flow prediction is performed on the same data set. The comparison results are shown in Tables 1 and 2. The mean absolute error (MAE), root mean square error (RMSE) and mean percentage absolute error (MAPE) are used to evaluate the prediction results. The lower the error, the better the prediction effect. The present invention compares eight prediction methods in the prior art.
[0104] The first and second are two main variants of recurrent neural networks, GRU and LSTM, which capture temporal dependencies through recurrent structures but ignore the inherent effects of heterogeneity between regions and spatial correlations.
[0105] The third is STGCN, which captures spatial correlation and temporal dependency by combining one-dimensional CNN in the time domain and GCN in space.
[0106] The fourth is HGCN, which simultaneously captures spatial correlations of different scales through hierarchical GCN.
[0107] The fifth is GraphWaveNet, which mines latent spatial dependencies through an adaptive graph structure learning process.
[0108] The sixth is AGCRN, which models temporal dependencies by assigning independent parameter spaces to different regions, but lacks the process of adjusting the weights of features extracted from various regions from a causal perspective.
[0109] The seventh is DGCRN, which uses a dynamic graph generation module to model the dynamics of the traffic system, but still models the temporal dependencies of different areas under a shared space.
[0110] The eighth is DMSTGCN, which assigns a separate graph structure to each time slice within a day to model the dynamics of the traffic system and utilizes auxiliary information to improve the prediction accuracy.
[0111] It can be clearly seen from the comparison results that the prediction effect of the urban spatiotemporal data prediction method based on time-guided causal structure learning proposed in the present invention is better than that of the prior art.
[0112] Table 1 Comparison of New York City passenger flow prediction results
[0113]
[0114] Table 2 Comparison of pedestrian flow prediction results in Xicheng District, Beijing
[0115]
[0116] It can be seen from the experimental results that the prediction method of the present invention is better than the prior art.
[0117] Furthermore, the present invention conducted multiple ablation experiments to demonstrate the effectiveness of the prediction method of the present invention. The experimental results are shown in Table 3.
[0118] The present invention compares six post-ablation models.
[0119] (1) Base-model: The causal debiasing module is replaced with a single GRU, and only the distance graph is used to model spatial dependencies.
[0120] (2) w / o CDM: Replace the causal debiasing module with a single GRU.
[0121] (3) w / o causal: only use distance graph to model spatial dependence.
[0122] (4) Intra-slice causal: Construct a causal graph structure within a time slice rather than a graph structure across time slices.
[0123] (5) w / o prior: parameters for generating the region embedding matrix It is completely generated by learnable parameters and is not affected by temporal position information.
[0124] (6) static causal: Use a learnable matrix to learn a causal graph that is the same at each time step.
[0125] Table 3. Comparison of ablation experiment results on the Xicheng District dataset in Beijing
[0126]
[0127] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0128] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.
[0129] In the present invention, the terms "first", "second", "third", "fourth" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. The term "plurality" refers to two or more, unless otherwise clearly defined.
[0130] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for urban spatiotemporal data prediction based on time-guided causal structure learning, It is characterized in that The following steps are involved: S1: Collect the historical flow of people in the area to be predicted, standardize the historical flow of people, and obtain a standard data set; S2: construct a prediction model based on time-guided causal structure learning, the prediction model includes multiple series-connected enhanced spatiotemporal causal feature extraction modules and a fusion prediction module, each enhanced spatiotemporal causal feature extraction module includes a causal debiasing module, a time-guided causal graph learner and a cross-time slice causal transfer module; S3: Using the standard data set to train the prediction model; S4: Apply the trained prediction model to predict future passenger flow; The standardization process in S1 is: divide the area to be predicted into N Sub-regions, count the flow of people in each sub-region at each time period; The prediction model based on time-guided causal structure learning is as follows: in, For the t -1 period enhances the spatiotemporal causal characteristics and t Time segment enhances spatiotemporal causal characteristics The correlation model, is the predictor, Indicates t Traffic flow during the period, Indicates t+ 1. Forecasted flow of people during a period; The causal debiasing module consists of a potential confounding estimator part and a causal intervention part; wherein the potential confounding estimator part constructs a hierarchical matrix to N The sub-regions are divided into regions with different confounding factors, and the spatiotemporal features of each region are extracted through parallel time-domain encoders; the causal intervention part passes the spatiotemporal features of each region through independent gated recursive units, and generates unbiased spatiotemporal causal features through a backdoor adjustment formula; The causal debiasing module includes the following models: Among them, confounding factors C Obeying discrete uniform distribution, p Confounding factors C Total p Class, coming soon N Sub-regions are divided into p Class area, , Indicates the input i Category Area t -1 period of traffic The corresponding prediction model, where i =1,2,… p , Indicates i Category Area t The time period enhances the spatiotemporal causal characteristics, Indicates i Category Area t -1 period enhances the spatiotemporal causal characteristics, Indicates i Confounding factors, express The co-occurrence probability of The spatiotemporal causal features extracted by the causal debiasing module are as follows: in, Indicates t The spatiotemporal causal characteristics of the time period, represents the batch normalization operation, Indicates i Category Area t The spatiotemporal causal features extracted by time periods, i =1,2,… p , Represents a matrix concatenation operation on the node dimension; in, Indicates i Category Area t -1 period extracted enhanced spatiotemporal causal features, represents the sigmoid activation function, , , , , and are all learnable weights, Indicates i Category Area t The flow of people during the period, represents the tanh activation function, To initialize the zero matrix, represents the temporal position embedding layer, Indicates t Time period and location information, Represents element-by-element multiplication of matrices; The time-guided causal graph learner generates a causal transfer matrix as follows: (1) Based on and Construct the dynamic feature matrix for all regions: in For the t The dynamic feature matrix of all regions in the time period, For the t -1 Dynamically enhanced feature matrix for all regions in the time period, and All are projection matrices; (2) Based on and Generate from Time period to Causal transfer matrix across time slices ; The causal transfer process in the cross-time slice causal transfer module is as follows: (1) in, Indicates t The final output features of the cross-time slice causal transfer module, represents the ReLU activation function, l Indicates l Layer causal transmission, L represents the total number of causal transmission layers, Indicates The output features of the layer, , Indicates Layer network parameter weights, Indicates Layer network bias; (2) Generating enhanced spatiotemporal causal features : ; The fusion prediction module takes the output of multiple series-connected enhanced spatiotemporal causal feature extraction modules as input, and generates crowd flow prediction results using stacked fully connected layers and ReLU activation functions: in, For the t +1 time period predicted traffic flow, , , and are all learnable parameters. For the Q Enhanced spatiotemporal causal features extracted within time periods.
