Traffic prediction method, device, equipment and storage medium based on network partitioning
Through a traffic prediction method based on network partitioning, graph modeling and partition processing, and using a preset model to learn and summarize traffic data, the problem of insufficient traffic prediction accuracy in existing technologies is solved, and the prediction accuracy and training efficiency of small and large data sets are improved.
Patent Information
- Application Number
- CN202111325841.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-11-10
AI Technical Summary
Existing neural network models can only focus on implicit topological structures when predicting traffic, resulting in insufficient prediction accuracy.
A traffic prediction method based on network partitioning is adopted. By obtaining traffic spatiotemporal data for graph modeling and characterization, the traffic network graph is partitioned using the network partition model, and each sub-network partition is learned and predicted using the preset traffic prediction model, and finally the traffic prediction data of the entire network is summarized.
It improves the accuracy and training efficiency for small and large traffic datasets, considers the topological characteristics of traffic network graphs, and enhances prediction accuracy.
Smart Images

Figure CN114168797B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic prediction, and in particular to a traffic prediction method, device, equipment and storage medium based on network partitioning. Background Art
[0002] At present, neural network models are often used to predict traffic. However, when predicting traffic, neural network models in related technologies can only focus on the implicit topological structure in the neural network, which has certain limitations and affects the prediction accuracy. Therefore, how to provide a traffic prediction method based on network partitioning to achieve accurate traffic prediction has become an urgent problem to be solved. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a traffic prediction method based on network partitioning, which can improve the accuracy of traffic prediction.
[0004] The present invention also proposes a traffic prediction device based on network partitioning.
[0005] The present invention also proposes a traffic prediction device based on network partitioning.
[0006] The present invention also provides a computer-readable storage medium.
[0007] A traffic prediction method based on network partitioning according to an embodiment of the first aspect of the present invention includes:
[0008] Obtaining spatiotemporal traffic data;
[0009] Performing graph modeling and characterization processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation;
[0010] Partitioning the traffic network graph using a network partition model fused with the traffic spatiotemporal data to obtain a plurality of sub-network partitions;
[0011] Use the preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data;
[0012] The partition prediction data are aggregated to obtain the whole network traffic prediction data.
[0013] The network partitioning-based traffic prediction method according to an embodiment of the present invention has at least the following beneficial effects: This network partitioning-based traffic prediction method obtains spatiotemporal traffic data, performs graph modeling and characterization processing on the spatiotemporal traffic data, and obtains a traffic network graph and data representation; utilizes a network partitioning model fused with the spatiotemporal traffic data to partition the traffic network graph, obtaining multiple sub-network partitions; utilizes a preset traffic prediction model to learn and predict the data of each sub-network partition, obtaining partition prediction data; and aggregates the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of both small and relatively large traffic datasets.
[0014] According to some embodiments of the present invention, performing graph modeling and characterization processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation includes:
[0015] Generate graph nodes based on the obtained measurement sensor positions;
[0016] Performing edge prediction processing on the graph nodes according to preset edge prediction conditions to obtain traffic directed edges;
[0017] The traffic spatiotemporal data is represented by a graph according to the traffic directed edges to obtain a traffic network graph.
[0018] According to some embodiments of the present invention, partitioning the traffic network graph using the network partition model fused with the traffic spatiotemporal data to obtain multiple sub-network partitions includes:
[0019] Get the target node set in the traffic network graph;
[0020] Calculating the shortest path to the target node set;
[0021] Obtaining a speed value according to a preset speed observation time period and the shortest path;
[0022] Performing partition preprocessing on the traffic network graph according to the speed value and a preset edge matching algorithm to obtain initial traffic network partitions;
[0023] The initial traffic network partition is refined to obtain multiple sub-network partitions.
[0024] According to some embodiments of the present invention, calculating the shortest path to the target node set includes:
[0025] Randomly pairing the target nodes of the target node set to obtain target node pairs;
[0026] Calculate the actual path for each target node pair;
[0027] According to the size of the actual path, the shortest path is obtained.
[0028] According to some embodiments of the present invention, obtaining the speed value according to the preset speed observation time period and the shortest path includes:
[0029] Calculating a speed mean according to the speed observation time period and the shortest path;
[0030] The speed mean is discretized by using a linear weighted aggregation method to obtain the speed value.
[0031] According to some embodiments of the present invention, performing partition preprocessing on the traffic network graph according to the speed value and a preset edge matching algorithm to obtain initial traffic network partitions includes:
[0032] Calculate the speed difference between each two target nodes according to the speed value;
[0033] Obtaining an edge weight corresponding to each edge of the traffic network graph according to the speed difference and a preset edge matching algorithm;
[0034] According to the edge weight, a target cut edge is obtained;
[0035] According to the target edge cutting, the traffic network graph is pre-partitioned to obtain initial traffic network partitions.
[0036] According to some embodiments of the present invention, obtaining a target edge cut according to the edge weight includes:
[0037] Performing edge folding processing on the edge weights to obtain candidate edge weights;
[0038] Discretize the candidate edge weights to obtain target edge weights;
[0039] The target edge weight is mapped to a preset vector space to obtain a target cut edge.
[0040] A traffic prediction device based on network partitioning according to a second embodiment of the present invention includes:
[0041] Traffic spatiotemporal data acquisition module, used to acquire traffic spatiotemporal data;
[0042] A graph representation processing module, configured to perform graph modeling and representation processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation;
[0043] A partition processing module, configured to partition the traffic network graph using a network partition model fused with the traffic spatiotemporal data to obtain a plurality of sub-network partitions;
[0044] Traffic prediction module, used to learn and predict the data of each sub-network partition using a preset traffic prediction model to obtain partition prediction data;
[0045] The fusion module is used to aggregate the partition prediction data to obtain the whole network traffic prediction data.
[0046] According to an embodiment of the present invention, a traffic prediction device based on network partitioning has at least the following beneficial effects: This traffic prediction device based on network partitioning obtains traffic spatiotemporal data through a traffic spatiotemporal data acquisition module; a graph representation processing module performs graph modeling and representation processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation; a partition processing module uses a network partition model fused with traffic spatiotemporal data to partition the traffic network graph to obtain multiple sub-network partitions; a traffic prediction module uses a preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data; and a fusion module aggregates the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of small and relatively large traffic data sets.
[0047] A traffic prediction device based on network partitioning according to a third aspect of an embodiment of the present invention includes:
[0048] at least one processor, and
[0049] a memory communicatively connected to the at least one processor; wherein,
[0050] The memory stores instructions, and the instructions are executed by the at least one processor so that when the at least one processor executes the instructions, the traffic prediction method based on network partitioning as described in the embodiment of the first aspect is implemented.
[0051] According to an embodiment of the present invention, a network partitioning-based traffic prediction device has at least the following beneficial effects: This network partitioning-based traffic prediction device uses the aforementioned network partitioning-based traffic prediction method to obtain spatiotemporal traffic data, perform graph modeling and characterization processing on the spatiotemporal traffic data, and obtain a traffic network graph and data representation; utilizes a network partitioning model fused with the spatiotemporal traffic data to partition the traffic network graph to obtain multiple sub-network partitions; utilizes a preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data; and aggregates the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of both small and relatively large traffic datasets.
[0052] According to the computer-readable storage medium of the fourth embodiment of the present invention, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the traffic prediction method based on network partitioning as described in the first embodiment.
[0053] The computer-readable storage medium according to an embodiment of the present invention has at least the following beneficial effects: This computer-readable storage medium executes the aforementioned network partitioning-based traffic prediction method by acquiring spatiotemporal traffic data, performing graph modeling and characterization processing on the spatiotemporal traffic data, and obtaining a traffic network graph and data representation; partitioning the traffic network graph using a network partitioning model fused with the spatiotemporal traffic data to obtain multiple sub-network partitions; learning and predicting the data of each sub-network partition using a preset traffic prediction model to obtain partition prediction data; and aggregating the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of both small and relatively large traffic datasets.
[0054] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0056] Figure 1 Flowchart of a traffic prediction method based on network partitioning according to an embodiment of the present invention;
[0057] Figure 2 for Figure 1 Flowchart of step S102;
[0058] Figure 3 for Figure 1 Flowchart of step S103;
[0059] Figure 4 for Figure 3 Flowchart of step S302;
[0060] Figure 5 for Figure 3 Flowchart of step S303;
[0061] Figure 6 for Figure 3 Flowchart of step S304;
[0062] Figure 7 for Figure 6 Flowchart of step S603;
[0063] Figure 8 Schematic diagram of the structure of a traffic prediction device based on network partitioning according to an embodiment of the present invention.
[0064] Reference numerals: 801, traffic spatiotemporal data acquisition module; 802, graph representation processing module; 803, partition processing module; 804, traffic prediction module; 805, fusion module. DETAILED DESCRIPTION
[0065] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.
[0066] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention.
[0067] In the description of the present invention, "several" means more than one, "plurality" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The use of "first" and "second" in the description is solely for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.
[0068] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0069] In the description of the present invention, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the exemplary expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0070] First, refer to Figure 1The traffic prediction method based on network partitioning according to an embodiment of the present invention includes:
[0071] S101, obtaining traffic spatiotemporal data;
[0072] S102, performing graph modeling and representation processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation;
[0073] S103, partitioning the traffic network graph using the network partitioning model fused with the traffic spatiotemporal data to obtain multiple sub-network partitions;
[0074] S104, using a preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data;
[0075] S105: Summarize the partition prediction data to obtain the whole network traffic prediction data.
[0076] In the process of traffic prediction, we first need to obtain traffic spatiotemporal data. Then, we perform graph modeling and representation processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation. The traffic network graph is a weighted directed graph G = (v, ε), where v is a priority node set with |v| = N. Then, the traffic prediction can be expressed as Among them, X t is a historical traffic dataset sampled from N sensor locations at time t, is the prediction set, f(.) is the prediction function of the traffic prediction model, and τ and h are the lengths of the past and future time windows, respectively. The traffic network graph is partitioned using a network partitioning model fused with spatiotemporal traffic data to obtain multiple sub-network partitions. The network partitioning model incorporates a data-parallel training method and a partitioning algorithm based on edge betweenness centrality preprocessing. The network partitioning model performs coarsening, initial partitioning, and refinement on the traffic network graph to obtain multiple sub-network partitions. Furthermore, a pre-set traffic prediction model is used to learn and predict the data for each sub-network partition, obtaining partition prediction data. Traffic prediction is then processed using the sub-network partitioning of the traffic prediction model based on a graph convolution algorithm to obtain partition prediction data for each sub-network partition. Finally, the partition prediction data are aggregated to obtain traffic prediction data for the entire network. This method, which takes into account the topological characteristics of the traffic network graph and introduces network partitioning, can improve the accuracy and training efficiency of traffic prediction for both small and relatively large traffic datasets.
[0077] It should be explained that betweenness centrality is a measure of centrality in a graph based on the shortest path
[43] . Edge-Betweenness Centrality (EBC) is defined as the number of shortest paths passing through an edge in a graph, which is defined as Where δ(i,j) represents the number of different shortest paths passing through nodes i and j, and δ(i,j|e) represents the number of shortest paths (i,j) that contain e as an inner edge. Edge cutting refers to the process of dividing a graph G = (v,ε) into two subsets v1 and v2 by cutting an edge C = (v1,v2). Removing this cut edge makes the graph lose its connection. Edge collapsing is an operation that removes an edge from a graph and merges the two vertices it previously connected. Given a graph G = (v,ε), which contains an edge e = (i,j), i≠j, collapsing e leads to a new graph G' = (v',ε'), where G' = (v',ε') contains a new node k, and k satisfies v' = (v'\{i,j}∪{k}).
[0078] Reference Figure 2 In some embodiments, step S102 includes:
[0079] S201, generating a graph node according to the acquired measurement sensor position;
[0080] S202, performing edge prediction processing on the graph nodes according to the preset edge prediction conditions to obtain traffic directed edges;
[0081] S203: Performing a graph representation on the traffic spatiotemporal data according to the traffic directed edges to obtain a traffic network graph.
[0082] During traffic prediction, graph nodes are generated based on the acquired sensor locations. Each road segment containing a sensor station is considered a graph node. Furthermore, edge predictions are performed on these graph nodes based on distance-based or connection-based edge prediction conditions to generate directed traffic edges.
[0083] Specifically, when edge prediction is performed on graph nodes according to the distance-based edge prediction condition, the construction of a traffic directed edge depends on the Euclidean space distance between the two graph nodes. If the two graph nodes are close enough, they are considered to be related. Therefore, the corresponding adjacency matrix A containing edge information can be constructed based on the Gaussian kernel method; the connectivity and Euclidean space distance between graph node i and graph node j are analyzed by using the adjacency matrix. According to the preset distance threshold, it is determined whether graph node i and graph node j are connected. If graph node i and graph node j are connected, there is a traffic directed edge. If graph node i and graph node j are not connected, there is no traffic directed edge.
[0084] Specifically, when edge prediction is performed on graph nodes based on the connection-based edge prediction condition, an edge is defined after the actual connection between different road segments. If there is a connection between two road segments, a directed edge is constructed.
[0085] Finally, the traffic spatiotemporal data is represented by a graph based on the traffic directed edges to obtain a traffic network graph. Through the above method, graph nodes and traffic directed edges can be obtained more conveniently, thereby constructing a traffic network graph and extracting its topological features.
[0086] Reference Figure 3 In some embodiments, step S103 includes:
[0087] S301, obtaining a target node set in a traffic network graph;
[0088] S302, calculating the shortest path to the target node set;
[0089] S303, obtaining a speed value according to a preset speed observation time period and the shortest path;
[0090] S304, performing partition preprocessing on the traffic network graph according to the speed value and a preset edge matching algorithm to obtain initial traffic network partitions;
[0091] S305: Refine the initial traffic network partition to obtain multiple sub-network partitions.
[0092] In order to improve the overall efficiency of traffic prediction, a preset network partitioning model can be used to partition the traffic network graph, decomposing the large traffic network graph into S sub-network partitions. In some embodiments, a data parallel training scheme can be used to train the s sub-network partitions separately and simultaneously on a corresponding number of independent computing devices. This data parallel training scheme can achieve η under ideal conditions. s =t1 / t s times faster, where t1 represents the time to run the model on a single computing node, and t s It represents the time to run the model on s parallel computing nodes.
[0093] Specifically, to improve prediction efficiency, when partitioning a traffic network graph, the target node set of the traffic network graph is first obtained. Path calculation is then performed on the target nodes within the target node set to obtain the shortest path. Furthermore, speed values are calculated based on the preset speed observation time period and the shortest path. Speed values are then used to match the edge weights of each directed traffic edge using an edge matching algorithm. The traffic network graph is then pre-partitioned based on the edge weights to obtain initial traffic network partitions. Finally, these initial traffic network partitions are refined to obtain final sub-network partitions.
[0094] Reference Figure 4 In some embodiments, step S302 includes:
[0095] S401, randomly pairing the target nodes of the target node set to obtain target node pairs;
[0096] S402, calculating the actual path of each target node pair;
[0097] S403: Obtain the shortest path according to the actual path size.
[0098] Specifically, when obtaining the shortest path, the target nodes in the target node set can be randomly paired to obtain target node pairs. Then, based on the coordinate information of each target node, the actual path of each target node pair is calculated. The actual paths of all node pairs are compared to obtain the shortest path.
[0099] Reference Figure 5 In some embodiments, step S303 includes:
[0100] S501, calculating the speed mean based on the speed observation time period and the shortest path;
[0101] S502: discretize the speed mean using a linear weighted aggregation method to obtain a speed value.
[0102] In order to improve the prediction accuracy, the embodiment of the present application introduces a speed matching mechanism. Specifically, in order to "match" the speed values of two nodes (i.e., two road sections) of an edge, a measurement value, namely the speed value Speed-Value (SV), is introduced, which is represented by v. In the calculation process of the speed value, the preset speed observation time period is first obtained. For example, three representative speed observation time periods can be extracted, namely the morning peak period (7:00--10:00), the evening peak period (16:00--19:00) and the idle period (0:00--3:00), and the weighted average value is calculated, and the weighted average value is used as the speed mean. Among them, the speed observation values of the peak period and the idle period can reflect the congestion speed and the maximum speed respectively. Among them, the average speed of the graph node i is represented by O i The calculation formula is Where Q is the number of sampling days in the dataset used; P is the number of timestamps in the dedicated period; z and u are the index numbers of Q and P respectively; x represents the speed observation value, represents the speed observation value at time stamp u on day z. Subsequently, O can be obtained for the morning peak period, evening peak period, and idle period respectively. i , respectively expressed as and
[0103] Furthermore, since traffic observation values change over time, in order to capture dynamic changes and better perform traffic predictions, after calculating the speed mean, it is necessary to use the linear weighted aggregation method to discretize the speed mean to obtain the speed value. This process can be expressed as Among them, θ i Represents the calculated velocity value of graph node i; is the average speed during the morning rush hour, is the average speed during the evening peak period, is the average speed during the idle period, λ mp ,λ ep and λ ih They are and The weight of λ; b is the basic factor, which can control the degree of discretization. It should be noted that the weight λ mp ,λ ep and λ ih It can be preset according to the actual needs of the user, and the weight λ mp ,λ ep and λ ih Can default to 0.4, 0.4, and 0.2.
[0104] Reference Figure 6 In some embodiments, step S304 includes:
[0105] S601, calculating the speed difference between every two target nodes according to the speed value;
[0106] S602, obtaining an edge weight corresponding to each edge of the traffic network graph based on the speed difference and a preset edge matching algorithm;
[0107] S603, obtaining the target cut edge according to the edge weight;
[0108] S604: Pre-partition the traffic network graph according to the target edge cutting to obtain initial traffic network partitions.
[0109] In order to improve the prediction performance, when partitioning the traffic network graph, the edge collapse process can also be introduced in the stage of coarsening the traffic network graph. Specifically, first, based on the speed value of each target node, the speed difference between each two target nodes is calculated, that is, the speed difference between the two endpoints of the edge e is calculated, that is, |v i -v j |. Then, according to the speed difference and the preset edge matching algorithm, the edge weight corresponding to each edge is calculated. At the same time, the calculated edge weight can be amplified according to the speed difference. This process can be expressed as in, in, is the amplification factor, v r It is the difference between the maximum and minimum speed values between nodes; the constant terms γ1, γ2, γ3, γ4, γ5, and γ6 are used to suppress over-dispersion results. Usually, the Monte Carlo method can be used to obtain an appropriate combination of this set of γ; is the amplified edge weight. Furthermore, the partitioner within the network partitioning model can use these amplified edge weights to determine whether an edge should be collapsed. This allows for filtering of directed traffic edges to obtain target cut edges. Finally, the traffic network graph is pre-partitioned based on the target cut edges, dividing the graph into multiple initial traffic network partitions.
[0110] Reference Figure 7 In some embodiments, step S603 includes:
[0111] S701, performing edge folding processing on edge weights to obtain candidate edge weights;
[0112] S702, discretize the candidate edge weights to obtain the target edge weight;
[0113] S703: Map the target edge weight to a preset vector space to obtain a target cut edge.
[0114] Specifically, when edge weights are collapsed, the traffic network graph is coarsened by collapsing edges with low EBCs. Since two graph nodes (i.e., road segments) with similar speed values are more likely to share the same flow direction within the road network, the edge connecting them should be retained in the subgraph. Furthermore, edges with similar speed values between the two graph nodes are collapsed. By collapsing the traffic directed edges in the traffic network graph, candidate edge weights corresponding to the retained traffic directed edges can be obtained. For example, according to a preset edge matching algorithm, discrete weights are assigned to edges based on their EBCs. On the one hand, edges with low EBCs are assigned higher weights, while edges with high EBCs are assigned lower weights. These edges are preferentially included in the matching, thus causing the edges with low EBCs to be collapsed. On the other hand, given that two equally important high EBC cut edges may be assigned different weights, the assigned candidate edge weights need to be discretized to avoid exaggerated EBCs when the node sample is small. This ensures that all edges within a specific approximate EBC range are assigned the same weight.
[0115] Furthermore, since the EBC of edges in a road network always follows a power-law distribution, the target edge weight is mapped to a preset vector space to obtain the target cut edge. The mapping process can be expressed as Among them, e ij represents the edge connecting nodes i and j; w e (e ij) is the weight assigned to edge e; ⊥⊥⊥(.) represents the discretization process by rounding.
[0116] The traffic prediction method of the embodiment of the present application obtains traffic spatiotemporal data, performs graph modeling and characterization processing on the traffic spatiotemporal data, and obtains a traffic network graph and data representation; uses the network partitioning model fused with the traffic spatiotemporal data to partition the traffic network graph to obtain multiple sub-network partitions; uses a preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data; summarizes the partition prediction data to obtain full network traffic prediction data. This traffic prediction method takes into account the topological characteristics of the traffic network graph and introduces network partitioning. By merging traffic data (i.e., speed values) and network topology structure characteristics to divide the traffic network, it can improve the accuracy of small and relatively large traffic data sets. At the same time, in terms of model training, a data parallel training framework is adopted to improve the overall training efficiency.
[0117] Secondly, refer to Figure 8 , a traffic prediction device based on network partitioning according to an embodiment of the present invention includes:
[0118] Traffic spatiotemporal data acquisition module 801, used to acquire traffic spatiotemporal data;
[0119] A graph representation processing module 802 is used to perform graph modeling and representation processing on traffic spatiotemporal data to obtain a traffic network graph and data representation;
[0120] Partition processing module 803, used to partition the traffic network graph using the network partition model fused with the traffic spatiotemporal data to obtain multiple sub-network partitions;
[0121] Traffic prediction module 804, used to learn and predict the data of each sub-network partition using a preset traffic prediction model to obtain partition prediction data;
[0122] The fusion module 805 is used to aggregate the partition prediction data to obtain the whole network traffic prediction data.
[0123] The specific implementation of the network partition-based traffic prediction device is basically the same as the specific embodiment of the above-mentioned network partition-based traffic prediction method, and will not be repeated here.
[0124] In a third aspect, a traffic prediction device based on network partitioning according to an embodiment of the present invention comprises at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions, and the instructions are executed by the at least one processor so that when the at least one processor executes the instructions, the traffic prediction method based on network partitioning according to the embodiment of the first aspect is implemented.
[0125] According to an embodiment of the present invention, a network partitioning-based traffic prediction device has at least the following beneficial effects: This network partitioning-based traffic prediction device uses the aforementioned network partitioning-based traffic prediction method to obtain spatiotemporal traffic data, perform graph modeling and characterization processing on the spatiotemporal traffic data, and obtain a traffic network graph and data representation; utilizes a network partitioning model fused with the spatiotemporal traffic data to partition the traffic network graph to obtain multiple sub-network partitions; utilizes a preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data; and aggregates the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of both small and relatively large traffic datasets.
[0126] In a fourth aspect, the present invention further provides a computer-readable storage medium having computer-executable instructions stored therein, the computer-executable instructions being used to cause a computer to execute the traffic prediction method based on network partitioning according to the embodiment of the first aspect.
[0127] The computer-readable storage medium according to an embodiment of the present invention has at least the following beneficial effects: This computer-readable storage medium executes the aforementioned network partitioning-based traffic prediction method by acquiring spatiotemporal traffic data, performing graph modeling and characterization processing on the spatiotemporal traffic data, and obtaining a traffic network graph and data representation; partitioning the traffic network graph using a network partitioning model fused with the spatiotemporal traffic data to obtain multiple sub-network partitions; learning and predicting the data of each sub-network partition using a preset traffic prediction model to obtain partition prediction data; and aggregating the partition prediction data to obtain full-network traffic prediction data. This method takes into account the topological characteristics of the traffic network graph and introduces network partitioning, which can improve the accuracy and training efficiency of both small and relatively large traffic datasets.
[0128] While the embodiments of the present invention have been described in detail above with reference to the accompanying drawings, the present invention is not limited to the embodiments described above. Various modifications may be made within the scope of knowledge possessed by a person skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof may be combined with one another unless there is a conflict.
Claims
1. Traffic prediction method based on network partitioning, characterized by: include: Obtaining spatiotemporal traffic data; Performing graph modeling and characterization processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation; Get the target node set in the traffic network graph; Calculating the shortest path to the target node set; Obtaining a speed value according to a preset speed observation time period and the shortest path; Calculate the speed difference between each two target nodes according to the speed value; Obtaining an edge weight corresponding to each edge of the traffic network graph according to the speed difference and a preset edge matching algorithm; The edge weight is amplified and calculated according to the speed difference to obtain an amplified edge weight; wherein the amplified edge weight is defined as: in, in, represents the amplified edge weight; w e (e ij ) indicates the assignment to edge e ij The weight, e ij represents the edge connecting nodes i and j; represents the amplification factor; v r Indicates the difference between the maximum and minimum speed values between nodes; |v i -v j | represents edge e ij The difference in velocity between the two endpoints; γ1, γ2, γ3, γ4, γ5, γ6 represent constant terms; Obtaining a target cut edge according to the amplified edge weight; Pre-partitioning the traffic network graph according to the target edge cutting to obtain initial traffic network partitions; Refining the initial traffic network partition to obtain multiple sub-network partitions; Use the preset traffic prediction model to learn and predict the data of each sub-network partition to obtain partition prediction data; The partition prediction data are aggregated to obtain the whole network traffic prediction data.
2. The traffic prediction method based on network partitioning according to claim 1 is characterized in that: The graph modeling and characterization processing of the traffic spatiotemporal data to obtain a traffic network graph and data characterization includes: Generate graph nodes based on the obtained measurement sensor positions; Performing edge prediction processing on the graph nodes according to preset edge prediction conditions to obtain traffic directed edges; The traffic spatiotemporal data is represented by a graph according to the traffic directed edges to obtain a traffic network graph.
3. The traffic prediction method based on network partitioning according to claim 1 is characterized in that: The calculating the shortest path to the target node set includes: Randomly pairing the target nodes of the target node set to obtain target node pairs; Calculate the actual path for each target node pair; According to the size of the actual path, the shortest path is obtained.
4. The traffic prediction method based on network partitioning according to claim 1 is characterized in that: The obtaining of the speed value according to the preset speed observation time period and the shortest path includes: Calculating a speed mean according to the speed observation time period and the shortest path; The speed mean is discretized by using a linear weighted aggregation method to obtain the speed value.
5. The traffic prediction method based on network partitioning according to claim 1 is characterized in that: Obtaining a target edge cut according to the edge weight includes: Performing edge folding processing on the edge weights to obtain candidate edge weights; Discretize the candidate edge weights to obtain target edge weights; The target edge weight is mapped to a preset vector space to obtain a target cut edge.
6. Traffic prediction device based on network partitioning, characterized in that: include: Traffic spatiotemporal data acquisition module, used to acquire traffic spatiotemporal data; A graph representation processing module, configured to perform graph modeling and representation processing on the traffic spatiotemporal data to obtain a traffic network graph and data representation; A partition processing module is configured to obtain a target node set in a traffic network diagram; calculate the shortest path to the target node set; obtain a speed value based on a preset speed observation time period and the shortest path; calculate a speed difference between each two target nodes based on the speed value; obtain an edge weight corresponding to each edge of the traffic network diagram based on the speed difference and a preset edge matching algorithm; amplify the edge weight based on the speed difference to obtain an amplified edge weight; wherein the amplified edge weight is defined as: in, in, represents the amplified edge weight; w e (e ij ) indicates the assignment to edge e ij The weight, e ij represents the edge connecting nodes i and j; represents the amplification factor; v r Indicates the difference between the maximum and minimum speed values between nodes; |v i -v j | represents edge e ij The speed difference between the two endpoints is calculated; γ1, γ2, γ3, γ4, γ5, and γ6 represent constant terms; a target cut edge is obtained according to the amplified edge weight; the traffic network graph is pre-partitioned according to the target cut edge to obtain an initial traffic network partition; the initial traffic network partition is refined to obtain multiple sub-network partitions; Traffic prediction module, used to learn and predict the data of each sub-network partition using a preset traffic prediction model to obtain partition prediction data; The fusion module is used to aggregate the partition prediction data to obtain the whole network traffic prediction data.
7. Traffic prediction device based on network partitioning, characterized in that, include: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions, and the instructions are executed by the at least one processor so that the at least one processor implements the network partition-based traffic prediction method according to any one of claims 1 to 5 when executing the instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the traffic prediction method based on network partitioning according to any one of claims 1 to 5.
Citation Information
Patent Citations
Road network data processing method, device and equipment
CN113160545A