Universe traffic flow completion method and device and storage medium
By abstracting the road network unit into graph nodes and performing information propagation and feature aggregation in the space-time heterogeneous relationship diagram, the problem of traffic flow speculation at uninstalled intersections is solved, and the accurate completion of traffic flow in the whole region and the reduction of hardware costs is achieved.
Patent Information
- Application Number
- CN202510443802.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-18
Smart Images

Figure CN120340249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and particularly to a method, device and computer-readable storage medium for completing the traffic flow of the whole region. Background Art
[0002] Mastering the refined traffic flow of all intersections in the city in real time is one of the important contents of modern urban governance. It plays an important role in many applications such as traffic management, urban planning, optimization of public transportation systems, signal light control and congestion management.
[0003] At the present stage, to obtain the refined traffic flow of intersections, road sensors such as cameras and geomagnetic coils need to be installed at all intersections. However, the high hardware cost and maintenance cost limit the acquisition of the traffic flow of all intersections. In addition, the existing research on traffic flow mainly focuses on the following two directions:
[0004] (1) Traffic flow prediction based on the observed data of the target intersection: Based on the observed data of the target intersection at historical times {t - h,..., t - 1, t}, predict the traffic flow of the target intersection at the future time t + k; where h ≥ 0; k ≥ 0.
[0005] (2) Filling the missing value of the traffic flow based on the observed data of the target intersection: At a certain time t, use the observed data of the target intersection at times {t - h,..., t - 2, t - 1} and {t + 1, t + 2,..., t + k} to fill the missing traffic flow of the target intersection at time t.
[0006] As can be seen from the above, the existing technology is applicable to the target intersections with observed data for traffic flow prediction and filling of a small number of missing values. However, for the target intersections without observed data (such as intersections without road sensors installed), the above existing technology cannot be enabled. These target intersections without observed data are always blank in the traffic flow data of the whole region. Therefore, how to effectively predict the traffic flow of the target intersections without observed data to complete the traffic flow data of the whole region has become an urgent problem to be solved. Summary of the Invention
[0007] The purpose of the embodiments of the present invention is to provide a method, device and computer-readable storage medium for completing the traffic flow of the whole region. Through the existing data of the observation nodes and the information propagation mechanism of the spatio-temporal heterogeneous relationship graph, the traffic flow of the non-observation nodes can be accurately predicted, and further the traffic flow of the whole region can be completed, thus significantly reducing the requirement of hardware deployment.
[0008] The first aspect of the embodiments of the present invention provides a method for completing the traffic flow of the whole region, including:
[0009] Use the road network units in the target area as graph nodes, and establish connection edges for the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observed nodes and unobserved nodes; road sensors are deployed on the observed nodes.
[0010] Obtain time series segments of m traffic variables of the observed nodes respectively related to a specified time, and perform feature extraction and feature fusion on the time series segments to obtain initial node features of the observed nodes; wherein, m≥1.
[0011] Based on the initial node features of the observed nodes, perform multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph to obtain the final layer features of each graph node; wherein, the feature aggregation in the first layer is local information propagation dominated by the observed nodes; the feature aggregation in the second layer or deeper layers is global information propagation participated by all graph nodes.
[0012] Input the final layer features into a traffic flow prediction network to obtain traffic flow prediction results of each unobserved node at the specified time.
[0013] Optionally, the establishing connection edges for the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units includes:
[0014] Connect directly reachable graph nodes according to the road network topology relationship to obtain a set of topological connection edges.
[0015] Select Q observed nodes with the shortest passing distance for each graph node to connect according to the spatial proximity relationship to obtain a set of observed connection edges; wherein, Q≥1.
[0016] Merge the set of topological connection edges and the set of observed connection edges to form the connection edges of the spatio-temporal heterogeneous relationship graph.
[0017] Optionally, the performing feature extraction and feature fusion on the time series segments to obtain the initial node features of the observed nodes includes:
[0018] Based on a one-dimensional convolutional network, perform feature extraction on each time series segment in the observed nodes to obtain time series features of the corresponding traffic variables.
[0019] Concatenate the time series features to form a comprehensive feature vector.
[0020] Perform feature fusion on the comprehensive feature vector through a fully connected layer to obtain the initial node features of the observed nodes.
[0021] Optionally, when performing feature aggregation of the current layer in the spatio-temporal heterogeneous relationship graph, the node feature of any graph node is aggregated and updated by neighbor nodes according to the corresponding spatio-temporal dependence weights; wherein, when the current layer is the first layer, the neighbor nodes are only composed of observed nodes.
[0022] Optionally, the spatio-temporal dependence weights are obtained by fusing and calculating time features, distance features, and node interaction features; wherein, the node interaction features are used to characterize the correlation between the node features corresponding to two graph nodes.
[0023] Optionally, the time features are obtained through the following steps:
[0024] Perform one-hot encoding on the specified moment to obtain a one-hot code vector;
[0025] Perform feature mapping on the one-hot code vector through a neural network to obtain the corresponding time features.
[0026] Optionally, the distance features are obtained by performing feature mapping on the travel distance between two graph nodes through a neural network.
[0027] Optionally, the node interaction features are calculated by the following formula:
[0028]
[0029] where is the node interaction feature of graph nodes l i and lj at the p-th layer at time t; is the node feature of graph node lj at the p-1 layer; is the node feature of graph node i at the p-1 layer; ReLU(·) is the activation function; represents bitwise multiplication of two vectors; weight matrices W6, W7, W8 ∈ R d×d ; b4 ∈ R 1×d is the bias term; d is the length of the feature vector.
[0030] An embodiment of the second aspect of the present invention provides a global traffic flow completion device, including:
[0031] A relationship graph construction module, configured to use road network units in a target area as graph nodes, and establish connection edges of the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observed nodes and unobserved nodes; the observed nodes are deployed with road sensors.
[0032] An initial feature acquisition module, configured to acquire time series segments of m traffic variables of the observation node respectively related to a specified time, and perform feature extraction and feature fusion on the time series segments to obtain initial node features of the observation node; where m≥1;
[0033] A feature aggregation module, configured to perform multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph based on the initial node features of the observation node to obtain final layer features of each graph node; where the feature aggregation in the first layer is local information propagation dominated by the observation node; the feature aggregation in the second layer or deeper layers is global information propagation participated by all graph nodes;
[0034] A speculation output module, configured to input the final layer features into a traffic flow speculation network to obtain traffic flow speculation results of each non-observation node at the specified time.
[0035] An embodiment of the third aspect of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; where the computer program controls a device where the computer-readable storage medium is located to execute the global traffic flow completion method according to any one of the above first aspects when running.
[0036] Compared with the prior art, the embodiments of the present invention provide a global traffic flow completion method, device and computer-readable storage medium. The method includes: abstracting road network units into graph nodes, and using multi-dimensional traffic variable data of observation nodes to perform information propagation and feature aggregation in a spatio-temporal heterogeneous relationship graph, so that non-observation nodes without deployed road sensors can also output traffic flow speculation results at a specified time. In addition, when performing multi-layer feature aggregation in the spatio-temporal heterogeneous relationship graph, it is divided into the following two stages: in the first stage (i.e., the feature aggregation in the first layer), only the observation nodes perform local information propagation through connection edges, and the non-observation nodes only receive the transmitted information of the associated observation nodes to isolate noise and ensure the reliability of the initial node features of the non-observation nodes; in the second stage (i.e., the feature aggregation in the second layer or deeper layers), all graph nodes participate in information propagation. Through multi-stage feature aggregation, the speculation accuracy of traffic flow can be improved. Description of the Drawings
[0037] Figure 1 is a schematic flowchart of an embodiment of the global traffic flow completion method provided by the present invention;
[0038] Figure 2 is a schematic flowchart of another embodiment of the global traffic flow completion method provided by the present invention;
[0039] Figure 3It is a schematic structural diagram of an embodiment of the global traffic flow completion device provided by the present invention. Detailed implementation manners
[0040] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art in the technical field of the present invention without making creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.
[0041] Refer to Figure 1 , which is a schematic flowchart of an embodiment of the global traffic flow completion method provided by the present invention.
[0042] The first aspect embodiment of the present invention provides a global traffic flow completion method, including steps S1 to S4, specifically as follows:
[0043] Step S1: Use the road network units in the target area as graph nodes, and establish connection edges for the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observed nodes and unobserved nodes; road sensors are deployed on the observed nodes.
[0044] Step S2: Obtain time series segments of m traffic variables of the observed nodes respectively related to a specified moment, and perform feature extraction and feature fusion on the time series segments to obtain initial node features of the observed nodes; wherein, m≥1.
[0045] Step S3: Based on the initial node features of the observed nodes, perform multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph to obtain the final layer features of each graph node; wherein, the feature aggregation in the first layer is local information propagation dominated by the observed nodes; the feature aggregation in the second layer or deeper layers is global information propagation participated by all graph nodes.
[0046] Step S4: Input the final layer features into a traffic flow prediction network to obtain traffic flow prediction results of each unobserved node at the specified moment.
[0047] It should be noted that the spatio-temporal heterogeneous relationship graph is composed of graph nodes and connection edges. In the embodiments of the present invention, the spatio-temporal heterogeneous relationship graph includes two types of graph nodes, namely observed nodes and unobserved nodes. The road network units include at least one of road segments and intersections.
[0048] The specific node construction process is as follows:
[0049] Each road segment / intersection to be observed is abstracted as a node in a graph, and each node is associated with longitude and latitude coordinates representing its location. According to whether there are observed values for the road segment / intersection, the nodes can be divided into two types: nodes with observed values (i.e., observed nodes) and nodes without observed values (non-observed nodes). Respectively, use L O and L N to represent the sets of observed nodes and non-observed nodes, represents the observed nodes, represents the non-observed nodes. Each observed node has time series data on m traffic variables where, is the time series of the j-th traffic variable (such as traffic flow, vehicle speed) with a length of n; 1 ≤ j ≤ m; represents the observed value of the j-th traffic variable of node at time tq (1 ≤ q ≤ n). For example, if the observed node has time series data on two traffic variables, traffic flow and vehicle speed, then it can be represented by to represent 's traffic flow time series, to represent 's vehicle speed time series; assume is a school intersection, records the traffic flow from 7:00 to 9:00, then there is equal to {(50 vehicles, 7:00), (120 vehicles, 7:15), (200 vehicles, 7:30),..., (80 vehicles, 9:00)}.
[0050] The multi-layer iterative feature aggregation in the embodiments of the present invention has the following two-stage aggregation strategy:
[0051] (1) The first stage (i.e., the feature aggregation of the first layer) is the local information propagation dominated by observed nodes: only using the information of observed nodes to propagate to adjacent nodes, and non-observed nodes only receive the pure information transmitted by the observed nodes among their neighbor nodes. The purpose is to avoid contaminating the network with the "blank data" (i.e., noise) of non-observed nodes and to supplement preliminary and reliable node features for non-observed nodes.
[0052] (2) The second stage (i.e., the feature aggregation of the second layer or deeper layers) is the information propagation participated by all graph nodes: when non-observed nodes obtain preliminary and reliable node features, then release the information flow, similar to allowing free communication after lifting the isolation. Specifically, for each non-observed node or observed node, when performing feature aggregation, all its neighbor nodes need to be considered.
[0053] Compared with the feature aggregation method of directly adopting global propagation in traditional graph neural networks, the embodiment of the present invention avoids introducing too much noise through an aggregation strategy of first local propagation and then global propagation, which can not only ensure that non-observed nodes obtain effective node features, but also avoid the adverse effects of blank node features of non-observed nodes on observed nodes, thereby improving the accuracy of traffic flow prediction.
[0054] Finally, after multi-layer iterative feature aggregation, the final layer features of each graph node are obtained, and the final layer features are input into the traffic flow prediction network to obtain the traffic flow prediction values of each road network unit.
[0055] There are two types of input data in the embodiment of the present invention. The first type is road network data including road network units and . The second type is, for a specified moment t (i.e., the moment t to be predicted), obtaining the time series segments corresponding to m traffic flow data of the road network unit at the moments {t - k,..., t - 1, t} (k ≥ 0). By constructing a spatio-temporal heterogeneous relationship graph and a spatio-temporal heterogeneous graph neural network to learn spatio-temporal relationships and extract spatio-temporal features, and through a traffic flow prediction network (fully connected layer) to predict the traffic flow of the road network unit (as shown in Figure 2 ), it enables non-observed nodes without deployed road sensors to also output traffic flow prediction results at the specified moment t, thereby realizing the prediction of the overall traffic flow and significantly reducing the hardware deployment requirements. In other words, the embodiment of the present invention can use the data of the road network unit with observed values at the moments {t - k,..., t - 1, t} (time series segments related to the specified moment t) to predict the traffic flow data of the road network unit without observed values at the specified moment t.
[0056] Of course, if it is necessary to predict the traffic flow data of the road network unit at multiple specified moments, the time series segments of each traffic variable can be taken out from through a sliding window (length k + 1), and the traffic flow data corresponding to the corresponding moment can be predicted using the time series segment corresponding to each window.
[0057] In an optional embodiment, establishing the connection edges of the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network unit includes:
[0058] Connecting directly reachable graph nodes according to the road network topology relationship to obtain a set of topological connection edges;
[0059] Selecting the Q observed nodes with the closest passing distance for each graph node to connect according to the spatial proximity relationship to obtain a set of observed connection edges; where Q ≥ 1;
[0060] Merge the topological connection edge set and the observation connection edge set to form the connection edges of the spatio-temporal heterogeneous relationship graph.
[0061] In the embodiments of the present invention, the spatio-temporal heterogeneous relationship graph includes two types of connection edges, namely topological connection edges and observation connection edges.
[0062] The specific connection edge construction process is as follows:
[0063] (1) Topological connection edges obtained based on the road network topology relationship: Combine the road network topology structure to construct a spatio-temporal heterogeneous relationship graph. If there is a path in the road network that can directly connect two nodes without passing through other intermediate nodes (i.e., directly reachable), it is considered that there is a topological connection edge between these two nodes in the spatio-temporal heterogeneous relationship graph.
[0064] (2) Observation connection edges based on Q-nearest neighbor observations: In the calculation of the graph convolutional network, the features of each node are updated by interacting with the features of its neighbor nodes. Therefore, in the embodiments of the present invention, to ensure that each node in the spatio-temporal heterogeneous relationship graph can be connected to the observation nodes, a Q-nearest neighbor observation node connection method is proposed. In the spatio-temporal heterogeneous relationship graph, if a certain node has not been connected to the Q observation nodes with the shortest travel distance to it, then connect this node to these Q observation nodes to obtain the observation connection edges. In other words, force each graph node to connect to the nearest Q observation nodes to ensure that during the feature aggregation in the first stage (i.e., the first layer), each graph node, especially non-observation nodes, can obtain effective and reliable transmitted information.
[0065] In an optional embodiment, the feature extraction and feature fusion of the time series segment to obtain the initial node features of the observation nodes includes:
[0066] Based on a one-dimensional convolutional network, perform feature extraction on each time series segment in the observation nodes to obtain the time series features of the corresponding traffic variables;
[0067] Concatenate the time series features to form a comprehensive feature vector;
[0068] Perform feature fusion on the comprehensive feature vector through a fully connected layer to obtain the initial node features of the observation nodes.
[0069] Specifically, for each observation node at time t The embodiments of the present invention use the historical data (i.e., time series segment) from time t - k to time t as the initial input data of this observation node at time t: where k is a hyperparameter that can be adjusted during the training process.
[0070] Time series segments corresponding to m traffic variables for a certain observation node (1 ≤ j ≤ m), in the embodiments of the present invention, a 1D convolutional network is used to extract features respectively, and vector concatenation (vector splicing) is performed to obtain a comprehensive feature vector. Finally, the comprehensive feature vector is input into a fully connected neural network for feature fusion to obtain the initial node feature of the observation node. The specific formula is as follows:
[0071]
[0072] Among them, is the initial node feature of the observation node at time t, Conv j (·) is a 1D convolutional network for extracting the time series features of the time series segment corresponding to the j-th traffic variable , similar to the sliding window to analyze the time series segment; || represents the concatenation (splicing) of vectors, and W1 and b1 are learnable parameters determined during the model training process.
[0073] In an optional embodiment, when performing feature aggregation of the current layer in the spatio-temporal heterogeneous relationship graph, the node feature of any graph node is aggregated and updated by neighbor nodes according to the corresponding spatio-temporal dependence weights; among them, the neighbor nodes consist only of observation nodes when the current layer is the first layer.
[0074] It should be noted that in the graph neural network, the feature of each node will be updated by aggregating the features of other nodes connected to the node in the graph. For a certain node l i in the graph, let lj represent the neighbor node of the node: lj ∈ Neigh(li), then in the p-th layer of the graph neural network, the node feature of l i is aggregated and updated in the following manner:
[0075]
[0076] Among them, represents the node feature of node l i after passing through the p-th layer of the graph neural network at time t, represents the node feature of node l i after passing through the (p - 1)-th layer of the graph neural network at time t, represents the node feature of node lj after passing through the (p - 1)-th layer of the graph neural network at time t; Aggregator(·) is a feature aggregator.
[0077] The embodiments of the present invention define the of the observation node as its initial node feature That is Of the non-observed nodes is an empty set. When performing feature aggregation at layer p = 1 (the graph neural network at layer p = 1), the neighbor nodes of each graph node consist only of the observed nodes it is connected to.
[0078] The feature aggregator Aggregator based on spatio-temporal data proposed in the embodiments of the present invention is expressed as follows:
[0079]
[0080] where the weight matrix W 10 ∈R d×d and the bias term b6 ∈ R 1×d are both learnable parameters; d is the length of the feature vector; is the spatio-temporal dependence weight, used to quantify the spatio-temporal dependence relationship between node l i and lj after feature aggregation at p - 1. The spatio-temporal dependence relationships in the embodiments of the present invention include: time relationship, spatial distance relationship, and feature correlation relationship.
[0081] In an alternative embodiment, the spatio-temporal dependence weight is obtained by fusing and calculating time features, distance features, and node interaction features; wherein, the node interaction features are used to characterize the correlation between the node features corresponding to two graph nodes.
[0082] It should be noted that by fusing features such as time, distance, and region (node), the influence of lj on l i is calculated (i.e., the spatio-temporal dependence weight ), specifically as follows:
[0083]
[0084] where || represents the concatenation of vectors; represents the time feature at time t; is the distance feature between node l i and lj; is the node (region) interaction feature between node l i and lj at layer p at time t; the weight matrix W9 ∈ R 3d×d and the bias term b5 ∈ R 1×d are both learnable parameters.
[0085] In an alternative embodiment, the time feature is obtained through the following steps:
[0086] Perform one-hot encoding on the specified time to obtain a one-hot code vector;
[0087] Perform feature mapping on the one-hot code vector through a neural network to obtain the corresponding time feature.
[0088] Specifically, according to the estimated time length a hours, the 24 hours of a day are divided into For example, if the estimated time interval is 0.5 hours, then a day can be divided into 48 time periods. Therefore, for the case where the estimated time interval is a hour, the embodiment of the present invention uses a length of One-Hot Encoding To express time; among them, the front Indicates the information of the hour. For the specified time (estimated time) t, which time period it belongs to, the value of the corresponding position is 1, and the values of the other positions are 0; for the last seven digits, it indicates Monday to Sunday. For the day of the week that the specified time t belongs to, the value of the corresponding position is 1, and the values of the other positions are 0. Assuming that the estimated time interval is 0.5 hours, the time information is represented by a one-hot encoding of length 55. For Monday morning 0:30, the values of the second and 49th positions are 1, and the values of the other positions are all 0.
[0089] The embodiment of the present invention performs feature mapping (feature learning) on the one-hot code vector through a neural network to obtain the corresponding time feature:
[0090]
[0091] Among them, ReLU(·) is the activation function; is the one-hot encoding (one-hot code vector) at time t, the weight matrix and the bias term b2∈R 1×d are all learnable parameters; d is the length of the feature vector.
[0092] In an optional embodiment, the distance feature is obtained by performing feature mapping on the travel distance between two graph nodes through a neural network.
[0093] Specifically, the embodiment of the present invention uses a fully connected neural network to perform feature mapping on the actual travel distances of the areas represented by the two nodes. i and lj, and their distance is expressed as disi,j, then the distance characteristic is calculated as follows:
[0094]
[0095] Among them, ReLU(·) is the activation function; For node l i and the distance feature corresponding to lj; weight matrix W4∈R 1×d ,W5∈R d×d and the bias term b3∈R 1×dAll are learnable parameters; d is the length of the feature vector.
[0096] In an optional embodiment, the node interaction feature is calculated by the following formula:
[0097]
[0098] Where is the node interaction feature of graph node l i and lj at the p-th layer at time t; is the node feature of graph node lj at the p-1 layer; is the node feature of graph node i at the p-1 layer; ReLU(·) is the activation function; represents the bitwise multiplication of two vectors; the weight matrices W6, W7, W8 ∈ R d×d ; b4 ∈ R 1×d is the bias term; d is the length of the feature vector.
[0099] It should be noted that the node interaction feature is used to dynamically capture the feature interaction pattern between the two nodes lj and l i .
[0100] It is worth noting that after fusing and calculating according to the time feature distance feature node (region) interaction feature , the spatio-temporal dependence weight i of lj on l is obtained. Then, according to the spatio-temporal dependence weight , the node features of neighbor nodes are aggregated and updated to obtain the node features after feature aggregation at the p-th layer
[0101] Finally, after obtaining the aggregated feature (i.e., the final layer feature) of the graph node at the final layer, the traffic data of the graph node is inferred through a fully connected neural network (traffic inference network):
[0102]
[0103] Where is the final layer feature after aggregation through all layers (the total number of layers is P), is the inferred value of the j-th traffic variable of graph node l i at the specified time t.
[0104] During model training, RMSE is selected as the loss function of the model:
[0105]
[0106] Among them, n×m×T represents the total amount of data; i = 1→n represents traversing all observation nodes. Of course, for training the model, if historical traffic variable data of non-observation nodes is collected, then n will also include these non-observation nodes; m represents m traffic variables, and t = t1→t T represents multiple speculation moments (specified moments) including {t1, t2, …, t T}.
[0107] By training the model, the learnable parameters in the model are determined to obtain a trained target model, and the target model can be used to speculate the traffic flow of non-observation nodes at a specified time.
[0108] See Figure 3 , which is a schematic structural diagram of an embodiment of the global traffic flow completion device provided by the embodiment of the present invention.
[0109] An embodiment of the second aspect of the present invention provides a global traffic flow completion device, which is applicable to the global traffic flow completion method described in any embodiment of the first aspect above. The device includes:
[0110] A relationship graph construction module 11, configured to use road network units in a target area as graph nodes, and establish connection edges of the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observation nodes and non-observation nodes; road sensors are deployed on the observation nodes.
[0111] An initial feature acquisition module 12, configured to obtain time series segments respectively related to a specified moment of m traffic variables of the observation nodes, and perform feature extraction and feature fusion on the time series segments to obtain initial node features of the observation nodes; wherein, m≥1;
[0112] A feature aggregation module 13, configured to perform multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph based on the initial node features of the observation nodes to obtain final layer features of each graph node; wherein, the feature aggregation of the first layer is local information propagation dominated by the observation nodes; the feature aggregation of the second layer or deeper layers is global information propagation participated by all graph nodes.
[0113] A speculation output module 14, configured to input the final layer features into a traffic flow speculation network to obtain traffic flow speculation results of each non-observation node at the specified moment.
[0114] It should be noted that the global traffic flow completion device provided in the embodiments of the second aspect of the present invention can implement all the processes of the global traffic flow completion method described in any of the embodiments of the first aspect. The functions and technical effects achieved by each module in the device are respectively the same as those of the global traffic flow completion method described in any of the embodiments of the first aspect, and will not be described in detail here.
[0115] Embodiments of the third aspect of the present invention provide a computer-readable storage medium, which includes a stored computer program; wherein, the computer program controls the device where the computer-readable storage medium is located to execute the global traffic flow completion method described in any of the embodiments of the first aspect when running.
[0116] The global traffic flow completion method described in any of the embodiments of the first aspect can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0117] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with this embodiment can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0118] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and deformations can be made, and these improvements and deformations should also be regarded as the protection scope of the present invention.
Claims
1. A method for completing global traffic flow, characterized in that, Including: Regarding the road network units in the target area as graph nodes, and establishing connection edges for the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observed nodes and unobserved nodes; road sensors are deployed on the observed nodes. Obtaining time series segments of m traffic variables of the observed nodes respectively related to a specified time, and performing feature extraction and feature fusion on the time series segments to obtain initial node features of the observed nodes; wherein, m≥1. Based on the initial node features of the observed nodes, performing multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph to obtain final layer features of each graph node; wherein, the feature aggregation in the first layer is local information propagation dominated by the observed nodes; the feature aggregation in the second layer or deeper layers is global information propagation participated by all graph nodes. Inputting the final layer features into a traffic flow prediction network to obtain traffic flow prediction results of each unobserved node at the specified time.
2. The method for completing the global traffic flow as described in claim 1, wherein The establishing of the connection edges for the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units includes: Connecting directly reachable graph nodes according to the road network topology relationship to obtain a set of topological connection edges. Selecting Q observed nodes with the shortest passing distance for each graph node to connect according to the spatial proximity relationship to obtain a set of observed connection edges; wherein, Q≥1. Merging the set of topological connection edges and the set of observed connection edges to form the connection edges of the spatio-temporal heterogeneous relationship graph.
3. The global traffic flow completion method according to claim 1, characterized in that, The performing of feature extraction and feature fusion on the time series segments to obtain the initial node features of the observed nodes includes: Based on a one-dimensional convolutional network, performing feature extraction on each time series segment in the observed nodes to obtain time series features of the corresponding traffic variables. Performing vector splicing on the time series features to form a comprehensive feature vector. Performing feature fusion on the comprehensive feature vector through a fully connected layer to obtain the initial node features of the observed nodes.
4. The global traffic flow completion method according to claim 1, wherein When performing feature aggregation in the current layer in the spatio-temporal heterogeneous relationship graph, the node features of any graph node are aggregated and updated by neighbor nodes according to the corresponding spatio-temporal dependence weights; wherein, the neighbor nodes in the current layer are only composed of observed nodes when it is the first layer.
5. The global traffic flow completion method according to claim 4, characterized in that, The spatio-temporal dependence weights are obtained by fusing and calculating time features, distance features and node interaction features; wherein, the node interaction features are used to characterize the correlation between the node features corresponding to two graph nodes.
6. The global traffic flow completion method according to claim 4, wherein, The time features are obtained through the following steps: Performing one-hot encoding on the specified time to obtain a one-hot code vector. Performing feature mapping on the one-hot code vector through a neural network to obtain corresponding time features.
7. The global traffic flow completion method according to claim 4, characterized in that The distance features are obtained by performing feature mapping on the passing distance between two graph nodes through a neural network.
8. The global traffic flow completion method according to claim 4, wherein The node interaction features are calculated by the following formula: Among them, is the node interaction feature of graph nodes \(l\) i and \(l_j\) at the \(p\)-th layer at time \(t\); is the node feature of graph node \(l_j\) at the \((p - 1)\)-th layer; is the graph node \(l\) i at the \((p - 1)\)-th layer node feature; ReLU(·) is the activation function; represents the bitwise multiplication of two vectors; weight matrices \(W_6, W_7, W_8\in\mathbb{R}\) d×d ; \(b_4\in\mathbb{R}\) 1×d is the bias term; \(d\) is the length of the feature vector.
9. A global traffic flow completion device, characterized in that, Including: A relationship graph construction module is used to take road network units in a target area as graph nodes, and establish connection edges of the graph nodes according to the road network topology relationship and spatial proximity relationship of the road network units, so as to obtain a spatio-temporal heterogeneous relationship graph; wherein, the graph nodes include: observed nodes and unobserved nodes; road sensors are deployed on the observed nodes. An initial feature acquisition module is used to obtain time series segments of m traffic variables of the observed nodes respectively related to a specified moment, and perform feature extraction and feature fusion on the time series segments to obtain initial node features of the observed nodes; wherein, m≥1. A feature aggregation module is used to perform multi-layer iterative feature aggregation in the spatio-temporal heterogeneous relationship graph based on the initial node features of the observed nodes to obtain final layer features of each graph node; wherein, the feature aggregation in the first layer is local information propagation dominated by the observed nodes; the feature aggregation in the second layer or deeper layers is global information propagation participated by all graph nodes. A speculation output module is used to input the final layer features into a traffic flow speculation network to obtain traffic flow speculation results of each unobserved node at the specified moment.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the global traffic flow completion method according to any one of claims 1 to 8.