Deep learning method for urban traffic node mode similarity cognition

By applying graph convolution neural network in traffic speed prediction, combining dynamic multi-graph construction and multi-scale graph convolution, the problem of mutual influence between nodes and insufficient consideration of spatiotemporal characteristics is solved, effectively modeling and analysis of traffic node pattern similarity is achieved, and the accuracy of prediction is improved.

CN119577472APending Publication Date: 2025-03-07HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411647607.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing deep learning models fail to fully consider the mutual influence and spatiotemporal characteristics between nodes and nodes in traffic speed prediction, resulting in the inability to effectively model and aggregate the pattern similarity of traffic nodes.

Method used

A method of traffic node pattern similarity analysis based on graph convolution neural network is designed. Through dynamic multi-graph structure and multi-scale graph convolution, the space-time dependence and dynamic change characteristics between traffic nodes are captured, and the traffic patterns of nodes are analyzed at different periods.

Benefits of technology

This method can dynamically analyze the similarities and differences between different traffic nodes, effectively model the similarity of traffic modes, improve the extraction ability of space-time dynamic interaction and time-dependent features in traffic scenarios, and provide more accurate cognition of traffic node mode similarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577472A_ABST
    Figure CN119577472A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent traffic, deep learning and artificial intelligence, in particular to a deep learning method for urban traffic node mode similarity cognition. Traffic speed data is organized into a graph data format consisting of a feature matrix and an adjacency matrix. The processed speed data are sent into a dynamic multi-graph constructor, an output dynamic adjacency matrix and a space adjacency matrix are sent into a multi-scale graph convolution module together, and the speed data are sent into the multi-scale graph convolution module after being subjected to expansion causal convolution processing in each space-time layer; and splicing from each space-time layer through jump connection to obtain a final result. And finally, analyzing the traffic mode similarity reflected by the dynamic multi-graph. According to the method, the space-time dependent features in the intelligent traffic scene can be extracted more efficiently, and the problem that the perceptual view in the graph convolutional network is limited and the problem that the long-term traffic mode is not considered sufficiently in traffic mode similarity analysis are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of intelligent transportation, deep learning and artificial intelligence, and in particular to a deep learning method for recognizing similarity of urban traffic node patterns. Background Art

[0002] ITS (Intelligent Transportation System) is a concept that uses modern information and communication technologies to improve the efficiency, safety and sustainability of transportation systems. It is the product of the combination of transportation and information technology, aiming to optimize traffic flow, manage traffic congestion, improve traffic safety, and provide a better travel experience through real-time data collection, processing and application. With the development of deep learning and the continuous improvement of computing power of computers and other devices in recent years, intelligent transportation systems have achieved unprecedented development. ITS can improve our quality of life from many perspectives. First, it can improve traffic efficiency, reduce traffic congestion and travel time through real-time data collection and optimization of traffic management systems. Secondly, ITS can improve traffic safety and reduce traffic accidents and casualties through technical means such as traffic monitoring, intelligent traffic signal control and vehicle-to-vehicle communication. In addition to the above, ITS can reduce the negative impact of traffic on the environment and promote sustainable transportation development by optimizing traffic flow, reducing vehicle emissions and energy consumption, and promoting the development of public transportation and non-motorized transportation. More importantly, ITS can provide functions such as real-time traffic information, navigation services and smart payment to improve travel experience and make people travel more conveniently and comfortably. In terms of traffic speed prediction, there have been many deep learning works, but these works only consider the time characteristics of traffic speed without considering the mutual influence between nodes and the spatiotemporal characteristics that change over time. Researchers later used graph neural networks to model the traffic speed prediction problem, but the interaction characteristics between nodes are still not well characterized. In addition, most of the existing graph neural networks choose to use graph convolution to aggregate spatiotemporal features. Due to the limitation of the perception field of the graph convolution operation, the convolution operation does not aggregate the information of neighboring nodes well. Therefore, it is very necessary to establish a model for the recognition of traffic node pattern similarity in urban traffic environments. It can not only assist in the planning of traffic resources, but also generate cognition of the mined traffic data characteristics, better understand the differences in traffic patterns at different traffic nodes in different periods, and provide a reliable basis for the reliability and intelligence of urban traffic development in the future. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes a traffic node pattern similarity analysis and algorithm.

[0004] The graph convolutional neural network model designed in the present invention can better capture the spatiotemporal dependencies and dynamic change characteristics between traffic nodes. In the data processing part, dynamic multi-graph and multi-scale graph convolution are proposed to solve the problem that spatiotemporal features in traditional graph model data are difficult to model and aggregate, and the traffic patterns of nodes in different periods are recognized by analyzing the dynamic multi-graph weights.

[0005] The present invention is achieved through the following technical solution, comprising the following steps: A deep learning method for urban traffic node pattern similarity recognition, characterized by comprising the following steps: Step 1: Input and output data of the traffic node pattern similarity recognition algorithm based on deep learning; It includes the sensor history under traffic environment, which consists of speed data X of T historical time steps: X = [X t-T+1 , X t-T+2 , ..., X t ]∈R C×N×T , C is the number of input channels, N is the number of nodes, and T is the time step; The velocity data for each time step is It consists of the speed of N sensor nodes in the traffic scene at time step t; The predicted speed Y′ of the traffic scene consists of speed data of T′ time steps: Y′=[X t+1 , X t+2 , ..., X t+T′ ]∈R C×N×T′ , C is the number of input channels, N is the number of nodes, T′ is the time step, The speed data format of each time step is the same as the historical speed data; The formal representation of traffic node similarity recognition is: Y′=f(X), which provides a basis for future traffic decision-making; Step 2: Structural design of graph convolutional neural network model; S2.1, dynamic multi-graph construction module: uses Gaussian formula to calculate the similarity of traffic patterns between nodes in a time-varying manner, and constructs a Gaussian dynamic graph that represents the short-term traffic patterns of traffic nodes; Use traffic pattern memory to store long-term features of traffic nodes, and use attention mechanism and query vector to construct a historical dynamic graph that can represent the long-term traffic pattern of traffic nodes; S2.2, the extended causal convolution in the time dimension, only considers past input data, not future input data, which means that for any given moment, only the input data from that moment and before is used to calculate the convolution; the expansion factor of the extended causal convolution controls the convolution kernel, capturing more contextual information at a larger distance by skipping input values; the output dynamic multi-graph of S2.1 and the intermediate features of the network output of S2.2 are input into the network of S2.3 together; S2.3, multi-scale graph convolution module, whose input is the total spatiotemporal features, dynamic multi-graph and spatial graph, and the hidden states of each layer are connected through jump connections to obtain the final output; Step 3: Train the graph convolutional neural network model; train the model by setting the corresponding training data and training environment; Step 4: Describe the near-term and long-term mode characteristics of each node traffic based on the dynamic multi-graph; Step 5: Conduct traffic node similarity analysis based on traffic pattern characteristics and apply it to urban traffic cognition work.

[0006] The dynamic multi-graph in step 2 is specifically defined as follows: (1) Adjacency matrix describing node relationships: The traffic scene is described by an undirected graph G = {V, E}. Each node in the node set V represents a speed sensor of each vehicle in the traffic scene. The node set V is expressed as V = {v i |i=1,...,N}, N is the number of sensors in the traffic scene, and the feature vector v i represents the i-th speed sensor; When the distance between two sensor nodes is close enough, the edge representing the node interaction relationship should be connected; therefore, the edge set E is expressed as E = {v i v j |d(v i , v j ) <D colse}, where d is the Euclidean distance function, and the distance between two nodes in this set is less than the threshold D close ; The element-wise definition of the discrete adjacency matrix A is: A∈R N×N , where N is the total number of sensors; (2) Gaussian graph: adjacency matrix A in tensor form g ∈R n×n×t, where n is the node and t is the time step, which is different from the general adjacency matrix - this part of the colloquial description is only retained in the specification and deleted in the claims, and the time dimension is added; the Gaussian graph describes the dynamic characteristics of traffic nodes and the dynamic similarity of short-term traffic modes between nodes: The data representation of the node set V is N speed sensor nodes, and the data representation of the edge set E is the adjacency matrix A. The dynamic graph described by A and V is called It is a time-varying dynamic graph; (3) History graph: adjacency matrix A in tensor form h ∈R n×n×t , where n is the node and t is the time step. Like the Gaussian adjacency matrix, the time dimension is added. The history graph dynamically describes the characteristics of traffic nodes and the long-term similarity of traffic patterns between nodes. The data representation of the node set V is N speed sensor nodes, and the data representation of the edge set E is the adjacency matrix A. The dynamic graph described by A and V is called It is a time-varying dynamic graph; (4) Dynamic multi-graph construction algorithm: Dynamic multi-graphs include Gaussian graphs and historical graphs. These two different dynamic graphs describe the similarity of traffic patterns between traffic nodes from two different perspectives: immediate and long-term. The Gaussian graph generation algorithm takes the proximity similarity of traffic patterns between nodes (speed sensors) as the starting point, obtains the spatiotemporal characteristics in traffic speed data through data mining, and then uses the Gaussian function to calculate the spatiotemporal characteristics to reflect the similarity between nodes. After calculating the similarities between all nodes, the Gaussian adjacency matrix A can be obtained. g The historical graph generation algorithm uses the traffic pattern memory to store the long-term characteristics of traffic nodes, and uses the query vector through the attention mechanism to calculate and construct the historical adjacency matrix A that represents the direct similarity of long-term traffic nodes in a time-varying manner. h .

[0007] The multi-scale graph convolutional neural network in step 2 can expand the perception field of view and more efficiently extract the spatiotemporal dynamic interactivity and time-dependent features in traffic scenes; Multi-scale graph convolution is a variant of graph convolutional neural network. It expands the perception field of convolution operation through hierarchical network design, so that nodes can aggregate more neighbor information. Its operation process is as follows: (1) Image signal division: When the graphic signal When input to the multi-scale graph convolution module, it is divided into S segments from the channel dimension Then, the S graph signal fragments are respectively input into S subgraph convolutions for graph convolution operation, where C is the number of channels, N is the number of nodes, T is the time step, and S is the number of channel division fragments; (2) Diffusion graph convolution: The convolution operation is performed using diffuse graph convolution because diffuse convolution can be used for directed graphs; this process f w The specific k-step diffusion process is defined as: Here W k,1 With W k,2 is a learnable matrix, P is a transfer matrix, which is calculated by P = A / rowsum(A). The two terms in the formula aggregate the information of upstream and downstream nodes respectively; (3) Sub-graph convolution and hierarchical residual connection: Each GCN i is a subgraph convolution module, is the calculation result of the convolution of the i-th subgraph in the l+1-th layer, The calculation process is: In the above calculation process, the input of the sub-graph convolution module with a sequence number greater than 1 is composed of the sliced ​​graph signal and the output of the previous sub-graph convolution module; (4) Multi-scale graph convolution: Add a learnable matrix W to the graph convolution module k,3 and W k,4 And the dynamic matrix, and update the diffusion convolution calculation method to: in is the output of a single graph convolution, each fragment Each of them has a different receptive field. A residual connection is placed between two adjacent sub-graph convolutions to enrich the diversity of the receptive field of view and capture the dependencies between local and non-local nodes, making the last fragment The receptive field of is expanded equally; the final output is: The information of different nodes is aggregated through a series of sub-graph convolutions. The hierarchical residual structure formed by the splicing operation and a series of sub-graph convolutions equivalently expands the receptive field of view of the graph convolution, allowing nodes to aggregate more information from neighboring nodes.

[0008] The training data in step 3 is set as: Training optimizer Adam, learning rate 0.001, batch size = 64, loss function Where n is the number of labels, Y′ i and Y i are the predicted speed and the real speed respectively; Use traffic speed data from any two public datasets as datasets for model training, and divide them into training set, validation set, and test set in a certain proportion; use the built-in data loader of the deep learning framework to encapsulate the data, and intelligently iterate and output data tensors in the corresponding format to the model for training.

[0009] In the step 4, the key descriptive features of the node (sensor) traffic mode are constructed, the dynamic similarity feature matrix output by the dynamic similarity cognitive model describes the traffic model similarity between the node and other nodes, and the dynamic adjacency matrix is ​​constructed to analyze the traffic mode similarity, the purpose of which is to extract the change characteristics of the node speed; More similar traffic patterns will be assigned higher weights in the Gaussian dynamic graph, using Gaussian membership function to calculate the weights between nodes; S4.1, calculate each graph signal of each node within a period of time T The mean and variance S4.2, for the graph signal and The traffic pattern is represented in the form of a Gaussian function, and the membership function belonging to the node at this time is generated. The above calculation method is used to describe the short-term traffic pattern state of the node: in, For node v i With v j Gaussian similarity at time step t, By defining a learnable parameter a∈[0, 1] to randomize the steepness of the Gaussian function, using the softmax function to normalize the Gaussian adjacency matrix, and using the ReLU activation function to eliminate negative connections, which sets any negative values ​​to zero, the Gaussian adjacency matrix is Each weight at is: The history graph generator is represented by the hidden state The attention mechanism is used to query the historical traffic pattern memory to build an adjacency matrix that evolves dynamically over time. The weights in the matrix reflect the long-term similarity between nodes. The generation process of the dynamic adjacency matrix is ​​defined as follows:

[0010] Urban traffic cognition includes the following application solutions: (1) Traffic pattern analysis: By analyzing the similarity of traffic node patterns, the traffic characteristics and connections between various nodes in the urban traffic system are revealed, providing an important reference for traffic planning and management. Traffic node pattern similarity analysis involves identifying and comparing the traffic flow, travel mode, congestion and other characteristics of different traffic nodes in the city. By deeply studying the similarity between nodes, it helps to understand the overall operation of the urban traffic system, discover bottlenecks and potential problems in the traffic network, and put forward targeted improvement suggestions. (2) Urban road control: The application of traffic node pattern similarity can help urban traffic managers identify bottleneck areas and high-load nodes in the traffic network, so as to adjust traffic signal control, optimize intersection layout and traffic flow distribution in a targeted manner; through real-time monitoring and analysis of traffic node pattern similarity, urban traffic managers can dynamically adjust the timing of traffic lights, reasonably distribute traffic flow, reduce traffic congestion, and improve road traffic efficiency; (3) Traffic resource scheduling: By using traffic node pattern similarity analysis, urban traffic managers can realize intelligent traffic resource scheduling; by combining real-time traffic data and advanced data analysis technology, they can monitor the operating status of traffic nodes in real time, predict traffic congestion, adjust traffic light timing, optimize traffic flow control, improve road capacity, and reduce congestion; by deeply analyzing the similarity between nodes, they can optimize road layout, improve traffic mobility, and enhance the overall efficiency and sustainability of the urban transportation system; (4) Real-time traffic management: The application of traffic node pattern similarity in real-time traffic management can also help urban traffic managers formulate emergency response strategies; by analyzing the similarity between nodes, the affected areas and nodes can be quickly identified, traffic resources can be dispatched in a timely manner, and traffic control measures can be coordinated to ensure the safety and smoothness of the traffic system.

[0011] The beneficial effects of the present invention are: (1) The traffic node similarity recognition model based on graph convolutional neural network proposed in the present invention can dynamically analyze the similarities and differences between different traffic nodes, solving the problem that traditional physical models and general graph neural network models are unable to model the dependencies between nodes and have insufficient ability to capture spatiotemporal features. (2) The graph convolutional neural network based on the dynamic multi-graph construction method proposed in the present invention makes up for the problem that the relevant deep learning models are unable to model and represent the similarity of traffic patterns. (3) The multi-scale graph convolution proposed in the present invention uses hierarchical sub-graph convolution and splicing operations to form a residual network structure, which solves the problem of limited receptive field of view of graph convolution operation and equivalently expands the receptive field of view of graph convolution, so that the convolution operation can more efficiently extract the spatiotemporal dynamic interactivity and time-dependent characteristics in traffic scenes. (4) The traffic pattern similarity analysis algorithm based on dynamic multi-graph constructed by the present invention fully considers the relationship between the target vehicle and the environment, and more comprehensively describes the traffic pattern. It also analyzes the similarities and differences of traffic patterns of traffic nodes from two different perspectives: long-term and short-term. (5) The present invention provides a specific neural network model training method and related hyperparameters, as well as network internal structure details, which ensures the efficiency and accuracy of model training and can effectively avoid underfitting and overfitting in model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 This is the overall model diagram of the present invention.

[0013] Figure 2 This is a structural diagram based on the multi-scale graph convolution module.

[0014] Figure 3 This is the structural diagram of the present invention and its application in urban traffic cognition. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with specific implementation methods and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention; in addition, the technical features involved in the different implementation methods of the present invention described below can be combined with each other as long as they do not conflict with each other. The following will refer to the attached drawings. Figures 1 to 3 The preferred embodiments of the present invention are further described as follows: Step 1: Model input data processing The traffic speed data input is processed by a dynamic multi-graph builder to generate Gaussian and historical graphs as input to the model, including: (1) Traffic speed data In order to verify that the model proposed in this invention can achieve SOTA performance, two public data sets are selected for experiments. As shown in Table 1, the METR-LA data set comes from the traffic sensor network in Los Angeles County. The data set contains traffic speed data from March 1, 2012 to June 30, 2012; the data is collected every 5 minutes and covers 207 road sections. The PEMS-BAY data set comes from the traffic sensor network in the San Francisco Bay Area. The data set contains traffic speed data from January 1, 2017 to June 30, 2017. The data is collected every 5 minutes and covers 325 road sections. The training set, validation set, and test set of PEMS-BAY and METR-LA are split at a ratio of 0.7, 0.1, and 0.2; Table 1. Dataset summary (2) Spatial adjacency matrix The traffic scene is described by an undirected graph G = {V, E}. Each node in the node set V represents a speed sensor of each vehicle in the traffic scene. The node set V is expressed as V = {v i |i=1,...,N}, N is the number of sensors in the traffic scene, and the feature vector v i represents the i-th speed sensor; When the distance between two sensor nodes is close enough, the edge representing the node interaction relationship should be connected; therefore, the edge set E is expressed as E = {v i v j |d(v i , v j ) <D colse}, where d is the Euclidean distance function, and the distance between two nodes in this set is less than the threshold D close ; The element-wise definition of the discrete adjacency matrix A is: A∈R N×N , where N is the total number of sensors; (3) Dynamic multiple constructors In the graph convolution operation of the graph neural network of the present invention, in addition to the above-mentioned spatial adjacency matrix, two dynamic graphs that change over time are constructed for graph convolution operation. The Gaussian graph generation algorithm takes the similarity of short-term traffic patterns between nodes (speed sensors) as the starting point, obtains the spatiotemporal features in the traffic speed data through data mining, and then uses the Gaussian function to calculate the spatiotemporal features to obtain the similarity between nodes. After calculating the similarities between all nodes, the Gaussian adjacency matrix A can be obtained. g The historical graph construction generation algorithm takes the similarity of the long-term traffic patterns of nodes as the starting point, stores the long-term traffic pattern characteristics of traffic nodes through the traffic pattern memory, and uses the attention mechanism formula to calculate the long-term similarity between nodes. After calculating the similarities between all nodes, the historical adjacency matrix A can be obtained. h . Analyze the similarity between nodes, model the traffic mode from the perspective of traffic cognition, and provide the spatiotemporal characteristics brought by the traffic mode for the multi-scale graph convolution module; In the Gaussian graph, more similar traffic patterns will be given higher weights. We use the Gaussian membership function to calculate the weights between nodes. First, we calculate the weight of each graph signal for each node in a period of time T. The mean and variance Then, for the graph signal and The traffic mode can be represented by a Gaussian function. Generate the membership function of the node at this time. Use the above calculation method to describe the current traffic mode status of the node: in, For node v i With v j Gaussian similarity at time step t, The steepness of the Gaussian function is randomized by defining a learnable parameter a∈[0, 1]. To normalize the Gaussian adjacency matrix, a softmax function is used. Negative connections are then eliminated using the ReLU activation function, which sets any negative values ​​to zero. The Gaussian adjacency matrix is Each weight at is: In order to model and represent the similarity of different historical patterns of each node and the dynamic correlation between nodes, a historical traffic pattern memory Φ∈R is defined in the model. C×N , C is the number of channels, and N is the number of nodes. The traffic pattern memory adaptively stores the historical traffic pattern of each node in a data-driven manner during the training process. The history graph generator uses hidden state representation and historical traffic pattern memory to construct an adjacency matrix that evolves dynamically over time. The weights in this matrix reflect the long-term similarity between nodes. The generation process of the dynamic adjacency matrix is ​​defined as follows:

[0016] Step 2: Build the model (1) Overall structure of the model After preprocessing the above traffic speed dataset and obtaining the spatial adjacency matrix by calculation, the speed data is put into the spatiotemporal embedding layer to obtain the intermediate feature X embd , this intermediate feature is then passed through the linear layer to obtain the hidden state H to be sent to the first spatiotemporal layer 0 ∈R C×N×T,In each iteration of the spatiotemporal layer, the algorithm first uses the dynamic multi-graph constructor to calculate the dynamic adjacency matrix using the input traffic speed data. Then, the spatiotemporal embedding features are added to the traffic data to obtain the embedded traffic data. Next, the embedded traffic data is input into the linear transformation layer to obtain the initial hidden state. For each layer, the algorithm copies the hidden state to the residual and convolves the hidden state using k-layer extended causal convolutions. Then, the algorithm uses multi-scale graph convolution to convolve the input spatiotemporal embedding matrix and the dynamic adjacency matrix to obtain the hidden state of the next layer; finally, the algorithm adds the residual to the hidden state of the next layer and uses jump connections to connect the hidden states of each layer to obtain the final output; (2) Extended Causal Convolution Modeling of the time dimension The present invention implements extended causal convolution to achieve this. Causal convolution only considers past input data, not future input data, which means that for any given moment, only input data from that moment and before is used to calculate the convolution. Causal convolution operation process: Centered at time t, take a window of length k, perform dot product operation with the convolution kernel, so that the output features are shifted by several time steps. Causal convolution solves the long-term dependency and computational efficiency problems of RNN, and its parallel computing characteristics also make it faster than RNN. Compared with causal convolution, extended causal convolution requires more convolution layers to process complex graphs, but can achieve better performance and is suitable for graph-based tasks. The expansion factor controls the convolution kernel to capture more contextual information over a larger distance by skipping input values. For a given sequence input x∈R T , the convolution kernel filter x∈R T , then the mathematical expression is Where d is the dilation factor of the jump distance. The gated convolution operation captures the input H l ∈RC ×N×T Time characteristics: The tanh and sigmoid functions determine the rate at which the current input is passed to the next layer, Φ1 and Φ2 are convolution kernels, b and c are model parameters, ⊙ is defined as element-wise multiplication, and H l represents the output of the lth layer of the multi-scale graph convolution module, C is the number of channels, N is the number of nodes, and T is the time step; (3) Diffused Graph Convolution The reason why this paper uses diffusion convolution is that it can be used for directed graphs. w The specific k-step diffusion process is defined as: Here W k,1 With W k,2is a learnable matrix, P is a transfer matrix, which is calculated by P = A / rowsum(A). The two terms in the formula aggregate the information of upstream and downstream nodes respectively; (4) Multi-scale graph convolution Each GCN i is a subgraph convolution module, is the calculation result of the convolution of the i-th subgraph in the l+1-th layer, The calculation process is: In the above calculation process, the input of the sub-graph convolution module with a sequence number greater than 1 is composed of the sliced ​​graph signal and the output of the previous sub-graph convolution module; Add a learnable matrix W to the graph convolution module k,3 and W k,4 And the dynamic matrix, and update the diffusion convolution calculation method to: in is the output of a single graph convolution. Each fragment Each of them has a different receptive field, and a residual connection is placed between two adjacent sub-graph convolutions to enrich the diversity of the receptive field and capture the dependencies between local and non-local nodes. In this way, the last fragment The receptive field of the image is expanded equally. The final output can be obtained by A series of subgraph convolutions aggregate the information of different nodes. The hierarchical residual structure formed by the splicing operation and a series of subgraph convolutions equivalently expands the receptive field of view of the graph convolution, allowing nodes to aggregate more information from neighboring nodes.

[0017] Step 3: Model training (1) Training Data The training data is sampled at a frequency of 5 minutes, the historical speed data is 12 time steps, and the time span is 5 minutes; the predicted speed is 12 time steps, and the time span is 5 minutes; the training set, validation set, and test set are divided according to the ratio of 0.7, 0.1, and 0.2. The speed feature data shape in the actual code is (B×C×T×N), B is the batch size, C is the number of feature channels, T is the time step (historical step plus predicted step), N is the number of nodes, and the adjacency matrix data shape is (N×N); (2) Training environment The model was trained in a Pytorch environment using an NVIDIA TITAN RTX, 24GB memory (GPU) and Intel Core(TM) i9-12900k (CPU). In the experiment, a MSG-GCN model with 8 spatiotemporal layers was implemented. For the dilated causal convolutional layers, the dilation factors were set to 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, and the kernel size was 2. The number of hidden dimensions was set to 32. The learning rate was initialized to 0.001 and the Adam optimizer was used for training; (3) The training rounds are adjusted in real time according to actual needs and training results. After each round of training, the model parameter file is saved; (4) Model operation process The overall structure of the model is as follows Figure 1 As shown in Figure 1. The model takes traffic data with a time step of T as input, where the data for each time step is a C×N matrix. The output of the algorithm is future speed data with a time step of T′, where the data for each time step is also a C×N matrix. The core of the algorithm is an iterative process with multiple steps. In each iteration cycle, the algorithm first converts the input traffic data into a dynamic adjacency matrix using a dynamic multi-graph constructor. Then, the spatiotemporal embedding matrix is ​​added to the traffic data to obtain the embedded traffic data. Next, the embedded traffic data is input to the linear transformation layer to obtain the initial hidden state. For each layer, the algorithm copies the hidden state to the residual and convolves the hidden state using k-layer extended causal convolutions. Then, the algorithm uses multi-scale graph convolution to convolve the input spatiotemporal embedding matrix and the dynamic adjacency matrix to obtain the hidden state of the next layer. Finally, the algorithm adds the residual to the hidden state of the next layer and uses jump connections to connect the hidden states of each layer to obtain the final output. Throughout the process, the algorithm also performs full connection, loss calculation, and parameter update operations.

[0018] Step 4: Describe the near-term and long-term mode characteristics of each node traffic based on the dynamic multi-graph; Gaussian graph G g Construction method, for Gaussian adjacency matrix A g The values ​​in are calculated; more similar traffic patterns will be given higher weights, and Gaussian membership function is used to calculate the weights between nodes. Calculate the weight of each graph signal for each node in a period of time T The mean of and variance Then, for the graph signal and The traffic mode can be represented by a Gaussian function. Generate the membership function of the node at this time. Use the above calculation method to describe the current traffic mode status of the node: in, For node v i With v j Gaussian similarity at time step t, The history graph generator is represented by the hidden state The attention mechanism is used to query the historical traffic pattern memory to build an adjacency matrix that evolves dynamically over time. The weights in this matrix reflect the long-term similarity between nodes. The generation process of the dynamic adjacency matrix is ​​defined as follows: The spatiotemporal similarity between nodes in traffic data is closely related to the spatial locations between nodes. In addition, the similarity of nodes changes over time. For example, due to the social function of each node or the impact of traffic accidents, modeling these factors as external features may not be particularly effective. By directly considering the similarity of traffic data between nodes at each time step, the features and semantics in the data are learned. This can improve the traffic cognition ability of the model.

[0019] Step 5: Conduct traffic node similarity analysis based on traffic mode characteristics and apply it to urban traffic cognition; By outputting the weight values ​​of the dynamic multi-graph of the model, we can compare and analyze the changes in the similarity of traffic modes between traffic nodes at different times. g is the short-term traffic pattern similarity matrix between nodes, obtained through Gaussian function and a series of calculations. It is greatly affected by the current traffic conditions. During off-peak hours, the traffic patterns between nodes are similar, and the A g The difference in weights is not significant. However, during peak hours, the traffic patterns between nodes are more different, resulting in A g The weights of A are different. h It is generated by querying the historical traffic pattern memory and represents the long-term potential spatiotemporal correlation between nodes.

[0020] Then, by using the traffic flow prediction results in the context of an epidemic outbreak, urban traffic cognitive applications can be used to achieve smart traffic management of urban roads and provide decision makers with a reliable basis for road management; it can also help ordinary citizens plan their trips and improve the quality of traffic, as shown in the attached Figure 3 , urban traffic cognitive applications include but are not limited to the following solutions: (1) Traffic pattern analysis: By analyzing the similarity of traffic node patterns, we can reveal the traffic characteristics and connections between various nodes in the urban transportation system, providing an important reference for traffic planning and management. Traffic node pattern similarity analysis involves identifying and comparing the traffic flow, travel mode, congestion and other characteristics of different traffic nodes in the city. By deeply studying the similarity between nodes, we can understand the overall operation of the urban transportation system, discover bottlenecks and potential problems in the transportation network, and put forward targeted improvement suggestions. (2) Urban road control: The application of traffic node pattern similarity can help urban traffic managers identify bottleneck areas and high-load nodes in the traffic network, so as to adjust traffic signal control, optimize intersection layout and traffic flow distribution in a targeted manner. By real-time monitoring and analyzing the pattern similarity of traffic nodes, urban traffic managers can dynamically adjust the timing of traffic lights, reasonably allocate traffic flow, reduce traffic congestion, and improve road traffic efficiency. (3) Traffic resource scheduling: By using traffic node pattern similarity analysis, urban traffic managers can implement intelligent traffic resource scheduling. By combining real-time traffic data and advanced data analysis technology, the operating status of traffic nodes can be monitored in real time, traffic congestion can be predicted, traffic light timing can be adjusted, traffic flow control can be optimized, road capacity can be improved, and congestion can be reduced. By deeply analyzing the similarity between nodes, road layout can be optimized, traffic mobility can be improved, and the overall efficiency and sustainability of the urban transportation system can be enhanced. (4) Real-time traffic management: The application of traffic node pattern similarity in real-time traffic management can also help urban traffic managers formulate emergency response strategies. By analyzing the similarity between nodes, the affected areas and nodes can be quickly identified, traffic resources can be dispatched in a timely manner, and traffic control measures can be coordinated to ensure the safety and smoothness of the traffic system.

[0021] Obviously, the described embodiments are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

Claims

1. A deep learning method for urban traffic node pattern similarity recognition, characterized by: The following steps are involved: Step 1: Input and output data of the traffic node pattern similarity recognition algorithm based on deep learning; It includes the sensor history under traffic environment, which consists of speed data X of T historical time steps: X = [X t-T+1 , X t-T+2 , ..., X t ]∈R C×N×T , C is the number of input channels, N is the number of nodes, and T is the time step; The velocity data for each time step is C is the number of input channels, N is the number of nodes, and it consists of the speeds of N sensor nodes in the traffic scene at time step t; The predicted speed Y′ of the traffic scene consists of speed data of T′ time steps: Y′=[X t+1 , X t+2 , ..., X t+T′ ]∈R C×N×T′ , C is the number of input channels, N is the number of nodes, T' is the time step, where the speed data format of each time step is the same as the historical speed data; The formal expression of traffic node similarity recognition is: Y′=f(X), which provides a basis for future traffic decision-making; Step 2: Structural design of graph convolutional neural network model; S2.1, dynamic multi-graph construction module: uses Gaussian formula to calculate the similarity of traffic patterns between nodes in a time-varying manner, and constructs a Gaussian dynamic graph that represents the short-term traffic patterns of traffic nodes; Use traffic pattern memory to store long-term features of traffic nodes, and use attention mechanism and query vector to construct a historical dynamic graph that can represent the long-term traffic pattern of traffic nodes; The specific definition of dynamic multi-image is as follows: (1) Adjacency matrix describing node relationships: The traffic scene is described by an undirected graph G = {V, E}. Each node in the node set V represents a speed sensor of each vehicle in the traffic scene. The node set V is expressed as V = {v i |i=1,…,N}, N is the number of sensors in the traffic scene, and the feature vector v i represents the i-th speed sensor; When the distance between two sensor nodes is close enough, the edge representing the node interaction relationship should be connected; therefore, the edge set E is expressed as E = {v i v j |d(v i , v j ) <D colse }, where d is the Euclidean distance function, and the distance between two nodes in this set is less than the threshold D close ; The element-wise definition of the discrete adjacency matrix A is: A∈R N×N , where N is the total number of sensors; (2) Gaussian graph: adjacency matrix A in tensor form g ∈R n×n×t , adding the time dimension, where n is the node and t is the time step; the Gaussian graph describes the dynamic characteristics of traffic nodes and the dynamic similarity of short-term traffic patterns between nodes: The data representation of the node set V is N speed sensor nodes, and the data representation of the edge set E is the adjacency matrix A. The dynamic graph described by A and V is called It is a time-varying dynamic graph; (3) History graph: adjacency matrix Ah∈Rn in tensor form ×n×t , like the Gaussian adjacency matrix, it adds a time dimension, where n is the node and t is the time step; the history graph dynamically describes the characteristics of traffic nodes and the long-term similarity of traffic patterns between nodes; The data representation of the node set y is N speed sensor nodes, and the data representation of the edge set E is the adjacency matrix A. The dynamic graph described by A and V is called It is a time-varying dynamic graph; (4) Dynamic multi-graph construction algorithm: Dynamic multi-graphs include Gaussian graphs and historical graphs. These two different dynamic graphs describe the similarity of traffic patterns between traffic nodes from two different perspectives: immediate and long-term. The Gaussian graph generation algorithm takes the proximity similarity of traffic patterns between nodes as the starting point, obtains the spatiotemporal characteristics in traffic speed data through data mining, and then uses the Gaussian function to calculate the spatiotemporal characteristics to reflect the similarity between nodes. After calculating the similarities between all nodes, the Gaussian adjacency matrix A can be obtained. g The historical graph generation algorithm uses the traffic pattern memory to store the long-term characteristics of traffic nodes, and uses the query vector through the attention mechanism to calculate and construct the historical adjacency matrix A that represents the direct similarity of long-term traffic nodes in a time-varying manner. h ; S2.2, the extended causal convolution in the time dimension, only uses the input data from that moment and before to calculate the convolution; the expansion factor of the extended causal convolution controls the convolution kernel, capturing more contextual information at a larger distance by skipping input values; the output dynamic multi-graph of S2.1 and the intermediate features of the network output of S2.2 are input into the network of S2.3 together; S2.3, multi-scale graph convolution module, whose input is the total spatiotemporal features, dynamic multi-graph and spatial graph, and the hidden states of each layer are connected through jump connections to obtain the final output; Multi-scale graph convolution is a variant of graph convolutional neural network. It expands the perception field of convolution operation through hierarchical network design, so that nodes can aggregate more neighbor information. Its operation process is as follows: (1) Image signal division: When the graphic signal When input to the multi-scale graph convolution module, it is divided into segments from the channel dimension Then, the S graph signal fragments are respectively input into S subgraph convolutions for graph convolution operation, where C is the number of channels, N is the number of nodes, T is the time step, and S is the number of channel division fragments; (2) Diffusion graph convolution: Use diffusion graph convolution to perform convolution operations. This process f w The specific k-step diffusion process is defined as: Here W k,1 With W k,2 is a learnable matrix, P is a transfer matrix, which is calculated by P = A / rowsum(A). The two terms in the formula aggregate the information of upstream and downstream nodes respectively; (3) Sub-graph convolution and hierarchical residual connection: Each GCN i is a subgraph convolution module, is the calculation result of the convolution of the i-th subgraph in the l+1-th layer, The calculation process is: In the above calculation process, the input of the sub-graph convolution module with a sequence number greater than 1 is composed of the sliced ​​graph signal and the output of the previous sub-graph convolution module; (4) Multi-scale graph convolution: Add a learnable matrix W to the graph convolution module k,3 and W k,4 And the dynamic matrix, and update the diffusion convolution calculation method to: in is the output of a single graph convolution, each fragment Each of them has a different receptive field. A residual connection is placed between two adjacent sub-graph convolutions to enrich the diversity of the receptive field of view and capture the dependencies between local and non-local nodes, making the last fragment The receptive field of is expanded equally; the final output is: The information of different nodes is aggregated through a series of sub-graph convolutions. The hierarchical residual structure formed by the splicing operation and a series of sub-graph convolutions equivalently expands the receptive field of view of the graph convolution, allowing nodes to aggregate more information from neighboring nodes. Step 3: Train the graph convolutional neural network model; train the model by setting the corresponding training data and training environment; Step 4: Describe the near-term and long-term mode characteristics of each node traffic based on the dynamic multi-graph; The key descriptive features of node traffic patterns are constructed. The dynamic similarity feature matrix output by the dynamic similarity cognitive model describes the traffic model similarity between a node and other nodes. The dynamic adjacency matrix is ​​constructed to analyze the traffic pattern similarity, with the aim of extracting the change characteristics of node speed. More similar traffic patterns will be assigned higher weights in the Gaussian dynamic graph, using Gaussian membership function to calculate the weights between nodes; S4.1, calculate each graph signal of each node within a period of time T The mean and variance S4.2, for the signal and The traffic pattern is represented in the form of a Gaussian function, and the membership function belonging to the node at this time is generated. The above calculation method is used to describe the short-term traffic pattern state of the node: in, For node v i With v j Gaussian similarity at time step t, By defining a learnable parameter a∈[0, 1] to randomize the steepness of the Gaussian function, using the softmax function to normalize the Gaussian adjacency matrix, and using the ReLU activation function to eliminate negative connections, which sets any negative values ​​to zero, the Gaussian adjacency matrix is Each weight at is: The history graph generator is represented by the hidden state The attention mechanism is used to query the historical traffic pattern memory to build an adjacency matrix that evolves dynamically over time. The weights in the matrix reflect the long-term similarity between nodes. The generation process of the dynamic adjacency matrix is ​​defined as follows: Step 5: Conduct traffic node similarity analysis based on traffic pattern characteristics and apply it to urban traffic cognition work.

2. The deep learning method for urban traffic node pattern similarity recognition according to claim 1 is characterized in that: The training data in step 3 is set as: Training optimizer Adam, learning rate 0.001, batch size = 64, loss function Where n is the number of labels, Y′ i and Y i are the predicted speed and the real speed respectively; Use traffic speed data from any two public datasets as datasets for model training, and divide them into training set, validation set, and test set in a certain proportion; use the built-in data loader of the deep learning framework to encapsulate the data, and intelligently iterate and output data tensors in the corresponding format to the model for training.

3. The deep learning method for urban traffic node pattern similarity recognition according to any one of claims 1 to 2 is characterized in that: Urban traffic cognition includes the following application solutions: (1) Traffic pattern analysis: By analyzing the similarity of traffic node patterns, the traffic characteristics and connections between various nodes in the urban traffic system are revealed, providing an important reference for traffic planning and management. Traffic node pattern similarity analysis involves identifying and comparing the traffic flow, travel mode, congestion and other characteristics of different traffic nodes in the city. By deeply studying the similarity between nodes, it helps to understand the overall operation of the urban traffic system, discover bottlenecks and potential problems in the traffic network, and put forward targeted improvement suggestions. (2) Urban road control: The application of traffic node pattern similarity can help urban traffic managers identify bottleneck areas and high-load nodes in the traffic network, so as to adjust traffic signal control, optimize intersection layout and traffic flow distribution in a targeted manner; through real-time monitoring and analysis of traffic node pattern similarity, urban traffic managers can dynamically adjust the timing of traffic lights, reasonably distribute traffic flow, reduce traffic congestion, and improve road traffic efficiency; (3) Traffic resource scheduling: By using traffic node pattern similarity analysis, urban traffic managers can realize intelligent traffic resource scheduling; by combining real-time traffic data and advanced data analysis technology, they can monitor the operating status of traffic nodes in real time, predict traffic congestion, adjust traffic light timing, optimize traffic flow control, improve road capacity, and reduce congestion; by deeply analyzing the similarity between nodes, they can optimize road layout, improve traffic mobility, and enhance the overall efficiency and sustainability of the urban transportation system; (4) Real-time traffic management: The application of traffic node pattern similarity in real-time traffic management can also help urban traffic managers formulate emergency response strategies; by analyzing the similarity between nodes, the affected areas and nodes can be quickly identified, traffic resources can be dispatched in a timely manner, and traffic control measures can be coordinated to ensure the safety and smoothness of the traffic system.