A traffic flow prediction method based on multi-span feature extraction

Through multi-span feature extraction, graph convolution, recursive neural network and other technologies, combined with static and dynamic graph fusion algorithms, the problems of space-time heterogeneity and insufficient feature extraction capabilities in traffic flow prediction are solved, and the prediction accuracy is significantly improved.

CN118298639BActive Publication Date: 2024-11-15NANJING UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410525285.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-11-15
Estimated Expiration
2044-04-28

AI Technical Summary

Technical Problem

The existing traffic flow prediction methods are difficult to deal with the complex spatiotemporal heterogeneity in the original spatiotemporal data, the prediction accuracy is difficult to improve, and there are problems such as poor nonlinear relationship capture skills in traffic spatiotemporal sequences and insufficient ability to extract complex spatiotemporal traffic feature.

Method used

Design a multi-span feature extraction method, capture the spatiotemporal correlation between sensors through graph convolution and recursive neural network, build a traffic feature fusion algorithm for static graphs and dynamic graphs, combine memory neural network extraction and storage traffic patterns to enhance node feature representation capabilities .

Benefits of technology

It improves the accuracy of traffic flow prediction, can capture deep space-time correlation and hidden dependencies more accurately, and enhances the prediction ability in high dynamic space-time environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118298639B_ABST
    Figure CN118298639B_ABST
Patent Text Reader

Abstract

The present invention proposes a traffic flow prediction method based on multi-span feature extraction, which relates to the fields of smart transportation and deep learning; specifically, the following steps are included: S1: designing a method for extracting traffic feature information of different time spans to capture the deep spatiotemporal correlation between different sensors; S2: constructing a traffic feature information fusion algorithm based on static graphs and dynamic graphs to mine the hidden dependencies of different traffic sensing nodes; S3: using a traffic pattern extraction and storage method based on a memory neural network to enhance the feature representation capability of traffic sensing nodes and improve the accuracy of traffic flow prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of smart transportation and deep learning, and in particular to a traffic flow prediction method based on multi-span feature extraction. Background Art

[0002] With the acceleration of urbanization, smart transportation systems are also developing rapidly. Accurate traffic prediction is an important part of building a smart transportation system. By accurately predicting future traffic conditions, corresponding measures can be taken to guide traffic, optimize signal control, adjust road flow distribution, etc., thereby alleviating traffic congestion and improving traffic operation efficiency. However, due to the complex spatiotemporal heterogeneity in the original spatiotemporal data and the influence of multiple factors, it is difficult to improve the prediction accuracy. Existing traffic flow prediction methods are difficult to deal with the complex spatiotemporal heterogeneity problems in the original spatiotemporal traffic data, and the prediction accuracy is difficult to meet the actual application requirements; in addition, the existing methods have problems such as poor skills in capturing nonlinear relationships of traffic spatiotemporal sequences and insufficient ability to extract complex spatiotemporal traffic features, making it difficult to achieve high-precision long-term prediction of traffic flow in a highly dynamic spatiotemporal environment.

[0003] Therefore, a traffic flow prediction method based on multi-span feature extraction is provided to solve the above problems. Summary of the invention

[0004] The present invention provides a traffic flow prediction method based on multi-span feature extraction. Firstly, a method for extracting traffic feature information with different time spans is designed to capture the deep spatiotemporal correlation between different sensors. Secondly, a traffic feature fusion algorithm based on static graphs and dynamic graphs is constructed to deeply explore the hidden dependencies of different traffic sensing nodes. Finally, a traffic pattern extraction and storage method based on a memory neural network is studied to enhance the node feature representation capability, so as to further improve the accuracy of traffic flow prediction.

[0005] To achieve the above object, the present invention provides a traffic flow prediction method based on multi-span feature extraction, which specifically includes the following steps:

[0006] S1: Design a method to extract traffic feature information of different time spans and capture the deep spatiotemporal correlation between different sensors;

[0007] S2: Construct a traffic feature information fusion algorithm based on static and dynamic graphs to mine the hidden dependencies of different traffic sensing nodes;

[0008] S3: Use the traffic pattern extraction and storage method based on memory neural network to enhance the feature representation ability of traffic perception nodes and improve the accuracy of traffic flow prediction.

[0009] Preferably, in step S1, the following steps are specifically included:

[0010] S11: Graph convolution is used to extract the spatial correlation between sensors at the same time. The formula is as follows:

[0011] ;

[0012] In the formula, represents the matrix of the graph representation, s output features representing graph information, The input features of the graph signal are specifically expressed as:

[0013] ;

[0014] in, , is the identity matrix, express The degree matrix of represents the features after convolution, is the activation function, are network parameters, is the network parameter;

[0015] S12: A variant of a recurrent neural network, gated recurrent unit, is used to extract temporal correlations in spatiotemporal data. The gated recurrent unit includes an update gate and reset gate ; Update gate The formula is as follows:

[0016] ;

[0017] Reset Gate The formula is as follows:

[0018] ;

[0019] By resetting the gate Update the current state and get the candidate state. The formula is as follows:

[0020] ;

[0021] The hidden state is determined by the update gate and the candidate state, and the formula is as follows:

[0022] ;

[0023] In the formula, represents the parameters of the fully connected layer neural network, represents the multiplication of corresponding elements of the matrix, Representative The input of a gated recurrent unit, Representative The output of the recurrent unit, Representative The hidden state of the gated recurrent unit;

[0024] S13: Combine graph convolution with gated recurrent unit, use graph convolution to replace the fully connected layer in the gated recurrent unit to extract spatiotemporal features at the same time, and perform feature fusion in unconnected gated recurrent units. The formula is as follows:

[0025] ;

[0026] in, Represents the The output of the gated recurrent unit, Represents a splicing operation, Represents a neural network.

[0027] Preferably, in step S2, the following steps are specifically included:

[0028] S21: Generate static graphs based on the graph topology of the real road network structure and extract spatiotemporal features;

[0029] S22: Generate adaptive graph based on node embedding and extract spatiotemporal features;

[0030] S23: Fuse the spatiotemporal features extracted in step S21 and step S22.

[0031] Preferably, step S3 specifically includes the following steps:

[0032] S31: constructing a traffic mode storage unit;

[0033] S32: Memory and classification of different traffic mode characteristics to enhance sensor feature expression;

[0034] S23: Improve the loss function to assist in building a traffic mode storage unit.

[0035] Preferably, in step S21, a static network structure diagram is constructed based on real road connections, specifically using the following method:

[0036] Set up two sensors A and B. If there is a real road connection between them, set the value of the adjacency matrix to 1;

[0037] If there is no real road connection between the two, the value of the adjacency matrix is ​​set to 0 to obtain a static graph. ; The static image The spatiotemporal data is input into the traffic feature information extraction module for extracting multiple time spans to obtain the traffic feature information based on the static graph. The node hidden features.

[0038] Preferably, in step S22, the following steps are specifically included:

[0039] Construct a dimension The nodes of the vector are represented by N, where N represents the number of sensors and R is a hyperparameter representing the dimension of the vector. The embedding vector is multiplied by the transpose to form a node similarity matrix. ReLU is used to ensure non-negativity and softmax is used for normalization to obtain a dynamic graph. :

[0040] ;

[0041] In the formula, Represents a learnable node representation vector, which transforms the dynamic graph The input is used to extract traffic feature information fusion module of multiple time spans to obtain node hidden features based on dynamic graph.

[0042] Preferably, in step S23, the two different node hidden features obtained in step S21 and step S22 are concatenated, and the formula is as follows:

[0043] ;

[0044] in represents the features extracted from the static image, Indicates the number of nodes, represents the dimension of hidden features, represents the features extracted from the dynamic graph, It represents the features that integrate the two graph structure information.

[0045] Preferably, step 31 specifically includes constructing Traffic pattern library with learnable parameter representation ,in represents the number of stored traffic modes, Characteristic dimension representing traffic patterns.

[0046] Preferably, step S32 combines the idea of ​​memory network and specifically includes the following steps:

[0047] S321: Node The fused features are mapped through a fully connected layer to obtain the embedded representation of the node features:

[0048] ;

[0049] in, Represents the The characteristics of the nodes and The OK, represents the fully connected layer, Represents the node The feature embedding representation of

[0050] S322: Computing Node The feature embedding representation of is the similarity score between each traffic mode in the traffic mode library:

[0051] ;

[0052] In the formula Represents the first traffic mode, Represents the first The transpose of the traffic mode feature vector;

[0053] S323: Enhance the embedding representation of the node according to the similarity score. The formula is as follows:

[0054] ;

[0055] in, represents the enhanced node feature representation;

[0056] S324: Representing the enhanced node features and The concatenation and fusion are performed as the input data of the decoder. The structure of the decoder is consistent with that of the encoder. The graph structure information is generated based on the enhanced node features: ;

[0057] ;

[0058] in, represents the embedding vector of the graph structure used by the decoder, and A′ represents the adjacency matrix used in the decoder.

[0059] Preferably, in step S33, two losses are proposed and Extract the traffic patterns hidden in the node features; As anchor points, take the top two with the highest scores based on the similarity score and are positive samples and negative samples; Loss prompts and The difference between them becomes larger. Loss prompts and Similar, the two losses and Facilitated the construction of traffic pattern library:

[0060] ;

[0061] ;

[0062] The formula of the total loss function is as follows:

[0063] .

[0064] Therefore, the present invention adopts the above-mentioned traffic flow prediction method based on multi-span feature extraction, designs a method for extracting traffic feature information of different time spans to capture the deep spatiotemporal correlation between different sensors; constructs a traffic feature fusion algorithm based on static graphs and dynamic graphs to deeply explore the hidden dependencies of different traffic sensing nodes; studies the traffic pattern extraction and storage method based on memory neural network to enhance the node feature representation capability, so as to further improve the accuracy of traffic flow prediction.

[0065] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a flow chart of a traffic flow prediction method based on multi-span feature extraction of the present invention;

[0067] Figure 2 It is a schematic diagram of a traffic flow prediction method architecture based on multi-span feature extraction of the present invention;

[0068] Figure 3 It is a schematic diagram of a method for extracting traffic characteristic information of different time spans according to the present invention;

[0069] Figure 4 It is a specific flow chart of step S2 of a traffic flow prediction method based on multi-span feature extraction of the present invention;

[0070] Figure 5 It is a specific flow chart of step S2 of a traffic flow prediction method based on multi-span feature extraction of the present invention. DETAILED DESCRIPTION

[0071] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0072] Unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0073] Example

[0074] like Figure 1 As shown, the present invention provides a traffic flow prediction method based on multi-span feature extraction, which specifically includes the following steps:

[0075] S1: Design a method to extract traffic characteristic information of different time spans, such as Figure 3 As shown, it captures the deep spatiotemporal correlation between different sensors; Figure 2 As shown, in step S1, the following steps are specifically included:

[0076] S11: Graph convolution is used to extract the spatial correlation between sensors at the same time. The formula is as follows:

[0077] ;

[0078] In the formula, represents the matrix of the graph representation, s output features representing graph information, The input features of the graph signal are specifically expressed as:

[0079] ;

[0080] in, , is the identity matrix, express The degree matrix of represents the features after convolution, is the activation function, are network parameters, is the network parameter;

[0081] S12: A variant of a recurrent neural network, gated recurrent unit, is used to extract temporal correlations in spatiotemporal data. The gated recurrent unit includes an update gate and reset gate ; Update gate Decide whether to update the memory state at the current moment, update the gate The formula is as follows:

[0082] ;

[0083] Reset Gate Decide whether to ignore the previous memory state and reset the gate The formula is as follows:

[0084] ;

[0085] By resetting the gate Update the current state and get the candidate state. The formula is as follows:

[0086] ;

[0087] The hidden state is determined by the update gate and the candidate state, and the formula is as follows:

[0088] ;

[0089] In the formula, represents the parameters of the fully connected layer neural network, represents the multiplication of corresponding elements of the matrix, Representative The input of a gated recurrent unit, Representative The output of the recurrent unit, Representative The hidden state of the gated recurrent unit;

[0090] S13: Combine graph convolution with gated recurrent unit, use graph convolution to replace the fully connected layer in the gated recurrent unit and extract spatiotemporal features at the same time. And perform feature fusion in unconnected gated recurrent units. The formula is as follows:

[0091] ;

[0092] in Represents the The output of the gated recurrent unit, Represents a splicing operation, Represents a neural network. By fusing the outputs of gating units with a certain time interval through a fully connected layer, richer spatiotemporal features can be captured.

[0093] S2: Construct a traffic feature information fusion algorithm based on static and dynamic graphs to mine the hidden dependencies of different traffic sensing nodes; Figure 4 As shown, in step S2, the following steps are specifically included:

[0094] S21: Generate a static graph based on the graph topology of the real road network structure and extract spatiotemporal features; In step S21, a static network structure graph is constructed based on the real road connection, specifically using the following method:

[0095] Set up two sensors A and B. If there is a real road connection between them, set the value of the adjacency matrix to 1;

[0096] If there is no real road connection between the two, the value of the adjacency matrix is ​​set to 0 to obtain a static graph. ; The static image The spatiotemporal data is input into the traffic feature information extraction module for extracting multiple time spans to obtain the traffic feature information based on the static graph. The node hidden features.

[0097] S22: Generate an adaptive graph based on node embedding and extract spatiotemporal features; in step S22, the following steps are specifically included:

[0098] Construct a dimension The nodes of the vector are represented by N, where N represents the number of sensors and R is a hyperparameter representing the dimension of the vector. The embedding vector is multiplied by the transpose to form a node similarity matrix. ReLU is used to ensure non-negativity and softmax is used for normalization to obtain a dynamic graph. :

[0099] ;

[0100] In the formula, Represents a learnable node representation vector, which transforms the dynamic graph The input is used to extract traffic feature information fusion module of multiple time spans to obtain node hidden features based on dynamic graph.

[0101] S23: Fusion of spatiotemporal features extracted from step S21 and step S22. In step S23, the two different node hidden features obtained from step S21 and step S22 are concatenated, and the formula is as follows:

[0102] ;

[0103] in represents the features extracted from the static image, Indicates the number of nodes, represents the dimension of hidden features, represents the features extracted from the dynamic graph, It represents the features that integrate the two graph structure information.

[0104] S3: Use the traffic pattern extraction and storage method based on memory neural network to enhance the feature representation ability of traffic perception nodes and improve the accuracy of traffic flow prediction.

[0105] like Figure 5 As shown, step S3 specifically includes the following steps:

[0106] S31: Constructing a traffic mode storage unit; Step 31 specifically includes constructing Traffic pattern library with learnable parameter representation ,in represents the number of stored traffic modes, Characteristic dimension representing traffic patterns.

[0107] S32: Memory and classification of different traffic mode features to enhance sensor feature expression; Step S32 combines the idea of ​​memory network and specifically includes the following steps:

[0108] S321: Node The fused features are mapped through a fully connected layer to obtain the embedded representation of the node features:

[0109] ;

[0110] in, Represents the The characteristics of the nodes and The OK, represents the fully connected layer, Represents the node The feature embedding representation of

[0111] S322: Computing Node The feature embedding representation of is the similarity score between each traffic mode in the traffic mode library:

[0112] ;

[0113] In the formula Represents the first traffic mode, Represents the first The transpose of the traffic mode feature vector;

[0114] S323: Enhance the embedding representation of the node according to the similarity score. The formula is as follows:

[0115] ;

[0116] in, represents the enhanced node feature representation;

[0117] S324: Representing the enhanced node features and The concatenation and fusion are performed as the input data of the decoder. The structure of the decoder is consistent with that of the encoder. The graph structure information is generated based on the enhanced node features:

[0118] ;

[0119] in, represents the embedding vector of the graph structure used by the decoder, and A′ represents the adjacency matrix used in the decoder.

[0120] S33: Improve the loss function and assist in constructing the traffic mode storage unit.

[0121] In step S33, two losses are proposed and Extract the traffic patterns hidden in the node features; As anchor points, take the top two with the highest scores based on the similarity score and are positive samples and negative samples; Loss prompts and The difference between them becomes larger. Loss prompts and Similar, the two losses and Facilitated the construction of traffic pattern library:

[0122] ;

[0123] ;

[0124] The formula of the total loss function is as follows:

[0125] .

[0126] Therefore, the present invention adopts the above-mentioned traffic flow prediction method based on multi-span feature extraction, designs a method for extracting traffic feature information of different time spans to capture the deep spatiotemporal correlation between different sensors; constructs a traffic feature fusion algorithm based on static graphs and dynamic graphs to deeply explore the hidden dependencies of different traffic sensing nodes; studies the traffic pattern extraction and storage method based on memory neural network to enhance the node feature representation capability, so as to further improve the accuracy of traffic flow prediction.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A traffic flow prediction method based on multi-span feature extraction, It is characterized in that The specific steps include: S1: Design a method for extracting traffic feature information of different time spans to capture the deep spatiotemporal correlation between different sensors; in step S1, the following steps are specifically included: S11: Graph convolution is used to extract the spatial correlation between sensors at the same time. The formula is as follows: ; In the formula, represents the matrix of the graph representation, s output features representing graph information, The input features of the graph signal are specifically expressed as: ; in, , is the identity matrix, express The degree matrix of represents the features after convolution, is the activation function, are network parameters, is the network parameter; S12: A variant of a recurrent neural network, gated recurrent unit, is used to extract temporal correlations in spatiotemporal data. The gated recurrent unit includes an update gate and reset gate ; Update gate The formula is as follows: ; Reset Gate The formula is as follows: ; By resetting the gate Update the current state and get the candidate state. The formula is as follows: ; The hidden state is determined by the update gate and the candidate state, and the formula is as follows: ; In the formula, represents the parameters of the fully connected layer neural network, represents the multiplication of corresponding elements of the matrix, Representative The input of the door frame recurrent unit, Representative The output of the recurrent unit, Representative The hidden state of the gated recurrent unit; S13: Combine graph convolution with gated recurrent unit, use graph convolution to replace the fully connected layer in the gated recurrent unit to extract spatiotemporal features at the same time, and perform feature fusion in unconnected gated recurrent units. The formula is as follows: ; in, Represents the The output of the gated recurrent unit, Represents a splicing operation, represents a neural network; S2: Construct a traffic feature information fusion algorithm based on static graphs and dynamic graphs to mine the hidden dependencies of different traffic sensing nodes; in step S2, the following steps are specifically included: S21: Generate static graphs based on the graph topology of the real road network structure and extract spatiotemporal features; S22: Generate adaptive graph based on node embedding and extract spatiotemporal features; S23: Fusing the spatiotemporal features extracted in step S21 and step S22; S3: Use the traffic pattern extraction and storage method based on memory neural network to enhance the feature representation ability of traffic sensing nodes and improve the accuracy of traffic flow prediction; Step S3 specifically includes the following steps: S31: constructing a traffic mode storage unit; S32: Memory and classification of different traffic mode characteristics to enhance sensor feature expression; S33: Improve the loss function and assist in constructing the traffic mode storage unit.

2. A traffic flow prediction method based on multi-span feature extraction according to claim 1, Features: In step S21, a static network structure diagram is constructed based on real road connections, specifically using the following method: Set up two sensors A and B. If there is a real road connection between them, set the value of the adjacency matrix to 1; If there is no real road connection between the two, the value of the adjacency matrix is ​​set to 0 to obtain a static graph. ; The static image The spatiotemporal data is input into the traffic feature information extraction module for extracting multiple time spans to obtain the traffic feature information based on the static graph. The node hidden features.

3. A traffic flow prediction method based on multi-span feature extraction according to claim 2, Features: In step S22, the following steps are specifically included: Construct a dimension The nodes of the vector are represented by N, where N represents the number of sensors and R is a hyperparameter representing the dimension of the vector. The embedding vector is multiplied by the transpose to form a node similarity matrix. ReLU is used to ensure non-negativity and softmax is used for normalization to obtain a dynamic graph. : ; In the formula, Represents a learnable node representation vector, which transforms the dynamic graph The input is used to extract traffic feature information fusion module of multiple time spans to obtain node hidden features based on dynamic graph.

4. A traffic flow prediction method based on multi-span feature extraction according to claim 3, Features: In step S23, the two different node hidden features obtained in step S21 and step S22 are concatenated, and the formula is as follows: ; in represents the features extracted from the static image, Indicates the number of nodes, represents the dimension of hidden features, represents the features extracted from the dynamic graph, It represents the features that integrate the two graph structure information.

5. The traffic flow prediction method based on multi-span feature extraction according to claim 1, It is characterized in that Step 31 specifically includes constructing Traffic pattern library with learnable parameter representation ,in represents the number of stored traffic modes, Characteristic dimension representing traffic patterns.

6. The traffic flow prediction method based on multi-span feature extraction according to claim 5, It is characterized in that Step S32 combines the idea of ​​memory network and specifically includes the following steps: S321: Node The fused features are mapped through a fully connected layer to obtain the embedded representation of the node features: ; in, Represents the The characteristics of the nodes and The OK, represents the fully connected layer, Represents the node The feature embedding representation of S322: Computing Node The feature embedding representation of is the similarity score between each traffic mode in the traffic mode library: ; In the formula Represents the first traffic mode, Represents the first The transpose of the traffic mode feature vector; S323: Enhance the embedding representation of the node according to the similarity score. The formula is as follows: ; in represents the enhanced node feature representation; S324: Representing the enhanced node features and The concatenation and fusion are performed as the input data of the decoder. The structure of the decoder is consistent with that of the encoder. The graph structure information is generated based on the enhanced node features: ; ; in, represents the embedding vector of the graph structure used by the decoder, and A′ represents the adjacency matrix used in the decoder.

7. The traffic flow prediction method based on multi-span feature extraction according to claim 6, It is characterized in that In step S33, two losses are proposed and Extract the traffic patterns hidden in the node features; As anchor points, take the top two with the highest scores based on the similarity score and are positive samples and negative samples; Loss prompts and The difference between them becomes larger, Loss prompts and Similar, the two losses and Facilitated the construction of traffic pattern library: ; ; The formula of the total loss function is as follows: 。