Winter road surface temperature forecasting method and device based on random forest regression method

By using random forest regression method and SHAP attribution analysis method in pavement temperature forecasting, the combination of feature parameters is screened and the pavement temperature model is constructed, which solves the problems of insufficient accuracy and weak processing capabilities of pavement temperature forecasting in the existing technology, and achieves more efficient forecasting performance and real-time monitoring capabilities.

CN119939400APending Publication Date: 2025-05-06广州市气象服务中心 +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411778482.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When the existing pavement temperature forecasting methods process high-dimensional and large-capacity traffic meteorological data, they are insufficient in accuracy and cannot meet the needs of real-time monitoring and intelligent perception.

Method used

The winter pavement temperature forecast method based on random forest regression method was adopted, and the feature parameter combination was screened through SHAP attribution analysis method, and the pavement temperature model was constructed, and the forecast performance was optimized through K-fold cross-validation and model parameter adjustment.

Benefits of technology

It improves the accuracy and processing capabilities of road surface temperature forecasting, can better meet the needs of real-time monitoring and intelligent perception, and makes up for the shortcomings of the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119939400A_ABST
    Figure CN119939400A_ABST
Patent Text Reader

Abstract

The invention relates to a winter road surface temperature forecasting method and device based on a random forest regression method, and the method comprises the following steps: obtaining the data information of a traffic weather station, and carrying out the data preprocessing of the data information of the traffic weather station, and obtaining the preprocessed data; firstly, preprocessed traffic weather station data information is analyzed through an SHAP attribution analysis method to obtain the importance degree of each feature, different feature parameters are combined, then a forecasting model is constructed based on screened feature parameter combination by adopting a random forest algorithm, and winter road surface temperature forecasting is performed through the constructed forecasting model. The method shows excellent performance when processing high-dimensional and large-capacity complex problem data modeling, and solves the problems that parameters of a theoretical analysis method are too many and are difficult to obtain, and a mathematical statistics method is weak in transplantation ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to road surface temperature prediction, and in particular to a method and device for predicting winter road surface temperature based on a random forest regression method. Background Art

[0002] The existing pavement temperature prediction methods mainly include two categories: theoretical analysis method and mathematical statistics method.

[0003] The first category: theoretical analysis method, based on the energy balance equation and heat conduction formula, establishes a numerical prediction model to achieve the prediction of road surface temperature.

[0004] Disadvantages of theoretical analysis method: Although the theoretical analysis method can essentially reveal the impact of various environmental and meteorological factors on road surface temperature and has strong universality, the theoretical model has many input variables, many variables, especially thermal parameters, are difficult to obtain, and the calculation process is too complicated, resulting in insufficient accuracy of the theoretical model.

[0005] The second category: mathematical statistics, based on mathematical formulas, reveals the superficial relationship between environmental factors and meteorological factors and the road surface temperature field from a purely mathematical perspective, and then establishes a road surface temperature prediction model. The input variables of this model are mostly from meteorological data and road surface data, which are easy to obtain and have a small number of variables, and the prediction accuracy is also high.

[0006] Deficiencies of mathematical statistics: Limited by small sample data, traditional mathematical statistics models represented by multivariate or stepwise linear regression have weak processing capabilities for traffic meteorological big data. The online application performance of the model is relatively general and cannot meet the needs of real-time collection, intelligent perception and prevention and control of traffic meteorological dynamic monitoring. Summary of the invention

[0007] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a method and device for predicting winter road surface temperature based on a random forest regression method.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] Specifically, a winter road surface temperature prediction method based on random forest regression is proposed, including the following:

[0010] Acquiring traffic weather station data and performing data preprocessing on the traffic weather station data to obtain preprocessed data;

[0011] The preprocessed data is analyzed based on the SHAP attribution analysis method, including global feature importance analysis and stratified analysis based on weather conditions, to evaluate the contribution of each feature to the pavement temperature prediction. Based on the global and weather-specific SHAP analysis results, multiple feature parameter combinations are generated.

[0012] For each selected characteristic parameter combination, the random forest algorithm is used to build the corresponding pavement temperature model. K-fold cross validation is adopted and the performance of each model is evaluated through pre-selected performance evaluation indicators (mean absolute percentage error (MAPE), mean absolute error (MAE), etc.). The random forest model corresponding to the characteristic parameter combination with the best performance on the validation set is selected as the preliminary final model.

[0013] Adjusting parameters of the final model to obtain an optimized final model;

[0014] The optimized final model is used to predict winter road surface temperature.

[0015] Further, specifically, the preprocessing includes:

[0016] The traffic weather station data is subjected to quality control such as threshold control, time series correction, and outlier removal, and the date column character string is converted into a numerical value through one-hot encoding.

[0017] Furthermore, specifically, the preprocessed data is analyzed based on the SHAP attribution analysis method, the contribution of each feature to the model prediction result is calculated, and multiple feature parameter combinations are formed, including:

[0018] The pre-processed data is pre-divided according to weather conditions to form different weather condition subsets. The influence of each feature parameter in the weather condition subset on the road surface temperature is analyzed by the SHAP attribution analysis method, and the contribution of each feature parameter to the model prediction is quantified. Several features with a contribution higher than the preset ranking are selected to generate feature subsets exclusive to different weather conditions. Then, SHAP analysis is performed based on the global situation, that is, without considering the weather conditions, and several features with high contribution are selected to form multiple global feature subsets. The feature combinations of different weather conditions are combined with the global feature combinations to form multiple screening feature parameter combinations as subsequent model inputs.

[0019] The analytical calculation formula is as follows:

[0020]

[0021] Where: f(x) is the output of the explanation model, i.e., the contribution importance; g(z′) is the explanation function of z′, z′∈{0,1} M is a 0 / 1 vector in M-dimensional space, indicating the feature set belonging to the sample among M features; the constant term ψ0 is the predicted mean of all samples; ψ j represents the SHAP value of feature j, that is, the contribution of feature j to the model output; {x1,…,x p}\{x j} does not include {xj} is the possible set of all input features; |S| is the number of features in subset S; p is the total number of features in set p; f x (S∪{x j}) is the predicted value of the model including feature j; f x (S) is the predicted value when the model predicts the feature subset S.

[0022] Further, specifically, a random forest algorithm is used to construct a road surface temperature model corresponding to each combination of the screening feature parameters to obtain multiple classification models, and a K-fold cross-validation method is used to evaluate the generalization ability of the model to avoid overfitting, including:

[0023] The model is constructed using the following formula:

[0024]

[0025] Where: Y is the prediction result; X is the input feature vector; S is the number of regression tree models; F s (X) is a single CRAT regression tree model; R l is the unit domain divided by the optimal segmentation variables with different characteristics; I(X∈R l ) is a logical value, C l The unit domain R l The average value of all output values ​​contained in, l is the unit domain label.

[0026] Further, specifically, adjusting the parameters of the final model to obtain an optimized final model includes:

[0027] The RandomizedSearchCV and GridSearchCV functions are used alternately to adjust the parameters of the final model, find the parameters that meet the preset conditions, and then obtain the optimized final model.

[0028] The present invention also proposes a device for predicting winter road surface temperature based on random forest regression method, comprising the following:

[0029] The data acquisition and preprocessing module is used to acquire the traffic weather station data and perform data preprocessing on the traffic weather station data to obtain preprocessed data to ensure the quality of the data;

[0030] SHAP attribution analysis module, used to analyze the preprocessed data based on SHAP attribution analysis method, including global feature importance analysis and stratified analysis according to weather conditions, to evaluate the contribution of each feature to the road surface temperature prediction, and to generate multiple feature parameter combinations based on the SHAP analysis results of the global weather conditions;

[0031] The model building module is used to build the corresponding pavement temperature model for each screened feature parameter combination using the random forest algorithm, and to evaluate the performance of each model using K-fold cross validation and pre-selected performance evaluation indicators (mean absolute percentage error (MAPE), mean absolute error (MAE), etc.), and to select the random forest model corresponding to the feature parameter combination that performs best on the validation set as the preliminary final model.

[0032] A model optimization module, used to adjust the parameters of the final model to obtain an optimized final model;

[0033] The forecast module is used to forecast winter road surface temperature through the optimized final model.

[0034] The beneficial effects of the present invention are:

[0035] The present invention proposes a winter road surface temperature prediction method and device based on the random forest regression method. First, the pre-processed traffic meteorological station data is analyzed by the SHAP attribution analysis method, including classification analysis based on weather conditions and global feature importance analysis, and the contribution of each feature to the road surface temperature prediction is evaluated respectively. Then, different feature parameters are combined, and then a prediction model is constructed based on the screening feature parameter combination by using the random forest algorithm. K-fold cross validation is used occasionally to avoid overfitting, and winter road surface temperature is predicted by the constructed prediction model. The present invention shows excellent performance in modeling complex problem data with high dimensions and large capacity, making up for the problems that the theoretical analysis method has too many parameters and is difficult to obtain, and the mathematical statistics method has weak transplantation ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other features of the present disclosure will become more apparent by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:

[0037] Figure 1 Shown is a flow chart of a winter road surface temperature prediction method based on random forest regression method of the present invention;

[0038] Figure 2 Shown is a schematic diagram of the winter road surface temperature prediction method based on the random forest regression method of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.

[0040] Example 1, reference Figure 1 as well as Figure 2 The present invention proposes a winter road surface temperature prediction method based on random forest regression method, which includes the following:

[0041] Step 110: Acquire traffic weather station data and perform data preprocessing on the traffic weather station data to obtain preprocessed data (ensuring data quality)

[0042] Step 120, analyzing the preprocessed data based on the SHAP attribution analysis method, including global importance analysis and stratified analysis according to weather conditions, respectively evaluating the contribution of each feature to the road surface temperature prediction, and forming multiple feature parameter combinations based on the global and weather condition-based SHAP analysis results;

[0043] Step 130, using the random forest algorithm to construct a road surface temperature model corresponding to each of the screened feature parameter combinations to obtain multiple classification models, occasionally using K-fold cross-validation to avoid overfitting, and performing performance evaluation on each model using a pre-selected performance evaluation indicator, and selecting the random forest model corresponding to the feature parameter combination that performs best on the validation set as the preliminary final model.

[0044] Step 140, adjusting the parameters of the final model to obtain an optimized final model; the performance of these models can be evaluated by mean absolute percentage error (MAPE), mean absolute error (MAE), mean square error (MSE) and root mean square error (RMSE) to find the optimal classification model.

[0045] Step 150: forecast winter road surface temperature using the optimized final model.

[0046] In this embodiment 1, the pre-processed traffic weather station data is first analyzed by the SHAP attribution analysis method, and after forming multiple screening feature parameter combinations, a forecast model is constructed based on the screening feature parameter combinations by using the random forest algorithm, and winter road surface temperature forecast is performed by the constructed forecast model. The present invention shows excellent performance in modeling complex problem data with high dimensions and large capacity, making up for the problems of too many parameters in the theoretical analysis method and the difficulty in obtaining them, and the weak transplantation ability of the mathematical statistics method.

[0047] As a preferred embodiment of the present invention, specifically, the pretreatment includes:

[0048] The traffic weather station data is subjected to quality control such as threshold control, time series correction, and outlier removal, and the date column character string is converted into a numerical value through one-hot encoding.

[0049] In this preferred embodiment, basic data of traffic weather stations are obtained, including date, time, road surface temperature, atmospheric temperature, relative humidity, wind speed, wind direction, precipitation, road surface conditions (dry, ice, snow, etc.), etc. The sample data mainly includes observation data of traffic weather stations. To ensure the scientificity and validity of the data, all data are subject to quality control including threshold control, time series correction, and outlier removal in advance. In addition, in the preprocessing process, considering that the date column is not a numerical feature but a string indicating the day of the week, the computer does not recognize these data, so one-hot encoding is used for conversion, the purpose is like converting attribute values ​​into numerical values.

[0050] As a preferred embodiment of the present invention, specifically, the pre-processed data is analyzed based on the SHAP attribution analysis method to form multiple screening feature parameter combinations, including:

[0051] Pre-divide the weather conditions and analyze them through the SHAP attribution analysis method, including pre-dividing the data set according to weather conditions (sunny, cloudy, rainy, etc.) to form different weather condition subsets. Use the SHAP attribution analysis method to analyze the impact of each feature parameter on road surface temperature under different weather conditions, quantify the contribution of each feature to the model prediction, select several features with a contribution higher than the preset ranking, and generate exclusive feature subsets; then perform SHAP analysis based on the global situation (regardless of weather conditions), select several features with the highest contribution, and form multiple global feature subsets. Combine the feature combinations of each weather condition with the global feature combination to form multiple screening feature parameter combinations as subsequent model inputs;

[0052] The analytical calculation formula is as follows:

[0053]

[0054] Where: f(x) is the output of the explanation model, i.e., the contribution importance; g(z′) is the explanation function of z′, z′∈{0,1} M is a 0 / 1 vector in M-dimensional space, indicating the feature set belonging to the sample among M features; the constant term ψ0 is the predicted mean of all samples; ψ j represents the SHAP value of feature j, that is, the contribution of feature j to the model output; {x1,…,x p}\{x j} does not include {x j} is the possible set of all input features; |S| is the number of features in subset S; p is the total number of features in set p; f x (S∪{x j}) is the predicted value of the model including feature j; f x (S) is the predicted value when the model predicts the feature subset S.

[0055] It should be noted here that the SHAP attribution analysis method can be very time-consuming, especially for large models or datasets. Therefore, appropriate sampling is required in practical applications to reduce the computational cost.

[0056] In this preferred embodiment, when applied, the weather conditions are divided into three states: sunny, cloudy and rainy. The SHAP attribution analysis method is used to analyze the contribution importance of six influencing factors such as time, atmospheric temperature, relative humidity, wind speed, precipitation, and road surface conditions (dry, ice, snow, etc.) to road surface temperature under different weather conditions, and then combined with the overall feature importance analysis, the model input feature parameters are screened.

[0057] As a preferred embodiment of the present invention, specifically, a random forest algorithm is used to construct a road surface temperature model corresponding to each of the screening characteristic parameter combinations to obtain multiple classification models, including:

[0058] The model is constructed using the following formula:

[0059]

[0060] Where: Y is the prediction result; X is the input feature vector; S is the number of regression tree models; F s (X) is a single CRAT regression tree model; R l is the unit domain divided by the optimal segmentation variables with different characteristics; I(X∈R l ) is a logical value, C l The unit domain R l The average value of all output values ​​contained in, l is the unit domain label.

[0061] In this preferred embodiment, when applied, the influencing factors are ranked according to their contribution to the road surface temperature, and six influencing factors such as time, atmospheric temperature, relative humidity, wind speed, precipitation, and road surface conditions (dry, ice, snow, etc.) are gradually combined into five model inputs according to the road surface state, as shown in Table 1. The sample data set is divided into a training set and a test set at a ratio of 8:2 and input into the random forest model according to the combination in Table 1 to find the optimal combination of influencing factors. The model performance can be evaluated by the mean absolute percentage error (MAPE), mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE).

[0062] Table 1 Model combination input information

[0063]

[0064]

[0065] As a preferred embodiment of the present invention, specifically, adjusting the parameters of the final model to obtain an optimized final model includes:

[0066] The RandomizedSearchCV and GridSearchCV functions are used alternately to adjust the parameters of the final model, find the parameters that meet the preset conditions, and then obtain the optimized final model.

[0067] In this preferred embodiment, the model parameters are adjusted in the above manner to find the most suitable parameters. The parameters are adjusted by alternating between random and network search strategies.

[0068] The present invention also proposes a device for predicting winter road surface temperature based on random forest regression method, comprising the following:

[0069] The data acquisition and preprocessing module is used to acquire the traffic weather station data and perform data preprocessing on the traffic weather station data to obtain preprocessed data;

[0070] SHAP attribution analysis module, used to analyze the preprocessed data based on SHAP attribution analysis method, including global feature importance analysis and stratified analysis according to weather conditions, to evaluate the contribution of each feature to the road surface temperature prediction, and to generate multiple feature parameter combinations based on the global and weather condition SHAP analysis results;

[0071] The model building module is used to build the corresponding pavement temperature model for each screened feature parameter combination using the random forest algorithm, occasionally using K-fold cross-validation to avoid overfitting, and evaluating the performance of each model through pre-selected performance evaluation indicators (mean absolute percentage error (MAPE), mean absolute error (MAE), etc.), and select the random forest model corresponding to the feature parameter combination that performs best on the validation set as the preliminary final model.

[0072] A model optimization module, used to adjust the parameters of the final model to obtain an optimized final model;

[0073] The forecast module is used to forecast winter road surface temperature through the optimized final model.

[0074] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0075] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0076] Although the description of the present invention has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.

[0077] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention. Within the protection scope of the present invention, its technical scheme and / or implementation method can have various modifications and changes.

Claims

1. A winter road surface temperature prediction method based on random forest regression method, characterized in that: Includes the following: Acquiring traffic weather station data and performing data preprocessing on the traffic weather station data to obtain preprocessed data; The pre-processed data were analyzed based on the SHAP attribution analysis method, including global feature importance analysis and stratified analysis according to weather conditions, to evaluate the contribution of each feature to the pavement temperature prediction. Based on the global and weather-specific SHAP analysis results, multiple feature parameter combinations were formed. For each selected characteristic parameter combination, the corresponding pavement temperature model is constructed using the random forest algorithm. The performance of each pavement temperature model is evaluated using K-fold cross validation and pre-selected performance evaluation indicators. The pavement temperature model corresponding to the characteristic parameter combination with the best performance on the validation set is selected as the preliminary final model. Adjust the parameters of the preliminary final model to obtain the optimized final model; The optimized final model is used to predict winter road surface temperature.

2. The winter road surface temperature prediction method based on random forest regression method according to claim 1 is characterized in that: Specifically, the preprocessing includes: The traffic weather station data is subjected to quality control such as threshold control, time series correction, and outlier removal, and the date column character string is converted into a numerical value through one-hot encoding.

3. The winter road surface temperature prediction method based on random forest regression method according to claim 1 is characterized in that: Specifically, the preprocessed data is analyzed based on the SHAP attribution analysis method, the contribution of each feature to the model prediction results is calculated, and multiple feature parameter combinations are formed, including: The pre-processed data is pre-divided according to weather conditions to form different weather condition subsets. The influence of each feature parameter in the weather condition subset on the road surface temperature is analyzed by the SHAP attribution analysis method, and the contribution of each feature parameter to the model prediction is quantified. Several features with a contribution higher than the preset ranking are selected to generate feature subsets exclusive to different weather conditions. Then, SHAP analysis is performed based on the global situation, that is, without considering the weather conditions, and several features with high contribution are selected to form multiple global feature subsets. The feature combinations of different weather conditions are combined with the global feature combinations to form multiple screening feature parameter combinations as subsequent model inputs. The analytical calculation formula is as follows: Where: f(x) is the output of the explanation model, i.e., the contribution importance; g(z′) is the explanation function of z′, z′∈{0,1} M is a 0 / 1 vector in M-dimensional space, indicating the feature set belonging to the sample among M features; the constant term ψ0 is the predicted mean of all samples; ψ j represents the SHAP value of feature j, that is, the contribution of feature j to the model output; {x1,…,x p }\{x j } does not include {x j } is the possible set of all input features; |S| is the number of features in subset S; p is the total number of features in set p; fx(S∪{xj}) is the model prediction value including feature j; f x (S) is the predicted value when the model predicts the feature subset S.

4. The winter road surface temperature prediction method based on random forest regression method according to claim 1 is characterized in that: Specifically, the basic parameters of random forest are determined, and for each selected characteristic parameter combination, the corresponding road surface temperature model is constructed using random forest algorithm. The K-fold cross validation method is used to evaluate the generalization ability of the model to avoid overfitting, including: The model is constructed using the following formula: Where: Y is the prediction result; X is the input feature vector; S is the number of regression tree models; F s (X) is a single CRAT regression tree model; R l is the unit domain divided by the optimal segmentation variables with different characteristics; I(X∈R l ) is a logical value, C l The unit domain R l The average value of all output values ​​contained in, l is the unit domain label.

5. The winter road surface temperature prediction method based on random forest regression method according to claim 4 is characterized in that: Specifically, the final model is adjusted to obtain an optimized final model, including: The RandomizedSearchCV and GridSearchCV functions are used alternately to tune the parameters of the final model, find the parameters that meet the preset conditions, and then obtain the optimized final model.

6. A device for predicting winter road surface temperature based on random forest regression method, characterized in that: Includes the following: The data acquisition and preprocessing module is used to acquire the traffic weather station data and perform data preprocessing on the traffic weather station data to obtain preprocessed data; SHAP attribution analysis module, used to analyze the pre-processed data based on SHAP attribution analysis method, including global feature importance analysis and stratified analysis according to weather conditions, respectively evaluate the contribution of each feature to the road surface temperature prediction, and form multiple feature parameter combinations based on the global and weather condition SHAP analysis results; The model building module is used to build the corresponding pavement temperature model for each selected characteristic parameter combination using the random forest algorithm, and to evaluate the performance of each pavement temperature model using K-fold cross validation and pre-selected performance evaluation indicators, and to select the pavement temperature model corresponding to the characteristic parameter combination with the best performance on the validation set as the preliminary final model; The model optimization module is used to adjust the parameters of the preliminary final model to obtain the optimized final model; The forecast module is used to forecast winter road surface temperature through the optimized final model.

Citation Information

Cited By

  • Road icing multi-model feature importance screening and forecasting method based on optical fibers

    CN120671079A