Method, system, device and medium for predicting regional mobile activity emission state

By constructing a lightweight inference engine based on pure linear algebra operators and an LSTM model for multi-source heterogeneous data processing, the problems of insufficient spatiotemporal resolution and data quality in the prediction of regional motor vehicle activity levels and emissions are solved, achieving high-precision and low-cost refined prediction, which is suitable for urban management and emissions inventory compilation.

CN122153406APending Publication Date: 2026-06-05SHANGHAI ACADEMY OF ENVIRONMENTAL SCIENCES

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI ACADEMY OF ENVIRONMENTAL SCIENCES
Filing Date
2026-05-07
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for predicting regional motor vehicle activity levels and emissions suffer from problems such as insufficient spatiotemporal resolution, lack of domain knowledge integration, lack of refined emission standard prediction, coarse data quality processing, and unreasonable spatial allocation. These issues result in low prediction accuracy and insufficient generalization ability, making it difficult to meet the needs of refined management.

Method used

A lightweight inference engine based on pure linear algebra operators is adopted, and anomaly detection and repair are performed by combining multi-source heterogeneous data. A prediction model with a periodic time-series structure is constructed, and step-by-step iterative prediction is performed by using an LSTM model. Combined with the holiday classification system and emission factor table, refined prediction is achieved hourly, regional, and emission standard-specific.

Benefits of technology

It improves prediction accuracy, reduces operation and maintenance costs, and achieves high-precision prediction of regional vehicle activity and emissions. In particular, the error is significantly reduced in special scenarios, and it supports multi-dimensional backtesting verification and adaptive data quality processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153406A_ABST
    Figure CN122153406A_ABST
Patent Text Reader

Abstract

The application provides a method, system, device and medium for predicting the emission state of regional motor vehicle activities, the method comprising: acquiring multi-source heterogeneous data related to vehicle mileage prediction; based on a periodic time sequence structure, performing anomaly detection and repair on the multi-source heterogeneous data to obtain time series data; generating standardized parameters, feature vector sequences and training samples used for training the prediction model according to the time series data; then training the prediction model; generating a multi-step prediction sequence through the trained prediction model; in the process of generating the multi-step prediction sequence by the prediction model, combining historical same-period shapes to correct the hourly profile; and performing sliding window backtesting verification on the prediction model. The application provides a method for predicting the activity level and emission amount of regional motor vehicles, and a complete technical link from data cleaning to fine prediction is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of environmental data analysis, and relates to a method, system, equipment and medium for predicting the emission status of regional motor vehicle activities. Background Technology

[0002] With the continuous growth of motor vehicle ownership and the increasing efforts in air pollution prevention and control in my country, accurate prediction of regional motor vehicle activity levels and emissions is of great significance for developing detailed motor vehicle emission inventories, evaluating the effectiveness of emission reduction policies, and optimizing traffic management measures. Motor vehicle activity levels encompass vehicle mileage (VKT), fuel consumption, and emissions of various pollutants (including...). The above indicators (etc.) are all core parameters for constructing the vehicle emission inventory, and their prediction accuracy directly affects the reliability of the emission inventory and the scientific nature of emission reduction decisions. Currently, the prediction of regional vehicle activity levels and emissions mainly relies on the following technical means, but all of them have significant limitations:

[0003] (1) Traditional statistical regression methods lack sufficient spatiotemporal resolution, making it difficult to capture complex nonlinear time-series characteristics. Existing statistical models such as linear regression and ARIMA, widely used in technology, typically predict total amounts at a daily or monthly granularity. However, motor vehicle mileage exhibits significant periodic fluctuations on an hourly scale (e.g., morning and evening rush hours, day-night differences), weekly periodicity (significant differences between weekdays and weekends), and seasonal variations. The aforementioned traditional methods struggle to effectively model these multi-scale, nonlinear time-series dependencies. Especially under the influence of special events such as holidays and extreme weather, the prediction error increases significantly.

[0004] (2) Existing deep learning methods lack sufficient integration of domain knowledge, resulting in poor model interpretability and robustness. Although some studies in recent years have attempted to apply deep learning models such as Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTMs) to traffic flow prediction, most solutions focus on optimizing the design of the network structure itself and lack an effective integration mechanism for professional knowledge in the field of motor vehicle emission management (such as China's unique emission standard classification system, the differentiated impact of complex holiday classifications on travel, and the exponential recovery characteristics after the Spring Festival). This leads to insufficient generalization ability of the models when facing real business scenarios, especially in scenarios with a sharp drop in traffic such as the Spring Festival, where the prediction error usually exceeds 30%.

[0005] (3) Lack of refined forecasting capabilities for the mileage of vehicles with different emission standards. Emission inventory compilation requires distinguishing the mileage contribution of vehicles with different emission standards (e.g., China III, China IV, China V, and China VI). However, due to the dynamic changes in the number of vehicles of each standard as vehicles are phased out and new vehicles are registered, their proportions exhibit a long-term trend of drift (e.g., the proportion of China V vehicles decreases month by month, while the proportion of China VI vehicles increases month by month), and the travel proportions also differ at different times (peak / off-peak). Existing forecasting systems generally lack mechanisms for independently modeling and trend extrapolation of the mileage of vehicles with different emission standards.

[0006] (4) Data quality issues are handled in a crude manner, and outliers and missing values ​​seriously affect prediction accuracy. In actual operation, heavy-duty diesel vehicle remote emission monitoring systems and traffic monitoring systems inevitably experience data loss and abnormal jumps due to data transmission interruptions, sensor failures, system maintenance, and other reasons. Existing technologies usually use crude methods such as simple linear interpolation or direct discarding to handle data quality issues, failing to make full use of the time-series structure of the data itself (such as weekly periodicity) and historical reference information for intelligent repair, which significantly affects the quality of training data and the final prediction effect.

[0007] (5) The spatiotemporal precision of the forecast results is insufficient, making it difficult to meet the needs of refined management. Management departments need to provide accurate forecasts of driving mileage down to the district / county level, hourly, and emission standard level to support regional joint prevention and control and refined law enforcement. However, most existing methods only provide total forecasts for the entire city and lack a systematic approach to scientifically and rationally allocate the total forecast results to various sub-regions (such as the 16 districts of Shanghai), time periods, and emission standards.

[0008] In summary, existing technologies for predicting regional motor vehicle activity levels and emissions suffer from problems such as insufficient spatiotemporal resolution, lack of domain knowledge integration, lack of refined emission standard prediction, crude data quality processing, and unreasonable spatial allocation. Summary of the Invention

[0009] This application provides a method, system, device, and medium for predicting the emission status of regional motor vehicle activities, which addresses the problem of how to improve the accuracy of existing regional motor vehicle activity levels and emission predictions.

[0010] In a first aspect, this application provides a method for predicting the emission status of regional motor vehicle activities, comprising: acquiring multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes traffic flow data and meteorological data for historical periods, meteorological data for the period to be predicted, holiday calendar data, and emission factor tables; wherein, the traffic flow data and meteorological data for historical periods are used for training and inference of the prediction model; based on the periodic time-series structure, performing anomaly detection and repair on the multi-source heterogeneous data to obtain time-series data to be converted; generating standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time-series data; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency. The prediction model is trained using the standardized parameters, the feature vector sequence, and the training samples. The training process includes model architecture design, forward propagation, backpropagation, and adaptive moment estimation algorithm for parameter updates. The trained prediction model feeds back the single-step prediction output as the input for the next step, iteratively generating multi-step prediction sequences. Independent predictions are made for the mileage of each emission standard, constructing a two-layer proportional model combining daily linear trend and hourly deviation correction. Emissions and fuel consumption are calculated based on the predicted mileage values ​​for each emission standard and a pre-set emission factor table. During the generation of the multi-step prediction sequence, hourly profile correction is performed using historical data. The prediction model is then validated through sliding window backtesting.

[0011] In one implementation of the first aspect, the steps of acquiring multi-source heterogeneous data related to vehicle mileage prediction include: acquiring traffic flow data by using a combination of road network loop detection and BeiDou / GPS positioning trajectory methods for mutual supplementation and verification; preprocessing the traffic flow data, including data format and data structure conversion, and presetting emission factor tables; acquiring historical meteorological data based on real-time records from meteorological observation stations; acquiring meteorological data for the forecast period by pre-calling numerical weather prediction products released by meteorological departments; preprocessing the meteorological data, including field renaming, left join merging of time fields and traffic flow data, missing value handling, and splicing of forecast meteorological data; and acquiring holiday calendar data based on statutory holiday announcements, using character... The system stores the mapping relationship between each holiday date and (holiday type, traffic coefficient) in a classic structure, while maintaining a set of make-up workdays; it combines the holiday calendar data to construct a graded index recovery model after long holidays; and it outputs the acquired and processed prediction results data, visualization charts, and backtesting verification data through an application programming interface. The prediction results data are organized in three dimensions: "citywide prediction", n district-level details, and "daily summary", which respectively include citywide hourly prediction data, district-level hourly prediction data, and daily total emissions for each emission standard summarized by date and region. The visualization charts include a citywide VKT prediction chart, a grid chart comparing VKT predictions for each district, a heat map of district rankings, a quality analysis chart, and an optional output emission summary chart. The backtesting verification data includes detailed records of all sliding window backtests.

[0012] In one implementation of the first aspect, the step of performing anomaly detection and repair on the multi-source heterogeneous data based on a periodic time-series structure to obtain time-series data to be converted includes: an anomaly detection algorithm based on historical comparison of the same period, determining that the data point of that hour this week is abnormal when the deviation between the traffic of a certain hour this week and the traffic of the same moment last week exceeds a preset threshold; filling in the missing data based on the constructed complete time series, taking the difference set of the time set of the pre-existing data of the complete time series, and filling in the missing data according to the data of the same moment in the historical period; and repairing the anomaly of the data point of that hour this week based on weighted replacement of historical period data from the previous 1 to 3 weeks.

[0013] In one implementation of the first aspect, the steps of generating standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time series data include: calculating standardized parameters based on multi-source heterogeneous data during normal time periods; constructing a 12-dimensional feature vector as the feature vector sequence for each hourly time step, including standardized total city mileage, hourly period sine component, hourly period cosine component, weekday period sine component, weekday period cosine component, weekday identifier, weekend identifier, holiday identifier, holiday classification coefficient, standardized temperature, normalized rainfall, and normalized humidity; and constructing training samples from the feature matrix using a sliding window approach by inputting two configurable parameters: sequence length and number of days in the validation set.

[0014] In one implementation of the first aspect, the step of training the prediction model using the standardized parameters, the feature vector sequence, and the training samples includes: determining the model architecture of the prediction model; the core parameters of the prediction model include: input feature dimension, hidden layer dimension, output dimension, input sequence length, number of training rounds, initial learning rate of the optimizer, and weight initialization scale; for the input feature vector sequence, instructing the prediction model to perform forward propagation calculation at each time step; employing a time backward propagation algorithm to propagate gradients stepwise from the output layer towards the starting direction of the time sequence; and using the Adam optimization algorithm to update parameters, maintaining independent first-order moment estimates and second-order moment estimates for each parameter.

[0015] In one implementation of the first aspect, the step of hourly profile correction by combining historical patterns during the generation of the multi-step prediction sequence by the prediction model includes: for each natural day within the prediction period, summarizing the predicted values ​​of the actual number of hours in 24 hours or less on that day by the prediction model, and calculating the daily total; sequentially searching historical day data from the previous week and the previous two weeks that belong to the same day of the week as the natural day to determine the search reference pattern; performing a weighted average of the reference pattern by combining the first weight value of the previous week and the second weight value of the previous two weeks; and redistributing the predicted daily total mileage of the prediction model to each hour according to the weighted averaged reference pattern.

[0016] In one implementation of the first aspect, the step of performing sliding window backtesting verification on the prediction model includes: designing a backtesting window, starting from the first available position and sliding backward in 7-day increments until the last position that can accommodate a complete 72-hour prediction; and evaluating the backtesting using a multi-dimensional evaluation index system for the ratio of the average percentage error of the prediction to the variance explained by the model.

[0017] Secondly, this application provides a prediction system for regional motor vehicle activity emission status, comprising: a data acquisition module configured to acquire multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes historical traffic flow data and meteorological data, meteorological data for the period to be predicted, holiday calendar data, and emission factor tables; wherein the historical traffic flow data and meteorological data are used for training and inference of the prediction model; an anomaly repair module configured to perform anomaly detection and repair on the multi-source heterogeneous data based on a periodic time-series structure to obtain time-series data to be converted; a training preparation module configured to generate standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time-series data; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency; and a model training module. The module is configured to train the prediction model using the standardized parameters, the feature vector sequence, and the training samples. The training process includes model architecture design, forward propagation, backpropagation, and adaptive moment estimation algorithm for parameter updates. The model prediction module is configured to use the trained prediction model to feed back the single-step prediction output of the model as the input for the next step, iteratively generate a multi-step prediction sequence, and independently predict the driving mileage for each emission standard. It constructs a two-layer proportion model that combines daily linear trend and hourly deviation correction, and then calculates each emission amount and fuel consumption based on the predicted driving mileage for each emission standard and a preset emission factor table. The shape correction module is configured to perform hourly profile correction by combining historical shapes during the generation of the multi-step prediction sequence by the prediction model. The backtesting verification module is configured to perform sliding window backtesting verification on the prediction model.

[0018] Thirdly, this application provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the electronic device to perform the method.

[0019] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described thereon.

[0020] As described above, the method, system, equipment, and medium for predicting the regional motor vehicle activity emission status described in this application have the following beneficial effects:

[0021] This application demonstrates high prediction accuracy and strong scenario robustness. In actual data validation, the LSTM model's validation set MAPE (Mean Absolute Percentage Error) for predicting the city's total VKT is approximately 3.8%, and the 72-hour moving backtesting MAPE is approximately 8.1%, with an R² of 0.952. The VKT MAPE for each emission standard is controlled at around 10% (National V 9.6%, National VI 7.5%, National IV 10.3%). Even under the special scenario of a sharp drop in traffic flow during the Spring Festival, the MAPE is only about 10.4%, significantly better than the error level of over 30% typically achieved by traditional statistical methods. Because... All were derived linearly from emission factors based on VKT predictions. The accuracy of VKT prediction directly determines the accuracy of all emission and fuel consumption indicators. There is no need to train a model separately for each type of emission. The system serves the two core needs of mileage prediction and emission inventory compilation with a highly efficient architecture of "one-time training and full coverage".

[0022] This application deeply integrates domain knowledge and pioneers a six-level holiday classification system. It is the first to systematically incorporate the six-level holiday classification system for Chinese traffic scenarios (Spring Festival → National Day → May Day → Mini-Holiday → Weekend → Workday) and the post-holiday graded index recovery model into the LSTM feature space. Through the `holiday_ratio` feature channel, discrete holiday events are encoded into continuous quantitative influencing factors, enabling the model to possess excellent predictive capabilities in various complex scenarios. The core innovation of this application lies in the fact that the six-level holiday traffic coefficients and graded index recovery parameters (α, β) are not fixed values ​​based on human experience, but are automatically determined through a data-driven adaptive learning mechanism based on years of historical VKT data. The holiday traffic coefficients are automatically learned by fusing the annual traffic ratios of the same type of holiday over the previous N years (N≥2) using time-decay weighting (decay factor λ, default 0.7), and partial order constraints and rationality checks are set. The recovery parameters are automatically calibrated by fitting measured data from the previous N years of recovery period using Levenberg-Marquardt nonlinear least squares fitting, and robustness is ensured through one-year cross-validation (LOYOCV, R²≥0.85 threshold). The above mechanism enables the coefficients to continuously track long-term structural changes such as urban population structure, travel habits and vehicle ownership, achieving continuous self-evolution of the holiday and recovery model, and improving the cross-year prediction accuracy by about 5% to 15% compared with the fixed parameter scheme.

[0023] This application boasts strong refined prediction capabilities, enabling four-dimensional decomposition prediction. It constructs a four-layer cascaded processing architecture: "LSTM prediction of total VKT for the entire city → extrapolation of emission standard proportion trends → regional spatial allocation → VKT × emission factor-derived emissions," forming a system of "the entire city + 16 districts" × "4 emission standards" × "hourly" × "6 output indicators (VKT + ... The LSTM model is a four-dimensional refined prediction system. It only needs to train and predict the total VKT as the target variable, and the VKT for each emission standard is decomposed through a proportion trend model. The model is calculated through emission factor post-processing after obtaining the VKT prediction values ​​for each emission standard, eliminating the need for separate model training for each emission type. The VKT values ​​are calculated from road network loop and BeiDou positioning trajectory data. A single run can generate over 36,000 prediction values, comprehensively covering the entire prediction chain from driving mileage to emissions of various pollutants.

[0024] This application offers an extremely lightweight deployment, requiring no deep learning framework: the LSTM model is entirely implemented from the matrix operations layer using NumPy (including forward propagation, BPTT backpropagation, and the Adam optimizer). The system only relies on basic data processing components, numerical computation components, table reading and writing components, and visualization components. It requires no GPU, CUDA driver, or any deep learning framework (PyTorch / TensorFlow / Keras), and can complete training and prediction on a regular laptop, greatly reducing the deployment threshold and maintenance costs.

[0025] This application features an adaptive data quality processing mechanism, proposing an anomaly detection algorithm based on weekly periodicity (same-period comparison method, threshold θ=0.55) and an intelligent repair strategy based on weighted replacement of the previous 1-3 weeks (weight W=[0.6, 0.3,0.1]). It includes multiple security mechanisms such as holiday filtering and minimum cardinality verification, effectively addressing common data quality issues in monitoring data, such as transmission interruptions and sensor failures.

[0026] This application innovatively proposes shape correction, which solves the problem of autoregressive smoothing. It proposes a shape correction method that "preserves the daily total and restores the true hourly profile". It combines the daily macro-prediction capability of LSTM with the hourly micro-fluctuation shape of the same period in history (weight of 0.7 for the previous week + weight of 0.3 for the previous two weeks), which effectively solves the common problem of intraday fluctuation smoothing in multi-step autoregressive prediction of deep learning models.

[0027] This application features a systematic backtesting verification framework, employing a multi-dimensional (target variable / total / scenario / standard / window) sliding window backtesting structure. It performs full-coverage backtesting on historical data in 7-day increments, while also incorporating a naive benchmark method as a control to ensure the objectivity and comprehensiveness of the accuracy assessment. Backtesting results are output in structured CSV (Comma Separated Values) format for easy subsequent analysis and auditing.

[0028] This application establishes a multi-source VKT (Vehicle Kernel Measurement) acquisition and emission factor integration mechanism to achieve full-link coverage from mileage to emission inventory: the system supports two VKT acquisition methods: road network loop detectors and BeiDou / GPS (Global Positioning System) positioning trajectory. The former has broad coverage, while the latter can be accurate to the emission standard of a single vehicle. The two complement each other to achieve high-precision VKT statistics for different emission standards. Based on this, a built-in configurable emission factor table (based on the "China Motor Vehicle Emission Factor Model" and local measured correction values) is used to... The linear transition formula seamlessly transforms VKT into... Emissions and fuel consumption are predicted automatically across the entire chain, from vehicle driving activities to pollutant emission inventories. The emission factors of different emission standards vary significantly (e.g., the NOx factor of China VI is only about 1 / 10 of that of China III), which makes the independent modeling of each emission standard in this application more significant in emission prediction scenarios. Attached Figure Description

[0029] Figure 1 This diagram illustrates an application scenario of the method for predicting the regional motor vehicle activity emission status described in this application embodiment.

[0030] Figure 2 The diagram shown is a flowchart illustrating the principle of the method for predicting the regional motor vehicle activity emission status as described in an embodiment of this application.

[0031] Figure 3 The flowchart shown is a data acquisition process for the prediction method of regional motor vehicle activity emission status as described in an embodiment of this application.

[0032] Figure 4 The flowchart shown is an anomaly repair process for the prediction method of regional motor vehicle activity emission status as described in the embodiments of this application.

[0033] Figure 5 The flowchart shown is a training preparation flowchart for the prediction method of regional motor vehicle activity emission status as described in the embodiments of this application.

[0034] Figure 6 The diagram shows the model training flowchart of the prediction method for regional motor vehicle activity emission status as described in the embodiments of this application.

[0035] Figure 7 The diagram shown is a shape correction flowchart of the method for predicting the regional motor vehicle activity emission status as described in an embodiment of this application.

[0036] Figure 8 The flowchart shown is a backtesting verification flowchart of the method for predicting the regional motor vehicle activity emission status as described in the embodiments of this application.

[0037] Figure 9 The diagram shown is a schematic diagram of the structural principle of the prediction system for the regional motor vehicle activity emission status described in the embodiments of this application.

[0038] Figure 10 The diagram shown is a structural connection diagram of the electronic device described in an embodiment of this application.

[0039] Component designation explanation

[0040] 9 Regional vehicle activity emission status prediction system 91 Data acquisition module 92 Error repair module 93 Training Preparation Module 94 Model training module 95 Model prediction module 96 Shape correction module 97 Backtesting verification module 10 electronic devices 101 processor 102 memory 103 Communication interface 104 System bus S21~S27 step S211~S215 step S221~S223 step S231~S233 step S241~S244 step S261~S264 step S271~S272 step Detailed Implementation

[0041] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0042] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0043] The following embodiments of this application provide methods, systems, devices, and media for predicting the emission status of regional motor vehicle activities, including but not limited to applications in scenarios where exhaust emissions are generated during motor vehicle activity within a designated area. Figure 1 As shown.

[0044] This application addresses numerous problems existing in current technologies for predicting regional motor vehicle activity levels and emissions, and constructs a new technology that integrates multi-dimensional domain features, possesses intelligent data cleaning and repair capabilities, and supports target variables (VKT / A novel system and method that can be configured and switched, with adjustable prediction time windows and the ability to achieve refined predictions for multiple emission standards and multiple regions.

[0045] This application specifically proposes a regional vehicle activity level and emission prediction system and method based on LSTM neural network. Its core idea is to construct a complete technical chain from data cleaning to refined prediction, deeply integrating mileage (VKT) data obtained from two complementary methods—road network loop detection and BeiDou / GPS positioning trajectories—with multi-dimensional external influencing factors (including meteorological observation data, pre-calculated and forecasted meteorological data, holiday calendars, time period coding, etc.). This is achieved through a cascaded processing flow of "anomaly detection and intelligent repair → LSTM neural network prediction of total citywide VKT → extrapolation of emission standard proportion trends → hourly shape correction → multi-regional spatial allocation."

[0046] First, achieve refined VKT prediction for the entire city, hourly, regionally, and according to emission standards; then, after obtaining the VKT prediction values ​​for each emission standard, use the built-in emission factor table to... The linear connection formula is automatically calculated. The system calculates emissions and fuel consumption, ultimately outputting a complete vehicle emissions inventory prediction. Specifically, the LSTM model only needs to be trained and predict the total VKT (Vehicle Kilometer Threshold) as the target variable. The VKT for each emission standard is obtained through a proportion trend model decomposition, and all emissions and fuel consumption indicators are post-processed calculations derived from the VKT prediction results, eliminating the need for separate model training for each emission type. The system's input data consists of three parts:

[0047] (1) Hourly VKT and meteorological observation data from the past three months were used for model training and inference.

[0048] (2) Hourly forecast meteorological data for the forecast period (future PRED_HOURS hours, default 72 hours, can be configured to 92 hours, etc.) are pre-calculated by external meteorological forecast API (Application Programming Interface) and directly input into the system.

[0049] (3) Auxiliary configurations such as holiday calendar and emission factor table. The system's training history window SEQ_LEN (default 168 hours), validation set duration VAL_DAYS (default 14 days), and prediction step size PRED_HOURS (default 72 hours, supports flexible configurations such as 92 hours) are all user-configurable parameters and can be adjusted as needed.

[0050] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0051] Please see Figure 2 The diagram shows the principle flowchart of the method for predicting the regional motor vehicle activity emission status described in the embodiments of this application. Figure 2As shown, this application provides a method for predicting the emission status of regional motor vehicle activities, specifically including the following steps:

[0052] S21, acquire multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes traffic flow data and meteorological data for historical periods, meteorological data for the period to be predicted, holiday calendar data, and emission factor table; wherein, traffic flow data and meteorological data for historical periods are used for training and inference of the prediction model.

[0053] Step S21 of this application aims to comprehensively collect all input data related to vehicle mileage prediction, and perform format standardization and preliminary structuring processing using basic data processing components (such as the Python standard library pandas) to form a standardized dataset that can be used by subsequent models. The following details the source, format, field definition, and processing method of each data source.

[0054] Please see Figure 3 The above is a flowchart illustrating the data acquisition process of the method for predicting the regional motor vehicle activity emission status as described in an embodiment of this application. Figure 3 As shown, step S21 acquires multi-source heterogeneous data related to vehicle mileage prediction, specifically including:

[0055] S211, the traffic flow data is obtained by using a combination of road network loop detection and Beidou / GPS positioning trajectory methods for mutual supplementation and verification; the traffic flow data is preprocessed, including data format and data structure conversion and emission factor table presetting.

[0056] The basic indicator of motor vehicle activity level data is the driving mileage (VKT), which can be obtained through two methods: (1) Road network coil detection method: by deploying electromagnetic induction coil detectors on key sections of urban main roads, expressways and highways, the number of vehicles passing through each road segment and the average speed are collected in real time. The VKT of each road segment is calculated in combination with the road segment length, and then the regional VKT is obtained by summarizing by administrative region; (2) Beidou / GPS positioning trajectory method: by collecting high-frequency positioning trajectory data from the heavy-duty diesel vehicle remote emission monitoring system (remote online monitoring of the OBD vehicle automatic diagnostic system) and the taxi / ride-hailing GPS system, the actual driving mileage of each vehicle is calculated after map matching, and then aggregated by emission standard and administrative region. The two methods complement and verify each other. The coil data has a wide coverage but cannot distinguish emission standards. The Beidou trajectory data can be accurate to the emission standard of a single vehicle, but the coverage is limited by the installation rate of vehicle terminals. The system achieves high-precision VKT statistics by emission standard by integrating the two types of data sources. Based on this, the emissions of various pollutants and fuel consumption are calculated by multiplying VKT with the corresponding emission factors using numerical computing components (such as NumPy, a Python standard library). ,in pollutants Or fuel consumption, where VKT(t,s) is the driving distance at time t and emission standard s, and EF is the fuel consumption / emissions. p (s) represents the emission factor (unit: g / km or L / km) of pollutant p corresponding to emission standard s. The emission factor is determined based on (e.g., COPERT-China, MOVES-China, etc.) and local measured correction values. The emission factors differ significantly between different emission standards (China III / China IV / China V / China VI) (e.g., the NOx emission factor of China VI vehicles is only about 1 / 10 of that of China III vehicles). The original source of traffic flow data is the hourly statistical reports from the urban traffic monitoring system.

[0057] Data Format: The system uses table read / write components (such as the Python standard library openpyxl) to obtain traffic flow data through an API interface. Each record represents the vehicle activity level index corresponding to a specific time, administrative region, and emission standard. The system concatenates the acquired data into a unified data structure, DataFrame, and the original field definitions are shown in Table 1.

[0058] Table 1. Definitions of raw fields for traffic flow data (VKT is calculated from coil / BeiDou data). (Derived from VKT × emission factor)

[0059]

[0060] Data preprocessing: (a) Pivot table aggregation: Pivot table operations are performed according to "time × emission standard" to convert the original long format data into a wide format, forming a structure where each row has a timestamp and the columns represent the mileage of each emission standard; then, the mileage of each district in the city is summarized by time to form the city's hourly total VKT time series named "y", which serves as the core training target variable for the LSTM model. (b) Pre-set emission factor table: The system has a built-in emission factor table EF_TABLE (dictionary structure, where the key is the emission standard name and the value contains the emission standard name) for each emission standard. The dictionary contains five factors: emissions, fuel consumption, etc. Emission factors can be customized and updated by the user through a configuration file. Derivative calculations for emissions and fuel consumption are not performed during data preprocessing, but are calculated uniformly as a final post-processing step after LSTM completes VKT prediction and undergoes proportion decomposition, shape correction, and region allocation. The processed core data structure (city DataFrame) fields are shown in Table 2.

[0061] Table 2. Field definitions of the core data structure (city DataFrame) after preprocessing (the y column and the National III to National VI emission standards are both VKT, and the emission amount is derived from the prediction).

[0062]

[0063] On the one hand, the VKT data collection principle includes: Vehicle mileage (VKT) is the fundamental variable for all activity level indicators in this application, and its acquisition methods include two complementary paths: road network loop detection and BeiDou / GPS positioning trajectory method. On the other hand, the emission factor table and derived calculations include: the system has a built-in emission factor table EF_TABLE, which stores the pollutant emission factors and fuel consumption factors corresponding to each emission standard, with units of g / km and L / km, respectively. The emission factors are determined based on the "China Motor Vehicle Emission Factor Model" (such as COPERT-China, MOVES-China, etc.) issued by the Ministry of Ecology and Environment and local measured correction values. The calculation formula is: ,in The emission factors differ significantly across emission standards. For example, the NOx emission factor of a China VI vehicle is only about 1 / 10 that of a China III vehicle. This means that even with the same VKT (Vehicle Kilometer Threshold), the emission contributions of vehicles meeting different emission standards are fundamentally different. This is the core basis for this application to independently model each emission standard. The emission factor table allows users to customize and update it through configuration files to adapt to the actual emission characteristics of different cities and vehicle models.

[0064] S212, acquire historical meteorological data based on real-time records from meteorological observation stations; acquire meteorological data for the forecast period by pre-calling numerical weather prediction products released by meteorological departments; perform data preprocessing on the meteorological data, including field renaming, left join merging of time field and traffic flow data, missing value handling, and splicing of forecast meteorological data.

[0065] Specifically, the meteorological data is divided into two data sources for different time periods, both of which are directly input into the system: (1) Hourly meteorological observation data for the past three months: These data are obtained from real-time records of meteorological observation stations through the meteorological data API interface and are used for the training and inference input sequence construction of the LSTM model after being aligned with the VKT data of the same period; (2) Hourly forecast meteorological data for the period to be predicted: Before the system runs, the external caller calls the numerical weather prediction product (NWP, Numerical Weather Prediction) issued by the meteorological department through the meteorological forecast API interface to obtain the hourly predicted temperature, predicted rainfall, and predicted relative humidity for the next PRED_HOURS hours (default 72 hours, configurable to 92 hours, etc.), and directly inputs the calculation results into the system as input data. During the autoregressive prediction process, the system searches for the corresponding meteorological value from the pre-calculated data by timestamp, without needing to call the external API in real time during the inference process, thus ensuring the determinism and offline operability of the prediction process. The field structures of the two types of meteorological data are completely consistent. The original field definitions are shown in Table 3.

[0066] Table 3. Definitions of raw fields in meteorological data

[0067]

[0068] Data preprocessing: Historical observation data and weather forecast data adopt a unified preprocessing process: (a) Field renaming: "Time" is renamed to "datetime", "Temperature (°C)" is renamed to "temperature", "Rainfall (mm)" is renamed to "precipitation", and "Relative humidity (%)" is renamed to "humidity"; (b) Left join and merge with traffic flow data according to the time field to ensure that the time series of traffic data is used as the basis; (c) Missing value handling: temperature is filled with forward (ffill) and backward (bfill) after linear interpolation; missing values ​​of precipitation are filled with 0; humidity adopts the same interpolation filling strategy as temperature; (d) Forecast meteorological data splicing: the system splices the meteorological observation data of the past 3 months with the pre-calculated forecast meteorological data of the forecast period vertically along the time axis to form a complete meteorological time series covering "historical observation period + future forecast period". During the autoregressive prediction process, at each prediction time t, the corresponding forecast meteorological value is directly retrieved from the spliced ​​sequence by timestamp. Only when the forecast data for that time is missing, the value is used in a degraded manner in the following order: meteorological value used in the previous step of autoregression → global default value (temperature=15℃, precipitation=0, humidity=0.7). Only historical meteorological observation data is used during the training phase.

[0069] S213. Obtain the holiday calendar data based on the statutory holiday announcement, store the mapping relationship between each holiday date and (holiday type, traffic coefficient) using a dictionary structure, and maintain the set of make-up work days.

[0070] Specifically, the holiday calendar data is based on the statutory holiday schedule announcement issued by the State Council of China and is embedded in the system code programmatically. The system uses a dictionary structure HOLIDAY_DETAIL to store the mapping relationship between each holiday date and (holiday type, traffic coefficient), while maintaining a set of make-up workdays WORKDAYS_OVR.

[0071] This application proposes a six-level holiday classification system for Chinese traffic scenarios, quantifying the degree of traffic flow suppression by different types of holidays into differentiated traffic attenuation coefficients (i.e., the ratio of traffic flow during the holiday to that on a normal workday). The core of this application lies in the fact that these traffic coefficients are not fixed values ​​set manually based on experience, but are automatically determined through an adaptive learning mechanism based on years of historical VKT data, and are continuously updated iteratively with new data. When the system is first deployed, it fits initial calibration values ​​using years of historical data (typical values ​​for reference: Spring Festival approximately 0.15, National Day approximately 0.35, May Day approximately 0.55, short holidays approximately 0.70, weekends approximately 0.89, and workdays 1.0; specific values ​​vary depending on the city and year), and is automatically recalibrated annually thereafter. The specific method of the adaptive learning mechanism is as follows:

[0072] (a) Collection of samples from similar holidays over many years: For each type of holiday H∈{spring, national, medium, minor}, the system automatically retrieves hourly VKT data for all instances of that holiday type from the historical VKT database over the previous N years (N≥2, N=3~5 recommended). For example, when learning the Spring Festival traffic coefficient, all hourly data for the five Spring Festival holidays from 2021 to 2025 are retrieved to form a historical sample pool for that holiday type.

[0073] (b) Calculation of annual flow ratio: for each year For example, calculate the ratio of the average VKT during the holiday period to the average VKT for normal working days in the same year (excluding all holidays, recovery periods, and weekends):

[0074] This ratio directly reflects the first... The actual extent to which the holiday suppressed traffic flow that year.

[0075] (c) Time-decay weighted fusion: Using the same time decay strategy as the restoration parameter calibration, the ratios for each year are weighted and averaged. The attenuation factor λ = 0.7, and Y_current represents the current year. This weighting strategy gives higher weight to recent data, reflecting the impact of long-term changes such as urbanization and population flow patterns on holiday traffic trends.

[0076] (d) Reasonableness Verification and Rollback Mechanism: The learned coefficients must pass a reasonableness verification: r_learned(H) must satisfy 0.05 ≤ r_learned(H) ≤ 0.95, and a reasonable partial order relationship must be maintained between each holiday type (i.e., r(spring) < r(national) < r(medium) < r(minor) < r(weekend)). When the number of historical samples for a certain type of holiday is less than 2 years, or the learned value fails the reasonableness verification, the system automatically rolls back to the historical data calibration value for that type of holiday (obtained by fitting based on available historical data during the initial deployment of the system) and records a warning log. The learned coefficients are automatically recalibrated each time the system receives holiday data for a new year, realizing the continuous self-evolution of the holiday traffic model, as shown in Table 4.

[0077] Table 4 Holiday Classification System and Traffic Coefficient (Typical Calibration Values, which are automatically learned from historical data during actual system operation)

[0078]

[0079] S214. Based on the holiday calendar data, construct a graded index recovery model after the long holiday.

[0080] Specifically, after the Spring Festival, National Day (October 1st), and Labor Day (May 1st) holidays, urban traffic flow does not immediately return to normal levels, but rather follows exponential recovery curves of varying intensities. The recovery is slowest during the Spring Festival (due to the strongest effects of logistics disruptions and staggered return-to-city travel), followed by National Day, and weakest during May Day. To accurately model the differentiated recovery process of each long holiday, this application designs a unified formula for calculating the graded recovery coefficient:

[0081]

[0082] Where: R(d, H) is the traffic recovery coefficient on day d after the end of holiday H; d is the number of days until the last day of holiday (HOLIDAY_END), calculated using floating-point numbers accurate to the second. H∈{spring, national, labor} corresponds to Spring Festival, National Day, and May Day, respectively.

[0083] α(H) is the initial attenuation amplitude (equal to 1 minus the traffic coefficient corresponding to the holiday, ensuring a smooth connection between the recovery start point and the end of the holiday).

[0084] β(H) is the recovery rate parameter (base), which controls the steepness of the curve.

[0085] The parameter configurations for the three types of long holidays are as follows (examples):

[0086] Spring Festival (H=spring): α=0.85, β=0.55, recovery period 10 days, R(0)≈0.53, logistics shutdown and staggered return to city led to the slowest recovery;

[0087] National Day (H=national): α=0.65, β=0.60, recovery period 7 days, R(0)≈0.35, tourism return is relatively fast;

[0088] May Day (H=labor): α=0.45, β=0.65, recovery period 5 days, R(0)≈0.55, short-distance travel is more flexible and recovers the fastest. Data points during the recovery period are marked with "recovery" in the hgrade field, and daytype is determined according to the actual day of the week (1 for weekends, 0 for weekdays).

[0089] Therefore, the model in step S214 of this application is upgraded to a tiered recovery system covering the three major long holidays of Spring Festival, National Day, and May Day, providing a tiered index recovery model for China's three major statutory long holidays, using the formula... Among them, the nonlinear recovery process of logistics resumption and personnel return to the city after different holidays was accurately modeled by using differentiated dual-parameter combinations for Spring Festival (α=0.85, β=0.55, recovery period of 10 days), National Day (α=0.65, β=0.60, recovery period of 7 days), and May Day (α=0.45, β=0.65, recovery period of 5 days).

[0090] The recovery parameters α(H), β(H), and recovery period days D(H) in this application are not fixed values ​​based on human experience, but are automatically learned and determined through an adaptive calibration method based on years of historical data. The parameter values ​​given in step S214 (e.g., α=0.85, β=0.55 for Spring Festival) are typical calibration results obtained by fitting historical data and are only used as examples. In actual deployment, the system will re-perform the fitting based on local historical VKT data, and the calibration results will vary for different cities and years. The adaptive calibration method proposed in this application uses measured recovery period data after similar long holidays in the previous N years (N≥2, N=3~5 recommended) to automatically learn the optimal combination of recovery parameters through nonlinear least squares fitting, eliminating the subjectivity and uncertainty of human experience settings. The adaptive calibration method for recovery parameters based on years of historical data proposed in this application includes:

[0091] (1) Historical recovery sample collection

[0092] For each type of long holiday H∈{spring, national, labor}, the system automatically retrieves the daily average VKT data from the historical traffic flow database for the recovery period following the end of that holiday in the previous N years. The specific process is as follows:

[0093] (a) Based on the State Council's annual holiday schedule announcement, automatically locate the end date of each long holiday: HOLIDAY_END(H, year);

[0094] (b) From the first day after the end of each year's holiday to the [missing information] sky( The upper limit for the search is 15 days (default). The candidate interval for the recovery period is defined by extracting the city's average VKT value VKT_daily(d, year) for each day within this interval.

[0095] (c) Calculate the daily flow recovery ratio R_obs(d, year) = VKT_daily(d, year) / VKT_normal(year), where VKT_normal(year) is the daily average VKT baseline value for normal working days (excluding holidays, recovery periods, and weekends) during the same period of the year;

[0096] (d) Remove abnormal samples: If there are abnormal data points caused by unconventional events such as extreme weather (daily rainfall > 50 mm) or temporary traffic control during the recovery period of a certain year, they are removed by the 3σ criterion or manual annotation to ensure the representativeness of the training samples.

[0097] (2) Parameter fitting based on nonlinear least squares

[0098] All valid recovery samples from the previous N years were aggregated into a training set. , where i iterates through all valid recovery days for all years. For each type of long holiday H, the recovery formula is used. For the objective function, construct a nonlinear least squares optimization problem:

[0099]

[0100] in, For sample weights, a time-decay weighting strategy is adopted: samples closer to the current year have higher weights, specifically... λ is the attenuation factor (default λ=0.7). Y_current represents the current year of the sample, and Y_current represents the current predicted year. The design principle of this weighted strategy is that factors such as recent urbanization, changes in road networks, and population flow patterns have a more timely impact on the recovery characteristics, and data from newer years should receive higher fitting weights. The constraints are: 0 < α ≤ 1.0 (initial decay does not exceed 100%), 0 < β < 1.0 (ensuring exponential convergence). The optimization algorithm uses the Levenberg-Marquardt method, using prior calibration values ​​or default initial guesses within a reasonable range (e.g., α∈[0.3,0.9], β∈[0.4,0.8]) as the starting point for optimization to accelerate convergence.

[0101] (3) Adaptive determination of the number of days of recovery period

[0102] The recovery period days D(H) are no longer a fixed preset value, but are automatically calculated based on the fitted parameters. The recovery completion threshold θ_R = 0.95 (i.e., traffic recovering to 95% of normal levels) is defined. Therefore, the recovery period days are the smallest integer number of days that satisfies R(D, H) ≥ θ_R.

[0103]

[0104] in This is for floor function operations. A safety limit is also set. (15 days for Spring Festival, 10 days for National Day, and 7 days for May Day). When the calculated value exceeds the upper limit, the upper limit value is taken to prevent the recovery period from being too long due to abnormal fitting.

[0105] (4) Parameter robustness verification and rollback mechanism

[0106] To ensure the reliability of the adaptive calibration results, the system employs Leave-One-Year-Out Cross Validation (LOYOCV) to evaluate the robustness of the fitted parameters. Specifically, the recovery data for each year is used as the validation set, while the remaining years are used as the training set for parameter fitting. The fitted recovery curve on the validation set is then calculated. Value. If all folds If the parameters fitted from the full dataset are used as the final values, then the parameters are taken as the final values; if any fold... If the system fails to return to the default initial calibration value for that holiday type (derived from available historical data during initial system deployment), it will also record the abnormal year and fitting diagnostic information in the log for manual review.

[0107] In addition, the system supports incremental parameter updates: after the recovery data collection for each new year's long holiday is completed, the new data is automatically included in the training set, and the parameter fitting process is re-executed to achieve continuous self-evolution of the recovery model. After each calibration, the system outputs a parameter comparison report, including a three-way comparison of the current calibration value, the previous calibration value, and the initial calibration value, as well as a visual overlay of the recovery curves for each year, making it easy for business personnel to intuitively review the rationality of parameter changes.

[0108] Therefore, step S214 of this application provides an adaptive calibration method for the exponential recovery parameter after a long holiday based on multi-year historical recovery data, comprising: (a) automatically retrieving a sample set of daily VKT recovery ratios for the recovery period after the end of similar long holidays in the previous N years (N≥2); (b) assigning higher weights to recent samples using a time decay weighting strategy (decay factor λ=0.7); (c) using... (d) Using the objective function, the optimal α and β parameters are solved by Levenberg-Marquardt nonlinear least squares optimization; (e) The recovery period days D(H) are automatically calculated based on the recovery completion threshold θ_R=0.95; (f) The robustness of the parameters is evaluated by one-year cross-validation. The system automatically reverts to preset values. The resulting technical effect is to eliminate the subjectivity of manually setting recovery parameters, enabling the recovery model to adapt to long-term structural changes such as urban development and population flow patterns, and improving the accuracy of cross-year forecasts by approximately 5% to 15% compared to fixed-parameter schemes.

[0109] S215, outputs the acquired and processed prediction results data, visualization charts, and backtesting verification data through the application programming interface; the prediction results data are organized in three dimensions: "citywide prediction", n district-level details, and "daily summary", which respectively include citywide hourly prediction data, district-level hourly prediction data, and daily total emissions for each emission standard summarized by date and region; the visualization charts include a citywide VKT prediction chart, a grid chart comparing VKT predictions for each district, a heat map ranking each district, a quality analysis chart, and an optional output emission summary chart; the backtesting verification data includes detailed records of all sliding window backtests.

[0110] Specifically, the system ultimately outputs three types of data through the API interface: prediction results data, visualization charts, and backtesting validation data. The specific content and data structure of each type of output are as follows.

[0111] (1) Prediction results data

[0112] Includes hourly and emission standard-specific VKT forecast data for the entire city and n districts, as well as data derived from VKT × emission factors. Data. An example of the data structure is shown in Table 5a.

[0113] Table 5a Example of data structure for prediction results (VKT unit is km, emissions) The units are g, and the fuel consumption unit is L. Both are calculated by VKT × emission factor after treatment.

[0114]

[0115] The forecast results are organized into three dimensions: "Citywide Forecast", "Detailed Forecast for n Districts", and "Daily Summary". These include hourly forecast data for the entire city, hourly forecast data for each district, and daily totals for each emission standard summarized by date and region. All values ​​are rounded to the nearest integer.

[0116] (2) Visual charts

[0117] Four high-resolution (150 dpi) charts are output using visualization components (such as matplotlib, a Python standard library), including: a city-wide VKT forecast chart (comparison of historical and forecast values, VKT curves for each emission standard component, and a stacked area map of percentages), a grid chart comparing VKT forecasts for each district, a heatmap of district rankings, and a quality analysis chart (method comparison, scenario analysis, emission standard accuracy, backtesting stability, and formal forecast). An optional output chart summarizing emissions (derived from the VKT forecast results) is also available.

[0118] (3) Backtesting verification data

[0119] It contains detailed records of all sliding window backtests, and an example of the data structure is shown in Table 5b.

[0120] Table 5b shows an example of the backtesting validation data structure (which also includes fields for actual and predicted values ​​of various emission standards, but is omitted here).

[0121]

[0122] Each row of backtesting data corresponds to a "prediction window × prediction time". Fields include prediction time, lead time hours, day type, holiday level, actual total VKT, LSTM predicted total VKT, naive method prediction value, actual and predicted VKT values ​​for each emission standard, and values ​​derived from VKT × emission factor. Actual and predicted values ​​for each indicator.

[0123] S22, based on the periodic time-series structure, anomaly detection and repair are performed on the multi-source heterogeneous data to obtain the time-series data to be converted.

[0124] Step S22 of this application is the core link of the data preprocessing process. It utilizes the weekly periodicity of traffic flow data itself and systematically solves the problems of abnormal jumps and missing data in the original data through a three-stage process of "detection → completion → repair".

[0125] Please see Figure 4 This is a flowchart illustrating the anomaly repair process of the method for predicting the regional motor vehicle activity emission status as described in this application embodiment. Figure 4 As shown, step S22, based on the periodic time-series structure, performs anomaly detection and repair on the multi-source heterogeneous data to obtain the time-series data to be converted, specifically including:

[0126] S221, an anomaly detection algorithm based on historical comparison, determines that there is an anomaly in the data point of that hour this week if the deviation between the traffic of a certain hour this week and the traffic of the same time last week exceeds a preset threshold.

[0127] The core idea of ​​this anomaly detection application is that during normal (non-holiday) periods, urban traffic flow exhibits a significant weekly periodicity, meaning that the traffic flow at a certain hour this week should be similar to the traffic flow at the same time last week. When the deviation between the two exceeds a preset threshold, the current data point is considered to be abnormal.

[0128] The specific algorithm flow is as follows:

[0129] For each data point y(t) in the time series, first determine whether its holiday level h_grade belongs to {spring, minor, medium, national, recovery}. If so, skip that point (the decrease in holiday traffic is a known normal phenomenon and should not be marked as abnormal). Then obtain the reference value for the same time last week. 168 represents the number of hours in a week. The validity of the reference value is checked: if the reference value is missing (i.e., data from the previous week is missing), it is skipped; if the reference value is less than the minimum threshold of 10,000 km, it is skipped (to avoid misjudgment based on extremely low baselines); if the reference time itself is during a holiday or recovery period, it is skipped (to avoid using abnormal data as a reference benchmark).

[0130] After the above tests, calculate the ratio of the current value to the reference value:

[0131]

[0132] When ratio(t) < θ (in this embodiment, the anomaly threshold θ = 0.55, that is, the current value is lower than 55% of the value at the same time in the previous week), the data point is marked as an anomaly, and its time, actual value, reference value and ratio information are recorded in the anomaly log (anomaly_log).

[0133] S222, based on the missing data of the constructed complete time series, the difference set of the time set of the existing data of the complete time series is taken, and the missing data is filled in according to the synchronous data of the historical time period.

[0134] Specifically, the system first constructs a complete hourly time series `full_range` from the start time of the data to the end time (23:00 on the last day), and then takes the difference between this full_range and the existing time series to obtain all missing time points `missing_times`. For each missing time point `t`, the system searches the previous week in order of priority. and the previous two weeks Simultaneous data updates: If a valid reference row is found, all data columns of that row (including total mileage y and mileage for each emission standard) are copied, and the timestamp, hour identifier, day type (day_type), holiday grade (h_grade), and holiday flow coefficient (h_ratio) are updated to the correct values ​​corresponding to the current time. Meteorological data is also updated by searching for the record corresponding to the current time in the meteorological data file.

[0135] S223, anomalies were found in the data points for this hour of the week, and repairs were performed using a weighted replacement of historical data from the previous 1 to 3 weeks.

[0136] For all abnormal data points detected in step S221, the system uses a weighted average of historical values ​​from the previous 1 to 3 weeks to perform repair. The repair simultaneously applies to the five numerical columns: the total VKT column (y) for the entire city and the VKT sub-columns for each emission standard (National III, National IV, National V, and National VI), ensuring internal data consistency.

[0137] The specific repair formula is as follows:

[0138]

[0139] The weight vector is w = [0.6, 0.3, 0.1], meaning the weight for the previous week is 0.6, for the previous two weeks it's 0.3, and for the previous three weeks it's 0.1. The weight design principle is to give higher weights to more recent data to fully utilize temporal proximity. Each reference point must pass a validity check: (a) the data for that point must exist; (b) that point is not in a holiday, recovery period, or other special time period. If reference data for a week is unavailable, that week is automatically skipped, and only the data from available weeks and their corresponding weights are used for a weighted average (weights are normalized to a sum of 1).

[0140] S23, Based on the time series data, generate standardized parameters, feature vector sequences, and training samples for training the prediction model; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency.

[0141] Step S23 of this application converts the cleaned time series data into a 12-dimensional feature vector sequence acceptable to the LSTM model. The feature design fully integrates the standardized values ​​of the target variable, multi-scale time period encoding, day type identification, holiday classification information, and meteorological factors, forming a multi-dimensional feature space that comprehensively reflects the influencing factors of traffic flow.

[0142] Please see Figure 5 The diagram shows a training preparation flowchart for the method for predicting the regional motor vehicle activity emission status described in this application embodiment. Figure 5As shown, step S23 generates standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time series data, specifically including:

[0143] S231, calculates standardized parameters based on multi-source heterogeneous data during normal periods.

[0144] Specifically, the standardized parameters are calculated only based on data from normal periods (h_grade == 'normal') to avoid contaminating the statistics with abnormally low values ​​such as those from holidays. The target variable y of the LSTM model is the total VKT (mileage traveled) in the city, and the standardized parameters μy and σy are calculated on VKT data from normal periods.

[0145] μy = mean(y | h_grade = 'normal')

[0146] σy = std(y | h_grade = 'normal')

[0147] μ_T = mean(temperature), σ_T = max(std(temperature), 1)

[0148] The standard deviation of temperature is set to a minimum of 1 to prevent division by zero or amplification of noise when the temperature change is extremely small.

[0149] S232, for each hourly time step, construct a 12-dimensional feature vector as the feature vector sequence, including the standardized total mileage of the city, hourly period sine component, hourly period cosine component, weekday period sine component, weekday period cosine component, weekday identifier, weekend identifier, holiday identifier, holiday classification coefficient, standardized temperature, normalized rainfall, and normalized humidity.

[0150] For each hourly time step t, construct the 12-dimensional feature vector f(t) as shown in Table 5 below:

[0151] Table 5. Detailed definition of 12-dimensional feature vectors

[0152]

[0153]

[0154] S233 constructs training samples from the feature matrix using a sliding window approach by inputting two configurable parameters: sequence length and number of days in the validation set.

[0155] Specifically, training samples are constructed from the feature matrix using a sliding window approach. The system provides two configurable parameters: the input sequence length SEQ_LEN (default 168 hours, i.e., 1 week; users can adjust as needed, such as 336 hours = 2 weeks to capture longer dependencies) and the validation set days VAL_DAYS (default 14 days, adjustable from 7 to 30 days). For each position i (i ≥ SEQ_LEN) in the feature sequence, the 12-dimensional features of the previous SEQ_LEN time steps are extracted as the input sequence X[i] (shape: SEQ_LEN × 12), and the y_norm value at the i-th time step is used as the prediction target Y[i] (shape: 1). According to the time order, the samples of the last VAL_DAYS days (VAL_DAYS × 24 hours) are divided into the validation set (X_va, Y_va), and the rest are the training set (X_tr, Y_tr). During training, the training set samples are randomly permuted to improve training stability.

[0156] S24, the prediction model is trained using the standardized parameters, the feature vector sequence, and the training samples; the training process includes model architecture design, forward propagation, back propagation, and adaptive moment estimation algorithm for parameter updates.

[0157] Step S24 of this application details the architecture design, core algorithm implementation, and training strategy of the LSTM neural network, which is the core of the predictive capability of this application.

[0158] Please see Figure 6 The diagram shows the model training flowchart of the prediction method for regional motor vehicle activity emission status described in this application embodiment. Figure 6 As shown, step S24 trains the prediction model using the standardized parameters, the feature vector sequence, and the training samples, specifically including:

[0159] S241, determine the model architecture of the prediction model; the core parameters of the prediction model include: input feature dimension, hidden layer dimension, output dimension, input sequence length, number of training rounds, optimizer initial learning rate, and weight initialization scale.

[0160] This application adopts a network architecture with a single-layer LSTM and a fully connected output layer. Its design follows the principle of "sufficient simplicity to avoid overfitting and sufficient power to capture temporal dependencies". The core parameter configuration of the model is shown in Table 6.

[0161] Table 6 LSTM Model Core Parameter Configuration

[0162]

[0163] The model parameter matrices are defined as follows: the weight matrix W_h (shape: 4H×H) represents the connection weights from the hidden state to the gate; the weight matrix W_x (shape: 4H×input_size, i.e., 4H×12) represents the connection weights from the input to the gate; the bias vector b (shape: 4H) represents the gate bias, where the first H elements (corresponding to the forget gate) are initialized to 1.0, and the rest are initialized to 0; the output weight matrix Wy (shape: output_size×H, i.e., 1×32) represents the fully connected weights from the hidden state to the output; the output bias by (shape: output_size, i.e., 1) is initialized to 0. All weight matrices are arranged in the merged storage in the order of [forget gate f, input gate i, candidate memory g, output gate o], with each gate occupying H dimensions.

[0164] S242, For the input feature vector sequence, let the prediction model perform forward propagation calculation at each time step.

[0165] Specifically, for the input sequence X = [x_1, x_2, ..., x_T] (where T = 168, and each x_t is a 12-dimensional vector), the LSTM performs the following computation at each time step t. The hidden state h and the memory unit c are both initialized as a vector of all zeros (shape: H).

[0166] First, calculate the merged gate vector:

[0167]

[0168] Where gates(t) is a 4H-dimensional vector, which is sequentially divided into four H-dimensional sub-vectors, and the four gates are calculated using different activation functions respectively:

[0169] Forget gate: f(t) = σ(gates[0 : H])

[0170] Input gate: i(t) = σ(gates[H : 2H])

[0171] Candidate memories:

[0172] Output gate: o(t) = σ(gates[3H : 4H])

[0173] in, For numerically stabilized sigmoid functions, the clip operation prunes the input to a specified range to prevent numerical overflow. Then, the memory cells and hidden states are updated:

[0174]

[0175]

[0176] Where ⊙ represents the Hadamard product (element-by-element multiplication). The intermediate states at each time step are (x_t, h_{t-1}, c_{t-1}, f). t i t , g t , o t , c t , h t All sequences are cached in the cache list for use in backpropagation. The final sequence output is calculated through a fully connected layer.

[0177]

[0178] S243 employs the backpropagation algorithm, which propagates the gradient gradually from the output layer towards the beginning of the time series.

[0179] Specifically, the loss function uses mean squared error (MSE): The system employs the Backpropagation Through Time (BPTT) algorithm, which propagates gradients gradually from the output layer towards the beginning of the time series.

[0180] The core steps of backpropagation are as follows:

[0181] (a) Output layer gradient: ; (Extraproduct); dby = dy;

[0182] .

[0183] (b) For time step t, iterate backwards from T to 1, retrieve all intermediate states of that step from the cache, and calculate the original gradient of the output gate in sequence. ; Memory cell gradient Candidate memory original gradient ; Input gate original gradient Forget gate original gradient .

[0184] (c) Concatenate the four gated gradients into `dgates = concat([df_raw, di_raw, dg_raw, do_raw])`, and clip them to the range [-5, 5] to prevent gradient explosion. Then accumulate the parameter gradients: ; ;db += dgates. Propagate hidden state gradients: ; Transfer the gradient of the memory cell: dc = dc · f.

[0185] (d) Finally, the gradients of all parameters (dW_h, dW_x, db, dWy, dby) are clipped to [-1,1] as a safety guarantee for global gradient clipping.

[0186] S244 uses the Adam optimization algorithm to update parameters, maintaining independent first-order moment estimates and second-order moment estimates for each parameter.

[0187] Specifically, parameter updates employ the Adam (Adaptive Moment Estimation) optimization algorithm. This algorithm maintains independent first-order moment estimates (momentum) *m* and second-order moment estimates (adaptive learning rate) *v* for each parameter, with the update formula as follows:

[0188]

[0189]

[0190]

[0191]

[0192] Here, k iterates through all parameter matrices {W_h, W_x, b, Wy, by}. t represents the global time step (cumulative across epochs). This is a moment estimate after bias correction, which solves the problem of the moment estimate being biased to zero in the early stage of training.

[0193] The learning rate annealing strategy is as follows: starting from the 5th epoch (ep >= 4), after each training round, the learning rate is multiplied by a decay factor of 0.7 (i.e., lr = lr × 0.7) to achieve the annealing effect of gradually reducing the learning rate, which helps the model converge more finely in the later stages of training.

[0194] Specifically, the LSTM model in this application is implemented entirely from the bottom layer using the Python NumPy numerical computing library, including all computational logic for forward propagation, BPTT backpropagation, and the Adam optimizer, without relying on any large-scale deep learning frameworks such as PyTorch, TensorFlow, or Keras. This technical choice has the following unique advantages in this application scenario. Based on the prediction model trained in step S24, this application provides a method for predicting motor vehicle traffic flow in a high-security, low-computing-power regulatory environment. It utilizes a lightweight LSTM inference engine based on pure linear algebra operators, relying only on basic data processing components, numerical computation components, table read / write components, and visualization components. The total deployment size does not exceed 200MB, and it supports millisecond-level autoregressive prediction in a government intranet environment without GPUs or deep learning framework dependencies. Therefore, the technical effects achieved by this application include:

[0195] (a) Lightweight deployment: The system's entire dependencies consist only of basic data processing components, numerical computation components, table reading and writing components, and visualization components, while a typical PyTorch / TensorFlow environment usually requires several gigabytes. This allows the system to run directly on any computing device equipped with a Python environment, without the need for GPUs and CUDA drivers.

[0196] (b) The computation is completely transparent and auditable: every step of all matrix operations, gradient calculations, and parameter updates can be directly reviewed and verified through the source code, eliminating any "black box" operations within the framework. This is of significant value in environmental regulatory scenarios, facilitating compliance reviews and result reproduction by technical auditing agencies.

[0197] (c) Operational efficiency meets business needs: Under the data scale of this embodiment (approximately 3 months of hourly data, approximately 2000+ training samples), the complete training of 8 epochs can be completed in minutes on a regular server CPU, and the 72-hour autoregressive prediction is completed in milliseconds, fully meeting the business timeliness requirements of daily or weekly rolling prediction.

[0198] S25 uses the trained prediction model to feed back the single-step prediction output of the model as the input for the next step, iteratively generating a multi-step prediction sequence and making independent predictions for the driving mileage of each emission standard. It constructs a two-layer proportional model that combines daily linear trend and hourly deviation correction, and then calculates each emission amount and fuel consumption based on the predicted driving mileage of each emission standard and the preset emission factor table.

[0199] The architecture implemented in step S25 of this application is defined as a "layered adaptive decomposition algorithm". The total mileage layer is driven by short-term fluctuation factors such as weather / daily type learned by LSTM; the emission standard proportion layer is driven by long-term evolution factors such as vehicle renewal policies learned by linear trend model. The two layers are completely decoupled, which is different from the coupling path of "total flow → OD matrix to infer vehicle type" in the existing technology, and has stronger regulatory robustness.

[0200] (1) Autoregressive multi-step prediction algorithm (prediction step size PRED_HOURS is configurable)

[0201] After the LSTM model is trained, an autoregressive rolling prediction method is used to predict the hourly total PRED_HOURS for the next hour (PRED_HOURS defaults to 72, but users can set it to any positive integer such as 24, 48, 72, 120, 168, etc.). The core of this method is to feed back the single-step prediction output of the model as the input for the next step, iteratively generating a multi-step prediction sequence. The specific algorithm flow is as follows:

[0202] (a) Initialization: Take the feature matrix of the most recent SEQ_LEN hour as the initial sliding window seq (shape: SEQ_LEN×12, default SEQ_LEN=168).

[0203] (b) For prediction steps from 0 to 71 (72 steps in total): input the current seq into the LSTM model to obtain the standardized prediction value pn[0]; destandardize to obtain the total predicted VKT value. The unit is km, where the max operation ensures that the mileage is non-negative; add py to the prediction results list.

[0204] (c) Construct the 12-dimensional feature vector nf corresponding to the predicted time: the 0th dimension is the standardized value pn[0] of the model output; the 1st-4th dimensions are the hourly and weekday sine and cosine period codes of the time (calculated by the predicted timestamp t); the 5th-7th dimensions are the day type one-hot codes (obtained by getinfo(t); the 8th dimension is the holiday classification coefficient (obtained by getinfo(t); the 9th-11th dimensions are the meteorological features of the time, which are directly searched for by timestamp t from the forecast meteorological data of the predicted period provided in the system input (this data is pre-calculated by the external caller through the meteorological forecast API and passed in as the system input, covering the hourly predicted temperature, precipitation, and relative humidity of the future PRED_HOURS hours); only when the forecast data of the time is missing, the meteorological value of the previous step of the autoregression or the global default value (temperature=15℃, precipitation=0, humidity=0.7) is used in a downgraded manner. Since the forecast weather is provided in advance as input, the system does not need to call external APIs in real time during the autoregressive inference process, which ensures the determinism and offline operability of the forecast process. At the same time, it eliminates the systematic bias introduced by "using historical weather as a substitute for future weather", and significantly improves the forecast accuracy under high-impact weather events such as rainfall and extreme temperatures.

[0205] (d) Update the sliding window: This means deleting the first line of the window and appending nf to the end, keeping the window length constant at 168.

[0206] (e) Repeat steps (b)-(d) a total of PRED_HOURS times to output the complete PRED_HOURS hourly prediction sequence lstm_preds.

[0207] (2) Emission Standard Proportion Trend Model

[0208] To achieve independent prediction of driving mileage for each emission standard (China III / China IV / China V / China VI), this application constructs a two-layer proportional model of "daily linear trend + hourly deviation correction":

[0209] (2.1) Daily linear trend fitting

[0210] Based on the past three months of data during normal periods (excluding holidays day_type==2 and recovery period h_grade=='recovery'), calculate the percentage of each emission standard s in each hour: Then, using the number of days from the start date of the data, d(t), as the independent variable and pct_s(t), as the dependent variable, a first-order linear regression (numpy.polyfit, degree=1) is performed to obtain the slope a_s and intercept b_s:

[0211]

[0212] In this embodiment, typical fitting results are as follows: the slope for China V emission standard is approximately -0.018% / day (approximately -0.54% / month), the slope for China VI emission standard is approximately +0.017% / day (approximately +0.52% / month), the slope for China IV emission standard is approximately -0.006% / day, and the slope for China III emission standard is close to 0. These trends reflect changes in emission standard structure caused by vehicle replacement. The linear trend parameters (a_s, b_s) and hourly deviation coefficient (h_adj) are all updated weekly using a rolling update strategy: each week, the system automatically re-executes linear regression fitting and deviation statistics using data from the most recent three months, and the updated parameters are immediately used for subsequent predictions. This rolling update mechanism ensures that the proportion trend model can continuously track the drift in emission standard structure caused by vehicle replacement, changes in new vehicle registration policies, etc., avoiding the accumulation of prediction deviations due to outdated parameters.

[0213] (2.2) Hour-level deviation correction

[0214] Calculate the percentage deviation coefficient of each emission standard for each time period within a 24-hour period, based on the daily type dt (0 = weekday, 1 = weekend, 2 = holiday). For each emission standard s and daily type dt, first calculate the overall average percentage of that standard under that daily type. Then, group by hour h (0~23) and calculate the percentage of each hour hp_s_dt(h); the deviation coefficient is defined as: A deviation coefficient greater than 1 indicates that the percentage of that hour is higher than the daily average, while a deviation coefficient less than 1 indicates that it is lower than the daily average.

[0215] (2.3) Calculation and normalization of final proportion

[0216] The formula for calculating the ratio of prediction time t to emission standard s is:

[0217]

[0218] The proportions of the four standards were normalized so that their sum was 100%. The final VKT prediction values ​​for each emission standard are: After obtaining the VKT prediction values ​​for each emission standard, the system automatically calculates the emissions and fuel consumption using the built-in emission factor table. ,in:

[0219] s represents the emission standard (China III / China IV / China V / China VI). This step is a pure post-processing calculation and requires no additional model training.

[0220] S26, during the process of generating a multi-step prediction sequence in the prediction model, hourly profile correction is performed by combining the shape of the historical period.

[0221] Step S26 of this application provides a method for hourly profile shape correction based on energy redistribution, comprising: (a) locking the daily total D_lstm using LSTM; (b) retrieving historical profiles of the same weekday from the previous 1-2 weeks as shape templates; (c) weighting and fusing the shape templates with weights [0.7, 0.3]; and (d) redistributing the daily total energy according to the normalized shape. The achieved technical effect is: effectively restoring the true peak flow of heavy-duty diesel vehicles during the late-night operation peak (3:00-5:00), and solving the generality deficiency of the autoregressive smoothing method in the existing LSTM scheme.

[0222] After multiple iterations, the autoregressive prediction of the LSTM model tends to flatten out its hourly fluctuation pattern within the day due to the gradual accumulation of prediction errors and the smoothing tendency of the model output (i.e., the peak values ​​of the morning and evening peaks are lowered, and the trough values ​​of the early morning troughs are raised). To address this, this application proposes a shape correction method that "preserves the daily total and restores the true hourly profile." The core idea is to combine the daily total prediction capability of LSTM with the true hourly distribution shape in historical data.

[0223] Please see Figure 7 The diagram shows a shape correction flowchart of the method for predicting the regional motor vehicle activity emission status described in this application embodiment. Figure 7 As shown, step S26, during the process of generating a multi-step prediction sequence in the prediction model, involves hourly profile correction based on historical shapes from the same period. Specifically, this includes:

[0224] S261, For each natural day within the forecast period, summarize the predicted values ​​of the actual number of hours in 24 hours or less on that day by the forecast model, and calculate the daily total.

[0225] Specifically, for each natural day pred_date within the prediction period, the predicted values ​​of LSTM for that day's 24 hours (or the actual number of hours less than 24 hours) are summarized, and the daily total D_lstm = Σ lstm_preds[day_mask] is calculated.

[0226] S262, sequentially search for historical day data from the previous week and the previous two weeks that belong to the same day of the week as the stated natural day, and determine the reference shape for the search.

[0227] Specifically, the reference shape is searched by sequentially finding historical day data from the previous week (wb=1) and the previous two weeks (wb=2) that fall on the same day of the week as pred_date. Reference days must pass the following validity checks: they are not in the holiday set HOLIDAYS_SET; the number of valid data points on that day is no less than 20 hours; and the total mileage on that day is no less than 1000km. For reference days that pass the checks, their normalized hourly distribution shape is calculated: , where h is the hour (0~23).

[0228] S263, the reference shape is weighted and averaged by combining the first weight value of the previous week and the second weight value of the previous two weeks.

[0229] Specifically, the weighted fusion reference shape is: a weighted average based on a weight of 0.7 for the previous week and 0.3 for the previous two weeks.

[0230] If only one week's reference days are available, then use the shape from that week directly.

[0231] S264, the predicted total daily mileage of the prediction model is redistributed to each hour according to the reference shape after weighted averaging.

[0232] Specifically, shape correction: the total daily VKT of the LSTM is redistributed to each hour according to the reference shape:

[0233] Shape correction is performed only for VKT; emissions and fuel consumption are obtained through emission factor derivation calculations after VKT correction is completed.

[0234] The core innovation of this application's method lies in the decoupling and fusion of "macro-trend" and "micro-shape": the LSTM model is responsible for learning and predicting the macro-level impact of factors such as holidays, weather, and long-term trends on the daily total, while the historical pattern is responsible for providing details of hourly traffic flow fluctuations in the real world (such as commuting peaks at 8:00 and 17:00, and late-night troughs from 3:00 to 5:00). The two complement each other to achieve a balance between accuracy and precision.

[0235] S27, Perform sliding window backtesting to verify the prediction model.

[0236] To objectively evaluate the accuracy and stability of the prediction model under different time periods and scenarios, this application designs a systematic sliding window backtesting scheme.

[0237] Please see Figure 8 The diagram shows a backtesting verification flowchart of the method for predicting the regional motor vehicle activity emission status described in this application embodiment. Figure 8 As shown, step S27 performs sliding window backtesting verification on the prediction model, including:

[0238] S271, design a backtesting window, the backtesting starting point starts from the first available position and slides backward in 7-day increments until the last position that can accommodate a complete 72-hour forecast.

[0239] Specifically, the backtesting starts from the first available position (SEQ + 21×24 = 168 + 504 = 672 hours, i.e., the 29th day after the data begins), and slides backward in 7-day (168-hour) increments until the last position that can accommodate a complete 72-hour forecast. At each starting point, a complete 72-hour autoregressive forecast is performed and compared hourly with the actual value for that period. Simultaneously, the naive baseline forecast is calculated, which simply uses the actual value from the same point in the previous week as the forecast. .

[0240] S272 uses a multi-dimensional evaluation index system to evaluate backtesting, targeting the ratio of the average percentage error of the prediction to the variance explained by the model.

[0241] Specifically, the backtesting employs a multi-dimensional evaluation index system:

[0242] (a) It measures the average percentage error of the prediction;

[0243] (b) This measures the proportion of variance explained by the model.

[0244] The assessment is broken down into the following dimensions: VKT prediction accuracy (LSTM vs. naive method global comparison, and derived emissions). Indirect accuracy assessment); scenario dimension (classification assessment of normal working days, normal weekends, Spring Festival holidays, Spring Festival recovery period, etc.); emission standard dimension (VKT MAPE for each of China III / China IV / China V / China VI); window dimension (independent MAPE for each backtest window to assess model stability).

[0245] The scope of protection for the method for predicting the regional motor vehicle activity emission status described in this application is not limited to the order of steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.

[0246] This application also provides a prediction system for regional motor vehicle activity emission status. The prediction system for regional motor vehicle activity emission status can implement the prediction method for regional motor vehicle activity emission status described in this application. However, the implementation device for the prediction method for regional motor vehicle activity emission status described in this application includes, but is not limited to, the structure of the prediction system for regional motor vehicle activity emission status listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.

[0247] Please see Figure 9The diagram shows the structural principle of the regional motor vehicle activity emission status prediction system described in this application embodiment. Figure 9 As shown, this embodiment provides a prediction system 9 for regional motor vehicle activity emission status, including: a data acquisition module 91, an anomaly repair module 92, a training preparation module 93, a model training module 94, a model prediction module 95, a shape correction module 96, and a backtesting verification module 97.

[0248] The data acquisition module 91 is configured to acquire multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes traffic flow data and meteorological data for historical periods, meteorological data for the period to be predicted, holiday calendar data, and emission factor tables; wherein, the traffic flow data and meteorological data for historical periods are used for training and inference of the prediction model.

[0249] The anomaly repair module 92 is configured to perform anomaly detection and repair on the multi-source heterogeneous data based on a periodic time-series structure, thereby obtaining time-series data to be converted.

[0250] The training preparation module 93 is configured to generate standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time series data; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency.

[0251] The model training module 94 is configured to train the prediction model using the standardized parameters, the feature vector sequence, and the training samples; the training process includes model architecture design, forward propagation, back propagation, and adaptive moment estimation algorithm for parameter updates.

[0252] The model prediction module 95 is configured to use the prediction model trained to feed back the single-step prediction output of the model as the input for the next step, gradually iterate to generate a multi-step prediction sequence, and make independent predictions for the driving mileage of each emission standard. It constructs a two-layer proportion model that combines daily linear trend and hourly deviation correction, and then calculates each emission amount and fuel consumption based on the predicted driving mileage of each emission standard and the preset emission factor table.

[0253] The shape correction module 96 is configured to perform hourly profile correction by combining historical shapes during the process of generating a multi-step prediction sequence in the prediction model.

[0254] The backtesting verification module 97 is configured to perform sliding window backtesting verification on the prediction model.

[0255] In practical applications, the specific operating principles of each functional module of the regional motor vehicle activity emission status prediction system are as follows:

[0256] The data acquisition module 91 performs data acquisition and preprocessing (VKT acquisition - coil / BeiDou, emission factor table pre-setting, field unification, perspective aggregation, meteorological merging, holiday labeling). The anomaly repair module 92 performs anomaly detection (marking deviation >45%) → missing data completion (replacing in the first 1-2 weeks) → anomaly repair (weighted W=[0.6,0.3,0.1] in the first 1-3 weeks). The training preparation module 93 performs 12-dimensional feature engineering (y_norm + time period encoding + day type + holiday coefficient + meteorology). The model training module 94 performs LSTM training (SEQ_LEN sequence → 32-dimensional hidden layer → 1-dimensional output, Adam optimization, epochs configurable). The model prediction module 95 performs autoregressive PRED_HOURS prediction of the city's total VKT × proportion trend (linear trend + hourly deviation) → VKT for each emission standard → post-processing: VKT × emission factor → The shape correction module 96 performs shape correction (LSTM daily total × shape of the previous 5 years' weekday hours [W=0.7,0.3]). The backtesting verification module 97 performs prediction (citywide + 16 districts × hourly × 4 standards × VKT + derivative). ) + 4 visualizations + backtest CSV.

[0257] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0258] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0259] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0260] This application provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method for predicting the regional motor vehicle activity emission status.

[0261] Please see Figure 10 The diagram shows the structural connections of the electronic device described in the embodiments of this application. Figure 10 As shown, the electronic device 10 of this application includes: a processor 101, a memory 102, a communication interface 103 and / or a system bus 104. The memory 102 and the communication interface 103 are connected to the processor 101 via the system bus 104 and communicate with each other. The memory 102 is used to store computer programs, the communication interface 103 is used to communicate with other devices, and the processor 101 is used to run the computer programs, causing the electronic device 10 to execute the various steps of the method for predicting the emission status of regional motor vehicle activities.

[0262] The processor 101 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0263] The aforementioned memory 102 may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.

[0264] The system bus 104 mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus 104 can be divided into an address bus, a data bus, a control bus, etc. The communication interface is used to enable communication between the database access device and other devices (such as clients, read-write databases, and read-only databases).

[0265] This application also provides a computer-readable storage medium storing a computer program that, when executed, implements the method for predicting the emission status of regional motor vehicle activities.

[0266] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. This available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).

[0267] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0268] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for predicting the emission status of regional motor vehicle activities, characterized in that, include: Acquire multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes traffic flow data and meteorological data for historical periods, meteorological data for the period to be predicted, holiday calendar data, and emission factor tables; wherein, the traffic flow data and meteorological data for historical periods are used for training and inference of the prediction model. Based on the periodic time-series structure, anomaly detection and repair are performed on the multi-source heterogeneous data to obtain time-series data to be converted; Based on the time series data, standardized parameters, feature vector sequences, and training samples are generated for training the prediction model; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency. The prediction model is trained using the standardized parameters, the feature vector sequence, and the training samples; the training process includes model architecture design, forward propagation, back propagation, and adaptive moment estimation algorithm for parameter updates; The trained prediction model feeds back the single-step prediction output of the model as the input for the next step, iteratively generating a multi-step prediction sequence. It also makes independent predictions for the driving mileage of each emission standard, constructing a two-layer proportional model that combines daily linear trend and hourly deviation correction. Then, it calculates each emission amount and fuel consumption based on the predicted driving mileage of each emission standard and the preset emission factor table. During the process of generating a multi-step prediction sequence in the prediction model, hourly profile correction is performed by combining the shape of the same historical period. The prediction model was validated by sliding window backtesting.

2. The method according to claim 1, characterized in that, The steps for acquiring multi-source heterogeneous data related to vehicle mileage prediction include: The traffic flow data is obtained by using a combination of road network loop detection and BeiDou / GPS positioning trajectory methods for mutual supplementation and verification; the traffic flow data is then preprocessed, including data format and data structure conversion, and emission factor table pre-setting. Meteorological data for historical periods is obtained based on real-time records from meteorological observation stations; meteorological data for the period to be predicted is obtained by pre-calling numerical weather prediction products released by meteorological departments; the meteorological data is preprocessed, including field renaming, left join merging of time fields and traffic flow data, handling missing values, and splicing of forecast meteorological data; The holiday calendar data is obtained based on the statutory holiday announcements. A dictionary structure is used to store the mapping relationship between each holiday date and (holiday type, traffic coefficient), while maintaining a set of make-up work days. Based on the aforementioned holiday calendar data, a tiered index recovery model is constructed for the long holiday period. The system outputs and processes the forecast results, visualization charts, and backtesting verification data through an application programming interface (API). The forecast results are organized into three dimensions: "citywide forecast," n district-level details, and "daily summary," which respectively include citywide hourly forecast data, district-level hourly forecast data, and daily total emissions for each emission standard summarized by date and region. The visualization charts include a citywide VKT forecast map, a grid map comparing VKT forecasts for each district, a heat map ranking each district, a quality analysis chart, and an optional output emission summary chart. The backtesting verification data includes detailed records of all sliding window backtests.

3. The method according to claim 1, characterized in that, The steps for performing anomaly detection and repair on the multi-source heterogeneous data based on the periodic time-series structure to obtain the time-series data to be converted include: An anomaly detection algorithm based on historical comparison is used to determine that there is an anomaly in the data points of that hour this week if the deviation between the traffic of a certain hour this week and the traffic of the same time last week exceeds a preset threshold. The missing data of the constructed complete time series is filled in by taking the difference set of the time set of the existing data of the complete time series and filling in the missing data according to the synchronous data of the historical time period. The data points for this hour this week were found to be abnormal, and the issue was corrected by weighted replacement of historical data from the previous 1 to 3 weeks.

4. The method according to claim 1, characterized in that, The steps of generating standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time series data include: Standardized parameters are calculated based on multi-source heterogeneous data during normal periods; For each hourly time step, a 12-dimensional feature vector is constructed as the feature vector sequence, including the standardized total mileage of the city, hourly period sine component, hourly period cosine component, weekday period sine component, weekday period cosine component, weekday identifier, weekend identifier, holiday identifier, holiday classification coefficient, standardized temperature, normalized rainfall, and normalized humidity. Training samples are constructed from the feature matrix using a sliding window approach by inputting two configurable parameters: sequence length and number of days in the validation set.

5. The method according to claim 1, characterized in that, The step of training the prediction model using the standardized parameters, the feature vector sequence, and the training samples includes: The model architecture of the prediction model is determined; the core parameters of the prediction model include: input feature dimension, hidden layer dimension, output dimension, input sequence length, number of training epochs, initial learning rate of the optimizer, and weight initialization scale; For the input feature vector sequence, the prediction model performs forward propagation calculation at each time step; The time backpropagation algorithm is used to propagate the gradient from the output layer to the starting direction of the time series. The Adam optimization algorithm is used to update the parameters, and independent first-order moment estimates and second-order moment estimates are maintained for each parameter.

6. The method according to claim 1, characterized in that, In the process of generating a multi-step prediction sequence using the prediction model, the step of hourly profile correction by incorporating historical contemporaneous shapes includes: For each natural day within the forecast period, the predicted values ​​of the forecast model for the actual number of hours in 24 hours or less on that day are summarized, and the daily total is calculated. Search for historical day data from the previous week and the previous two weeks that belong to the same day of the week as the stated natural day to determine the reference shape for the search; The reference shape is weighted and averaged by combining the first weight value of the previous week and the second weight value of the previous two weeks. The predicted total daily mileage of the prediction model is redistributed to each hour according to the reference shape after weighted averaging.

7. The method according to claim 1, characterized in that, The steps for performing sliding window backtesting validation on the prediction model include: Design the backtesting window, starting from the first available location and sliding backward in 7-day increments until the last location that can accommodate a complete 72-hour forecast. A multi-dimensional evaluation index system was used to evaluate the backtesting, considering the ratio of the average percentage error of the prediction to the variance explained by the model.

8. A prediction system for regional motor vehicle activity emission status, characterized in that, include: The data acquisition module is configured to acquire multi-source heterogeneous data related to vehicle mileage prediction; the multi-source heterogeneous data includes traffic flow data and meteorological data for historical periods, meteorological data for the period to be predicted, holiday calendar data, and emission factor tables; wherein, the traffic flow data and meteorological data for historical periods are used for training and inference of the prediction model. The anomaly repair module is configured to perform anomaly detection and repair on the multi-source heterogeneous data based on a periodic time-series structure, thereby obtaining time-series data to be converted. The training preparation module is configured to generate standardized parameters, feature vector sequences, and training samples for training the prediction model based on the time series data; the prediction model is a lightweight inference engine based on pure linear algebra operators and without deep learning framework dependency. The model training module is configured to train the prediction model using the standardized parameters, the feature vector sequence, and the training samples; the training process includes model architecture design, forward propagation, back propagation, and adaptive moment estimation algorithm for parameter updates; The model prediction module is configured to use the trained prediction model to feed back the single-step prediction output of the model as the input for the next step, iteratively generating a multi-step prediction sequence, and independently predicting the driving mileage for each emission standard. It constructs a two-layer proportional model that combines daily linear trend and hourly deviation correction, and then calculates each emission amount and fuel consumption based on the predicted driving mileage for each emission standard and the preset emission factor table. The shape correction module is configured to perform hourly profile correction by incorporating historical shapes during the generation of a multi-step prediction sequence by the prediction model. The backtesting verification module is configured to perform sliding window backtesting verification on the prediction model.

9. An electronic device, characterized in that, include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the method described in any one of claims 1 to 7.