A Smart Estimation Method for Urban Road Traffic State Based on Differentiable Physical Representation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-08-14
AI Technical Summary
此类方法虽然尝试在神经网络中引入物理约束,但现有工作主要通过在损失函数中添加物理正则项的方式实现,缺乏从底层结构上对交通物理模型的可微重构
[0033]有益效果:本发明提供的一种基于可微物理表示的城市道路交通状态智能估计方法,通过对传统不可微的交通流模型进行函数近似与结构重构,将其转化为可微的计算图形式,实现物理模型在深度学习框架中的深层嵌入。在此基础上,构建物理-数据混合驱动的估计框架,综合利用交叉口检测器的边界流量信息和路段内部的多源感知数据,实现对感知盲区交通状态的全时空估计,并在训练过程中同步学习自由流速度、阻塞波速度、拥挤密度等关键交通流特性参数。与现有技术相比,本发明具有如下显著优点:
Smart Images

Figure CN121583101B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation and relates to an intelligent estimation method for urban road traffic state based on differentiable physical representation. Background Technology
[0002] Modern urban transportation systems have deployed various sensing devices, including intersection detectors, checkpoint cameras, millimeter-wave radar, and floating car GPS systems, resulting in increasingly abundant traffic perception data. However, due to limitations in device deployment location, coverage area, and sampling frequency, perception blind spots still widely exist in road networks. Intersection detectors provide boundary cross-sectional traffic flow but cannot cover the interior of road segments; floating cars reflect partial trajectories, but their penetration rate is limited. Perception blind spots make it difficult for traffic management departments to fully grasp the operational status of the road network. Therefore, how to utilize multi-source sensing data to estimate traffic conditions in blind spots and reveal operational patterns is a significant challenge for intelligent transportation systems.
[0003] Existing traffic state modeling and estimation methods can be broadly classified into three categories: physical model-based estimation methods, data-driven estimation methods, and fusion estimation methods based on physical information neural networks.
[0004] Physical model-based estimation methods, centered on traffic flow theory, infer traffic conditions within road segments by establishing mathematical models describing the spatiotemporal evolution of vehicles and utilizing boundary observation data. The estimation principle relies on the traffic flow conservation law and wave propagation theory, calculating the traffic state of unobserved areas using analytical solutions or numerical iterations based on upstream and downstream boundary flow information. Typical methods include the characteristic line solution based on LWR partial differential equations, discretized cell transport models, and cumulative curve reconstruction techniques based on Newell envelope theory. These methods rely on traffic flow conservation principles and shock wave theory, utilizing theoretical models such as cumulative vehicle count curves to infer traffic conditions within road segments based on boundary observation data. However, these methods are based on idealized traffic flow assumptions, such as first-in-first-out (FIFO) and steady-state conditions. In complex and variable urban traffic environments, these assumptions are often difficult to meet, leading to significant deviations between model predictions and actual traffic conditions.
[0005] Data-driven estimation methods directly model the observation data collected by existing sensing networks. By learning the spatiotemporal distribution patterns of traffic states in historical observation data, a mapping relationship is established between input observations and target states. The estimation principle is based on statistical inference or machine learning, using a large amount of historical data to train model parameters to predict and interpolate traffic states at unobserved locations or in future times. These methods mainly include ARIMA models based on time series analysis, support vector machines based on kernel methods, random forests using ensemble learning, and deep neural networks (such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and graph neural networks (GNNs). Essentially, these methods model the observable spatiotemporal regions of existing sensing networks, heavily relying on the coverage and distribution characteristics of the training data. For sensing blind spots and spatiotemporal regions not fully covered by training data, the model's generalization ability and estimation reliability are insufficient, making it difficult to achieve accurate estimation of traffic states across all time and space. Furthermore, the internal mechanisms of the model lack physical meaning, have poor interpretability, and cannot reveal the inherent operational laws of traffic flow.
[0006] Fusion estimation methods based on physical information neural networks combine the mechanistic nature of physical models with the flexibility of data-driven approaches, embedding traffic flow physical constraints during neural network training. The estimation principle involves designing loss functions or network structures to ensure the model satisfies physical laws while fitting observed data, achieving synergy between data-driven and physical mechanisms. Implementation methods include adding partial differential equation residuals to the loss function as physical regularization constraints, designing physically aware network layer structures, or employing multi-task learning frameworks to simultaneously optimize data fitting and physical consistency. While these methods attempt to introduce physical constraints into neural networks, existing work primarily achieves this by adding physical regularization terms to the loss function, lacking a fundamental, differentiable reconstruction of the traffic physical model. This shallow fusion approach, while improving estimation performance to some extent, fails to fully leverage the role of physical models in revealing traffic flow patterns and limits the synchronous learning and dynamic optimization of physical parameters. Summary of the Invention
[0007] Purpose of the invention: To address the problems existing in the prior art, this invention aims to provide an intelligent estimation method for urban road traffic conditions based on differentiable physical representation, which can estimate the traffic conditions in blind spots of road segments and simultaneously infer key traffic flow parameters, providing technical support for urban road traffic operation monitoring and signal control optimization.
[0008] Technical Solution: To achieve the above-mentioned objectives, this invention provides an intelligent estimation method for urban road traffic states based on differentiable physical representation, comprising the following steps:
[0009] Based on the arrival and departure cumulative traffic information provided by intersection detectors and checkpoint equipment, road segment boundary conditions are constructed, and multi-source traffic perception inputs are formed by combining the observation data available within the road segment.
[0010] A physics-data hybrid driven model is constructed, combining the data-driven branch and the differentiable physics branch in parallel. In the data-driven branch, a deep learning model is built to learn the mapping relationship between the cumulative flow at the road segment boundary and the traffic state within the road segment. In the differentiable physics branch, the non-differentiable Newell traffic flow model is transformed into a differentiable computational graph structure through function approximation and structural transformation. The data-driven branch and the differentiable physics branch share the same input data and output traffic state estimation results independently.
[0011] A loss function for the hybrid-driven model is constructed to ensure that the data-driven output is consistent with the physical model and to jointly estimate traffic flow parameters. The hybrid model is then optimized and trained to achieve traffic state estimation and obtain traffic flow characteristic parameters.
[0012] Preferably, the input data of the physical-data hybrid driven model includes boundary conditions and internal observation data. The boundary conditions include time series of arrival and departure cumulative curves, extracted from intersection detector data. The internal observation data of the road segment is extracted from multi-source sensing information, including floating car trajectory data and millimeter-wave radar detection data.
[0013] Preferably, the data-driven branch of the deep learning model employs an encoder-decoder framework to process time-series inputs and introduces an attention mechanism to enhance the modeling of the dependency relationship between the input historical state and the output spatial distribution. The encoder compresses the input cumulative traffic time series into a fixed-dimensional vector representation, and the decoder generates a full-space traffic state profile at the target time based on the vector representation. The deep learning model input tensor has the following shape: ,in The time window length is 2, which represents the cumulative arrival-departure sequence. The target output is a discrete profile of the entire space at the predicted time, with the dimension equal to the number of spatial grids.
[0014] Preferably, the encoder employs a single-layer LSTM encoder, progressively updating the hidden state of the input sequence to obtain the encoded representation of each time step, and calculating attention weights to obtain the weighted representation of each time step; aggregation is performed on the time dimension to obtain a context vector, which is used to initialize the decoder; in the decoding stage, a progressively executed LSTM structure is used, processing only one time step at a time, and the hidden state of the previous time step is fed into the LSTM along with the current input to obtain the hidden state of the current step; subsequently, it is mapped to the dimension corresponding to the number of spatial grids through a fully connected layer to obtain the spatial traffic state profile at the target time.
[0015] Preferably, in the differentiable physics branch, the differentiable functional expression of the Newell traffic flow model after transformation is:
[0016]
[0017]
[0018]
[0019]
[0020]
[0021] in, Indicates time, Indicates spatial location, The cumulative number of vehicles at a given time and space point. Let these represent the differentiable cumulative sums of the upper and lower bounds, respectively. These represent the continuous upstream arrival sequence and downstream departure sequence, respectively. and These represent the upstream and downstream times respectively. ,Location Differentiable weight function at point, The length of the time window. For free flow velocity, For blocking wave velocity, For crowding density, For the length of the road segment, This represents the Sigmoid function. For smoothing parameters.
[0022] Preferably, in the physical-data hybrid driven model, the input and supervision targets of the data-driven model are as follows: based on the cumulative arrival curves and cumulative departure curves of the upstream and downstream, a time series input is constructed, and the maximum cumulative value within the window is relativized to form the encoder input sequence of the data-driven model; the relative quantity of the total number of vehicles in the entire space at the end of the window is used as the supervision target, wherein the observation position is provided by multi-source sensing data within the road segment, forming a finite set of observation points; the input of the differentiable physical branch includes the sliding window data of arrival and departure, the discrete grid of the road segment space, and the corresponding relativized reference value.
[0023] Preferably, the loss function of the physical-data hybrid driven model considers both consistency loss and data-driven supervision loss; the consistency loss is expressed as:
[0024]
[0025] in, Represents the set of all space points throughout the time. This indicates data-driven branch output. The physical branch output is represented; the data-driven supervision loss is expressed as:
[0026]
[0027] in, Represent the truth value; the overall objective function is:
[0028]
[0029] in, It is used to make a trade-off between physical mechanism fit and data fit.
[0030] Preferably, the training process of the physical-data hybrid driven model includes: first, pre-training the data-driven branch, wherein only the parameters of the data-driven branch are updated to achieve a stable fit on the supervised target in the whole space, and early stopping is adopted and the optimal weights are saved; then, joint training is performed, wherein the pre-trained weights are loaded and joint forward and joint optimization of the two branches are enabled; the optimizer is applied to the parameters of the two branches respectively, and an adaptive learning rate annealing strategy based on the total loss is used to improve the convergence accuracy in the later stage.
[0031] The present invention also provides a computer system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation.
[0032] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation.
[0033] Beneficial Effects: This invention provides an intelligent estimation method for urban road traffic states based on differentiable physical representation. By approximating and reconstructing the traditional non-differentiable traffic flow model using functions, it transforms the model into a differentiable computational graph, achieving deep embedding of the physical model within a deep learning framework. Based on this, a physics-data hybrid-driven estimation framework is constructed, comprehensively utilizing boundary flow information from intersection detectors and multi-source sensing data within road segments to achieve full-time and spatiotemporal estimation of traffic states in blind spots. During training, key traffic flow characteristic parameters such as free-flow velocity, congestion wave velocity, and congestion density are learned simultaneously. Compared with existing technologies, this invention has the following significant advantages:
[0034] 1. Integration of Differentiable Physical Model and Synchronous Parameter Estimation. This invention transforms the traditional non-differentiable Newell traffic flow model into a backpropagable computational graph, enabling end-to-end joint training with a data-driven network within a unified framework. It simultaneously learns key traffic flow parameters while reconstructing traffic states, eliminating the need for prior independent calibration and significantly improving modeling accuracy and adaptability.
[0035] 2. Hybrid Model Fusion and Traffic Flow Pattern Revelation. The physical-data hybrid driven model constructed in this invention is compatible with multi-source heterogeneous traffic sensing data, fully leveraging the complementary advantages of various data sources. Through deep embedding of differentiable physical computation graphs, it compensates for the dependence of pure physical models on ideal assumptions, while overcoming the insufficient generalization ability of pure data-driven methods in sensing blind spots. Simultaneously, while achieving accurate traffic state estimation, the hybrid model can fully reveal the inherent operational patterns of traffic flow and simultaneously identify key characteristic parameters, providing physically interpretable decision-making basis for traffic management and control. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the overall process of an embodiment of the present invention.
[0037] Figure 2 This is a technical flowchart of an embodiment of the present invention.
[0038] Figure 3 This is a schematic diagram illustrating the approximate differentiable representation of the Newell traffic flow model in an embodiment of the present invention.
[0039] Figure 4 This is a framework diagram of the physical-data hybrid driven model in an embodiment of the present invention.
[0040] Figure 5 This is a graph showing the loss decrease during training phase one (pure LSTM model) in an embodiment of the present invention.
[0041] Figure 6 This is a graph showing the loss decrease during training phase two (hybrid model) in an embodiment of the present invention.
[0042] Figure 7 This is a screenshot of the traffic parameter estimation results of the Newell model in the second stage of the calculation diagram in this embodiment of the invention.
[0043] Figure 8 This is a comparison chart of the performance of various models under different permeability in the embodiments of the present invention. Detailed Implementation
[0044] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0045] To better understand the embodiments of the present invention, the technical terms involved in the embodiments of the present invention are explained below:
[0046] Multi-source traffic sensing data refers to traffic operation data collected by different sensing devices in urban traffic systems, such as intersection detectors, checkpoint cameras, millimeter-wave radar, and floating car GPS.
[0047] Computational graph: A computational structure that represents a mathematical model as a directed graph, where nodes represent computational operations and edges represent data flow, and supports automatic differentiation and backpropagation.
[0048] Traffic state estimation: Using limited observation data, modeling and computational methods are used to infer the traffic operation status of areas that are not directly observed.
[0049] Perception blind spots: Spatial and temporal areas of roads that cannot be directly observed or have sparse observation data due to limitations in the location, coverage, and sampling frequency of sensing devices.
[0050] like Figure 1 As shown in the figure, this invention discloses an intelligent estimation method for urban road traffic state based on differentiable physical representation. First, road segment boundary conditions are constructed based on the arrival and departure cumulative flow information provided by intersection detectors and checkpoint equipment, combined with some observation data (millimeter-wave radar, floating car trajectories, etc.) available within the road segment to form multi-source traffic perception input. Then, a physical-data hybrid driving model is constructed, combining the data-driven branch and the differentiable physical branch in parallel. In the data-driven branch, a deep learning model is constructed to learn the mapping relationship between the cumulative flow at the road segment boundary and the traffic state within the road segment. In the differentiable physical branch, the non-differentiable Newell traffic flow model is transformed into a differentiable computational graph structure through function approximation and structural transformation. The data-driven branch and the differentiable physical branch share the same input data and output traffic state estimation results independently. A loss function for the hybrid driving model is constructed to keep the data-driven output consistent with the physical model and jointly estimate traffic flow parameters. The hybrid model is optimized and trained to achieve traffic state estimation and obtain traffic flow characteristic parameters.
[0051] The present invention provides an intelligent estimation method for urban road traffic state based on differentiable physical representation. It can fully utilize multi-source traffic perception data and, under the AI computing and training framework, estimate the traffic state in the blind spot of road segment perception and simultaneously infer key traffic flow parameters, providing technical support for urban road traffic operation monitoring and signal control optimization.
[0052] For example, Figure 2 The following is a detailed implementation process of an intelligent estimation method for urban road traffic state based on differentiable physical representation, which includes the following steps:
[0053] S1. Input Data and Preliminary State Construction. Obtain license plate data from intersection detectors, construct boundary conditions (cumulative arrival and departure flow curves) for the upstream and downstream of the road segment, and combine multi-source traffic perception data such as floating car trajectories and millimeter-wave radar to form limited observations within the road segment.
[0054] S2. Deep Learning Model Construction. A neural network structure based on sequence modeling is constructed, an encoder-decoder framework is used to process time series inputs, and an attention mechanism is introduced to enhance the modeling of the dependency relationship between the input historical state and the output spatial distribution.
[0055] S3. Construction of a Differentiable Physical Traffic Flow Computational Graph Model. Based on the Newell model, the spatiotemporal evolution relationship of road segment traffic flow is established, and functional approximations and structural transformations are performed on it to transform the original discrete physical model into a differentiable computational graph structure.
[0056] S4. Hybrid Model Construction and Joint Training. A physics-data hybrid driven model is constructed within a unified framework: the data-driven branch constructed in step S2 and the differentiable physical computation graph branch constructed in step S3 are combined in parallel. The two branches share the same input data (boundary conditions and internal observations) and independently output traffic state estimation results, achieving deep fusion through consistency constraints. A joint objective function, including consistency loss and data-driven supervision loss, is defined to optimize and train the hybrid model. During training, limited observation data within road segments are used as supervision to learn the ability to estimate traffic states across all time and space, and traffic flow characteristic parameters (free-flow velocity, congestion wave velocity, congestion density, etc.) are learned synchronously through the physical branch.
[0057] The specific implementation process of step S1 may include:
[0058] S11. Establish a full-time and spatiotemporal grid system. Discretize the research road segment spatially at 1-meter intervals and discretize the time dimension at 1-second intervals to form a refined spatiotemporal grid structure for describing the spatiotemporal distribution of traffic conditions.
[0059] S12. Boundary Condition Data Acquisition. Collect vehicle license plate matching data at the intersection to form two types of records: entry and exit. For the same vehicle, remove duplicates and sort them to obtain entry and exit sequences that can be accumulated.
[0060] S13. Data Acquisition for Internal Road Segment This involves collecting multi-source sensing information within the road segment, including floating car trajectory data and millimeter-wave radar detection data, encompassing vehicle identification, timestamps, and positions along the road segment. The positions are then uniformly shifted from their starting points and truncated to obtain a consistent set of time-location trajectory points. A mapping from license plate numbers to cumulative numbers is established, and trajectories are filtered accordingly, retaining only vehicles appearing in the license plate data to ensure consistency between entry / exit boundaries and internal trajectories.
[0061] S14. Boundary Condition Construction and Preliminary State Reconstruction. Based on license plate matching data, cumulative arrival curves are constructed respectively. Cumulative curve of departure The time series was analyzed; after adding points at the beginning and end of the interval, linear interpolation was used to obtain two time-continuous boundary curves. These two boundary curves were used as deterministic boundary conditions for the upstream and downstream of the road segment, providing anchor points for the subsequent reconstruction of the cumulative vehicle state within the road segment at each time slice.
[0062] S15. At each discrete time point, a segmented polygonal line is formed by combining three types of anchor points: upstream boundary points (from the arrival cumulative curve), the actual location points of floating cars within the road segment (from the floating car trajectory set), and downstream boundary points (from the departure cumulative curve). These anchor points are connected in an orderly manner along the road segment direction, and monotonically linear interpolation is used to reconstruct the spatial profile at that moment, obtaining the cumulative traffic state at that moment. To avoid physical conflicts, discrete points that do not satisfy boundary consistency are removed or corrected. If individual time slices lack internal trajectory points, and the profile obtained solely from the extrapolation of upstream and downstream boundaries has uncertainties, a simplified propagation strategy based on traffic waves or temporal smoothing of adjacent times is used to fill in the temporal continuity and ensure robust reconstruction from a small number of trajectories to the state of the entire road segment. The spatial profiles of each time slice are pieced together one by one to form a complete spatiotemporal traffic state matrix. .
[0063] The specific implementation process of step S2 may include:
[0064] S21. Encoder-Decoder LSTM Model Construction. The encoder-decoder architecture is a sequence-to-sequence neural network structure. The encoder compresses the input cumulative traffic time series into a fixed-dimensional vector representation, and the decoder generates a full-space traffic state profile at the target time based on this vector representation. LSTM (Long Short-Term Memory) networks control the flow of information through three gating mechanisms: the forget gate, the input gate, and the output gate. The forget gate determines what information is discarded from the cell state, the input gate determines what new information is stored in the cell state, and the output gate controls what part is output based on the cell state, thus effectively solving the gradient vanishing problem of traditional recurrent neural networks.
[0065] For each training batch, the model performs the following core computational steps:
[0066] (1) Encoder forward propagation:
[0067]
[0068] in, Represented as the encoder LSTM layer, and Is the encoder at time? The hidden state and cell state, yes Cumulative traffic characteristics after time standardization (including arrival and departure channels).
[0069] (2) Calculation of attention mechanism:
[0070]
[0071] in, It is attention weight. It is the length of the time window. These are the attention weight vector, the attention weight matrix, and the bias vector (learnable parameters). It is the attention energy function.
[0072] (3) Context vector generation:
[0073]
[0074] in, It is a weighted context vector used to initialize the decoder.
[0075] (4) Decoder state update:
[0076]
[0077] in, Represented as the decoder LSTM layer, It is the output from the previous moment. This indicates a vector concatenation operation.
[0078] (5) Output layer mapping:
[0079]
[0080] in, It is a predicted spatial traffic state profile. and These are the output layer parameters.
[0081] S22. Input Organization and Feature Representation. Collect cumulative flow sequences at upstream and downstream boundaries using a fixed-length time window, and assign them to the maximum upstream cumulative flow within the window. Perform a zero-base translation. , Forming two-dimensional feature pairs This relativization process eliminates the dimensional differences in the absolute cumulative values across different time periods, normalizes the input data, and improves the numerical stability of the training.
[0082] The model input tensor shape is ,in 2 represents the time window length, and 2 represents the cumulative arrival-departure sequence. The target output is a discrete profile of the entire space at the predicted time, with dimensions equal to the number of spatial grids. .
[0083] S23. The encoder uses a single-layer LSTM encoder to progressively update the hidden state of the input sequence, obtaining the encoded representation at each time step, and the output is... The time feature sequence, where To hide the dimension size, and at the same time obtain the final As the initial state of the decoder, In hidden state, This is a memory state.
[0084] S24. During the decoding process, an additive attention mechanism is used to calculate the degree of attention of each decoding time step to the encoder at each time step. Specifically, the current hidden state of the decoder and the hidden states of the encoder at each time step are linearly transformed and then summed. The energy score is obtained by mapping the activation function and attention weight vector, and then... Normalization yields the attention weight distribution.
[0085] S25. In the decoding stage, a step-by-step LSTM structure is used, processing only one time step at a time. The hidden state from the previous time step is fed into the LSTM along with the current input to obtain the hidden state for the current step; then it is mapped to the fully connected layer. Dimension, directly obtain the spatial traffic state profile at the target time. During training, a teacher forcing strategy is used, which means that the real target sequence is used as the input to the decoder instead of the predicted output from the previous step. This avoids error accumulation, provides decoder input with the same dimension as the output, accelerates model convergence, and improves training stability.
[0086] The specific implementation process of step S3 may include:
[0087] S31, Basic Expression of the Newell Physical Model. Assume the road segment length is... The upstream cumulative arrival curve is The downstream cumulative departure curve is The free flow velocity is The blocking wave velocity (propagating upstream) is (Physically propagating upstream, indicated by a positive velocity in the formula), the crowding density is... The standard Newell envelope model then represents the cumulative number of vehicles at spatiotemporal points. for:
[0088]
[0089] S32. Based on the cumulative arrival curve obtained in step S1 With cumulative departure curve Interpolate the sequences at equal time intervals to construct a continuous set of upstream arrival sequences and downstream departure sequences. It is stored in tensor form and serves as the boundary condition for the physical model.
[0090] S33, Define free-flow propagation delay With the propagation delay of the blocking wave For each spatial location Two types of time delay indexes are established to describe the time offset of the vehicle cumulative curve.
[0091] S34. Due to time shift in the original model Since it is not differentiable, a continuous approximation is made using a logic function, which has the following form:
[0092]
[0093]
[0094] in, For time, The central position parameter of the Logistic function determines the midpoint of the transition from 0 to 1. The smoothing parameter controls the width of the 0-1 step transition in the Logistic function and can be used as a fixed variable or a parameter to be learned.
[0095] For both upstream free-flow propagation and downstream blocking wave propagation, the center position parameter of their time delay is defined respectively:
[0096]
[0097] in, For vehicles to flow freely from the upstream boundary propagation to location Time delay, To block the wave from the downstream boundary at the wave speed propagation to location The time delay.
[0098] For each Construct differentiable shiftable kernels (time-indexed) count):
[0099]
[0100]
[0101] in, and These represent the upstream and downstream times respectively. ,Location Differentiable weight function at point, It is the length of the time window. for function.
[0102] This leads to the differentiable cumulative sum between the upper and lower bounds:
[0103]
[0104]
[0105] Therefore, the cumulative vehicle count expression of the Newell model can be obtained as a differentiable function. and ,like Figure 3 As shown.
[0106] S35. Encapsulation and output of differentiable computational graphs. Minimum value operations of the Newell envelope remain unchanged:
[0107]
[0108] Will{ Set} as a learnable parameter; Tensor dot product, AND Together they form a differentiable computation graph, supporting automatic differentiation and backpropagation.
[0109] like Figure 4 As shown, the specific implementation process of step S4 may include:
[0110] S41. Data Organization and Batch Input: The data generated in steps S1-S3 is organized into batches that the network can directly use. Based on the cumulative arrival and departure curves of upstream and downstream, a time series input is constructed, and relativized using the maximum cumulative value within the window to form the encoder input sequence of the data-driven model. The decoder is initialized with a zero vector during training. The relative quantity of cumulative vehicles in the entire space at the end of the window is used as the supervision target, where the observation location is provided by multi-source sensing data available within the road segment (such as floating car trajectories, millimeter-wave radar detection, etc.), forming a finite set of observation points. The inputs required for the physical branch are organized, including the sliding window data of arrival and departure, the discrete grid of road segment space, and the corresponding relativized reference values. Finally, the above inputs and supervision targets are uniformly encapsulated into batches and input into the hybrid model framework for subsequent joint training and parameter estimation.
[0111] S42. To connect the physical model and the data-driven model within a unified framework, the following training objective is set, consisting of two parts, with physical error added as a monitoring quantity:
[0112] (1) Consistency loss: in the set of all time space points Above, constraint data drives branch output With the branch of physics The outputs are consistent, using the spatial mean square error (MSE):
[0113]
[0114] (2) Data-driven supervised loss: Constrain the data-driven branch output at all time-space points. With the truth value of reconstruction Consistent, using spatial mean square error:
[0115]
[0116] (3) Overall objective function: The consistency loss and data-driven supervision loss are weighted by coefficients. Weighted summaries are used to form the final optimization objective:
[0117]
[0118] in, It is used to make a trade-off between physical mechanism fit and data fit.
[0119] The objective function described above is used to guide joint training: while ensuring consistency between the two branches, the data-driven branch is supervised by the reconstructed truth value, thereby promoting the accurate reconstruction of traffic conditions in all time and space.
[0120] S43. Two-stage training process and optimization strategy:
[0121] (1) First, perform data-driven branch pre-training: only update the parameters of the data-driven branch so that it can first achieve stable fitting on the supervised target in the whole space. Use early stopping and save the optimal weight to avoid large residuals in the early stage from hindering the physical branch, causing the convergence direction to shift or converge too slowly.
[0122] (2) Then perform joint training: load the pre-trained weights, enable joint forward and joint optimization of the two branches; the optimizer is applied to the parameters of the two branches respectively, and an adaptive learning rate annealing strategy based on total loss (such as reducing the learning rate by stagnation) is used to improve the convergence accuracy in the later stage.
[0123] S44. State Estimation and Parameter Output: During the inference phase, the cumulative curves of upstream and downstream traffic at any given time period and the observation data within the road segment are input. A relative estimate of the cumulative number of vehicles across the entire space is obtained through a hybrid framework, and this is restored to an absolute value using a relativized benchmark. This allows for the estimation of the full-time and spatial-temporal traffic state matrix over time. Simultaneously, key traffic flow parameters learned in the physics branch (such as free-flow velocity, congestion wave velocity, congestion density, and smoothing coefficient) are output as road segment parameter estimates. These parameters can be aggregated and persisted across time periods as needed for subsequent management and control applications.
[0124] Case Study: This invention selects a typical road section in the central urban area of a city as a method example scenario, and uses the SUMO simulation platform to construct a test environment consistent with real traffic conditions. The total length of the road section is approximately 327m, and virtual detectors are set up according to the actual signal timing and lane layout. Taking the observation of some floating car trajectories within the road section as an example, vehicle arrival and departure times and floating car trajectory data are collected.
[0125] Each simulation was set to last 2 hours, and the simulation program was run 7 times to obtain the experimental dataset. The vehicle length was set to 5 meters, and the vehicle acceleration was set to 2.6 m / s². 2 The deceleration is set to 4.5 m / s². 2 The oncoming vehicle probabilities for each road segment were set to 0.25, 0.22, 0.205, 0.19, 0.16, and 0.13 in the seven experiments, respectively. Other parameters used the default traffic flow model parameters of the simulation software. The dataset with an oncoming vehicle probability of 0.205 was selected as the test set, and the remaining datasets were used as the training set.
[0126] The hybrid model was implemented using PyTorch 2.4.1. The experimental environment consisted of an Intel(R) Core(TM) i9-13980HX 2.20GHz processor, 64GB of RAM, an RTX 4080 graphics card, and a Windows system. The optimizer used was Adam, with an initial learning rate of 0.01 and a batch size of 128.
[0127] Hidden Dimensions of Data-Driven Branches The value is 128, the input dimension is 2, and the encoder time window length is... The value is 240. All parameters in the physics branch are trainable: free-flow velocity. Reverse wave speed Blocking density Smoothing coefficient The initial values are set to 20.0, 10.0, 0.20, and -10.0, respectively.
[0128] The loss reduction curve of the reconstructed spatiotemporal traffic state obtained using the method proposed in this invention is shown below. Figure 5 and Figure 6 As shown (floating car trajectory penetration rate is set to 1.0, loss fusion coefficient α = 0.5). The traffic parameters estimated in the second stage are as follows... Figure 7 As shown.
[0129] This study compares the reconstruction accuracy and convergence performance of the Newell model based on a physical model, the purely data-driven Encoder–Decoder LSTM model, and the proposed physical-data-driven hybrid model (fusion coefficient α=0.2) under different trajectory penetration conditions. Experiments were conducted by training the three models at multiple penetration levels (20%, 40%, 60%, 80%, and 100%), and recording their loss functions (MSE) on the test set.
[0130] Table 1. Performance Comparison of Traffic State Estimation Models under Different Penetration Rates
[0131]
[0132] When floating car penetration is low, the physical model Newell outperforms the purely data-driven Encoder-Decoder LSTM model, but its accuracy is inferior to the hybrid model. This indicates that when data volume is insufficient or data quality is poor, the hybrid model can effectively utilize the prior traffic knowledge provided by the physical traffic flow model Newell, thus compensating to some extent for the performance shortcomings of the purely data-driven Encoder-Decoder LSTM model in the case of insufficient data.
[0133] When data penetration is high, the performance of the fusion model may be slightly inferior to that of the pure data-driven method. This is mainly because, with sufficient data, the pure data-driven model can fully explore and learn complex traffic states without relying on the prior constraints provided by the physical traffic model, thus achieving better reconstruction accuracy.
[0134] Figure 8The comparison of traffic state reconstruction performance of the three models under different data penetration rates is presented intuitively: when the data penetration rate is in the range of 20%–70%, the fusion model shows a clear advantage; when the data penetration rate is higher than about 70%, the pure data-driven Encoder-Decoder LSTM model has higher accuracy in state reconstruction.
[0135] This invention also discloses a computer system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation.
[0136] This invention also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation.
[0137] The program code used to implement the method of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the steps of the method of the present invention to be performed. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a standalone software package, or entirely on a remote machine or server. All aspects not detailed in this invention are well-known to those skilled in the art.
Claims
1. A method for intelligent estimation of urban road traffic state based on differentiable physical representation, characterized in that, Includes the following steps: Based on the arrival and departure cumulative traffic information provided by intersection detectors and checkpoint equipment, road segment boundary conditions are constructed, and multi-source traffic perception inputs are formed by combining the observation data available within the road segment. A physics-data hybrid driven model is constructed, combining the data-driven branch and the differentiable physics branch in parallel. In the data-driven branch, a deep learning model is built to learn the mapping relationship between the cumulative flow at the road segment boundary and the traffic state within the road segment. In the differentiable physics branch, the non-differentiable Newell traffic flow model is transformed into a differentiable computational graph structure through function approximation and structural transformation. The data-driven branch and the differentiable physics branch share the same input data and output traffic state estimation results independently. Construct a loss function for the hybrid-driven model to keep the data-driven output consistent with the physical model and jointly estimate traffic flow parameters; The hybrid model is optimized and trained to achieve traffic state estimation and obtain traffic flow characteristic parameters. In the differentiable physics branch, the differentiable functional expression of the Newell traffic flow model is as follows: ; ; ; ; ; in, Indicates time, Indicates spatial location, The cumulative number of vehicles at a given time and space point. Let these represent the differentiable cumulative sums of the upper and lower bounds, respectively. These represent the continuous upstream arrival sequence and downstream departure sequence, respectively. and These represent the upstream and downstream times respectively. ,Location Differentiable weight function at point, The length of the time window. For free flow velocity, For blocking wave velocity, For crowding density, For the length of the road segment, This represents the Sigmoid function. For smoothing parameters; The loss function of the physical-data hybrid driven model considers consistency loss and data-driven supervision loss; the consistency loss is expressed as: ; in, Represents the set of all space points throughout the time. This indicates data-driven branch output. The physical branch output is represented; the data-driven supervision loss is expressed as: ; in, Represent the truth value; the overall objective function is: ; in, It is used to make a trade-off between physical mechanism fit and data fit.
2. The intelligent estimation method for urban road traffic state based on differentiable physical representation according to claim 1, characterized in that, The input data of the physical-data hybrid driven model includes boundary conditions and internal observation data. The boundary conditions include time series of arrival and departure cumulative curves, which are extracted from intersection detector data. The internal observation data of the road segment are extracted from multi-source sensing information, including floating car trajectory data and millimeter-wave radar detection data.
3. The intelligent estimation method for urban road traffic state based on differentiable physical representation according to claim 1, characterized in that, The deep learning model in the data-driven branch uses an encoder-decoder framework to process time-series inputs and introduces an attention mechanism to enhance the modeling of the dependency relationship between the input historical state and the output spatial distribution. The encoder compresses the input cumulative traffic time series into a fixed-dimensional vector representation, and the decoder generates a full-space traffic state profile at the target time based on the vector representation; the deep learning model input tensor has the following shape: ,in The time window length is 2, which represents the cumulative arrival-departure sequence. The target output is a discrete profile of the entire space at the predicted time, with the dimension equal to the number of spatial grids.
4. The intelligent estimation method for urban road traffic state based on differentiable physical representation according to claim 3, characterized in that, The encoder uses a single-layer LSTM encoder to progressively update the hidden state of the input sequence, obtain the encoded representation at each time step, and calculate the attention weights to obtain the weighted representation at each time step. The context vector is obtained by aggregation in the time dimension and used to initialize the decoder. In the decoding stage, an LSTM structure is used to execute stepwise, processing only one time step at a time. The hidden state of the previous time step and the current input are fed into the LSTM to obtain the hidden state of the current step. Then, it is mapped to the dimension corresponding to the number of spatial grids through a fully connected layer to obtain the spatial traffic state profile at the target time.
5. The intelligent estimation method for urban road traffic state based on differentiable physical representation according to claim 1, characterized in that, In the physical-data hybrid driven model, the input and supervision targets of the data-driven model are as follows: based on the cumulative arrival curves and cumulative departure curves of upstream and downstream, a time series input is constructed, and the maximum cumulative value within the window is relativized to form the encoder input sequence of the data-driven model; the relative quantity of the cumulative number of vehicles in the entire space at the end of the window is used as the supervision target, wherein the observation location is provided by multi-source sensing data within the road segment to form a finite set of observation points; The inputs to the differentiable physics branch include arriving and departing sliding window data, a discrete grid of road segment space, and the corresponding relativized reference values.
6. The intelligent estimation method for urban road traffic state based on differentiable physical representation according to claim 1, characterized in that, The training process of the physical-data hybrid driven model includes: first, pre-training the data-driven branch, in which only the parameters of the data-driven branch are updated to achieve a stable fit on the supervised target in the whole space, and early stopping is adopted and the optimal weights are saved; then, joint training is performed, in which the pre-trained weights are loaded and the joint forward pass and joint optimization of the two branches are enabled; the optimizer is applied to the parameters of the two branches respectively, and an adaptive learning rate annealing strategy based on the total loss is used to improve the convergence accuracy in the later stage.
7. A computer system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation as described in any one of claims 1-6.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent estimation method for urban road traffic state based on differentiable physical representation as described in any one of claims 1-6.
Citation Information
Patent Citations
Traffic flow prediction method and system based on embedded physical information deep neural network
CN120452198A