Population mobility OD matrix prediction method
By building multiple spatiotemporal graphs and using three-dimensional graph convolution networks and Transformer modules, the problem of stepwise prediction error and poor parallelism in population mobility OD matrix prediction is solved, and more accurate and efficient spatiotemporal relationship modeling and long Sequence prediction.
Patent Information
- Application Number
- CN202411165839.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art has problems such as step-by-step prediction error accumulation, memory limitation, poor parallelism and difficulty in adapting to irregular space division in population mobility OD matrix prediction, and traditional models are difficult to effectively extract spatio-temporal relationships.
By constructing multiple space-time graphs with different adjacency matrices, using a three-dimensional graph convolution network to extract features, and combining with the Transformer module for encoding and decoding, position encoding and time encoding, and finally output long-term time features for prediction.
It improves the accuracy and efficiency of population mobility OD matrix prediction, supports irregular spatial division, reduces error accumulation, enhances the spatial-temporal relationship extraction ability and long-sequence prediction ability, and improves the parallelism and computing efficiency of the model.
Smart Images

Figure CN119066391A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of population mobility prediction, and in particular to a population mobility OD matrix prediction method. Background Art
[0002] Population mobility refers to the short-term, periodic displacement of population between subspaces within a certain urban space range within a certain period of time. The application value of population mobility prediction in travel flow prediction, traffic accident prediction, traffic route planning, urban emergency management, urban simulation and other problems makes it have important application significance in the fields of traffic management, infectious disease control and urban simulation.
[0003] Origin-Destination (OD) flow is a key indicator that visualizes the abstract population mobility. The definition of OD flow is: for a certain urban space divided into multiple areas, the number of individuals who flow between each two areas as a whole, aggregated from scattered OD trajectory data. The OD flow of all areas within a period of time is often represented by an overall OD matrix, such as Figure 1 shown.
[0004] With the development of mobile devices and digital technology, terminals such as smartphones, vehicle navigation systems, and traffic sensors have generated a large amount of urban population mobility data. In particular, the user's mobile phone signaling data collected through mobile applications on smartphones can easily obtain large-scale, fine-grained, and unbiased OD trajectory data. The increase in such fine-grained data has put forward higher requirements for the accuracy and efficiency of population mobility prediction.
[0005] First, traditional population mobility prediction mainly studies the overall population inflow and outflow of a region, while in actual applications, the OD matrix prediction of population flow between specific regions is often more valuable. Secondly, traditional population mobility sequence prediction only predicts the next time step information of the input sequence, but in actual application scenarios, the application value of only predicting a single time step is limited, and the model needs to have the ability to predict long-term future sequences. With the continuous increase in data collected by mobile devices and the increasing demand for fine-grained population mobility prediction, the long-term series prediction of the OD matrix has become an urgent problem to be solved.
[0006] In recent years, deep learning methods have made great progress in the field of population mobility prediction. At present, the most common deep learning method for OD matrix prediction is a model that combines a recurrent neural network (RNN) for extracting temporal features and a convolutional neural network (CNN) for extracting spatial features. However, due to the inherent reasons of its network structure, the RNN-based model has the problem of error accumulation in step-by-step prediction, memory limitations that make it difficult to learn data from distant times, and poor parallelism. At the same time, the CNN-based model is only suitable for regular grid space division and is difficult to apply to many real-world application scenarios. Simply combining the two models is difficult to extract complex spatiotemporal relationships. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a population mobility OD matrix prediction method with high accuracy.
[0008] The purpose of the present invention can be achieved by the following technical solutions:
[0009] A population mobility OD matrix prediction method, the method comprising:
[0010] Based on the historical OD flow information and regional information, multiple spatiotemporal graphs with different adjacency matrices are constructed;
[0011] For each spatiotemporal graph, a three-dimensional graph convolutional network is constructed to extract features, and the feature extraction results of all spatiotemporal graphs are fused to obtain the spatiotemporal extraction results.
[0012] The spatiotemporal extraction results are embedded in blocks, and the results after the block embedding processing are position-encoded and time-encoded, and the input data is obtained after fusion;
[0013] A Transformer module based on an encoder and decoder architecture is used to extract long-term temporal features from the input data, and the decoder outputs the final prediction result.
[0014] Preferably, the space-time graph includes a space-time graph based on historical OD flows and a space-time graph based on geographic proximity between regions.
[0015] Preferably, after constructing a plurality of spatiotemporal graphs with different adjacency matrices, the method further comprises:
[0016] If there is no self-loop in the adjacency matrix of the original space-time graph, a self-loop is added, and the adjacency matrix after adding the self-loop is subjected to Laplace regularization. If there is a self-loop in the adjacency matrix of the original space-time graph, Laplace regularization is directly performed.
[0017] For the spatiotemporal graph based on historical OD flows, the regional correlation matrix with the same departure point and the regional correlation matrix with the same destination are captured through Laplace regularization.
[0018] Preferably, for each spatiotemporal graph, a three-dimensional graph convolutional network is constructed to extract features, specifically including:
[0019] A hierarchical rule-based spatial domain method is used to propagate features on the spatiotemporal graph, and neighboring node information is extracted from the spatiotemporal graph based on historical OD flows;
[0020] According to the output after feature propagation, a three-dimensional graph convolutional network is used to capture the spatial and temporal dependencies at the same time. The calculation expression is:
[0021]
[0022] Where: H (l+1) is the output of the l+1th 3D graph convolutional layer; σ is the activation function; Z (l+1) is the output after feature propagation, which serves as the input of the l+1th 3D graph convolutional layer; is the three-dimensional convolution kernel of the l+1th layer, C (l) is the number of channels per layer, 2k t +1 is the size of the three-dimensional convolution kernel of the l+1th layer in the time dimension; the superscript t corresponds to the time period.
[0023] Preferably, the spatial domain method based on hierarchical rules is used to perform feature propagation on the space-time graph, and the calculation expression is:
[0024]
[0025] Where: It is the input of the l+1th graph convolutional layer; They are the regional correlation matrix with the same departure point and the regional correlation matrix with the same destination captured from the spatiotemporal graph based on historical OD flows, respectively; is the correlation matrix captured from other spatiotemporal graphs.
[0026] Preferably, embedding the spatiotemporal extraction results in blocks is specifically as follows:
[0027] Extract the time-space results Flattened to Will The size is mapped to PN p , decompose the result after size mapping into N p non-overlapping fragments of dimension P, the set of non-overlapping fragments p=1,…,Np The projection is processed by a one-dimensional convolution filter into the first vector d model is the vector dimension.
[0028] Preferably, the result after the block embedding process is position-encoded and time-encoded, and the input data is obtained after fusion, specifically:
[0029] Position encoding is performed on the result after the block embedding process to capture the local position information of the time series, and the position encoding learns the context information through sine and cosine functions;
[0030] Temporally encoding the position-encoded data to capture information in global temporal features, wherein the temporal encoding is performed through a learnable embedding function;
[0031] The first vector, the position encoding result and the time encoding result are combined to obtain the input data of the Transformer module.
[0032] Preferably, the Transformer module includes an encoder and a decoder, the encoder includes a multi-head self-attention layer and a forward feedback layer arranged in sequence, the decoder includes a masked multi-head self-attention layer, a multi-head cross-attention layer and a forward feedback layer arranged in sequence, the input of the multi-head cross-attention layer is the output of the multi-head self-attention layer in the decoder, and the output of the forward feedback layer in the encoder; the decoder outputs the final prediction result through a forward propagation prediction;
[0033] The multi-head attention layer will transform the input sequence Derived query vector Key Vector Sum value vector Attention score, where N p is the number of non-overlapping fragments in the input sequence, T x and T y is the length of the input sequence, d model is the vector dimension;
[0034] In the multi-head cross-attention layer, the output of the feedforward layer in the encoder is taken as the input sequence X, and the output of the multi-head self-attention layer in the decoder is taken as the input sequence Y.
[0035] Preferably, the feed-forward layer includes two linear mapping layers, a ReLU activation function and a dropout layer.
[0036] Preferably, a length of T is extracted from the last part of the input sequence that is closest to the output sequence. label The fragment is used as the input of the decoder and is expressed as:
[0037]
[0038] Where: is the start marker segment sampled from the input sequence; is a placeholder set to 0 in the output sequence; R, C are the dimensions of the input sequence.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1) Wide application scenarios: Traditional population mobility data are mostly based on raster data, but the actual application scenarios are mostly irregularly divided physical areas, such as communities, road networks, POI divisions, land use function divisions, etc. The present invention uses graph convolutional networks to model the spatial characteristics between geographic areas, which not only supports modeling of irregularly divided areas, but is also compatible with regularly divided raster data. By combining the output results of multiple spatiotemporal graphs, the versatility of the model is improved, and significant progress has been made in spatiotemporal correlation modeling in a variety of application scenarios.
[0041] 2) High prediction efficiency: To address the error accumulation problem caused by the traditional step-by-step structure decoder using the output of the previous decoding process as the input of the next prediction time step, the present invention improves the decoder and predicts the output sequence of all prediction time steps through a forward process, which can effectively prevent error accumulation and reduce time consumption.
[0042] 3) The prediction results are authentic: the present invention predicts the OD matrix of population mobility, and refines the population movement between specific regions on the basis of traditional regional passenger flow prediction, which can more realistically reflect the laws and patterns of population movement.
[0043] 4) Strong ability to extract spatiotemporal relationships: Use a three-dimensional graph convolutional network to model the geographical and topological relationships between population movement areas. The three-dimensional graph convolution calculation can simultaneously aggregate the population movement information of spatially adjacent areas and adjacent time steps, thereby accurately modeling spatiotemporal correlation.
[0044] 5) Strong long sequence prediction capability: Different from the traditional RNN-based network structure and the step-by-step prediction output process, the present invention adopts the Transformer network structure as the backbone and adopts a one-time output prediction process, which can obtain a comprehensive receptive field from the entire input sequence and effectively prevent error accumulation and high time consumption, thereby reducing the result deviation caused by the increase in prediction length in long time series prediction, and has stronger long sequence prediction capability.
[0045] 6) High model parallelism: This application adopts a self-attention mechanism, so that each time step can directly focus on all the time information of the input sequence, without the need to calculate in sequence, so that it can be highly parallelized. This parallel computing method improves processing efficiency and greatly improves model training and reasoning speed. In addition, the consumption of computing resources in the present invention is concentrated on tensor calculations, so it is well adapted to hardware accelerators such as GPUs, which further improves the parallelism of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The conceptual diagram of the OD matrix; (a) shows the individual flow between regions, (b) shows the overall OD flow between regions, and (c) shows the OD matrix of all target regions;
[0047] Figure 2 is a flow chart of the method of the present invention;
[0048] Figure 3 This is a flow chart of the population mobility OD matrix prediction method based on three-dimensional graph convolutional network;
[0049] Figure 4 The mechanism diagram of 3D graph convolution, whose output is aggregated by spatial and temporal neighborhoods;
[0050] Figure 5 is an example of global time features;
[0051] Figure 6 Schematic diagram of the attention weight matrix. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0053] Example
[0054] like Figure 2 As shown, this embodiment provides a population mobility OD matrix prediction method, the method comprising:
[0055] Based on the historical OD flow information and regional information, multiple spatiotemporal graphs with different adjacency matrices are constructed;
[0056] For each spatiotemporal graph, a three-dimensional graph convolutional network 3DGCN is constructed for feature extraction, and the feature extraction results of all spatiotemporal graphs are fused to obtain the spatiotemporal extraction result;
[0057] The spatiotemporal extraction results are embedded in blocks, and the results after block embedding are position-encoded and time-encoded, and the input data is obtained after fusion;
[0058] The Transformer module based on the encoder and decoder architecture is used to extract long-term temporal features from the input data, and the decoder outputs the final prediction result.
[0059] Next, the method of this embodiment is introduced in detail.
[0060] S1. Data preparation
[0061] The urban space under study is divided into a set of non-overlapping sub-areas. The urban area can be divided into regular grid-like areas based on longitude and latitude, or into irregular areas based on real-world spatial units such as streets or road networks. The number of areas is recorded as R. At the same time, the time range under study is sampled into discrete time periods at given time intervals, and the number of time periods is recorded as T.
[0062] According to the original population mobility OD database and urban geographic information, the historical OD flow information and the graph structure data of the city are obtained, so as to construct multiple spatiotemporal graphs with different adjacency matrices.
[0063] Specifically, consider two graphs:
[0064] Spatiotemporal graph based on historical OD flows Its adjacency matrix is Built from historical OD information;
[0065] Spatiotemporal graph based on geographic proximity between regions Its adjacency matrix is in
[0066] After obtaining the original adjacency matrix, it is necessary to preprocess it.
[0067] First, if there is no self-loop in the original matrix, you need to add a self-loop to prevent the characteristics of the node itself from being ignored, as shown below:
[0068]
[0069] Where: I is the identity matrix with 1 on the diagonal and 0 on the other elements, x∈{OD,n}; is A at time period t x (For an adjacency matrix without a time dimension, ).
[0070] After adding self-loops, the adjacency matrix is Laplacian regularized:
[0071]
[0072] Where: In particular, when x = OD, according to Get two matrices respectively: and To capture the correlation of regions with the same origin and destination, the expression is:
[0073]
[0074] Where:
[0075] 2. Modeling spatiotemporal dependencies through 3D graph convolutional networks (3DGCN)
[0076] In the 3DGCN network, OD data first extracts the information of neighboring nodes through feature propagation.
[0077] In this embodiment, a spatial domain-based method in graph convolution theory is adopted to perform feature propagation using hierarchical rules:
[0078]
[0079] Where: is the input of the (l+1)th graph convolutional layer, and the initial input That is, the past T i Historical OD flow matrix.
[0080] After aggregating neighboring node information through feature propagation, it is further processed by a 3D graph convolution method.
[0081] After receiving the result of feature propagation in the (l)th layer, the traditional GCN uses a multi-layer perceptron to generate the result for the (l+1)th layer. However, the present invention improves this process by introducing a three-dimensional graph convolution module to capture spatial and temporal dependencies at the same time. The specific process is as follows:
[0082]
[0083] Where: H (l+1) is the output of the l+1th 3D graph convolutional layer; σ is the activation function; Z (l+1) is the output after feature propagation, which serves as the input of the l+1th 3D graph convolutional layer; is the three-dimensional convolution kernel of the l+1th layer, C (l) is the number of channels per layer, 2k t+1 is the size of the three-dimensional convolution kernel of the l+1th layer in the time dimension; the superscript t corresponds to the time period.
[0084] Compared with traditional GCN, 3DGCN can not only aggregate the features of spatially adjacent nodes, but also aggregate the features of nearby time steps, with a time window of (2k t +1), which allows the network to capture both spatial and temporal dependencies and also takes into account the problem that the adjacency matrix may change over time.
[0085] Figure 4 Schematic diagram of the mechanism of 3D graph convolution, whose output is aggregated by spatial and temporal neighborhoods.
[0086] 3. Fusion of outputs from multiple 3DGCN networks
[0087] For each spatiotemporal graph, construct a 3DGCN and get the output:
[0088]
[0089] Where: L is the number of layers of the 3DGCN network.
[0090] All 3DGCN output results are input into the following fusion layer, and the output of the spatiotemporal extraction module is obtained by fusing multiple outputs.
[0091]
[0092] Where: is the trainable weight matrix in the fusion layer.
[0093] 4. Embed the output of the 3DGCN module in blocks
[0094] In order to align the size before inputting the data into the Transformer module, the data input into this module is processed through the previous 3DGCN module that captures the spatial and temporal relationship. (Flattened to ), R corresponds to the number of regions, C is the number of channels of the data, and before being fed into the Transformer module, it should pass through the embedding layer to obtain a dimension of d model data.
[0095] Considering that RC may be much larger than d model To prevent information loss during embedding, refer to the ViT method and Decompose into N p The non-overlapping dimensions of are P fragments. Among them, It should be noted that before this process, the The size is mapped to PN p , get the data p=1,…,N p .
[0096] After block embedding, the collection of fragments Also pass through a one-dimensional convolution filter (stride 1, padding 1) is projected into a vector middle:
[0097]
[0098] 5. Position and time encoding of the output of the 3DGCN module
[0099] The Transformer structure cannot extract information from the order or other temporal features of the input time series. Given the importance of this information in population mobility prediction, it is necessary to add positional encoding and temporal encoding to the output of the embedding layer.
[0100] 1) Position encoding captures the local position information of the time series. In this embodiment, the position encoding uses sine and cosine functions to learn fixed components of the context:
[0101]
[0102] Where: t is the position in the input time series, L x is the maximum length, which is equal to 5000 in this embodiment.
[0103] 2) Time encoding captures the global temporal characteristics of data Information (pre-prepared external information). Where p is the dimension of time features. Figure 5 An example of a global temporal feature is provided. The temporal encoding uses a learnable embedding function with different sizes of learned vocabularies. For example, the vocabulary size for hours of the day is 24, while the vocabulary size for days of the month is 31:
[0104]
[0105] 3) After passing through the position coding layer and the time coding layer in the coding layer, the data finally input into the Transformer module is obtained
[0106]
[0107] 6. Extract long-term time features
[0108] like Figure 3As shown in the figure, the Transformer module for extracting long-term temporal features mainly includes an encoder and a decoder, which are mainly a multi-head attention layer and a forward feedback layer.
[0109] The encoder includes a multi-head self-attention layer and a feedforward layer set in sequence, and the decoder includes a masked multi-head self-attention layer, a multi-head cross-attention layer and a feedforward layer set in sequence. The input of the multi-head cross-attention layer is the output of the multi-head self-attention layer in the decoder and the output of the feedforward layer in the encoder; the decoder outputs the final prediction result through a forward propagation prediction.
[0110] The multi-head attention layer will transform the input sequence Derived query vector Key Vector Sum value vector Attention score, where N p is the number of non-overlapping fragments in the input sequence, T x and T y is the length of the input sequence, d model is the vector dimension; in the multi-head cross attention layer, the output of the feedforward layer in the encoder is taken as the input sequence X, and the output of the multi-head self-attention layer in the decoder is taken as the input sequence Y.
[0111] Specifically, Q, K, V are the input sequence For each different attention module, X and Y come from different sources, such as Figure 3 The first multi-head self-attention module of the Encoder in , X, Y are both from X de , and in the second cross-attention module of the Decoder, X comes from the output of the Encoder, and Y comes from the output of the self-attention module in the previous step:
[0112]
[0113] Where: is the learnable weight matrix of the linear projection layer. In self-attention, input X=Y. But in the cross-attention of the decoder, there are two inputs: X as the output of the encoder and Y as the input of this layer. Therefore, the attention function can be expressed as:
[0114] Attention(Q,K,V)=A attn V (15)
[0115] in, is the attention weight matrix, i.e., the dependency between each query vector and the key vector, calculated using the scaled dot product method:
[0116]
[0117] in, is the mask function used in the decoder’s masked self-attention function. For other attention functions, mask(x i,j )=x i,j .
[0118] The multi-head attention mechanism divides Q, K, V into h slices evenly to learn information from different representation subspaces, where h is the number of attention heads:
[0119]
[0120] MultiHeadAttn(Q,K,V)=Concat(head1,…,head1)W o (18)
[0121] in, and are all weight matrices,
[0122] The feedforward layer consists of two linear mapping layers, a ReLU activation function, and a dropout layer to prevent overfitting:
[0123] FF(X)=dropout(ReLU(XW1))W2 (19)
[0124] Among them, X is the input of this layer, and These are all weight matrices of the linear layer. Figure 6 Schematic diagram of the attention weight matrix.
[0125] 7. Output prediction results
[0126] The decoder structure used in this embodiment includes a masked multi-head self-attention layer, a multi-head cross-attention layer using the encoder output, and a forward feedback layer. Subsequently, the output of the decoder is fed into a fully connected layer, which is used to obtain the final output.
[0127] Extract the last part of the input sequence that is closest to the output sequence, with a length of T label The decoder input can be expressed as:
[0128]
[0129] in, is a start-marked segment sampled from the input sequence, is a placeholder set to 0 in the output sequence.
[0130] The traditional autoregressive decoder recursively performs multi-step predictions by using the output predicted in the previous time step, but the decoder used in this patent is different. It predicts all required output sequences with only one forward propagation. This can greatly avoid the error accumulation problem in the training process and also reduce time consumption.
[0131] The population mobility OD matrix prediction method designed by the present invention can realize the OD matrix prediction of urban areas, that is, the problem of predicting the OD matrix of a certain period of time in the future based on the OD matrix of a certain period of time in the past. As a concrete key indicator reflecting the abstract population mobility in urban areas, the OD matrix plays an important auxiliary role in urban computing fields such as traffic management, infectious disease control and urban simulation.
[0132] The present invention adopts a three-dimensional graph convolutional network and an improved decoder structure, which can extract more realistic spatiotemporal relationships from OD data, thereby outputting more accurate prediction results and providing more reliable data references for the field of urban computing.
[0133] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A population mobility OD matrix prediction method, characterized in that: The method includes: Based on the historical OD flow information and regional information, multiple spatiotemporal graphs with different adjacency matrices are constructed; For each spatiotemporal graph, a three-dimensional graph convolutional network is constructed to extract features, and the feature extraction results of all spatiotemporal graphs are fused to obtain the spatiotemporal extraction results. The spatiotemporal extraction results are embedded in blocks, and the results after the block embedding processing are position-encoded and time-encoded, and the input data is obtained after fusion; A Transformer module based on an encoder and decoder architecture is used to extract long-term temporal features from the input data, and the decoder outputs the final prediction result.
2. A population mobility OD matrix prediction method according to claim 1, characterized in that: The space-time graph includes a space-time graph based on historical OD flows and a space-time graph based on geographic proximity between regions.
3. A population mobility OD matrix prediction method according to claim 2, characterized in that: After constructing a plurality of spatiotemporal graphs with different adjacency matrices, the method further includes: If there is no self-loop in the adjacency matrix of the original space-time graph, a self-loop is added, and the adjacency matrix after adding the self-loop is subjected to Laplace regularization. If there is a self-loop in the adjacency matrix of the original space-time graph, Laplace regularization is directly performed. For the spatiotemporal graph based on historical OD flows, the regional correlation matrix with the same departure point and the regional correlation matrix with the same destination are captured through Laplace regularization.
4. A method for predicting population mobility OD matrix according to claim 3, characterized in that: For each spatiotemporal graph, a three-dimensional graph convolutional network is constructed to extract features, specifically including: A hierarchical rule-based spatial domain method is used to propagate features on the spatiotemporal graph, and neighboring node information is extracted from the spatiotemporal graph based on historical OD flows; According to the output after feature propagation, a three-dimensional graph convolutional network is used to capture spatial and temporal dependencies at the same time. The calculation expression is: Where: H (l+1) is the output of the l+1th 3D graph convolutional layer; σ is the activation function; Z (l+1) is the output after feature propagation, which serves as the input of the l+1th 3D graph convolutional layer; is the three-dimensional convolution kernel of the l+1th layer, C (l) is the number of channels per layer, 2k t +1 is the size of the three-dimensional convolution kernel of the l+1th layer in the time dimension; the superscript t corresponds to the time period.
5. A method for predicting population mobility OD matrix according to claim 4, characterized in that: The spatial domain method based on hierarchical rules is used to propagate the features of the spatiotemporal graph, and the calculation expression is: Where: It is the input of the l+1th graph convolutional layer; They are the regional correlation matrix with the same departure point and the regional correlation matrix with the same destination captured from the spatiotemporal graph based on historical OD flows, respectively; is the correlation matrix captured from other spatiotemporal graphs.
6. A method for predicting population mobility OD matrix according to claim 1, characterized in that: The block embedding of the spatiotemporal extraction result is specifically as follows: Extract the time-space results Flattened to Will The size is mapped to PN p , decompose the result after size mapping into N p non-overlapping fragments of dimension P, the set of non-overlapping fragments The projection is processed by a one-dimensional convolution filter into the first vector d model is the vector dimension.
7. A method for predicting population mobility OD matrix according to claim 1, characterized in that: The position encoding and time encoding are performed on the result after the block embedding process, and the input data is obtained after fusion, specifically: Position encoding is performed on the result after the block embedding process to capture the local position information of the time series, and the position encoding learns the context information through sine and cosine functions; Temporally encoding the position-encoded data to capture information in global temporal features, wherein the temporal encoding is performed through a learnable embedding function; The first vector, the position encoding result and the time encoding result are combined to obtain the input data of the Transformer module.
8. A method for predicting population mobility OD matrix according to claim 6, characterized in that: The Transformer module includes an encoder and a decoder, wherein the encoder includes a multi-head self-attention layer and a forward feedback layer arranged in sequence, and the decoder includes a masked multi-head self-attention layer, a multi-head cross-attention layer and a forward feedback layer arranged in sequence, wherein the input of the multi-head cross-attention layer is the output of the multi-head self-attention layer in the decoder and the output of the forward feedback layer in the encoder; the decoder outputs the final prediction result through a forward propagation prediction; The multi-head attention layer will transform the input sequence Derived query vector Key Vector Sum value vector Attention score, where N p is the number of non-overlapping fragments in the input sequence, T x and T y is the length of the input sequence, d model is the vector dimension; In the multi-head cross-attention layer, the output of the feedforward layer in the encoder is taken as the input sequence x, and the output of the multi-head self-attention layer in the decoder is taken as the input sequence Y.
9. A method for predicting population mobility OD matrix according to claim 8, characterized in that: The feed-forward layer includes two linear mapping layers, ReLU activation function and a dropout layer.
10. A method for predicting population mobility OD matrix according to claim 8, characterized in that: Extract the last part of the input sequence that is closest to the output sequence, with a length of T label The fragment is used as the input of the decoder and is expressed as: Where: is the start marker segment sampled from the input sequence; is a placeholder set to 0 in the output sequence; R, C are the dimensions of the input sequence.
Citation Information
Patent Citations
Traffic flow prediction method based on Transform space-time diagram convolutional network
CN114330671A
Traffic flow prediction method based on improved space-time Transform
CN115273464A
Local space-time diagram convolution traffic flow prediction method and system
CN115565370A
Multi-view fusion space-time dynamic graph convolutional network urban traffic flow prediction method
CN116935649A
Traffic flow space-time prediction method based on graph neural network
CN118278567A
Cited By
Traffic prediction method combining dynamic GCN and fine-tuning GPT2
CN119763327A
First-aid patient risk level assessment method and system based on attention mechanism
CN120048532A
Power load prediction method based on population flow
CN121076790A
Method for predicting power load based on population flow
CN121076790B
Urban population migration prediction method and device based on power consumption data, and medium
CN121599241A
