Traffic flow prediction method based on comprehensive traffic characteristics
Through the vehicle flow prediction method based on comprehensive traffic characteristics, the space-time dependence and delay transmission effect are captured, and the problem that existing methods are difficult to capture the impact of complex travel modes and emergencies is solved, achieving more accurate vehicle flow prediction and more effective traffic management.
Patent Information
- Application Number
- CN202411671983.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing traffic prediction 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 and nonlinear transformation are carried out to capture the space-time dependence and delay transmission effect.
This method can capture traffic changes in real time in a dynamic and complex urban traffic environment, significantly improves the response speed and response capabilities of the urban traffic management system, reduces traffic delays and congestion, and provides more accurate travel path planning suggestions.
Smart Images

Figure CN119541223A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle networking, and in particular relates to a vehicle flow prediction method based on comprehensive traffic characteristics. Background Art
[0002] In the field of traffic flow forecasting, existing mainstream methods often use static, locally designed, preset rules and rely on traditional traffic flow models. However, these methods have limited performance when dealing with dynamically changing traffic conditions and struggle to capture the complex temporal changes in travel patterns. Furthermore, existing methods lack dynamic modeling of the relationships between nodes at different times. 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 struggle to accurately reflect this delayed transmission effect. Consequently, existing static models fail to fully account for the complex spatiotemporal dependencies caused by travel patterns and emergencies. Summary of the Invention
[0003] To solve the above technical problems, the present invention proposes a vehicle flow prediction method based on comprehensive traffic characteristics, which can accurately predict urban traffic flow, effectively assist city managers in reducing traffic delays, scientifically and rationally design and adjust road network layout, and significantly reduce the operating costs of traffic management.
[0004] To achieve the above objectives, the present invention provides a vehicle flow prediction method based on comprehensive traffic characteristics, comprising:
[0005] Obtain the traffic flow of a certain historical node and extract the traffic flow sequence based on the traffic flow of a certain historical node;
[0006] 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.
[0007] Optionally, 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, including:
[0008] 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;
[0009] Based on the representation form, learnable parameters are embedded to obtain a comprehensive representation;
[0010] Performing multi-layer residual MLP encoding and residual connection on the comprehensive representation to obtain a linear reconstruction result;
[0011] Performing binary clustering on the linear reconstruction results, and obtaining clustering results after recursion;
[0012] 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;
[0013] Perform linear transformation on each sampled history sequence 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] Based on the historical graph, short-term spatial dependencies are captured through DSTG Blocks to obtain historical embeddings; based on the transition graph, the relationship between the self-sampled 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 the future embedding is obtained through DSTGBlocks; the future embedding is processed to obtain spatiotemporal embedding;
[0016] Concatenating the history embedding, the sample embedding, and the spatiotemporal embedding to obtain a new comprehensive representation;
[0017] The new comprehensive representation is input into the L-layer residual MLP for nonlinear transformation to obtain the features after nonlinear transformation;
[0018] The nonlinearly transformed features are input into the regression layer to predict the traffic flow of a certain future node.
[0019] Optionally, based on the representation form, learnable parameters are embedded to obtain a comprehensive representation:
[0020]
[0021] in, For comprehensive representation; FC embed (.) is a fully connected layer used to map the input to a continuous embedding space; At time T f and the target traffic flow data of node i; E i is the space of learnable parameters; is the day of learnable parameters; is the week of learnable parameters; Holidays with learnable parameters.
[0022] Optionally, multi-layer residual MLP encoding and residual connection are performed on the comprehensive representation to obtain a linear reconstruction result:
[0023]
[0024] in, is the linear reconstruction result; FC 1(l) For the first fully connected layer, the input Mapping 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.
[0025] Optionally, the history embedding, the sampling embedding, and the spatiotemporal embedding are concatenated to obtain a new comprehensive representation:
[0026]
[0027] in, Embedded for history; Embed for sampling; The meaning is time-space embedding; E i Embedding for spatial features; is the day of learnable parameters; is the week of learnable parameters; Holidays with learnable parameters.
[0028] Optionally, the history graph is used to represent past traffic flow changes and capture short-term spatiotemporal dependencies between nodes.
[0029] Optionally, the transition graph is used to simulate the transition process of traffic flow from a historical state to a future state, and captures the transfer of traffic flow from one node to another through the interaction of historical embedding and self-sampling embedding.
[0030] Optionally, the future graph is used to further propagate spatiotemporal information of future time steps for future traffic states between nodes.
[0031] Technical effect of the present invention: The present invention discloses a method for predicting traffic flow based on comprehensive traffic characteristics. By introducing spatiotemporal dependency 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 delayed impact of emergencies on surrounding road sections, significantly improving the response speed and coping capabilities of the urban traffic management system, enabling traffic managers to make timely decisions and reduce delays and congestion. The present invention can not only handle daily traffic flow changes, but also provide users with more accurate travel route planning suggestions 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, thereby improving the overall traffic experience and reducing the inconvenience caused by traffic delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0033] Figure 1 The figure is a flow chart of a method for predicting vehicle flow based on comprehensive traffic characteristics according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In recent years, with the acceleration of urbanization, 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, traffic congestion in many major cities around the world is getting worse and worse, and there is an urgent need for effective intelligent traffic management systems to optimize large-scale transportation 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 spatiotemporal data, and at the same time deal with the impact of emergencies (such as traffic accidents) on traffic flows on surrounding roads, as well as capture unconventional traffic patterns during holidays and special events, remains a major challenge in designing and implementing effective intelligent traffic management strategies.
[0037] like Figure 1 As shown, this embodiment provides a vehicle flow prediction method based on comprehensive traffic characteristics, including: obtaining the vehicle flow of a certain historical node, and extracting a vehicle flow sequence according to the vehicle flow of the certain historical node;
[0038] 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.
[0039] Furthermore, 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, including:
[0040] The traffic flow sequence of a certain historical node is input into the traffic flow prediction model, and each node is linearly projected into the latent space with a random mask, and converted 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 be overly dependent on data at a specific time step, represents the future T of node i f Traffic flow conditions in a time period, and D is a hidden dimension.
[0041] Based on the representation form, embedding learnable parameters to obtain a comprehensive representation, wherein the learnable parameters are space, day, week, and holiday;
[0042] Specifically, based on the representation form, learnable parameters are embedded to obtain a comprehensive representation:
[0043]
[0044] in, For comprehensive representation; FC embed (.) represents a fully connected layer (embedding function) used to map the input to a continuous embedding space; To represent the time T f and the target traffic flow data of node i; E i is the space of learnable parameters; is the day of learnable parameters; is the week of learnable parameters; The comprehensive representation is encoded with multi-layer residual MLP and residual connections to obtain a linear reconstruction result; it is transformed through a regression layer to reconstruct the original data dimension and ensure the embedding of comprehensive spatiotemporal information.
[0045] Specifically, multi-layer residual MLP encoding and residual connection are performed on the comprehensive representation to obtain the linear reconstruction result:
[0046]
[0047] in, is the linear reconstruction result; FC 1(l) The first fully connected layer is responsible for inputting Mapped to a higher-dimensional hidden representation. Through this process, the model can capture the nonlinear relationship between input features and extract potential information; ReLU (.) is a nonlinear activation function; FC 2(l) The second fully connected layer (.) is used to linearly transform the hidden features processed by the activation function and adjust them to the target output dimension R. This layer mainly integrates and compresses the features to ensure that the results meet the needs of subsequent processing or reconstruction. Through this process, the model can capture the nonlinear relationships between input features and extract potential information. is the aggregate embedding of spatial and temporal features; l is the number of encoding layers; R is the overall embedding dimension.
[0048] Performing binary clustering on the linear reconstruction results, and obtaining clustering results after recursion;
[0049] Specifically, the above spatial-temporal feature aggregation is embedded into S i A new binary clustering algorithm is used to ensure that all important patterns in the data are captured without being masked by larger or more dominant clusters, thereby maintaining the balance and sensitivity of all time dependencies in the dataset. If the number of currently embedded time series n is less than the threshold τ, then these time series are directly assigned the same label label i , and returns the result. These series will not be further divided. Otherwise, the K-Means clustering algorithm is used to segment the embedded time series using the Euclidean distance, dividing the current time series into two initial clusters n_cluster = 2, marked with labels 0 and 1. BinaryCluster is recursively called on these two sub-clusters until the size of all sub-clusters is less than τ. After the recursion is completed, the final clustering result C is returned. i , represents the cluster label to which each time series belongs. This process ensures finer-grained clustering, ensuring that clusters containing too many time points do not appear and avoiding ignoring rare temporal dependencies.
[0050] 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;
[0051] Specifically, in this embodiment, the historical sequence is processed to obtain the embedded representation Through the full connection layer and the activation function tanh, nonlinear transformation is performed, and finally the predicted future time series label is obtained through the argmax operation. Then find the historical sequence with the same label from the historical sequence Perform modeling.
[0052] For each sampled history sequence Perform linear transformation to obtain the sequence after linear transformation, flatten the sequence after linear transformation, and obtain self-sampling embedding through linear aggregation
[0053] The historical traffic flow sequence before the prediction time step point High-dimensional embedding via linear projection represents the recent traffic flow characteristics of node i;
[0054] Based on the historical graph, short-term spatial dependencies are captured through DSTG Blocks to 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; wherein the historical graph is used to represent past traffic flow changes and capture short-term spatiotemporal 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 the traffic flow transfer from one node to another is captured through the interaction of historical embedding and self-sampling embedding; the future graph is used to further propagate the spatiotemporal information of future time steps in the future traffic state between nodes.
[0055] Specifically, in the history graph, the source node and the target node are the same, which indicates the self-dependence of the nodes in the historical time period. DSTG Blocks are used to capture the short-term spatial dependency and obtain the historical embedding. In the transition graph, the delay-aware module processes the relationship between self-sampled embeddings and historical embeddings, captures the traffic transfer relationship between nodes, and obtains sampled embeddings through DSTG Blocks. The future graph is further embedded based on the transition graph to predict the propagation of future spatiotemporal information and obtain the future embedding through DSTG Blocks Through this processing, the final generated spatiotemporal embedding Through multiple delayed spatiotemporal graph attention modules (DSTG Blocks), we process the three graph structures of history, transition, and future to capture the spatiotemporal dependencies in traffic scenarios and the impact of delays between intersections. Among them: the history graph represents the changes in traffic flow in the past and captures the short-term spatiotemporal dependencies between nodes. The transition graph simulates the transition process of traffic flow from historical state to future state, and captures the transfer of traffic flow from one node to another through the interaction of historical embedding and self-sampling embedding. The future graph further propagates the spatiotemporal information of future time steps based on the future traffic state between nodes. DSTG Blocks first performs a scr and target node H tgt The input data is subjected to delay-aware feature exchange, using W u 、W m The time series information is converted into high-dimensional features and the similarity is calculated by combining the 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 node that needs to be processed and the future node that needs to be predicted in the traffic network, respectively. u 、W m is the parameter matrix in the delay-aware feature transformation. The input after the delay-aware feature transformation is passed to the graph convolution layer, which calculates the dependencies between nodes and captures the spatial correlation of neighboring nodes. A sparse adjacency matrix is generated through parameters E1 and E2 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 relationship between nodes, such as adjacent intersections or traffic flow transfer paths. The representation after the graph convolution layer is then passed to the multi-graph sparse attention mechanism, which performs sparse processing on the attention between different time steps and nodes to maintain stable gradient propagation and feature preservation. The results of graph convolution and multi-head attention are processed through residual connections and normalization to ensure stable gradient propagation and feature preservation.
[0056] Concatenating the history embedding, the sample embedding, and the spatiotemporal embedding to obtain a new comprehensive representation;
[0057] Specifically, the history embedding, the sampling embedding, and the spatiotemporal embedding are concatenated to obtain a new comprehensive representation:
[0058]
[0059] in, Embedded for history; Embed for sampling; is space-time embedding; E i Embedding for spatial features; is the day of learnable parameters; is the week of learnable parameters; Holidays with learnable parameters.
[0060] The new comprehensive representation is input into the L-layer residual MLP for nonlinear transformation to obtain the features after nonlinear transformation;
[0061] The nonlinearly transformed features are input into the regression layer to predict the traffic flow of a certain future node.
[0062] The present invention discloses a method for predicting traffic flow based on comprehensive traffic characteristics. By introducing spatiotemporal dependency modeling and delay perception mechanisms, it can capture changes in traffic flow in real time in a dynamic and complex urban traffic environment. In particular, this method takes into account the delayed impact of emergencies on surrounding road sections, significantly improving the response speed and coping capabilities of urban traffic management systems, enabling traffic managers to make timely decisions and reduce delays and congestion. The present invention can not only handle daily traffic flow changes, but also provide users with more accurate travel route planning suggestions 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, thereby improving the overall traffic experience and reducing the inconvenience caused by traffic delays.
[0063] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection 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.
2. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 1, characterized in that: 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, including: 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.
3. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, 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.
4. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, 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.
5. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, 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.
6. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, characterized in that: The history graph is used to represent past traffic flow changes and capture short-term spatiotemporal dependencies between nodes.
7. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, 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.
8. The vehicle flow prediction method based on comprehensive traffic characteristics as claimed in claim 2, 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
Multi-view fusion space-time dynamic graph convolutional network urban traffic flow prediction method
CN116935649A
Short-term traffic flow prediction method based on spatio-temporal correlation
WO2020010717A1
Traffic signal control by spatio-temporal extended search space of traffic states
WO2020147920A1