A Traffic Prediction Method Based on Weather-Aware Graphical Attention Network

By constructing a weighted directed graph and adjacency matrix based on a weather-aware graph attention network, and combining a two-layer fully connected network and a self-attention mechanism, the problem of insufficient accuracy in long-term traffic forecasting is solved, and efficient and high-precision traffic forecasting is achieved.

CN116631181BActive Publication Date: 2025-10-28THE CHINESE UNIV OF HONG KONG (SHENZHEN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310400355.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2025-10-28
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

Existing traffic forecasting methods lack accuracy in long-term forecasts and cannot effectively combine the spatial and temporal dependencies between weather and traffic data, resulting in inaccurate forecast results.

Method used

We employ a weather-aware graph attention network approach, which constructs a weighted directed graph and an adjacency matrix, combines a two-layer fully connected network with a self-attention mechanism, learns the relationship between traffic and weather data, and performs efficient and accurate long-term traffic forecasting.

Benefits of technology

It improves the accuracy of long-term traffic forecasting, reduces the computational resource requirements and time, and enhances the reliability and practicality of the forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116631181B_ABST
    Figure CN116631181B_ABST
Patent Text Reader

Abstract

This invention relates to a traffic prediction method based on a weather-aware graphical attention network, comprising: constructing a weighted directed graph and an adjacency matrix; organizing single-factor, dual-factor, and triple-factor data and inputting them into the network; processing the input traffic data; inputting the processed data into an encoder, which allows the network to learn from past data; using a spatiotemporal-weather self-attention mechanism to allow the network to learn the relationship between past and future data; inputting the processed traffic data and dual-factor embedded data into a decoder, which allows the network to learn from future data; and processing the data output from the decoder through a two-layer fully connected network to obtain the traffic prediction result. This invention effectively captures the temporal and spatial characteristics of traffic and weather by using different attention networks; the use of a self-attention module reduces propagation errors and increases long-term prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic forecasting technology, and in particular to a traffic forecasting method based on a weather-aware graphical attention network. Background Technology

[0002] Traffic congestion is a pressing global problem. Severe congestion can impose an economic burden on a country, leading to lost productivity, and especially causing unnecessary delays and high energy consumption. For example, Beijing, China, suffers direct and indirect economic losses of hundreds of billions of RMB annually due to traffic congestion. Furthermore, traffic congestion significantly impacts air pollution and greenhouse gas emissions, potentially causing severe weather conditions such as fog, torrential rain, and extreme heat, thus affecting traffic safety. To address these challenges, optimize public resources, reduce congestion, and promote sustainable development and an eco-friendly society, intelligent transportation systems aim to alleviate congestion and other traffic-related problems through effective data management and monitoring systems. This approach aligns with the Sustainable Development Goals and paves the way for safer, more efficient, and sustainable transportation systems.

[0003] In recent years, transportation departments have deployed sensors on road networks to collect extensive historical traffic observation data, using this data to predict future traffic conditions (such as traffic flow or vehicle speed). Currently, neural networks have played a role in managing and optimizing traffic conditions within intelligent transportation systems. To effectively simulate the temporal correlation of traffic conditions and the spatial correlation of road networks, existing work often integrates temporal and geographical information using long short-term memory neural networks, convolutional neural networks, recurrent neural networks, and graph convolutional networks. However, while these efforts have achieved satisfactory results in short-term predictions (i.e., within 5–15 minutes), satisfactory progress has not yet been made in long-term (i.e., beyond 30 minutes) traffic predictions. Nevertheless, long-term predictions are more beneficial for practical applications because more accurate long-term predictions allow transportation departments more time to plan and optimize traffic based on the prediction results.

[0004] Meanwhile, unexpected weather events such as sudden rainfall can severely impact traffic conditions, making it necessary to incorporate weather factors to improve traffic forecasting. Most existing research and methods oversimplify the relationship between weather and traffic, often simply combining the two issues. These methods fail to capture the spatial and temporal dependencies between weather and traffic data, resulting in inability to make predictions within a reasonable computational timeframe and unsatisfactory prediction accuracy. Therefore, developing a novel, efficient, and high-precision weather-aware graphical attention network for traffic forecasting is urgently needed.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a traffic prediction method based on a weather-aware graphical attention network, thus addressing the deficiencies of existing methods. This method is simple and practical, capable of efficiently and accurately predicting traffic conditions by combining weather information. It exhibits good adaptability to traffic prediction under different weather conditions, reduces propagation errors in long-term predictions, and demonstrates good reliability, practicality, and feasibility of the prediction results. The traffic prediction method includes:

[0007] S1. Describe the preprocessed traffic data as a weighted directed graph in the spatial domain and establish an adjacency matrix;

[0008] S2. Organize the data of single data factors, dual data factors, and triple data factors and input them into the two-layer fully connected layer network;

[0009] S3. Process the input traffic data through a two-layer fully connected network;

[0010] S4. Input the traffic data and dual data factor embedded data processed in step S3 into the encoder, and let the network learn past data through the encoder.

[0011] S5. Input the traffic data and three-factor embedded data after the encoder has been processed in step S4. The network learns the relationship between past and future data through the spatiotemporal-weather self-attention mechanism.

[0012] S6. Input the traffic data and dual data factor embedded data processed in step S5 into the decoder, and let the network learn from future data through the decoder.

[0013] S7. The data output from the decoder is processed through a two-layer fully connected network to obtain traffic prediction results.

[0014] Step S1 specifically includes the following:

[0015] S101. Construct a weighted directed graph: Describe the road network as a weighted directed graph G = (V, E, A), where V is the set of N sensor nodes, representing the locations of sensors collecting traffic and weather data, and E is the set of edges representing urban traffic roads. It is a weighted adjacency matrix;

[0016] S102. Establish the adjacency matrix: Establish the adjacency matrix A, where... The range is from 0 to 1, using v i to v j The distance represents the proximity between two vertices.

[0017] Step S2 specifically includes the following:

[0018] S201, Single Data Factor Embedding: Spatial data, temporal data, and weather data are organized and input into a two-layer fully connected network to obtain spatial data embedding, temporal data embedding, and weather data embedding;

[0019] S202, Dual Data Factor Embedding: Combine the spatial data embedding and temporal data embedding from step S201 with the weather data embedding to obtain spatial-weather data embedding and temporal-weather data embedding;

[0020] S203, Three-data-factor embedding: The spatial data embedding, temporal data embedding and weather data embedding in step S201 are added together to obtain the spatiotemporal-weather data embedding.

[0021] The steps in S4 specifically include the following:

[0022] S401. Spatial-weather data embedding and temporal-weather data embedding are input into the encoder for processing, and the processed data are fused through Gate Fusion;

[0023] S402. Add the data processed by steps S3 and S401 through the residual connection.

[0024] The single data factor embedding specifically includes the following:

[0025] S2011, Spatial data embedding is obtained by inputting into a two-layer fully connected network. Where v i ∈V, S represents space, D represents the dimension of the processed data, and the graph G is transformed into a vector;

[0026] S012. Divide a day into T time nodes, and use one-hot encoding to encode the week number and the number of time nodes in a day as R respectively. 7 and R T Connect these two to vector R T+7 In this process, a two-layer fully connected network is used for processing to obtain temporal data embedding. Where t j ∈*t1,...,t P ,...,t P+Q +, T represents time, which means covering P past and Q future time points;

[0027] S2013, Input weather data into a two-layer fully connected network to obtain weather data embedding. Where v i ∈V,t j ∈*t1,...,t P ,...,t P+Q +, W indicates weather.

[0028] The dual data factor embedding specifically includes the following:

[0029] S2021. For N sensor nodes, at P past and Q future time points, the space-weather data embedding is set as follows: Adding the spatial data embedding and the weather data embedding together yields the space-weather data embedding as follows:

[0030]

[0031] S2022. For N sensor nodes, at P past and Q future time points, the time-weather data embedding is set as follows: Adding the time data embedding and the weather data embedding together yields the time-weather data embedding as follows:

[0032]

[0033] The embedding of the three data factors specifically includes the following:

[0034] For N sensor nodes, at P past and Q future time points, the spatiotemporal-weather embedding module is set to... Adding spatial data embedding, temporal data embedding, and weather data embedding together yields the spatiotemporal-weather data embedding as follows:

[0035] The steps in S401 specifically include the following:

[0036] S4011. The space-weather data embedding is processed by the encoder, and the weighted sum of N sensor nodes is calculated at time node t. j For vertex v i Dynamically assigning different weights is as follows:

[0037]

[0038]

[0039]

[0040] s vi,v Representing vertices v and v i The correlation, α vi,v Representing vertices v and vi Relevance attention score, and Representing vertices v and v respectively i Spatial-weather data embedding, and Representing vertices v and v i At time node t j The hidden state, Representation space - weather data embedding vertex v i At time node t j The hidden state, l represents the number of blocks in the encoder, || represents the sequential chaining operation, and K represents the number of heads assigned by the multi-head attention mechanism. These represent three different nonlinear projections in the spatial-weather data embedding process;

[0041] S4012. Process the time-weather data embedding through the encoder, calculate the weighted sum of N sensor nodes, and at time node t... j To dynamically assign different weights to other time nodes t:

[0042]

[0043]

[0044]

[0045] Representing time nodes t and t j The correlation, For time nodes t and t j Relevance attention score, and Representing time points t and t respectively j Time-weather data embedding, Indicates t j A previous set of time points, t r Indicates a belonging variables, These represent three different nonlinear projections in the time-weather data embedding process;

[0046] S4013, Through and The l-th spatial-weather feature output from the encoder and time-weather characteristics The spatiotemporal-weather features H are obtained by fusion. (l) W z,1 W z,2 ,b zdenoted as learnable parameters, ⊙ represents the product of corresponding elements of two matrices, and σ represents the sigmoid activation function.

[0047] The steps in S5 specifically include: processing the time-weather data embedding through an encoder, calculating the weighted sum of N sensor nodes, and performing the calculation at historical time nodes. For future time nodes Dynamically assigning different weights is as follows:

[0048]

[0049]

[0050]

[0051] Representing historical time nodes and future prediction time nodes The correlation between them For relevance attention score, and These represent historical time nodes. and future prediction time nodes Spatiotemporal weather data embedding, These represent three different nonlinear projections in the spatiotemporal-weather embedding process.

[0052] The traffic forecasting method further includes a data preprocessing step, which includes supplementing the missing parts of the weather data using bilinear interpolation.

[0053] This invention has the following advantages: a traffic prediction method based on a weather-aware graphical attention network, which fully captures the temporal and spatial characteristics of traffic and weather by using different attention networks; the use of a self-attention module reduces propagation errors and increases long-term prediction accuracy; compared with the most advanced methods currently available, it can improve prediction accuracy by up to 29%; and the simultaneous processing of weather and traffic data reduces computational resources and processing time. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application provided below with reference to the accompanying drawings is not intended to limit the scope of protection of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. The present invention will be further described below with reference to the accompanying drawings.

[0056] like Figure 1 As shown, this invention relates to a traffic prediction method based on a weather-aware graphical attention network, which specifically includes the following:

[0057] Step 1: Data Preprocessing. Specifically, missing data in weather data is supplemented using bilinear interpolation. During data acquisition via sensors, data loss can occur due to sensor malfunctions or other reasons. For the location of the missing data, P = (x, y), with the value f(P), the four sensors P closest to that location are selected. 11 =(x1,y1),P 12 =(x1,y2),P 21 = (x2, y1) and P 22 = (x2, y2), whose values ​​are f(P) 11 ),f(P 12 ),f(P 21 ) and f(P 22 The data is supplemented using bilinear interpolation, with the specific formula as follows:

[0058]

[0059] Step 2: Describe the traffic data in the spatial domain. This includes: Step 201: Constructing the graph; Step 202: Establishing the adjacency matrix.

[0060] Step 201: The road network is described as a weighted directed graph G = (V, E, A), where V is the set of N sensor nodes, representing the locations of sensors collecting traffic and weather data, and E represents the set of edges of urban traffic roads. It is a weighted adjacency matrix.

[0061] Step 202: Establish the adjacency matrix A, where The range is from 0 to 1, represented by v. ito v j The distance represents the proximity between two vertices.

[0062] Step 3, Data Embedding. Specifically, this includes: Step 301, Single Data Factor Embedding Module: Step 3011, Spatial Data Embedding Module, Step 3012, Temporal Data Embedding Module, and Step 3013, Weather Data Embedding Module; Step 302, Dual Data Factor Embedding Module, combining the pairs from Step 301: Step 3021, Spatial-Weather Data Embedding Module, and Step 3022, Temporal-Weather Data Embedding Module; Step 303, Three Data Factor Embedding Module, adding the three single data factors from Step 301: Spatiotemporal-Weather Embedding Module.

[0063] Step 301: The function of the single data factor embedding module is to organize and input a single data factor into the system.

[0064] Step 3011: In the spatial data embedding module, transform the graph G into a vector.

[0065] For any point v i ∈V, this point is the i-th node of the walk, set as c. i Set c i-1 For the (i-1)th node visited, it reaches the (i+1)th node c. i+1 It is generated through the following probability distribution:

[0066]

[0067]

[0068] Where Z is the normalization constant, p and q are optional real numbers, and d ij =0 indicates that the path returns to node c. i+1 d ij =1 indicates node c i-1 With node c i+1 Directly connected, d ij =2 indicates node c i-1 With node c i+1 They are not directly connected. The data is then input into a two-layer fully connected layer to obtain the spatial data embedding module, where D represents the dimension of the processed data.

[0069] Step 3012: In the time data embedding module, we divide a day into T time nodes, and use one-hot coding to encode the week number and the number of time nodes in a day as R respectively. 7 and R T We connect these two to vector R. T+7 In this process, a two-layer fully connected layer is used for processing to obtain the time data embedding module. Where t j ∈*t1,...,t P ,...,t P+Q + means covering P past and Q future time points.

[0070] Step 3013: In the weather data embedding module, the weather data is embedded using a two-layer fully connected layer to obtain the weather data embedding module. Where v i ∈V,t j ∈*t1,...,t P ,...,t P+Q +.

[0071] Step 302: In the dual data factor embedding module, the modules from step 301 are combined pairwise and added together. The specific content is as follows:

[0072] Step 3021: For N sensor nodes, at P past and Q future time points, the space-weather data embedding module is defined as... The elements are:

[0073] Step 3022: For N sensor nodes, at P past and Q future time points, the time-weather data embedding module is defined as... The elements are:

[0074] Step 303, the three-data-factor embedding module, adds the three single data factors from step 301 to form a spatiotemporal-weather embedding module. For N sensor nodes, at P past and Q future time points, the spatiotemporal-weather embedding module is defined as follows: The elements are:

[0075] Step 4: Input a two-layer fully connected layer. Specifically, this involves using a two-layer fully connected network to process the input traffic data, facilitating subsequent unified data processing.

[0076] X1 = XW1 + b1

[0077] X2 = X1W2 + b2

[0078] Where W1, W2, b1, b2 are learnable parameters, and X is the data to be processed, such as input traffic data. After passing through a two-layer fully connected network, the output result is X2.

[0079] Step 5: Use the encoder module to teach the network past data. The traffic data input to the encoder is the data processed in Step 4. The embedded data is from the dual-data-factor embedding module, with the time point being one hour in the past. The encoder's specific content includes: Step 501, Spatiotemporal-Weather Attention Module; Step 5011, Spatial-Weather Attention Module; Step 5012, Temporal-Weather Attention Module; and Step 5013, Weather Decision Gate; Step 502, Residual Linking Layer. The encoder can have l blocks, with the l-th input block represented as H. (l-1) , where vertex v i At time node t j The hidden state is represented as The l-th block of the output from the spatial-weather attention module and the temporal-weather attention module is represented as follows: and Where vertex v i At time node t j Hidden state representation and After the weather determines the door, we will get H. (l) It is the output of the l-th layer encoder.

[0080] Step 501, the Spatiotemporal-Weather Attention Module, the specific content of which is as follows:

[0081] Step 5011: Spatial-Weather Attention Module. The input embedding module is the spatial-weather data embedding module in the dual data factor embedding module. The specific method is as follows:

[0082] Calculate the weighted sum of N sensor nodes at time node t. j For vertex v i Dynamically assign different weights:

[0083]

[0084]

[0085]

[0086] It represents vertices v and v i The correlation, It represents vertices v and v i The relevance attention score, and the sum of the attention scores is 1, that is || represents the sequential chaining operation, and <, ·> represents the inner product operator. K is the number of heads in the multi-head attention mechanism, and each head attention mechanism produces an output with a dimension of d = D / K. These represent three different nonlinear projections, and their representations are as follows:

[0087] f(x) = ReLU(xW) r +b r )

[0088] Where ReLU is the activation function W is as follows. r and b r It is a learnable parameter, ReLU(x) = max * 0, x + .

[0089] Step 5012, Time-Weather Attention Module: The input embedding module is the time-weather data embedding module within the dual data factor embedding module. The specific method is as follows:

[0090]

[0091]

[0092]

[0093] It represents time nodes t and t j The correlation, The relevance attention score is the sum of the attention scores, i.e., Indicates t j A previous set of time points, t r Indicates a belonging Variables. These represent three different nonlinear projections, as shown in step 5011 which contains the ReLU formula.

[0094] Step 5013, Weather-Determined Gate: The data processed by Step 5011 (Time-Weather Attention Module) and Step 5012 (Space-Weather Attention Module) are fused through a Gate Fusion, as follows:

[0095]

[0096]

[0097] Among them, W z,1 W z,2 ,b z is a learnable parameter, ⊙ is the product of corresponding elements of the two matrices, and σ(·) is the sigmoid activation function.

[0098]

[0099] Step 502: The residual link layer adds the data processed in step four and the data processed in step five, and then sends it to the next step.

[0100] Step Six: Use the spatiotemporal-weather self-attention module to enable the network to learn the relationship between past and future data. The input traffic data at this stage is the data processed by the encoder in Step Five, and the input embedding module is the three-factor embedding module. Details are as follows:

[0101]

[0102]

[0103]

[0104] Historical time points and future prediction time nodes The correlation between them is expressed as The relevance attention score is the sum of the attention scores, i.e., These represent three different nonlinear projections, as shown in step 5011 which contains the ReLU formula.

[0105] Step 7: Use the decoder module to allow the network to learn from future data. The specific content of the decoder is the same as described in Step 5. The difference between Step 7 and Step 5 is that (1) the traffic data input to the decoder module is the traffic data processed in Step 6, and the input embedded data is the data from the dual data factor embedding module, with the time node being 1 hour in the future. (2) The function of the decoder is to predict the traffic data.

[0106] Step 8: Output a two-layer fully connected layer. Specifically, this involves using a two-layer fully connected network to process the data output from the decoder module to obtain traffic prediction results.

[0107] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A traffic prediction method based on a weather-aware graphical attention network, characterized in that: The traffic prediction method includes: S1. Describe the preprocessed traffic data as a weighted directed graph in the spatial domain and establish an adjacency matrix; S2. Organize the data of single data factors, dual data factors, and triple data factors and input them into the two-layer fully connected layer network; S3. Process the input traffic data through a two-layer fully connected network; S4. Input the traffic data and dual data factor embedded data processed in step S3 into the encoder, and let the network learn past data through the encoder. S5. Input the traffic data and three-factor embedded data after the encoder has been processed in step S4. The network learns the relationship between past and future data through the spatiotemporal-weather self-attention mechanism. S6. Input the traffic data and dual data factor embedded data processed in step S5 into the decoder, and let the network learn from future data through the decoder. S7. The data output from the decoder is processed through a two-layer fully connected network to obtain traffic prediction results; Step S2 specifically includes the following: S201, Single Data Factor Embedding: Spatial data, temporal data, and weather data are organized and input into a two-layer fully connected network to obtain spatial data embedding, temporal data embedding, and weather data embedding; S202, Dual Data Factor Embedding: Combine the spatial data embedding and temporal data embedding from step S201 with the weather data embedding to obtain spatial-weather data embedding and temporal-weather data embedding; S203, Three-data-factor embedding: The spatial data embedding, temporal data embedding and weather data embedding in step S201 are added together to obtain the spatiotemporal-weather data embedding; The steps in S5 specifically include: processing the time-weather data embedding through an encoder, calculating the weighted sum of N sensor nodes, and performing the calculation at historical time nodes. For future time nodes Dynamically assigning different weights is as follows: Representing historical time nodes and future prediction time nodes The correlation between them For relevance attention score, and These represent historical time nodes. and future prediction time nodes Spatiotemporal weather data embedding, These represent three different nonlinear projections in the spatiotemporal-weather embedding process.

2. The traffic prediction method based on a weather-aware graphical attention network according to claim 1, characterized in that: Step S1 specifically includes the following: S101. Construct a weighted directed graph: Describe the road network as a weighted directed graph G = (V, E, A), where V is the set of N sensor nodes, representing the locations of sensors collecting traffic and weather data, and E is the set of edges representing urban traffic roads. It is a weighted adjacency matrix; S102. Establish the adjacency matrix: Establish the adjacency matrix A, where... The range is from 0 to 1, using v i to v j The distance represents the proximity between two vertices.

3. The traffic prediction method based on a weather-aware graphical attention network according to claim 2, characterized in that: The steps in S4 specifically include the following: S401. Spatial-weather data embedding and temporal-weather data embedding are input into the encoder for processing, and the processed data are fused through Gate Fusion; S402. Add the data processed by steps S3 and S401 through the residual connection.

4. The traffic prediction method based on a weather-aware graphical attention network according to claim 1, characterized in that: The single data factor embedding specifically includes the following: S2011, Spatial data embedding is obtained by inputting into a two-layer fully connected network. Where v i ∈V, S represents space, D represents the dimension of the processed data, and the graph G is transformed into a vector; S012. Divide a day into T time nodes, and use one-hot encoding to encode the week number and the number of time nodes in a day as R respectively. 7 and R T Connect these two to vector R T+7 In this process, a two-layer fully connected network is used for processing to obtain temporal data embedding. where t j ∈{t1,...,t P ,...,t P+Q }, where T represents time, covering P past and Q future time points; S2013, Input weather data into a two-layer fully connected network to obtain weather data embedding. Where v i ∈V,t j ∈{t1,...,t P ,...,t P+Q }, W represents weather.

5. A traffic prediction method based on a weather-aware graphical attention network according to claim 4, characterized in that: The dual data factor embedding specifically includes the following: S2021. For N sensor nodes, at P past and Q future time points, the space-weather data embedding is set as follows: Adding the spatial data embedding and the weather data embedding together yields the space-weather data embedding as follows: S2022. For N sensor nodes, at P past and Q future time points, the time-weather data embedding is set as follows: Adding the time data embedding and the weather data embedding together yields the time-weather data embedding as follows:

6. The traffic prediction method based on a weather-aware graphical attention network according to claim 4, characterized in that: The embedding of the three data factors specifically includes the following: For N sensor nodes, at P past and Q future time points, the spatiotemporal-weather embedding module is set to... Adding spatial data embedding, temporal data embedding, and weather data embedding together yields the spatiotemporal-weather data embedding as follows:

7. The traffic prediction method based on a weather-aware graphical attention network according to claim 3, characterized in that: The steps in S401 specifically include the following: S4011. The space-weather data embedding is processed by the encoder, and the weighted sum of N sensor nodes is calculated at time node t. j For vertex v i Dynamically assigning different weights is as follows: Representing vertices v and v i The correlation, Representing vertices v and v i Relevance attention score, and Representing vertices v and v respectively i Spatial-weather data embedding, and Representing vertices v and v i At time node t j The hidden state, Representation space - weather data embedding vertex v i At time node t j The hidden state, l represents the number of blocks in the encoder, || represents the sequential chaining operation, and K represents the number of heads assigned by the multi-head attention mechanism. These represent three different nonlinear projections in the spatial-weather data embedding process; S4012. Process the time-weather data embedding through the encoder, calculate the weighted sum of N sensor nodes, and at time node t... j To dynamically assign different weights to other time nodes t: Representing time nodes t and t j The correlation, Let time nodes t and t j Relevance attention score, and Representing time points t and t respectively j Time-weather data embedding, Indicates t j A previous set of time points, t r Indicates a belonging variables, These represent three different nonlinear projections in the time-weather data embedding process; S4013, Through and The l-th spatial-weather feature output from the encoder Time-weather characteristics The spatiotemporal-weather features H are obtained by fusion. (l) W z,1 W z,2 ,b z denoted as learnable parameters, ⊙ represents the product of corresponding elements of two matrices, and σ represents the sigmoid activation function.

8. A traffic prediction method based on a weather-aware graphical attention network according to any one of claims 1-7, characterized in that: The traffic forecasting method further includes a data preprocessing step, which includes supplementing the missing parts of the weather data using bilinear interpolation.

Citation Information

Patent Citations

  • Traffic characteristic prediction method and system suitable for long-time prediction based on control information

    CN113408786A

  • Traffic prediction method and device based on dynamic space-time diagram convolution attention model

    CN113487088A