A multi-weight-based traffic flow prediction method, device, medium and equipment

CN123033366APending Publication Date: 2026-11-03ANHUI PUBLIC SECURITY COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611278769.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing traffic flow prediction models, spatial graph convolutional layers based on single distance weights cannot accurately reflect the actual traffic interaction intensity between nodes in the road network, resulting in low prediction accuracy.

Method used

A multi-weighted temporal graph convolutional network (MTGN) is adopted. By constructing a multi-weighted matrix that represents the inherent spatial correlation attributes of the traffic network, including road network distance, road level and intersection complexity weights, and combining temporal and spatial graph convolutional networks, the spatial topological dependencies of traffic flow are extracted.

Benefits of technology

It improves the accuracy of traffic flow prediction, breaks through the limitations of traditional models, and can more accurately depict the real traffic relationships between road segments, reducing prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033366A_ABST
    Figure CN123033366A_ABST
Patent Text Reader

Abstract

The application discloses a traffic flow prediction method and device based on multiple weights, a medium and equipment, and relates to the technical field of intelligent transportation. The method comprises the following steps: inputting a historical traffic state sequence into a pre-trained multiple weight time series graph convolution network (MTGN) to obtain traffic flow values of a future plurality of time steps of a research area, comprising the following steps: extracting preliminary time series features of the historical traffic state sequence through a first time gating convolution network; performing convolution operation on the preliminary time series features based on a multiple weight matrix through a spatial graph convolution network to extract space-time fusion features fused with spatial correlation of a road network; extracting enhanced space-time features of the space-time fusion features through a second time gating convolution network; and obtaining the traffic flow values of the future plurality of time steps of the target area according to the enhanced space-time features. The method improves the prediction accuracy of traffic flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation technology, and in particular to a method, apparatus, medium and equipment for predicting traffic flow based on multiple weights. Background Technology

[0002] With accelerating urbanization and the continuous growth in the number of vehicles, metropolitan areas worldwide are increasingly facing serious traffic management challenges, including traffic congestion, environmental pollution, and safety issues. Accurate traffic flow prediction is a fundamental pillar for Intelligent Transportation Systems (ITS) to alleviate these problems.

[0003] In existing technologies, deep learning algorithms are widely used in traffic flow prediction. For example, the Spatio-Temporal Graph Convolutional Network (STGCN) generates traffic flow predictions for future times by integrating historical traffic state data (such as vehicle speed and flow rate) and a predefined distance adjacency matrix (constructed based on physical spatial proximity). In STGCN, the core input of the spatial graph convolutional layer is a weighted adjacency matrix constructed based on the distance between road network nodes. Specifically, this distance adjacency matrix usually uses the actual road connectivity distance between nodes as the basis for weight assignment, reflecting the physical proximity measure of "how far apart two nodes are". After normalization or Laplace transformation, this matrix is ​​used as a graph shift operator to drive graph convolution operations to achieve the aggregation of road network spatial information.

[0004] However, the single distance-weighted graph structure used in the existing STGCN model, which uses physical distance as the sole metric for spatial association, makes it difficult for the neighborhood information aggregated by the spatial graph convolutional layer to truly reflect the actual traffic interaction intensity between nodes in the road network, thus resulting in low traffic flow prediction accuracy. Summary of the Invention

[0005] Therefore, it is necessary to provide a multi-weighted traffic flow prediction method, device, medium, and equipment to address the aforementioned technical problems. This method improves the accuracy of traffic flow prediction.

[0006] The following technical solution is adopted in this specification: This specification provides a multi-weighted traffic flow prediction method, including: Obtain the historical traffic state sequence and traffic network map of the target area, and construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map; Historical traffic state sequences are input into a pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. The MTGN includes a first-time gated convolutional network, a spatial graph convolutional network using a multi-weight matrix as a graph shift operator, and a second-time gated convolutional network. The process involves inputting historical traffic state sequences into a pre-trained multi-weighted temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. This includes the following steps: extracting preliminary temporal features of the historical traffic state sequences using a first-time-gated convolutional network; performing multi-weighted matrix-based convolution operations on the preliminary temporal features using a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial relationships of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features using a second-time-gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

[0007] Optionally, a multi-weight matrix representing the inherent spatial correlation attributes of the transportation network is constructed based on the transportation network graph, including the following steps: Determine the road network distance weight matrix based on the travel distance between nodes in the traffic network graph; Based on the road grade scores of the connecting nodes in the traffic network graph, determine the road grade weight matrix; The intersection complexity weight matrix is ​​determined based on the sum of the intersection levels between nodes in the traffic network graph. The Hadamard product of the road network distance weight matrix, the road level weight matrix, and the intersection complexity weight matrix is ​​determined as a multi-weight matrix.

[0008] Optionally, based on the travel distances between nodes in the traffic network graph, a road network distance weight matrix is ​​determined, including the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j There are edges connecting them, and the nodes i and nodes j The driving distance between them meets the first preset constraint condition. At that time, node i and nodes j The road network distance weight between them is ;in, For nodes i and nodes j The driving distance between them To control the threshold of distance weight distribution, A threshold for controlling the dispersion of distance weights; When node i and nodesj There is no edge connection between them, or nodes i and nodes j When the driving distance between nodes does not meet the first preset constraint, i and nodes j The road network distance weight between them is a preset road network distance weight value; Based on the road network distance weights between nodes in the traffic network graph, a road network distance weight matrix is ​​constructed.

[0009] Optionally, based on the road grade scores of the connecting nodes in the traffic network graph, a road grade weight matrix is ​​determined, including the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The road grade weights between them are ;in, For connecting nodes i and nodes j Road grade rating The threshold for the road grade weight distribution; When node i and nodes j When there is no edge connecting the nodes, i and nodes j The road grade weights between them are preset road grade weight values; Based on the road grade weights among nodes in the traffic network diagram, a road grade weight matrix is ​​constructed.

[0010] Optionally, the intersection complexity weight matrix is ​​determined based on the sum of the intersection levels between nodes in the traffic network graph, including the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The complexity weight of the intersection between them is ;in, For nodes i and nodes j The sum of the cross-levels, The threshold for the cross-level weight distribution; When node i and nodes j When there is no edge connecting the nodes, iand nodes j The complexity weight of the intersections between them is a preset intersection complexity weight value; Based on the intersection complexity weights between nodes in the traffic network diagram, an intersection complexity weight matrix is ​​constructed.

[0011] Optionally, the MTGN includes two stacked spatiotemporal convolutional modules and an output layer. Each spatiotemporal convolutional module is composed of a first temporally gated convolutional network, a spatial graph convolutional network, and a second temporally gated convolutional network connected in series. The output layer includes a temporally gated convolutional layer and a fully connected layer.

[0012] Optionally, the method further includes the following steps: Before inputting the historical traffic state sequence into the pre-trained multi-weighted temporal graph convolutional network (MTGN), the historical traffic state sequence is converted into a four-dimensional tensor. The four-dimensional tensor includes the number of sample batches processed by STGCN, the number of dimensions of traffic flow observations, the number of nodes, and the historical observation step size.

[0013] This specification provides a multi-weighted traffic flow prediction device, including: The module is used to obtain the historical traffic state sequence and traffic network map of the target area, and to construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map; The first prediction module is used to input the historical traffic state sequence into the pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain the traffic flow values ​​of the study area at multiple future time steps. The MTGN includes a first temporal gated convolutional network, a spatial graph convolutional network with a multi-weight matrix as the graph shift operator, and a second temporal gated convolutional network. The second prediction module is used to input historical traffic state sequences into a pre-trained multi-weighted temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. This includes the following steps: extracting preliminary temporal features of the historical traffic state sequences through a first time-gated convolutional network; performing multi-weighted matrix-based convolution operations on the preliminary temporal features through a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial correlation of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features through a second time-gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

[0014] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described multi-weight-based traffic flow prediction method.

[0015] This specification provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described multi-weight-based traffic flow prediction method.

[0016] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects: The traffic flow prediction method based on multi-weights provided in this specification replaces the spatial graph convolutional network in the traditional STGCN with a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network as a graph shift operator. It performs spatial convolution operations on the input features based on the multi-weight graph structure to extract the spatial topological dependencies of traffic flow. This method breaks through the limitation of the traditional STGCN, which only relies on static distance to define the adjacency matrix. It can more accurately depict the real traffic correlation between road segments and reduce prediction errors from the root of modeling. The customized multi-weight matrix replaces the traditional predefined static adjacency matrix, allowing graph convolution to more efficiently filter effective neighborhood features and avoid invalid noise interference, thereby improving the prediction accuracy of traffic flow. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This document provides a flowchart illustrating a traffic flow prediction method based on multiple weights. Figure 2 This is a schematic diagram of the traffic flow prediction method provided in this manual; Figure 3 This is the MTGN architecture diagram provided in this manual; Figure 4 The time-gated convolutional layer structure diagram provided in this specification; Figure 5 The structural comparison diagram of the original STGCN frame and the MTGN frame provided in this specification Figure 6 The graph shows the performance comparison results of the model provided in this specification on the test set and validation set; Figure 7 A comparison chart of the all-day speed predictions provided in this manual; Figure 8 This is a diagram showing the distribution of actual and predicted traffic speeds provided in this manual. Figure 9 A schematic diagram of a traffic flow prediction device based on multiple weights provided in this specification; Figure 10This specification provides a schematic diagram of a computer device for implementing a multi-weighted traffic flow prediction method. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0020] The server mentioned in this manual can be a server set up on a business platform, or a device such as a desktop computer or laptop computer capable of executing the solution described in this manual. For ease of explanation, the following description will only focus on the server as the execution subject.

[0021] Urban challenges such as traffic congestion and environmental degradation seriously threaten the well-being of residents, thus necessitating the development of intelligent transportation systems. As a prerequisite for advanced traffic control, reliable traffic flow prediction has shifted from model-based dynamic analysis to data-driven methods.

[0022] Traffic flow prediction, as a core component of intelligent transportation systems, is mainly divided into two categories: parametric methods and non-parametric methods.

[0023] Traditional parametric methods, including Historical Average (HA), Autoregressive Model (AR), and Kalman filtering, form the basic framework for traffic prediction. The Autoregressive Integral Moving Average (ARIMA) model and the Kalman filtering method are favored due to their computational simplicity and... n The ability of order-difference to handle stable non-stationary sequences continues to dominate. To overcome the limitations of univariate analysis, researchers have proposed a periodic-based SARIMA method; others have proposed the Starima method to integrate spatial topological features. Furthermore, researchers have developed hybrid models that combine ARIMA with fuzzy logic, genetic programming, or neural network residuals to reduce uncertainty. Recently, researchers have further improved prediction accuracy by integrating multi-source sensor data into a decaying memory-based Kalman filter. Although these models are efficient, they are all based on linear assumptions and struggle to effectively handle nonlinear fluctuations in modern transportation networks.

[0024] Nonparametric regression methodology: Paradigm: Machine learning methods such as Artificial Neural Networks (ANNs), K-Nearest Neighbor Networks (KNNs), and Support Vector Regression (SVRs) exhibit inherent robustness to random noise through high-dimensional function mapping. The KNN paradigm has been extensively extended through weighted spatiotemporal state vectors, adaptive clustering, and pattern segmentation. However, in high-dimensional or sparse data environments, KNNs remain susceptible to regression errors. Graph Neural Networks (GNNs) and their variants are employed to achieve simultaneous extraction of spatiotemporal information, thereby predicting traffic flow.

[0025] To alleviate this problem, SVR identifies the optimal hyperplane in the projected feature space. Although this method can be optimized using metaheuristic algorithms or the hybrid Discrete Fourier Transform-Support Vector Regression (DFT-SVR) framework, its scalability is limited by the quadratic computational complexity on large-scale datasets; at the same time, due to the lack of deterministic kernel selection criteria, complex ensemble strategies are required.

[0026] Deep Learning and Spatiotemporal Representation: Deep learning employs a hierarchical architecture to transform raw information into complex representations. Researchers established Long Short-Term Memory (LSTM) networks as the benchmark model for long-term temporal dependencies, but their high computational complexity prompted researchers to turn to more efficient structures such as Gated Recurrent Units (GRUs) or Gated Linear Temporal Convolutional Networks (GL-TCNs). In addition to temporal features, researchers initially used convolutional neural networks for spatial modeling; however, their Euclidean grid-based assumptions could not adapt to irregular road topologies.

[0027] Models based on Graph Convolutional Networks (GCNs) are still susceptible to oversmoothing—repeated aggregation weakens the inherent properties of nodes. Without specialized enhancement of spatial features through multi-dimensional road attributes, existing models struggle to maintain predictive robustness in complex urban environments.

[0028] Although parametric models such as ARIMA and Kalman filtering are favored for their computational simplicity and ease of engineering application, they are inherently difficult to capture the complex nonlinear spatiotemporal dependencies in dynamic transportation networks.

[0029] Conversely, nonparametric methods such as SVR and deep neural networks excel at capturing nonlinear patterns, but they also have significant limitations. For example, recurrent neural networks (RNNs) often neglect the evolution of spatial correlations, while convolutional neural networks (CNNs) are constrained by the Euclidean grid assumption. Although hybrid models such as CNN-LSTM attempt to separate spatiotemporal features, they primarily treat traffic data as abstract signals. Therefore, these models fail to adequately account for the intrinsic influence of physical road infrastructure, such as road classification and intersection complexity, and quantifying these factors remains a significant challenge.

[0030] To address these shortcomings, this invention proposes a Multi-weighted Temporal Graph Convolutional Network (MTGN). This innovative architecture combines Graph Convolutional Networks (GCNs) and Temporal Convolutional Networks (TCNs) in a collaborative manner, enabling the simultaneous capture of spatial dependencies and temporal dynamic features. The core innovation of MTGN lies in the introduction of a multi-weighted representation mechanism, explicitly incorporating heterogeneous factors such as geographical distance and road classification to improve prediction accuracy. Using the PeMSD7 dataset, this invention evaluates the performance of MTGN on various benchmark models, such as Spatial-Temporal Graph Convolutional Networks (STGCNs) and Long Short-Term Memory (LSTMs), using Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Squared Error (RMSE) metrics.

[0031] The main contributions of this invention are summarized as follows: (1) Quantifying multi-dimensional road attributes: This invention proposes to encode physical infrastructure (distance, hierarchical structure, density) into a multi-weight matrix to reconstruct a realistic traffic topology; (2) Developing an MTGN architecture: This invention designs a spatiotemporal integration mechanism that can adaptively fuse multi-weight matrices, capturing potential dependencies more effectively than traditional single-weight graphs; (3) Empirical verification: Extensive experiments show that introducing road-specific constraints can significantly improve the robustness and prediction accuracy of the model.

[0032] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0033] Figure 1 This is a flowchart illustrating a multi-weighted traffic flow prediction method described in this specification, which includes the following steps: S101: Obtain the historical traffic state sequence and traffic network map of the target area, and construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map.

[0034] To comprehensively describe the spatial topology of traffic flow in a road network, this invention defines the traffic network graph as G=(V, E, W), where, This represents the set of nodes consisting of sensors on the road. n (Total number of nodes) E This represents the set of edges connecting two nodes. The weight matrix and adjacency matrix represent the weights of each edge. It can reflect the connectivity between nodes, so it is often used as a weight representation. The formula for calculating the adjacency matrix is ​​formula (1): (1); in, For edge set, The adjacency matrix A contains the first... i Line number j Column elements, For nodes and The weight of the edges between them. Represents a node and The edge between. When hour, ;when hour, .

[0035] Furthermore, this invention defines a matrix. Used to indicate time t Traffic flow information for all nodes in the road network. Therefore, the time series prediction problem of traffic flow can be defined as: based on the traffic network graph...G and previously collected M Historical traffic observation data to predict future... H The most likely traffic flow value (such as vehicle speed or traffic volume) within a given time step. This problem can be expressed by formula (2):

[0036] (2); in, for t Traffic flow estimate at time +1 for t + H Traffic flow estimates at any given time for t Traffic flow observation at time +1 for t + H Traffic flow observations at any given time for t-M+ Traffic flow observation at time 1 for t Traffic flow observations at any given time G This is a traffic network map.

[0037] Figure 2 This is a schematic diagram of the traffic flow prediction method provided in this manual, such as... Figure 2 As shown, traffic flow prediction methods include parametric regression and non-parametric regression methods. Parametric regression methods include historical average, moving average, autoregressive integral moving average, Kalman filtering, and regression analysis. Non-parametric regression methods include machine learning and deep learning methods. Machine learning methods include artificial neural networks, K-nearest neighbors, and support vector regression. Deep learning methods include convolutional neural networks, recurrent neural networks, graph neural networks, and hybrid models. Recurrent neural networks include long short-term memory networks and gated recurrent units. Graph neural networks include graph convolutional networks and graph attention networks. Hybrid models include convolutional-long short-term memory networks and spatiotemporal convolutional networks.

[0038] S102: Input the historical traffic state sequence into the pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain the traffic flow values ​​of the study area at multiple future time steps; MTGN includes a first time-gated convolutional network, a spatial graph convolutional network with a multi-weight matrix as the graph shift operator, and a second time-gated convolutional network.

[0039] Similar to many other graph structures, edge weights in traffic network graphs can reflect a variety of influencing factors. Most previous studies have only used distance as the sole weighting indicator in traffic networks, but in reality, different road hierarchies and intersection levels lead to significant differences in people's attention to each road and the degree of traffic impact between roads or intersections. Therefore, this invention introduces a multi-weight matrix that comprehensively considers distance, road level, and intersection level.

[0040] In an exemplary embodiment, the MTGN includes two stacked spatiotemporal convolutional modules and an output layer. Each spatiotemporal convolutional module is composed of a first temporally gated convolutional network, a spatial graph convolutional network, and a second temporally gated convolutional network connected in series. The output layer includes a temporally gated convolutional layer and a fully connected layer.

[0041] Specifically, this invention proposes a multi-weighted temporal graph convolutional network (MTGN) model, which uses a multi-weight matrix to characterize the traffic characteristics of the road network structure. It leverages temporal convolutional networks to capture long-term dependencies and integrates dynamic spatial dependency features extracted by graph convolutional networks. These two types of features are effectively fused to construct the MTGN model.

[0042] Figure 3 This is a schematic diagram of the multi-weight temporal graph convolutional network model provided in this specification, such as... Figure 3 As shown, the MTGN model consists of an input layer, a multiple wave (MW) weight matrix, multiple spatiotemporal convolutional (ST-Conv) modules, and an output layer. Each ST-Conv module is further divided into a three-layer stacked structure: it contains two temporally gated convolutional layers with a spatial graph convolutional layer in between; the output layer consists of a temporally gated convolutional layer and a fully connected (FC) layer.

[0043] S103: Input the historical traffic state sequence into the pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. This includes the following steps: extracting preliminary temporal features of the historical traffic state sequence through a first time-gated convolutional network; performing convolution operations based on a multi-weight matrix on the preliminary temporal features through a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial correlation of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features through a second time-gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

[0044] In an exemplary embodiment, constructing a multi-weight matrix representing the inherent spatial association attributes of a traffic network based on a traffic network graph includes the following steps: determining a road network distance weight matrix based on the travel distance between nodes in the traffic network graph; determining a road grade weight matrix based on the road grade scores of connecting nodes in the traffic network graph; determining an intersection complexity weight matrix based on the sum of intersection grades between nodes in the traffic network graph; and determining the Hadamard product of the road network distance weight matrix, the road grade weight matrix, and the intersection complexity weight matrix as the multi-weight matrix.

[0045] In an exemplary embodiment, determining the road network distance weight matrix based on the travel distance between nodes in the traffic network graph includes the following steps: for any node in the traffic network graph... i and nodes j When node i and nodes j There are edges connecting them, and the nodes i and nodes j The driving distance between them meets the first preset constraint condition. At that time, node i and nodes j The road network distance weight between them is ;in, For nodes i and nodes j The driving distance between them To control the threshold of distance weight distribution, To control the threshold of distance weight dispersion; when node i and nodes j There is no edge connection between them, or nodes i and nodes j When the driving distance between nodes does not meet the first preset constraint, i and nodes j The road network distance weights between nodes are preset road network distance weight values; a road network distance weight matrix is ​​constructed based on the road network distance weights between nodes in the traffic network diagram.

[0046] Specifically, as a component of road impedance, distance factors should be given priority when calculating the weight values ​​of the adjacency matrix of the traffic network graph. In this invention, nodes... i With nodes j The actual driving distance between them is defined as .node i and nodes j The formula for calculating the road network distance weight between them is formula (3):

[0047] (3); in, For nodes i and nodes j Road network distance weights between them The threshold for controlling the distribution of distance weights is typically 100 or 1000. To control the dispersion of distance weights, a threshold of 0.5 is typically set. For nodes i and nodes j The edges between them.

[0048] In an exemplary embodiment, determining the road grade weight matrix based on the road grade scores of connecting nodes in the traffic network graph includes the following steps: for any node in the traffic network graph... i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The road grade weights between them are ;in, For connecting nodes i and nodes j Road grade rating The threshold for the road grade weight distribution; when node i and nodes j When there is no edge connecting the nodes, i and nodes j The road level weights between nodes are preset road level weight values; a road level weight matrix is ​​constructed based on the road level weights between nodes in the traffic network diagram.

[0049] Specifically, road classification determines a road's cross-sectional structure, speed limits, and primary functions, significantly impacting connectivity between two nodes. This invention employs a four-level urban road classification system: expressways, arterial roads, secondary roads, and access roads, corresponding to ratings of 1, 2, 3, and 4, respectively. Node i and nodes j The formula for calculating the road grade weights between them is formula (4):

[0050] (4); in, For nodes i and nodes j Road grade weights between For connecting nodes i and nodes j Road grade rating The threshold for the road grade weight distribution is usually set to 10.

[0051] In an exemplary embodiment, determining the intersection complexity weight matrix based on the sum of intersection levels between nodes in the traffic network graph includes the following steps: for any node in the traffic network graph... i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The complexity weight of the intersection between them is ;in, For nodes i and nodes j The sum of the cross-levels, The threshold for the cross-level weight distribution; when node i and nodes j When there is no edge connecting the nodes, i and nodes j The intersection complexity weights between nodes are preset intersection complexity weight values; based on the intersection complexity weights between nodes in the traffic network diagram, an intersection complexity weight matrix is ​​constructed.

[0052] Specifically, if intersections exist between the nodes under study, the grade of each intersecting road will determine the traffic conditions at that intersection and indirectly affect the interactions between the nodes. Therefore, it is necessary to classify intersection grades and assign corresponding weight values ​​to different grades. The intersection grade of each node is equal to the sum of the grade scores of all the roads it connects to. i and nodes j The formula for calculating the complexity weight of the intersections is formula (5):

[0053] (5); in, node i and nodes j The complexity weight of the intersections between them For nodes i and nodes j The sum of the cross-levels, This is the threshold for the cross-level weight distribution, usually set to 10.

[0054] Finally, by calculating the Hadamard product of multiple weight matrices, the overall weight matrix W can be obtained. The formula for calculating the overall weight matrix is ​​formula (6): (6); in, This is the road network distance weight matrix. This is a road grade weight matrix. Here is the intersection complexity weight matrix. For Hadama accumulation, This is the overall weight matrix.

[0055] In an exemplary embodiment, the method further includes the following step: before inputting the historical traffic state sequence into the pre-trained multi-weighted temporal graph convolutional network (MTGN), converting the historical traffic state sequence into a four-dimensional tensor; the four-dimensional tensor includes the number of sample batches processed by STGCN, the number of dimensions of traffic flow observations, the number of nodes, and the historical observation step size.

[0056] Specifically, the input layer of this model is mainly responsible for transforming the time-series traffic flow data of each node in the road network to meet the input requirements of the spatiotemporal convolutional block (ST-Conv Block) in the model. Therefore, this layer (input layer) needs to process the graph-structured traffic data into a four-dimensional tensor X, with dimensions (batch_size, number_features, num_vertices, num_timesteps): where batch_size represents the number of sample batches processed by the model; number_features represents the number of dimensions of the traffic flow observations (i.e., Ci); and num_vertices represents the number of nodes (i.e., the number of detectors). n ); num_timesteps represents the historical observation step size (i.e., M). At the same time, it is necessary to calculate the adjacency matrix based on the traffic network graph, and combine it with the traffic facility information in the road network to generate a multi-weight matrix W using formula (6). This matrix is ​​used to drive the operation of ST-ConvBlock.

[0057] In addressing the challenges of time series forecasting, deep learning methods typically favor recurrent neural networks (RNNs). However, these models are limited by their sequential computational structure and the large memory resources required to store hidden states. Therefore, academic research has significantly shifted towards using convolutional neural networks (CNNs) as the core model for time series feature extraction, achieving superior prediction results. However, CNNs have limitations due to their large kernel size, resulting in a relatively small temporal receptive field and difficulty in effectively extracting long-term dependency information. To address this, this invention employs a specially designed temporal convolutional network architecture, using temporal convolutional layers to extract time-related features of traffic flow.

[0058] Figure 4 The temporally gated convolutional layer structure diagram provided in this specification shows that the temporally gated convolutional layer consists of three main components: a temporal residual block, a one-dimensional convolutional layer, and a gated linear unit (GLU) activation layer, as shown below. Figure 4As shown in Figure (a), the temporal residual block contains two dilated causal convolutional layers and one nonlinear activation layer, with additional weight normalization and dropout layers to accelerate model training and prevent overfitting. To achieve residual connections, the original input data is directly superimposed on the output of multiple nonlinear processing layers (such as dilated causal convolutional layers). The specific structure of the temporal residual block is as follows: Figure 4 As shown in Figure (b) of the document.

[0059] like Figure 4 As shown, this invention takes the computation process of a single node as an example. The input vector of the temporal convolutional layer is defined as... ,in, M Indicates the number of historical observation time steps. This represents the number of input feature channels. The input vector is assigned to two branches: one branch extends along the time dimension... The input is a time-domain residual block; after processing by a modified linear unit activation function, the output vector is obtained. The calculation formula is shown in formula (7):

[0060] (7); in, O Indicates the output vector; Represents the input vector; This represents the modified linear unit activation function; This represents the processing operations of the time-domain residual block.

[0061] Subsequently, a convolution kernel was used. Perform a one-dimensional convolution on \Gamma\in\mathbb{R}^{K_t\times C_i}, and set the number of convolution kernels to 1. .in, This indicates the length of the convolution kernel in the time dimension. Indicates the number of input feature channels. This indicates the number of output feature channels. Using the "Valid" padding mode, the vector is obtained after convolution. Divide the vector along the last dimension into P and Q ,Right now .

[0062] In another branch of computation, the following is adopted: convolution kernels Directly applied to the input vector ,get .

[0063] Finally, the outputs of the two branches are merged and processed by the gated linear unit (GLU) activation function to obtain the output of the temporal convolutional layer as shown in formula (8): (8); in, This represents the temporal convolution operation. Represents the global convolution operator for a temporal convolutional layer; Represents a one-dimensional convolution kernel; P and Q This represents the two vectors obtained by the first computational branch. This represents element-wise multiplication; This represents the Sigmoid activation function.

[0064] In the field of spatial feature extraction, convolutional neural networks excel at processing Euclidean spatial data with translation invariance, but perform poorly when processing data in non-Euclidean spaces (such as traffic flow data in road networks). Graph convolutional networks, based on spectral graph theory, can preserve the spatial topological relationships in traffic networks and are therefore often used to solve traffic flow prediction problems. This invention utilizes graph convolution methods to construct spatial domain convolutional layers to extract spatial features of traffic network flow.

[0065] The computation process of spatial graph convolutional layers can be divided into three steps: First, based on the adjacency relationships of the traffic map and the characteristics of road traffic facilities, a multi-weight adjacency matrix is ​​constructed. Degree matrix and the Thulaplace matrix .in, , , For W, the first i Line number j The elements of the column.

[0066] Subsequently, as shown in Equation (9), the Laplace matrix is ​​symmetrically normalized; then, the normalized Laplace matrix is ​​spectrally decomposed according to Equation (10).

[0067] (9); (10); in, for n An identity matrix of order 1; For the normalized Laplace matrix L The eigenvector matrix (graphical Fourier basis). for L The eigenvalue diagonal matrix, for L The i Each feature value.

[0068] The Fourier transform based on a graph structure can be represented as the inner product between the node data vectors in the graph and the eigenvector matrix of the graph's Laplacian matrix. Furthermore, convolution in the time domain is equivalent to multiplication in the frequency domain, which can be further implemented by combining this with the inverse Fourier transform. Therefore, the input vector... X ( t ) and the convolution kernel on the graph h The convolution relationship can be expressed as formula (11):

[0069] (11); Where (∙*∙)G represents graph-based convolution operation, and hG(∙) represents the convolution kernel after Fourier transform. h The function matrix.

[0070] In the above formula, UT∙X(t) performs a Fourier transform on the graph structure data, while hG(Ʌ) serves as a filter composed of eigenvector matrices. Therefore, hG(Ʌ)UT∙X(t) completes filtering and feature extraction in the frequency domain; subsequently, the output vector of the graph convolution is obtained through an inverse transform.

[0071] In addition, to reduce the number of operation parameters and matrix multiplication operations, this invention uses the Chebyshev polynomial approximation method to construct the convolution kernel, specifically as shown in formula (12): (12); in, To scale the Laplacian matrix, for L The largest eigenvalue, express k Chebyshev polynomials satisfy , , , Let be the polynomial coefficient vector. K This is the highest order of the Chebyshev approximation.

[0072] Finally, the processing of spatial graph convolution can be described by formula (13): (13); in, Y ( t ) represents the output vector of the spatial graph convolutional layer. Represented by scaling the Laplace matrix as independent variable k Chebyshev polynomial matrix of order, Indicates the first k Polynomial coefficients of order 1 X ( t )express t The node feature vector at time step.

[0073] The above process applies to a single feature channel containing n Input vector of each node The output vector is obtained by graph convolution operation. When the input expands to One channel, namely When the convolution kernel dimension is ,in This also represents the number of convolutional kernels and the output dimension of the feature map, with the output vector being... For an input spanning M time steps The output vector is .

[0074] The primary goal of the spatiotemporal convolutional module is to extract and integrate temporal and spatial features from traffic flow. Therefore, the structure is designed as a three-layer architecture: a temporal convolutional layer + a spatial graph convolutional layer + a temporal convolutional layer (e.g., ...). Figure 2 (As shown). This design concept stems from the fact that each node in the graph-structured road network traffic flow data contains rich original spatiotemporal feature information, some of which may interfere with the overall assessment of traffic conditions and increase the computational complexity of the model. Therefore, the first temporal convolutional layer filters out irrelevant information from the traffic flow data along the time dimension, thereby reducing the computational scale and enhancing the temporal dependency features of each node in the traffic network graph; the intermediate spatial graph convolutional layer analyzes the spatial interaction relationships between nodes in the traffic network from the spatial dimension, capturing the spatial topological relationships of traffic flow through convolution operations based on graph-structured data, and realizing the screening and extraction of spatial features of network traffic flow; the second temporal convolutional layer works in conjunction with the first two layers to form a "funnel" structure—the length of the time dimension is shortened by 2 (Kt-1) each time data flows through the spatiotemporal convolutional module. At the same time, this method uses the difference in the number of channels to perform hierarchical feature extraction, thereby realizing the integration and purification of the spatiotemporal features of traffic flow.

[0075] The output layer consists of a temporal convolutional layer and a fully connected layer. The temporal convolutional layer maps the output of the spatiotemporal convolutional module to a single time step and inputs the compressed feature map into the fully connected layer, ultimately generating a traffic flow prediction result with n nodes (such as vehicle speed or traffic flow).

[0076] Therefore, the loss function of this model is determined by calculating the difference between the predicted value and the actual value, and the specific formula is formula (14): (14); Where W represents all trainable parameters of the model. The loss value for the spatiotemporal graph convolutional neural network. These are the predicted values ​​from the spatiotemporal graph convolutional neural network. This is the actual value.

[0077] Finally, the mini-batch gradient descent algorithm is used to minimize the model's loss function, thereby completing the training of the neural network.

[0078] Figure 5 The structural comparison diagram of the original STGCN framework and the MTGN framework provided in this specification is as follows: Figure 5 As shown, Figure 5 Figure (a) in the diagram is the original STGCN framework structure diagram. Figure 5 Figure (b) in the diagram shows the MTGN framework structure. MTGN replaces the W-based spatial graph convolution with a matrix based on a multi-weight road structure on the basis of the original STGCN.

[0079] In one exemplary embodiment, to verify the model's performance, the dataset used in this experiment originated from the PeMSD7 traffic dataset provided by a local transportation department. Data was collected from 228 stations randomly selected from 11,198 traffic data collection points in Zone 7 of the region. Traffic data was collected from each collection point every 30 seconds, and this data was aggregated at five-minute intervals and periodically returned to the system. The collected data fields included timestamp, lane type, measured traffic flow, average occupancy rate, and average speed. Given that average speed reflects the overall operational efficiency of the road network and is a key indicator affecting travel speed and time for drivers and passengers, this invention selects average vehicle speed as the target variable for traffic flow prediction.

[0080] The datasets of this invention cover two time periods: PeMSD7(a) covers May 1, 2012 to June 30, 2012, and PeMSD7(b) covers May 1, 2018 to June 30, 2018; each dataset contains 44 working days of historical data, totaling 2.89 million records. The datasets are divided into three parts: 34 days of data as the training set, 5 days as the validation set, and another 5 days as the test set. To ensure data accuracy, this invention removes outliers generated by the detector, fills in missing values ​​using linear interpolation, and standardizes the original data using the Z-score method.

[0081] In this experiment, the historical time window was defined based on average vehicle speed data recorded at 5-minute intervals over a 60-minute period, corresponding to a total of 12 observation time points. M =9). Its purpose is to predict the average vehicle speed of traffic flow over the next 5 minutes. The predicted data is then used as new observation data for continuous prediction using a moving time window, with a total prediction duration covering 9 time points (...). H =9), equivalent to 45 minutes of traffic flow data. Predictive performance was tested for 15-minute, 30-minute, and 45-minute time intervals. H=3, 6, 9) were evaluated.

[0082] Based on the findings of multiple researchers and after numerous experimental verifications, the main training parameters of the MTGN model were finally determined. This model employs... K A fourth-order Chebyshev polynomial with a learning rate of 4 was used as the graph convolution kernel, and a two-layer dilated causal convolutional layer with a kernel size of 3 was employed. The entire training process consisted of 100 training epochs, with each epoch training all sample data (50 samples per batch) sequentially, requiring a total of 188 training cycles. Model parameters were saved after each training iteration. The RMSProp optimizer was used, with an initial learning rate of 0.001, and a training method incorporating a learning rate decay mechanism was employed.

[0083] To objectively compare the accuracy of model predictions, the MTGN model proposed in this invention was compared with seven representative time series prediction benchmark methods.

[0084] (1) Convolutional Neural Network: Presents the spatial-temporal relationship of traffic flow in the form of images, and uses convolutional networks to learn traffic flow features to achieve prediction.

[0085] (2) Support Vector Regression: The prediction regression error is calculated by adjusting the error range bandwidth, and continuous fitting of the data is achieved.

[0086] (3) Autoregressive integral moving average method: By differentiating non-stationary time series data to eliminate local levels or trends, a stationary time series is obtained, in which a specific part exhibits homogeneity.

[0087] (4) Long Short-Term Memory: A special type of recurrent neural network that performs better when processing longer sequences.

[0088] (5) Attention-based Spatial-Temporal Graph Convolutional Networks (ASTGCN): This model combines attention mechanism with spatial-temporal convolution, which can simultaneously capture the dynamic spatiotemporal features of traffic data.

[0089] (6) Spatial-Temporal Synchronous Graph Convolutional Network (STSGCN): This model captures local spatiotemporal correlations in different time periods by designing a local spatiotemporal synchronization mechanism and constructing multiple graph convolutional modules, thereby achieving more accurate traffic flow prediction.

[0090] (7) Spatio-Temporal Graph Convolutional Network (STGCN): This method combines two-dimensional convolutional networks and graph convolutional networks to construct a spatio-temporal convolutional module to extract the spatio-temporal features of traffic flow and finally generate prediction results. As a benchmark algorithm for traffic flow prediction based on deep learning, it is also the main method used for comparison in this invention.

[0091] Figure 6 The graph shows the performance comparison results of the model provided in this specification on the test set and validation set.

[0092] To measure and evaluate the performance of different methods, this invention employs three metrics: mean absolute error, mean absolute percentage error, and root mean square error. These metrics are used to analyze prediction results over three different time intervals (15 minutes, 30 minutes, and 45 minutes), and their calculation formulas are Equations (15) to (17):

[0093] (15); (16); (17); in, For the first i Traffic flow prediction results for each sample For the first i The actual traffic flow values ​​for each sample. n This represents the number of samples.

[0094] To rigorously evaluate the effectiveness of the proposed framework, researchers used the PeMSD7(M) and PeMSD7(L) test datasets to compare the predictive performance of the MTGN model with seven established benchmark models. The prediction accuracy of each method for average traffic flow velocity over different time spans (specifically 15, 30, and 45 minutes) is systematically summarized in Tables 1 to 3. These comparative results comprehensively demonstrate the ability of each model to capture spatiotemporal dynamics under varying prediction requirements.

[0095] Table 1 Comparison of 15-minute traffic flow prediction results Table 2 Comparison of 30-minute traffic flow forecast results Table 3 Comparison of 45-minute traffic flow forecast results As the quantitative results summarized in the table show, the MTGN model consistently demonstrates superior prediction accuracy across all evaluation timeframes compared to the seven baseline methods. Specifically, in short-term (15-minute) prediction tasks, the ARIMA method exhibits a mean absolute percentage error (MAPE) exceeding 10%, highlighting its difficulty in capturing dynamically changing traffic characteristics in large-scale network environments. Neural network-based methods, on the other hand, show significant performance improvements: the SVR model effectively classifies traffic states to optimize predictions by leveraging the powerful classification capabilities of support vector kernels; while LSTM and CNN architectures can partially capture spatiotemporal features, their effectiveness is limited by their focus on a single dimension; and hybrid frameworks such as ASTGCN, STSGCN, and STGCN, which balance spatiotemporal coupling, significantly outperform single-dimensional models. Building upon this, the MTGN model further integrates the influence of road infrastructure attributes by fusing temporal convolutional networks and graph convolutional networks to extend the spatiotemporal receptive field, effectively encoding long-range dependencies and complex topological constraints. Therefore, the mean absolute percentage error of the prediction results is controlled at 5.221%, achieving the best performance in MAE, MAPE, and RMSE metrics.

[0096] Within the medium- to long-term prediction periods (30 minutes and 45 minutes), the stochastic volatility of traffic dynamics significantly increases, leading to a clear convergence in prediction errors between the ARIMA method and various machine learning methods. Due to a lack of spatial topology modeling capabilities, the SVR model's effectiveness in capturing long-range spatiotemporal nonlinear relationships declines, resulting in a continuous increase in prediction errors. While LSTM and CNN models maintain good performance in 15-minute predictions, their robustness improves significantly with longer prediction periods, and their error accumulation rates are far lower than those of the SVR model. Meanwhile, although hybrid architecture models such as STGCN initially perform well, their error metrics rise sharply as the prediction window expands: when the prediction period extends from 30 minutes to 45 minutes, the STGCN model's MAPE increases by a maximum of 23.41%, while MAE and RMSE surge by 22.64% and 21.86%, respectively. Notably, the MTGN model exhibits more stable error growth—its MAE, MAPE, and RMSE increases are controlled within 18.13%, 20.41%, and 18.90%, respectively. These results fully demonstrate that the MTGN framework has excellent stability and predictive reliability, and is a more advantageous solution for medium- and long-term traffic flow forecasting compared to existing benchmark methods.

[0097] The above analysis shows that the two traffic flow prediction methods based on graph convolutional networks generally outperform other algorithms in terms of prediction accuracy. Therefore, this invention provides a detailed analysis of the performance of the STGCN and MTGN models during training and testing to compare their performance.

[0098] In this experiment, both models were trained using the same parameters. Comparing their prediction accuracy on the validation and test sets reveals that the MTGN model consistently outperformed the STGCN model within prediction intervals of 15, 30, and 45 minutes. Although the prediction error of both models increased with the length of the prediction interval, the error fluctuation of the MTGN model was significantly smaller than that of the STGCN model, thus further widening the accuracy gap over time. While the overall error performance of both models on the validation set was similar, the STGCN model performed poorly on the test set; while the MTGN model maintained stable performance across various datasets, demonstrating stronger robustness.

[0099] To visually demonstrate the actual prediction results of the STGCN and MTGN models, this invention randomly selected the average vehicle speed data of a node within a day from the PeMSD7 test dataset. By calling these two trained models, this invention predicted the average traffic flow speed for the next 5 minutes and compared it with the actual data. The results are as follows: Figure 7 and Figure 8 As shown. Figure 7 This is a comparison chart of the all-day speed forecasts provided in this manual. Figure 8 This is a diagram showing the distribution of actual and predicted traffic speeds provided in this manual.

[0100] Qualitative comparisons show that the speed predictions of both models closely match the actual data, demonstrating their strong ability to capture traffic speed distribution characteristics. However, although the peaks and troughs in the actual data are more pronounced, the predicted trajectories are relatively smooth, reflecting inherent limitations in capturing extreme instantaneous values. Detailed analysis of specific time periods reveals performance differences: during the morning peak hours (05:00–10:00)—a period characterized by a significant increase in the amplitude and frequency of speed fluctuations—the STGCN model tends to provide conservative estimates and exhibits an overly smooth transition; in contrast, the MTGN model's predictions more accurately reflect actual values ​​and effectively capture high-frequency fluctuations. This higher accuracy is also verified during the 13:00–15:00 period. While both models perform well during periods of stable traffic, the MTGN model is more adaptable to dynamic trend changes and significantly outperforms the STGCN model in tracking rapidly changing traffic conditions.

[0101] This invention proposes a novel multi-weighted temporal graph convolutional network (MTGN) framework for traffic flow prediction, with its core based on topological weight encoding of road network infrastructure. The model captures long-term temporal dependencies through a dedicated temporal convolutional module and utilizes graph convolutional layers to resolve multi-dimensional spatial correlations at discrete time steps. The key innovation of this invention lies in the use of multi-weight matrices, which can explicitly characterize the complex spatial relationships between traffic features, thereby achieving a robust nonlinear mapping from empirical observation data to prediction results.

[0102] To validate the effectiveness of the MTGN model, researchers conducted a comprehensive evaluation using the PeMSD7 dataset. By comparing it with seven representative baseline models using MAE, MAPE, and RMSE as evaluation metrics, the results show that MTGN consistently demonstrates superior prediction accuracy. Notably, the performance difference between MTGN and the baseline models becomes increasingly significant as the prediction timeframe lengthens, fully demonstrating its ability to suppress error accumulation. Furthermore, detailed comparative analysis with the STGCN model across different time intervals reveals that MTGN exhibits stronger robustness and stability, particularly excelling in capturing rapidly changing traffic flow fluctuations. Therefore, introducing road structure weight parameters provides a more accurate and reliable foundation for intelligent traffic management systems.

[0103] This invention proposes a novel prediction framework—Multi-weighted Temporal Graph Convolutional Network (MTGN)—aimed at extracting the inherent complex spatiotemporal features of urban transportation infrastructure. By synergistically combining Graph Convolutional Network (GCN) and Temporal Convolutional Network (TCN), MTGN can simultaneously capture the spatial dependencies and temporal dynamics of traffic data, enabling comprehensive analysis. Furthermore, this model introduces a novel multi-weighted representation method for road networks, explicitly encoding physical variables such as geographical distance, road function classification, and intersection complexity, thereby improving prediction accuracy. Validation results on the public dataset PeMSD7 show that MTGN significantly outperforms existing benchmark models such as convolutional neural networks, long short-term memory networks, and spatiotemporal graph convolutional neural networks in key metrics such as mean absolute error, mean absolute percentage error, and root mean square error. These research results fully demonstrate the superior performance of MTGN in providing accurate and reliable traffic predictions, thus contributing to the construction of a more resilient and intelligent transportation ecosystem.

[0104] When applying the multi-weighted traffic flow prediction method provided in this manual, it is not necessary to consider... Figure 1 The steps shown are executed in sequence. The specific execution order of each step can be determined as needed, and this manual does not impose any restrictions on it.

[0105] The above describes one or more embodiments of a multi-weighted traffic flow prediction method provided in this specification. Based on the same idea, this specification also provides a corresponding multi-weighted traffic flow prediction device, such as... Figure 9 As shown.

[0106] Figure 9 A schematic diagram of a multi-weighted traffic flow prediction device provided in this specification includes: Module 901 is used to obtain the historical traffic state sequence and traffic network map of the target area, and to construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map.

[0107] The first prediction module 902 is used to input the historical traffic state sequence into the pre-trained multi-weight temporal graph convolutional network MTGN to obtain the traffic flow values ​​of the study area at multiple future time steps; MTGN includes a first time-gated convolutional network, a spatial graph convolutional network with a multi-weight matrix as a graph shift operator, and a second time-gated convolutional network.

[0108] The second prediction module 903 is used to input historical traffic state sequences into a pre-trained multi-weighted temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. This includes the following steps: extracting preliminary temporal features of the historical traffic state sequences through a first time-gated convolutional network; performing convolution operations based on a multi-weighted matrix on the preliminary temporal features through a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial correlation of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features through a second time-gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

[0109] Specific limitations regarding the multi-weighted traffic flow prediction device can be found in the limitations of the multi-weighted traffic flow prediction method described above, and will not be repeated here. Each module in the aforementioned multi-weighted traffic flow prediction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0110] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The proposed method is based on multi-weighted traffic flow prediction.

[0111] This instruction manual also provides Figure 10 The schematic diagram of the computer device shown is as follows: Figure 10At the hardware level, the computer device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above-mentioned functions. Figure 1 The proposed method is based on multi-weighted traffic flow prediction.

[0112] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0113] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A traffic flow prediction method based on multi-weighting, characterized in that, Includes the following steps: Obtain the historical traffic state sequence and traffic network map of the target area, and construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map; The historical traffic state sequence is input into a pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. The MTGN includes a first temporally gated convolutional network, a spatial graph convolutional network using a multi-weight matrix as a graph shift operator, and a second temporally gated convolutional network. The process of inputting the historical traffic state sequence into a pre-trained multi-weighted temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area includes the following steps: extracting preliminary temporal features of the historical traffic state sequence through a first temporal gated convolutional network; performing convolution operations based on a multi-weighted matrix on the preliminary temporal features through a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial correlation of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features through a second temporal gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

2. The traffic flow prediction method based on multi-weights as described in claim 1, characterized in that, The construction of a multi-weight matrix representing the inherent spatial correlation attributes of a transportation network based on a transportation network graph includes the following steps: Determine the road network distance weight matrix based on the travel distance between nodes in the traffic network graph; Based on the road grade scores of the connecting nodes in the traffic network graph, determine the road grade weight matrix; The intersection complexity weight matrix is ​​determined based on the sum of the intersection levels between nodes in the traffic network graph. The Hadamard product of the road network distance weight matrix, the road level weight matrix, and the intersection complexity weight matrix is ​​determined as a multi-weight matrix.

3. The traffic flow prediction method based on multi-weights as described in claim 2, characterized in that, The determination of the road network distance weight matrix based on the travel distance between nodes in the traffic network graph includes the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j There are edges connecting them, and the nodes i and nodes j The driving distance between them meets the first preset constraint condition. At that time, node i and nodes j The road network distance weight between them is ;in, For nodes i and nodes j The driving distance between them To control the threshold of distance weight distribution, A threshold for controlling the dispersion of distance weights; When node i and nodes j There is no edge connection between them, or nodes i and nodes j When the driving distance between nodes does not meet the first preset constraint, i and nodes j The road network distance weight between them is a preset road network distance weight value; Based on the road network distance weights between nodes in the traffic network graph, a road network distance weight matrix is ​​constructed.

4. The traffic flow prediction method based on multi-weights as described in claim 2, characterized in that, The method for determining the road grade weight matrix based on the road grade rating of connected nodes in the traffic network graph includes the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The road grade weights between them are ;in, For connecting nodes i and nodes j Road grade rating The threshold for the road grade weight distribution; When node i and nodes j When there is no edge connecting the nodes, i and nodes j The road grade weights between them are preset road grade weight values; Based on the road grade weights among nodes in the traffic network diagram, a road grade weight matrix is ​​constructed.

5. The traffic flow prediction method based on multi-weights as described in claim 2, characterized in that, The method for determining the intersection complexity weight matrix based on the sum of intersection levels between nodes in the traffic network graph includes the following steps: For any node in the transportation network graph i and nodes j When node i and nodes j When there is an edge connection between nodes, i and nodes j The complexity weight of the intersection between them is ;in, For nodes i and nodes j The sum of the cross-levels, The threshold for the cross-level weight distribution; When node i and nodes j When there is no edge connecting the nodes, i and nodes j The complexity weight of the intersections between them is a preset intersection complexity weight value; Based on the intersection complexity weights between nodes in the traffic network diagram, an intersection complexity weight matrix is ​​constructed.

6. The traffic flow prediction method based on multi-weights as described in claim 1, characterized in that, The MTGN includes two stacked spatiotemporal convolutional modules and an output layer. Each spatiotemporal convolutional module is composed of a first temporally gated convolutional network, a spatial graph convolutional network, and a second temporally gated convolutional network connected in series. The output layer includes a temporally gated convolutional layer and a fully connected layer.

7. The traffic flow prediction method based on multi-weights as described in claim 1, characterized in that, The method further includes the following steps: Before inputting the historical traffic state sequence into the pre-trained multi-weighted temporal graph convolutional network (MTGN), the historical traffic state sequence is converted into a four-dimensional tensor. The four-dimensional tensor includes the number of sample batches processed by STGCN, the number of dimensions of traffic flow observations, the number of nodes, and the historical observation step size.

8. A traffic flow prediction device based on multi-weighting, characterized in that, include: The module is used to obtain the historical traffic state sequence and traffic network map of the target area, and to construct a multi-weight matrix representing the inherent spatial correlation attributes of the traffic network based on the traffic network map; The first prediction module is used to input the historical traffic state sequence into a pre-trained multi-weight temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area; the MTGN includes a first temporal gated convolutional network, a spatial graph convolutional network using a multi-weight matrix as a graph shift operator, and a second temporal gated convolutional network. The second prediction module is used to input the historical traffic state sequence into a pre-trained multi-weighted temporal graph convolutional network (MTGN) to obtain traffic flow values ​​for multiple future time steps in the study area. This includes the following steps: extracting preliminary temporal features of the historical traffic state sequence through a first temporal-gated convolutional network; performing convolution operations based on a multi-weighted matrix on the preliminary temporal features through a spatial graph convolutional network to extract spatiotemporal fusion features that integrate the spatial correlation of the road network; extracting enhanced spatiotemporal features of the spatiotemporal fusion features through a second temporal-gated convolutional network; and obtaining traffic flow values ​​for multiple future time steps in the target area based on the enhanced spatiotemporal features.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.

10. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any one of claims 1 to 7.