Traffic flow information prediction method, device and related equipment based on deep mutual learning

By building a global and integrated traffic flow spatio-temporal map in a distributed cluster and building two alternating iterative training networks, the existing traffic flow information prediction methods are solved in capturing the global and regional traffic relationships and real-time performance, and more efficient traffic flow information prediction is achieved.

CN119479318BActive Publication Date: 2025-04-22湖南工商大学
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510059176.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-22
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The existing traffic flow information prediction methods are not accurate enough to capture the relationship between global and regional traffic, and the deep learning algorithm has huge parameters and high training time cost, which affects the real-time prediction.

Method used

Using a method based on deep mutual learning, a central server and edge node are built in a distributed cluster, a global traffic flow spatio-temporal map and a converged traffic spatio-temporal map are built, and two networks are built for alternate iterative training to obtain a target traffic flow information prediction model.

Benefits of technology

It improves the accuracy and timeliness of traffic flow information prediction, quickly considers the relationship between global and regional traffic, shortens the parameter update time, and meets the real-time needs of smart transportation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479318B_ABST
    Figure CN119479318B_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic flow information prediction method, device and related equipment based on deep mutual learning, including: receiving target road network traffic information and point of interest information sent by edge nodes; constructing a global traffic flow spatiotemporal graph and a fused traffic spatiotemporal graph based on the target road network traffic information and the point of interest information; building a first network for extracting the first global traffic flow spatiotemporal features and the fused traffic spatiotemporal features based on the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph; building a second network for extracting the second global traffic flow spatiotemporal features based on the global traffic flow spatiotemporal graph, and performing pre-training; constructing a path for mutual transmission between the first network and the second network, training them in turn in an alternating iterative manner, obtaining a target traffic flow information prediction model, and using the target traffic flow information prediction model to predict real-time traffic flow information to obtain a prediction result. The present invention is used to improve the timeliness and 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 field of intelligent transportation, and in particular to a traffic flow information prediction method, device and related equipment based on deep mutual learning. Background Art

[0002] With the acceleration of urbanization and population growth, the number of motor vehicles continues to rise, the demand for urban travel is increasing, and the problem of urban traffic congestion is becoming increasingly prominent. Building an intelligent transportation system can help traffic managers effectively alleviate traffic congestion problems, and real-time and accurate traffic flow information prediction is one of the key technologies for realizing intelligent transportation systems, and plays an indispensable role in modern urban traffic management and planning. Domestic and foreign scholars have covered a variety of methods and techniques in the research of traffic flow information prediction. The existing traffic flow information prediction methods mainly include: methods based on statistical learning, such as the historical average model method, ARIMA model, etc., methods based on machine learning such as support vector machine algorithm, random forest algorithm, and methods based on deep learning, such as recurrent neural network, convolutional neural network, etc.

[0003] In the process of realizing the present invention, the inventors realized that the prior art has at least the following technical problems: one part of the existing methods mainly mines the time characteristics of traffic flow data for prediction, and fails to fully consider the impact of the relationship between global traffic and regional traffic on the prediction of traffic flow information, making the traffic flow information prediction results not accurate enough; the other part of the deep learning algorithms and models that can more effectively capture the time and space correlation characteristics mostly have very large parameters and high training time costs, requiring a lot of computing power resources, and failing to consider the demand for lightweight algorithms and models in practical applications, seriously affecting the real-time performance of traffic flow information prediction.

[0004] Therefore, the existing methods for predicting traffic flow information have problems with timeliness and accuracy. Summary of the invention

[0005] Embodiments of the present invention provide a method, apparatus, computer device and storage medium for predicting traffic flow information based on deep mutual learning to improve the punctuality and timeliness of traffic flow information prediction.

[0006] In order to solve the above technical problems, the embodiment of the present application provides a traffic flow information prediction method based on deep mutual learning, including:

[0007] Applied to a distributed cluster, the distributed cluster includes edge nodes and a central server, and the traffic flow information prediction method based on deep mutual learning includes the following steps performed by the central server:

[0008] Receive target road network traffic information and point of interest information sent by edge nodes;

[0009] Based on the target road network traffic information and the point of interest information, a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph are constructed, wherein the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs;

[0010] Building a first network for extracting a first global traffic flow spatiotemporal feature and a fused traffic flow spatiotemporal feature based on a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph;

[0011] Building a second network for extracting the second global traffic flow spatiotemporal features based on the global traffic flow spatiotemporal graph and performing pre-training;

[0012] Constructing a path for mutual transmission between the first network and the second network, training them in turn in an alternating iterative manner to obtain a target traffic flow information prediction model;

[0013] Real-time traffic flow information is received, and the target traffic flow information prediction model is used to perform prediction according to the real-time traffic flow information to obtain a traffic flow information prediction result.

[0014] Optionally, constructing a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on the target road network traffic information and the point of interest information includes:

[0015] According to the target road network traffic information, a global traffic flow spatiotemporal graph is constructed, and for each time step t, there is a corresponding traffic feature matrix for describing the global traffic flow spatiotemporal graph;

[0016] Based on the global traffic flow spatiotemporal graph, a point of interest flow graph is constructed as an external feature;

[0017] The global traffic flow spatiotemporal graph is divided into regions by wavelet clustering, and the regional flow of each region is calculated to obtain regional flow characteristics;

[0018] The external features and the regional traffic features are fused to obtain fused traffic features, and the fused traffic spatiotemporal graph is generated based on the fused traffic features.

[0019] Optionally, constructing a point of interest flow graph as an external feature based on the global traffic flow spatiotemporal graph includes:

[0020] Using the information of the points of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, the distance between each point of interest and each node is calculated to obtain a graph node whose distance to the corresponding point of interest is less than a preset distance;

[0021] Calculate the traffic information of each point of interest corresponding to the graph node:

[0022] Construct an adjacency matrix between interest points;

[0023] Based on the graph nodes, the POI traffic information and the adjacency matrix, a POI traffic graph is constructed as the external feature.

[0024] Optionally, the first network includes a temporal feature extraction part and a spatial feature extraction part, and is composed of a stack of K layers of spatiotemporal feature extraction layers, wherein the temporal feature extraction part adopts a multi-gated temporal convolutional network, and the spatial feature extraction part adopts a diffusion graph convolution algorithm with a learnable adjacency matrix.

[0025] Optionally, the step of constructing a path for mutual transmission between the first network and the second network, and training them in turn in an alternating iterative manner to obtain a target traffic flow information prediction model includes:

[0026] During the training process, the first network and the second network are alternately iteratively optimized using a back propagation algorithm based on their respective loss functions. When the pre-trained second network reaches a preset threshold, the training stops and the second network is used as the target traffic flow information prediction model.

[0027] In order to solve the above technical problems, the embodiment of the present application further provides a traffic flow information prediction device based on deep mutual learning, including:

[0028] An information receiving module is used to receive target road network traffic information and point of interest information sent by edge nodes;

[0029] A directed graph construction module, used to construct a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on the target road network traffic information and the information of points of interest, wherein the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs;

[0030] A first building module is used to build a first network, which is used to extract the first global traffic flow spatiotemporal characteristics and the fused traffic spatiotemporal characteristics based on the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph;

[0031] A second building module is used to build a second network for extracting a second global traffic flow spatiotemporal feature based on the global traffic flow spatiotemporal graph and performing pre-training;

[0032] A model training module is used to construct a path for mutual transmission between the first network and the second network, and to perform training in sequence in an alternating iterative manner to obtain a target traffic flow information prediction model;

[0033] The traffic flow prediction module is used to receive real-time traffic flow information and use the target traffic flow information prediction model to make predictions based on the real-time traffic flow information to obtain traffic flow information prediction results.

[0034] Optionally, the directed graph construction module includes:

[0035] A global traffic flow spatiotemporal graph construction unit is used to construct a global traffic flow spatiotemporal graph according to the target road network traffic information, and for each time step t, there is a corresponding traffic feature matrix for describing the global traffic flow spatiotemporal graph;

[0036] A point of interest flow graph construction unit, used to construct a point of interest flow graph as an external feature based on the global traffic flow spatiotemporal graph;

[0037] A regional flow characteristic calculation unit, used for dividing the global traffic flow spatiotemporal graph into regions by wavelet clustering, and calculating the regional flow of each region to obtain regional flow characteristics;

[0038] The feature fusion unit is used to fuse the external features and the regional traffic features to obtain fused traffic features, and generate the fused traffic spatiotemporal graph based on the fused traffic features.

[0039] Optionally, the point of interest traffic map construction unit includes:

[0040] A graph node screening subunit is used to calculate the distance between each point of interest and each node using the information of the point of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, and obtain a graph node whose distance to the corresponding point of interest is less than a preset distance;

[0041] The traffic calculation subunit is used to calculate the traffic information of the point of interest corresponding to each of the graph nodes:

[0042] The adjacency matrix construction subunit is used to construct the adjacency matrix between interest points;

[0043] The point of interest flow graph construction subunit is used to construct a point of interest flow graph as the external feature based on the graph nodes, the point of interest flow information and the adjacency matrix.

[0044] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned traffic flow information prediction method based on deep mutual learning are implemented.

[0045] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned traffic flow information prediction method based on deep mutual learning are implemented.

[0046] The traffic flow information prediction method, device, computer equipment and storage medium based on deep mutual learning provided by the embodiments of the present invention receive target road network traffic information and point of interest information sent by edge nodes; construct a global traffic flow spatiotemporal graph and a fused traffic spatiotemporal graph based on the target road network traffic information and point of interest information, and the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph are directed graphs; build a first network for extracting the first global traffic flow spatiotemporal characteristics and the fused traffic spatiotemporal characteristics based on the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph; build a second network for extracting the second global traffic flow spatiotemporal characteristics based on the global traffic flow spatiotemporal graph, and perform pre-training; construct a path for mutual transmission between the first network and the second network, and train them in sequence in an alternating iterative manner to obtain a target traffic flow information prediction model; receive real-time traffic flow information, and use the target traffic flow information prediction model to predict according to the real-time traffic flow information to obtain a traffic flow information prediction result. It can quickly and comprehensively consider the impact of the relationship between global flow and regional flow on traffic flow prediction, improve the accuracy of traffic flow information identification, and use two networks for alternating iterations for training, which is conducive to improving the efficiency of network training, thereby shortening the parameter update time and improving the timeliness of traffic flow prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0048] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0049] Figure 2 is a flowchart of an embodiment of a traffic flow information prediction method based on deep mutual learning of the present application;

[0050] Figure 3 It is a structural diagram of the first network in the traffic flow information prediction method based on deep mutual learning of the present application;

[0051] Figure 4 It is a structural diagram of the second network in the traffic flow information prediction method based on deep mutual learning of the present application;

[0052] Figure 5 It is a model schematic diagram of the overall algorithm of deep mutual learning in the traffic flow information prediction method based on deep mutual learning of the present application;

[0053] Figure 6is a structural schematic diagram of an embodiment of a traffic flow information prediction device based on deep mutual learning according to the present application;

[0054] Figure 7 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0056] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] See also Figure 1 ,like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0059] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.

[0060] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.

[0061] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0062] It should be noted that the traffic flow information prediction method based on deep mutual learning provided in the embodiment of the present application is executed by a server, and accordingly, the traffic flow information prediction device based on deep mutual learning is arranged in the server.

[0063] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.

[0064] See also Figure 2 , Figure 2 A traffic flow information prediction method based on deep mutual learning provided by an embodiment of the present invention is shown. The method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:

[0065] S201: Receive target road network traffic information and point of interest information sent by the edge node.

[0066] Specifically, the target road network traffic information includes node coordinates of road network nodes, connectivity relationships of each node, and traffic flow data collected by the nodes.

[0067] Point of interest information (POI information) includes the coordinates, names, categories, and classifications of major information points in the target road network area.

[0068] S202: Based on the target road network traffic information and the information of the points of interest, a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph are constructed. The global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs.

[0069] In a specific optional implementation, in step S202, constructing a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on target road network traffic information and point of interest information includes:

[0070] According to the traffic information of the target road network, a global traffic flow spatiotemporal graph is constructed. For each time step t, there is a corresponding traffic feature matrix used to describe the global traffic flow spatiotemporal graph;

[0071] Based on the global traffic flow spatiotemporal graph, a point of interest flow graph is constructed as an external feature;

[0072] The global traffic flow spatiotemporal graph is divided into regions through wavelet clustering, and the regional flow of each region is calculated to obtain the regional flow characteristics;

[0073] The external features and regional traffic features are fused to obtain fused traffic features, and a fused traffic spatiotemporal graph is generated based on the fused traffic features.

[0074] In a specific optional implementation, based on the global traffic flow spatiotemporal graph, constructing a point of interest flow graph as an external feature includes:

[0075] Using the information of the points of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, the distance between each point of interest and each node is calculated, and the graph nodes whose distance to the corresponding point of interest is less than a preset distance are obtained;

[0076] Calculate the traffic information of the point of interest corresponding to each graph node:

[0077] Construct an adjacency matrix between interest points;

[0078] Based on the graph nodes, POI flow information and adjacency matrix, a POI flow graph is constructed as an external feature.

[0079] Specifically, the traffic map definition: Traffic map Among them, V and E represent the nodes and edges of the graph respectively; the adjacency matrix A is constructed according to the connectivity between nodes. If there is connectivity between two nodes, it is assigned a value of 1, otherwise it is 0, which is used to describe the spatial correlation between nodes.

[0080] First, the distance between each POI point and each node is calculated using the POI point coordinates and the node coordinates in the traffic map, and the graph nodes whose distance to the corresponding POI point is less than the preset distance D1 are obtained. The distance calculation formula is:

[0081] ;

[0082] Where: R is the radius of the Earth, , They are the latitudes of graph nodes and POI points respectively. , They are the longitudes of graph nodes and POI points respectively.

[0083] Furthermore, the traffic information of each POI is calculated:

[0084] For the graph node whose distance from the corresponding POI point is less than the preset distance D1 , POI traffic information The calculation formula is as follows:

[0085] ;

[0086] ;

[0087] in: Preset weights for different POI types. is the distance between the corresponding node and the POI point, is a preset positive real value, is the total number of graph nodes whose distance to the corresponding POI point is less than the preset distance D1, is the traffic characteristics of the corresponding node.

[0088] Furthermore, the adjacency matrix between POI points is constructed:

[0089] The adjacency matrix is ​​used to represent the spatial interaction between nodes. The adjacency matrix between POI points is constructed as follows: when the distance between two POI points is When the distance is less than the preset distance D2, if point i and point j are not the same type of POI points, there is a flow spatial correlation of traffic, which is represented by i and j being connected to each other, and the value of position (i, j), (j, i) in the adjacency matrix is ​​1; otherwise it is 0.

[0090] The POI flow graph is constructed from the above .

[0091] In this embodiment, the global traffic flow spatiotemporal graph is analyzed by wavelet clustering. Divide the area and calculate the regional traffic flow of each area to obtain the regional traffic flow time-space diagram , wavelet clustering is a fast clustering method based on grids, which is suitable for large-scale data and has low computational time complexity, which is beneficial to improving the computational speed of the model in this embodiment;

[0092] The specific regional divisions are as follows:

[0093] According to the actual geographic coordinate points, the preset M*M grids are divided, and the node number matrix A in each grid area is obtained. Wavelet transform is applied to the matrix to obtain the smooth matrix Ar. The smooth matrix Ar is filtered by the preset threshold q. The values ​​less than the threshold q are marked as 0 in the matrix and regarded as noise. The connected parts in the matrix are divided into the same area.

[0094] Among them, the regional flow is calculated as follows:

[0095] ;

[0096] in: is the regional flow characteristic, is the total number of nodes in the area, For the corresponding node flow characteristics.

[0097] Furthermore, to determine whether the regions are connected, the adjacency matrix is ​​defined as follows:

[0098] When there is a connection relationship between a node in region i and a node in region j, there is a spatial flow correlation of traffic between regions i and j, which is represented by the connection between regions i and j. The value of positions (i, j) and (j, i) in the adjacency matrix is ​​1; otherwise, it is 0.

[0099] Construct the regional traffic flow spatiotemporal graph from the above .

[0100] Furthermore, regional fusion traffic characteristics are obtained:

[0101] POI traffic and regional traffic flow represent the traffic flow characteristics at different spatial levels respectively. Considering the further spatial correlation between regional division and POI point division, the features of the two are fused.

[0102] The POI traffic features and regional traffic features are fully integrated into an external feature matrix by using the convolution kernel in the convolutional network to aggregate the corresponding elements. The formula is as follows:

[0103] ;

[0104] in represents the convolution operation, are the learnable parameters of the convolutional network, , They represent the overall regional traffic characteristics and POI traffic characteristics respectively.

[0105] From the above, the fusion result is regarded as the regional fusion traffic feature matrix, which can be used to represent the fusion traffic spatiotemporal graph.

[0106] S203: Building a first network for extracting first global traffic flow spatiotemporal features and fused traffic flow spatiotemporal features based on the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph.

[0107] Optionally, the first network includes a temporal feature extraction part and a spatial feature extraction part, and is composed of a stack of K layers of spatiotemporal feature extraction layers, wherein the temporal feature extraction part adopts a multi-gated temporal convolutional network, and the spatial feature extraction part adopts a diffusion graph convolution algorithm with a learnable adjacency matrix.

[0108] The spatiotemporal feature extraction module ST1 of the first network includes a temporal feature extraction part and a spatial feature extraction part, which is formed by stacking K layers of spatiotemporal feature extraction layers. The specific structure is as follows: Figure 3 shown.

[0109] The time feature extraction part in this embodiment is:

[0110] Considering the complex correlation of traffic flow data in temporal characteristics, there is not only the influence of adjacent moments but also the long-term periodic influence. Multiple gated temporal convolutions are used to capture the dependencies at different time scales.

[0111] Among them, multiple time convolution is: Multiple time convolution contains three TCN blocks, and the three TCN blocks (TCN-a, TCN-b, TCN-c) use Sigmoid, Tanh, and Relu activation functions respectively. The output of each TCN block is obtained through the gate structure, and the output vector of the gate structure is multiplied to obtain the final output vector, which is defined as follows:

[0112] ;

[0113] in , , , , , are the parameters of the model, is the element-wise product of vectors, , , They represent Sigmoid, Tanh, and ReLU activation functions respectively.

[0114] It should be understood that the TCN block uses dilated causal convolution to improve the receptive field of the model by skipping some inputs, which can better capture the temporal characteristics of traffic flow. The specific definition is common knowledge in the field and will not be repeated here.

[0115] The spatial feature extraction part is as follows:

[0116] Furthermore, a diffusion graph convolution algorithm combined with a learnable adjacency matrix is ​​used. The learnable adjacency matrix is ​​regarded as a transfer matrix in the diffusion process, which is converted from randomly initialized parameter nodes and can capture the spatial dependencies of each hidden layer. It is defined as follows:

[0117] ;

[0118] in, , is a learnable randomly initialized parameter node.

[0119] At the same time, considering the limited diffusion of road network flow in the actual spatial relationship, only the spatial correlation of the M nearest neighbor nodes of each node is retained, and their corresponding values ​​are retained. Further updated to .

[0120] Furthermore, the diffusion graph convolution layer is defined as follows:

[0121] ;

[0122] in, , , are the forward and backward transfer matrices in the directed graph, respectively. represents the adjacency matrix; represents the power series of the probability transfer matrix, represents the input signal, , , represents the parameter matrix, Represents output.

[0123] After the global traffic flow and the fused traffic flow are outputted respectively through spatiotemporal feature extraction, the output data of the two are spliced ​​to obtain the input of the next spatiotemporal feature extraction block. The input and the output of the next spatiotemporal feature extraction block are residually connected and then passed into the prediction module.

[0124] Furthermore, the splicing operation includes:

[0125] To connect the features along a specific dimension, the number of feature channels is superimposed. That is, assuming that the dimensions of the two features are , after splicing operation, we get Characteristics of dimensions.

[0126] Among them, the residual connection is the superposition of the input and the nonlinear change of the input, which is defined as follows:

[0127] ;

[0128] in Represents input, Represents the output, represents a non - linear transformation, and represents a learnable parameter matrix.

[0129] Among them, the prediction module consists of two linear transformations containing ReLU, processes the output features obtained after residual connection, and obtains the final prediction result.

[0130] S204: Build a second network, which is used to extract second - order global traffic flow spatio - temporal features based on the global traffic flow spatio - temporal graph and perform pre - training.

[0131] Among them, the spatio - temporal feature extraction module ST2 of the second network includes a time feature extraction part and a space feature extraction part, which is stacked by S spatio - temporal feature extraction layers, and S < K, so the second network has fewer parameters, specifically as Figure 4 shown.

[0132] In this embodiment, the time feature extraction part of the second network:

[0133] Is basically the same as the structure of the first network, and uses a simplified multi - gated temporal convolution - double - gated temporal convolution to capture dependencies at different time scales.

[0134] The double - temporal convolution is as follows: The double - temporal convolution contains two TCN blocks, uses the Sigmoid and Tanh activation functions for three TCN blocks (TCN - a, TCN - b) respectively, obtains the output of each TCN block through a gating structure, and performs a product operation on the output vectors of the gating structure to obtain the final output vector, which is defined as follows:

[0135] ;

[0136] Where , , , are model parameters, is the element - wise product of vectors, , represent the Sigmoid and Tanh activation functions respectively.

[0137] Similarly, the TCN block uses dilated causal convolution, and the specific definition will not be elaborated here

[0138] The space feature extraction part of the second network:

[0139] Uses a simplified graph convolutional algorithm GCN for space feature extraction.

[0140] Its graph convolutional layer is defined as follows:

[0141] ;

[0142] in, , is the adjacency matrix of the graph, is the identity matrix, for The degree matrix of is the input signal, is the parameter matrix.

[0143] Its layer feature propagation formula is defined as:

[0144] ;

[0145] in is the activation function, Represents the number of convolutional layers.

[0146] After the global traffic flow is outputted through spatiotemporal feature extraction, the output is regarded as the input of the next spatiotemporal feature extraction block, and the input and the output of the next spatiotemporal feature extraction block are residually connected and then passed into the prediction module.

[0147] Furthermore, after the second network is constructed, pre-training is performed to save computing resources and accelerate the convergence of the subsequent deep mutual learning model. The pre-training:

[0148] Small batches of historical data are used for training, and the number of training times does not exceed 10. The MAE indicator is used as the loss function of pre-training. Back propagation is used for training based on the loss function. The pre-training loss function is defined as follows:

[0149] ;

[0150] in, is the total number of samples, , are the predicted value and the true value respectively.

[0151] S205: constructing a path for mutual transmission between the first network and the second network, and performing training in sequence in an alternating iterative manner to obtain a target traffic flow information prediction model.

[0152] In a specific optional implementation, in step S205, constructing a path for mutual transmission between the first network and the second network, and sequentially training in an alternating iterative manner to obtain a target traffic flow information prediction model includes:

[0153] During the training process, the first network and the second network are alternately iterated and optimized using the back propagation algorithm based on their respective loss functions. When the pre-trained second network reaches a preset threshold, the training stops and the second network is used as the target traffic flow information prediction model.

[0154] It should be noted that the deep mutual learning in this embodiment is to combine models with each other to learn from each other and solve tasks together. In the present invention, the lightweight model is retained to meet the requirements of practical applications for prediction accuracy and real-time performance, and the model with larger parameters is retained for pre-training of subsequent model updates. The overall algorithm model based on deep mutual learning in this embodiment is shown in FIG. Figure 5 shown.

[0155] The loss function for training is as follows:

[0156] Use KL divergence to measure the output prediction of the first network With the second network output Predicted Differences , Second network output Prediction and first network output prediction The Difference , respectively defined as follows:

[0157] ;

[0158] ;

[0159] in is the number of nodes in the graph, is the number of layers of the graph.

[0160] The difference between the prediction and actual value of each network output is defined as follows:

[0161] ;

[0162] ;

[0163] in is the number of nodes in the graph, is the number of layers of the graph, , is the predicted value, is the actual value.

[0164] Finally, the loss function of the first network and the second network is , They are defined as follows:

[0165] ;

[0166] ;

[0167] in are preset parameters.

[0168] During the training process, the first network and the second network are optimized alternately and iteratively using the back propagation algorithm based on their respective loss functions. The preset threshold will be reached quickly, at which point the training stops and the second network is saved as the final road network traffic flow prediction model.

[0169] The parameters of the first network are retained. When the network structure changes and the model needs to be updated, it can be used to assist the corresponding second network in pre-training, thereby saving computing resources and accelerating model convergence.

[0170] S206: receiving real-time traffic flow information, and using a target traffic flow information prediction model to make predictions based on the real-time traffic flow information to obtain traffic flow information prediction results.

[0171] Specifically, the prediction model obtained in S2055 is deployed on the application side, and real-time global traffic flow data is used to perform real-time traffic flow prediction. When the road network structure does not change, the model is continuously updated using real-time data to complete the traffic flow prediction task. When the road network structure changes, the model needs to be regenerated, and the first network retained in S5 is used for auxiliary pre-training, and the model is regenerated and deployed for use.

[0172] This embodiment comprehensively considers the relationship between global traffic flow, regional traffic flow, and external POI factors, explores relevant features at different spatial levels, better captures the spatiotemporal characteristics of traffic flow, and improves the accuracy of model prediction; at the same time, based on the deep mutual learning framework, a lightweight model with better real-time prediction can be obtained to better meet the actual application needs of the intelligent transportation system. In addition, the first network and the second network obtained in the present invention are retained, the second network can be directly applied to related prediction tasks, and the first network can be used for subsequent auxiliary pre-training, which maximizes the use of relevant computing resources and is more in line with actual needs.

[0173] In this embodiment, by receiving the target road network traffic information and point of interest information sent by the edge node;

[0174] Based on the target road network traffic information and point of interest information, a global traffic flow spatiotemporal graph and a fused traffic spatiotemporal graph are constructed, and the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph are directed graphs; a first network is constructed to extract the first global traffic flow spatiotemporal features and the fused traffic spatiotemporal features based on the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph; a second network is constructed to extract the second global traffic flow spatiotemporal features based on the global traffic flow spatiotemporal graph, and pre-training is performed; a path for mutual transmission between the first network and the second network is constructed, and training is performed in sequence in an alternating iterative manner to obtain a target traffic flow information prediction model; real-time traffic flow information is received, and the target traffic flow information prediction model is used to predict according to the real-time traffic flow information to obtain traffic flow information prediction results. The impact of the relationship between global traffic and regional traffic on traffic flow prediction is quickly and comprehensively considered, and the accuracy of traffic flow information recognition is improved. At the same time, the alternating iterative method of two networks is used for training, which is conducive to improving the efficiency of network training, thereby shortening the parameter update time and improving the timeliness of traffic flow prediction.

[0175] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0176] Figure 6 The principle block diagram of the traffic flow information prediction device based on deep mutual learning is shown, which corresponds to the traffic flow information prediction method based on deep mutual learning in the above-mentioned embodiment. Figure 6 As shown, the traffic flow information prediction device based on deep mutual learning includes an information receiving module 31, a directed graph construction module 32, a first construction module 33, a second construction module 34, a model training module 35 and a traffic flow prediction module 36. The functional modules are described in detail as follows:

[0177] An information receiving module 31 is used to receive target road network traffic information and point of interest information sent by an edge node;

[0178] A directed graph construction module 32 is used to construct a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on the target road network traffic information and the information of the points of interest, wherein the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs;

[0179] A first building module 33 is used to build a first network, and is used to extract a first global traffic flow spatiotemporal feature and a fused traffic flow spatiotemporal feature based on a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph;

[0180] A second building module 34 is used to build a second network for extracting a second global traffic flow spatiotemporal feature based on the global traffic flow spatiotemporal graph and performing pre-training;

[0181] The model training module 35 is used to construct a path for mutual transmission between the first network and the second network, and perform training in turn in an alternating iterative manner to obtain a target traffic flow information prediction model;

[0182] The traffic flow prediction module 36 is used to receive real-time traffic flow information and use a target traffic flow information prediction model to make predictions based on the real-time traffic flow information to obtain traffic flow information prediction results.

[0183] Optionally, the directed graph construction module 32 includes:

[0184] A global traffic flow spatiotemporal graph construction unit is used to construct a global traffic flow spatiotemporal graph according to the target road network traffic information. For each time step t, there is a corresponding traffic feature matrix for describing the global traffic flow spatiotemporal graph.

[0185] A point of interest flow graph construction unit, used to construct a point of interest flow graph as an external feature based on the global traffic flow spatiotemporal graph;

[0186] The regional traffic flow characteristic calculation unit is used to divide the global traffic flow spatiotemporal graph into regions through wavelet clustering, and calculate the regional flow of each region to obtain the regional flow characteristics;

[0187] The feature fusion unit is used to fuse the external features and the regional traffic features to obtain the fused traffic features, and generate a fused traffic spatiotemporal graph based on the fused traffic features.

[0188] Optionally, the point of interest traffic map construction unit includes:

[0189] A graph node screening subunit is used to calculate the distance between each point of interest and each node using the information of the point of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, and obtain the graph nodes whose distance to the corresponding point of interest is less than a preset distance;

[0190] The traffic calculation subunit is used to calculate the traffic information of the point of interest corresponding to each graph node:

[0191] The adjacency matrix construction subunit is used to construct the adjacency matrix between interest points;

[0192] The POI flow graph construction subunit is used to construct a POI flow graph based on graph nodes, POI flow information and adjacency matrix as external features.

[0193] For the specific limitations of the traffic flow information prediction device based on deep mutual learning, please refer to the limitations of the traffic flow information prediction method based on deep mutual learning above, which will not be repeated here. Each module in the above-mentioned traffic flow information prediction device based on deep mutual learning can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0194] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0195] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0196] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0197] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the traffic flow information prediction method based on deep mutual learning, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0198] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the traffic flow information prediction method based on deep mutual learning.

[0199] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0200] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor so that the at least one processor performs the steps of the traffic flow information prediction method based on deep mutual learning as described above.

[0201] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0202] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A traffic flow information prediction method based on deep mutual learning, characterized in that: Applied to a distributed cluster, the distributed cluster includes edge nodes and a central server, and the traffic flow information prediction method based on deep mutual learning includes the following steps performed by the central server: Receive target road network traffic information and point of interest information sent by edge nodes; Based on the target road network traffic information and the point of interest information, a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph are constructed, wherein the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs; Building a first network for extracting a first global traffic flow spatiotemporal feature and a fused traffic flow spatiotemporal feature based on a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph; Building a second network for extracting the second global traffic flow spatiotemporal features based on the global traffic flow spatiotemporal graph and performing pre-training; Constructing a path for mutual transmission between the first network and the second network, training them in turn in an alternating iterative manner to obtain a target traffic flow information prediction model; Receiving real-time traffic flow information, and using the target traffic flow information prediction model to make predictions based on the real-time traffic flow information to obtain traffic flow information prediction results; The step of constructing a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on the target road network traffic information and the point of interest information includes: According to the target road network traffic information, a global traffic flow spatiotemporal graph is constructed, and for each time step t, there is a corresponding traffic feature matrix for describing the global traffic flow spatiotemporal graph; Based on the global traffic flow spatiotemporal graph, a point of interest flow graph is constructed as an external feature; The global traffic flow spatiotemporal graph is divided into regions by wavelet clustering, and the regional flow of each region is calculated to obtain regional flow characteristics; The external features and the regional traffic features are fused to obtain fused traffic features, and the fused traffic spatiotemporal graph is generated based on the fused traffic features.

2. The traffic flow information prediction method based on deep mutual learning according to claim 1 is characterized in that: The method of constructing a point of interest flow graph as an external feature based on a global traffic flow spatiotemporal graph includes: Using the information of the points of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, the distance between each point of interest and each node is calculated to obtain a graph node whose distance to the corresponding point of interest is less than a preset distance; Calculate the traffic information of each point of interest corresponding to the graph node: Construct an adjacency matrix between interest points; Based on the graph nodes, the POI traffic information and the adjacency matrix, a POI traffic graph is constructed as the external feature.

3. The traffic flow information prediction method based on deep mutual learning according to claim 1 is characterized in that: The first network includes a temporal feature extraction part and a spatial feature extraction part, and is composed of a stack of K layers of spatiotemporal feature extraction layers, wherein the temporal feature extraction part adopts a multi-gated temporal convolutional network, and the spatial feature extraction part adopts a diffusion graph convolution algorithm that can learn an adjacency matrix.

4. The traffic flow information prediction method based on deep mutual learning according to claim 1, characterized in that: The step of constructing a path for mutual transmission between the first network and the second network, and training them in turn in an alternating iterative manner to obtain a target traffic flow information prediction model includes: During the training process, the first network and the second network are alternately iteratively optimized using a back propagation algorithm based on their respective loss functions. When the pre-trained second network reaches a preset threshold, the training stops and the second network is used as the target traffic flow information prediction model.

5. A traffic flow information prediction device based on deep mutual learning, characterized in that: include: An information receiving module is used to receive target road network traffic information and point of interest information sent by edge nodes; A directed graph construction module, used to construct a global traffic flow spatiotemporal graph and a fused traffic flow spatiotemporal graph based on the target road network traffic information and the information of points of interest, wherein the global traffic flow spatiotemporal graph and the fused traffic flow spatiotemporal graph are directed graphs; A first building module is used to build a first network, which is used to extract the first global traffic flow spatiotemporal characteristics and the fused traffic spatiotemporal characteristics based on the global traffic flow spatiotemporal graph and the fused traffic spatiotemporal graph; A second building module is used to build a second network for extracting a second global traffic flow spatiotemporal feature based on the global traffic flow spatiotemporal graph and performing pre-training; A model training module is used to construct a path for mutual transmission between the first network and the second network, and to perform training in sequence in an alternating iterative manner to obtain a target traffic flow information prediction model; A traffic flow prediction module, used for receiving real-time traffic flow information, and using the target traffic flow information prediction model to make predictions based on the real-time traffic flow information to obtain traffic flow information prediction results; Wherein, it is characterized in that the directed graph construction module includes: A global traffic flow spatiotemporal graph construction unit is used to construct a global traffic flow spatiotemporal graph according to the target road network traffic information, and for each time step t, there is a corresponding traffic feature matrix for describing the global traffic flow spatiotemporal graph; A point of interest flow graph construction unit, used to construct a point of interest flow graph as an external feature based on the global traffic flow spatiotemporal graph; A regional flow characteristic calculation unit, used for dividing the global traffic flow spatiotemporal graph into regions by wavelet clustering, and calculating the regional flow of each region to obtain regional flow characteristics; The feature fusion unit is used to fuse the external features and the regional traffic features to obtain fused traffic features, and generate the fused traffic spatiotemporal graph based on the fused traffic features.

6. The traffic flow information prediction device based on deep mutual learning according to claim 5, characterized in that: The point of interest flow map construction unit includes: A graph node screening subunit is used to calculate the distance between each point of interest and each node using the information of the point of interest and the coordinates of each node in the global traffic flow spatiotemporal graph, and obtain a graph node whose distance to the corresponding point of interest is less than a preset distance; The traffic calculation subunit is used to calculate the traffic information of the point of interest corresponding to each of the graph nodes: The adjacency matrix construction subunit is used to construct the adjacency matrix between interest points; The point of interest flow graph construction subunit is used to construct a point of interest flow graph as the external feature based on the graph nodes, the point of interest flow information and the adjacency matrix.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the traffic flow information prediction method based on deep mutual learning as described in any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the traffic flow information prediction method based on deep mutual learning as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Neural network model interaction training method and device and storage medium

    CN114219078A