A method for predicting and reconstructing vehicle traffic trajectories based on the STL+ETS algorithm
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-08-14
AI Technical Summary
[0007]有鉴于此,本发明的目的在于提供一种基于STL+ETS算法的车辆通行轨迹预测还原方法,旨在解决现有技术中车辆通行轨迹还原精度不足、预测偏差大,以及多源交通数据整合利用效率低、复杂交通场景适配性差的技术痛点,同时实现交通偷逃行为的快速高效检测
[0026]1.轨迹还原精度大幅提升:本发明通过构建多源交通数据关联匹配机制,以车牌为唯一标识并结合门架编号、通行时间进行交叉校验,有效解决了多源异构数据格式不统一、噪声干扰大的问题;同时利用 STL 分解精准分离出趋势、季节与残差成分,并基于分解结果对异常通行点进行修正,显著提升了车辆通行轨迹还原的准确性与连续性,可有效应对复杂交通场景下的数据波动。
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital transportation technology, specifically relating to a method for predicting and restoring vehicle travel trajectories based on the STL+ETS algorithm. Background Technology
[0002] The construction of intelligent transportation is the core direction for realizing refined urban traffic management and improving traffic efficiency. The accurate reconstruction and prediction of vehicle travel trajectories, as the basic core technology of intelligent transportation, directly determines the implementation effect of applications such as traffic control and violation detection.
[0003] Current traffic data sources are diverse and heterogeneous, mainly covering multiple systems such as entrance station registration data, gantry reading data, and exit station payment data. These data suffer from technical challenges such as inconsistent format standards, significant noise interference during the collection process, and complex temporal and periodic characteristics, making it difficult for traditional trajectory reconstruction techniques to construct accurate vehicle traffic links.
[0004] Traditional vehicle trajectory reconstruction methods rely on simple time sorting and multi-source data association matching, which only stay at the level of data surface association mining and fail to deeply analyze the potential patterns contained in the traffic data itself. When facing complex traffic scenarios such as traffic flow fluctuations and complex transfers at multiple nodes, they have technical defects such as low trajectory reconstruction accuracy and poor continuity.
[0005] In the vehicle traffic data prediction stage, existing technologies mostly employ single time series prediction models, including ARIMA models and single ETS models. However, traffic data has complex characteristics such as multiple seasonal fluctuations, nonlinear trend changes, and outlier interference. Single models suffer from high model structure complexity, difficulty in estimating key parameters, and large deviations between prediction results and actual traffic data, failing to meet the technical requirements for high-precision trajectory prediction.
[0006] In summary, existing technologies lack a technical solution that can efficiently integrate multi-source heterogeneous traffic data, deeply mine data temporal patterns, and simultaneously achieve high-precision vehicle trajectory reconstruction and prediction. This makes it difficult to adapt to the refined management needs in complex traffic scenarios and also hinders the rapid and effective identification of "gang-based" and "professional" traffic evasion behaviors. Summary of the Invention
[0007] In view of this, the purpose of this invention is to provide a vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm, which aims to solve the technical pain points of insufficient accuracy in vehicle trajectory reconstruction, large prediction deviation, low efficiency in integrating and utilizing multi-source traffic data, and poor adaptability to complex traffic scenarios in the existing technology, while realizing rapid and efficient detection of traffic evasion behavior.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] A method for predicting and reconstructing vehicle traffic trajectories based on the STL+ETS algorithm includes the following steps:
[0010] S1. Collect and acquire multi-source traffic data, using license plate numbers as unique identifiers, and perform data cleaning, standardization, and correlation matching on entrance station data, gantry reading data, and exit station data to construct a vehicle traffic trajectory dataset;
[0011] S2. Construct a traffic time series based on the vehicle traffic trajectory dataset, and use the STL algorithm to perform time series decomposition on the traffic time series to obtain the trend term, seasonal term and residual term;
[0012] S3. Based on the trend term, seasonal term and residual term obtained from the decomposition, the ETS model is used to predict the travel time series, and the predicted time series data is obtained.
[0013] S4. Combine the predicted time series data with the actual traffic data to complete the correction, restoration and prediction of vehicle traffic trajectories.
[0014] Furthermore, in step S1, data cleaning includes: removing duplicate data, missing key field data, and logically abnormal data, and supplementing missing data that can be supplemented through cross-validation of multi-source data.
[0015] Furthermore, in step S1, the standardization process includes: unifying the passage time as a timestamp format, unifying the license plate character format, and unifying the encoding rules for gantry numbers and station numbers.
[0016] Furthermore, in step S2, the parameters of STL decomposition are set as follows: the seasonal smoothing window is 21% of the period and is an odd value, the trend smoothing window is 21% of the period and is an odd value, and the low-pass filter window is greater than the period and is an odd value; and the robust decomposition mode is enabled to resist outliers and noise interference in the data, so as to achieve accurate decomposition of the time series.
[0017] Furthermore, in step S3, the ETS model selection rule is as follows: for traffic data with a linear trend and constant variance, the additive model is preferred; for sequences whose variance increases with the data level, the multiplicative model is selected.
[0018] Furthermore, in step S4, trajectory correction includes: identifying abnormal passage points that significantly deviate from the trend term and seasonal term as abnormal data, and replacing or correcting them with predicted values.
[0019] This invention also provides a vehicle trajectory prediction and reconstruction system based on the STL+ETS algorithm, comprising:
[0020] Data preprocessing module: used to collect multi-source traffic data, perform data cleaning, standardization and correlation matching, and construct vehicle traffic trajectory dataset;
[0021] Time series decomposition module: Used to decompose the circulating time series using the STL algorithm to obtain the trend term, seasonal term, and residual term;
[0022] Time series prediction module: used to predict travel time series based on ETS model, and obtain predicted time series;
[0023] Trajectory processing module: Used to combine actual data and predicted data to correct, restore and predict vehicle travel trajectories;
[0024] Anomaly Detection Module: Used to identify abnormal travel trajectories and toll evasion based on the reconstructed and predicted travel trajectories.
[0025] Beneficial effects:
[0026] 1. Significantly Improved Trajectory Reconstruction Accuracy: This invention constructs a multi-source traffic data association and matching mechanism, using license plates as unique identifiers and combining gantry numbers and passage times for cross-verification. This effectively solves the problems of inconsistent formats and high noise interference in multi-source heterogeneous data. At the same time, it utilizes STL decomposition to accurately separate trend, seasonal, and residual components, and corrects abnormal passage points based on the decomposition results. This significantly improves the accuracy and continuity of vehicle passage trajectory reconstruction and can effectively cope with data fluctuations in complex traffic scenarios.
[0027] 2. Significantly Enhanced Prediction Accuracy and Adaptability: This invention adopts the STL+ETS fusion algorithm system. STL decomposition breaks down complex traffic time series into interpretable trend and periodic components, while the ETS model automatically selects the optimal addition or multiplication model for the decomposed stationary series and makes accurate predictions. Compared with traditional single models such as ARIMA and single ETS, it can more effectively capture multiple seasonal, nonlinear trends and outlier interferences in traffic data, achieve higher accuracy trajectory prediction, and provide uncertainty intervals for prediction results, providing quantitative basis for traffic management decisions.
[0028] 3. Strong robustness adaptable to diverse traffic scenarios: The STL algorithm, by setting a specific proportion of seasonal / trend smoothing windows and enabling robustness mode, has excellent resistance to outliers and can effectively resist abnormal data interference such as equipment failure and sudden accidents; The ETS model adaptively selects the model structure based on the AIC / BIC criterion, which can adapt to different data characteristics such as linear trends and constant variance, and is suitable for various scenarios such as urban periphery roads and cross-regional long-distance roads, with strong versatility.
[0029] 4. Efficient identification of traffic evasion: This invention, through high-precision trajectory reconstruction and prediction results, can quickly compare the deviation between the actual vehicle travel trajectory and normal seasonal and trend patterns, efficiently identifying abnormal behaviors such as "gang-based" and "professional" toll evasion, replacing the traditional manual comparison and analysis methods that consume a lot of manpower and resources, and realizing the automation, intelligence and efficiency of traffic violation detection.
[0030] 5. Excellent system scalability and processing efficiency: This invention designs a four-layer architecture of "data acquisition-storage-algorithm processing-application demonstration". The algorithm processing layer adopts a modular design and combines it with the parallel computing framework Spark, which greatly improves the efficiency of data processing and model training. The distributed database and data warehouse support massive data storage and historical analysis, and the modular architecture facilitates subsequent function expansion and algorithm upgrades, and can adapt to the growth of traffic data volume and dynamic changes in business needs.
[0031] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Detailed Implementation
[0032] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.
[0033] This invention provides a method for predicting and reconstructing vehicle traffic trajectories based on the STL+ETS algorithm, comprising the following steps:
[0034] S1. Collect and acquire multi-source traffic data, using license plate numbers as unique identifiers, and perform data cleaning, standardization, and correlation matching on entrance station data, gantry reading data, and exit station data to construct a vehicle traffic trajectory dataset;
[0035] Data cleaning: Remove duplicate data records, records with missing key information (license plate, travel time) and logical errors (such as reversed travel time order), and supplement missing data by linking to other data sources.
[0036] Data standardization: Convert passage time into standard timestamp format and standardize license plate numbers (unify character capitalization and remove special symbols) to ensure consistent data format across different data sources.
[0037] Association Matching: Using license plate as the core key field, the system associates entry station registration information, gantry transaction and license plate identification information, and exit station payment information according to the chronological order of passage time to construct a preliminary vehicle passage trajectory dataset. For multiple records of the same license plate, the spatial order of gantry numbers and the temporal order of passage time are used for verification to ensure the continuity and rationality of the trajectory.
[0038] S2. Construct a traffic time series based on the vehicle traffic trajectory dataset, and use the STL algorithm to perform time series decomposition on the traffic time series to obtain the trend term, seasonal term and residual term;
[0039] STL is a nonparametric, iterative time series decomposition method. Its core lies in using Loess regression to flexibly fit the trend and seasonal components of a time series, without relying on a pre-defined function form. Its decomposition model can be expressed as: in, This is the original vehicle passage time sequence (such as the time interval between a vehicle passing through each gantry, the number of vehicles passing through a gantry in different time periods, etc.). This is a trend term, reflecting the long-term changing trend of vehicle traffic (such as the year-by-year increase in highway traffic volume due to urban development). For seasonal items, capture the periodic fluctuation patterns of the sequence (such as traffic fluctuations during daily morning and evening rush hours, and traffic differences between weekends and weekdays). The residual term represents random disturbance factors in the sequence (such as traffic anomalies caused by sudden traffic accidents or weather changes).
[0040] Implementation steps of the STL algorithm:
[0041] Determine the decomposition cycle: Based on the characteristics of traffic data, determine the main seasonal cycles through historical data analysis.
[0042] Set the decomposition parameters as follows: the seasonal smoothing window size is 21% of the period and is an odd value; the trend smoothing window size is 21% of the period and is an odd value; the low-pass filter window is larger than the period and is an odd value; and enable robust mode (robust=True) to enhance the ability to resist outliers.
[0043] Execution decomposition: Run the STL algorithm to obtain the trend term. Seasonal items With residuals At the same time, a deseasonalized stationary sequence was obtained. .
[0044] S3. Based on the trend term, seasonal term and residual term obtained from the decomposition, the ETS model is used to predict the travel time series, and the predicted time series data is obtained.
[0045] ETS is a probabilistic prediction model based on a state-space framework. Its theoretical essence is to view time series as a dynamic evolution process of potential states. The model defines levels... ,trend ,season The three core state variables evolve according to the following state equations:
[0046] begin{aligned} &= alpha ( - ) + (1 - alpha)( + )
[0047] &= beta^* ( - ) + (1 - beta^)
[0048] &= gamma ( - - ) + (1 - gamma) end{aligned}
[0049] Where alpha, beta^, and gamma are smoothing parameters, and m is the seasonal period. The ETS model generates 30 potential models by combining different types of errors (addition A / multiplication M), trends (no N / addition A / additional damping Ad / multiplication M / multiplication damping Md), and seasons (no N / addition A / multiplication M). The optimal structure can be automatically selected using the AIC / BIC information criteria, achieving adaptive model matching. Simultaneously, based on the covariance propagation of the state equation, ETS can derive the prediction interval for future values, providing uncertainty quantification.
[0050] Implementation steps of the ETS model
[0051] Model selection: For the deseasonalized series D_t, the optimal ETS model structure is automatically selected using the AIC / BIC criteria. For traffic data with a linear trend and constant variance, an additive model (such as AAA) is preferred; for series where variance increases with data level, a multiplicative model (such as MAA) is selected.
[0052] Parameter estimation: The smoothing parameters (alpha, beta, gamma) and damping parameters (phi, if damping trend is enabled) of the model are solved by the maximum likelihood estimation method to ensure the model's fitting accuracy to historical data.
[0053] Sequence prediction: The trained ETS model is used to predict the trend and residual terms to obtain the trend prediction value hat{T}{t+h} and the residual prediction value hat{R}{t+h} for the future time period; at the same time, based on the periodicity of the seasonal term, the future seasonal prediction value hat{S}_{t+h} is extrapolated.
[0054] S4. Combine the predicted time series data with the actual traffic data to complete the correction, restoration and prediction of vehicle traffic trajectories;
[0055] Trajectory reconstruction: Based on the multi-source data after correlation matching, the passage points of vehicles at various gantries are connected in order of passage time to form a preliminary vehicle passage trajectory. Then, the trend and seasonal terms obtained from STL decomposition are used to correct the preliminary reconstructed trajectory: if the passage time of a vehicle deviates significantly from the seasonal pattern of the same period in history, the residual term is analyzed to determine whether it is abnormal data (such as incorrect capture time caused by equipment failure). If so, the passage time is corrected according to the trend and seasonal patterns to improve the accuracy of trajectory reconstruction.
[0056] This invention also provides a vehicle trajectory prediction and reconstruction system based on the STL+ETS algorithm, comprising:
[0057] Data preprocessing module: used to collect multi-source traffic data, perform data cleaning, standardization and correlation matching, and construct vehicle traffic trajectory dataset;
[0058] Time series decomposition module: Used to decompose the circulating time series using the STL algorithm to obtain the trend term, seasonal term, and residual term;
[0059] Time series prediction module: used to predict travel time series based on ETS model, and obtain predicted time series;
[0060] Trajectory processing module: Used to combine actual data and predicted data to correct, restore and predict vehicle travel trajectories;
[0061] Anomaly Detection Module: Used to identify abnormal travel trajectories and toll evasion based on the reconstructed and predicted travel trajectories.
[0062] System architecture design
[0063] This invention designs a four-layer system architecture consisting of a data acquisition layer, a data storage layer, an algorithm processing layer, and an application display layer, to achieve full automation of trajectory prediction and reconstruction.
[0064] Data acquisition layer: Collects all flow data in real time from the entrance station, gantry, exit station, and service area.
[0065] Data storage layer: The distributed database HBase is used to store massive amounts of traffic data to meet the high-concurrency read and write requirements; at the same time, a data warehouse is established to summarize and analyze historical data, providing data support for model training and trajectory prediction.
[0066] Algorithm Processing Layer: Implements the core functions of the STL+ETS algorithm, including data preprocessing, time series decomposition, model training, trajectory prediction and reconstruction, etc. It adopts a modular design, encapsulating different functional modules as independent services to facilitate system expansion and maintenance; and utilizes the parallel computing framework Spark to improve algorithm processing efficiency and shorten data processing time.
[0067] Application Presentation Layer: This layer displays the reconstructed and predicted vehicle travel trajectories through a visual interface, including the vehicle's real-time location, historical travel paths, and projected future travel routes. It supports user queries for specific vehicle trajectory information and provides an abnormal trajectory alarm function, promptly issuing alarm messages when vehicles deviate from their normal trajectory or remain stationary for extended periods.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the protection scope of the present invention.
Claims
1. A method for predicting and reconstructing vehicle traffic trajectories based on the STL+ETS algorithm, characterized in that, Includes the following steps: S1. Collect and acquire multi-source traffic data, using license plate numbers as unique identifiers, and perform data cleaning, standardization, and correlation matching on entrance station data, gantry reading data, and exit station data to construct a vehicle traffic trajectory dataset; S2. Construct a traffic time series based on the vehicle traffic trajectory dataset, and use the STL algorithm to perform time series decomposition on the traffic time series to obtain the trend term, seasonal term and residual term; S3. Based on the trend term, seasonal term and residual term obtained from the decomposition, the ETS model is used to predict the travel time series, and the predicted time series data is obtained. S4. Combine the predicted time series data with the actual traffic data to complete the correction, restoration and prediction of vehicle traffic trajectories.
2. The vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm according to claim 1, characterized in that: In step S1, data cleaning includes: removing duplicate data, missing key field data, and logically abnormal data, and filling in missing data that can be filled in through cross-validation of multi-source data.
3. The vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm according to claim 2, characterized in that: In step S1, the standardization process includes: unifying the passage time as a timestamp format, unifying the license plate character format, and unifying the encoding rules for gantry numbers and station numbers.
4. The vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm according to claim 3, characterized in that: In step S2, the parameters of STL decomposition are set as follows: the seasonal smoothing window is 21% of the period and is an odd value, the trend smoothing window is 21% of the period and is an odd value, and the low-pass filter window is greater than the period and is an odd value; and the robust decomposition mode is enabled to resist outliers and noise interference in the data and achieve accurate decomposition of the time series.
5. The vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm according to claim 4, characterized in that: In step S3, the ETS model selection rule is as follows: for traffic data with a linear trend and constant variance, the additive model is preferred; for sequences whose variance increases with the data level, the multiplicative model is selected.
6. The vehicle trajectory prediction and reconstruction method based on the STL+ETS algorithm according to claim 5, characterized in that: In step S4, trajectory correction includes: identifying abnormal passage points that significantly deviate from the trend and seasonal terms as abnormal data, and replacing or correcting them with predicted values.
7. A vehicle trajectory prediction and reconstruction system based on the STL+ETS algorithm, characterized in that, include: Data preprocessing module: used to collect multi-source traffic data, perform data cleaning, standardization and correlation matching, and construct vehicle traffic trajectory dataset; Time series decomposition module: Used to decompose the circulating time series using the STL algorithm to obtain the trend term, seasonal term, and residual term; Time series prediction module: used to predict travel time series based on ETS model, and obtain predicted time series; Trajectory processing module: Used to combine actual data and predicted data to correct, restore and predict vehicle travel trajectories; Anomaly Detection Module: Used to identify abnormal travel trajectories and toll evasion based on the reconstructed and predicted travel trajectories.