Congestion prediction method and system fusing traffic map dynamic characteristics

By integrating the spatial and similarity dependencies of the traffic graph in traffic congestion prediction, combining Transformer and KAN neural networks for feature extraction and fusion, and using generative adversarial networks to optimize the prediction results, the problem that existing methods are difficult to capture complex nonlinear dynamic features is solved, and more efficient and robust traffic congestion prediction is achieved.

CN120048114APending Publication Date: 2025-05-27UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510196735.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing traffic congestion prediction methods are difficult to capture complex nonlinear dynamic features, and lack globality and robustness, making it difficult to achieve effective prediction in a dynamic traffic environment.

Method used

The spatial and similarity dependencies in the traffic graph are extracted through graph convolution networks and Mahayana distances, and the temporal features are extracted in combination with the Transformer model, and the KAN neural network is used for feature fusion and prediction. At the same time, a generative adversarial network is used to evaluate the authenticity and rationality of the prediction results through multiple discriminators to optimize the generator's prediction capabilities.

Benefits of technology

It improves the globality and robustness of traffic congestion prediction, enhances the interpretability and prediction performance of the model, and can more accurately capture complex space-time dependencies in the traffic network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120048114A_ABST
    Figure CN120048114A_ABST
Patent Text Reader

Abstract

The invention discloses a congestion prediction method and system fusing traffic map dynamic features, and the method comprises the steps: extracting a spatial relationship: extracting a spatial dependency relationship between nodes and adjacent nodes in a traffic map structure through a graph convolution network, extracting a similarity dependency relationship between nodes and non-adjacent nodes in the traffic map structure through a mahalanobis distance, and fusing the similarity dependency relationship on the basis of the spatial dependency relationship to generate a new traffic map structure; a time feature extraction step: extracting time features from the dynamic traffic map sequence by using a Transform model; a feature fusion and prediction step of fusing the time features by using a KAN neural network, generating a fitting prediction function and generating a prediction result; and an evaluation and optimization step: based on the generative adversarial network, evaluating the authenticity and rationality of the prediction result from different angles through multiple discriminators, and optimizing the prediction capability of the generator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation technologies, and particularly to a traffic congestion prediction method and system integrating dynamic features of traffic maps. Background Art

[0002] In recent years, traffic congestion has become a common problem in the rapid advancement of global urbanization. According to statistics, the economic losses caused by traffic congestion worldwide reach up to hundreds of billions of US dollars annually, and the average commuting time of residents in some extra-large cities even exceeds two hours. With the continuous growth of urban population and the rapid increase in the number of motor vehicles, the operating pressure of the traffic network is constantly intensifying. The resulting commuting delays, energy waste, and environmental pollution not only directly affect the quality of residents' lives but also restrict the sustainable development of cities. Therefore, how to accurately predict traffic congestion has become the core research issue in the field of Intelligent Transportation System (ITS). Traffic congestion prediction is the basis for optimizing traffic management and rationalizing resource allocation. By timely warning of traffic congestion, managers can adjust signal timings, guide vehicle diversion, and formulate dynamic toll policies, thereby minimizing the negative impact of congestion on the urban traffic network to the greatest extent. Traffic congestion prediction has important practical significance for improving residents' travel experiences, reducing social and economic costs, and promoting the construction of smart cities.

[0003] Traditional traffic congestion prediction methods include time series analysis (such as the ARIMA model) and regression analysis, etc., which predict future traffic states by mining historical data patterns of traffic flow. These methods usually assume that traffic data has linear characteristics and are difficult to capture complex non-linear dynamic features. In addition, they are sensitive to outliers and noise in the data, and the prediction accuracy is limited. With the rise of data mining technologies, machine learning algorithms such as Support Vector Machine (SVM), Random Forest (RF), and Gradient Boosting Decision Tree (GBDT) have been widely applied to traffic prediction tasks. These methods can handle a certain degree of non-linear relationships, but rely on feature engineering and a large amount of labeled data, and the generalization ability of the models varies in different scenarios. In recent years, deep learning models (such as RNN, LSTM, GRU, GCN, and Transformer, etc.) have made significant progress in traffic congestion prediction. Especially the Transformer, which has very superior performance in capturing long-range dependencies and non-linear relationships. Its combination with the multi-head attention mechanism can simultaneously focus on the feature relationships at different positions and is particularly suitable for capturing complex spatio-temporal dependencies. Despite the important progress made in existing research, there are still the following problems in traffic congestion prediction:

[0004] (1) Global and dynamic: How to mine the dependency relationships of traffic evolution from the global traffic network in a dynamic traffic environment.

[0005] (2) Interpretability and robustness: The prediction results of existing models often lack interpretability, and data noise and emergencies in the actual traffic environment will significantly affect the robustness of the models. Summary of the Invention

[0006] In order to solve the technical problems existing in the existing traffic congestion prediction technology, this application proposes a congestion prediction method and system that integrates the dynamic features of traffic graphs.

[0007] On the one hand, this application is implemented through the following technical solutions:

[0008] A congestion prediction method that integrates the dynamic features of traffic graphs, the congestion prediction method includes:

[0009] Spatial relationship extraction step: Extract the spatial dependence relationship between nodes and adjacent nodes in the traffic graph structure through a graph convolutional network, extract the similarity dependence relationship between nodes and non-adjacent nodes in the traffic graph structure through the Mahalanobis distance, and fuse the similarity dependence relationship between nodes and non-adjacent nodes on the basis of the spatial dependence relationship between nodes and adjacent nodes to generate a new traffic graph structure;

[0010] Time feature extraction step: Use the Transformer model to extract time features from the dynamic traffic graph sequence; wherein, the dynamic traffic graph sequence is generated based on historical traffic data and combined with the spatial relationship extraction step;

[0011] Feature fusion and prediction step: Use the KAN neural network to fuse the time features extracted in the time feature extraction step, generate a fitting prediction function and generate a prediction result;

[0012] Evaluation and optimization step: Based on the generative adversarial network, evaluate the authenticity and rationality of the prediction result from different angles through multiple discriminators, and optimize the prediction ability of the generator.

[0013] In some embodiments, the spatial relationship extraction step specifically includes:

[0014] Extract the node feature representation through the graph convolutional network using the node features and the graph structure, use the feature representation output by the last layer of the graph convolutional network as the final node feature representation, and use the final node feature representation and the adjacency matrix of the node to construct the adjacency spatial relationship graph of the node; in the adjacency spatial relationship graph, the traffic feature and neighbor feature of each node in the graph have been represented as a feature vector;

[0015] The Mahalanobis distance is used to calculate the similarity between feature vectors, and the top K non - adjacent nodes with the highest similarity to each node are obtained as the new weighted edges of the node, and the edge values are calculated; wherein, the value of K is the same as the number of adjacent nodes of the node in the original topological space;

[0016] The similarity - dependent representation of each node is calculated.

[0017] Based on the adjacency space relationship graph of the nodes, the similarity - dependent representation is fused to form a new graph structure. The new graph structure includes both the original adjacency relationship and the non - adjacent but highly similar node relationships.

[0018] In some embodiments, the time feature extraction step specifically includes:

[0019] The historical traffic data is processed by time slicing. In each unit time slice obtained by using the spatial relationship extraction step, a local sub - graph is formed by each node and its adjacent nodes and similar nodes. Based on the local sub - graph, vector embeddings of node features are generated to form a dynamic traffic graph sequence; wherein, the node features reflect the features of the local sub - graph in the spatial dimension.

[0020] Periodic positional encoding is added to the node feature embeddings to generate the input representation of the time step. Based on the input representation of each time step, query vectors, key vectors, and value vectors are calculated through a Transformer.

[0021] The value vectors are weighted based on the attention weights to generate a weighted representation, and through the multi - head attention mechanism, different time - dependent patterns are obtained, thereby extracting the global dependence relationship between time steps, that is, the time feature.

[0022] In some embodiments, the feature fusion and prediction step specifically includes:

[0023] The KAN neural network performs a per - dimension non - linear mapping on the time features extracted by the time series extraction step for each time step: for each time step, first, a one - dimensional non - linear mapping function is applied to each feature dimension to obtain the non - linear representation of the feature; the non - linear mapping results of all dimensions are weighted and combined to synthesize the combined feature of this time step; a non - linear activation function is applied to the combined feature to obtain the final feature representation.

[0024] The KAN neural network adopts a multi - layer structure and gradually approximates the objective function by stacking multiple layers of non - linear mappings. The final output layer of the KAN neural network is responsible for fusing the final feature representations of all time steps to generate the final global feature representation, and converting the global feature representation into a prediction target, that is, the future traffic flow.

[0025] In some embodiments, the generative adversarial network consists of a generator and multiple discriminators; wherein, the number of discriminators is determined according to the design goal;

[0026] The generator is composed of the Transformer model in the temporal feature extraction step and the KAN neural network in the feature fusion module, and is used to receive historical traffic data and generate a prediction result of future traffic flow;

[0027] Each discriminator evaluates the matching degree between the prediction result generated by the generator and the true value from different perspectives, and optimizes the prediction ability of the generator.

[0028] In some embodiments, the generative adversarial network includes three discriminators, namely: a temporal consistency discriminator, a statistical property discriminator, and an anomaly detection discriminator;

[0029] Among them, the temporal consistency discriminator is used to evaluate whether the generated prediction result is consistent with the true data in the temporal pattern;

[0030] The statistical property discriminator is used to evaluate whether the generated prediction result matches the true data in terms of statistical properties;

[0031] The anomaly detection discriminator is used to evaluate whether there are outliers in the generated prediction result.

[0032] In some embodiments, the training and feedback process of the generative adversarial network includes:

[0033] Fix the parameters of the generator. Each discriminator samples real data from the real data distribution and uses the prediction result generated by the generator. According to the task objective of each discriminator, calculate the corresponding loss function, and update the parameters of the discriminator through backpropagation;

[0034] Fix the parameters of the discriminator. The generator generates a prediction result by inputting historical traffic data, inputs the generated prediction result into all discriminators, and obtains the discrimination value of each discriminator. According to the outputs of all discriminators, calculate the total loss of the generator, and update the parameters of the generator through backpropagation.

[0035] On the other hand, the present application also proposes a congestion prediction system that fuses the dynamic features of traffic maps. The congestion prediction system includes:

[0036] Spatial relationship extraction module, which extracts the spatial dependence relationship between nodes and adjacent nodes in the traffic map structure through a graph convolutional network, extracts the similarity dependence relationship between nodes and non-adjacent nodes in the traffic map structure through Mahalanobis distance, and fuses the similarity dependence relationship between nodes and non-adjacent nodes on the basis of the spatial dependence relationship between nodes and adjacent nodes to generate a new traffic map structure;

[0037] Temporal feature extraction module, which uses a Transformer model to extract temporal features from the dynamic traffic map sequence; wherein, the dynamic traffic map sequence is generated based on historical traffic data and combined with the spatial relationship extraction module;

[0038] Feature fusion module, which uses a KAN neural network to fuse the temporal features output by the temporal feature extraction module to generate a fitting prediction function and generate a prediction result;

[0039] And an adversarial discrimination module, which, based on a generative adversarial network, evaluates the authenticity and rationality of the prediction result from different angles through multiple discriminators to optimize the prediction ability of the generator.

[0040] In some embodiments, the spatial relationship extraction module includes:

[0041] A graph convolutional network, which is responsible for extracting the spatial dependence relationship between nodes and adjacent nodes in the traffic map structure;

[0042] A Mahalanobis distance calculation unit, which is responsible for extracting the similarity dependence relationship between nodes and non-adjacent nodes in the traffic map structure;

[0043] And a synthesis unit, which fuses the similarity dependence relationship between nodes and non-adjacent nodes on the basis of the spatial dependence relationship between nodes and adjacent nodes to generate a new traffic map structure.

[0044] In some embodiments, the adversarial discrimination module includes:

[0045] A generator, which is composed of the temporal extraction feature module and the feature fusion module, and is used to receive historical traffic data and generate a prediction result of future traffic flow;

[0046] And multiple discriminators, each of which evaluates the matching degree between the prediction result generated by the generator and the true value from different angles to optimize the prediction ability of the generator.

[0047] A congestion prediction method and system integrating dynamic features of traffic maps supplements the lack of the prediction method in terms of globality by integrating the spatial features between a node and its adjacent nodes with the similarity relationship between the node and its non - adjacent nodes. By using a temporal Transformer model, it captures the global dependencies in the time dimension from historical traffic data, combines the advantages of the KAN neural network in function decomposition to generate a fitting prediction function and produce a prediction result, improving the prediction performance and interpretability of the model. Finally, a generative adversarial network is adopted to evaluate the authenticity and rationality of the prediction result from different perspectives through multiple discriminators, optimize the prediction ability of the generator, and enhance the robustness. This application can provide more scientific and reasonable data support and technical support for traffic management and optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the embodiments of the present application, form a part of the present application, and do not limit the embodiments of the present application. In the drawings:

[0049] Figure 1 is a flowchart of the congestion prediction method proposed in the embodiment of the present application;

[0050] Figure 2 is an example of the structure of the generative adversarial network proposed in the embodiment of the present application;

[0051] Figure 3 is a schematic block diagram of the congestion prediction system proposed in the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0052] To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below in combination with the embodiments and the drawings. The illustrative embodiments and descriptions thereof of the present application are only used to explain the present application and do not limit the present application.

[0053] Embodiment:

[0054] This embodiment proposes a congestion prediction method integrating dynamic features of traffic maps. As Figure 1 shown, the congestion prediction method proposed in this embodiment includes:

[0055] Step 1, spatial relationship extraction step: Extract the spatial dependency relationship between nodes and adjacent nodes in the traffic map structure through a graph convolutional network, extract the similarity dependency relationship between nodes and non - adjacent nodes in the traffic map structure through the Mahalanobis distance, and fuse the similarity dependency relationship between nodes and non - adjacent nodes on the basis of the spatial dependency relationship between nodes and adjacent nodes to generate a new traffic map structure.

[0056] A transportation network is usually modeled as a graph G=(V, E), where V represents the set of nodes (such as road segments or intersections), and E represents the set of edges (i.e., road connection relationships). In step 1, a graph convolutional network (GCN) is used to extract the high-order representations of nodes by leveraging node features and the topological structure of the graph, thereby capturing the spatial dependency relationships between nodes and their adjacent nodes.

[0057] The initial set of edges is represented by an adjacency matrix A, which describes the connection relationship between node i and node j. If there is a connection, then A ij = 1; otherwise, A ij = 0, as shown in Equation (1):

[0058]

[0059] To improve numerical stability, a normalized adjacency matrix is used, expressed as Equation (2):

[0060]

[0061] where D is the degree matrix and I is the identity matrix.

[0062] Each node has initial features, such as road traffic flow, average speed, road length, etc. These features are combined into a node feature matrix X ∈ R N×F , where N is the number of nodes and F is the feature dimension of each node. The core formula of GCN can be expressed as Equation (3):

[0063]

[0064] where, H (l) is the node feature representation of the l-th layer. Initially, H (0) = X; is the normalized adjacency matrix; is responsible for propagating node features through the adjacency matrix and aggregating neighbor information; W (l) is the learnable weight matrix of the l-th layer, used to learn the combination weights of features; σ is an activation function (such as ReLU), used to enhance the model's expressive power.

[0065] Too many GCN layers may cause node features to tend to be the same. Therefore, in this embodiment, 2 layers of GCN are selected, enabling each node to aggregate the feature information of its neighbors and their neighbors. The output of the last layer H l is used as the final feature representation of the node, reflecting the spatial characteristics of the node itself and its neighbors. The node feature representation H l and the adjacency matrix A adj constitute the adjacency space relationship graph G adj , as shown in Equation (4):

[0066]

[0067] Step 1 also extracts the similarity relationship between non - adjacent nodes from the graph structure using the Mahalanobis distance, that is, captures the implicit correlation from the node features while retaining the expressive ability of the graph structure information.

[0068] In the adjacency spatial relationship, the traffic feature and neighbor feature of each node in the graph have been represented as a vector. Assume the node feature is represented as H i ∈R d , where i represents the node number and d represents the feature dimension. This step uses the Mahalanobis distance to calculate the similarity between feature vectors and constructs a similarity matrix based on non - adjacent nodes. For two nodes i and j, assume their feature vectors are H i and H j respectively, and the Mahalanobis distance between them is defined as Equation (5):

[0069]

[0070] where Σ is the covariance matrix of all node features. Σ− 1 is the inverse matrix of Σ. (H i −H j ) represents the difference of the node feature vectors. d M (H i ,H j ) is smaller, indicating a higher similarity between nodes. To simplify the traffic data volume and exclude the interference of tiny data, each node only retains the K non - adjacent nodes with the highest similarity to it as its new weighted edges (the value of K is the same as the number of adjacent nodes of the node in the original topological space), and the edge value is calculated as shown in Equation (6), and other edge values are taken as 0:

[0071]

[0072] where, represents the Mahalanobis distance of the K - th closest non - adjacent node to the i - th node.

[0073] Calculate the similarity of all node pairs to non - adjacent nodes according to the Mahalanobis distance, and calculate the similarity dependence representation H m of each node. As shown in Equation (7):

[0074]

[0075] Fuse the above two types of dependence representations by weighting according to Equation (8):

[0076] H fused =αH l +βH m(8)

[0077] Among them, α and β are weight parameters used to balance the influence of the two relationships and can be automatically optimized through training.

[0078] Through the above process, a complete similarity matrix containing the weights of non-adjacent nodes is generated using the Mahalanobis distance. Finally, the adjacent space dependence representation and non-adjacent similarity dependence representation of the nodes constitute a new graph structure. This structure includes both the original adjacent relationships (directly connected nodes) and non-adjacent but highly similar node relationships, and its effect can be expressed as Equation (9):

[0079]

[0080] Step 2, Time Feature Extraction Step: Use the Transformer model to extract time features from the dynamic traffic graph sequence; among them, the dynamic traffic graph sequence is generated based on historical traffic data and combined with the spatial relationship extraction step.

[0081] Traffic prediction is essentially a time series prediction problem, and its goal is to predict future traffic conditions based on a given dynamic traffic graph sequence. The dynamic traffic graph takes time as the dimension and reflects the states (such as flow, speed, delay, etc.) of each node (such as intersections or regions) in the traffic network and their topological relationships. The dynamic traffic graph sequence can be formally expressed as Equation (10):

[0082] G t =(V, E t , X t ) (10)

[0083] Among them, V represents the set of nodes, representing the roads in the traffic network; E t represents the set of traffic relationship edges between nodes; X t represents the node feature matrix of node X at time t. The prediction goal is to predict the dynamic graph sequence for the next T steps based on the historical dynamic traffic graph sequence. This problem can be formalized as Equation (11):

[0084] (G t ,..., G t+T-1 ) = F{(G t-L ,..., G t-1 )} (11)

[0085] Among them, t is the current time step, L is the length of the historical traffic sequence, and T is the length of the predicted traffic sequence. Given the historical dynamic traffic graph sequence (G t-L ,..., G t-1 ), through the prediction model F, predict the traffic states (G t ,..., G t+T-1 ) for the next T time steps.

[0086] In time feature extraction, historical traffic data is first processed by slicing it in time. Through the processing in step 1, within a single time slice, each node forms a local subgraph with its neighbor nodes and similar nodes. Based on this subgraph, vector embeddings of node features are generated to form a sequence of dynamic traffic graphs, where the node features reflect the features of the subgraph in the spatial dimension.

[0087] To further capture the dependency features in the time dimension, a Transformer encoder is used to model the sequence embeddings. To ensure that the temporal and periodic characteristics can be accurately mined by the model, periodic positional encoding is added to the input sequence. The periodic positional encoding is generated by sine and cosine functions and contains the characteristics of the sampling period (sample_of_hour(t): the number of samples within an hour, ranging from [0, 60 / N]), the daily period (hour_of_day(t): the hour of the day, ranging from [0, 23]), and the weekly period (day_of_week(t): the day of the week, ranging from [0, 6]). The specific calculations are as shown in equations (12), (13), and (14):

[0088]

[0089] where k is the encoding dimension index, and k ∈ {1,..., d pe} and 3×d pe is the dimension of the positional encoding. N is the number of samples of the original data within an hour. By combining the above three periodic characteristics, the periodic positional encoding PE(t) is generated, as shown in equation (15):

[0090] PE(t) = [PE sample (t, k), PE day (t, k), PE week (t, k)] (15)

[0091] Finally, a positional encoding vector of size 3×d pe is obtained. This periodic positional encoding is added to the node feature embeddings to generate the input representation at time step t, as shown in equation (16):

[0092]

[0093] For each input node sequence Based on the input representation at each time step, query vectors, key vectors, and value vectors are calculated through the Transformer, as shown in equation (17):

[0094]

[0095] where, WQ , W K , is a learnable weight matrix, and d k is the feature dimension of a single head. The embedding vectors of the query, key, and value of node i at time t are respectively denoted. For each pair of time steps t i and t j , the attention score is calculated by Equation (18)

[0096]

[0097] The attention score is converted to an attention weight α through a Softmax as in Equation (19) ti,tj :[[]]

[0098]

[0099] where d k is a scaling factor used to prevent numerical instability caused by overly large attention scores. denotes the importance weight of time step t j with respect to time step t i . Based on the attention weights, the value vectors are weighted to generate a weighted representation Attention(t i ), as shown in (20):

[0100]

[0101] Through the multi-head attention mechanism shown in Equation (21), different temporal dependence patterns can be captured:

[0102]

[0103] Thus, a new vector representation form is obtained for the time series of each node. The self-attention mechanism of the Transformer can capture the global dependencies between time steps enabling direct interaction of information at each time step. In addition, the multi-head attention mechanism can focus on different temporal dependence patterns (such as short-term fluctuations, long-term periodic trends, etc.), significantly enhancing the representational ability of the model. At the same time, the characteristics of matrix operations make the self-attention mechanism highly efficient in parallel computing.

[0104] Step 3, Feature Fusion and Prediction Step: Use the KAN neural network to fuse the extracted temporal features, generate a fitting prediction function, and generate a prediction result.

[0105] In this step 3, the output of the Transformer in the previous step is further processed, and the Kolmogorov - Arnold Networks (KAN) is used for one - dimensional sub - network decomposition. This step 3 combines the global modeling ability of the Transformer with the advantages of KAN in function decomposition to improve the prediction performance and interpretability of the model.

[0106] KAN is a neural network architecture based on the Kolmogorov - Arnold representation theorem. This theorem states that any continuous multi - dimensional function can be represented as a combination of a finite number of one - dimensional functions. KAN utilizes this property to decompose complex high - dimensional inputs into combinations of simple non - linear mappings through one - dimensional functions, thereby reducing the model complexity while capturing the non - linear relationships of input features. Compared with traditional fully - connected networks, KAN has fewer parameters, higher computational efficiency, and can enhance the interpretability of the model by analyzing one - dimensional mapping functions, making it suitable for complex traffic prediction tasks.

[0107] The input of KAN is the output feature MultiAtt(H) of the Transformer, that is, the representation capturing the global context features of time - series data. KAN performs per - dimension decomposition on each time step of the high - dimensional input MultiAtt(H)=[h t,1 ,h t,2 ,...,h t,d , transforming it into a combined representation of multiple one - dimensional functions to extract complex non - linear relationships.

[0108] For each time step, first, each feature dimension h t,j is applied with a one - dimensional non - linear mapping function ψ j to obtain the non - linear representation of the feature, as shown in Equation (22):

[0109] z t,j =ψ j (h t,j ) (22)

[0110] The feature vector of each time step is mapped to z t =[z t,1 ,z t,2 ,…,z t,d . Subsequently, the non - linear mapping results z t of all feature dimensions are weighted and combined to generate the combined feature at time step t, as shown in Equation (23):

[0111]

[0112] where, w j represents the weight parameter of the j - th feature dimension, and this parameter is learned through model training. gt is the combined feature at the t-th time step. This combination operation can capture the linear relationship between different features.

[0113] Next, as shown in Equation (24), apply the non-linear activation function φ to the combined feature g t to further enhance the model's ability to express complex non-linear relationships:

[0114] φ t = φ(g t ) (24)

[0115] where φ t is the output of the activation function. The activation function can be selected from Relu, Tanh, or other non-linear functions to adapt to the specific task requirements.

[0116] To further improve the non-linear modeling ability, KAN adopts a multi-layer structure and gradually approximates the complex objective function by stacking multiple non-linear mappings. The output of each layer can be expressed as Equation (25):

[0117]

[0118] where l represents the number of network layers, and are the weight and mapping function of the (l + 1)-th layer respectively. By stacking multiple mappings, the KAN module can effectively capture complex non-linear relationships and high-order dependencies between features. The final output layer of KAN is responsible for fusing the final feature representations of all time steps, converting the last layer feature into the prediction target, that is, the future traffic flow, and generating the final global feature representation Φ through Equation (26):

[0119]

[0120] For simplicity, the fusion method here is selected as the weighted average in the same form as Equation (25), or it can also be further processed by LSTM / GRU, etc. Finally, the prediction result is generated through the output layer as shown in Equation (27):

[0121]

[0122] where W o is the weight matrix of the output layer, b o is the bias term, is the predicted value.

[0123] KAN extracts complex non - linear relationships and generates low - dimensional feature representations by performing multi - layer non - linear mapping, feature combination, and non - linear activation on each dimension of the high - dimensional features output by the Transformer. Combining the global temporal modeling ability of the Transformer and the non - linear feature extraction advantage of KAN, the entire model can effectively handle the high - dimensional, non - linear, and complex spatio - temporal dependence problems in traffic flow prediction, thereby improving the prediction performance and the generalization ability of the model.

[0124] Step 4, evaluation and optimization step: Based on the generative adversarial network, use multiple discriminators to evaluate the authenticity and rationality of the prediction results from different perspectives, and optimize the prediction ability of the generator.

[0125] In this step 4, the multi - discriminator generative adversarial network (GAN) strategy is adopted to further improve the performance of the prediction model. The above - mentioned prediction method (Transformer + KAN) is designed as the generator in the adversarial network, and its role is to receive historical traffic data X input and generate the prediction results of future traffic flow The discriminator part consists of multiple sub - modules, and each discriminator evaluates the prediction results generated by the generator from different perspectives for the matching degree with the true value y. The input of the discriminator can be the original data features or features after a certain transformation. The number of discriminators K is determined according to the design goal. In this embodiment, three discriminators are designed, as Figure 2 shown, namely: the temporal consistency discriminator D 1 , the statistical characteristic discriminator D 2 and the anomaly detection discriminator D 3 .

[0126] Among them, the goal of the temporal consistency discriminator D 1 is to judge whether the generated prediction results are consistent with the true historical data X input in the temporal pattern. This discriminator focuses on evaluating whether the generated data conforms to the time laws of the true data (such as periodicity, trend, etc.). The model architecture and training process are as follows:

[0127] (1) Feature extraction: Extract multi - scale temporal patterns in the input temporal data through multiple convolutional layers. For the input true historical temporal data X input or the generated data with length T and convolutional kernel size k, the calculation formula of the convolutional layer is as shown in Equation (28):

[0128]

[0129] where, w iis the weight of the convolution kernel, b represents the bias term, and the convolutional layer is used to capture local temporal dependencies.

[0130] (2) Pooling operation: The output X after convolution conv is reduced in dimension through the pooling layer to retain significant features and reduce the data dimension. The max pooling operation is used to extract the most significant patterns in the local temporal window. For a feature X of length L conv , the max pooling operation divides it into P windows and takes the maximum value of each window, as shown in Equation (29):

[0131]

[0132] (3) Fully connected layer and discriminative output: The temporal features of the pooling layer are input into the fully connected layer and mapped to the output space through a linear transformation, as shown in Equation (30):

[0133] y fc = W·X pool + b (30)

[0134] where W is the weight matrix, b is the bias term, and X pool is the feature after pooling. The output layer maps the output to the probability space through a Sigmoid activation function σ, and the output value represents the temporal consistency probability of the generated data, as shown in Equation (31):

[0135]

[0136] An output value close to 1 indicates that the temporal pattern of the generated data highly conforms to the real data, and close to 0 indicates that the temporal pattern of the generated data is inconsistent with the real data.

[0137] (4) Discriminator training and loss function: The discriminator is optimized through the cross-entropy loss function shown in Equation (32), which is used to measure the difference between the predicted probability and the true label:

[0138]

[0139] In Equation (32), the first term is the discriminative loss for the real data, that is, to make the discriminator judge the real data as "real" as much as possible. The second term is the discriminative loss for the predicted data, that is, to make the discriminator judge the generated data as "fake" as much as possible.

[0140] The goal of the statistical property discriminator D 2 is to evaluate the generated traffic flow prediction data whether it is the same as the real data X inputMatch in statistical characteristics. Statistical characteristics mainly involve the global distribution characteristics of data, including mean, variance, skewness, kurtosis, etc. The discriminator uses these statistical features to evaluate the quality of the generated data and determine whether it conforms to the statistical distribution of the real data.

[0141] The discriminator will evaluate the similarity between the generated data and the real data through the following statistical characteristics:

[0142] (1) Mean μ: Reflects the central tendency of the data, and the calculation formula is Equation (33):

[0143]

[0144] where N is the number of samples, and y i is the i-th data point.

[0145] (2) Variance σ 2 : Reflects the degree of dispersion of the data, and the calculation formula is (34):

[0146]

[0147] (3) Skewness: Measures the degree of skewness of the data distribution, and the calculation formula is Equation (35):

[0148]

[0149] (4) Kurtosis: Measures the sharpness of the data distribution, describes the tail characteristics of the data, that is, whether there are many extreme values in the data, and the calculation formula is Equation (36):

[0150]

[0151] After calculating the statistical characteristics of the generated predicted data and the real data X input , the discriminator learns the relationship between these statistical characteristics through a multi-layer perceptron (MLP) and finally outputs a probability value indicating whether the generated data is consistent with the real data in statistical distribution. Similarly, the loss function uses cross-entropy loss, and the specific form is Equation (37):

[0152]

[0153] The anomaly detection discriminator D 3 aims to judge the generated predicted data Whether there are outliers or unreasonable fluctuations in the time series data. In traffic flow prediction, outliers such as sudden increases or decreases may occur, and these outliers will affect the accuracy of the prediction. Therefore, the design goal of the anomaly detection discriminator is to effectively identify these outliers and feedback them to the generator, so as to avoid generating similar abnormal data.

[0154] In this embodiment, the LSTM model is used to check whether there are outliers in the generated prediction data. An outlier refers to the fluctuations or mutations that occur in the data at certain time steps, and these fluctuations are inconsistent with the long-term trend or periodicity of the historical data. The LSTM model is described by equations (38)-(43):

[0155] i t = σ(W ii x t + b ii + W hi h t-1 + b hi ) (38)

[0156] f t = σ(W if x t + b if + W hf h t-1 + b hf ) (39)

[0157] g t = tanh(W ig x t + b ig + W hg h t-1 + b hg ) (40)

[0158] o t = σ(W io x t + b io + W ho h t-1 + b ho ) (41)

[0159] c t = f t * c t-1 + i t * g t (42)

[0160] h t = o t * tanh(c t ) (43)

[0161] Among them, i t , f t , o t are the input, forget, and output gates respectively, g t is the memory cell state, W ii , W if , W ig , W io , W hi , W hf , W hg are the weight matrices connecting x t , h t-1 to the three gates and the input unit, b ii , b if , b ig , b io , b hi , b hf , h g , b ho are the corresponding biases, σ represents the sigmoid function, tanh represents the hyperbolic tangent function, and * represents element-wise multiplication. The final hidden state h t and the cell state c t calculated by the LSTM can be used to determine whether there are anomalies in the generated data.

[0162] These temporal features are passed to the fully connected layer for further processing and mapped to a discriminant value. The loss function uses the cross-entropy loss function, as shown in Equation (44):

[0163]

[0164] The training and feedback process of the multi-discriminator generative adversarial network is as follows:

[0165] (1) Fix the generator parameters. Each discriminator D i focuses on its specific task and is optimized using real data and generated data. Specifically, the discriminator samples real data from the real data distribution and uses the generator to generate predicted data. The corresponding loss function L Di is calculated according to the task objective of each discriminator, and the parameters of the discriminator D i are updated through backpropagation.

[0166] (2) Fix the discriminator parameters. The generator optimizes the quality of the generated results by combining the feedback of all discriminators. Specifically, the generator generates predicted data by inputting historical traffic data, inputs the generated data into all discriminators, and obtains the discriminant values of each discriminator. According to the outputs of all discriminators, the total loss L G of the generator is calculated according to Equation (45), and the parameters of the generator are updated through backpropagation:

[0167]

[0168] Based on the same technical concept as above, this embodiment also proposes a congestion prediction system that integrates dynamic features of traffic maps. As Figure 3 shown, the congestion prediction system proposed in this embodiment includes:

[0169] A spatial relationship extraction module that extracts the spatial dependence relationship between nodes and adjacent nodes in the traffic map structure through a graph convolutional network, extracts the similarity dependence relationship between nodes and non-adjacent nodes in the traffic map structure through Mahalanobis distance, and fuses the similarity dependence relationship between nodes and non-adjacent nodes on the basis of the spatial dependence relationship between nodes and adjacent nodes to generate a new traffic map structure;

[0170] A temporal feature extraction module that uses a Transformer model to extract temporal features from the dynamic traffic map sequence; among them, the dynamic traffic map sequence is generated based on historical traffic data and combined with the spatial relationship extraction module.

[0171] A feature fusion module that uses a KAN neural network to fuse the temporal features output by the temporal feature extraction module to generate a fitting prediction function and generate a prediction result;

[0172] And an adversarial discrimination module that, based on a generative adversarial network, evaluates the authenticity and rationality of the prediction result from different angles through multiple discriminators to optimize the prediction ability of the generator.

[0173] Furthermore, the spatial relationship extraction module includes a graph convolutional network, a Mahalanobis distance calculation unit, and a synthesis unit. Among them, the graph convolutional network is responsible for extracting the spatial dependence relationship between nodes and adjacent nodes in the traffic map structure, the Mahalanobis distance calculation unit is responsible for extracting the similarity dependence relationship between nodes and non-adjacent nodes in the traffic map structure, and the synthesis unit fuses the similarity dependence relationship between nodes and non-adjacent nodes on the basis of the spatial dependence relationship between nodes and adjacent nodes to generate a new traffic map structure. The specific implementation method is as described in step 1 above, and will not be elaborated here.

[0174] Furthermore, the adversarial discrimination module includes a generator and multiple discriminators. Among them, the temporal feature extraction module and the feature fusion module serve as the generator, and their function is to receive historical traffic data and generate a prediction result of future traffic flow; each discriminator evaluates the matching degree between the prediction result generated by the generator and the true value from different angles to optimize the prediction ability of the generator. The specific implementation method is as described in step 4 above, and will not be elaborated here. The adversarial discrimination module can specifically adopt the Figure 2 structure shown.

[0175] It should be noted that the specific implementation manners of the timing feature extraction module and the feature fusion module in the system proposed in this embodiment are as described in the above steps 2 and 3 respectively, and will not be elaborated here.

[0176] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0177] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0178] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0180] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the above description is only for the specific embodiments of the present application and is not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A congestion prediction method integrating dynamic features of traffic graph, characterized in that: The congestion prediction method comprises: Spatial relationship extraction step: The spatial dependency relationship between nodes and adjacent nodes in the traffic graph structure is extracted through the graph convolution network, and the similarity dependency relationship between nodes and non-adjacent nodes in the traffic graph structure is extracted through the Mahalanobis distance. The similarity dependency relationship between nodes and non-adjacent nodes is fused on the basis of the spatial dependency relationship between nodes and adjacent nodes to generate a new traffic graph structure; Temporal feature extraction step: using the Transformer model to extract temporal features from a dynamic traffic map sequence; wherein the dynamic traffic map sequence is generated based on historical traffic data and in combination with the spatial relationship extraction step; Feature fusion and prediction step: using a KAN neural network to fuse the time features extracted in the time feature extraction step, generate a fitting prediction function and generate a prediction result; Evaluation and optimization step: Based on the generative adversarial network, multiple discriminators are used to evaluate the authenticity and rationality of the prediction results from different angles to optimize the prediction ability of the generator.

2. The congestion prediction method integrating dynamic characteristics of traffic graph according to claim 1 is characterized in that: The spatial relationship extraction step specifically includes: The node feature representation is extracted by using the node feature and the graph structure through the graph convolution network, and the feature representation output by the last layer of the graph convolution network is used as the final node feature representation. The final node feature representation and the node adjacency matrix are used to form an adjacency space relationship graph of the node; in the adjacency space relationship graph, the flow feature and neighbor feature of each node in the graph have been represented as a feature vector; The Mahalanobis distance is used to calculate the similarity between feature vectors, and the K non-adjacent nodes with the highest similarity to each node are obtained as the new weighted edges of the node, and the edge value is calculated; the value of K is the same as the number of adjacent nodes of the node in the original topological space; Calculate the similarity dependency representation of each node; Based on the node adjacency spatial relationship graph, similarity dependency representation is fused to form a new graph structure, which includes both the original adjacency relationship and the non-adjacent but highly similar node relationship.

3. The congestion prediction method integrating dynamic characteristics of traffic graph according to claim 1 is characterized in that: The time feature extraction step specifically includes: The historical traffic data is processed by time slices, and each node, its adjacent nodes and similar nodes constitute a local subgraph within a unit time slice extracted by the spatial relationship extraction step. Based on the local subgraph, node features generate vector embedding to form a dynamic traffic graph sequence; wherein the node features reflect the characteristics of the local subgraph in the spatial dimension; Add periodic position encoding to the node feature embedding to generate the input representation of the time step. Based on the input representation of each time step, the query vector, key vector and value vector are calculated through Transformer. The value vector is weighted based on the attention weight to generate a weighted representation, and different time dependency patterns are obtained through a multi-head attention mechanism, thereby extracting the global dependency between time steps, namely, the temporal feature.

4. The congestion prediction method integrating dynamic characteristics of traffic graph according to claim 1 is characterized in that: The feature fusion and prediction steps specifically include: The KAN neural network is used to perform dimension-by-dimension nonlinear mapping on the time features extracted in the time series extraction step according to the time step: for each time step, firstly, a one-dimensional nonlinear mapping function is applied to each feature dimension to obtain a nonlinear representation of the feature; the nonlinear mapping results of all dimensions are weightedly combined to synthesize the combined features of the time step; and a nonlinear activation function is applied to the combined features to obtain a final feature representation; The KAN neural network adopts a multi-layer structure and gradually approximates the target function by stacking multiple layers of nonlinear mapping. The final output layer of the KAN neural network is responsible for fusing the final feature representations of all time steps, generating the final global feature representation, and converting the global feature representation into a prediction target, namely, future traffic flow.

5. A congestion prediction method integrating dynamic features of traffic graph according to any one of claims 1 to 4, characterized in that: The generative adversarial network is composed of a generator and a plurality of discriminators, wherein the number of discriminators is determined according to the design goal; The generator is composed of the Transformer model in the time series feature extraction step and the KAN neural network in the feature fusion module, and is used to receive historical traffic data and generate prediction results for future traffic flow; Each of the discriminators evaluates the degree of match between the prediction results generated by the generator and the true value from different angles, thereby optimizing the prediction ability of the generator.

6. The congestion prediction method integrating dynamic characteristics of traffic graph according to claim 5 is characterized in that: The generative adversarial network includes three discriminators, namely: a temporal consistency discriminator, a statistical characteristic discriminator and an anomaly detection discriminator; The temporal consistency discriminator is used to evaluate whether the generated prediction result is consistent with the real data in terms of temporal pattern; The statistical characteristic discriminator is used to evaluate whether the generated prediction result matches the real data in terms of statistical characteristics; The anomaly detection discriminator is used to evaluate whether there are outliers in the generated prediction results.

7. The congestion prediction method integrating dynamic characteristics of traffic graph according to claim 5 is characterized in that: The training and feedback process of the generative adversarial network includes: The generator parameters are fixed, each discriminator samples real data from the real data distribution, and uses the prediction results generated by the generator to calculate the corresponding loss function according to the task objectives of each discriminator, and updates the parameters of the discriminator through back propagation; The discriminator parameters are fixed, and the generator generates prediction results by inputting historical traffic data. The generated prediction results are input into all discriminators, and the discriminant value of each discriminator is obtained. According to the output of all discriminators, the total loss of the generator is calculated, and the parameters of the generator are updated through back propagation.

8. A congestion prediction system integrating dynamic features of traffic graphs, characterized in that: The congestion prediction system comprises: A spatial relationship extraction module, which extracts the spatial dependency relationship between nodes and adjacent nodes in the traffic graph structure through a graph convolutional network, extracts the similarity dependency relationship between nodes and non-adjacent nodes in the traffic graph structure through Mahalanobis distance, and fuses the similarity dependency relationship between nodes and non-adjacent nodes based on the spatial dependency relationship between nodes and adjacent nodes to generate a new traffic graph structure; A temporal feature extraction module, wherein the temporal feature extraction module uses a Transformer model to extract temporal features from a dynamic traffic map sequence; wherein the dynamic traffic map sequence is generated based on historical traffic data and in combination with the spatial relationship extraction module; A feature fusion module, wherein the feature fusion module uses a KAN neural network to fuse the time features output by the time series feature extraction module, generate a fitting prediction function, and generate a prediction result; And, an adversarial discrimination module, which is based on a generative adversarial network and uses multiple discriminators to evaluate the authenticity and rationality of the prediction results from different angles to optimize the prediction ability of the generator.

9. The congestion prediction system integrating dynamic characteristics of traffic graph according to claim 8, characterized in that: The spatial relationship extraction module comprises: A graph convolutional network, which is responsible for extracting the spatial dependency relationship between nodes and adjacent nodes in the traffic graph structure; A Mahalanobis distance calculation unit, which is responsible for extracting similarity dependency relationships between nodes and non-adjacent nodes in a traffic graph structure; and a synthesis unit, wherein the synthesis unit fuses the similarity dependency relationship between the node and the non-adjacent nodes based on the spatial dependency relationship between the node and the adjacent nodes to generate a new traffic graph structure.

10. The congestion prediction system integrating dynamic features of traffic graph according to claim 8, characterized in that: The adversarial discrimination module comprises: A generator, which is composed of the time series feature extraction module and the feature fusion module, and is used to receive historical traffic data and generate prediction results of future traffic flow; And, multiple discriminators, each of which evaluates the degree of match between the prediction result generated by the generator and the true value from different angles to optimize the prediction ability of the generator.

Citation Information

Cited By

  • Recognition method and monitoring system for reaction state of rare earth metal electrolytic furnace

    CN120783261A