A prediction method, device and medium for urban traffic congestion diffusion pattern
By combining the causal correlation module and the dynamic graph convolution neural network, the transfer entropy between road segments is calculated and the matrix is dynamically adjusted, which solves the problem of traditional methods ignoring causal connections and time-varying characteristics, and achieves a more accurate prediction of urban traffic congestion diffusion mode.
Patent Information
- Application Number
- CN202411524112.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-30
AI Technical Summary
When predicting urban traffic congestion diffusion patterns, traditional graph convolutional neural network ignores the potential causal relationships and time-varying characteristics between road sections, resulting in low accuracy and availability of prediction results.
Using an initial prediction model based on the causal correlation module and a dynamic graph convolutional neural network, the transmission entropy matrix of the road network is determined by calculating the transmission entropy of any two road segments, and combined with the sliding window strategy, the adjacency matrix is dynamically adjusted to capture the spatial and temporal changes. .
By comprehensively considering the complex relationship between traffic sections, the diffusion mechanism of traffic congestion can be described more accurately, the accuracy and reliability of predictions can be improved, and potential traffic congestion problems are warned in advance, providing sufficient emergency response time for traffic management departments.
Smart Images

Figure CN119107811B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a method, device and medium for predicting a diffusion pattern of urban traffic congestion. Background Art
[0002] With the development of urban construction, the number of motor vehicles continues to increase, and the resulting traffic congestion has made urban traffic pollution, energy consumption and other problems increasingly serious, and has caused great trouble to urban residents' travel. The most basic elements of the road network are intersections and various road sections. The reliability and stability of nodes and sections in the urban road network directly reflect the reliability and stability of the entire road network. In particular, when the reliability and stability of individual sections have a greater impact on the overall reliability and stability of the road network, these sections are likely to become bottlenecks in congestion evacuation. The degradation or even failure of their traffic capacity directly leads to the normal evacuation function of adjacent sections. Due to the cascading effect of the sections, it may eventually lead to the degradation of the evacuation capacity of the entire urban road network or the paralysis of the road network. Therefore, how to accurately identify the key bottlenecks of urban traffic congestion, that is, to explore the diffusion pattern of urban traffic congestion, is an effective way to improve urban travel efficiency and road utilization.
[0003] The traditional way to determine the spread of urban traffic congestion is generally based on graph convolutional neural networks for analysis and determination. However, traditional graph convolutional neural networks pay too much attention to the physical connections of the network during training, and often ignore the potential causal relationship between road sections. In addition, traditional graph convolutional neural networks ignore the time-varying characteristics of the connection relationship between road sections and use a fixed time window to calculate the adjacency matrix. The propagation path and occurrence time of urban traffic congestion may be adjusted with the change of time and space. This makes it difficult for the fixed adjacency matrix to predict the spread of urban traffic congestion. The problem of the spatiotemporal correlation between each road section in the display environment leads to low accuracy and availability of the prediction results. Summary of the invention
[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a method, device and medium for predicting the diffusion pattern of urban traffic congestion.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a method for predicting a diffusion pattern of urban traffic congestion, the method comprising:
[0007] Inputting the section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index into the initial prediction model; wherein the initial prediction model is based on a causal association module and a dynamic graph convolutional neural network;
[0008] Extracting features from the road section information according to the causal association module to calculate the transfer entropy between any two road sections and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time;
[0009] Acquire the associated road sections of each traffic road section, and use the first traffic observation data of the associated road section and the second observation data of each traffic road section and the road network transfer entropy matrix as samples; wherein the samples include: training samples, verification samples, and evaluation samples;
[0010] Iteratively training the dynamic graph convolutional neural network according to the training samples and the verification samples, and determining whether the trained dynamic graph convolutional neural network meets the requirements according to the evaluation samples;
[0011] If so, the section information of each traffic section in the urban area to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network to determine the congestion diffusion pattern of the urban area to be predicted based on the output results.
[0012] Optionally, in one or more embodiments of the present specification, before inputting the section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index into the initial prediction model, the method further includes:
[0013] Collecting initial traffic information corresponding to historical urban areas; wherein the initial traffic information includes: urban road network information, vehicle GPS information and vehicle driving trajectory;
[0014] Performing data matching according to the latitude and longitude data corresponding to each of the initial traffic information to determine the initial traffic information matched by each traffic section in the historical urban area;
[0015] Performing data cleaning on the initial traffic information matched by each traffic section to obtain the traffic information of each traffic section in the historical urban area;
[0016] Based on the traffic information, an average speed and a free flow speed of each traffic section within a preset time period are determined, so as to determine a traffic congestion index of each traffic section according to the average speed and the free flow speed.
[0017] Optionally, in one or more embodiments of the present specification, feature extraction is performed on the road section information according to the causal association module to calculate the transfer entropy between any two road sections, and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time, specifically including:
[0018] Extracting features from the road section information according to the causal association module to determine feature data corresponding to each of the road section information;
[0019] The transfer entropy between any two road sections is calculated according to the preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period;
[0020] Combine the transfer entropies between any two road sections in each window time period to obtain the initial road network transfer entropy matrix in each window time period;
[0021] Determining an initial road network transfer entropy matrix at the prediction time according to the window time period corresponding to the prediction time;
[0022] The initial road network transfer entropy matrix is symmetrically processed to obtain the road network transfer entropy matrix corresponding to the historical urban area prediction time.
[0023] Optionally, in one or more embodiments of the present specification, the transfer entropy between any two road sections is calculated according to a preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period, specifically including:
[0024] According to the prediction target of the urban area to be predicted, the sliding window parameters of the preset sliding window are defined; wherein the prediction target includes: short-term prediction, long-term prediction, and specific time prediction; the sliding window parameters include: window width and window moving step length;
[0025] Based on the window width and the window moving step length, determining each window time period corresponding to the road section information corresponding to each traffic road section; wherein the road section information is time series information;
[0026] The preset sliding window is moved according to the window moving step to extract the section information of the traffic section in the window within each window time period, and the transfer entropy between any two sections within each window time period is calculated and determined based on the probability distribution estimation.
[0027] Optionally, in one or more embodiments of the present specification, obtaining the associated road sections of each traffic road section, using the first traffic observation data of the associated road section and the second observation data of each traffic road section and the road network transfer entropy matrix as samples, specifically includes:
[0028] Acquire the associated path of each traffic section to obtain the first traffic observation data of the associated section in a preset first number of time periods and the road network transfer entropy matrix as input vectors;
[0029] Acquire second observation data of each traffic section in a preset second time period after the prediction moment as the output vector of the sample;
[0030] Based on the input vector and the output vector, samples of the dynamic graph convolutional neural network are determined, so that the samples are divided based on a preset ratio to obtain training samples, verification samples and evaluation samples.
[0031] Optionally, in one or more embodiments of the present specification, iteratively training the dynamic graph convolutional neural network according to the training sample and the verification sample specifically includes:
[0032] Setting initial parameters of a dynamic graph convolutional neural network; wherein the initial parameters include: spatial attention mechanism parameters, graph convolutional network parameters, and long short-term memory network parameters;
[0033] Inputting the input vector of the training sample into the dynamic graph convolutional neural network to obtain a model output corresponding to the input vector of the training sample based on the forward propagation of the dynamic graph convolutional neural network;
[0034] Based on the model output and the output vector of the training sample, determine the loss value of the dynamic graph convolutional neural network, perform backpropagation to update the initial parameters according to the loss value, evaluate the performance of the dynamic graph convolutional neural network according to the verification sample, and adjust the hyperparameters of the dynamic graph convolutional neural network based on the evaluation results;
[0035] Determine an updated dynamic graph convolutional neural network corresponding to the adjusted initial parameters and hyperparameters, and iteratively train the updated dynamic graph convolutional neural network based on the training samples and the verification samples to obtain a trained dynamic graph convolutional neural network.
[0036] Optionally, in one or more embodiments of the present specification, determining whether the trained dynamic graph convolutional neural network meets the requirements according to the evaluation sample specifically includes:
[0037] Inputting the evaluation sample into the trained dynamic graph convolutional neural network to obtain an output result corresponding to the evaluation sample;
[0038] Based on preset evaluation indicators, the output results corresponding to the evaluation samples are evaluated to obtain evaluation values corresponding to the preset evaluation indicators; wherein the preset evaluation indicators include: mean absolute error, root mean square error and weighted mean absolute percentage error;
[0039] The evaluation values corresponding to the preset evaluation indicators are weighted to determine the evaluation value of the trained dynamic graph convolutional neural network, and based on the evaluation value and the preset evaluation threshold, it is determined whether the prediction model corresponding to the trained dynamic graph convolutional neural network meets the requirements.
[0040] Optionally, in one or more embodiments of the present specification, after the road section information of each traffic section in the urban area to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network to determine the congestion diffusion mode of the urban area to be predicted according to the output result, the method further includes:
[0041] Analyze the output result to obtain the traffic congestion index corresponding to each traffic section corresponding to the preset second time period;
[0042] Based on a preset visualization tool, a traffic congestion index corresponding to each traffic section corresponding to a preset second time period is visualized to obtain a visualization result;
[0043] The congestion diffusion pattern of each traffic section in the urban area to be predicted is determined based on the visualization result.
[0044] One or more embodiments of this specification provide a device for predicting a diffusion pattern of urban traffic congestion, the device comprising:
[0045] at least one processor; and,
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.
[0048] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.
[0049] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0050] The combination of the causal association module and the dynamic graph convolutional neural network can comprehensively consider the complex relationship between traffic sections. The causal association module can more comprehensively capture the spatiotemporal variation characteristics of traffic flow by calculating the transfer entropy between any two sections, revealing the potential causal relationship and mutual influence between sections, thereby more accurately describing the diffusion mechanism of traffic congestion. The dynamic graph convolutional neural network can capture the dynamic changes in the traffic network, further improving the accuracy of the prediction. By training the prediction model based on the traffic information of historical urban areas, the impact of historical data on section congestion is fully considered. By using a sliding window in the process of determining the road network transfer entropy matrix, it can be flexibly adjusted and optimized according to the traffic characteristics of different cities and different time periods, avoiding the problem that it is difficult to consider the spatiotemporal correlation when calculating the adjacency matrix with a fixed time window. The trained prediction model predicts the traffic congestion diffusion pattern of the urban area to be tested in the future period, which can warn of potential traffic congestion problems in advance and provide sufficient emergency response time for the traffic management department. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0052] Figure 1 A schematic diagram of a method for predicting a diffusion pattern of urban traffic congestion provided in an embodiment of this specification;
[0053] Figure 2 An overall flow chart of a dynamic graph convolutional network based on spatiotemporal causal association provided in an embodiment of this specification;
[0054] Figure 3 A local schematic diagram of a sliding window in a dynamic graph convolutional network provided in an embodiment of this specification;
[0055] Figure 4 A schematic diagram of the structure of a device for predicting the diffusion pattern of urban traffic congestion provided in an embodiment of this specification;
[0056] Figure 5 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION
[0057] The embodiments of this specification provide a method, device and medium for predicting a diffusion pattern of urban traffic congestion.
[0058] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0059] like Figure 1 As shown, the embodiment of this specification provides a flow chart of a method for predicting the diffusion pattern of urban traffic congestion. Figure 1 It can be seen that in one or more embodiments of this specification, a method for predicting a diffusion pattern of urban traffic congestion includes:
[0060] S101: Inputting the section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index into an initial prediction model; wherein the initial prediction model is based on a causal association module and a dynamic graph convolutional neural network.
[0061] When the reliability and stability of individual road sections have a greater impact on the overall reliability and stability of the road network, these road sections will become bottlenecks in congestion evacuation. Due to the cascading effect of the road sections, the evacuation capacity of the entire urban road network may eventually be degraded or the road network may be paralyzed. Therefore, when analyzing the urban congestion situation, it is necessary to take into account the road network topology of the road section. In addition, the bottleneck in the congested traffic is obtained by analyzing historical data, so as to facilitate the subsequent analysis of the causal relationship between certain bottlenecks, and then the urban congestion problem in the traffic diversion link. Therefore, in order to achieve the effective use of historical data, in the embodiment of this specification, the road section information of each traffic section in the historical urban area will be determined according to the traffic information of the historical urban area, so as to input the road section information and traffic congestion index of each traffic section into the initial prediction model for training. Among them, it should be noted that in order to be able to realize the analysis of the spatiotemporal causal relationship of the historical urban area, so as to break the problem that the traditional graph convolutional neural network can only process the symmetric adjacency matrix, and improve the accuracy of the prediction results in time and space, the initial prediction model in the embodiment of this specification is composed of a causal association module and a dynamic graph convolutional neural network.
[0062] Furthermore, in order to make the data of each part of the road section information match each other, thereby improving the accuracy of subsequent processing. In one or more embodiments of this specification, before the road section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index are input into the initial prediction model, the method also includes the following process:
[0063] First, the initial traffic information corresponding to the historical urban area is collected; it should be noted that the initial traffic information includes: urban road network information, vehicle GPS information and vehicle driving trajectory. Further urban road network information includes road section number, road section name, road section length, road section association, road section capacity and road section free flow speed, etc., while vehicle GPS information includes vehicle number, GPS positioning point, time and vehicle instantaneous speed of private cars and taxis, etc., and vehicle driving trajectory information includes vehicle number, road section number sequence occupied by the vehicle in a continuous time period and road section traffic conditions, etc. After collecting and obtaining the initial traffic information, data matching is performed according to the latitude and longitude data corresponding to each initial traffic information to determine the initial traffic information matched by each traffic section in the historical urban area. Then, the initial traffic information matched by each traffic section is cleaned to obtain the traffic information of each traffic section in the historical urban area. According to the traffic information obtained after cleaning, the average speed and free flow speed of each traffic section in the preset time period are determined, and the traffic congestion index of each traffic section is determined according to the average speed and free flow speed.
[0064] For example, in a certain application scenario, after the traffic information is cleaned, the cleaned traffic information is calculated based on the following formula to obtain the traffic congestion index of each road section, so as to provide input data for the subsequent prediction model training:
[0065]
[0066] in, is the traffic congestion index of road section k in i in each historical urban area; is the average speed of road section k in sample i during time period t; is the free flow speed of road section k in sample i.
[0067] In the above process, by collecting multi-source traffic information of each traffic section, it is helpful to comprehensively reflect the actual situation of urban traffic. Using longitude and latitude data for data matching can ensure the accuracy of the initial traffic information matched by each traffic section. At the same time, through the data cleaning process, erroneous, duplicated or irrelevant data can be removed to further improve the quality of the data.
[0068] S102: Extracting features from the road section information according to the causal association module to calculate the transfer entropy between any two road sections and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time.
[0069] In order to be able to apply the transfer entropy to the causal relationship identification between sections of the urban road network traffic status in the calculation part of the adjacency matrix of the traditional graph convolutional neural network, a causal relationship mining method for the spatiotemporal state of the road network considering the direction of information transmission is constructed to ensure the effective mining of the spatial topology of each section. In the embodiment of this specification, the road section information is feature extracted according to the causal association module to calculate the transfer entropy of any two road sections and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time. The transfer entropy is obtained as a quantitative indicator of causal relationship through the processing of the causal association module, which can clearly identify which sections have a close causal relationship in the traffic flow changes. The feature extraction based on causal association and the construction of the transfer entropy matrix can provide more accurate historical data support for traffic flow prediction. By considering the mutual influence between sections, the prediction model containing the causal association module can more comprehensively capture the spatiotemporal change characteristics of traffic flow, thereby improving the accuracy and reliability of the prediction results.
[0070] Specifically, in one or more embodiments of the present specification, feature extraction is performed on the road section information according to the causal association module to calculate the transfer entropy between any two road sections and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time, which specifically includes the following process:
[0071] First, the road section information is feature extracted according to the causal association module to determine the feature data corresponding to each road section information. Then, the transfer entropy between any two road sections is calculated according to the preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period. Then, the transfer entropy between any two road sections in each window time period is combined to obtain the initial road network transfer entropy matrix in each window time period. Then, according to the window time period corresponding to the prediction time, the initial road network transfer entropy matrix at the prediction time is determined. The initial road network transfer entropy matrix is symmetrically processed to obtain the road network transfer entropy matrix corresponding to the prediction time of the historical urban area.
[0072] Specifically, in a certain application scenario, the spatiotemporal correlation information matrix is calculated in the causal association module, and the processed road section information is feature extracted. The N road sections are regarded as variables X and Y. Under a window width w, the pairwise transfer entropy between the road sections in the road network during the window period is calculated:
[0073]
[0074] Therefore, the network transfer entropy matrix at this moment is expressed as:
[0075]
[0076] in, and Respectively represent variables X and Y at time The status value of express The value of X during the time period, indicating the past The state at a moment; express The value of Y during the time period, indicating the past The state at a moment; represents the joint probability; and represents the sampling period of variables X and Y, which is used to calculate the transfer entropy; It represents the time-delay horizon, taking into account the time-delay effect of information propagation; represents the transfer entropy from Y to X; It represents the transfer entropy between any two traffic sections in the time period t; Represents the road network transfer entropy matrix.
[0077] In addition, due to the directionality of the transfer entropy, the transfer entropy between two road sections in different directions is different. By symmetric processing of the diagonal of the transfer entropy matrix, such as weighted averaging, the symmetric matrix of the transfer entropy in each window period of the road network can be obtained as the dynamic adjacency matrix of the dynamic graph convolutional neural network, and the transfer entropy on the diagonal of the transfer entropy matrix is zero.
[0078] By presetting the sliding window strategy, the process can perform fine-grained temporal analysis of the transfer entropy between any two road sections. This means that subtle differences in traffic flow changes between road sections in different time periods can be captured, thereby more accurately reflecting the spatiotemporal propagation characteristics of traffic congestion. The transfer entropy between any two road sections in each window time period is calculated and combined into the initial road network transfer entropy matrix. This process comprehensively captures the causal relationship between all road sections in the urban road network, which helps to fully consider the integrity and complexity of the road network in subsequent predictions, and improve the accuracy and reliability of the prediction. The initial road network transfer entropy matrix is symmetrically processed to ensure the symmetry and consistency of the matrix. This helps to simplify the subsequent calculation and analysis process and avoid errors and misunderstandings caused by matrix asymmetry. At the same time, because in the actual traffic network, the mutual influence between road sections is usually bidirectional, the symmetrical processing also makes the road network transfer entropy matrix more in line with the actual situation. Because the transfer entropy matrix not only contains the causal relationship information between road sections, but also reflects the spatiotemporal variation characteristics of traffic flow, so if Figure 2 As shown, using it as one of the inputs for subsequent predictions can more accurately capture the diffusion pattern and evolution trend of traffic congestion, thereby making more accurate predictions.
[0079] Further, in one or more embodiments of the present specification, the transfer entropy between any two road sections is calculated according to a preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period, specifically including:
[0080] Since different prediction targets require different time windows. For example, if the analysis target is to capture the short-term fluctuations of traffic states, i.e., the prediction target is short-term prediction, then a narrower window and a smaller moving step may be required; if the analysis target is to identify the long-term trends of traffic states such as seasonal changes, changes in traffic patterns, etc., i.e., the prediction target is long-term prediction, then a wider window may be required; and if the analysis focuses on specific events such as traffic conditions during holidays, large-scale events, etc., i.e., the prediction target is specific-time prediction, then the window width and the moving step may need to be adjusted according to the characteristics of these events. Therefore, in the embodiments of this specification, in order to be able to process with the minimum computing time under a limited computing amount, the sliding window parameters of the preset sliding window will be defined according to the prediction target of the urban area to be predicted; wherein the sliding window parameters include: the window width w and the window moving step l. According to the defined window width and window moving step, the window time periods corresponding to the road segment information of each traffic road segment can be determined; wherein, it can be understood that the road segment information is time series information. Then, according to the window moving step, the preset sliding window is moved, so as to extract the road segment information of the traffic road segment within the window in each window time period, and calculate and determine the transfer entropy between any two road segments within each window time period according to the probability distribution estimation. That is, as Figure 3 shown, the sliding window updates the sampled data by defining two parameters, the window width w and the window moving step l, divides the original state space into n continuous subspaces Si, each window width contains w data, and each moving step contains l sampled data (l < w). When the time changes, the sample data included in the sliding window w is updated according to the moving step l as the adjacency matrix of the dynamic graph convolutional neural network at the next moment.
[0081] In this process, by customizing the sliding window parameters according to the prediction target, the unnecessary data processing amount can be significantly reduced, especially when processing large-scale time series data. Narrower windows and smaller steps are suitable for short-term prediction and can quickly respond to data changes; while wider windows are suitable for long-term trend analysis and reduce the computational burden caused by frequent updates. Dynamically adjusting the sliding window parameters according to the requirements of specific prediction tasks enhances the flexibility and adaptability of the system. And using the data extracted by the sliding window as the input of the dynamic graph convolutional neural network can further utilize the spatial and temporal dependencies in the graph-structured data. By continuously updating the sample data within the sliding window as the adjacency matrix.
[0082] S103: Obtain the associated road segments of each traffic road segment, so as to use the first traffic observation data of the associated road segments, the second observation data of each traffic road segment, and the road network transfer entropy matrix as samples; wherein, the samples include: training samples, validation samples, and evaluation samples.
[0083] In order to make the prediction model after training take into account the influence of the reliability and stability of individual road sections on the overall reliability and stability of the road network, the associated road sections of each traffic section will be obtained in the training process in the embodiments of this specification, so as to use the first traffic observation data of the associated road sections and the second observation data of each traffic section and the road network transfer entropy as samples. It should be noted that the samples include: training samples, verification samples, and evaluation samples. Since the information of the associated road sections provides the mutual influence and dependency between traffic flows, the prediction model based on this training can more comprehensively understand the changing trend of the current traffic status, thereby improving the prediction accuracy of the future traffic conditions of the target road section. Based on the samples containing the road network transfer entropy for training, the model can capture the information flow and mutual influence between different road sections in the traffic network, and the use of diversified samples containing the information of associated road sections, such as training samples, verification samples, evaluation samples, etc. for training, also helps the model learn more generalized feature representations.
[0084] Specifically, in one or more embodiments of the present specification, obtaining the associated road sections of each traffic road section, and using the first traffic observation data of the associated road section and the second observation data of each traffic road section and the road network transfer entropy matrix as the sample, specifically includes the following process:
[0085] Obtain the associated path of each traffic section to obtain the first traffic observation data of the associated section in a preset first number of time periods and the road network transfer entropy matrix as the input vector. That is, select the first traffic observation value of the traffic condition of the associated section in a preset first number of time periods, such as the first m time periods The entropy matrix is transferred with the road network as the input vector. Then, the second observation data of each traffic section in the preset second time period after the prediction moment is obtained as the output vector of the sample. That is, the second traffic observation data of the current section in the preset second time period after the prediction moment, for example, the second traffic observation data of the next n time periods are selected. As the output vector. Then, the sample of the dynamic graph convolutional neural network is determined according to the input vector and the output vector, so that the sample is divided according to the preset ratio to obtain the training sample, the verification sample and the evaluation sample. For example: 70% of the sample data is selected as the training sample and input into the prediction model, 15% of the sample data is selected as the verification set to adjust the hyperparameters of the model, and the other 15% is input into the prediction model to evaluate the generalization ability of the model. In this process, by selecting the traffic observation data of the first m time periods, i.e., the preset first number of time periods, as input, it helps the model to learn the spatiotemporal dependence of traffic flow. Selecting the traffic observation data of the next n time periods, i.e., the preset second number of time periods, as the output vector enables the model to predict the changing trend of future traffic flow. Since the input vector contains rich historical information and quantitative indicators of road network dynamics, and the output vector is directly related to the future traffic conditions, this sample construction method helps to improve the prediction accuracy of the model.
[0086] S104: Iteratively train the dynamic graph convolutional neural network according to the training samples and the verification samples, and determine whether the trained dynamic graph convolutional neural network meets the requirements according to the evaluation samples.
[0087] After the training samples and the verification samples are obtained based on the above step S103, the dynamic graph convolutional neural network is iteratively trained according to the training samples and the verification samples, and whether the trained dynamic graph convolutional neural network meets the requirements is determined according to the evaluation samples. Specifically, in one or more embodiments of the present specification, the dynamic graph convolutional neural network is iteratively trained according to the training samples and the verification samples, specifically including:
[0088] Set the initial parameters of the dynamic graph convolutional neural network; among them, Figure 2 The initial parameters shown may include: spatial attention mechanism parameters, graph convolution network parameters, and long short-term memory network parameters. Then, the input vector of the training sample is input into the dynamic graph convolution neural network to obtain the model output corresponding to the input vector of the training sample based on the forward propagation of the dynamic graph convolution neural network. Then, based on the model output and the output vector of the training sample, the loss value of the dynamic graph convolution neural network is determined to back-propagate and update the initial parameters according to the loss value. In addition, the performance of the dynamic graph convolution neural network needs to be evaluated according to the verification sample, and the hyperparameters of the dynamic graph convolution neural network need to be adjusted based on the evaluation results. By determining the updated dynamic graph convolution neural network corresponding to the adjusted initial parameters and hyperparameters, the updated dynamic graph convolution neural network is iteratively trained based on the training sample and the verification sample to obtain the trained dynamic graph convolution neural network.
[0089] By combining the spatial attention mechanism, graph convolutional network and long short-term memory network, the prediction model can better handle the dynamic characteristics and time dependencies in graph structure data. This combination enables the model to adaptively learn and capture the complex relationships between nodes in the graph structure and the characteristics that change over time, thereby improving the model's adaptability to complex dynamic graph data. By continuously iteratively optimizing parameters, the model can converge to the optimal solution faster, thereby improving training efficiency.
[0090] Furthermore, in one or more embodiments of the present disclosure, determining whether the trained dynamic graph convolutional neural network meets the requirements according to the evaluation sample specifically includes:
[0091] First, input the pre-prepared evaluation sample set into the trained dynamic graph convolutional neural network. These evaluation samples should be able to fully cover various situations that the model may encounter, so as to obtain the output results corresponding to the evaluation samples. Then, the output results corresponding to the evaluation samples are evaluated based on the preset evaluation indicators to obtain the evaluation values corresponding to each preset evaluation indicator; it should be noted that the preset evaluation indicators include: mean absolute error, root mean square error and weighted mean absolute percentage error. The expressions of each evaluation indicator are as follows:
[0092] Mean absolute error ;
[0093] Root mean square error ;
[0094] Weighted mean absolute percentage error ;
[0095] Where n represents the number of samples in the test set. represents the traffic congestion index of the predicted road section, It represents the traffic congestion index actually observed on the road section. Represents the weight value of the evaluation sample.
[0096] Since different evaluation indicators may have different importance in different scenarios. Therefore, they need to be weighted according to actual needs to obtain a comprehensive evaluation value. The weighting method can be adjusted according to the specific application scenario, such as determining the weight based on expert opinions, historical data performance or business needs. Therefore, the evaluation values corresponding to each preset evaluation indicator are weighted to determine the evaluation value of the trained dynamic graph convolutional neural network, and at the same time, according to the evaluation value and the preset evaluation threshold, it is determined whether the prediction model corresponding to the trained dynamic graph convolutional neural network meets the requirements. Among them, it should be noted that the preset evaluation preset can be determined based on business needs, industry standards or the performance of previous models. If the comprehensive evaluation value is lower than the threshold, that is, the smaller the three indicator values, then the model is considered to meet the requirements; otherwise, the model needs to be further adjusted and optimized.
[0097] S105: If yes, the road section information of each traffic section in the urban area to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network to determine the congestion diffusion pattern of the urban area to be predicted according to the output result.
[0098] If it is determined based on the above step S104 that the trained prediction model meets the requirements, then the section information of each traffic section in the urban area that currently needs to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network, so as to output the result and then determine the congestion diffusion mode of the city to be predicted based on the output result. That is, in one or more embodiments of this specification, after the section information of each traffic section in the urban area to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network, the congestion diffusion mode of the urban area to be predicted is determined based on the output result based on the following method:
[0099] First, the output results are parsed to obtain the traffic congestion index corresponding to each traffic section corresponding to the preset second time period. Then, based on the preset visualization tool, the traffic congestion index corresponding to each traffic section corresponding to the preset second time period is visualized to obtain the visualization result. Based on the visualization result, the congestion diffusion mode of each traffic section in the urban area to be predicted is determined. The traffic congestion index of each traffic section in the preset second time period is displayed by the visualization tool, so that the congestion diffusion mode is clear at a glance. This intuitiveness helps decision makers to quickly understand the traffic congestion situation and its changing trend in the urban area, so as to make more accurate and timely response measures. By predicting the traffic congestion index in multiple time periods and displaying its changing trend, the dynamic process of congestion diffusion can be revealed. This dynamicity helps to discover the laws and characteristics of congestion diffusion and provide strong support for the formulation of long-term and effective traffic management strategies. In addition, the information of all traffic sections in the urban area to be predicted is taken into account, so that the determined congestion diffusion mode is comprehensive. This helps to avoid one-sided analysis caused by focusing only on some sections and improve the efficiency and effectiveness of overall traffic management.
[0100] like Figure 4 As shown in FIG. 1 , a schematic diagram of a device for predicting the diffusion pattern of urban traffic congestion provided in an embodiment of this specification is shown. Figure 4 It can be seen that in one or more embodiments of this specification, a device for predicting a diffusion pattern of urban traffic congestion includes:
[0101] at least one processor; and,
[0102] a memory communicatively connected to the at least one processor; wherein,
[0103] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned exemplary methods.
[0104] like Figure 5 As shown, the present specification provides a schematic diagram of the structure of a non-volatile storage medium. Figure 5 It can be seen that in one or more embodiments of the present specification, a non-volatile storage medium stores computer executable instructions 501, and the computer executable instructions can execute any of the above-mentioned methods.
[0105] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0106] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0107] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A method for predicting the diffusion pattern of urban traffic congestion, characterized in that: The method comprises: Inputting the section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index into the initial prediction model; wherein the initial prediction model is based on a causal association module and a dynamic graph convolutional neural network; Extracting features from the road section information according to the causal association module to calculate the transfer entropy between any two road sections and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time; Acquire the associated road sections of each traffic road section, and use the first traffic observation data of the associated road section and the second observation data of each traffic road section and the road network transfer entropy matrix as samples; wherein the samples include: training samples, verification samples, and evaluation samples; Iteratively training the dynamic graph convolutional neural network according to the training samples and the verification samples, and determining whether the trained dynamic graph convolutional neural network meets the requirements according to the evaluation samples; If yes, the road section information of each traffic section in the urban area to be predicted and the traffic congestion index are input into the prediction model corresponding to the trained dynamic graph convolutional neural network to determine the congestion diffusion mode of the urban area to be predicted according to the output result; Acquiring the associated road sections of each traffic road section, taking the first traffic observation data of the associated road section and the second observation data of each traffic road section and the road network transfer entropy matrix as samples, specifically includes: Acquire the associated path of each traffic section to obtain the first traffic observation data of the associated section in a preset first number of time periods and the road network transfer entropy matrix as input vectors; Acquire second observation data of each traffic section in a preset second time period after the prediction moment as the output vector of the sample; Determine samples of the dynamic graph convolutional neural network based on the input vector and the output vector, and divide the samples based on a preset ratio to obtain training samples, verification samples, and evaluation samples; Iteratively training the dynamic graph convolutional neural network according to the training sample and the verification sample specifically includes: Setting initial parameters of a dynamic graph convolutional neural network; wherein the initial parameters include: spatial attention mechanism parameters, graph convolutional network parameters, and long short-term memory network parameters; Inputting the input vector of the training sample into the dynamic graph convolutional neural network to obtain a model output corresponding to the input vector of the training sample based on the forward propagation of the dynamic graph convolutional neural network; Based on the model output and the output vector of the training sample, determine the loss value of the dynamic graph convolutional neural network, update the initial parameters by backpropagation according to the loss value, evaluate the performance of the dynamic graph convolutional neural network according to the verification sample, and adjust the hyperparameters of the dynamic graph convolutional neural network based on the evaluation results; Determine an updated dynamic graph convolutional neural network corresponding to the adjusted initial parameters and hyperparameters, and iteratively train the updated dynamic graph convolutional neural network based on the training samples and the verification samples to obtain a trained dynamic graph convolutional neural network; Among them, the feature extraction of the road section information is performed according to the causal association module to calculate the transfer entropy between any two road sections, and determine the road network transfer entropy matrix corresponding to the historical urban area prediction time, specifically including: Extracting features from the road section information according to the causal association module to determine feature data corresponding to each of the road section information; The transfer entropy between any two road sections is calculated according to the preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period; Combine the transfer entropies between any two road sections in each window time period to obtain the initial road network transfer entropy matrix in each window time period; Determining an initial road network transfer entropy matrix at the prediction time according to the window time period corresponding to the prediction time; Symmetrically processing the initial road network transfer entropy matrix to obtain the road network transfer entropy matrix corresponding to the historical urban area prediction time; The transfer entropy between any two road sections is calculated according to the preset sliding window strategy to obtain the transfer entropy between any two road sections in each window time period, specifically including: According to the prediction target of the urban area to be predicted, the sliding window parameters of the preset sliding window are defined; wherein the prediction target includes: short-term prediction, long-term prediction, and specific time prediction; the sliding window parameters include: window width and window moving step length; Based on the window width and the window moving step length, determining each window time period corresponding to the road section information corresponding to each traffic road section; wherein the road section information is time series information; The preset sliding window is moved according to the window moving step to extract the section information of the traffic section in the window within each window time period, and the transfer entropy between any two sections within each window time period is calculated and determined based on the probability distribution estimation.
2. The method for predicting the diffusion pattern of urban traffic congestion according to claim 1, characterized in that: Before inputting the section information of each traffic section determined based on the traffic information of the historical urban area and the traffic congestion index into the initial prediction model, the method further includes: Collecting initial traffic information corresponding to historical urban areas; wherein the initial traffic information includes: urban road network information, vehicle GPS information and vehicle driving trajectory; Performing data matching according to the latitude and longitude data corresponding to each of the initial traffic information to determine the initial traffic information matched by each traffic section in the historical urban area; Performing data cleaning on the initial traffic information matched by each traffic section to obtain the traffic information of each traffic section in the historical urban area; Based on the traffic information, an average speed and a free flow speed of each traffic section within a preset time period are determined, so as to determine a traffic congestion index of each traffic section according to the average speed and the free flow speed.
3. The method for predicting the diffusion pattern of urban traffic congestion according to claim 1, characterized in that: Determine whether the trained dynamic graph convolutional neural network meets the requirements based on the evaluation sample, specifically including: Inputting the evaluation sample into the trained dynamic graph convolutional neural network to obtain an output result corresponding to the evaluation sample; Based on preset evaluation indicators, the output results corresponding to the evaluation samples are evaluated to obtain evaluation values corresponding to the preset evaluation indicators; wherein the preset evaluation indicators include: mean absolute error, root mean square error and weighted mean absolute percentage error; The evaluation values corresponding to the preset evaluation indicators are weighted to determine the evaluation value of the trained dynamic graph convolutional neural network, and based on the evaluation value and the preset evaluation threshold, it is determined whether the prediction model corresponding to the trained dynamic graph convolutional neural network meets the requirements.
4. The method for predicting the diffusion pattern of urban traffic congestion according to claim 1, characterized in that: After inputting the road section information of each traffic section of the urban area to be predicted and the traffic congestion index into the prediction model corresponding to the trained dynamic graph convolutional neural network to determine the congestion diffusion mode of the urban area to be predicted according to the output result, the method further includes: Analyze the output result to obtain the traffic congestion index corresponding to each traffic section corresponding to the preset second time period; Based on a preset visualization tool, a traffic congestion index corresponding to each traffic section corresponding to a preset second time period is visualized to obtain a visualization result; The congestion diffusion pattern of each traffic section in the urban area to be predicted is determined based on the visualization result.
5. A prediction device for urban traffic congestion diffusion pattern, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-4 above.
6. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can: execute the method described in any one of claims 1 to 4 above.
Citation Information
Patent Citations
Traffic prediction method, system and device based on dynamic space-time diagram convolutional neural network, and medium
CN117218837A