Traffic flow prediction method, system, device and storage medium based on adaptation

By constructing the spatial and time series matrices of the traffic network, combined with multi-core temporal dynamic dilated convolution and adaptive neural constant differential equations, the problems of low traffic flow prediction efficiency and high computational cost in the existing technology are solved, and a more accurate and efficient prediction method is achieved. Efficient traffic flow prediction.

CN118522155BActive Publication Date: 2024-09-20YANTAI UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410985573.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-09-20
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods have over-smoothing problems when processing large-scale traffic networks, and traditional neural constant differential equations have limitations when processing spatio-temporal data and are difficult to adapt to traffic information of different complexity levels, resulting in high computational costs and prediction efficiency. Low.

Method used

An adaptive-based traffic flow prediction method is adopted, by constructing an adjacency matrix of space and time series, combining multi-core temporal dynamic dilated convolution and adaptive neural constant differential equations, dynamically adjusting the number of layers, and performing multi-layer sensing processing to obtain traffic flow Predict the results.

Benefits of technology

It improves the accuracy and efficiency of traffic flow prediction, can better adapt to complex traffic information, reduces waste of computing resources, significantly reduces prediction errors, and provides deeper data support for traffic planning and road condition optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_4
    Figure QLYQS_4
  • Figure QLYQS_5
    Figure QLYQS_5
Patent Text Reader

Abstract

The present invention belongs to the field of data prediction technology, and relates to a method, system, device, and storage medium for traffic flow prediction based on adaptation. The spatial adjacency matrix and the traffic semantic adjacency matrix are combined for traffic flow prediction. By integrating information in the two dimensions of space and time, and adopting technical means such as multi-core temporal dynamic expansion convolution and adaptive decision network, the prediction model can more flexibly adapt to the complexity and change pattern of different traffic data, further improving the practicality and adaptability of the prediction. It not only improves the accuracy of traffic flow prediction, but also can accurately predict the traffic flow at a specific time, analyze the spatial distribution and temporal change law of traffic flow, and significantly reduce the prediction error, which can provide deeper data support for traffic planning and road condition optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data prediction, and more specifically, relates to a method, system, device and storage medium for predicting traffic flow based on adaptation. Background Art

[0002] Urban functions depend largely on effective traffic management. Reasonable traffic planning and regulation play a key role in alleviating congestion, improving traffic efficiency, and promoting economic prosperity. A well-designed transportation system not only affects the travel convenience of residents, but also directly affects the environmental quality and the image of the city. Traffic flow forecasting has developed into an important research field that addresses the challenge of optimizing transportation systems. This forecast involves predicting future traffic conditions based on historical traffic data and related variables, including vehicle speed, travel time, and congestion level.

[0003] Recent breakthroughs in data science, machine learning, and computational methods have driven substantial progress in traffic flow forecasting techniques. Machine learning-based methods, known for their ability to handle complex patterns and nonlinear relationships in traffic data, have attracted considerable attention. Traditionally, traffic volume forecasting relies on time series analysis models such as autoregressive integrated moving averages. Currently, the mainstream framework for traffic forecasting involves spatiotemporal graph neural networks, in which each node represents a traffic observation point and the edges represent road traffic connections, forming a network. However, graph neural network models have inherent limitations, especially the over-smoothing problem when dealing with large-scale traffic networks containing a large number of nodes and edges. Ordinary Neural ODEs solve this problem, but their use has certain limitations when dealing with spatiotemporal data in traffic networks.

[0004] Specifically, different tasks have different requirements for deep models. Some tasks may benefit from deep networks, while others may perform well with shallower architectures. In addition, these models may have difficulty representing certain simple classes of functions, despite their general ability to approximate these functions in practice. Such approximations can lead to complex traffic patterns that are computationally expensive when solving neural ordinary differential equation problems. Summary of the invention

[0005] The present invention provides a traffic flow prediction method, system, device and storage medium based on self-adaptation, which can automatically determine the number of layers of a neural ordinary differential equation according to the complexity of traffic information.

[0006] The present invention is obtained by following steps:

[0007] A traffic flow prediction method based on adaptation includes the following steps:

[0008] S1: Extract the spatial features of the road network from the collected traffic road information and construct a spatial adjacency matrix, where each node represents a different road section and the edge represents the connection relationship between road sections;

[0009] S2: sort the traffic data in chronological order to obtain the time series of traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix;

[0010] S3: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, layer-adaptive neural ordinary differential equation processing, and multi-core temporal dynamic dilated convolution respectively to obtain spatial adjacency features and semantic adjacency features. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fused features. The fused features are processed by multi-layer perception to obtain the traffic flow prediction result.

[0011] The multi-core temporal dynamic dilation convolution processing operation is as follows:

[0012] A dynamic expansion rate is obtained based on the number of convolutional layers. After dynamically compensating the input sequence based on the dynamic expansion rate, convolution processing is performed based on multiple convolution kernels of different sizes, and the output sequence is obtained through weighted summation.

[0013] The selection of the number of layers for the Neural ODEs through adaptive decision making is obtained by the following operations:

[0014] The output result of multi-core temporal dynamic dilated convolution processing is used as input, multiplied by the weight matrix, and then a bias term is added to calculate the score of each layer in the decision network. Based on the score, the probability of different numbers of neural ordinary differential equation combinations is obtained, and the number of neural ordinary differential equation layers corresponding to the maximum probability is taken as the number of layers processed by the neural ordinary differential equation.

[0015] Furthermore, the dynamic expansion rate based on the number of convolutional layers is achieved by the following formula:

[0016] ,

[0017] in, d is the dynamic expansion rate, g is the number of convolutional layers, s as a parameter.

[0018] Furthermore, multi-core temporal dynamic dilated convolution is implemented by the following formula:

[0019] ,

[0020] in, y(t) represents the tth element in the output sequence, x(t) represents the tth element in the input sequence, w( g ) represents the weight of the g-th layer of the convolution kernel, d represents the dynamic expansion rate, k represents the number of convolution kernels, g Indicates the number of convolutional layers.

[0021] Furthermore, the adaptive decision-making spatiotemporal neural ordinary differential equation network is implemented by the following formula:

[0022] ,

[0023] ,

[0024] in, W represents the weight matrix, b represents the bias term, m Represents the input data, S ( m ) represents the score of each layer in the decision network, P ( m ) is the probability of combining different layers of ordinary differential equations.

[0025] Furthermore, the operation of constructing the spatial adjacency matrix is ​​implemented by the following formula:

[0026] ,

[0027] Where A is the spatial adjacency matrix, exp is the exponential function used to calculate the weight, d ij Representation Node i and nodes j The distance between is a parameter that adjusts the influence of distance on weight. It is a parameter to adjust the influence of distance on weight.

[0028] Furthermore, the downsampling operation of the maximum pooling layer is implemented by the following formula:

[0029] ,

[0030] y( p ) represents the result after the maximum pooling layer, y (sp) , y (se) They represent spatial adjacency features and semantic adjacency features respectively, and MaxPooling represents the downsampling operation.

[0031] Furthermore, in S2, a dynamic time normalization method is used to process the time series of traffic data, extract the semantic relationship of the time series, and construct a traffic semantic adjacency matrix.

[0032] A traffic flow prediction system based on adaptation, comprising:

[0033] Spatial adjacency matrix construction module: extracts the spatial features of the road network from the collected traffic road information and constructs a spatial adjacency matrix, in which each node represents a different road section and the edge represents the connection relationship between road sections;

[0034] Traffic semantic adjacency matrix construction module: sort the traffic data in chronological order to obtain the time series of traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix;

[0035] Fusion prediction module: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, layer-adaptive neural ordinary differential equation, and multi-core temporal dynamic dilated convolution respectively to obtain spatial adjacency features and semantic adjacency features. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fusion features. The fusion features are processed by multi-layer perception to obtain the traffic flow prediction results.

[0036] The multi-core temporal dynamic dilation convolution processing operation is as follows:

[0037] A dynamic expansion rate is obtained based on the number of convolutional layers. After dynamically compensating the input sequence based on the dynamic expansion rate, convolution processing is performed based on multiple convolution kernels of different sizes, and the output sequence is obtained through weighted summation.

[0038] The selection of the number of layers for the Neural ODEs through adaptive decision making is obtained by the following operations:

[0039] The output result of multi-core temporal dynamic dilated convolution processing is used as input, multiplied by the weight matrix, and then a bias term is added to calculate the score of the neural ordinary differential equation network. Based on the score, the probabilities of combinations of neural ordinary differential equations with different numbers of layers are obtained, and the number of neural ordinary differential equation layers corresponding to the maximum probability is taken as the number of layers processed by the neural ordinary differential equation.

[0040] A traffic flow prediction device based on adaptation comprises a processor and a memory, wherein the processor implements the traffic flow prediction method based on adaptation when executing a computer program stored in the memory.

[0041] A computer-readable storage medium is used to store a computer program, wherein the computer program implements the adaptive traffic flow prediction method when executed by a processor.

[0042] Beneficial effects of the present invention:

[0043] 1. Not only the spatial correlation between traffic sections is considered, but also the traffic flow change characteristics in different time periods are integrated, and the spatial adjacency matrix and traffic semantic adjacency matrix are combined for traffic flow prediction. By integrating information in the two dimensions of space and time, the changing laws of traffic flow can be more comprehensively understood, making the prediction results more accurate and reliable.

[0044] 2. Adopt an adaptive decision network to dynamically adjust the number of layers of the neural ODE to better adapt to traffic information of different complexities. The advantage of neural ODE in building deep networks is retained, that is, it can finely capture the dynamic changes of data. This adaptability not only improves the performance when processing complex traffic flow data, but also avoids unnecessary computational overhead when facing simple data, thereby improving overall efficiency. Optimization selection is performed under different time steps and data complexities to avoid the waste of computing resources. While ensuring high performance, it also reduces the difficulty of model parameter adjustment, making the entire prediction process more efficient and reliable.

[0045] 3. By adopting technical means such as multi-core temporal dynamic expansion convolution and adaptive decision network, the prediction model can more flexibly adapt to the complexity and change pattern of different traffic data, further improving the practicality and adaptability of the prediction. The prediction method proposed in the present invention combines the comprehensive consideration of spatial and temporal characteristics. Through the combined application of deep learning and neural ordinary differential equations, the present invention not only improves the accuracy of traffic flow prediction, but also can accurately predict the traffic flow at a specific time, analyze the spatial distribution and time variation of traffic flow, and significantly reduce the prediction error, which can provide deeper data support for traffic planning and road condition optimization. Therefore, the application of the present invention will effectively promote the advancement of traffic prediction technology, improve the operating efficiency of intelligent transportation systems, provide more reliable data support for traffic management departments, intelligent transportation systems, etc., and thus provide more convenient and safe guarantees for urban transportation development and people's travel. DETAILED DESCRIPTION

[0046] The technical solution of the present application is described in detail below in conjunction with specific embodiments.

[0047] A traffic flow prediction method based on adaptation includes the following steps:

[0048] S1: Extract the spatial features of the road network from the collected traffic road information and construct a spatial adjacency matrix, in which each node represents a different road section and the edge represents the connection relationship between road sections.

[0049] To extract the spatial features of the road network from the collected traffic road information, the convolutional neural network (CNN) in deep learning can be used to efficiently extract the traffic road information, including the convolution layer for feature extraction, the pooling layer for dimensionality reduction, and the spatial adjacency matrix generator for converting the extracted features into a matrix representation.

[0050] The convolution method is used to extract key features of traffic road information, including traffic volume, speed, road type and other information, and to capture the spatial characteristics of the road network, such as the connection relationship between road sections and road width. These features are cleverly integrated to construct a spatial adjacency matrix. This matrix represents the nodes (representing different road sections) and edges (representing the connections between road sections) of the road network. In this way, complex traffic road network information can be converted into a matrix data structure that can be calculated and analyzed, thereby effectively modeling the spatial relationship between traffic sections and laying a solid foundation for subsequent traffic flow prediction.

[0051] Through the above methods, the abstract modeling of the traffic network is realized, which lays an important foundation for further data analysis and the establishment of prediction models. In traffic flow prediction, the adjacency matrix is ​​a crucial basic concept that allows the relationship between discrete nodes in the road network to be described. The spatial association between nodes can be encapsulated by creating an adjacency matrix to provide input features for the model predicting traffic flow. Constructing the adjacency matrix of the road graph involves calculating the distance between sites within the traffic network.

[0052] Furthermore, the operation of constructing the spatial adjacency matrix is ​​implemented by the following formula:

[0053] ,

[0054] Where A is the spatial adjacency matrix, exp is the exponential function used to calculate the weight, d ij Representation Node i and nodes j The distance between It is a parameter that adjusts the influence of distance on weight and is used to control the discreteness of the spatial adjacency matrix. It is a parameter that adjusts the influence of distance on weight and is used to control the discreteness of the spatial adjacency matrix.

[0055] Traffic road information can be monitored and collected in real time by sensor networks, traffic cameras and vehicle-mounted GPS devices.

[0056] The collected road information can be processed initially, including data cleaning, denoising, normalization, and sorting according to time series for subsequent analysis. This can be achieved through data cleaning tools (such as removing outliers and filling missing values), normalization algorithms (such as Min-Max normalization), and time series processing modules.

[0057] S2: Sort the traffic data in chronological order to obtain the time series of the traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix.

[0058] The traffic semantic adjacency matrix can capture the changing patterns and trends of traffic flow in different time periods, and considers the semantic relationship between traffic data in different time periods, such as the similarity of vehicle flow directions and changes in congestion conditions.

[0059] The dynamic time normalization method can be used to process the time series of traffic data to obtain the traffic semantic adjacency matrix. The dynamic time normalization method can comprehensively integrate and process traffic data according to the time series. This method not only considers the time dimension of the data, but also deeply analyzes the semantic relationship of traffic data in different time periods, conducts a refined analysis of traffic flow changes in different time periods, captures subtle changes and trends in traffic patterns, enhances the model's understanding of the time dependency and dynamic change laws of traffic data, and provides more accurate and rich time information for subsequent traffic flow predictions.

[0060] For example, the similarity of vehicle flow and road congestion will be significantly different during peak hours and off-peak hours. The dynamic time normalization method can effectively identify and utilize these changing patterns to provide more accurate and reliable time information for subsequent traffic flow forecasts. This time information is crucial for the prediction model because it can help the model better understand and predict the dynamic changes in traffic flow, thereby improving the accuracy and practicality of the prediction. Through this processing method, not only can the time dependency of traffic data be better captured, but also the potential changes in traffic patterns in different time periods can be identified, laying a solid foundation for traffic flow prediction. This method, which comprehensively considers time series and semantic relationships, helps to improve the scientificity and accuracy of traffic flow prediction.

[0061] This step can be achieved using time normalization algorithms (such as DTW), time series analysis tools, and semantic adjacency matrix generators.

[0062] S3: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, layer-adaptive neural ordinary differential equation processing, and multi-core temporal dynamic dilated convolution respectively to obtain spatial adjacency features and semantic adjacency features. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fused features. The fused features are processed by multi-layer perception to obtain the traffic flow prediction results.

[0063] The multi-core temporal dynamic dilated convolution processing operation is specifically as follows: a dynamic dilation rate is obtained based on the number of convolutional layers, the input sequence is dynamically compensated based on the dynamic dilation rate, and convolution processing is performed based on multiple convolution kernels of different sizes. After weighted summation, the output sequence is obtained.

[0064] The dynamic expansion rate based on the number of convolutional layers is achieved by the following formula:

[0065] ,

[0066] in, d is the dynamic expansion rate, g is the number of convolutional layers, s is a parameter that determines the step size for increasing the dynamic dilation rate in consecutive layers. The adaptive nature of s allows for dynamic adjustment, enabling the network to effectively capture multi-scale patterns and features in the input sequence. d It can better adapt to data changes, thereby improving the accuracy of traffic flow forecasts.

[0067] Multi-core temporal dynamic dilated convolution is implemented by the following formula:

[0068] ,

[0069] in, y(t) represents the tth element in the output sequence, x (t) represents the tth element in the input sequence, w ( g ) represents the weight of the g-th layer of the convolution kernel, d represents the dynamic expansion rate, k represents the number of convolution kernels, g Indicates the number of convolutional layers.

[0070] By adjusting the dynamic dilation rate and the number of convolution kernels, information across different time intervals can be effectively captured, thereby providing accurate modeling for time series data.

[0071] Traditional temporal convolutional networks (TCNs) have low accuracy when processing complex traffic time information. Therefore, this application proposes a temporal convolutional network and introduces multi-core temporal dynamic dilation convolution technology. The multi-core temporal dynamic dilation convolution adopts a dynamic dilation strategy to dynamically adjust the receptive fields of networks at all levels as needed, capture time dependencies, and adapt to the changeable time data of traffic information.

[0072] Integrate multi-scale convolution kernels, learn features of different time scales, and improve the spatiotemporal modeling capabilities in traffic data processing. This new method not only improves the flexibility and adaptability of the model, but also enhances the model's performance in processing long-term and complex traffic data, providing strong technical support for intelligent transportation systems.

[0073] In ordinary TCN, w(g) has only one convolution kernel, which cannot perform feature extraction at different time scales well. Convolution kernels of different scales are introduced to achieve adaptability of feature learning at different time resolutions.

[0074] The implementation of the multi-scale convolution kernel is as follows:

[0075] ,

[0076] in Convn represents the multi-scale convolution kernel, Conv (n) represents the convolution kernel, where n Represents the number of convolution kernels, which is a positive integer. Represents the connection operation between different convolution kernels.

[0077] To further process the traffic time information, two multi-core temporal dynamic dilation convolutions are used in this step to improve the prediction accuracy. Through this secondary processing, the changing characteristics of traffic flow in different time periods can be captured more carefully, and the adaptability to short-term and long-term traffic flow changes can be enhanced, thereby further improving the accuracy and stability of the prediction results.

[0078] The above steps can be achieved through multi-kernel temporal dynamic dilated convolution (such as MK-TDDC) layers, dynamic dilation strategies (for adjusting the receptive field), and multi-scale convolution kernels (for learning features at different time scales).

[0079] The selection of the number of layers for the Neural ODEs through adaptive decision making is obtained by the following operations:

[0080] The output result of multi-core temporal dynamic expansion convolution processing is taken as input, multiplied by the weight matrix, and then a bias term is added to calculate the score of each layer in the decision network. Based on the score, the probabilities of different combinations of neural ordinary differential equations with different numbers of layers are obtained. The number of neural ordinary differential equations corresponding to the maximum probability is taken as the processing layer number of the neural ordinary differential equation. Based on this processing number of layers, the output result of multi-core temporal dynamic expansion convolution processing is subjected to multi-layer processing of the neural ordinary differential equation.

[0081] In traditional deep learning models, the number of layers is usually fixed, which limits the flexibility and adaptability of the model when processing complex data. In order to solve this problem, the neural ordinary differential equation (ODE) aims at the task adaptability of different depth models. The present invention provides an adaptive decision network that can automatically determine the number of layers of the neural ordinary differential equation according to the complexity of traffic information. The adaptive decision network performs adaptive layer selection according to the characteristics of the input data, and adopts a multi-branch distribution to select the layer by utilizing the probability of each layer. Only the selected layers are used for ODE calculation, and the number of ODE model layers is dynamically selected at each time step to adapt to traffic information of different complexity, improve model performance, and avoid waste of computing space and resources. This design not only retains the advantages of neural ODE in building deep networks, but also provides flexibility in building shallow networks, so that the model can be more efficient and accurate when processing complex traffic flow data.

[0082] The number of layers of the Neural Ordinary Differential Equation is selected through adaptive decision making through the following formula:

[0083] ,

[0084] ,

[0085] in, W represents the weight matrix, b represents the bias term, m Represents the input data, S ( m ) represents the score of each layer in the decision network, P ( m ) is the probability of the combination of different number of layers of neural ordinary differential equations. Multi-branch distribution is used to select the layer.

[0086] This adaptive mechanism selects layers by using the probability distribution and multi-branch distribution of each layer, thereby ensuring that the use of each layer of the network structure can optimally reflect the characteristics of the input data. This adaptability not only improves the performance of the model when processing complex traffic flow data, but also avoids unnecessary computational overhead when facing simple data, avoids the waste of computing space and resources, and improves the overall efficiency. In addition, this method retains the advantage of neural ODE in building deep networks, that is, it can finely capture the dynamic changes of data. At the same time, it also provides great flexibility in building shallow networks, optimizing the selection under different time steps and data complexities, thereby avoiding the waste of computing resources. Through this design, higher accuracy and efficiency are shown when processing traffic flow prediction. The adaptive decision-making spatiotemporal neural ordinary differential equation network can not only adapt to complex traffic flow patterns, but also effectively deal with various dynamic changes and uncertainties in the data. This innovative network structure not only ensures high performance, but also reduces the difficulty of model parameter adjustment, making the entire prediction process more efficient and reliable.

[0087] Furthermore, the downsampling operation of the maximum pooling layer is implemented by the following formula:

[0088] ,

[0089] y( p ) represents the result after the maximum pooling layer, y (sp) , y (se) They represent spatial adjacency features and semantic adjacency features respectively, and MaxPooling represents the downsampling operation.

[0090] The Max Pooling Layer is a downsampling operation that is widely used in convolutional neural networks (CNNs). Its main function is to extract the most significant features by performing pooling operations on the neighborhoods in the input feature map. Specifically, during the max pooling process, the pooling window slides over different areas of the input feature map and selects the maximum value from each window as the output. This operation can not only effectively reduce the dimension of the feature map, reduce the amount of calculation and model complexity, but also enhance the noise resistance of the model and the robustness of feature extraction. Through max pooling, the model can focus more on the key features in the input data, thereby improving the quality of feature representation. The introduction of the max pooling layer is particularly important for processing complex relationships and patterns in traffic data. In traffic flow prediction, data often contains a lot of noise and redundant information. Max pooling can help us filter out these interfering information and retain the most representative features, making subsequent feature processing and pattern recognition more accurate and efficient.

[0091] Multi-Layer Perceptron (MLP), as a fully connected feedforward neural network, is a key component for further processing and mapping features. Multi-layer perceptron consists of an input layer, one or more hidden layers, and an output layer. The neurons in each layer are fully connected to all neurons in the previous layer. Through this fully connected structure, MLP can achieve complex nonlinear transformations of input features, thereby capturing deep patterns and relationships in the data. In specific applications, the multi-layer perceptron in the traffic flow prediction model receives the output features from the maximum pooling layer and maps these features to the final prediction result space through progressive nonlinear transformations. The neurons in each layer are nonlinearly transformed through activation functions (such as ReLU, Sigmoid, etc.), allowing the model to learn the complex relationships and dynamic changes in traffic data. In addition, the multi-layer structure of MLP allows the model to capture features at different levels, from local to global, from simple to complex, and gradually extract the core information required for traffic flow prediction.

[0092] Multi-layer perception is achieved through the following formula:

[0093] ,

[0094] l represents the number of layers of MLP, represents a nonlinear activation function, G (l) and b (l) Represent the weight matrix and bias vector of the lth layer, Y (l+1) Represents the final output, Y (l) Represents Y (l+1) The result of the previous layer.

[0095] The results are processed using the maximum pooling layer and the multi-layer perceptron to obtain the traffic flow prediction results. The maximum pooling layer is responsible for extracting the most significant features in the input data, reducing the data dimension, reducing redundant information, and improving the computational efficiency; while the multi-layer perceptron deeply explores the complex relationships and patterns in the data through multi-level nonlinear transformation and learning, maps these features to the final traffic flow prediction result space, and finally realizes accurate and reliable prediction of traffic flow. The application of this comprehensive method significantly improves the accuracy and reliability of traffic flow prediction. It can effectively reduce the influence of noise in the prediction, improve the generalization ability of the model, and ensure the availability and reliability of the prediction results in practical applications. Through the significant feature extraction of the maximum pooling layer and the complex pattern learning of the multi-layer perceptron, the method of the present invention can more accurately capture various complex relationships and dynamic changes in traffic data, and provide solid data support for the efficient operation of the intelligent transportation system. In short, the combination of the maximum pooling layer and the multi-layer perceptron not only improves the prediction performance of the model, but also enhances its adaptability and robustness in practical applications, and promotes the further development of traffic flow prediction technology.

[0096] A traffic flow prediction system based on adaptation, comprising:

[0097] Spatial adjacency matrix construction module: extracts the spatial features of the road network from the collected traffic road information and constructs a spatial adjacency matrix, in which each node represents a different road section and the edge represents the connection relationship between road sections;

[0098] Traffic semantic adjacency matrix construction module: sort the traffic data in chronological order to obtain the time series of traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix;

[0099] Fusion prediction module: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, layer-adaptive neural ordinary differential equation, and multi-core temporal dynamic dilated convolution respectively to obtain spatial adjacency features and semantic adjacency features. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fusion features. The fusion features are processed by multi-layer perception to obtain the traffic flow prediction results.

[0100] The multi-core temporal dynamic dilation convolution processing operation is as follows:

[0101] A dynamic expansion rate is obtained based on the number of convolutional layers. After dynamically compensating the input sequence based on the dynamic expansion rate, convolution processing is performed based on multiple convolution kernels of different sizes, and the output sequence is obtained through weighted summation.

[0102] The layer-adapted Neural ODE is obtained by the following operation:

[0103] The output result of multi-core temporal dynamic dilated convolution processing is taken as input, multiplied by the weight matrix, and then a bias term is added to calculate the score of the neural ordinary differential equation network. Based on the score, the probabilities of combinations of neural ordinary differential equations with different numbers of layers are obtained. The number of layers of the neural ordinary differential equation corresponding to the maximum probability is taken as the neural ordinary differential equation after layer adaptation.

[0104] A traffic flow prediction device based on adaptation comprises a processor and a memory, wherein the processor implements the traffic flow prediction method based on adaptation when executing a computer program stored in the memory.

[0105] A computer-readable storage medium is used to store a computer program, wherein the computer program implements the adaptive traffic flow prediction method when executed by a processor.

[0106] In order to verify the prediction effect of the method of the present invention, a comparative experiment was conducted using an existing commonly used prediction method, and the experimental results are shown in the following Table 1. ADM-STNODE represents the method of the present invention.

[0107] Table 1 Comparison of results of different prediction methods

[0108] .

[0109] In the comparative experiment, the datasets used are PeMSD3 and PeMSD4 (California road vehicle information datasets in the United States), and the evaluation criteria are mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). MAE, RMSE, and MAPE are three commonly used indicators for evaluating the prediction performance of regression models. As can be seen from Table 1, the three evaluation criteria of the ADM-STNODE method of the present invention have greater advantages than other methods.

Claims

1. A traffic flow prediction method based on adaptation, Features The following steps are involved: S1: Extract the spatial features of the road network from the collected traffic road information and construct a spatial adjacency matrix, where each node represents a different road section and the edge represents the connection relationship between road sections; S2: sort the traffic data in chronological order to obtain the time series of traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix; S3: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, the number of layers of the neural ordinary differential equation are selected after adaptive decision making, and the neural ordinary differential equation is processed by multi-core temporal dynamic dilated convolution to obtain spatial adjacency features and semantic adjacency features respectively. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fused features. The fused features are processed by multi-layer perception to obtain the traffic flow prediction result; The multi-core temporal dynamic dilation convolution processing operation is as follows: A dynamic expansion rate is obtained based on the number of convolutional layers. After dynamically compensating the input sequence based on the dynamic expansion rate, convolution processing is performed based on multiple convolution kernels of different sizes, and the output sequence is obtained through weighted summation. The selection of the number of layers for the Neural ODEs through adaptive decision making is obtained by the following operations: The output result of multi-core temporal dynamic dilated convolution is used as input, multiplied by the weight matrix, and a bias term is added to calculate the score of each layer in the decision network. Based on the score, the probability of the combination of different layers of neural ordinary differential equations is obtained. The number of neural ordinary differential equations corresponding to the maximum probability is taken as the number of layers processed by the neural ordinary differential equations, and the multi-branch distribution is used to select the layer; The operation of constructing the spatial adjacency matrix is ​​implemented by the following formula: , Where A is the spatial adjacency matrix, exp is the exponential function used to calculate the weight, d ij Representation Node i and nodes j The distance between is a parameter that adjusts the influence of distance on weight. A parameter to adjust the influence of distance on weight; The downsampling operation of the maximum pooling layer is achieved by the following formula: 、 y( p ) represents the result after the maximum pooling layer. y (sp) , y (se) They represent spatial adjacency features and semantic adjacency features respectively, and MaxPooling represents the downsampling operation.

2. The adaptive traffic flow prediction method according to claim 1, Features The dynamic expansion rate based on the number of convolutional layers is achieved by the following formula: , in, d is the dynamic expansion rate, g is the number of convolutional layers, s as a parameter.

3. The adaptive traffic flow prediction method according to claim 1, Features Multi-core temporal dynamic dilated convolution is implemented by the following formula: , in, y ( t ) indicates the first t elements, x ( t ) represents the tth element in the input sequence, w ( g ) represents the weight of the g-th layer of the convolution kernel, d represents the dynamic expansion rate, k represents the number of convolution kernels, g Indicates the number of convolutional layers.

4. The adaptive traffic flow prediction method according to claim 1, Features The adaptive decision-making spatiotemporal neural ordinary differential equation network is implemented by the following formula: , , in, W represents the weight matrix, b represents the bias term, m Represents the input data, S ( m ) represents the score of each layer in the decision network, P ( m ) is the probability of combining different layers of ordinary differential equations.

5. The adaptive traffic flow prediction method according to claim 1, Features The number of layers for the Neural Ordinary Differential Equation is selected through adaptive decision making based on a layer selection for each time step.

6. A traffic flow prediction system based on adaptation, It is characterized in that include: Spatial adjacency matrix construction module: extracts the spatial features of the road network from the collected traffic road information and constructs a spatial adjacency matrix, in which each node represents a different road section and the edge represents the connection relationship between road sections; Traffic semantic adjacency matrix construction module: sort the traffic data in chronological order to obtain the time series of traffic data, extract the semantic relationship of the time series, and construct the traffic semantic adjacency matrix; Fusion prediction module: The spatial adjacency matrix and the traffic semantic adjacency matrix are processed by multi-core temporal dynamic dilated convolution, layer-adaptive neural ordinary differential equation, and multi-core temporal dynamic dilated convolution respectively to obtain spatial adjacency features and semantic adjacency features. The spatial adjacency features and semantic adjacency features are simultaneously input into the maximum pooling layer, and the downsampling operation is performed to obtain the fusion features. The fusion features are processed by multi-layer perception to obtain the traffic flow prediction results. The multi-core temporal dynamic dilation convolution processing operation is as follows: A dynamic expansion rate is obtained based on the number of convolutional layers. After dynamically compensating the input sequence based on the dynamic expansion rate, convolution processing is performed based on multiple convolution kernels of different sizes, and the output sequence is obtained through weighted summation. The selection of the number of layers for the Neural ODEs through adaptive decision making is obtained by the following operations: The output result of multi-core temporal dynamic dilated convolution is used as input, multiplied by the weight matrix, and a bias term is added to calculate the score of the neural ordinary differential equation network. Based on the score, the probability of the combination of neural ordinary differential equations with different layers is obtained. The number of neural ordinary differential equations corresponding to the maximum probability is taken as the number of layers processed by the neural ordinary differential equations, and the multi-branch distribution is used to select the layer; The operation of constructing the spatial adjacency matrix is ​​implemented by the following formula: , Where A is the spatial adjacency matrix, exp is the exponential function used to calculate the weight, d ij Representation Node i and nodes j The distance between is a parameter that adjusts the influence of distance on weight. A parameter to adjust the influence of distance on weight; The downsampling operation of the maximum pooling layer is achieved by the following formula: 、 y( p ) represents the result after the maximum pooling layer, y (sp) , y (se) They represent spatial adjacency features and semantic adjacency features respectively, and MaxPooling represents the downsampling operation.

7. A traffic flow prediction device based on adaptation, It is characterized in that The method comprises a processor and a memory, wherein the processor implements the adaptive traffic flow prediction method as described in any one of claims 1 to 5 when executing the computer program stored in the memory.

8. A computer-readable storage medium, It is characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, the adaptive traffic flow prediction method according to any one of claims 1 to 5 is implemented.