A traffic flow prediction method based on comprehensive traffic characteristics
By introducing spatiotemporal and spatial dependence modeling and delay perception mechanisms into the vehicle flow prediction method, combining multi-layer residual MLP coding and nonlinear transformation, the problem that existing methods are difficult to capture the impact of complex travel modes and emergencies is solved, and efficient vehicle flow prediction and traffic management optimization in dynamic traffic environments are achieved.
Patent Information
- Application Number
- CN202411671983.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing traffic forecasting methods are difficult to capture the complex changes in travel mode over time and the delayed impact of emergencies on surrounding road sections, resulting in limited prediction effects in dynamic and complex urban traffic environments.
The traffic prediction method based on comprehensive traffic characteristics is adopted. By obtaining the traffic flow of historical nodes, the traffic flow sequence is extracted, and inputting it into the traffic prediction model, random mask linear projection, multi-layer residual MLP encoding, residual connection, binary clustering, nonlinear transformation and regression layer prediction are carried out, and future traffic flow is predicted by combining space-time dependence modeling and delay perception mechanism.
In a dynamic and complex urban traffic environment, it can capture traffic changes in real time and accurately predict the delay impact of emergencies on surrounding road sections, which significantly improves the response speed and response capabilities of the urban traffic management system, and reduces traffic delays and congestion.
Smart Images

Figure CN119541223B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle networking, and particularly relates to a traffic flow prediction method based on comprehensive traffic characteristics. Background Art
[0002] In the field of traffic flow prediction, existing mainstream methods often adopt static, locally designed preset rules and rely on traditional traffic flow models. However, these methods have limited performance in dealing with dynamically changing traffic conditions and are difficult to capture the complex changing relationships of travel patterns over time. In addition, existing methods lack dynamic modeling of the mutual relationships between nodes in different periods. For example, when a traffic accident occurs at a certain location, its impact on neighboring areas may be delayed by several minutes, and existing models are difficult to accurately reflect this delay transmission effect. Therefore, existing static models do not fully consider the complex spatio-temporal dependencies caused by travel patterns and emergencies. Summary of the Invention
[0003] To solve the above technical problems, the present invention proposes a traffic flow prediction method based on comprehensive traffic characteristics, which can accurately predict urban traffic flow, effectively assist urban managers in reducing traffic delays, scientifically and reasonably designing and adjusting the road network layout, and significantly reducing the operating costs of traffic management.
[0004] To achieve the above object, the present invention provides a traffic flow prediction method based on comprehensive traffic characteristics, including:
[0005] Obtain the traffic flow of a certain historical node, and extract the traffic flow sequence according to the traffic flow of a certain historical node;
[0006] Input the traffic flow sequence of a certain historical node into the traffic flow prediction model to predict the traffic flow of a certain future node.
[0007] Optionally, inputting the traffic flow sequence of a certain historical node into the traffic flow prediction model to predict the traffic flow of a certain future node includes:
[0008] Input the traffic flow sequence of a certain historical node into the traffic flow prediction model, perform random mask linear projection on each node to the latent space, and convert it into a representation form;
[0009] Based on the representation form, embed learnable parameters to obtain a comprehensive representation;
[0010] Perform multi-layer residual MLP encoding and residual connection on the comprehensive representation to obtain a linear reconstruction result;
[0011] Perform binary clustering on the linear reconstruction result, and obtain the clustering result after the recursion ends;
[0012] The linear reconstruction result is subjected to non - linear transformation through a fully - connected layer and the activation function tanh, and the future time - series label is predicted through an argmax operation;
[0013] Perform linear transformation on each sampled historical sequence respectively to obtain the linearly - transformed sequence, flatten the linearly - transformed sequence, and obtain the self - sampled embedding through linear aggregation;
[0014] Map the historical sequence closest to the predicted time point to a high - dimensional space through linear projection;
[0015] Capture short - term spatial dependencies based on the historical graph through DSTG Blocks to obtain the historical embedding; process the relationship between the self - sampled embedding and the historical embedding based on the transition graph, capture the traffic transfer relationship between nodes, and obtain the sampled embedding through DSTG Blocks; further embed based on the future graph to predict the propagation of future spatio - temporal information, and obtain the future embedding through DSTG Blocks; process the future embedding to obtain the spatio - temporal embedding;
[0016] Concatenate the historical embedding, the sampled embedding, and the spatio - temporal embedding to obtain a new comprehensive representation;
[0017] Input the new comprehensive representation into an L - layer residual MLP for non - linear transformation to obtain the non - linearly - transformed features;
[0018] Input the non - linearly - transformed features into the regression layer to predict the traffic flow of a certain future node.
[0019] Optionally, based on the representation form, embed learnable parameters to obtain the comprehensive representation as:
[0020]
[0021] where, is the comprehensive representation; FC embed (.) is a fully - connected layer used to map the input to a continuous embedding space; is at time T f and the target traffic flow data of node i; E i is the space of learnable parameters; is the learnable parameter of the day; is the learnable parameter of the week; is the learnable parameter of the holiday.
[0022] Optionally, perform multi - layer residual MLP encoding and residual connection on the comprehensive representation to obtain the linear reconstruction result as:
[0023]
[0024] Among them, is the linear reconstruction result; FC 1(l) is the first part of the fully connected layer, which maps the input to a hidden representation of a higher dimension; ReLU(.) is a non-linear activation function; FC 2(l) (.) is the second part of the fully connected layer, which is used to linearly transform the hidden features processed by the activation function again and adjust them to the target dimension R of the output; is the aggregated embedding of spatio-temporal features; l is the number of encoding layers; R is the overall embedding dimension.
[0025] Optionally, the historical embedding, the sampled embedding, and the spatio-temporal embedding are concatenated to obtain a new comprehensive representation as:
[0026]
[0027] Among them, is the historical embedding; is the sampled embedding; The meaning is the spatio-temporal embedding; E i is the spatial feature embedding; is the day of learnable parameters; is the week of learnable parameters; is the holiday of learnable parameters.
[0028] Optionally, the historical graph is used to represent the past traffic flow changes and capture the short-term spatio-temporal dependencies between nodes.
[0029] Optionally, the transition graph is used to simulate the transition process of traffic flow from the historical state to the future state, and capture the traffic flow transfer from one node to another through the interaction of the historical embedding and the self-sampled embedding.
[0030] Optionally, the future graph is used to further propagate the spatio-temporal information of future time steps for the future traffic state between nodes.
[0031] Technical effects of the present invention: The present invention discloses a traffic flow prediction method based on comprehensive traffic characteristics. By introducing spatio-temporal dependence modeling and delay perception mechanism, it can capture the changes in traffic flow in real time in a dynamic and complex urban traffic environment. In particular, this method takes into account the delay impact of emergencies on surrounding road sections, significantly improving the response speed and coping ability of the urban traffic management system, enabling traffic managers to make timely decisions, reducing delays and congestion. The present invention can not only handle daily traffic flow changes, but also model unconventional traffic patterns (such as traffic peaks during holidays and special events), providing users with more accurate travel route planning suggestions. This function helps users avoid congestion and optimize travel efficiency under unconventional traffic patterns, thus improving the overall traffic experience and reducing the inconvenience caused by traffic delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which form a part of this application, are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0033] Figure 1 It is a schematic flowchart of a traffic flow prediction method based on comprehensive traffic characteristics according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the accompanying drawings and combine the embodiments to detail this application.
[0035] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0036] In recent years, with the acceleration of the urbanization process, traffic management has faced unprecedented challenges. Traffic congestion not only significantly reduces the economic efficiency of cities, but also has a profound impact on the daily quality of life of citizens. According to statistics, the traffic congestion in many large cities around the world is intensifying, and there is an urgent need for effective intelligent traffic management systems to optimize large-scale traffic networks. Intelligent transportation systems (ITS) play a key role in optimizing traffic flow, alleviating urban traffic pressure and improving travel efficiency. However, how to accurately predict complex traffic spatio-temporal data, and at the same time cope with the impact of emergencies (such as traffic accidents) on the traffic flow of surrounding road sections, and capture unconventional traffic patterns during holidays and special events, is still a major challenge in designing and implementing effective intelligent traffic management strategies.
[0037] Such asFigure 1 As shown in Figure 1 , in this embodiment, a traffic flow prediction method based on comprehensive traffic characteristics is provided, including: obtaining the traffic flow of a certain historical node, and extracting the traffic flow sequence according to the traffic flow of a certain historical node;
[0038] Inputting the traffic flow sequence of a certain historical node into the traffic flow prediction model to predict the traffic flow of a certain future node.
[0039] Further, inputting the traffic flow sequence of a certain historical node into the traffic flow prediction model to predict the traffic flow of a certain future node includes:
[0040] Inputting the traffic flow sequence of a certain historical node into the traffic flow prediction model, and performing random mask linear projection on each node to the latent space and converting it into a representation form; specifically, in this embodiment, the traffic flow sequence of a certain node's historical traffic flow is The representation is expressed as So as not to overly rely on data at a specific time step, where represents the traffic flow situation of node i in the future T f time period, and D is the hidden dimension.
[0041] On the basis of the representation form, embedding learnable parameters to obtain a comprehensive representation, and the learnable parameters are space, day, week, and holiday;
[0042] Specifically, on the basis of the representation form, embedding learnable parameters to obtain a comprehensive representation as:
[0043]
[0044] Among them, is the comprehensive representation; FC embed (.) represents the fully connected layer (embedding function) used to map the input to the continuous embedding space; represents the target traffic flow data at time T f and node i; E i is the space of learnable parameters; is the day of learnable parameters; is the week of learnable parameters; is the holiday of learnable parameters. Performing multi-layer residual MLP encoding and residual connection on the comprehensive representation to obtain a linear reconstruction result; converting through the regression layer to reconstruct the original data dimension and ensure the embedding of comprehensive spatio-temporal information.
[0045] Specifically, performing multi-layer residual MLP encoding and residual connection on the comprehensive representation to obtain a linear reconstruction result as:
[0046]
[0047] Among them, is the linear reconstruction result; FC 1(l) is the first part of the fully connected layer, responsible for mapping the input to a higher-dimensional hidden representation. Through this process, the model can capture the non-linear relationships between input features and extract potential information; ReLU(.) is the non-linear activation function; FC 2(l) (.) is the second part of the fully connected layer, used to linearly transform the hidden features processed by the activation function again and adjust them to the target dimension R of the output. This part mainly integrates and compresses the features to ensure that the results can meet the requirements of subsequent processing or reconstruction. Through this process, the model can capture the non-linear relationships between input features and extract potential information; is the aggregated embedding of spatio-temporal features; l is the number of encoding layers; R is the overall embedding dimension.
[0048] Perform binary clustering on the linear reconstruction result, and obtain the clustering result after the recursion ends;
[0049] Specifically, perform a new binary clustering algorithm on the above spatio-temporal feature aggregated embedding S i to ensure that all important patterns in the data are captured and not obscured by larger or more dominant clusters, thus maintaining the balance and sensitivity of all time dependencies in the dataset. If the number of time series n of the current embedding is less than the threshold τ, then directly assign the same label label i to these time series and return the result. These sequences will not be further divided. Otherwise, use the K-Means clustering algorithm to segment the embedded time series through the Euclidean distance, divide the current time series into two initial clusters n_cluster = 2, and identify them with labels 0 and 1. Recursively call BinaryCluster for each of these two sub-clusters until the size of all sub-clusters is less than τ. After the recursion ends, return the final clustering result C i , indicating the clustering label to which each time series belongs. This process ensures finer-grained clustering and ensures that there will be no clusters containing too many time points, avoiding the omission of rare time dependencies.
[0050] Perform non-linear transformation on the linear reconstruction result through the fully connected layer and the activation function tanh, and predict the future time series label through the argmax operation;
[0051] Specifically, in this embodiment, the historical sequence is processed to obtain the embedded representation Perform non-linear transformation through the fully connected layer and the activation function tanh, and finally obtain the predicted future time series label through the argmax operation Subsequently, find the historical sequences with the same label from the historical sequences Perform modeling.
[0052] For each sampled historical sequence Perform a linear transformation to obtain the linearly transformed sequence, flatten the linearly transformed sequence, and obtain self-sampled embeddings through linear aggregation
[0053] The historical traffic flow sequence before the predicted time step Project it into a high-dimensional embedding through linear projection Represents the traffic flow characteristics closest to node i;
[0054] Capture short-term spatial dependencies through DSTG Blocks based on the historical graph to obtain historical embeddings; process the relationship between the self-sampled embeddings and the historical embeddings based on the transition graph to capture the traffic flow transfer relationship between nodes, and obtain sampled embeddings through DSTG Blocks; further embed based on the future graph to predict the propagation of future spatio-temporal information, and obtain future embeddings through DSTG Blocks; process the future embeddings to obtain spatio-temporal embeddings; where the historical graph is used to represent past traffic flow changes and capture short-term spatio-temporal dependencies between nodes; the transition graph is used to simulate the transition process of traffic flow from the historical state to the future state, and capture the traffic flow transfer from one node to another through the interaction of historical embeddings and self-sampled embeddings; the future graph is used to further propagate spatio-temporal information of future time steps for the future traffic state between nodes.
[0055] Specifically, in the historical graph, the source node and the target node are the same, representing the self-dependency relationship of the node within the historical time period, and capture short-term spatial dependencies through DSTG Blocks to obtain historical embeddings In the transition graph, the delay perception module processes the relationship between the self-sampled embeddings and the historical embeddings, captures the traffic flow transfer relationship between nodes, and obtains sampled embeddings through DSTG Blocks The future graph further predicts the propagation of future spatio-temporal information based on the embeddings of the transition graph, and obtains future embeddings through DSTG Blocks Thus, through processing, the finally generated spatio-temporal embeddings Through multiple Delay Spatio-Temporal Graph Attention Modules (DSTG Blocks), three graph structures of history, transition, and future are processed to capture spatio-temporal dependencies in traffic scenarios and the delay impact between intersections. Among them: The history graph represents past traffic flow changes and captures short-term spatio-temporal dependencies between nodes. The transition graph simulates the transition process of traffic flow from the historical state to the future state, and through the interaction of historical embedding and self-sampling embedding, captures the traffic flow transfer from one node to another. The future graph further propagates spatio-temporal information of future time steps based on the future traffic states between nodes. The DSTG Blocks first process the source node H scr and the target node H tgt input data for delay-aware feature exchange, using W u 、W m to convert time series information into high-dimensional features, and calculate similarity by combining traffic pattern features to obtain an enhanced time-space embedding representation. The source node and the target node represent the historical traffic information of the currently processed node in the traffic network and the future node to be predicted, respectively. W u 、W m are parameter matrices in the delay-aware feature transformation. The input after delay-aware feature transformation is passed to the graph convolutional layer, which calculates the dependencies between nodes and captures the spatial correlations of neighboring nodes. A sparse adjacency matrix is generated through parameters E 1 、E 2 to propagate the input data. The adjacency matrix is constructed by calculating the similarity between nodes to capture the spatial dependencies between traffic nodes. The adjacency matrix represents the connection relationships between nodes, such as adjacent intersections or traffic flow transfer paths. The representation after the graph convolutional layer is then passed to the multi-graph sparse attention mechanism to sparsely process the attention between different time steps and nodes, retaining stable gradient propagation and feature retention. The results of graph convolution and multi-head attention are processed through residual connection and normalization to ensure stable gradient propagation and feature retention.
[0056] Concatenate the historical embedding, the sampled embedding, and the spatio-temporal embedding to obtain a new comprehensive representation;
[0057] Specifically, concatenate the historical embedding, the sampled embedding, and the spatio-temporal embedding to obtain a new comprehensive representation as:
[0058]
[0059] where, is the historical embedding; is the sampled embedding; is the spatio-temporal embedding; E i is the spatial feature embedding; is the day of learnable parameters; A week of learnable parameters; A holiday of learnable parameters.
[0060] Input the new comprehensive representation into the L-layer residual MLP for non-linear transformation to obtain the features after non-linear transformation;
[0061] Input the features after the non-linear transformation into the regression layer to predict the traffic flow of a certain future node.
[0062] The present invention discloses a traffic flow prediction method based on comprehensive traffic characteristics. By introducing spatio-temporal dependence modeling and delay perception mechanism, it can capture the changes of traffic flow in real time in a dynamic and complex urban traffic environment. In particular, this method takes into account the delay impact of emergencies on surrounding roads, significantly improving the response speed and coping ability of the urban traffic management system, enabling traffic managers to make timely decisions, reducing delays and congestion. The present invention can not only handle daily traffic flow changes, but also provide more accurate travel route planning suggestions for users by modeling unconventional traffic patterns (such as traffic peaks during holidays and special events). This function helps users avoid congestion and optimize travel efficiency under unconventional traffic patterns, thus improving the overall traffic experience and reducing the inconvenience caused by traffic delays.
[0063] The above is only a preferred specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A vehicle flow prediction method based on comprehensive traffic characteristics, characterized in that: include: Obtain the traffic flow at a certain historical node, and extract the traffic flow sequence based on the traffic flow at a certain historical node; The traffic flow sequence of a certain historical node is input into the traffic flow prediction model to predict the traffic flow of a certain future node: Inputting the traffic flow sequence of a certain historical node into the traffic flow prediction model, performing random mask linear projection on each node into the latent space, and converting it into a representation form; Based on the representation form, learnable parameters are embedded to obtain a comprehensive representation; Performing multi-layer residual MLP encoding and residual connection on the comprehensive representation to obtain a linear reconstruction result; Performing binary clustering on the linear reconstruction results, and obtaining clustering results after recursion; The linear reconstruction result is nonlinearly transformed through a fully connected layer and an activation function tanh, and the future time series label is predicted through an argmax operation; Perform linear transformation on each sampled historical sequence to obtain the linearly transformed sequence, flatten the linearly transformed sequence, and obtain the self-sampled embedding through linear aggregation; Map the historical sequence closest to the predicted time point to a high-dimensional space through linear projection; Based on the historical graph, DSTG Blocks is used to capture short-term spatial dependencies and obtain historical embedding; based on the transition graph, the relationship between the self-sampling embedding and the historical embedding is processed to capture the traffic transfer relationship between nodes, and the sampling embedding is obtained through DSTGBlocks; based on the future graph, further embedding is performed to predict the propagation of future spatiotemporal information and obtain future embedding through DSTGBlocks; the future embedding is processed to obtain spatiotemporal embedding; Concatenating the history embedding, the sampling embedding, and the spatiotemporal embedding to obtain a new comprehensive representation; The new comprehensive representation is input into the L-layer residual MLP for nonlinear transformation to obtain the features after nonlinear transformation; The nonlinearly transformed features are input into the regression layer to predict the traffic flow of a future node.
2. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: Based on the representation form, learnable parameters are embedded to obtain a comprehensive representation: in, For comprehensive representation; FC embed (.) is a fully connected layer used to map the input to a continuous embedding space; For the time T f and the target traffic flow data of node i; E i is the space of learnable parameters; T i D is the number of days of learnable parameters; T i W is the number of learnable parameters; T i H are holidays with learnable parameters.
3. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: The comprehensive representation is subjected to multi-layer residual MLP encoding and residual connection to obtain a linear reconstruction result: in, is the linear reconstruction result; FC 1(l) For the first fully connected layer, the input Mapped to a higher-dimensional hidden representation; ReLU(.) is a nonlinear activation function; FC 2(l) (.) is the second fully connected layer, which is used to linearly transform the hidden features processed by the activation function again and adjust them to the output target dimension R; is the aggregate embedding of spatial and temporal features; l is the number of encoding layers; R is the overall embedding dimension.
4. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: The history embedding, the sampling embedding and the spatiotemporal embedding are concatenated to obtain a new comprehensive representation: in, Embedded for history; Embedding for sampling; The meaning is time-space embedding; E i is the spatial feature embedding; T i D is the number of days of learnable parameters; T i W is the number of learnable parameters; T i H are holidays with learnable parameters.
5. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: The history graph is used to represent past traffic flow changes and capture short-term spatiotemporal dependencies between nodes.
6. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: The transition graph is used to simulate the transition process of traffic flow from the historical state to the future state, and captures the transfer of traffic flow from one node to another through the interaction of historical embedding and self-sampling embedding.
7. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: The future graph is used to further propagate the spatiotemporal information of future time steps based on the future traffic status between nodes.
Citation Information
Patent Citations
Traffic flow prediction method based on improved space-time Transform
CN115273464A
Traffic flow prediction method and system based on trend space-time diagram convolution, and medium
CN116895157A