Real-time prediction, regulation and control method for urban traffic jam based on data flow diagram

Through the method based on data flow graph, the traffic data is collected and preprocessed in real time, the traffic network diagram structure is constructed, the traffic pattern and trends are identified, the prediction model is trained, and the traffic lights and vehicle scheduling strategies are optimized, which solves the problem that traditional methods cannot adjust in real time. High-precision traffic flow prediction and congestion relief are achieved.

CN119479265APending Publication Date: 2025-02-18NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 2 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional traffic light control strategies and traffic flow prediction methods cannot be adjusted in real time to adapt to dynamically changing traffic flow, resulting in increased traffic congestion, and the existing vehicle scheduling methods lack real-timeness and cannot be adjusted dynamically to meet actual needs.

Method used

Using a method based on data flow graph, traffic data is collected and preprocessed in real time, a graph structure reflecting the dynamic relationship of the traffic network, identify traffic flow patterns and congestion trends, train traffic flow and congestion prediction models, optimize traffic light control strategies, and dynamically Adjust vehicle scheduling strategy.

Benefits of technology

It realizes high-precision real-time prediction of traffic flow and congestion, improves the flexibility and response speed of traffic light control, reduces the waiting time of intersections, alleviates traffic congestion, and improves the scheduling efficiency of public transportation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479265A_ABST
    Figure CN119479265A_ABST
Patent Text Reader

Abstract

The invention discloses an urban traffic jam real-time prediction, regulation and control method based on a data flow diagram, and relates to the technical field of traffic, and the method comprises the steps: collecting traffic original data in real time, and obtaining a preprocessed traffic data set; the traffic data set is converted into a data flow diagram, and a diagram structure reflecting the dynamic relation between nodes and edges in the traffic network is constructed; identifying a traffic flow mode and a traffic jam trend based on the data flow diagram; constructing a traffic flow and congestion prediction model, and training the traffic flow and congestion prediction model; and performing dynamic prediction based on the data flow diagram, optimizing timing and control strategies of the traffic lights according to a real-time dynamic prediction result, and adjusting a scheduling strategy based on the real-time dynamic prediction result. According to the invention, intelligent management of urban traffic is realized, many defects in the prior art are overcome, and an effective solution is provided for solving the problem of urban traffic congestion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic technology, and in particular to a real-time prediction and control method for urban traffic congestion based on a data flow graph. Background Art

[0002] Traditional traffic light control strategies are mostly based on fixed timing or simple adaptive control, and cannot adjust the timing and control strategies of traffic lights in real time to adapt to dynamically changing traffic flows. This results in the inability to adjust traffic light control in a timely manner when traffic flows suddenly increase, leading to increased congestion at intersections. In addition, existing traffic flow prediction methods mainly rely on statistical analysis of historical data, lack full utilization of real-time data, have limited prediction accuracy, and are difficult to cope with sudden traffic changes.

[0003] In terms of dispatching buses, taxis and shared vehicles, traditional methods often use fixed routes and dispatching strategies that cannot be dynamically adjusted according to real-time traffic conditions and passenger demand. This results in the dispatch of public transportation vehicles failing to meet actual demand during peak hours and when emergencies occur, increasing passenger waiting time and reducing travel experience. At the same time, the distribution and use strategies of shared vehicles also lack real-time performance and cannot be optimized according to real-time traffic flow and user demand, resulting in low vehicle utilization and difficulty in leveraging the advantages of the sharing economy. Summary of the invention

[0004] In view of the above problems existing in the existing vehicle dispatching, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is how to provide a method that can better improve the flexibility and response speed of traffic management.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides a real-time prediction and control method for urban traffic congestion based on a data flow graph, which includes: real-time collection of raw traffic data, and preprocessing to obtain a preprocessed traffic data set; converting the traffic data set into a data flow graph, and constructing a graph structure that reflects the dynamic relationship between nodes and edges in the traffic network; based on the data flow graph, identifying traffic flow patterns and traffic congestion trends; constructing a traffic flow and congestion prediction model, using the nodes and edges in the data flow graph as input features, and using a long short-term memory neural network combined with historical traffic flow data to train the traffic flow and congestion prediction model; inputting the real-time collected traffic data into the traffic flow and congestion prediction model according to a time window, and performing dynamic prediction based on the data flow graph; and optimizing the timing and control strategy of traffic lights according to the real-time dynamic prediction results; real-time monitoring of the location and status of buses, taxis and shared vehicles, and adjusting the scheduling strategy based on the real-time dynamic prediction results.

[0008] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, the original traffic data includes: traffic flow data Q i (t), vehicle speed data V i (t), road congestion data C i (t) and road width data W i ; Construct the original traffic data into an original traffic data set: D = {D i , Q i (t), V i (t), C i (t), W i}.

[0009] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, wherein: the construction of a graph structure reflecting the dynamic relationship between nodes and edges in the traffic network includes: Each road section and intersection in is regarded as a node, and the traffic flow is regarded as an edge, and a traffic network graph G = (V, E) is constructed, where: the node set V = {v i |i=1,2,...,n}, represents each road section and intersection; edge set, represents the traffic flow between nodes; define the node feature vector X v , including the following elements:

[0010]

[0011] in, is the traffic flow data after wavelet transform processing, is the vehicle speed data after wavelet transform processing, C i (t) is the road congestion data, W i is the road width data, E i (t) represents the environmental variable data of the i-th road at time t, B i (t) represents the traffic participant behavior data of the i-th road at time t; define the edge feature vector X e , including the following elements:

[0012] X e =[f ij (t)]

[0013]

[0014] Among them, α ij and β ij are the influence coefficient and attenuation coefficient between roads, η ijk(t) is a multi-scale adjustment function; construct a data flow graph G = (V, E, X v , X e ), reflects the dynamic relationship between nodes and edges in the transportation network through the dynamic update of node and edge feature vectors.

[0015] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, wherein: the identification of traffic flow pattern includes the following steps: based on the data flow graph G=(V, E, X v , X e ), extract node feature vector X v and edge eigenvector X e Traffic flow data in The K-means clustering algorithm is used to cluster traffic flow data. Perform cluster analysis to identify traffic flow patterns; the traffic congestion trend identification process includes:

[0016] The traffic flow data in each cluster is decomposed into time series to obtain the trend component T i (t);

[0017] The autoregressive integrated moving average model is used to model the trend component, and its model expression is:

[0018]

[0019] in, is the autoregressive coefficient, θ 1 ,θ 2 , ..., θ q is the moving average coefficient, ∈ t is white noise; the congestion trend is identified for each clustered traffic flow trend component, the traffic flow change trend in the future period is determined, and the congestion prediction result is generated.

[0020] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, the dynamic prediction based on data flow graph includes the following steps: segmenting the real-time collected traffic data according to a fixed time window Δt, obtaining a traffic data set {D i (t k )|t k = kΔt, k = 0, 1, 2, ..., m}; for each data set D in the time window i (t k ) to preprocess and generate the node feature vector X v (t k ) and the edge eigenvector X e (tk ), and input the traffic flow and congestion prediction model to dynamically predict the future time window (t k , t k+1 , ..., t k+n ) within the time window Δt; the traffic flow and congestion prediction model adopts a hybrid architecture, including a graph neural network layer and a Transformer encoder layer: the graph neural network layer calculates based on the node and edge features within the time window Δt to generate a node representation H (l+1) (t k ); Transformer encoder layer represents the node H based on the output of the graph neural network layer (L) (t k ), calculate the context vector Z i (t k ); the output layer is based on the context vector Z i (t k ) generates a future time window (t k , t k+1 , ..., t k+n Traffic flow and congestion prediction results within Based on the prediction results Identify possible congestion points within future time windows and generate traffic management recommendations.

[0021] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, the timing and control strategy of optimizing traffic lights includes: Determine the traffic light timing adjustment requirements for each intersection; build a traffic light timing optimization model, the goal of which is to minimize the average waiting time W at the intersection and maximize traffic flow as follows:

[0022]

[0023]

[0024] Among them, W i represents the average waiting time at the i-th intersection, Q i (t) represents the traffic flow at the ith intersection, N is the total number of intersections; define the green light duration of the traffic light G i and red light duration R i To optimize the variables, the constraints include that the sum of the duration of the green light and the red light in each signal cycle is equal to the signal cycle T i ,Right now:

[0025] G i +Ri =T i

[0026] Among them, T i is the signal cycle of the ith intersection; a genetic algorithm is used to solve the traffic light timing optimization model; according to the optimal traffic light timing scheme obtained by the solution, the duration of the green and red lights at each intersection is dynamically adjusted; traffic flow and waiting time are monitored in real time, and the traffic light timing scheme is dynamically adjusted according to the monitoring data to ensure that the traffic light timing matches the real-time traffic conditions.

[0027] As a preferred solution of the method for real-time prediction and control of urban traffic congestion based on data flow graph described in the present invention, the method for adjusting the dispatching strategy based on the real-time dynamic prediction results includes the following steps: real-time monitoring of the location and status of buses, taxis and shared vehicles, collecting GPS data, speed data and passenger data of the vehicles, and forming a vehicle status set {V i (t)}, where V i (t) represents the position and state of the i-th vehicle at time t; real-time monitoring of the position and state of buses, taxis and shared vehicles, collection of vehicle GPS data, speed data and passenger data, and formation of a vehicle state set {Vi(t)}, where V i (t) represents the position and state of the i-th vehicle at time t; based on the traffic flow and congestion prediction results, the scheduling strategy of buses, taxis and shared vehicles is optimized; according to the optimized scheduling strategy, the scheduling and routes of buses, taxis and shared vehicles are dynamically adjusted.

[0028] In the second aspect, in order to further solve the problems existing in the existing vehicle dispatching, the embodiment of the present invention provides a real-time prediction and control system for urban traffic congestion based on a data flow graph, which includes:

[0029] The data collection and preprocessing module is used to collect raw traffic data in real time and perform preprocessing to obtain a preprocessed traffic data set; the data flow graph construction module is used to convert the traffic data set into a data flow graph and construct a graph structure that reflects the dynamic relationship between each node and edge in the traffic network; the traffic pattern recognition module is used to identify traffic flow patterns and traffic congestion trends based on the data flow graph; the prediction model construction module is used to construct a traffic flow and congestion prediction model, using the nodes and edges in the data flow graph as input features, and using a long short-term memory neural network combined with historical traffic flow data to train the traffic flow and congestion prediction model; the dynamic prediction and optimization module is used to input the real-time collected traffic data into the traffic flow and congestion prediction model according to the time window, and perform dynamic prediction based on the data flow graph; and according to the real-time dynamic prediction results, optimize the timing and control strategy of traffic lights; the vehicle monitoring and scheduling module is used to monitor the location and status of buses, taxis and shared vehicles in real time, and adjust the scheduling strategy based on the real-time dynamic prediction results.

[0030] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the method for real-time prediction and control of urban traffic congestion based on a data flow graph as described in the first aspect of the present invention.

[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for real-time prediction and control of urban traffic congestion based on a data flow graph as described in the first aspect of the present invention.

[0032] The beneficial effect of the present invention is that the present invention realizes adaptive traffic management by real-time monitoring of traffic flow, vehicle status and waiting time at intersections, combining complex network analysis methods, and continuously adjusting and optimizing traffic signal control and vehicle dispatching strategies. Compared with traditional fixed strategies, the method of the present invention has higher flexibility and response speed, can better cope with dynamically changing traffic conditions, realizes intelligent management of urban traffic, overcomes many defects in the prior art, and provides an effective solution to solve the problem of urban traffic congestion. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0034] Figure 1 The figure is a flow chart of a method for real-time prediction and control of urban traffic congestion based on a data flow graph. DETAILED DESCRIPTION

[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0036] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0037] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0038] Example 1

[0039] Reference Figure 1 , which is the first embodiment of the present invention, and provides a method for real-time prediction and control of urban traffic congestion based on a data flow graph, comprising the following steps:

[0040] S1: Through sensors, cameras and GPS devices installed on urban roads, the original data sets of traffic flow, vehicle speed, road congestion and road width are collected in real time and preprocessed to obtain the preprocessed traffic data set.

[0041] Specifically, sensors, cameras, and GPS devices on vehicles are installed on urban roads to collect raw traffic data in real time. The collected raw traffic data is represented as a set D i , where D i Represents the traffic data of the i-th road.

[0042] Among them, the original traffic data D i It includes the following four elements:

[0043] Traffic flow data i (t), where Q i (t) represents the traffic flow of the ith road at time t:

[0044]

[0045] Among them, N i(t′) represents the number of vehicles passing through the i-th road at time t′, P ij (t′) represents the traffic flow between the ith road and the adjacent jth road, α ij and β ij are the influence coefficient and attenuation coefficient between roads, respectively. N(i) represents the set of roads adjacent to the i-th road.

[0046] Vehicle speed data V i (t), where V i (t) represents the vehicle speed on the ith road at time t:

[0047]

[0048] Among them, w ij represents the weight, x j (t) represents the position of the jth vehicle at time t, γ i is the vehicle speed fluctuation coefficient, T i Indicates the cycle length of the periodic factor;

[0049] Road congestion data C i (t), where C i (t) represents the congestion of the i-th road at time t:

[0050]

[0051] Among them, D i (t′) represents the traffic density of the ith road at time t′;

[0052] Road width data W i , where W i Represents the width of the i-th road:

[0053]

[0054] Among them, W i,0 represents the basic width of the i-th road, δ i is the width adjustment factor, x i is the location variable of the road, L i is the total length of the i-th road.

[0055] The above collected traffic flow data, vehicle speed data, road congestion data and road width data are constructed into the original data set:

[0056] D={D i , Q i (t), V i (t), C i (t), W i}

[0057] Furthermore, the collected original data set is filtered out invalid and noisy data by using median filtering and wavelet transform methods to obtain a preprocessed traffic data set, including the following steps:

[0058] The traffic flow data, vehicle speed data, road congestion data and road width data in the collected original traffic data set D are processed by median filtering to remove outliers and mutation points; the traffic flow data after median filtering and wavelet transform processing is Speed ​​data Road congestion data C i (t) and road width data W i Constructed as a preprocessed traffic dataset as follows:

[0059]

[0060] S2: Convert the preprocessed traffic dataset into a data flow graph, consider each road section and intersection as a node, and traffic flow as an edge, and construct a graph structure that reflects the dynamic relationship between nodes and edges in the traffic network.

[0061] S2.1: Preprocessed traffic dataset Each road section and intersection in is regarded as a node, and the traffic flow is regarded as an edge, and a traffic network graph G = (V, E) is constructed, where:

[0062] Node set V = {v i |i=1, 2, ..., n}, represents each road section and intersection;

[0063] A set of edges, representing the traffic flow between nodes.

[0064] Define the node feature vector X v , including the following elements:

[0065]

[0066] in, is the traffic flow data after wavelet transform processing, is the vehicle speed data after wavelet transform processing, C i (t) is the road congestion data, W i is the road width data, E i (t) represents the environmental variable data of the i-th road at time t, B i (t) represents the traffic participant behavior data of the i-th road at time t.

[0067] Define the edge eigenvector X e, including the following elements:

[0068] X e =[f ij (t)]

[0069] Among them, f ij (t) represents the node v at time t i With node v j The amount of traffic flow between.

[0070] Preferably, the expression of traffic flow is:

[0071]

[0072] Among them, α ij and β ij are the influence coefficient and attenuation coefficient between roads, η ijk (t) is the multi-scale adjustment function.

[0073] Construct a data flow graph G = (V, E, X v , X e ), through the dynamic update of node and edge feature vectors, the dynamic relationship between nodes and edges in the transportation network is reflected. The dynamic update expression of node and edge feature vectors is:

[0074] X v (t+1)=X v (t)+ΔX v (t)

[0075] X e (t+1)=X e (t)+ΔX e (t)

[0076] Where ΔX v (t) and ΔX e (t) represents the change in node and edge feature vectors.

[0077] The degree centrality, betweenness centrality and eigenvector centrality of nodes are calculated through complex network analysis methods, including:

[0078] Centrality(v i )=α·Degeee(v i )+β·Betweenness(v i )+δ·Eigenvector(v i )

[0079] Among them, α, β and δ are weight coefficients, Degree(v i ) represents node v iDegree centrality, Betweenness(v i ) represents node v i The betweenness centrality of Eigenvector(v i ) represents node v i The eigenvector centrality of .

[0080] Furthermore, the specific derivation process is as follows:

[0081] Degree centrality Degree(v i ) is calculated as:

[0082] Degree(v i )=∑ j A ij

[0083] Among them, A ij is node v i With node v i The adjacency matrix elements between indicate whether there is a connected edge;

[0084] Betweenness (v i ) is calculated as:

[0085]

[0086] Among them, σ st represents the number of shortest paths between node s and node t, σ s t(v i ) means passing through node v i The number of shortest paths;

[0087] Eigenvector centrality Eigenvector(v i ) is calculated as:

[0088]

[0089] Among them, λ is the maximum eigenvalue of the graph, A ij is node v i With node v j The adjacency matrix elements between .

[0090] S3: Based on the data flow graph, the K-means clustering algorithm is used to identify traffic flow patterns, and the time series analysis method is used to identify traffic congestion trends.

[0091] S3.1: Based on the data flow graph G = (V, E, X v , X e ), extract node feature vector X v and edge eigenvector Xe Traffic flow data in

[0092] S3.2: Use K-means clustering algorithm to classify traffic flow data Perform cluster analysis to identify traffic flow patterns. The steps are as follows:

[0093] Select the number of clusters k;

[0094] Randomly initialize k cluster centers {μ j |j=1, 2, ..., k};

[0095] For each traffic flow data point Calculate its relationship with all cluster centers μ j The Euclidean distance of:

[0096]

[0097] Assign each traffic flow data point to the nearest cluster center:

[0098]

[0099] Update each cluster center μ j :

[0100]

[0101] Repeat the above steps until the cluster center no longer changes.

[0102] S3.3: Use time series analysis method to identify the trend of traffic flow data in the clustering results. The steps are as follows:

[0103] The traffic flow data in each cluster is decomposed into time series to obtain the trend component T i (t);

[0104] The autoregressive integrated moving average model is used to model the trend component, and its model expression is:

[0105]

[0106] in, is the autoregressive coefficient, θ 1 ,θ 2 , ..., θ q is the moving average coefficient, ∈ t is white noise.

[0107] S3.4: Identify the congestion trend of the traffic flow trend components of each cluster, determine the traffic flow change trend in the future period of time, and generate congestion prediction results.

[0108] S4: Build a traffic flow and congestion prediction model, use the nodes and edges in the data flow graph as input features, use a long short-term memory neural network combined with historical traffic flow data, and train the traffic flow and congestion prediction model. The training process includes multiple iterations to optimize the model parameters.

[0109] S4.1: Take the node feature vector and edge feature vector in the data flow graph as input features and combine them with historical traffic flow data Build traffic flow and congestion prediction models;

[0110] S4.2: Using a hybrid architecture combining graph neural networks and Transformer models to train traffic flow and congestion prediction models:

[0111] The input layer receives node feature vectors, edge feature vectors, and historical traffic flow data;

[0112] The graph neural network layer calculates the node representation H through the following formula ((l+1) :

[0113] H (l+1) =σ(AH (l) W (l) )

[0114] Among them, H (l) represents the node representation of the lth layer, A is the adjacency matrix, W (l) is the weight matrix of the lth layer, σ is the activation function;

[0115] The nodes output by the graph neural network layer are represented as H (l) As input features of the Transformer model;

[0116] The Transformer encoder layer calculates the context vector Z represented by the node through the following formula i :

[0117] Z i = TransformerEncoder(H (L) )

[0118] Among them, the Transformer encoder includes a multi-head self-attention mechanism and a feedforward neural network:

[0119]

[0120] Q=W Q H (L) , K=W K H (L) , V=W V H (L)

[0121] Where Q, K, V represent query, key, and value vectors respectively, and W Q , W K , W V is the trainable weight matrix, d k is the scaling factor;

[0122] The output layer is based on the context vector Z i Generate traffic flow and congestion forecasts

[0123] S4.3: Based on the trained GNN and Transformer hybrid model, the preprocessed traffic dataset Input traffic flow and congestion prediction model to generate traffic flow and congestion prediction results

[0124] S4.4: The training process involves multiple iterations of optimizing the model parameters using the back-propagation algorithm by minimizing the loss function To adjust the model weights and biases, the loss function is defined as:

[0125]

[0126] in, is the congestion prediction result, Q i (t) is the actual congestion result, and N is the number of samples.

[0127] S5: Input the real-time collected traffic data into the traffic flow and congestion prediction model according to the time window, and perform dynamic prediction based on the data flow diagram; and according to the real-time prediction results, optimize the timing and control strategy of traffic lights, and dynamically adjust the green and red light durations of traffic lights.

[0128] Preferably, dynamic prediction based on the data flow graph includes the following steps:

[0129] The real-time collected traffic data is segmented according to a fixed time window Δt, and the traffic data set {D i (t k )|t k =kΔt,k=0,1,2,...,m};

[0130] For each data set D in the time window i (t k ), including traffic flow data, vehicle speed data, road congestion data and road width data, preprocesses and generates node feature vector X v (t k ) and the edge eigenvector X e (tk );

[0131] The preprocessed node feature vector X v (t k ) and the edge eigenvector X e (t k ) Input traffic flow and congestion prediction model, the model dynamically predicts the future time window (t k , t k+1 , ..., t k+n ) and possible congestion points;

[0132] The prediction model adopts a hybrid architecture, including a graph neural network layer and a Transformer encoder layer, as follows: The graph neural network layer calculates based on the node and edge features within the time window Δt to generate a node representation H (l+1 )(t k ); Transformer encoder layer represents the node H based on the output of the graph neural network layer (L) (t k ), calculate the context vector Z i (t k ).

[0133] The output layer is based on the context vector Z i (t k ) generates a future time window (t k , t k+1 , ..., t k+n Traffic flow and congestion prediction results within Based on the prediction results Identify possible congestion points within future time windows and generate traffic management recommendations.

[0134] Furthermore, according to the real-time prediction results, the timing and control strategy of the traffic lights are optimized, and the green and red light durations of the traffic lights are dynamically adjusted, including the following steps:

[0135] Based on traffic flow and congestion prediction results Determine the traffic signal timing adjustment requirements at each intersection;

[0136] Construct a traffic light timing optimization model. The goal of the traffic light timing optimization model is to minimize the average waiting time W at the intersection and maximize the traffic flow. as follows:

[0137]

[0138]

[0139] Among them, Wi represents the average waiting time at the i-th intersection, Q i (t) represents the traffic flow at the ith intersection, and N is the total number of intersections;

[0140] Define the green light duration G of the traffic light i and red light duration R i To optimize the variables, the constraints include that the sum of the duration of the green light and the red light in each signal cycle is equal to the signal cycle T i ,Right now:

[0141] G i +R i =T i

[0142] Among them, T i is the signal period of the i-th intersection.

[0143] Preferably, a genetic algorithm is used to solve the traffic signal timing optimization model, and the specific steps are as follows:

[0144] Initialize the population, each individual represents a set of traffic light timing schemes (G i , R i );

[0145] Calculate the fitness value of each individual. The fitness function is a comprehensive evaluation of the objective function:

[0146]

[0147] Among them, α and β are weight coefficients;

[0148] The selection, crossover and mutation operations generate a new population; the steps of solving the traffic signal timing optimization model using the genetic algorithm are repeated until the termination condition is met.

[0149] Based on the optimal traffic light timing plan obtained, the duration of green and red lights at each intersection is dynamically adjusted; traffic flow and waiting time are monitored in real time, and the traffic light timing plan is dynamically adjusted based on the monitoring data to ensure that the traffic light timing matches the real-time traffic conditions.

[0150] It can be seen that the present invention constructs a data flow graph to comprehensively describe the dynamic relationship between nodes and edges in the urban traffic network, and uses machine learning and deep learning algorithms, especially a hybrid architecture that combines graph neural networks and Transformer models. It can achieve high-precision real-time prediction of traffic flow and congestion. Compared with traditional statistical analysis methods based on historical data, the method of the present invention shows higher prediction accuracy and reliability when dealing with sudden traffic changes.

[0151] S6: Monitor the location and status of buses, taxis, and shared vehicles in real time, and adjust their scheduling strategies based on the prediction results.

[0152] S6.1: Real-time monitoring of the location and status of buses, taxis and shared vehicles, collecting vehicle GPS data, speed data and passenger data, and forming a vehicle status set {V i (t)}, where V i (t) represents the position and state of the i-th vehicle at time t;

[0153] S6.2: Set the vehicle state set {V i (t)} Input traffic flow and congestion prediction model, according to the prediction results Identify vehicles that require adjustment of dispatch strategies;

[0154] S6.3: Optimize the dispatching strategies of buses, taxis and shared vehicles based on traffic flow and congestion prediction results. The specific steps are as follows:

[0155] For buses, the frequency and routes of buses are adjusted based on the prediction results, with the goal of minimizing passenger waiting time and maximizing line capacity;

[0156] For taxis, the empty car dispatch and passenger routes are adjusted based on the prediction results, with the goal of minimizing passenger waiting time and maximizing passenger load factor;

[0157] For shared vehicles, the distribution and use strategies of vehicles are adjusted based on the prediction results, with the goal of minimizing user waiting time and maximizing vehicle utilization;

[0158] S6.4: Dynamically adjust the dispatch and routes of buses, taxis, and ride-sharing vehicles based on the optimized dispatch strategy;

[0159] S6.5: Monitor vehicle status and traffic flow in real time, and dynamically adjust the dispatch strategy based on monitoring data and prediction results to ensure that the dispatch strategy matches the real-time traffic conditions.

[0160] It can be seen that by collecting and processing traffic data in real time, the timing and control strategy of traffic lights are optimized according to the prediction results, and the duration of green and red lights is dynamically adjusted. The method of the present invention can quickly adjust the timing of traffic lights when traffic flow changes suddenly, effectively reduce the average waiting time at intersections, alleviate traffic congestion, and improve traffic efficiency.

[0161] By real-time monitoring of the location and status of buses, taxis and shared vehicles, the vehicle dispatch strategy is optimized based on traffic flow and congestion forecast results. By dynamically adjusting the bus departure frequency and routes, the empty vehicle dispatch and passenger routes of taxis, and the distribution and use strategies of shared vehicles, the waiting time of passengers can be effectively reduced, and the utilization rate of vehicles and the level of travel services can be improved.

[0162] The present embodiment also provides a real-time prediction and control system for urban traffic congestion based on a data flow graph, comprising: a data acquisition and preprocessing module, which is used to acquire raw traffic data in real time and perform preprocessing to obtain a preprocessed traffic data set; a data flow graph construction module, which is used to convert the traffic data set into a data flow graph and construct a graph structure reflecting the dynamic relationship between nodes and edges in the traffic network; a traffic pattern recognition module, which is used to identify traffic flow patterns and traffic congestion trends based on the data flow graph; a prediction model construction module, which is used to construct a traffic flow and congestion prediction model, using the nodes and edges in the data flow graph as input features, and using a long short-term memory neural network combined with historical traffic flow data to train the traffic flow and congestion prediction model; a dynamic prediction and optimization module, which is used to input the real-time collected traffic data into the traffic flow and congestion prediction model according to a time window, and perform dynamic prediction based on the data flow graph; and optimize the timing and control strategy of traffic lights according to the real-time dynamic prediction results; a vehicle monitoring and dispatching module, which is used to monitor the location and status of buses, taxis and shared vehicles in real time, and adjust the dispatching strategy based on the real-time dynamic prediction results.

[0163] This embodiment also provides a computer device, which is suitable for the case of a real-time prediction and control method for urban traffic congestion based on a data flow graph, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the real-time prediction and control method for urban traffic congestion based on a data flow graph as proposed in the above embodiment.

[0164] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0165] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the real-time prediction and control method for urban traffic congestion based on a data flow graph as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0166] In summary, the present invention realizes adaptive traffic management by real-time monitoring of traffic flow, vehicle status and waiting time at intersections, combined with complex network analysis methods, and continuously adjusting and optimizing traffic signal control and vehicle dispatching strategies. Compared with traditional fixed strategies, the method of the present invention has higher flexibility and response speed, can better cope with dynamically changing traffic conditions, realizes intelligent management of urban traffic, overcomes many defects in the prior art, and provides an effective solution to solve the problem of urban traffic congestion.

[0167] Example 2

[0168] Reference Figure 1, which is the second embodiment of the present invention, in order to further verify the beneficial effects of the present invention, experimental data of a real-time prediction and control method for urban traffic congestion based on a data flow graph are provided.

[0169] In the downtown area of ​​a large city, due to the huge traffic flow, serious traffic congestion often occurs, especially during peak hours in the morning and evening, vehicles move slowly, waiting time at intersections is long, and the public transportation system cannot meet the travel needs of residents. In order to effectively alleviate this problem, we selected a 3-kilometer-long road in the core business district of the city for a pilot application, with a time span of one month (January 1, 2024 to January 31, 2024), covering peak hours in the morning and evening and off-peak hours.

[0170] First, high-precision sensors, cameras and vehicle GPS devices were installed on the main roads and intersections in the city center to collect raw data such as traffic flow, vehicle speed, road congestion and road width in real time. All collected data was transmitted to the traffic data processing center via wireless transmission.

[0171] The data processing center performs median filtering and wavelet transform on the original data to filter out invalid and noisy data to ensure the accuracy and completeness of the data.

[0172] Next, the processed traffic data was converted into a data flow graph, in which each road section and intersection was regarded as a node and the traffic flow was regarded as an edge. A graph structure reflecting the dynamic relationship between nodes and edges in the traffic network was constructed. Based on the data flow graph, the K-means clustering algorithm was used to identify traffic flow patterns, and the time series analysis method was used to identify traffic congestion trends.

[0173] Then, the nodes and edges in the data flow graph are used as input features, combined with historical traffic flow data, and a hybrid architecture combining graph neural network and Transformer model is used to train the traffic flow and congestion prediction model. Through multiple iterations to optimize the model parameters, a high-precision traffic flow and congestion prediction model is trained.

[0174] In real-time applications, the collected real-time traffic data is input into the traffic flow and congestion prediction model according to a fixed time window (every 5 minutes). The model dynamically predicts the traffic flow and possible congestion points in the next 15 minutes. According to the real-time prediction results, the timing and control strategy of traffic lights are optimized, the duration of green and red lights is dynamically adjusted, and the location and status of buses, taxis and shared vehicles are monitored in real time, and their scheduling strategies are adjusted based on the prediction results.

[0175] During the pilot application, data before and after the implementation of the traffic management system were compared every day, and key indicators such as traffic flow, vehicle speed, waiting time at intersections, bus punctuality and passenger satisfaction were recorded in detail:

[0176] From January 1 to January 15, 2024, when the system was not activated, the average speed during the morning peak (7:30-9:30) was 20km / h, and the average speed during the evening peak (17:30-19:30) was 18km / h. The average waiting time at major intersections during the morning peak was 120 seconds, and during the evening peak was 150 seconds. The bus punctuality rate was only 75%, and the passenger satisfaction score was 3.2 points (out of 5 points).

[0177] From January 16 to January 31, 2024, after the system is activated, the average speed during the morning peak will increase to 26km / h, and the average speed during the evening peak will increase to 24km / h. The average waiting time at major intersections during the morning peak will be shortened to 85 seconds, and during the evening peak will be shortened to 110 seconds. The bus punctuality rate will increase to 90%, and the passenger satisfaction score will increase to 4.1 points.

[0178] The data show that after the real-time prediction and control method of urban traffic congestion based on data flow graph of the present invention is enabled, the traffic flow is significantly improved, the vehicle speed is significantly increased, the waiting time at the intersection is greatly shortened, and the bus punctuality rate and passenger satisfaction are significantly improved. The specific data are as follows:

[0179] Average vehicle speed (km / h): Morning rush hour: 20 when not enabled, 26 when enabled; Evening rush hour: 18 when not enabled, 24 when enabled.

[0180] Average waiting time (seconds): Morning peak: 120 seconds before activation, 85 seconds after activation; Evening peak: 150 seconds before activation, 110 seconds after activation.

[0181] Bus punctuality rate: 75% before implementation, 90% after implementation; passenger satisfaction (out of 5 points): 3.2 points before implementation, 4.1 points after implementation.

[0182] Through the above detailed scenario description and data comparison, the effectiveness of the present invention has been fully verified, proving that the real-time prediction and control method of urban traffic congestion based on data flow graph has significant advantages in improving traffic management efficiency and alleviating traffic congestion, and can provide intelligent and efficient solutions for urban traffic management.

[0183] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for real-time prediction and control of urban traffic congestion based on data flow graph, characterized in that: include: Collect raw traffic data in real time and preprocess it to obtain preprocessed traffic data sets; Converting the traffic data set into a data flow graph to construct a graph structure reflecting the dynamic relationship between nodes and edges in the traffic network; Based on the data flow graph, identifying traffic flow patterns and traffic congestion trends; Construct a traffic flow and congestion prediction model, use the nodes and edges in the data flow graph as input features, and use a long short-term memory neural network combined with historical traffic flow data to train the traffic flow and congestion prediction model; Input the real-time collected traffic data into the traffic flow and congestion prediction model according to the time window, and make dynamic predictions based on the data flow graph; And based on the real-time dynamic prediction results, optimize the timing and control strategy of traffic lights; Monitor the location and status of buses, taxis and shared vehicles in real time, and adjust scheduling strategies based on real-time dynamic prediction results.

2. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 1, characterized in that: The original traffic data includes: traffic flow data Q i (t), vehicle speed data V i (t), road congestion data C i (t) and road width data W i ; The traffic original data is constructed into a traffic original data set: D = {D i , Q i (t), V i (t), C i (t), W i }.

3. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 2, characterized in that: The construction of a graph structure reflecting the dynamic relationship between nodes and edges in the traffic network includes: The preprocessed traffic dataset Each road section and intersection in is regarded as a node, and the traffic flow is regarded as an edge, and a traffic network graph G = (V, E) is constructed, where: Node set V = {v i |i=1, 2, ..., n}, represents each road section and intersection; edge set, represents the traffic flow between nodes; Define the node feature vector x v , including the following elements: in, is the traffic flow data after wavelet transform processing, is the vehicle speed data after wavelet transform processing, C i (t) is the road congestion data, W i is the road width data, E i (t) represents the environmental variable data of the i-th road at time t, B i (t) represents the traffic participant behavior data of the i-th road at time t; Define the edge eigenvector X e , including the following elements: X e =[f ij (t)] Among them, α ij and β ij are the influence coefficient and attenuation coefficient between roads, η ijk (t) is the multi-scale adjustment function; Construct a data flow graph G = (V, E, X v , X e ), reflects the dynamic relationship between nodes and edges in the transportation network through the dynamic update of node and edge feature vectors.

4. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 3 is characterized in that: The identifying of traffic flow patterns comprises the following steps: Based on the data flow graph G = (V, E, X v , X e ), extract node feature vector X v and edge eigenvector X e Traffic flow data in The K-means clustering algorithm is used to cluster traffic flow data. Conduct cluster analysis to identify traffic flow patterns; The traffic congestion trend identification process includes: The traffic flow data in each cluster is decomposed into time series to obtain the trend component T i (t); The autoregressive integrated moving average model is used to model the trend component, and its model expression is: in, are the autoregressive coefficients, θ1, θ2, ..., θ q is the moving average coefficient, ∈ t is white noise; The congestion trend is identified for each clustered traffic flow trend component, the traffic flow change trend in the future period is determined, and the congestion prediction result is generated.

5. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 4, characterized in that: The dynamic prediction based on the data flow graph comprises the following steps: The real-time collected traffic data is segmented according to a fixed time window Δt, and the traffic data set {D i (t k )|t k =kΔt,k=0,1,2,...,m}; For each data set D in the time window i (t k ) to preprocess and generate the node feature vector X v (t k ) and the edge eigenvector X e (t k ), and input the traffic flow and congestion prediction model to dynamically predict the future time window (t k , t k+1 , ..., t k+n ) and possible congestion points; The traffic flow and congestion prediction model adopts a hybrid architecture, including a graph neural network layer and a Transformer encoder layer: The graph neural network layer calculates the node and edge features within the time window Δt and generates a node representation H (l+1) (t k ); Transformer encoder layer represents the node H based on the output of the graph neural network layer (L) (t k ), calculate the context vector Z i (t k ); the output layer is based on the context vector Z i (t k ) generates a future time window (t k , t k+1, ..., t k+n Traffic flow and congestion prediction results within Based on the prediction results Identify possible congestion points within future time windows and generate traffic management recommendations.

6. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 5, characterized in that: The timing and control strategy for optimizing traffic lights includes: Based on traffic flow and congestion prediction results Determine the traffic signal timing adjustment requirements at each intersection; Construct a traffic light timing optimization model. The goal of the traffic light timing optimization model is to minimize the average waiting time W at the intersection and maximize the traffic flow. as follows: Among them, W i represents the average waiting time at the i-th intersection, Q i (t) represents the traffic flow at the ith intersection, and N is the total number of intersections; Define the green light duration G of the traffic light i and red light duration R i To optimize the variables, the constraints include that the sum of the duration of the green light and the red light in each signal cycle is equal to the signal cycle T i ,Right now: Gx+R i =T i Among them, T i is the signal cycle of the i-th intersection; Genetic algorithm is used to solve the traffic signal timing optimization model; Based on the optimal traffic light timing plan obtained, the duration of green and red lights at each intersection is dynamically adjusted; traffic flow and waiting time are monitored in real time, and the traffic light timing plan is dynamically adjusted based on the monitoring data to ensure that the traffic light timing matches the real-time traffic conditions.

7. The method for real-time prediction and control of urban traffic congestion based on data flow graph as claimed in claim 6, characterized in that: The method of adjusting the scheduling strategy based on the real-time dynamic prediction result comprises the following steps: Real-time monitoring of the location and status of buses, taxis and shared vehicles, collection of vehicle GPS data, speed data and passenger data, and formation of vehicle status collection {V i (t)}, where V i (t) represents the position and state of the i-th vehicle at time t; Real-time monitoring of the location and status of buses, taxis and shared vehicles, collection of vehicle GPS data, speed data and passenger data, and formation of vehicle status collection {V i (t)}, where V i (t) represents the position and state of the i-th vehicle at time t; Optimize dispatching strategies for buses, taxis, and ride-sharing vehicles based on traffic flow and congestion forecasts; Dynamically adjust the scheduling and routes of buses, taxis and shared vehicles based on the optimized scheduling strategy.

8. A real-time prediction and control system for urban traffic congestion based on a data flow graph, based on the real-time prediction and control method for urban traffic congestion based on a data flow graph according to any one of claims 1 to 7, characterized in that: include: The data collection and preprocessing module is used to collect raw traffic data in real time and perform preprocessing to obtain preprocessed traffic data sets; A data flow graph construction module, used to convert the traffic data set into a data flow graph and construct a graph structure reflecting the dynamic relationship between nodes and edges in the traffic network; A traffic pattern recognition module, used for identifying traffic flow patterns and traffic congestion trends based on the data flow graph; The prediction model building module is used to build a traffic flow and congestion prediction model. It uses the nodes and edges in the data flow graph as input features, and uses a long short-term memory neural network combined with historical traffic flow data to train the traffic flow and congestion prediction model. Dynamic prediction and optimization module, which is used to input the real-time collected traffic data into the traffic flow and congestion prediction model according to the time window, and perform dynamic prediction based on the data flow graph; And based on the real-time dynamic prediction results, optimize the timing and control strategy of traffic lights; The vehicle monitoring and dispatching module is used to monitor the location and status of buses, taxis and shared vehicles in real time, and adjust the dispatching strategy based on real-time dynamic prediction results.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for real-time prediction and regulation of urban traffic congestion based on a data flow graph as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for real-time prediction and control of urban traffic congestion based on a data flow graph as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Smart city tunnel traffic emergency supervision internet-of-things large model system and method

    CN122116644A

  • Smart city tunnel traffic emergency supervision internet of things large model system and method

    CN122116644B