Graph fusion traffic flow prediction method and traffic control management system
The multi-layer attention-based graph fusion method addresses the limitations of existing models by incorporating road function similarity, improving traffic flow forecasting accuracy through spatial and functional graph analysis.
Patent Information
- Application Number
- JP2025183308
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-16
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing graph neural network models for traffic flow forecasting primarily consider relationships between adjacent roads, ignoring important factors that affect road traffic flow, leading to suboptimal prediction accuracy.
A multi-layer attention-based graph fusion method that constructs road spatial and function similarity relationship graphs, aggregates information using a graph attention network, and extracts short-term and global time series information for accurate forecasting.
Improves prediction accuracy by considering both spatial connectivity and functional similarity between roads, enhancing the model's expressive power to capture complex traffic flow modes.
Smart Images

Figure 2026026090000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to the field of time series data prediction, and more particularly to a method, medium and device for graph fusion traffic flow prediction based on multi-layer attention. [Background technology]
[0002] As vehicle ownership continues to increase, the demand for urban traffic system control is also growing day by day. Building an efficient smart traffic system has become an important task to support scientific management decisions for transportation. In particular, achieving accurate traffic flow forecasting is considered a key component of a smart traffic system. Accurate traffic flow forecasting not only provides traffic managers with real-time data support, but also helps them formulate scientific and effective control strategies. By analyzing historical traffic data and real-time traffic information, future traffic flow conditions can be predicted timely and accurately, allowing for proactive responses to potential congestion and changes in traffic conditions. How to fully utilize historical traffic data and real-time traffic information is a key challenge in traffic flow forecasting, and the introduction of machine learning algorithms is one way to solve this problem.
[0003] Early machine learning methods focused only on specific roads, predicting future traffic flow by studying trends in past traffic data. However, because traffic conditions between roads interact with each other, these methods were unable to effectively extract the flow dependencies between roads. In recent years, deep learning, particularly graph neural networks, has become increasingly popular for traffic flow forecasting. Graph neural networks' powerful spatial modeling capabilities enable them to effectively learn complex inter-road dependencies. However, existing graph neural network prediction models primarily consider the relationships between adjacent roads and ignore many other important factors that affect road traffic flow, making their prediction accuracy essential for further improvement. Summary of the Invention
[0004] The purpose of this invention is to address the above-mentioned problems present in the graph neural networks used in road flow forecasting in the prior art by providing a method, medium, and device for graph fusion traffic flow forecasting based on multi-layer attention.The present invention proposes a new algorithm for calculating road function similarity, constructs two different relationship graphs, fuses them, aggregates information, and then simultaneously extracts short-term time series information and global time series information to achieve accurate traffic flow forecasting.
[0005] The specific technical solutions adopted by the present invention are as follows: In a first embodiment, the present invention provides a multi-layer attention-based graph fusion traffic flow forecasting method, which includes: S1 uniformly samples the historical traffic flow data of all roads in the target road network with equal sample amounts at different sampling intervals to obtain multiple historical flow sequences representing different data periods for each road, where the sampling intervals include at least three types: minute level, day level, and week level. S2 constructs a road spatial relationship graph for all roads in the target road network based on the connectivity between the roads, the road spatial relationship graph being composed of a first vertex set, a first edge set, and a first adjacency matrix, where each vertex in the first vertex set represents a road, the vertex attribute is the past traffic flow sequence of the road represented by the vertex, each edge in the first edge set represents the existence of a spatial connectivity relationship between the roads corresponding to two vertices, and the first adjacency matrix is used to record the edge connection relationship between the vertices. S3 constructs a road function similarity relationship graph corresponding to each data cycle for all roads in the target road network based on the functional similarity between roads based on the past flow sequences for each data cycle. The road function similarity relationship graph is composed of a second vertex set, a second edge set, and a second adjacency matrix, where the second vertex set is the same as the first vertex set, and each edge in the second edge set represents the existence of a road function similarity relationship between roads corresponding to two vertices, and the second adjacency matrix is used to record the edge connection relationship between the vertices. For a road function similarity relationship to exist between roads corresponding to two vertices, the road geospatial distance must be smaller than a first threshold and the road past flow sequence distance must be smaller than a second threshold. The road geospatial distance is the normalized edit distance between spatial subgraphs centered on two vertices in the road spatial relationship graph. The road past flow sequence distance is the normalized sequence distance between the past flow sequences in the current data cycle of the roads corresponding to the two vertices. S4 performs adjacency matrix fusion between the road spatial relationship graph and the road function similarity relationship graph corresponding to each data period by using an attention mechanism, and obtains a fused adjacency matrix corresponding to each data period. S5 obtains a vertex feature matrix by embedding the past flow sequence of all roads in the target road network for each data period. Then, the fused adjacency matrix and vertex feature matrix for each data period are input into the graph attention network to obtain output results corresponding to each data period. Finally, weighted fusion is performed on the output results corresponding to all data periods to obtain the future flow prediction results for the target road network.
[0006] In a preferred example of the first embodiment, the data period is divided into three types, and the sampling intervals correspond to the minute level, the day level, and the week level, respectively.
[0007] In a preferred example of the first embodiment, the data period is divided into three types, and the sampling intervals are 15 minutes, 24 hours, and 7 days, respectively.
[0008] JPEG2026026090000002.jpg58152
[0009]
number
[0010]
number
[0011]
number
[0012]
number
[0013]
number
[0014] JPEG2026026090000010.jpg52153
[0015]
number
[0016]
number
[0017]
number
[0018]
number
[0019] In a preferred embodiment of the first embodiment, the graph attention network is constructed by stacking multiple graph attention layers. The input of each graph attention layer is the fused adjacency matrix and the vertex feature vector matrix output by the graph attention layer of the previous layer. A multi-head self-attention algorithm is used within the layer to aggregate the feature vectors of adjacent nodes to each central node, and then a new vertex feature vector matrix is output to the next layer. The outputs of all attention layers are concatenated and output by an exponential linear unit activation function, and finally processed by an additional graph attention layer to obtain the output result of the graph attention network.
[0020] As a preferred example of the first embodiment, when the output results corresponding to all data periods are weighted and combined, the output results corresponding to each data period and the learnable parameter matrix are subjected to a Hadamard product calculation, and then the results of each Hadamard product calculation are summed to obtain the future flow rate forecast result for the target road network.
[0021] In a second embodiment, the present invention provides a computer program product including computer programs / instructions, which, when executed by a processor, realize the multi-layer attention-based graph fusion traffic volume forecasting method according to any one of the first embodiments.
[0022] In a third embodiment, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, realizes the multi-layer attention-based graph fusion traffic volume forecasting method described in any one of the first embodiments.
[0023] In a fourth embodiment, the present invention provides a computing device including a memory and a processor.
[0024] The memory is for storing computer programs.
[0025] The processor is configured to realize the multi-layer attention based graph fusion traffic volume forecasting method according to any one of the first embodiments when the computer program is executed.
[0026] The present invention has the following beneficial effects over the conventional techniques. This invention constructs two types of graphs based on road spatial relationships and road functional similarity relationships, and then combines these two types of graphs. When predicting traffic flow for each road, it not only considers the traffic volume of neighboring road sections, but also the traffic volume of roads with similar functions, thereby providing more accurate prediction results. When constructing the road functional similarity graph, this invention considers both road change patterns and past traffic flow sequences, ensuring the accuracy of identifying roads with similar functions and allowing more accurate information to be learned during graph modeling. Based on a graph attention network, this invention utilizes multi-head self-attention to learn different traffic flow relationships in parallel, thereby improving the model's expressive power, capturing complex traffic flow modes between different points, and improving prediction accuracy. [Brief explanation of the drawings]
[0027] [Figure 1] FIG. 1 is a step flow diagram of a graph fusion traffic flow prediction method based on multi-layer attention. [Figure 2] 1 is a schematic diagram of a road geospatial distance calculation process between roads corresponding to two vertices; [Figure 3] 1 is a schematic diagram of a process for calculating the road past flow sequence distance between roads corresponding to two vertices; [Figure 4] FIG. 1 is a schematic diagram of the configuration of a graph fusion traffic flow prediction model. DETAILED DESCRIPTION OF THE INVENTION
[0028] In order to make the above-mentioned objects, features, and advantages of the present invention more clearly understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can be implemented in many ways different from those described in the present invention, and those skilled in the art can make similar improvements without departing from the scope of the present invention, so the present invention is not limited to the specific embodiments disclosed below. The technical features in each embodiment of the present invention can be combined with each other, provided that they do not conflict with each other.
[0029] In the description of the present invention, the terms "first" and "second" are used for distinction purposes only and are not to be construed as indicating or implying relative importance or the number of technical features being described. Thus, a feature qualified as "first" or "second" may explicitly or implicitly include at least one of the feature.
[0030] In a preferred embodiment of the present invention, a multi-layer attention-based graph fusion traffic flow forecasting method is provided, the specific steps of which are shown in S1 to S5. In addition to constructing a road spatial relationship graph that records the spatial connection relationships between roads, this method also introduces a new road function similarity calculation algorithm to construct a road function similarity relationship graph. After fusing these two different relationship graphs, a graph attention network is used to extract more information from the fused information, achieving accurate traffic flow forecasting. As shown in Figure 1, the specific implementation of the above steps S1 to S5 is described in detail below.
[0031] S1: For the historical traffic flow data of all roads in the target road network, uniform sampling is performed with equal sample amounts at different sampling intervals to obtain multiple historical flow sequences representing different data periods for each road, where the sampling intervals include at least three types: minute level, day level, and week level. The specific number and length of the above data periods may be optimized based on the final prediction performance, but it should be noted that the sampling interval includes at least three types of data periods corresponding to minute, day, and week levels.
[0032] In this invention, the minute level refers to the flow rate data status relatively close to the current time, with the sampling interval being one or ten minutes. The reason for considering the minute level data period is that the flow rate status relatively close to the current time directly affects the subsequent flow rate change trend.
[0033] In this invention, the daily level refers to the flow data status in the same time zone as the current time on a past date, with the sampling interval being the day. The reason for considering the daily data cycle is that there are often similarities in the flow status in the same time zone every day, and corresponding information can be extracted from that to assist in flow forecasting.
[0034] In this invention, the weekly level refers to the flow data status in the same time period as the current time in the past week, with a sampling interval of one week. The reason why the weekly data period is taken into consideration is that similar patterns of change often exist in the flow status at the same time each week, and corresponding information can be extracted from this to assist in flow forecasting.
[0035] JPEG2026026090000017.jpg33153
[0036] To facilitate the subsequent description of the present invention, the number of sampled samples is the same despite different sampling intervals, i.e., the dimension of the past flow sequence in different data periods is the same, and the dimension of the past flow sequence, i.e., the number of sampled samples, can be denoted as T. The last past time before the time period to be predicted in the present invention can be denoted as the current time t, and the traffic flow data constituting the past flow sequence are all road traffic flows before the current time t. In actual application scenarios, these road traffic flow data can be obtained by flow sensors installed on roads.
[0037] In practical applications, traffic flow sensors are installed on roads within a target road network to obtain historical traffic flow data for each road. Specific types of traffic flow sensors vary, including camera surveillance systems and vehicle speed detection radar. Camera surveillance systems are typically installed at arterial intersections, expressway entrances and exits, road sections prone to congestion, and around large event venues. They use cameras to capture real-time traffic images and obtain information such as the number of vehicles, vehicle types, driving direction, and speed. Vehicle speed detection radars are typically installed on the roadside or at stands of expressways, expressways, and arterial roads and use microwave or laser reflection principles to measure the speed and volume of passing vehicles. The specific placement and density of traffic flow sensors can be determined based on the actual conditions of the target road network, with the criterion being that they can record traffic flow data for all roads within the target road network.
[0038] In practical applications, in addition to placing traffic flow sensors on roads within the target road network, IoT devices with data transmission and processing capabilities can also be placed to form edge nodes (vertices). The sensor data collected by all traffic flow sensors undergoes a certain amount of data processing at the edge nodes, after which it is transmitted in real time to the central data processing system via IoT communication equipment with transmission capabilities. Real-time transmission of sensor data is primarily achieved using low-latency, highly reliable wireless network technologies (e.g., 4G / 5G or LoRa) to ensure that traffic flow information is collected in real time in the central data processing system. Data is encrypted during transmission to ensure data integrity and security. The hardware configuration of the central data processing system can be a server equipped with a multi-core CPU and GPU, or an FPGA cluster that supports real-time data processing. The central data processing system receives and processes stream data from multiple edge nodes using a big data processing platform (e.g., Apache Kafka and Apache Spark), aggregates and stores the data, and uniformly samples the historical traffic flow data of all roads in the target road network with equal sample amounts at different sampling intervals to obtain multiple historical traffic flow sequences representing different data periods for each road.
[0039] S2: For all roads in the target road network, construct a road spatial relationship graph based on the connectivity between roads. The road spatial relationship graph is composed of a first vertex set, a first edge set, and a first adjacency matrix, where each vertex in the first vertex set represents a road, the vertex attribute is the past traffic flow sequence of the road represented by the vertex, each edge in the first edge set represents the existence of a spatial connectivity relationship between the roads corresponding to two vertices, and the first adjacency matrix is used to record the edge connection relationship between the vertices.
[0040] JPEG2026026090000018.jpg83155
[0041] S3: For all roads in the target road network, a road function similarity relationship graph corresponding to each data cycle is constructed based on the functional similarity between roads based on the past flow sequences for each data cycle. The road function similarity relationship graph is composed of a second vertex set, a second edge set, and a second adjacency matrix, where the second vertex set is the same as the first vertex set, and each edge in the second edge set represents the existence of a road function similarity relationship between roads corresponding to two vertices, and the second adjacency matrix is used to record the edge connection relationship between the vertices. For a road function similarity relationship to exist between roads corresponding to two vertices, the road geospatial distance must be smaller than a first threshold and the road past flow sequence distance must be smaller than a second threshold. The road geospatial distance is the normalized edit distance between spatial subgraphs centered on two vertices in the road spatial relationship graph. The road past flow sequence distance is the normalized sequence distance between the past flow sequences in the current data cycle of the roads corresponding to the two vertices.
[0042] The road function similarity relationship graph needs to be constructed separately for each data period, and although the construction method is the same, the past flow sequence used in the construction process is different. The road function similarity relationship graph corresponding to each data period needs to measure the road past flow sequence similarity using the past flow sequence corresponding to such data period.
[0043] JPEG2026026090000019.jpg76153
[0044] JPEG2026026090000020.jpg80153
[0045] In the present invention, when determining whether a road function similarity relationship exists between roads with corresponding two vertices, two dimensions, namely, the road geographical spatial distance and the road past traffic flow sequence distance between the two roads, must be considered at the same time. The shorter the road geographical spatial distance, the more similar the spatial topology relationship of the local road network, and the shorter the road past traffic flow sequence distance, the more similar the traffic flow change law on the road. These two dimensions can represent the degree of functional similarity between roads to some extent.
[0046] JPEG2026026090000021.jpg122153
[0047] JPEG2026026090000022.jpg14153
[0048]
number
[0049]
number
[0050]
number
[0051]
number
[0052]
number
[0053] JPEG2026026090000030.jpg23155
[0054] JPEG2026026090000031.jpg83155
[0055]
number
[0056]
number
[0057]
number
[0058]
number
[0059] JPEG2026026090000038.jpg65153
[0060] JPEG2026026090000039.jpg165156
[0061] JPEG2026026090000040.jpg30157
[0062] JPEG2026026090000041.jpg52153
[0063]
number
[0064]
number
[0065] S5: The vertex feature matrix is obtained by embedding the past flow sequence of all roads in the target road network for each data period. The fused adjacency matrix and vertex feature matrix for each data period are input into the graph attention network to obtain the output results for each data period. The output results for all data periods are weighted and fused to finally obtain the future flow prediction results for the target road network.
[0066] JPEG2026026090000045.jpg85153
[0067] In the embodiment of the present invention, for ease of explanation, the number of stacked layers of each graph attention layer is F, and the GAT is composed of F graph attention layers. The specific value of F may be optimized, and in this embodiment, F=6 is optimized. Each graph attention layer may have different weights and attention parameters, and the calculation process of the attention weights is expressed by the following formula:
[0068]
number
[0069] Furthermore, when the present invention updates the vertex feature vector matrix, the multi-head self-attention adopted can be expressed as follows:
[0070]
number
[0071] JPEG2026026090000050.jpg27154
[0072] JPEG2026026090000051.jpg15153
[0073]
number
[0074] JPEG2026026090000054.jpg14153
[0075]
number
[0076] JPEG2026026090000057.jpg31153
[0077]
number
[0078] As can be seen from the above, steps S1 to S5 of the present invention can accurately predict future traffic flow rates for a target road network by modeling past traffic flow data. However, please note that steps S1 to S5 above correspond to a single graph fusion traffic flow prediction model, the model structure of which is shown in Figure 4, and that it contains many trainable parameters. Before using the graph fusion traffic flow prediction model for actual inference, supervised learning must be performed on a training dataset in advance to obtain optimal parameters necessary for accurate inference. Supervised learning of models is a conventional technique and is not discussed in this invention.
[0079] The data processing in steps S2 to S5 can all be executed on a central data processing system. After the central data processing system obtains the future flow rate forecast results for the target road network through steps S1 to S5, it can apply them to actual traffic management. For example, it can send the future flow rate forecast results for the target road network to a traffic control management system, which is convenient for traffic management departments to manage and control traffic.
[0080] In an embodiment of the present invention, the traffic control management system can set corresponding control functions according to demand, and the selectable control function modules are as follows: This is a traffic flow visualization module that visualizes the historical, current, and future flow conditions of the target road network in the GUI interface of the traffic control management system. The traffic control management system, a real-time traffic light control module, adjusts the duration of traffic lights at different intersections in real time using its built-in control logic based on the received future traffic flow forecast for the target road network. For example, for an intersection with traffic lights, the traffic control management system optimizes the duration of traffic lights in each direction based on the current vehicle flow, vehicle speed, congestion level, and future traffic flow forecast for the four directions of the intersection, thereby reducing the vehicle flow entering sections where congestion will soon occur. If traffic volume increases significantly in a certain direction at the intersection, the system extends the green light duration in that direction, allowing more vehicles to pass smoothly. Because intersections have sidewalks and roadways, sidewalks with parts that do not match the direction of roadway traffic (e.g., sidewalks that intersect perpendicularly with the roadway) directly reduce the traffic efficiency of the roadway. When the system predicts peak traffic volumes (e.g., during rush hour or after work), it may adaptively extend the green light duration for the roadway and shorten the green light duration for the sidewalk. A vehicle flow rate display early warning module, when a vehicle flow rate display device is installed on a road network, can display the current and future vehicle flow rate on the road section ahead where the vehicle flow rate display device is located in advance, allowing the driver to understand the vehicle flow situation on the road ahead in real time.In a road network where smart network vehicles are relatively widespread, if the future vehicle flow rate on a road section on the vehicle's driving route is predicted to be likely to cause congestion, early warning information can be sent to the in-vehicle terminal or navigation software to notify the vehicle owner of the possibility of congestion ahead and to warn them to plan a route to avoid the congestion in advance.
[0081] To more clearly demonstrate the technical effects of the present invention, the methods described in S1 to S5 of the above embodiments were trained as a graph fusion traffic flow prediction model using a training dataset processed with actual measured data, and its performance was verified using a test set. At the same time, to demonstrate the difference in effectiveness from conventional models, the present invention was further compared with five conventional models, using the mean absolute error (MAE) and the root mean square error (RMSE) as evaluation indicators. The five conventional models are the historical average (HA) model, the vector autoregression (VAR) model, the long short-term memory (LSTM) model, and the gated recurrent unit (GRU) model. The comparative experimental results are shown in Table 1.
[0082] [Table 1] From Table 1, it can be seen that the prediction accuracy of the graph fusion traffic flow forecasting model of the present invention is superior to that of the four conventional models.
[0083] Furthermore, to verify the impact of the introduction of the road spatial relationship graph and road functional similarity relationship graph in this invention on prediction performance, two sets of ablation experiments were carried out. One set employed only the road spatial relationship graph, and the other set employed only the road functional similarity relationship graph. The removal of a certain graph in the ablation experiment can be adjusted through the calculation process of the fused adjacency matrix A. Finally, the results of the ablation experiment in this embodiment are shown in Table 2.
[0084] [Table 2] As can be seen from Table 1, in the graph fusion traffic flow forecasting model of the present invention, the introduction of the road spatial relationship graph and the road functional similarity relationship graph both improves the final prediction accuracy to a certain extent. When only the road spatial relationship graph is used, the RMSE index is slightly higher than that of the present invention, but the improvement is not significant, and the MAE index is clearly lower than that of the present invention. Therefore, overall, by simultaneously introducing the road spatial relationship graph and the road functional similarity relationship graph, the prediction process not only takes into account the traffic flow of neighboring sections, but also the traffic flow of roads with similar functions, ensuring that the overall prediction performance is optimal.
[0085] It should be noted that the method steps shown in S1 to S5 above can essentially be realized in the form of a computer program.
[0086] Therefore, based on the same inventive concept, the present invention provides a computer electronic device, including a memory and a processor, corresponding to the multi-layer attention-based graph fusion traffic flow prediction method provided in the above embodiment. The memory is used to store computer programs. The processor is configured to realize the multi-layer attention-based graph fusion traffic flow prediction method when the computer program is executed. The logic instructions in the memory may be realized in the form of a software functional unit and stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or a part thereof that essentially contributes to the prior art, can be expressed in the form of a computer program product, which is stored in a storage medium and includes several computer programs / instructions to cause a processor of a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.
[0087] Therefore, based on the same inventive idea, the present invention provides a computer-readable storage medium corresponding to a graph fusion traffic flow prediction method based on multi-layer attention, and the storage medium stores a computer program for realizing the graph fusion traffic flow prediction method based on multi-layer attention when the computer program is executed by a processor.
[0088] Therefore, based on the same inventive idea, the present invention provides a computer program product, which includes computer programs / instructions, and when the computer programs / instructions are executed by a processor, can realize the above-mentioned multi-layer attention-based graph fusion traffic flow prediction method.
[0089] Specifically, the computer-readable storage medium according to the three embodiments can execute the steps S1 to S5 when the stored computer program is executed by a processor.
[0090] It can be understood that the storage medium can include a random access memory (RAM) and at least one non-volatile memory (NVM) such as a magnetic disk memory. Thus, the storage medium can be various media capable of storing program code, such as a USB memory, a removable hard disk, a magnetic disk, or an optical disk.
[0091] The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It may also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
[0092] It should be noted that for the sake of convenience and conciseness, the specific operation procedures of the above-described system may refer to the corresponding procedures in the above-described method embodiments, and therefore will not be repeated here, as will be clearly understood by those skilled in the art. In each embodiment provided in this application, the distinction between steps or modules in the above-described system and method is merely a distinction between logical functions, and in actual implementation, multiple modules or steps may be combined or integrated, or one module or step may be divided.
[0093] The above embodiment is only one of the preferred embodiments of the present invention and does not limit the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. The claims obtained using the above equivalent substitutions or equivalent conversions fall within the protection scope of the present invention.
Claims
1. A multi-layer attention-based graph fusion traffic flow prediction method, the method being executed by a processor of a computer device as a computer program / instruction, comprising: S1 performs uniform sampling of equal sample amounts at different sampling intervals on the historical traffic flow data of all roads in the target road network, to obtain a plurality of historical flow sequence data representing different data periods for each road, the sampling intervals including at least three types of minute level, day level and week level; S2 constructs a road spatial relationship graph for all roads in the target road network based on the connectivity between the roads; The road spatial relationship graph is composed of a first vertex set, a first edge set, and a first adjacency matrix, each vertex in the first vertex set represents a road, a vertex attribute is a past traffic flow sequence of the road represented by the vertex, each edge in the first edge set represents that a spatial connection relationship exists between roads corresponding to two vertices, and the first adjacency matrix is used to record the edge connection relationship between the vertices; S3 constructs a road function similarity relation graph corresponding to each data period based on the functional similarity between roads for all roads in the target road network, based on the past flow rate sequence for each data period; the road function similarity relationship graph is composed of a second vertex set, a second edge set, and a second adjacency matrix, the second vertex set is the same as the first vertex set, each edge in the second edge set represents the existence of a road function similarity relationship between roads corresponding to two vertices, and the second adjacency matrix is used to record the edge connection relationship between the vertices; Here, for a road function similarity relationship to exist between roads corresponding to two vertices, the road geospatial distance must be smaller than a first threshold and the road past flow sequence distance must be smaller than a second threshold, the road geospatial distance being a normalized edit distance between spatial subgraphs each centered on two vertices in the road spatial relationship graph, and the road past flow sequence distance being a normalized sequence distance between past flow sequences in the current data period for roads corresponding to the two vertices, respectively; S4 performs adjacency matrix fusion between the road spatial relationship graph and the road function similarity relationship graph corresponding to each data period by an attention mechanism to obtain a fused adjacency matrix corresponding to each data period; S5 obtains a vertex feature matrix by embedding the past flow rate sequences of all roads in the target road network in each data period; Furthermore, the fused adjacency matrix and the vertex feature matrix for each data period are input into the graph attention network to obtain the output results corresponding to each data period, and the output results corresponding to all data periods are weighted and fused to finally obtain the future flow rate prediction results for the target road network. A graph fusion traffic flow forecasting method based on multi-layer attention, characterized by including the above steps.
2. The method of claim 1, wherein the data period is divided into three types, and the sampling intervals correspond to the minute level, the day level, and the week level, respectively.
3. The method of claim 1, wherein the data period is divided into three types, and the sampling intervals are 15 minutes, 24 hours, and 7 days, respectively.
4.
5.
6. The graph attention network is composed of a stack of multiple graph attention layers, and the input of each graph attention layer is the fused adjacency matrix and the vertex feature vector matrix output by the graph attention layer of the previous layer. Multi-head self-attention is used within the layer to aggregate the feature vectors of adjacent nodes to each central node, and then a new vertex feature vector matrix is output to the next layer. The method for graph fusion traffic flow forecasting based on multi-layer attention as claimed in claim 1, characterized in that the outputs of all graph attention layers are output by an exponential linear unit activation function after concatenation, and finally processed by an additional graph attention layer to obtain the output result of the graph attention network.
7. The graph fusion traffic flow prediction method based on multi-layer attention as claimed in claim 1, characterized in that when the output results corresponding to all data periods are weighted and fused, the output results corresponding to each data period and the learnable parameter matrix are subjected to Hadamard product calculation, and then the results of each Hadamard product calculation are summed to obtain the future traffic flow prediction result for the target road network.
8. 1. A computer program product comprising: Contains computer programs / instructions, A computer program product, characterized in that the computer program / instructions, when executed by a processor, implement the multi-layer attention-based graph fusion traffic volume forecasting method according to any one of claims 1 to 7.
9. A computer-readable storage medium, comprising: The computer-readable storage medium stores a computer program, which, when executed by a processor, realizes the multi-layer attention-based graph fusion traffic volume forecasting method described in any one of claims 1 to 7.
10. A computing device comprising a memory and a processor, the memory is used to store a computer program; A computer device characterized in that, when the processor executes the computer program, it realizes the multi-layer attention-based graph fusion traffic volume forecasting method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Quantum computing method for simulating highway traffic flow distribution with consideration for destination selection
JP2022517294A
Method and system for robot navigation in unknown environments - Patents.com
JP2024519299A