Traffic information embedding device and method based on deep learning
By using Laplace matrix to embed road network spatial information and integrating traffic periodicity in traffic flow prediction, combining spatiotemporal graph neural network and self-attention mechanism to generate high-dimensional embedded features of traffic data, the problem of difficult to capture the interactive characteristics of traffic nodes in the existing technology is solved, and more accurate traffic flow prediction is achieved.
Patent Information
- Application Number
- CN202510114793.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to fully capture the interactive characteristics of traffic nodes in different time periods in traffic flow prediction, resulting in the model being unable to accurately predict traffic flow.
By embedding road cyberspace information using Laplace matrix in the data embedding layer, and integrating traffic periodicity with time stamps, the space-time graph neural network (STGNN) combined with the self-attention mechanism is used to generate high-dimensional embedded features of traffic data.
Effective modeling of weekly and daily cycle information in traffic data can be achieved, and short-term traffic patterns of traffic nodes can be captured more accurately, thereby optimizing traffic flow prediction.
Smart Images

Figure CN119961693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic technology, and in particular to a traffic information embedding device and method based on deep learning. Background Art
[0002] Traffic flow prediction is considered to be one of the most critical tasks in RNDT. Graph structures can describe the relationships between different entities and are very suitable for modeling traffic data and road network structures. Methods based on graph neural networks have also been widely explored in the field of traffic prediction. In the latest technological developments, researchers combine GNN with sequence information processing mechanisms such as recurrent neural networks or attention mechanisms. This integration aims to capture spatial and temporal relationships simultaneously and promote accurate prediction of traffic flow information. This integrated network is often called spatiotemporal graph neural network (STGNN), which currently exhibits state-of-the-art performance in the field of traffic prediction.
[0003] Traffic nodes at different times often exhibit similar traffic flows, but their traffic interaction patterns may not be equal. For example, commercial nodes may experience similar traffic peaks during meal times on different dates, but the post-peak traffic flows differ between weekdays and weekends. Relying only on the temporal embedding of a single moment as input will result in the model being unable to fully capture the interactive features. Summary of the invention
[0004] The purpose of the present invention is to provide a traffic information embedding device and method based on deep learning to solve the problem that traffic nodes at different times often show similar traffic flows, but their traffic interaction patterns may not be equal. For example, commercial nodes may experience similar traffic peaks during meal times on different dates, but the traffic flow after the peak is different between weekdays and weekends. Relying only on the time embedding of a single moment as input will cause the model to be unable to fully capture the interaction characteristics. To achieve the above purpose, the present invention provides the following technical solutions: a traffic information embedding device and method based on deep learning, comprising the following steps:
[0005] S1: First, the original data X∈R is embedded in a data embedding layer. T×N×C Transform to X∈R T×N×2C , embed the spatial information of the road network in the form of a Laplacian matrix and integrate traffic periodicity by marking time;
[0006] S2: Use t w(t) , To indicate the specific time position within a week and a day, where t w(t) and t d(t)is a function that converts time t into a week index (1 to 7) and a minute index (1 to 1440). By concatenating the embeddings of all T time slices, the time period embedding is obtained. This enables weekly and daily cycle information in traffic data to be modeled;
[0007] S3: The output of the data embedding layer is obtained by adding the embedding vectors obtained in S2:
[0008] X emb =X data +X spe +X w +X d ;
[0009] S4: Use a sliding window of length S to segment the historical traffic data, generate a series of traffic flow sequences and apply the K-Shape clustering algorithm to the sequences;
[0010] S5: The center point p of each aggregate cluster i (where p i $$ is also a time series of length S) is used to represent the corresponding clusters, with P = {p i |i∈[1,...,N p ]} to represent the clustering results, where N p is the total number of clusters, P is the representative short-term traffic pattern of a specific cluster;
[0011] S6: Through a node $n$, its historical traffic flow sequence spans S steps from time $(t-S+1) to t, and the sequence is represented as x t-S+1:t,n ;
[0012] S7: Through two embedding matrices x t-S+1:t,n and p i Get the high-dimensional representations of w1 and w2 respectively, and use the self-attention mechanism to calculate the similarity between them:
[0013] m i =softmax((x t-S+1t,n w1) T (p i w2));
[0014] S8: Using the weighted sum of similarities obtained in S7, the comprehensive representation of the historical sequence ${r}_{t}$ is embedded into the node ${n}_{t}$, as follows:
[0015]
[0016] Where x i,t Represents node x i,t The completed embedded feature.
[0017] A traffic information embedding device based on deep learning includes a processing module for data processing, a storage module for data storage, a wireless communication module for data acquisition, and a learning module for deep learning.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] In the present invention, for a given node, it often exhibits various unique short-term traffic patterns, each of which represents an important aspect of the node's traffic behavior. For the RNDT system, these traffic patterns often serve as key components for creating virtual copies of real-world traffic systems. At the same time, they can also assist in decision-making to optimize the RNDT system algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flowchart of the algorithm of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without creative work are within the scope of protection of the present invention.
[0022] See also Figure 1 The present invention provides a technical solution comprising the following steps:
[0023] S1: In order to accurately digitize real-world traffic data in the RNDT system, we first embed the original data X∈R T×N×C Transform to X∈R T×N×2C , embeds the spatial information of the road network in the form of a Laplacian matrix, and integrates traffic periodicity by marking time; specifically, in order to describe the structure of the road network, the graph Laplacian eigenvector is used to better describe the distance between nodes in the graph, which allows the graph to be embedded in the Euclidean space, resulting in the spatial graph Laplacian embedding X spe ∈R N×2C , while retaining the overall graph structure information;
[0024] S2: Use t w(t) , $t d(t) ∈R 2c To indicate the specific time position within a week and a day, where t w(t) and t d(t)is a function that converts time t into a week index (1 to 7) and a minute index (1 to 1440). By concatenating the embeddings of all T time slices, we obtain the time period embedding X w $, $X d ∈R T×2c , which enables modeling of weekly and daily cycle information in traffic data;
[0025] S3: The output of the data embedding layer is obtained by adding the embedding vectors obtained in S2:
[0026] X emb =X data +X spe +X w +X d ;
[0027] S4: For a given node, it often exhibits various unique short-term traffic patterns (such as morning rush hour or weekend consumption peak), each of which represents an important aspect of the node's traffic behavior. For the RNDT system, these traffic patterns are often used as a key component to create a virtual copy of the real-world traffic system. At the same time, they can also assist in decision-making to optimize the RNDT system algorithm; Use a sliding window of length S to segment the historical traffic data, generate a series of traffic flow sequences, and apply the K-Shape clustering algorithm to the sequences;
[0028] S5: The center point p of each aggregate cluster i (where p i $$ is also a time series of length S) is used to represent the corresponding clusters, with P = {p i |i∈[1,...,N p ] to represent the clustering results, where N p is the total number of clusters, P is the representative short-term traffic pattern of a specific cluster;
[0029] S6: Through a node $n$, its historical traffic flow sequence spans S steps from time $(t-S+1) to t, and the sequence is represented as x t-S+1:t,n ;
[0030] S7: Through two embedding matrices x t-S+1:t,n and p i Get the high-dimensional representations of w1 and w2 respectively, and use the self-attention mechanism to calculate the similarity between them:
[0031] m i =softmax((x t-S+1:t,n w1) T (p i w2));
[0032] S8: Using the weighted sum of similarities obtained in S7, the comprehensive representation of the historical sequence ${r}_{t}$ is embedded into the node ${n}_{t}$, as follows:
[0033]
[0034] Where x i,t Represents node x i,t The completed embedded feature.
[0035] A traffic information embedding device based on deep learning includes a processing module for data processing, a storage module for data storage, a wireless communication module for data acquisition, and a learning module for deep learning.
[0036] The above shows and describes the basic principles, main features and advantages of the present invention. Technical personnel in this industry should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not used to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A traffic information embedding device and method based on deep learning, characterized in that: The steps include: S1: First, the original data X∈R is embedded in a data embedding layer. T×N×C Transform to X∈R T×N×2C , embed the spatial information of the road network in the form of a Laplacian matrix and integrate traffic periodicity by marking time; S2: Use t w(t) , $t d(t) ∈R 2c To indicate the specific time position within a week and a day, where t w(t) and t d(t) is a function that converts time t into a week index (1 to 7) and a minute index (1 to 1440). By concatenating the embeddings of all T time slices, we obtain the time period embedding X w $, $X d ∈R T×2c , which enables modeling of weekly and daily cycle information in traffic data; S3: The output of the data embedding layer is obtained by adding the embedding vectors obtained in S2: X emb =X data +X spe +X w +X d ; S4: Use a sliding window of length S to segment the historical traffic data, generate a series of traffic flow sequences and apply the K-Shape clustering algorithm to the sequences; S5: The center point p of each aggregate cluster i (where p i $$ is also a time series of length S) is used to represent the corresponding clusters, with P = {p i |i∈[1,...,N p ]} to represent the clustering results, where N p is the total number of clusters, P is the representative short-term traffic pattern of a specific cluster; S6: Through a node $n$, its historical traffic flow sequence spans S steps from time $(t-S+1) to t, and the sequence is represented as x t-S+1:t,n ; S7: Through two embedding matrices x t-S+1:t,n and p i Get the high-dimensional representations of w1 and w2 respectively, and use the self-attention mechanism to calculate the similarity between them: m i =softmax((x t-S+1:t,n w1) T (p i w2)); S8: Using the weighted sum of similarities obtained in S7, the comprehensive representation of the historical sequence ${r}_{t}$ is embedded into the node ${n}_{t}$, as follows: Where x i,t Represents node x i,t The completed embedded feature.
2. A traffic information embedding device based on deep learning, characterized in that: It includes a processing module for data processing, a storage module for data storage, a wireless communication module for data acquisition, and a learning module for deep learning.