Urban tunnel traffic state prediction system based on deep learning and adaptive decomposition
By constructing an urban tunnel traffic state prediction system based on deep learning and adaptive decomposition, and using induction coils to collect data and perform adaptive signal decomposition and bidirectional spatiotemporal gating unit learning, the system solves the problem of lag in traffic state prediction in urban tunnels, and achieves efficient traffic management and safety assurance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-24
AI Technical Summary
Existing traffic condition prediction models are unable to fully exploit the spatiotemporal evolution patterns in urban tunnels, resulting in lag and instability in the prediction results, which cannot effectively ensure tunnel traffic safety and conduct efficient traffic management.
A traffic state prediction system for urban tunnels based on deep learning and adaptive decomposition is constructed. Data is collected through induction coils, and variational constraint signal decomposition is performed using an adaptive t-distribution sparrow search algorithm. Combined with a bidirectional spatiotemporal gating unit learning model, high-quality predictions of traffic flow and average speed are achieved. Traffic state levels are classified through K-means clustering, and prediction data is released in real time.
It enables accurate prediction of traffic conditions in urban tunnels, improves tunnel traffic safety and management efficiency, provides reliable data support, provides decision-making basis for traffic managers, and reduces the training difficulty of prediction models and the risk of getting trapped in local optima.
Smart Images

Figure CN122454748A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and more specifically, to an urban tunnel traffic state prediction system based on deep learning and adaptive decomposition. Background Technology
[0002] With the continuous development of transportation networks, urban tunnels, as key traffic hubs, play a vital role in alleviating urban congestion and improving traffic efficiency. However, compared to ordinary roads, urban tunnels exhibit greater randomness and volatility in traffic flow due to the volatile nature of traffic conditions, limited driver visibility, enclosed spaces, and unique lighting conditions. Therefore, more stringent requirements are placed on the prediction and management of traffic conditions in urban tunnels. Against this backdrop, high-precision traffic condition prediction technology is of great significance for ensuring safe passage through urban tunnels, preventing cascading congestion, and enabling timely traffic management.
[0003] Currently, there are many traffic condition prediction models, such as recurrent neural networks, long short-term memory networks, and radial basis function neural networks. These models can effectively capture the temporal dependencies of traffic flow under general road conditions. However, in the unique and complex environment of urban tunnels, existing models often fail to fully explore their inherent spatiotemporal evolution patterns, leading to lag and instability in the prediction results. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide an urban tunnel traffic state prediction system based on deep learning and adaptive decomposition, which can ensure tunnel traffic safety, prevent chain congestion and achieve efficient traffic management, provide data support for traffic management, and thus achieve a leap from accurate prediction to effective service.
[0005] The technical solution adopted by this invention to solve its technical problem is: constructing an urban tunnel traffic state prediction system based on deep learning and adaptive decomposition, comprising: The data acquisition module is used to acquire average vehicle speed and flow data collected by induction coils set up at the main line of the target city tunnel, entrance and exit ramps and merging and diverging areas, and to build a historical traffic flow dataset. The data processing module is used to determine the parameters of variational constraint signal decomposition, and decompose the time series of traffic flow and average speed into multiple intrinsic mode functions with different center frequencies and finite bandwidths, forming multimodal components. The model building and prediction module is used to build a bidirectional spatiotemporal gating unit based on the Adam gradient descent algorithm to learn the time dependence of modal components and predict the trend of each modal component; The information dissemination module is used to set up real-time traffic status display screens at the entrance of urban tunnels, merging and diverging areas, and upstream diverging points of tunnel entrances, displaying historical and predicted data based on traffic flow and average speed. The data storage module receives traffic flow and average speed data predicted by the model building and prediction module, stores and manages it, supports the querying and export of historical data, and provides data support for traffic management personnel's monitoring and decision-making.
[0006] According to the above scheme, the data acquisition module includes an induction coil detector, which is set at the tunnel main line entrance, the middle of the main line, the main line exit, the entrance ramp, the exit ramp, the upstream of the divergence zone, and the downstream of the merging zone; the induction coil collects historical data of urban tunnel traffic flow and average vehicle speed as input to predict future traffic flow and average vehicle speed time series.
[0007] According to the above scheme, the data processing module uses a sparrow search algorithm with fusion adaptive t-distribution to determine the parameters of variational constraint signal decomposition, and uses the optimized variational constraint signal decomposition method to form multimodal components.
[0008] According to the above scheme, the specific steps of the sparrow search algorithm that integrates adaptive t-distribution are as follows: S1. Pre-set the search range for the optimization penalty factor and the number of decompositions. The penalty factor range is [10, 3000], and the number of decompositions ranges is [2, 100]. Set the number of iterations. S2. Construct a variational problem to minimize the sum of bandwidths of fixed modal components, as shown in the following formula:
[0009] in, For modal functions, For the first k One modal component, For the first k The center frequency of each modal component The Dirac function is represented by *, and the convolution operator is represented by *. Represents the original signal; j It is the imaginary unit, satisfying , t It is a time variable; S3. By introducing a penalty factor α and a Lagrange transformation, the variational problem is transformed into an unconstrained problem, as shown in the following formula:
[0010] in, L Let be a Lagrange function, and be a Lagrange multiplier; S4. Solve using the alternating direction multiplier method, the formula is as follows:
[0011]
[0012] in, n For the number of iterations, For frequency variables, , and They are respectively , , Fourier transform; S5. Calculate the envelope entropy of the intrinsic mode function obtained under the initial parameters, using the following formula:
[0013] in, Let the envelope entropy of the modal components be denoted as . p For the signal probability distribution, m The signal probability distribution; S6. Update the discoverer of the sparrow population, using the following formula:
[0014] in, n The number of iterations; For the first i The sparrow in the first j The position of the dimension; It is a random number in the range of 0 to 1; The maximum number of iterations; This is a warning value; Q These are random numbers that follow a normal distribution. For safety, a value of 0.5 to 1 is generally used. l It is a 1×2 matrix of all ones; S7. The formula for updating the follower's position under the adaptive t-distribution mutation strategy is as follows:
[0015]
[0016] in, For the first n The worst position in the next iteration; For the first n The optimal position in the next iteration; The t-distribution is defined with the number of iterations of the algorithm as the degree of freedom. Indicates the first n At the +1st iteration, the best sparrow is the position of the current optimal solution; S8. Update the position of the vigilant, using the following formula:
[0017] in, These are the step size control parameters; v A random number between -1 and 1; For the first i The fitness value of a sparrow; This represents the worst fitness value globally. To avoid the smallest constant with a denominator of 0; This represents the globally optimal fitness value. S9. Use the updated parameter combination to perform variational constraint signal decomposition, and calculate the envelope entropy of the newly obtained modal components as the new fitness value. S10. When the algorithm reaches the preset maximum number of iterations, it outputs the parameter combination corresponding to the lowest fitness value, which serves as the optimal penalty factor and optimal number of decomposition modes for variational constraint signal decomposition. S11. After obtaining the optimal parameters, the optimized variational constraint signal decomposition method is used in the data processing module to decompose the nonlinear flow and velocity time series into multiple modal components.
[0018] According to the above scheme, in the model construction and prediction module, the model includes a forward modal component spatiotemporal gating unit, a backward modal component spatiotemporal gating unit, and an input-output layer. The forward modal component spatiotemporal gating unit and the backward modal component spatiotemporal gating unit are respectively connected to the output layer.
[0019] According to the above scheme, the specific process of model construction is as follows: S1. The first step in the parameter iteration of the Adam gradient descent algorithm is to calculate the first-order moment estimate, as shown in the following formula:
[0020] in, n For the number of iterations, This is a first-order moment estimate; The exponential decay rate of the first moment is taken as 0.9; For the first n Parameters at the next iteration θ The gradient; S2. Calculate the second moment estimate, using the following formula:
[0021] in, S For second-order moment estimation, The exponential decay rate of the second moment is taken as 0.999; S3. Deviation Correction: This compensates for deviations in the first and second moments. The formula is as follows:
[0022] in: This is the first-order moment estimate after bias correction. This is the second-order moment estimate after bias correction; S4, weight and bias parameter updates, the formulas are as follows:
[0023] in, These are the parameters to be optimized. To prevent the smallest constant with a denominator of 0; S5. The modal component spatiotemporal gating unit learns the time dependency and calculates the reset gate, using the following formula:
[0024] in, The gate output is reset at time t; The sigmoid function constrains the data to the range of 0 to 1. To reset the weight matrix of the gate; The output of the hidden unit is set at time t-1; This is the input for the current moment; S6. Update gate calculation, the formula is as follows:
[0025] in, Update the gate output at time t; To update the weight matrix of the gate; S7. Output the memory information of the hidden unit, using the following formula:
[0026] in, Let be the output of the hidden unit at time t; tanh is the activation function that constrains the data to the range of -1 to 1. The weights learned by the hidden units; S8. Cell state update, the formula is as follows:
[0027] S9. The output layer of the bidirectional spatiotemporal gating unit integrates forward and backward information to predict modal components, as shown in the following formula:
[0028] in, To predict modal components; The weight matrix; Forward output; This is the output for the backward direction; For bias terms; These are the predicted modal components; S10. Reconstruct all predicted modal components at their corresponding time points and superimpose them to obtain the final traffic flow sequence. With average velocity time series The formula is as follows: ,
[0029] in, For the first k Traffic flow modal components For the first k One average velocity mode component.
[0030] According to the above scheme, the traffic status level of the information release module is based on the historical traffic flow and average speed data of the previous four days. The distance between samples is calculated by K-means clustering algorithm and cluster centers are dynamically divided to achieve adaptive classification of traffic status categories, specifically divided into four levels.
[0031] According to the above scheme, the four levels of traffic status categories are as follows: (1) Level 1 traffic condition: The Euclidean distance between the predicted data and the cluster center of the traffic flow is the smallest, which corresponds to the state of smooth tunnel traffic flow and high traffic efficiency. (2) Secondary traffic state: The Euclidean distance between the predicted data and the cluster center of the dense traffic flow state is the smallest, which corresponds to the state of increased tunnel traffic flow load and decreased vehicle speed; (3) Level 3 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the slow traffic conditions is the smallest, corresponding to the state where the tunnel traffic flow is close to saturation and the vehicle speed is significantly reduced; (4) Level 4 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the congestion is the smallest, corresponding to the tunnel traffic flow being oversaturated and the vehicle speed being extremely low.
[0032] According to the above scheme, the core computational process of the K-means clustering algorithm includes five steps: cluster center initialization, sample distance calculation and cluster allocation, cluster center iterative update, iteration termination, and traffic state determination. Specifically: S1, in the historical traffic flow and average speed dataset Internal random k One sample is used as the starting cluster center. ,in k =4, corresponding to level four traffic conditions. , for the first j The flow and velocity characteristic values of the initial cluster center; S2. Calculate the remaining samples in the dataset. arrive k The Euclidean distance between the centers of each cluster is used to assign them to the nearest cluster according to the nearest neighbor principle;
[0033] in, For the first i The first historical sample and the first j The Euclidean distance between the centers of each cluster For the first i Traffic flow and average vehicle speed of a historical sample; For the first j Traffic flow / average speed at the center of each cluster; S3. Calculate the mean of flow rate and average velocity for all samples within each cluster, and use this as the new cluster center. The formula is:
[0034]
[0035] in, For the first t After +1 iterations, the... j The flow and speed of each cluster; For the first j Number of samples within each cluster; No. j A sample set of each cluster; S4. Repeated sample cluster allocation and cluster center update steps until the change in cluster center position is less than a preset threshold. Or, it reaches the maximum number of iterations, i.e., satisfies:
[0036] S5. Determine the Euclidean distance between the predicted data and the cluster centers of each level. The traffic state corresponding to the smallest Euclidean distance is the traffic state at the prediction time, as shown in the following formula:
[0037] in, To predict traffic state samples and the first j Euclidean distance of the cluster centers of traffic conditions at each level; The predicted average traffic flow over the tunnel over 5 minutes; The predicted average speed of the tunnel over 5 minutes; For the first j Traffic flow at the core of a traffic status cluster; For the first j The average speed of the traffic state cluster center; jThese are traffic status level numbers, corresponding to traffic status levels one through four.
[0038] According to the above scheme, the information release module calculates the traffic status weight of the tunnel mainline, and the traffic display screen mainly releases the traffic flow status information of the tunnel mainline. A weighted average algorithm is used to comprehensively evaluate the traffic status of the tunnel mainline. The traffic status of the tunnel mainline is calculated by weighted average based on the traffic flow and average vehicle speed data collected from the mainline cross-section. The calculation formulas for the traffic flow and average vehicle speed of the tunnel mainline are as follows:
[0039]
[0040] in, For a moment t Traffic flow on the main tunnel line at that time; For the first i The weight of the induction coils on the main line; For the first i The traffic flow collected by induction coils on the main line, in the formula Let be the average speed of vehicles on the tunnel mainline at time t; For the first i The weight of each region; For the first i The average speed of vehicles collected by the induction coils on the main line.
[0041] The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition of the present invention has the following beneficial effects: 1. This invention deploys induction coils at key locations along the main line, ramps, and merging / diverting zones of urban tunnels to collect traffic flow and average speed data for traffic condition prediction. These induction coils cover the entire process of traffic flow from inflow, through internal movement, to outflow, and can collect steady-state traffic flow and average vehicle speed on the main line, inflow and outflow at ramps, and vehicle interaction data in merging / diverting zones. This enables dynamic perception of the overall traffic condition of urban tunnels and its key nodes, providing reliable data support for traffic condition assessment. 2. This invention utilizes a variational constrained signal decomposition method optimized by integrating an adaptive t-distribution sparrow search algorithm to decompose traffic flow and average vehicle speed data into multiple stable modal components, thereby achieving noise reduction of the data and obtaining high-quality, highly stable data to fully leverage the performance of the prediction model and improve the effectiveness of data preprocessing. 3. This invention employs a bidirectional spatiotemporal gating unit as the core prediction model. Its structure can simultaneously learn forward and backward temporal dependencies, thereby more comprehensively capturing traffic state patterns and improving prediction accuracy. To ensure efficient training, the Adam optimization algorithm is introduced to adaptively update model parameters, effectively solving the problems of slow training and susceptibility to local optima in traditional methods. 4. This invention adaptively determines the classification of traffic status levels based on cluster analysis and publishes status information such as "smooth traffic, dense traffic, slow traffic, and congestion" accordingly. At the same time, it publishes tunnel traffic flow status, specific congestion locations, or average vehicle speed information based on the different locations of the display screens. This can provide decision support for drivers and traffic managers and improve the efficiency of urban tunnel traffic and driving safety. 5. This invention integrates the data acquisition module, data processing module, model building and prediction module, and information dissemination module into a collaborative whole, realizing the prediction and proactive intervention of traffic conditions, and storing the predicted data to provide data support for long-term traffic analysis and management decision optimization, thereby improving the efficiency and safety of urban tunnel traffic. Attached Figure Description
[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart illustrating the urban tunnel traffic state prediction system based on deep learning and adaptive decomposition of the present invention. Figure 2 This is a schematic diagram of the urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to the present invention. Figure 3 This is a schematic diagram of the real-time traffic display screen outside the urban tunnel of the present invention; Figure 4 This is a schematic diagram of the real-time traffic display screen inside an urban tunnel according to the present invention; Figure 5 This is a schematic diagram of the variational constraint signal decomposition method optimized by the sparrow search algorithm based on the adaptive t-distribution of the present invention; Figure 6 This is a schematic diagram of the variational constraint signal decomposition traffic flow method of the present invention; Figure 7 This is a schematic diagram of the modal component spatiotemporal gating unit of the present invention; Figure 8 This is a schematic diagram of the bidirectional spatiotemporal gating unit based on the Adam gradient descent algorithm of this invention; In the image: 1. Real-time traffic display screen outside the city tunnel; 2. Induction coil; 3. Real-time traffic display screen inside the city tunnel. Detailed Implementation
[0043] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0044] like Figure 1-8 As shown, the urban tunnel traffic state prediction system based on deep learning and adaptive decomposition of the present invention includes a data acquisition module, a data processing module, a model building and prediction module, an information dissemination module, and a data storage module. These modules work collaboratively to achieve the prediction, dissemination, and storage of future traffic flow states.
[0045] The data acquisition module is used to obtain average vehicle speed and flow data collected by induction coils deployed at the main line, entrance / exit ramps, and merging / diverging areas of the target city's tunnels, constructing a historical traffic flow dataset. The module uses traffic flow and average vehicle speed data from the previous four days to predict the traffic flow and average vehicle speed data for the following day, with a time granularity of five minutes. The specific locations and functions of the induction coils are as follows: (1) Main tunnel Mainline entrance section: Induction coils are deployed at 5%–10% of the total length of the tunnel mainline. This location is used to collect stable initial traffic flow data after vehicles have completed speed adjustments, serving as the input benchmark for the mainline status; Mid-section of the main tunnel: Induction coils are deployed at approximately 50% of the total length of the main tunnel. This location is least affected by entrance and exit effects and is used to monitor the steady-state characteristics of traffic flow inside the tunnel.
[0046] Main tunnel exit section: Induction coils are installed at 85%–90% of the total length of the tunnel main line. This location is used to monitor the final state of vehicles before they exit the tunnel main line.
[0047] (2) Tunnel ramps: entrance ramps and exit ramps: induction coils are evenly distributed in the geometric center of the ramps. This location can reduce local speed interference at the start and end points of the ramps, and the collected flow and speed data can reflect the real-time traffic efficiency and traffic flow status at the ramps.
[0048] (3) Diversion and merging zones Diverging Zone: Induction coils are deployed 50-100 meters upstream of the diverging nose where the main lanes begin to separate. This location is used to detect lane-changing disturbances and speed changes caused by vehicle divergence. Merging zone: Induction coils are placed 50-100 meters downstream of where the traffic on the ramp and the main line completely merge. This location is used to collect data on the mixed traffic flow.
[0049] The data processing module employs a sparrow search algorithm incorporating an adaptive t-distribution to determine the parameters for variational constraint signal decomposition. Using an optimized variational constraint signal decomposition method, the time series data of traffic flow and average speed are decomposed into multiple intrinsic mode functions with different center frequencies and finite bandwidths, forming relatively stable multimodal components. The specific steps are as follows: S1. Set initial parameters. The adaptive t-distribution sparrow search algorithm requires pre-setting the optimization penalty factor and the search range for the number of decompositions. The penalty factor ranges from [10, 3000], and the number of decompositions ranges from [2, 100]. Set the number of iterations.
[0050] S2. Construct a variational problem. Construct a variational problem to minimize the sum of bandwidths of fixed modal components:
[0051] in, It is a modal function. It is the k-th modal component. It is the center frequency of the k-th modal component. The Dirac function is represented by *, and the convolution operator is represented by *. Represents the original signal j It is the imaginary unit, satisfying , t It is a time variable.
[0052] S3, Variational Problem with Transformation: Introducing a Penalty Factor α The Lagrange transformation transforms a variational problem into an unconstrained problem.
[0053]
[0054] in, L For Lagrange functions, For Lagrange multipliers; S4. Solve the variational problem. Use the alternating direction multiplier method:
[0055]
[0056] in, n For the number of iterations, , and They are respectively , , Fourier transform.
[0057] S5. Use the envelope entropy as the fitness function. Calculate the envelope entropy of the intrinsic mode functions obtained under the initial parameters:
[0058] in, Let the envelope entropy of the modal components be denoted as . p For the signal probability distribution, m This represents the signal probability distribution. S6. Update the discoverer of the sparrow population, using the following formula: in, n The number of iterations; For the first i The sparrow in the first j The position of the dimension; It is a random number in the range of 0 to 1; The maximum number of iterations; This is a warning value; Q These are random numbers that follow a normal distribution. For safety, a value of 0.5 to 1 is generally used. L It is a 1×2 matrix of all ones.
[0059] S7. The formula for updating the follower's position under the adaptive t-distribution mutation strategy is as follows:
[0060] in, This represents the worst-case position in the nth iteration. This represents the optimal position in the nth iteration. Let t be a t-distribution with the number of iterations of the algorithm as the degree of freedom. Indicates the first n At the +1st iteration, the best sparrow is the position of the current optimal solution; S8. Update the position of the vigilant, using the following formula:
[0061] in, These are the step size control parameters; v A random number between -1 and 1; For the first i The fitness value of a sparrow; This represents the worst fitness value globally. To avoid the smallest constant with a denominator of 0; This represents the globally optimal fitness value.
[0062] S9. Update fitness. Perform variational constraint signal decomposition using the updated parameter combination, and calculate the envelope entropy of the newly obtained modal components as the new fitness value.
[0063] S10. Optimal Parameter Output. When the algorithm reaches the preset maximum number of iterations, it outputs the parameter combination corresponding to the lowest fitness value, which serves as the optimal penalty factor and optimal number of decomposition modes for variational constraint signal decomposition.
[0064] S11. Multimodal component generation. After obtaining the optimal parameters, the optimized variational constrained signal decomposition method is used in the data processing module to decompose the nonlinear flow and velocity time series into multiple modal components.
[0065] The model building and prediction module is used to construct a bidirectional spatiotemporal gating unit based on the Adam gradient descent algorithm to learn the time dependencies of modal components and predict the trends of each modal component. In this module, the traffic flow time dependencies are extracted from the multiple modal component inputs using the bidirectional spatiotemporal gating unit based on the Adam gradient descent algorithm. This efficiently solves the problems of slow training and susceptibility to local optima in bidirectional spatiotemporal gating units. The model mainly consists of a forward modal component spatiotemporal gating unit, a backward modal component spatiotemporal gating unit, and an input-output layer. The two modal component spatiotemporal gating units are connected to the output layer. The specific process is as follows: S1. The first step in the parameter iteration of the Adam gradient descent algorithm is to calculate the first-order moment estimate, as shown in the following formula:
[0066] in, n For the number of iterations, This is a first-order moment estimate; The exponential decay rate of the first moment is taken as 0.9; For the first n Parameters at the next iteration θ The gradient.
[0067] S2. Calculate the second moment estimate:
[0068] in, For second-order moment estimation, The exponential decay rate of the second moment is taken as 0.999.
[0069] S3. Deviation correction: Compensate for deviations in the first and second moments.
[0070] in: This is the first-order moment estimate after bias correction. Second-order moment estimate after bias correction S4, Weight and Bias Parameter Update:
[0071] in, These are the parameters to be optimized. To prevent the smallest constant with a denominator of 0; S5. The learning time dependency of the modal component spatiotemporal gating unit requires the calculation of the reset gate first:
[0072] in, for t The output of the gate is reset at all times; The sigmoid function can constrain data between 0 and 1; To reset the weight matrix of the gate; for t -1 hides the unit's output; This is the input for the current moment.
[0073] S6. Update gate calculation:
[0074] in, Update the gate output at time t; To update the weight matrix of the gate.
[0075] S7. Output the memory information of the hidden unit:
[0076] in, for t The output of the hidden unit is always hidden; tanh is the activation function that can constrain the data to the range of -1 to 1. The weights learned by the hidden unit.
[0077] S8, Unit Status Update:
[0078] S9. Modal component prediction. The output layer of the bidirectional spatiotemporal gating unit integrates forward and backward information to predict modal components:
[0079] in, To predict modal components; The weight matrix; Forward output; This is the output for the backward direction; For bias terms; These are the predicted modal components.
[0080] S10. Traffic flow sequence reconstruction. All predicted modal components are reconstructed at their corresponding time points and superimposed to obtain the final traffic flow sequence. With average velocity time series : ,
[0081] in, For the first k Traffic flow modal components For the first k One average velocity mode component.
[0082] The information dissemination module is used to set up real-time traffic status display screens at urban tunnel entrances, merging and diverging areas, and upstream diverging points of tunnel entrances, displaying historical and predicted data based on traffic flow and average speed. The traffic status levels in the information dissemination module are based on historical traffic flow and average speed data from the previous four days. The K-means clustering algorithm is used to calculate the distance between samples and dynamically divide cluster centers, achieving adaptive classification of traffic status categories, specifically into four levels: (1) Level 1 traffic condition: The Euclidean distance between the predicted data and the cluster center of the traffic flow is the smallest, which corresponds to the state of smooth tunnel traffic flow and high traffic efficiency. (2) Secondary traffic state: The Euclidean distance between the predicted data and the cluster center of the dense traffic flow state is the smallest, which corresponds to the state of increased tunnel traffic flow load and decreased vehicle speed; (3) Level 3 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the slow traffic conditions is the smallest, corresponding to the state where the tunnel traffic flow is close to saturation and the vehicle speed is significantly reduced; (4) Level 4 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the congestion is the smallest, corresponding to the tunnel traffic flow being oversaturated and the vehicle speed being extremely low.
[0083] The above four-level traffic status classification uses historical data from the previous four days as clustering samples, and the five-minute traffic flow / average speed data output by the model building and prediction module is used to match the traffic status level. In practical applications, new samples can be added to the clustering model to achieve dynamic updates of cluster centers.
[0084] The core computational process of the K-means clustering algorithm includes five stages: cluster center initialization, sample distance calculation and cluster assignment, cluster center iterative update, iteration termination, and traffic status determination. S1. Cluster center initialization. This is done using the historical traffic flow / average speed dataset. Internal random k One sample is used as the starting cluster center. .in k =4, corresponding to level four traffic conditions. , for the first j The flow and velocity characteristic values of an initial cluster center.
[0085] S2. Sample cluster allocation. Calculate the remaining samples in the dataset. arrive k The Euclidean distance between the centers of each cluster is used to assign them to the nearest cluster according to the nearest neighbor principle.
[0086]
[0087] in, For the first i The first historical sample and the first j The Euclidean distance between the centers of each cluster For the first i Traffic flow and average vehicle speed of a historical sample; For the first j Traffic flow / average speed at the center of each cluster.
[0088] S3. Cluster Center Iterative Update. For each cluster, calculate the mean of the flow rate and average velocity for all samples, and use this as the new cluster center. The formula is:
[0089]
[0090] in, For the first t After +1 iterations, the... j The flow and speed of each cluster; For the first j Number of samples within each cluster; No. j A set of samples from each cluster.
[0091] S4. Iteration Termination. Repeat the sample cluster allocation and cluster center update steps until the change in cluster center position is less than a preset threshold. Or, it reaches the maximum number of iterations, i.e., satisfies:
[0092] S5. Traffic State Determination. Determine the Euclidean distance between the predicted data and the cluster centers of each level. The traffic state corresponding to the smallest Euclidean distance is the traffic state at the prediction time.
[0093]
[0094] in, To predict traffic state samples and the first j Euclidean distance of the cluster centers of traffic conditions at each level; The predicted average traffic flow over the tunnel over 5 minutes; The predicted average speed of the tunnel over 5 minutes; Traffic flow at the center of the j-th level traffic state cluster; For the first j The average speed of the traffic state cluster center; j These are traffic status level numbers, corresponding to traffic status levels one through four.
[0095] Real-time traffic display screen deployment requirements for information dissemination modules: Real-time traffic display screens on roads outside urban tunnels: Deployed at upstream traffic diversion points and 100–500 meters before the tunnel entrance, using single-column support rods. The lower edge clearance of the display panel should be no less than 5.5 meters. The display panel size should be rectangular, with a recommended long side range of 1.2-1.8 meters and a short side range of 0.8-1.2 meters, with a length-to-width ratio preferably controlled at 3:2. Real-time traffic display screens inside urban tunnels: Deployed 150-250 meters upstream of the main line merging area and 200-300 meters upstream of the diversion area inside the tunnel. These are strip-shaped screens, top-mounted, with a lower edge clearance of no less than 4.5 meters. The display panel should be rectangular, with a recommended long side range of 0.8-1.2 meters and a short side range of 0.4-0.6 meters, with a length-to-width ratio preferably maintained at 2:1.
[0096] The information release module calculates the traffic status weight of the tunnel mainline. The real-time traffic display screens at the upstream traffic diversion point in front of the tunnel and in front of the tunnel entrance ramp mainly release the traffic flow status information of the tunnel mainline. A weighted average algorithm is used to comprehensively evaluate the traffic status of the tunnel mainline. For example, the weight coefficients of the mainline entrance, the middle of the mainline, and the mainline exit sections are all set to 1 / 3.
[0097] The traffic status of the tunnel mainline is calculated by weighted averaging of traffic flow and average vehicle speed data collected from each section of the mainline (entrance, middle, and exit). The formulas for calculating traffic flow and average vehicle speed of the tunnel mainline are as follows:
[0098]
[0099] in, For a moment t Traffic flow on the main tunnel line at that time; For the first i The weight of the induction coil on the main line is usually... ; For the first i Traffic flow collected by induction coils on the main line. In the formula... For a moment t The average speed of vehicles on the main tunnel line at that time; For the first iThe weight of each region is usually 1. ; For the first i The average speed of vehicles collected by the induction coils on the main line.
[0100] The information publishing module displays real-time traffic information on the traffic display screen. (1) Real-time traffic display screen at the upstream traffic diversion point in front of the tunnel: It publishes the traffic flow status information of the main tunnel line and the congestion point information in the tunnel. The information published based on the weighted calculation of the main tunnel line traffic flow status is mainly divided into four levels: smooth traffic, orderly passage; dense traffic, keep distance; slow traffic in the tunnel, slow down; congested in the tunnel, detour recommended. The screen will also display the names of specific congestion locations in the tunnel monitored by each induction coil.
[0101] (2) Real-time traffic display screen on the road outside the urban tunnel before the entrance ramp: It publishes traffic status information of the entrance ramp and the average speed of vehicles on the tunnel main line. The traffic status of the entrance ramp is based on the prediction results of the data of the induction coil of the ramp and is divided into four levels: smooth traffic, normal merging; dense traffic, leave a distance; slow traffic, queue and wait; tunnel congestion, drive with caution. At the same time, the average speed of vehicles on the tunnel main line based on weighted calculation will also be displayed at the bottom of the screen.
[0102] (3) Real-time traffic display screens in urban tunnels in the diversion and merging zones: publish traffic status information of the diversion or merging zones. The traffic status is based on the data prediction results of the induction coils in the diversion or merging zones and is divided into four levels, namely: smooth traffic, orderly passage; dense traffic, cautious lane changing; slow traffic, pass in order; congestion ahead, stop changing lanes.
[0103] The data storage module stores and manages the predictive data generated by the system. This module receives real-time 24-hour traffic flow and speed forecasts with time and location identifiers. After receiving the data, it stores it in the database. The database is organized using a time-series data structure, achieving efficient structured storage of the data by establishing a joint index of time and location, forming the system's historical prediction dataset. The module provides a data service interface, allowing users to query and export historical data by time range, monitoring location, and other dimensions. Through these methods, a reliable data foundation is provided for long-term traffic condition analysis and management decisions.
[0104] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A traffic state prediction system for urban tunnels based on deep learning and adaptive decomposition, characterized in that, include: The data acquisition module is used to acquire average vehicle speed and flow data collected by induction coils set up at the main line of the target city tunnel, entrance and exit ramps and merging and diverging areas, and to build a historical traffic flow dataset. The data processing module is used to determine the parameters of variational constraint signal decomposition, and decompose the time series of traffic flow and average speed into multiple intrinsic mode functions with different center frequencies and finite bandwidths, forming multimodal components. The model building and prediction module is used to build a bidirectional spatiotemporal gating unit based on the Adam gradient descent algorithm to learn the time dependence of modal components and predict the trend of each modal component; The information dissemination module is used to set up real-time traffic status display screens at the entrance of urban tunnels, merging and diverging areas, and upstream diverging points of tunnel entrances, displaying historical and predicted data based on traffic flow and average speed. The data storage module receives, stores, and manages traffic flow and average speed data predicted by the model building and prediction module. It also supports the querying and export of historical data, providing data support for traffic management personnel's monitoring and decision-making.
2. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 1, characterized in that, The data acquisition module includes an induction coil detector, which is installed at the tunnel mainline entrance, the middle of the mainline, the mainline exit, the entrance ramp, the exit ramp, the upstream of the divergence zone, and the downstream of the merging zone. The induction coil collects historical data of urban tunnel traffic flow and average vehicle speed as input for rolling prediction of future traffic flow and average vehicle speed time series.
3. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 1, characterized in that, The data processing module uses a sparrow search algorithm with fused adaptive t-distribution to determine the parameters of variational constraint signal decomposition, and uses an optimized variational constraint signal decomposition method to form multimodal components.
4. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 3, characterized in that, The specific steps of the sparrow search algorithm that integrates adaptive t-distribution are as follows: S1. Pre-set the search range for the optimization penalty factor and the number of decompositions. The penalty factor range is [10, 3000], and the number of decompositions ranges is [2, 100]. Set the number of iterations. S2. Construct a variational problem to minimize the sum of bandwidths of fixed modal components, as shown in the following formula: in, For modal functions, For the first k One modal component, For the first k The center frequency of each modal component The Dirac function is represented by *, and the convolution operator is indicated by *. Represents the original signal; j The imaginary unit satisfies , t It is a time variable; S3, Introducing a penalty factor α The Lagrange transformation transforms the variational problem into an unconstrained problem, as shown in the following formula: in, L For Lagrange functions, For Lagrange multipliers; S4. Solve using the alternating direction multiplier method, the formula is as follows: in, n For the number of iterations, , and They are respectively , , Fourier transform; S5. Calculate the envelope entropy of the intrinsic mode function obtained under the initial parameters, using the following formula: in, Let the envelope entropy of the modal components be denoted as . p For the signal probability distribution, m The signal probability distribution; S6. Update the discoverer of the sparrow population, using the following formula: in, n The number of iterations; For the first i The sparrow in the first j The position of the dimension; It is a random number in the range of 0 to 1; The maximum number of iterations; This is a warning value; Q These are random numbers that follow a normal distribution. For safety, a value of 0.5 to 1 is generally used. l It is a 1×2 matrix of all ones; S7. The formula for updating the follower's position under the adaptive t-distribution mutation strategy is as follows: in, For the first n The worst position in the next iteration; For the first n The optimal position in the next iteration; The t-distribution is defined with the number of iterations of the algorithm as the degree of freedom. Indicates the first n The optimal position of the sparrow at +1 iteration; S8. Update the position of the vigilant, using the following formula: in, These are the step size control parameters; v A random number between -1 and 1; For the first i The fitness value of a sparrow; This represents the worst fitness value globally. To avoid the smallest constant with a denominator of 0; This represents the globally optimal fitness value. S9. Use the updated parameter combination to perform variational constraint signal decomposition, and calculate the envelope entropy of the newly obtained modal components as the new fitness value. S10. When the algorithm reaches the preset maximum number of iterations, it outputs the parameter combination corresponding to the lowest fitness value, which serves as the optimal penalty factor and optimal number of decomposition modes for variational constraint signal decomposition. S11. After obtaining the optimal parameters, the optimized variational constraint signal decomposition method is used in the data processing module to decompose the nonlinear flow and velocity time series into multiple modal components.
5. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 1, characterized in that, In the model building and prediction module, the model includes a forward modal component spatiotemporal gating unit, a backward modal component spatiotemporal gating unit, and an input-output layer. The forward modal component spatiotemporal gating unit and the backward modal component spatiotemporal gating unit are respectively connected to the output layer.
6. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 5, characterized in that, The specific process of model construction is as follows: S1. The first step in the parameter iteration of the Adam gradient descent algorithm is to calculate the first-order moment estimate, as shown in the following formula: in, n For the number of iterations, This is a first-order moment estimate; The exponential decay rate of the first moment is taken as 0.9; For the first n Parameters at the next iteration θ The gradient; S2. Calculate the second moment estimate, using the following formula: in, For second-order moment estimation, The exponential decay rate of the second moment is taken as 0.999; S3. Deviation Correction: This compensates for deviations in the first and second moments. The formula is as follows: in: This is the first-order moment estimate after bias correction. This is the second-order moment estimate after bias correction; S4, weight and bias parameter updates, the formulas are as follows: in, These are the parameters to be optimized. To prevent the smallest constant with a denominator of 0; S5. The modal component spatiotemporal gating unit learns the time dependency and calculates the reset gate, using the following formula: in, The gate output is reset at time t; The sigmoid function constrains the data to the range of 0 to 1. To reset the weight matrix of the gate; The output of the hidden unit is set at time t-1; This is the input for the current moment; S6. Update gate calculation, the formula is as follows: in, Update the gate output at time t; To update the weight matrix of the gate; S7. Output the memory information of the hidden unit, using the following formula: in, Let be the output of the hidden unit at time t; tanh is the activation function that constrains the data to the range of -1 to 1. The weights learned by the hidden units; S8. Cell state update, the formula is as follows: S9. The output layer of the bidirectional spatiotemporal gating unit integrates forward and backward information to predict modal components, as shown in the following formula: in, To predict modal components; The weight matrix; Forward output; This is the output for the backward direction; For bias terms; These are the predicted modal components; S10. Reconstruct all predicted modal components at their corresponding time points and superimpose them to obtain the final traffic flow sequence. With average velocity time series The formula is as follows: , in, For the first k Traffic flow modal components For the first k One average velocity mode component.
7. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 1, characterized in that, The traffic status level of the information release module is based on the historical traffic flow and average speed data of the previous four days. It uses the K-means clustering algorithm to calculate the distance between samples and dynamically divide the cluster centers to achieve adaptive classification of traffic status categories, specifically into four levels.
8. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 7, characterized in that, The four levels of the traffic status categories are as follows: (1) Level 1 traffic condition: The Euclidean distance between the predicted data and the cluster center of the traffic flow is the smallest, which corresponds to the state of smooth tunnel traffic flow and high traffic efficiency. (2) Secondary traffic state: The Euclidean distance between the predicted data and the cluster center of the dense traffic flow state is the smallest, which corresponds to the state of increased tunnel traffic flow load and decreased vehicle speed; (3) Level 3 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the slow traffic conditions is the smallest, corresponding to the state where the tunnel traffic flow is close to saturation and the vehicle speed is significantly reduced; (4) Level 4 traffic conditions: The Euclidean distance between the predicted data and the cluster center of the congestion is the smallest, corresponding to the tunnel traffic flow being oversaturated and the vehicle speed being extremely low.
9. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 8, characterized in that, The core computational process of the K-means clustering algorithm includes five steps: cluster center initialization, sample distance calculation and cluster allocation, cluster center iterative update, iteration termination, and traffic state determination. S1, in the historical traffic flow and average speed dataset Internal random k One sample is used as the starting cluster center. ,in k =4, corresponding to level four traffic conditions. , for the first j The flow and velocity characteristic values of the initial cluster center; S2. Calculate the remaining samples in the dataset. arrive k The Euclidean distance between the centers of each cluster is used to assign them to the nearest cluster according to the nearest neighbor principle; in, For the first i The first historical sample and the first j The Euclidean distance between the centers of each cluster For the first i Traffic flow and average vehicle speed of a historical sample; For the first j Traffic flow / average speed at the center of each cluster; S3. Calculate the mean of flow rate and average velocity for all samples within each cluster, and use this as the new cluster center. The formula is: in, For the first t After +1 iterations, the... j The flow and speed of each cluster; For the first j Number of samples within each cluster; No. j A sample set of each cluster; S4. Repeated sample cluster allocation and cluster center update steps until the change in cluster center position is less than a preset threshold. Or, it reaches the maximum number of iterations, i.e., satisfies: S5. Determine the Euclidean distance between the predicted data and the cluster centers of each level. The traffic state corresponding to the smallest Euclidean distance is the traffic state at the prediction time, as shown in the following formula: in, To predict traffic state samples and the first j Euclidean distance of the cluster centers of traffic conditions at each level; The predicted average traffic flow over the tunnel over 5 minutes; The predicted average speed of the tunnel over 5 minutes; For the first j Traffic flow at the core of a traffic status cluster; For the first j The average speed of the traffic state cluster center; j These are traffic status level numbers, corresponding to traffic status levels one through four.
10. The urban tunnel traffic state prediction system based on deep learning and adaptive decomposition according to claim 9, characterized in that, The information publishing module calculates the weighted traffic status of the tunnel mainline. The traffic display screen mainly publishes traffic flow status information of the tunnel mainline. A weighted average algorithm is used to comprehensively evaluate the traffic status of the tunnel mainline. The traffic status of the tunnel mainline is calculated by weighting the traffic flow and average vehicle speed data collected from the mainline cross-section. The calculation formulas for traffic flow and average vehicle speed of the tunnel mainline are as follows: in, For a moment t Traffic flow on the main tunnel line at that time; For the first i The weight of the induction coils on the main line; For the first i The traffic flow collected by induction coils on the main line, in the formula Let be the average speed of vehicles on the tunnel mainline at time t; For the first i The weight of each region; For the first i The average speed of vehicles collected by the induction coils on the main line.