Highway toll and traffic flow prediction method based on deep neural network
By constructing a joint prediction method using node-based temporal features and deep neural networks, combined with a sequential Mondrian calibration mechanism, the topological correlation and uncertainty issues in the prediction of highway traffic flow and toll revenue were resolved, achieving accurate and stable prediction results.
Patent Information
- Application Number
- CN202511594103.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-01-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies struggle to effectively handle high-dimensional, multi-source, and nonlinear characteristic data in highway traffic flow and toll revenue prediction. They neglect network topology correlations and fail to quantify uncertainty in single-point prediction results, leading to lag or significant bias in predictions and poor adaptability.
By collecting multi-source traffic data, constructing node-based time-series features, using deep neural networks for joint prediction, and combining a sequential Mondrian calibration mechanism to dynamically update quantile thresholds, a calibrated prediction interval is generated, thereby improving prediction accuracy and stability.
It significantly improves the accuracy of joint forecasting of traffic flow and toll revenue, can quickly respond to dynamic changes in complex traffic scenarios, provides calibrated forecast ranges, reduces uncertainty risks, and adapts to emergencies and toll policy adjustments.
Smart Images

Figure CN121415587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method for predicting highway tolls and traffic flow based on deep neural networks. Background Technology
[0002] Currently, highway traffic management and toll forecasting primarily rely on traditional statistical analysis models and shallow machine learning methods, such as regression analysis, time series forecasting, and empirical models based on historical means. While these methods provided basic trend predictions in the early stages when data volume was small and traffic structures were relatively simple, their limitations become apparent as the highway network expands and traffic structures become more complex. Traditional methods struggle to handle high-dimensional, multi-source, and nonlinear data. Particularly when facing unexpected events such as holidays, severe weather, accidents, and construction, the models fail to capture the spatiotemporal dynamics of traffic flow and toll revenue, leading to delayed or significantly biased predictions. Furthermore, traditional forecasting models typically treat traffic flow and toll revenue as separate objectives, failing to effectively consider the correlation between them and making it difficult to achieve unified forecasting within a multi-objective optimization framework.
[0003] In existing technologies, some scholars have attempted to introduce neural network models, such as Long Short-Term Memory (LSTM) networks and convolutional neural networks, to model traffic flow. However, these models often only focus on the time dimension or local spatial dependencies, neglecting the global topological relationships between toll stations, gantries, and interchanges in the highway network. Furthermore, the differences in operational characteristics of different nodes under different toll policies and event states are not fully reflected, resulting in insufficient model generalization ability and poor adaptability to complex scenarios such as time-of-use toll adjustments and sudden event interference. More importantly, existing methods typically output single-point prediction results, failing to quantify the uncertainty of the prediction, leading to higher risks when applied to business processes such as scheduling decisions and revenue management.
[0004] Therefore, how to provide a method for predicting highway tolls and traffic flow based on deep neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a method for predicting highway tolls and traffic flow based on deep neural networks. This invention collects multi-source traffic data and constructs node-based time-series features, uses a deep model to jointly predict traffic flow and toll revenue, and combines a sequential Mondrian calibration mechanism to dynamically update quantile thresholds, generating calibrated prediction intervals, thereby effectively improving the accuracy and stability of highway operation status prediction.
[0006] A method for predicting highway tolls and traffic flow based on a deep neural network according to an embodiment of the present invention includes the following steps: Collect comprehensive traffic data on highway operation, and perform data cleaning, formatting, outlier removal, time alignment and standardization to generate structured time-series data; Based on the highway network structure, the time series data is classified into toll stations, gantries and interchange nodes, and the traffic connection relationship between nodes is established to obtain node-based time series data with spatial topological characteristics. Traffic operation features, environmental features, and tolling strategy features are extracted from node-based time-series data according to a set time window. The extracted results are then normalized and encoded to obtain the model input data. Construct a deep neural network, input the model input data into the deep neural network for calculation, and output prediction results containing spatial and temporal features; Based on the prediction results, generate traffic flow and toll revenue forecasts for future target periods, and simultaneously output the initial quantile information corresponding to the predicted values; The deep neural network is trained to optimize the prediction error of traffic flow and toll revenue. After training, the model parameters are fixed to obtain a prediction model for real-time prediction. The initial quantile information is calculated in real time using a prediction model, and online calibration is performed using sequential Mondrian configuration prediction. The quantile thresholds of each group are updated in time order, and the calibrated traffic flow prediction interval and toll revenue prediction interval are output. Acquire actual observation data, write the observation data and prediction results into the calibration record of the corresponding group, automatically adjust the quantile threshold based on the updated calibration data, and output the calibrated prediction results for the next prediction period.
[0007] Optionally, the generation of the structured time-series data specifically includes: Collect comprehensive traffic data on highway operation, including toll system transactions, ETC traffic, lane status, vehicle type and toll rate; unify the coding of each observation point, including toll stations, gantries and interchanges; set a fixed time step and reference time; divide the time axis by window; and merge the observation points to generate an aligned base table. The alignment base table is cleaned and anomaly handling is performed, the types and units are unified, deduplication and error correction are performed, the baseline is determined by the window, the deviation beyond the threshold is replaced by truncation, the missing values are first interpolated by the nearest neighbor, if one side is available, forward filling is performed, and if both sides are missing, the representative values of the same week and the same period are backfilled, the category field is encoded by dictionary, and the uncollected are classified as other, forming an intermediate feature vector. The standardized coefficients of the numerical characteristics of each observation point are calculated according to the specified statistical range. The mean-variance is used to generate dimensionless results. The standardized numerical characteristics are concatenated with the coded intermediate feature vectors. The list of observation points, feature columns, standardized coefficients and coding dictionary are recorded. After continuity and completeness checks, the data is solidified into structured time series data.
[0008] Optionally, obtaining the nodeized time-series data with spatial topological features specifically includes: Based on structured time-series data, toll stations, gantries, and interchanges are uniformly coded and labeled with types, and the direction, number of lanes, and latitude and longitude attributes are completed. The standardized features of each time step are bound to the corresponding nodes and time indexes, and the uniqueness of the codes and the validity of the coordinates are checked to form a node-time series with consistent caliber. Read the node-time series, generate directed connections according to the upstream-downstream reachability relationship, remove duplicates and eliminate self-loops, merge repeated connections in the same direction, fix the encoding order and row and column order to form a consistent topology, which serves as the basis for weight calculation; By combining consistent topology and node-time series, a window is selected to calculate the similarity of traffic between adjacent nodes and set negative values to zero. Consistent topology and similarity are linearly fused according to preset weights to generate non-negative edge weights. Row-direction normalization is performed on the external edges of each node to obtain the transfer coefficient. That is, for each node, the weights of all edges connecting it to other nodes are scaled proportionally so that this set of weights is added to one. The obtained coefficient is regarded as the transfer coefficient from the current node to each downstream node, and features are stacked in a fixed order to form a time series matrix, which constitutes node-based time series data.
[0009] Optionally, obtaining the model input data specifically includes: A fixed-length time window is set, and the time window slides gradually according to the end time. Three types of elements, namely operation, environment and strategy, are extracted from the node-based time series data. For each node, traffic operation volume and intensity indicators are summarized within the window. At the same time, the cumulative and average environmental volume, extreme values and occurrence frequency are extracted from the same window. The toll rate level, discount coefficient, holidays and control marks that are effective at the end of the current window are extracted from the toll strategy and event fields. These are used to form three types of feature blocks, namely traffic operation, environment and toll strategy, corresponding to the node and time, and maintaining a one-to-one correspondence with the node sequence and time step. Normalization and encoding are performed on the three types of feature blocks according to the field caliber. For numerical fields, the mean and standard deviation are calculated on the pre-specified statistical interval and converted into dimensionless results with zero mean and unit scale. For categorical fields, including vehicle type, rate level, holiday type and event type, one-hot encoding is completed according to a fixed mapping dictionary. The numerical results and categorical codes are concatenated into a normalized encoded feature vector of a single node at a single time step according to the predetermined column order. At each time step, the normalized encoded feature vectors of all nodes are concatenated line by line in a fixed node order to form an input sample, thus obtaining the model input sample corresponding to the end time of the window. When the window is insufficient at the beginning, it is filled in according to the predetermined filling rules. At the same time, the node order, feature column order, normalization and encoding metadata are recorded, and the model input data is output in chronological order.
[0010] Optionally, the process of outputting the prediction results specifically includes: Using model input data and nodeized temporal data as input, a deep neural network containing spatial and temporal modules is established. The parameters are initialized according to the predetermined number of channels and layers. Linear mapping and standardization alignment are performed on the feature vectors of each time step and each node to obtain the initial hidden representation that corresponds one-to-one with the temporal order and node order, while maintaining consistency with the index of the weighted edge weights and transition coefficients. Within the spatial module, the initial hidden representation is propagated and weighted according to the direction and proportion specified by the transfer coefficient, and channel mapping is performed with the intensity corresponding to the weighted edge weights. Within the temporal module, causal convolution is performed on the hidden representation of the same node according to the window time order, and the spatial and temporal results are concatenated in the channel dimension. After nonlinear transformation and residual connection, the fused representation corresponding to the window length and the number of nodes is output. Using the end slice of the fused representation window as input, the decoder generates progressive prediction results according to the preset prediction steps. The fused representation is then subjected to dimensionality reduction mapping and feature extraction to obtain spatiotemporal feature embeddings that can reflect the traffic state correlation and temporal evolution law between nodes. The progressive prediction results and spatiotemporal feature embeddings are combined as prediction results containing both spatial and temporal features.
[0011] Optionally, the process of outputting the initial quantile information specifically includes: Based on the prediction results, the decoder input sequence is constructed by embedding spatiotemporal features together with the corresponding time index, node order, and feature column order. For each node, the future horizon position mark, absolute time information, and holiday mark are added to the embedding at the end of the window. The nodes are arranged according to the predetermined node order and time order, the decoder internal state is initialized, and a data unit ready for decoding is formed. The decoded data units are sent to the decoder, and parallel computing is performed step by step according to the future target time period. The node order remains unchanged. At each future time step, the point prediction of traffic flow and the point prediction of toll revenue are output for each node. The data is organized according to the triple index of node code, future timestamp, and target type, and corresponds to the actual time step to ensure that the predicted values can directly reflect the traffic flow and toll revenue of the future time period. While generating point predictions, the traffic flow and toll revenue prediction results for each node and each future time step are calculated in quantiles to obtain initial quantile information. The quantile set is then output, which contains multiple preset percentiles to ensure that the quantile values of the same target at the same time step are sorted from smallest to largest. Values that do not conform to the physical criteria are truncated according to preset rules.
[0012] Optionally, the liveness of the prediction model specifically includes: Based on node-based time series data, training and validation sets are constructed. Input and labels are sliced according to fixed time windows and prediction step sizes. Rates and time-sharing strategies are aligned to time indices. Samples are shuffled and divided into batches. Missing time step masks are set. Random seeds are fixed. Sample size and batch number are recorded. Training batch queues and validation indices are generated. For each training batch queue, forward computation is performed to obtain traffic flow and revenue predictions. The mean absolute error of traffic flow, mean absolute error of revenue, revenue consistency constraint loss, and quantile prior bias are calculated separately and summed to obtain the overall loss. The parameters are then updated in reverse, and the learning rate plan and gradient pruning are used in conjunction with the learning rate plan. The optimal value is evaluated and recorded on the validation set in each round. If there is no continuous improvement, aggregation is triggered. After meeting the early stop requirement or reaching a set number of rounds, the optimal parameters for validation loss are selected as the prediction model for real-time prediction. The model is then solidified and versioned to generate a deployable package, which includes network structure definition, parameter weights, feature standardization parameters, rate and time-sharing strategy alignment rules, quantile reading rules, and node and time index mapping table.
[0013] Optionally, the output process of the prediction interval specifically includes: A ternary Mondrian grouping is established, consisting of topology, toll policy state, and event type. The Mondrian grouping is an adaptive hierarchical partitioning method based on multidimensional features. The topology dimension is divided by the spatial location of highway toll stations, gantries, and interchange nodes. The time-sharing toll rate, vehicle type toll rate, and flow restriction scheme of each node are defined as the toll policy state dimension. External disturbances such as accidents, construction, and severe weather are defined as the event type dimension. The three types of information are combined to form a unique group identifier, so that the same group has similar traffic characteristics and operating rules. The point prediction of traffic flow and toll revenue at each moment is aligned with the initial quantile information to the corresponding group and time index. The sequential inconsistency score is calculated sequentially according to the quantile level. A fixed-length sequence buffer and exponential time decay weight are configured for each group, and the coverage control parameters and threshold storage are initialized. For each group, the quantile threshold update process is initiated at the current time. The earliest sequential inconsistency score that exceeds the window is removed according to the first-in-first-out principle. The remaining scores are weighted according to the time interval with the current time and normalized. Threshold candidates are generated for the lower and upper quantiles respectively using a weighted sequential statistical method. The coverage control parameters and cumulative evidence measures are read. The target coverage level is adaptively tightened or relaxed according to the insufficiency or redundancy of the recent actual coverage. The final threshold is selected from the candidates. The weighted correlation strength between traffic flow and toll revenue at the median level is calculated to obtain the group-level amplification coefficient. When the weighted correlation strength increases, the threshold is amplified proportionally to expand the interval. When the weighted correlation strength decreases, the threshold is contracted proportionally to narrow the interval. The final threshold, the group-level amplification coefficient, and the adopted window length are written into the quantile threshold table. For the current group and time index, read the point prediction and initial quantile information, combine them with the final threshold in the quantile threshold table, generate calibrated traffic flow prediction intervals and toll revenue prediction intervals, and give their respective medians as center estimates. Synchronously write the interval endpoints, thresholds, group identifiers and time indexes into the calibration record to form a traceable sequential log for subsequent threshold rolling updates, coverage monitoring and external release.
[0014] Optionally, the process of outputting the calibrated prediction result for the next prediction period specifically includes: Acquire real-time observation data, including actual observations of traffic flow and toll revenue, align them by timestamp and node index, compare the real-time observation data with the prediction interval, and record the hit rate and deviation within each group; The observed data and prediction intervals are stored in the corresponding group's calibration record. The calibration record includes the prediction error, inconsistency score, and updated quantile threshold for the current group. The calibration record is updated in chronological order to ensure that the latest observations and prediction results for each time period are always saved in the corresponding historical records. Based on the latest calibration records, the quantile threshold update amount for each group is calculated. The update amount is based on the deviation between the prediction error of the current period and the previous period, and is weighted according to the inconsistency score to obtain a new quantile threshold adjustment factor. The quantile thresholds of each group are then automatically adjusted. Based on the adjusted quantile thresholds, the calibrated prediction results for the next prediction period are generated.
[0015] The beneficial effects of this invention are: This invention structures multi-source traffic data into node-based time-series data with spatial topological constraints and simultaneously models spatial dependence and temporal evolution in a deep neural network, significantly improving the joint prediction accuracy of traffic flow and toll revenue. Compared with traditional methods that rely solely on time series or local spatial information, it is better able to characterize the transmission effects across stations and road segments.
[0016] This invention employs quantile information output and introduces a sequential Mondrian online calibration mechanism with topology, rate strategy status, and event type as keys. This enables the prediction to not only provide point estimates but also calibrated interval results. The coverage is adaptively tightened or widened based on cumulative evidence, solving the problems of uncontrollable uncertainty, distorted intervals, or excessively wide intervals in the prior art.
[0017] The threshold update of this invention is based on time decay and weighted order statistics. It combines the correlation strength between traffic flow and income at the median level to amplify or shrink the data in groups, so that the model can maintain a robust and sensitive dynamic balance under scenarios such as holidays, accidents, construction, severe weather, and time-of-use rate switching, and significantly suppress the accumulation of concept drift. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0019] Figure 1 This is a flowchart of a highway toll and traffic flow prediction method based on deep neural networks proposed in this invention; Figure 2 This is a schematic diagram of the algorithm structure of a highway toll and traffic flow prediction method based on deep neural networks proposed in this invention. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0021] refer to Figure 1-2 A method for predicting highway tolls and traffic flow based on deep neural networks includes the following steps: Collect comprehensive traffic data on highway operation, and perform data cleaning, formatting, outlier removal, time alignment and standardization to generate structured time-series data; Based on the highway network structure, the time series data is classified into toll stations, gantries and interchange nodes, and the traffic connection relationship between nodes is established to obtain node-based time series data with spatial topological characteristics. Traffic operation features, environmental features, and tolling strategy features are extracted from node-based time-series data according to a set time window. The extracted results are then normalized and encoded to obtain the model input data. Construct a deep neural network, input the model input data into the deep neural network for calculation, and output prediction results containing spatial and temporal features; Based on the prediction results, generate traffic flow and toll revenue forecasts for future target periods, and simultaneously output the initial quantile information corresponding to the predicted values; The deep neural network is trained to optimize the prediction error of traffic flow and toll revenue. After training, the model parameters are fixed to obtain a prediction model for real-time prediction. The initial quantile information is calculated in real time using a prediction model, and online calibration is performed using sequential Mondrian configuration prediction. The quantile thresholds of each group are updated in time order, and the calibrated traffic flow prediction interval and toll revenue prediction interval are output. Acquire actual observation data, write the observation data and prediction results into the calibration record of the corresponding group, automatically adjust the quantile threshold based on the updated calibration data, and output the calibrated prediction results for the next prediction period.
[0022] This invention constructs a multi-source traffic data fusion prediction system based on deep neural networks, realizing joint modeling and quantized output of traffic flow and toll revenue. Under the condition of spatiotemporal feature coupling, it significantly improves the accuracy and stability of prediction, and can quickly respond to dynamic changes in complex traffic scenarios, meeting the real-time needs of highway operation management, scheduling and revenue analysis.
[0023] In this embodiment, the generation of the structured time-series data specifically includes: Collect comprehensive traffic data on highway operation, including toll system transactions, ETC traffic, lane status, vehicle type and toll rate; unify the coding of each observation point, including toll stations, gantries and interchanges; set a fixed time step and reference time; divide the time axis by window; and merge the observation points to generate an aligned base table. The alignment base table is cleaned and anomaly handling is performed, the types and units are unified, deduplication and error correction are performed, the baseline is determined by the window, the deviation beyond the threshold is replaced by truncation, the missing values are first interpolated by the nearest neighbor, if one side is available, forward filling is performed, and if both sides are missing, the representative values of the same week and the same period are backfilled, the category field is encoded by dictionary, and the uncollected are classified as other, forming an intermediate feature vector. The standardized coefficients of the numerical characteristics of each observation point are calculated according to the specified statistical range. The mean-variance is used to generate dimensionless results. The standardized numerical characteristics are concatenated with the coded intermediate feature vectors. The list of observation points, feature columns, standardized coefficients and coding dictionary are recorded. After continuity and completeness checks, the data is solidified into structured time series data.
[0024] This invention establishes a unified structured time-series data framework by cleaning, formatting, interpolating, and standardizing multi-source data such as toll transactions, ETC traffic, vehicle type, and toll rates, effectively solving the problems of missing, biased, and heterogeneous data in traditional traffic data.
[0025] In this embodiment, obtaining the nodeized time-series data with spatial topological features specifically includes: Based on structured time-series data, toll stations, gantries, and interchanges are uniformly coded and labeled with types, and the direction, number of lanes, and latitude and longitude attributes are completed. The standardized features of each time step are bound to the corresponding nodes and time indexes, and the uniqueness of the codes and the validity of the coordinates are checked to form a node-time series with consistent caliber. Read the node-time series, generate directed connections according to the upstream-downstream reachability relationship, remove duplicates and eliminate self-loops, merge repeated connections in the same direction, fix the encoding order and row and column order to form a consistent topology, which serves as the basis for weight calculation; By combining consistent topology and node-time series, a window is selected to calculate the similarity of traffic between adjacent nodes and set negative values to zero. Consistent topology and similarity are linearly fused according to preset weights to generate non-negative edge weights. Row-direction normalization is performed on the external edges of each node to obtain the transfer coefficient. That is, for each node, the weights of all edges connecting it to other nodes are scaled proportionally so that this set of weights is added to one. The obtained coefficient is regarded as the transfer coefficient from the current node to each downstream node, and features are stacked in a fixed order to form a time series matrix, which constitutes node-based time series data.
[0026] This invention establishes road network topology relationships at the node level and generates a non-negative transfer coefficient matrix by combining traffic flow similarity and direction weighting. This enables the spatiotemporal feature mapping of complex highway structures, accurately characterizing the transmission relationships between different nodes, thereby enhancing the model's perception of upstream and downstream traffic conditions and its prediction accuracy.
[0027] In this embodiment, obtaining the model input data specifically includes: A fixed-length time window is set, and the time window slides gradually according to the end time. Three types of elements, namely operation, environment and strategy, are extracted from the node-based time series data. For each node, traffic operation volume and intensity indicators are summarized within the window. At the same time, the cumulative and average environmental volume, extreme values and occurrence frequency are extracted from the same window. The toll rate level, discount coefficient, holidays and control marks that are effective at the end of the current window are extracted from the toll strategy and event fields. These are used to form three types of feature blocks, namely traffic operation, environment and toll strategy, corresponding to the node and time, and maintaining a one-to-one correspondence with the node sequence and time step. Normalization and encoding are performed on the three types of feature blocks according to the field caliber. For numerical fields, the mean and standard deviation are calculated on the pre-specified statistical interval and converted into dimensionless results with zero mean and unit scale. For categorical fields, including vehicle type, rate level, holiday type and event type, one-hot encoding is completed according to a fixed mapping dictionary. The numerical results and categorical codes are concatenated into a normalized encoded feature vector of a single node at a single time step according to the predetermined column order. At each time step, the normalized encoded feature vectors of all nodes are concatenated line by line in a fixed node order to form an input sample, thus obtaining the model input sample corresponding to the end time of the window. When the window is insufficient at the beginning, it is filled in according to the predetermined filling rules. At the same time, the node order, feature column order, normalization and encoding metadata are recorded, and the model input data is output in chronological order.
[0028] This invention extracts three types of elements—traffic operation, environment, and tolling strategy—within a fixed time window and performs normalized encoding, ensuring that the input features maintain consistency and scalability in both temporal and spatial dimensions. This effectively enhances the deep neural network's ability to recognize and generalize multidimensional features, thereby improving the comprehensiveness and robustness of predictions.
[0029] In this embodiment, the process of outputting the prediction result specifically includes: Using model input data and nodeized temporal data as input, a deep neural network containing spatial and temporal modules is established. The parameters are initialized according to the predetermined number of channels and layers. Linear mapping and standardization alignment are performed on the feature vectors of each time step and each node to obtain the initial hidden representation that corresponds one-to-one with the temporal order and node order, while maintaining consistency with the index of the weighted edge weights and transition coefficients. Within the spatial module, the initial hidden representation is propagated and weighted according to the direction and proportion specified by the transfer coefficient, and channel mapping is performed with the intensity corresponding to the weighted edge weights. Within the temporal module, causal convolution is performed on the hidden representation of the same node according to the window time order, and the spatial and temporal results are concatenated in the channel dimension. After nonlinear transformation and residual connection, the fused representation corresponding to the window length and the number of nodes is output. Using the end slice of the fused representation window as input, the decoder generates progressive prediction results according to the preset prediction steps. The fused representation is then subjected to dimensionality reduction mapping and feature extraction to obtain spatiotemporal feature embeddings that can reflect the traffic state correlation and temporal evolution law between nodes. The progressive prediction results and spatiotemporal feature embeddings are combined as prediction results containing both spatial and temporal features.
[0030] This invention constructs a deep neural network that includes spatial and temporal modules, enabling joint modeling of spatial topological dependence and temporal dynamic changes. It can simultaneously capture the flow correlation and temporal evolution patterns between nodes, resulting in prediction results with high consistency and interpretability across multiple time periods and nodes.
[0031] In this embodiment, the process of outputting the initial quantile information specifically includes: Based on the prediction results, the decoder input sequence is constructed by embedding spatiotemporal features together with the corresponding time index, node order, and feature column order. For each node, the future horizon position mark, absolute time information, and holiday mark are added to the embedding at the end of the window. The nodes are arranged according to the predetermined node order and time order, the decoder internal state is initialized, and a data unit ready for decoding is formed. The decoded data units are sent to the decoder, and parallel computing is performed step by step according to the future target time period. The node order remains unchanged. At each future time step, the point prediction of traffic flow and the point prediction of toll revenue are output for each node. The data is organized according to the triple index of node code, future timestamp, and target type, and corresponds to the actual time step to ensure that the predicted values can directly reflect the traffic flow and toll revenue of the future time period. While generating point predictions, the traffic flow and toll revenue prediction results for each node and each future time step are calculated in quantiles to obtain initial quantile information. The quantile set is then output, which contains multiple preset percentiles to ensure that the quantile values of the same target at the same time step are sorted from smallest to largest. Values that do not conform to the physical criteria are truncated according to preset rules.
[0032] This invention introduces an initial quantile information output mechanism, enabling the model to output multiple quantile results simultaneously when generating traffic flow and toll revenue predictions. This reflects the uncertainty distribution characteristics of the prediction results, providing a data foundation for subsequent interval calibration and risk assessment, thereby improving the reliability and applicability of the prediction results. In this embodiment, the effectiveness of the prediction model specifically includes: Based on node-based time series data, training and validation sets are constructed. Input and labels are sliced according to fixed time windows and prediction step sizes. Rates and time-sharing strategies are aligned to time indices. Samples are shuffled and divided into batches. Missing time step masks are set. Random seeds are fixed. Sample size and batch number are recorded. Training batch queues and validation indices are generated. For each training batch queue, forward computation is performed to obtain traffic flow and revenue predictions. The mean absolute error of traffic flow, mean absolute error of revenue, revenue consistency constraint loss, and quantile prior bias are calculated separately and summed to obtain the overall loss. The parameters are then updated in reverse, and the learning rate plan and gradient pruning are used in conjunction with the learning rate plan. The optimal value is evaluated and recorded on the validation set in each round. If there is no continuous improvement, aggregation is triggered. After meeting the early stop requirement or reaching a set number of rounds, the optimal parameters for validation loss are selected as the prediction model for real-time prediction. The model is then solidified and versioned to generate a deployable package, which includes network structure definition, parameter weights, feature standardization parameters, rate and time-sharing strategy alignment rules, quantile reading rules, and node and time index mapping table.
[0033] This invention designs a training mechanism that incorporates multi-task loss, comprehensively optimizing traffic flow error, revenue error, and consistency constraints. This enables the model to achieve collaborative learning under multi-objective conditions, resulting in a stable training process with fast convergence speed. It can maintain high prediction accuracy and generalization ability in multiple scenarios.
[0034] In this embodiment, the output process of the prediction interval specifically includes: A ternary Mondrian grouping is established, consisting of topology, toll policy state, and event type. The Mondrian grouping is an adaptive hierarchical partitioning method based on multidimensional features. The topology dimension is divided by the spatial location of highway toll stations, gantries, and interchange nodes. The time-sharing toll rate, vehicle type toll rate, and flow restriction scheme of each node are defined as the toll policy state dimension. External disturbances such as accidents, construction, and severe weather are defined as the event type dimension. The three types of information are combined to form a unique group identifier, so that the same group has similar traffic characteristics and operating rules. The point prediction of traffic flow and toll revenue at each moment is aligned with the initial quantile information to the corresponding group and time index. The sequential inconsistency score is calculated sequentially according to the quantile level. A fixed-length sequence buffer and exponential time decay weight are configured for each group, and the coverage control parameters and threshold storage are initialized. For each group, the quantile threshold update process is initiated at the current time. The earliest sequential inconsistency score that exceeds the window is removed according to the first-in-first-out principle. The remaining scores are weighted according to the time interval with the current time and normalized. Threshold candidates are generated for the lower and upper quantiles respectively using a weighted sequential statistical method. The coverage control parameters and cumulative evidence measures are read. The target coverage level is adaptively tightened or relaxed according to the insufficiency or redundancy of the recent actual coverage. The final threshold is selected from the candidates. The weighted correlation strength between traffic flow and toll revenue at the median level is calculated to obtain the group-level amplification coefficient. When the weighted correlation strength increases, the threshold is amplified proportionally to expand the interval. When the weighted correlation strength decreases, the threshold is contracted proportionally to narrow the interval. The final threshold, the group-level amplification coefficient, and the adopted window length are written into the quantile threshold table. For the current group and time index, read the point prediction and initial quantile information, combine them with the final threshold in the quantile threshold table, generate calibrated traffic flow prediction intervals and toll revenue prediction intervals, and give their respective medians as center estimates. Synchronously write the interval endpoints, thresholds, group identifiers and time indexes into the calibration record to form a traceable sequential log for subsequent threshold rolling updates, coverage monitoring and external release.
[0035] This invention introduces a ternary Mondrian grouping and sequential quantile threshold update mechanism to achieve online adaptive calibration of the prediction interval. The system can dynamically adjust the upper and lower quantile thresholds according to the coverage and correlation strength, ensuring that the prediction interval is both robust and flexible, and significantly improving the reliability of the model in complex situations such as holidays, accidents and construction.
[0036] In this embodiment, the process of outputting the calibrated prediction result for the next prediction period specifically includes: Acquire real-time observation data, including actual observations of traffic flow and toll revenue, align them by timestamp and node index, compare the real-time observation data with the prediction interval, and record the hit rate and deviation within each group; The observed data and prediction intervals are stored in the corresponding group's calibration record. The calibration record includes the prediction error, inconsistency score, and updated quantile threshold for the current group. The calibration record is updated in chronological order to ensure that the latest observations and prediction results for each time period are always saved in the corresponding historical records. Based on the latest calibration records, the quantile threshold update amount for each group is calculated. The update amount is based on the deviation between the prediction error of the current period and the previous period, and is weighted according to the inconsistency score to obtain a new quantile threshold adjustment factor. The quantile thresholds of each group are then automatically adjusted. Based on the adjusted quantile thresholds, the calibrated prediction results for the next prediction period are generated.
[0037] This invention establishes an observation-prediction-calibration feedback mechanism, records changes in group hit rate and deviation in real time, and automatically updates quantile thresholds, thereby achieving continuous self-learning and dynamic correction of the prediction model. It can effectively suppress model drift and maintain long-term stability of the prediction interval, providing continuously optimized decision support for intelligent operation of highways.
[0038] Example 1: To verify the feasibility of this invention in practice, it was applied to a traffic operation prediction scenario for a highway network. This network comprises 268 nodes, including mainline toll stations, interchanges, and gantry monitoring points, covering various operational states such as regular traffic, time-based toll collection, and holiday traffic restrictions. The data collection period was sixty consecutive days, and the raw data included approximately 120 million ETC transaction records, 34 million manual toll collection transaction records, 85 million video recognition traffic flow data records, 1.2 million meteorological and environmental data records, and 2,100 construction and accident records. After all data was aligned to a 5-minute granularity, it underwent cleaning, anomaly removal, and standardization to generate approximately 1.8TB of structured time-series samples.
[0039] In this scenario, the cleaned data is first processed into nodes according to the highway network topology, establishing a directed connection matrix between upstream and downstream nodes. Then, operational, environmental, and toll strategy features are extracted from the node-based data. Operational features include inbound and outbound traffic flow, average vehicle speed, and congestion index; environmental features include temperature, precipitation, visibility, and wind speed; and strategy features include toll tiers, time-based strategies, and holiday markers. After normalizing these three types of features, they are input into a deep neural network model. The model employs a spatiotemporal fusion structure, including a graph neural network for extracting spatial correlations and a temporal convolutional network combined with a Transformer module for modeling temporal dependencies. The model outputs multi-step predictions for the next 1 to 6 hours, including point predictions of traffic flow and toll revenue, along with corresponding quantile information.
[0040] To achieve adaptive calibration of the prediction interval, this invention establishes a ternary Mondrian grouping based on topology, toll policy status, and event type. For example, at node A of the interchange, the toll policy is divided into three types: peak, off-peak, and holiday; the event type includes three categories: normal, construction, and accident. This results in nine independent groups for this node. The model aligns the prediction results at each time step with the actual observed data, calculates the sequential inconsistency score, and uses an exponential time decay method to preserve the prediction residuals of the most recent 48 hours within each group. After removing the earliest sample, a weighted sequential statistical method is performed to generate upper and lower quantile threshold candidates. The system reads the cumulative evidence metric and adaptively adjusts the target coverage level based on recent coverage. If the prediction interval is too narrow, resulting in an actual hit rate below 90%, the threshold is automatically widened; if the coverage redundancy exceeds 95%, the threshold is tightened. Through weighted correlation strength calculation, when the correlation between traffic flow and toll increases at the median level, the system proportionally amplifies the threshold, expanding the interval width by approximately 7% to accommodate sudden traffic fluctuations.
[0041] During the continuous operation phase, the system automatically acquires real-time observation data daily, compares it with the results of the previous prediction cycle, and writes it into the calibration record. To verify the superiority of this invention, a comparative experiment based on the same dataset was conducted, as shown in Table 1: Table 1. Comparison of Highway Traffic Flow and Toll Revenue Prediction Performance Based on Different Models
[0042] As shown in Table 1, the proposed highway toll and traffic flow prediction method based on deep neural networks and sequential Mondrian online calibration exhibits significant performance advantages across different prediction durations. Compared to traditional regression models and LSTM time-series models, the mean absolute error of traffic flow prediction decreases by approximately 34% in the short term and by approximately 23% in the medium term, while the prediction error of toll revenue decreases by approximately 43% and 28%, respectively, and maintains an accuracy improvement of approximately 20% in the long term. Simultaneously, the prediction interval hit rate remains consistently around 90%, significantly higher than the approximately 80% level of traditional methods, and the interval width is reduced by an average of approximately 3 to 6 percentage points compared to the baseline model. This indicates that the present invention not only improves prediction accuracy but also possesses higher stability and adaptability in uncertainty control.
[0043] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for predicting highway tolls and traffic flow based on deep neural networks, characterized in that, Includes the following steps: Collect comprehensive traffic data on highway operation, perform data standardization processing, and generate structured time-series data; Based on the highway network structure, the time series data is classified, and the traffic connection relationships between nodes are established to obtain node-based time series data. From the node-based time-series data, operational features are extracted according to a set time window, and then normalized and encoded to obtain the model input data; Construct a deep neural network, input the model input data into the deep neural network for calculation, and output the prediction result; Based on the prediction results, generate traffic flow and toll revenue forecasts for future target periods, and simultaneously output the initial quantile information corresponding to the predicted values; The deep neural network is trained to optimize the prediction error of traffic flow and toll revenue. After training, the model parameters are fixed to obtain a prediction model for real-time prediction. The initial quantile information is calculated in real time using a prediction model, and online calibration is performed using sequential Mondrian configuration prediction. The quantile thresholds of each group are updated in time order, and the calibrated traffic flow prediction interval and toll revenue prediction interval are output. Acquire actual observation data, write the observation data and prediction results into the calibration record of the corresponding group, automatically adjust the quantile threshold, and output the calibrated prediction results for the next prediction period.
2. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The generation of the structured time-series data specifically includes: Collect comprehensive traffic data on highway operation, including vehicle type and toll rate, unify the coding of each observation point, and generate an aligned base table by merging the observation points; The base table is aligned and cleaned and anomaly handling is performed to form an intermediate feature vector; The standardized coefficients of the numerical characteristics of each observation point are calculated according to the specified statistical range. The standardized numerical characteristics are then concatenated with the coded intermediate feature vectors and solidified into structured time series data after continuity and completeness checks.
3. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The specific process of obtaining the nodeized time-series data with spatial topological features includes: Based on structured time-series data, toll stations, gantries, and interchanges are uniformly coded and labeled with types. The standardized features of each time step are bound to the corresponding nodes and time indices. The uniqueness of the codes and the validity of the coordinates are checked to form a node-time series with consistent caliber. Read the node-time series, generate directed connections according to the upstream-downstream reachability relationship, remove duplicates and eliminate self-loops, merge repeated connections in the same direction, fix the encoding order and row and column order, and form a consistent topology; By combining consistent topology and node-time series, a window is selected to calculate the traffic similarity between adjacent nodes and set negative values to zero. The external edges of each node are row-directed to obtain the transition coefficients, and the features are stacked in a fixed order to form a time series matrix, thus constituting node-based time series data.
4. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The specific methods for obtaining the model input data include: Set a fixed-length time window, slide it step by step according to the end time of the time window, and extract three types of elements: operation, environment and strategy from the nodeized time series data, forming three types of feature blocks corresponding to nodes and time, including traffic operation, environment and tolling strategy; Normalization and encoding are performed on the three types of feature blocks according to the field caliber. The numerical results and category codes are concatenated into a normalized encoded feature vector of a single node at a single time step according to the predetermined column order. At each time step, the normalized encoded feature vectors of all nodes are concatenated line by line in a fixed node order to form an input sample, thus obtaining the model input sample corresponding to the end time of the window. The model input data is then output in chronological order.
5. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The specific process of outputting the prediction results includes: Using model input data and nodeized temporal data as input, a deep neural network containing spatial and temporal modules is established. The parameters are initialized according to the predetermined number of channels and layers. Linear mapping and standardization alignment are performed on the feature vectors of each time step and each node to obtain the initial hidden representation. Within the spatial module, the initial hidden representation is propagated and weighted according to the direction and proportion specified by the transfer coefficient, and channel mapping is performed with the intensity corresponding to the weighted edge weights. Within the temporal module, causal convolution is performed on the hidden representation of the same node according to the window time order, and the spatial and temporal results are concatenated in the channel dimension. After nonlinear transformation and residual connection, the fused representation corresponding to the window length and the number of nodes is output. Using the end slice of the fused representation window as input, the decoder generates progressive prediction results according to the preset prediction steps. The fused representation is then subjected to dimensionality reduction mapping and feature extraction to obtain spatiotemporal feature embeddings. The progressive prediction results and spatiotemporal feature embeddings are combined as prediction results containing both spatial and temporal features.
6. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The process of outputting the initial quantile information specifically includes: Based on the prediction results, the decoder input sequence is constructed by embedding spatiotemporal features together with the corresponding time index, node order, and feature column order. The sequence is arranged according to the predetermined node order and time order, and the internal state of the decoder is initialized to form a data unit ready for decoding. The decoded data units are sent to the decoder, and parallel computing is performed step by step according to the future target time period. The node order remains unchanged. At each future time step, the point prediction of traffic flow and the point prediction of toll revenue are output for each node and organized according to the triple index of node code, future timestamp and target type. While generating point predictions, quantile calculations are performed on the traffic flow and toll revenue predictions for each node and each future time step to obtain initial quantile information and output the quantile set.
7. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The specific benefits of the prediction model include: Based on node-based time-series data, a training set and a validation set are constructed, and a training batch queue and a validation index are generated. For each training batch queue, forward computation is performed to obtain traffic flow and revenue predictions. The mean absolute error of traffic flow, mean absolute error of revenue, revenue consistency constraint loss, and quantile prior bias are calculated separately and summed to obtain the overall loss. The parameters are then updated in reverse, and the learning rate plan and gradient pruning are used in conjunction with the learning rate plan. The optimal value is evaluated and recorded on the validation set in each round. If there is no continuous improvement, aggregation is triggered. After meeting the early stopping requirement or reaching a set number of rounds, the optimal parameters for the validation loss are selected as the prediction model for real-time prediction.
8. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The output process for the prediction interval specifically includes: A ternary Mondrian grouping is established, consisting of topology, toll policy state, and event type. The Mondrian grouping is an adaptive hierarchical partitioning method based on multidimensional features. The topology dimension is divided by the spatial location of highway toll stations, gantries, and interchange nodes. The time-sharing toll rate, vehicle type toll rate, and flow restriction scheme of each node are defined as the toll policy state dimension. External disturbances such as accidents, construction, and severe weather are defined as the event type dimension. The three types of information are combined to form a unique group identifier. The point prediction of traffic flow and toll revenue at each moment is aligned with the initial quantile information to the corresponding group and time index. The sequential inconsistency score is calculated sequentially according to the quantile level. A fixed-length sequence buffer and exponential time decay weight are configured for each group. The coverage control parameters and threshold storage are initialized. For each group, the quantile threshold update process is initiated at the current time. The earliest sequential inconsistency score that exceeds the window is removed according to the first-in-first-out principle. The remaining scores are weighted according to the time interval with the current time and normalized. Threshold candidates are generated for the lower and upper quantiles using a weighted sequential statistical method. The coverage control parameters and cumulative evidence measures are read. The target coverage level is adaptively tightened or relaxed. The final threshold is selected from the candidates. The weighted correlation strength between traffic flow and toll revenue at the median level is calculated to obtain the group-level amplification coefficient. When the weighted correlation strength increases, the threshold is amplified proportionally to expand the interval. When the weighted correlation strength decreases, the threshold is contracted proportionally to narrow the interval. The final threshold, the group-level amplification coefficient, and the adopted window length are written into the quantile threshold table. For the current group and time index, read the point prediction and initial quantile information, and combine them with the final threshold in the quantile threshold table to generate calibrated traffic flow prediction intervals and toll revenue prediction intervals.
9. The method for predicting highway tolls and traffic flow based on deep neural networks according to claim 1, characterized in that, The specific process of outputting the calibrated prediction results for the next prediction period includes: Acquire real-time observation data and actual observation values, align them by timestamp and node index, compare the real-time observation data with the prediction interval, and record the hit rate and deviation within each group; The observed data and the prediction interval are stored in the corresponding grouped calibration records, and the calibration records are updated in chronological order. Based on the latest calibration records, the quantile threshold update amount for each group is calculated to obtain a new quantile threshold adjustment factor. The quantile thresholds for each group are then automatically adjusted. Based on the adjusted quantile thresholds, the calibrated prediction results for the next prediction period are generated.
Citation Information
Cited By
Road toll prediction method and system based on portal network spatial-temporal feature fusion
CN121684213A