Cross-site vehicle dynamic weighing method and system based on improved deep forest model
By improving the deep forest model, screening key features and combining feature importance rearrangement and trusted state judgment, the adaptability problem of dynamic weighing system between different sites is solved, and stable weight prediction accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510554564.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-01
AI Technical Summary
The existing dynamic weighing system has poor adaptability between different sites and is susceptible to factors such as sensor installation process differences, road slope fluctuations, environmental noise and road flatness, resulting in low measurement accuracy and difficult to achieve accurate weight prediction across sites.
The improved deep forest model is adopted, and features are screened through Pearson's correlation coefficient, and the six-stage temperature and impact number characteristics are introduced, combining feature importance rearrangement and trusted state judgment average integration method to improve the robustness and prediction accuracy of the model.
Maintaining stable prediction accuracy between different sites enhances the model's resistance to complex environmental interference and improves the cross-scene deployment adaptability and measurement accuracy of dynamic weighing systems.
Smart Images

Figure CN120408557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for dynamic weighing of trucks. Specifically, it relates to a cross-site vehicle dynamic weighing method and system based on an improved deep forest model. Background Art
[0002] Highway transportation occupies a dominant position in the transportation system, and the overloading problem has always been a major challenge in the management of highway truck transportation. At present, vehicle weight detection mainly adopts two methods: static weighing and dynamic weighing. Although static weighing has high accuracy, its equipment scale is large and it is easy to cause traffic congestion. In contrast, dynamic weighing equipment is usually installed under the road and does not affect the normal passage of vehicles. Therefore, it has become a key technology for solving vehicle road management problems in recent years. The dynamic weighing technology can automatically and real-time collect sensor waveform data during the vehicle driving process, process these data, obtain parameters such as vehicle speed and axle weight, and then use algorithms to predict the actual weight of the vehicle. Although the dynamic weighing system has the advantage of better management, it still has the problem that its accuracy is lower than that of the static weighing system.
[0003] With the vigorous development of artificial intelligence technology, machine learning algorithms have become increasingly mature and have shown remarkable results in the field of dynamic weighing. Currently, most of the research on truck dynamic weighing model algorithms focuses on the research of machine learning models suitable for the same site. Since it is difficult to collect vehicle tag data at actual sites, whenever a new site is added, it is impossible to spend a lot of time to obtain training samples. Therefore, the research on algorithm models suitable for different sites has become particularly important.
[0004] In addition, in actual application scenarios, the measurement accuracy of the vehicle dynamic weighing system is easily affected by the coupling of multi-source interferences: due to factors such as differences in sensor installation technology, road surface slope fluctuations, environmental noise, and road surface flatness at different sites, data distribution offsets occur when the same vehicle passes through different sites. Especially in the case of long-term operation, problems such as sensor fatigue and temperature changes will further exacerbate, thus affecting the prediction accuracy. These problems have brought challenges to the accuracy and stability of dynamic weighing.
[0005] To address the above problems, it is necessary to propose a general model with high robustness that can realize real-time prediction of vehicle weights at different sites. Summary of the Invention
[0006] The purpose of the present invention is to address the deficiencies of the prior art, and thus provide a cross-site vehicle dynamic weighing method and system based on an improved deep forest model, which can be used for dynamic automatic weighing of vehicles at different dynamic weighing sites.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is:
[0008] In the first aspect of the present invention, a cross-site vehicle dynamic weighing method based on an improved deep forest model is provided, including the following steps:
[0009] Collect the passing vehicle data, perform feature processing on the passing vehicle data to obtain pressure data features;
[0010] Send the pressure data features, six-stage temperature features, and impact count features into the improved deep forest model for prediction to obtain the predicted weight of the truck;
[0011] Among them, for the six-stage temperature features, first arrange the collected passing vehicle data in chronological order, divide 24 hours of a day into six time periods, namely 0:00 - 4:00, 4:00 - 8:00, 8:00 - 12:00, 12:00 - 16:00, 16:00 - 20:00, 20:00 - 24:00, and then perform feature marking on the passing vehicle data falling into the corresponding time periods; among them, 0:00 - 4:00 is marked as 1, 4:00 - 8:00 is marked as 2, 8:00 - 12:00 is marked as 3, 12:00 - 16:00 is marked as 4, 16:00 - 20:00 is marked as 5, and 20:00 - 24:00 is marked as 6;
[0012] The impact count feature is the total cumulative number of passing vehicles on the weighing platform lane within the corresponding time period.
[0013] Based on the above, the method for obtaining pressure data features is as follows:
[0014] The weighing platform includes 2 weighing platforms corresponding to the left and right wheels of the truck during driving, and 2 pressure sensors are arranged along the forward direction of the truck; the output data of the pressure sensors is used as the passing vehicle data;
[0015] For the collected passing vehicle data, select the average peak value, peak value, compensation value, time difference, and passing vehicle speed after each tire passes through each pressure sensor as feature data; among them, the average peak value is the arithmetic average of 100 pressure values before and after the current sensor peak value, the compensation value is the pressure value of the sensor in front of the current sensor; the time difference is the time difference between the current sensor peak value and the first sensor peak value of this vehicle;
[0016] Summarize the feature data of the passing vehicle data of each vehicle and merge them in chronological order;
[0017] Use the Pearson correlation coefficient method to screen out the features that are most critical to the prediction result. Among them, the features with a Pearson correlation coefficient > 0.4 are selected, including the front average peak value, rear average peak value, front peak value, and rear peak value of weighing platforms one and two, as the final input features of the model.
[0018] Based on the above, the improved deep forest model includes:
[0019] A data input module, which is used to input the eigenvalue screened by the Pearson correlation coefficient, the six-stage temperature feature, and the impact times feature into the model as inputs;
[0020] A feature importance calculation module, which is used to calculate the feature importance scores according to XGBoost and random forest respectively;
[0021] A feature rearrangement module, which is used to place the top 5 features with the highest scores calculated according to the random forest and the top 5 features with the highest scores calculated according to XGBoost side by side in the middle part, and the importance of the remaining features follows the XGBoost result, and they are spliced and rearranged according to the rule that the importance is high in the middle and low on both sides to obtain the rearranged features;
[0022] A multi-granularity scanning module, which is used to generate multiple subsequences by sliding a sliding window over the rearranged features, and each subsequence predicts the target value through a random forest regressor and a completely random forest regressor to obtain the random forest prediction value and the completely random forest prediction value; the output of each sliding window is the random forest prediction value and the completely random forest prediction value of the subsequence of that sliding window;
[0023] A feature splicing module, which is used to splice the outputs of all sliding windows with the rearranged features and use them as the input of the cascade forest;
[0024] A cascade forest regression module, which adopts a stacked multi-layer regression forest structure and is used to train the input features; during the model training process, the termination condition of the model training is that the mean square error no longer decreases or reaches the preset maximum number of layers;
[0025] A prediction result integration output module, which is used to integrally output the model prediction results by using a reliable state judgment average integration method after the model training ends;
[0026] The reliable state judgment average integration method is as follows:
[0027] Train N improved deep forest models, and perform reliable state judgment on the N prediction results M output by the N improved deep forest models. The judgment rule is to take the median of the N output prediction results, denoted as M i , and define the absolute value of the difference between the N prediction results M 中 , and M i as the error value E 中 ; i ;
[0028] Set an error threshold λ. Only when the error value E i is less than or equal to the error threshold λ, keep the prediction result, and finally output n reliable prediction results.
[0029] The second aspect of the present invention provides a cross-site vehicle dynamic weighing system based on an improved deep forest model, including
[0030] A pressure data feature acquisition module configured to: collect passing vehicle data of a vehicle, perform feature processing on the passing vehicle data, and obtain pressure data features;
[0031] A weighing prediction module configured to: send the pressure data features, six-stage temperature features, and impact frequency features into the improved deep forest model for prediction to obtain the predicted weight of the truck;
[0032] Among them, the six-stage temperature feature is obtained by first arranging the collected passing vehicle data in chronological order, dividing 24 hours of a day into six time periods, namely 0:00-4:00, 4:00-8:00, 8:00-12:00, 12:00-16:00, 16:00-20:00, 20:00-24:00, and then performing feature marking on the passing vehicle data falling into the corresponding time periods; among them, 0:00-4:00 is marked as 1, 4:00-8:00 is marked as 2, 8:00-12:00 is marked as 3, 12:00-16:00 is marked as 4, 16:00-20:00 is marked as 5, and 20:00-24:00 is marked as 6;
[0033] The impact frequency feature is the total cumulative number of passing vehicles on the weighing platform lane within the corresponding time period.
[0034] The third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the aforementioned cross-site vehicle dynamic weighing method based on the improved deep forest model.
[0035] The fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the aforementioned cross-site vehicle dynamic weighing method based on the improved deep forest model.
[0036] The present invention has prominent substantial characteristics and remarkable progress compared with the prior art. Specifically:
[0037] The present invention first screens features highly correlated with weight by using the Pearson correlation coefficient method, and introduces two new features, six-stage temperature and impact frequency, to compensate the model, which can enhance the resistance of the model to interference in the complex environment of actual sites and has high robustness. Secondly, the deep forest model is improved by using feature importance rearrangement and credible state judgment averaging integration to further improve the model prediction accuracy.
[0038] The improved deep forest model in the method of the present invention not only has the advantages of ensemble learning but also integrates the advantages of deep learning. With its powerful ensemble characteristics and the ability to process complex data, it can maintain stable prediction accuracy in weighing stations under different working conditions, providing an effective solution to the universality problem of cross-scenario deployment of dynamic weighing systems. Brief Description of the Drawings
[0039] Figure 1 is the flowchart of the cross-site vehicle dynamic weighing method based on the improved deep forest model in Embodiment 1.
[0040] Figure 2 is the waveform diagram of the passing vehicle data of a 6-axle truck in the present invention.
[0041] Figure 3 are the peak value and compensation value obtained in the present invention.
[0042] Figure 4 is the time difference obtained in the present invention.
[0043] Figure 5 is the top view of the vehicle passing through the weighing main body flat plate (abbreviated as weighing platform).
[0044] Figure 6 is the data analysis diagram in the present invention.
[0045] Figure 7 is the scatter plot of the prediction results of each model at Site 2 in Embodiment 1.
[0046] Figure 8 is the scatter plot of the prediction results of each model at Site 3 in Embodiment 1.
[0047] Figure 9 is the scatter plot of the prediction results of each model at Site 4 in Embodiment 1.
[0048] Figure 10 is the scatter plot of the prediction results of each model at Site 5 in Embodiment 1.
[0049] Figure 11 is the comparison diagram of the average integration and non-integration of the reliable state judgment in Embodiment 1.
[0050] Figure 12 is the scatter plot of the errors of the vehicle weight prediction results at 4 different sites in Embodiment 2. Detailed Embodiments
[0051] The following further describes the technical solutions of the present invention in detail through specific embodiments.
[0052] Embodiment 1
[0053] This embodiment provides a cross-site vehicle dynamic weighing method based on an improved deep forest model, as Figure 1 shown, which includes the following steps:
[0054] Step 1: Collect the passing vehicle data, perform feature processing on the passing vehicle data to obtain pressure data features; at the same time, obtain six-stage temperature features and impact times features.
[0055] Specifically, the methods for pressure data features, six-stage temperature features, and impact times features are as follows:
[0056] 1. When the vehicle passes over the weighing platform, the pressure sensors on the weighing platform will collect the hexadecimal waveform data generated when the vehicle passes (as Figure 2 shown), and the data consists of 816 bytes. The first 16 bytes in the waveform data are the data header of the passing vehicle data, and the last 800 bytes are the data field of the passing vehicle data. The data field is composed of 8 channels, and each channel is further divided into a high byte and a low byte. The combined data of the high byte and the low byte is the pressure value.
[0057] Table 1 Waveform data format collected by the weighing platform
[0058]
[0059]
[0060] 2. Export the collected valid passing vehicle data, and according to the above data format, combine the high and low bytes and convert them into decimal pressure data.
[0061] 3. According to the pressure data, select the characteristic values of the sequence data that can reflect the weight of the truck. The characteristic values selected by this method are: the average peak value, peak value, compensation value, time difference, and passing vehicle speed after each tire passes over each pressure sensor. Among them, the average peak value is the arithmetic mean of 100 pressure values before and after the peak value of the current pressure sensor; the compensation value is the pressure value of the pressure sensor in front of the current pressure sensor; the time difference is the time difference between the peak value of the current pressure sensor and the peak value of the first pressure sensor of this vehicle, as Figure 3 and Figure 4 shown.
[0062] 4. As Figure 5 shown, the 2 weighing platforms respectively correspond to the left and right wheels of the vehicle during driving. Each weighing platform has 2 pressure sensors. The pressure sensor that first contacts the wheel is the front pressure sensor, and the pressure sensor that finally contacts the wheel is the rear pressure sensor. Summarize the characteristic data of the passing vehicle data of each vehicle and combine them in chronological order. For example, the arrangement order of the passing vehicle characteristic data of a six-axle vehicle is:
[0063] The front average peak 1, front peak 1, front compensation value 1, front time difference 1... front average peak 6, front peak 6, front compensation value 6, front time difference 6 of weighing platform 1, and the rear average peak 1, rear peak 1, rear compensation value 1, rear time difference 1... rear average peak 6, rear peak 6, rear compensation value 6, rear time difference 6;
[0064] The front average peak 1, front peak 1, front compensation value 1, front time difference 1... front average peak 6, front peak 6, front compensation value 6, front time difference 6 of weighing platform 2, and the rear average peak 1, rear peak 1, rear compensation value 1, rear time difference 1... rear average peak 6, rear peak 6, rear compensation value 6, rear time difference 6, vehicle passing speed;
[0065] Among them, the front peak 1 is the peak value output by the front pressure sensor of the weighing platform for the 1st wheel of the vehicle; the rear peak 6 is the peak value output by the rear pressure sensor of the weighing platform for the 6th wheel of the vehicle. Finally, a total of 97 features are selected.
[0066] 5. For the selected 97 features, the Pearson correlation coefficient method is used to screen out the most critical features for the prediction result and eliminate redundant variables. Among them, the calculation formula of the Pearson correlation coefficient is as follows:
[0067]
[0068] Among them, is the average value of a certain feature, is the average value of the sample label.
[0069] Finally, the selected features with Pearson correlation coefficient > 0.4 include the front average peak, rear average peak, front peak, and rear peak of weighing platforms 1 and 2, a total of 48 features, which are used as the final input features of the model. Specifically, these 48 features are:
[0070] The front average peak 1, front average peak 2... front average peak 6 of weighing platform 1, and the rear average peak 1, rear average peak 2... rear average peak 6;
[0071] The front peak 1, front peak 2... front peak 6 of weighing platform 1, and the rear peak 1, rear peak 2... rear peak 6;
[0072] The front average peak 1, front average peak 2... front average peak 6 of weighing platform 2, and the rear average peak 1, rear average peak 2... rear average peak 6;
[0073] The front peak 1, front peak 2... front peak 6 of weighing platform 2, and the rear peak 1, rear peak 2... rear peak 6.
[0074] 6. Due to factors such as sensor fatigue and temperature changes, over a long time interval, even if the same vehicle passes through the sensor at the same passing speed, the collected passing vehicle data will vary. Therefore, this will lead to a problem of decreasing prediction accuracy of the algorithm after a period of time, thus having a greater impact on the accurate prediction of the passing vehicle weight. Based on this, the collected data is arranged in chronological order. Since each average peak and actually represents the axle weight of the vehicle, the ratio obtained by dividing the sum of all average peaks and cumulative values by the true weight of the vehicle is used as the analysis data, and its result is visualized, as Figure 6 shown. It can be found from Figure (a) that the data shows a periodic change pattern, and over time, the periodic pattern of the error becomes more obvious and has a gradually increasing trend. To more intuitively display this pattern, (a) is enlarged to (d) and data for two randomly selected days is visualized, shown in (b) and (c) respectively. Through analysis, it can be seen that the periodic decrease and increase mainly occur between 10:00 and 18:00. Specifically, the error begins to decrease around 10:00, reaches the trough around 14:00, and then the value increases until 18:00. This phenomenon may be related to the high temperature at noon, indicating that temperature has an impact on the measurement error. In addition, over time, the values as a whole show an increasing trend and are more scattered. Further analysis reveals that this may be related to the deformation of the weighing platform mechanical structure caused by the increase in the number of passing vehicles.
[0075] The performance of the model is enhanced by introducing two new features, namely the six-stage temperature feature and the impact number feature. Specifically, the six-stage temperature feature is used to replace the actual temperature feature, while the impact number feature is used to simulate the deformation of the weighing platform mechanical structure. By adding these two features to the improved deep forest model for training, the impact of temperature changes and mechanical deformation on the model can be better captured, thereby improving the prediction accuracy of the model and effectively alleviating the problem of decreasing model accuracy.
[0076] Among them, for the six-stage temperature feature, first, the collected passing vehicle data is arranged in chronological order, and a day of 24 hours is divided into six time periods, namely 0:00 - 4:00, 4:00 - 8:00, 8:00 - 12:00, 12:00 - 16:00, 16:00 - 20:00, 20:00 - 24:00. Then, the passing vehicle data falling into the corresponding time period is marked with features; among them, 0:00 - 4:00 is marked as 1, 4:00 - 8:00 is marked as 2, 8:00 - 12:00 is marked as 3, 12:00 - 16:00 is marked as 4, 16:00 - 20:00 is marked as 5, and 20:00 - 24:00 is marked as 6;
[0077] The impact number feature is the total cumulative number of passing vehicles on the weighing platform lane within the corresponding time period.
[0078] Step 2, model training;
[0079] Input the pressure data features, six-stage temperature features, and impact frequency features into the improved deep forest model for prediction to obtain the predicted weight of the truck.
[0080] The specific improved deep forest model is as follows:
[0081] 1. Data input module, used for: taking the eigenvalue, six-stage temperature feature, and impact frequency feature screened by Pearson correlation coefficient as input.
[0082] 2. Feature importance calculation module, used for: calculating the feature importance scores according to XGBoost and random forest respectively.
[0083] where, I XGB,j is the importance score of feature j; T is the number of trees in XGBoost; is the reduction in the loss function brought by using feature j for splitting in the t-th tree; N is the total number of trees in the random forest; Splits(j) is the set of nodes that use feature j for splitting in all trees; is the reduction in the variance of the target variable when using feature j for splitting at node s in the t-th tree.
[0084]
[0085] 3. Feature rearrangement module, used for: placing the 5 features with the highest scores in the random forest and the 5 features with the highest scores in XGBoost side by side in the middle part, and arranging and rearranging the remaining feature importances according to the XGBoost results, following the rule that the importance is high in the middle and low on both sides to obtain the rearranged feature X sorted .
[0086] 4. Multi-granularity scanning module, used for sliding the sliding window on the rearranged feature X sorted to generate multiple subsequences. Each subsequence predicts the target value through a random forest regressor and a completely random forest regressor to obtain the predicted value after the random forest and the predicted value of the completely random forest
[0087] Output of the s-th sliding window:
[0088]
[0089] 5. Feature concatenation module, used for concatenating all the sliding window outputs with the rearranged feature X sorted and using it as the input of the cascade forest.
[0090] X = [X sorted , H(1) ,H (2) ,…,H (S) ]
[0091] 6. The cascade forest regression module uses a stacked multi-layer regression forest structure to train the model based on the input features.
[0092] Among them, in the stacked multi-layer regression forest structure, the input feature of the lth layer is X (l) , the output value of each forest layer is Calculate the average prediction value of the K forests in each layer, and concatenate the average prediction value with the original input as the input of the next layer.
[0093]
[0094] During the model training process, the termination condition of model training is: the mean square error no longer decreases or reaches the preset maximum number of layers.
[0095] 7. The prediction result integration output module is used to integrate and output the model prediction results using the trusted state judgment average integration method after the model training is completed.
[0096] Among them, the average integration method of credible state judgment is:
[0097] (1) Train N improved deep forest models, and output N prediction results M of N improved deep forest models. i Perform credible state judgment, and the judgment rule is to take the median of the N prediction results output, recorded as M 中 , N prediction results M i With M 中 The absolute value of the difference is defined as the error value E i ;
[0098] E i =|M i -M 中 |
[0099] (2) To improve the overall accuracy of the prediction result set, it is necessary to eliminate the prediction results with large errors among the N estimated values. To this end, an error threshold λ is set. Only when the error value is less than or equal to the error threshold is the result retained, and finally n credible prediction results are output.
[0100]
[0101] Among them, N prediction results are: N prediction results of N improved deep forest models obtained by training; n is the n credible prediction results finally retained.
[0102] Regarding the improvement of the deep forest model in this embodiment, it should be noted that:
[0103] (1) Feature importance rearrangement
[0104] There is a potential problem in the multi-granularity scanning stage of the deep forest model, that is, the model may not be able to effectively capture and utilize the key feature information distributed at the edges. As the number of cascaded layers increases, this impact will accumulate layer by layer, affecting the overall performance of the model.
[0105] To solve this problem, this embodiment adopts a feature importance rearrangement strategy, placing the features with higher importance in the middle position to enhance the prediction accuracy of the model. Specifically, this embodiment uses a feature importance evaluation method that combines eXtreme Gradient Boosting (XGBoost) and Random Forest (RF). In the XGBoost model, the importance of a feature is measured by counting the number of times a feature appears in all trees. The more times it appears, the greater the influence of the feature on the model. In RF, the importance of a feature is based on its contribution to the node purity when splitting in the tree. The greater the contribution, the greater the contribution of the feature to the model prediction. Since the importance rankings of features are different in the two models, and the method in this embodiment uses a deep forest as the prediction model, and the feature importance ranking of the random forest has certain reference value, the importance rankings of the two features are combined to comprehensively determine the importance of the features. The specific approach is to place the top 5 features with the highest importance in RF and XGBoost respectively in the middle position of the data, and the remaining features are arranged at both ends. This arrangement can ensure that the features with high importance obtain more selection and transformation opportunities in subsequent processing, laying a foundation for the cascaded forest model.
[0106] (2) Credible state judgment average integration
[0107] For complex and noisy passing vehicle data, the prediction results of a single deep forest model may be unstable. Based on the concept that the integration of multiple learners can usually outperform any single learner, the integrated deep forest structure is applied to the vehicle dynamic weighing task. By parallel training multiple deep forest models and integrating their output results, better prediction performance can be obtained.
[0108] Comparative experiment
[0109] (1) Improving the effectiveness of the improved deep forest model in cross-site problems:
[0110] Table 2 Evaluation indicators for model comparative experiments
[0111]
[0112] According to Table 2 and Figures 7 - 10It can be seen that the improved deep forest model has the best overall performance. Compared with the sub-optimal model CatBoost, the RMSE of this model on the overall test set is reduced by 226.74 kg, the MAE is reduced by 176.44 kg, and the MAPE is decreased by 0.42%. Moreover, the fluctuation of the prediction error is smaller, showing strong stability.
[0113] In the tests at each site, the RMSE of I-gcf at Site 3 is reduced by 307.53 kg compared with CatBoost, the MAE is reduced by 337.08 kg, and the MAPE is reduced by 0.74%; the RMSE at Site 4 increases by 39.22 kg, the MAE increases by 104.18 kg, and the MAPE increases by 0.2541%; Site 5 shows excellent performance, with the RMSE reduced by 895.29 kg, the MAE reduced by 998.30 kg, and the MAPE reduced by 2.5523%, showing better prediction accuracy.
[0114] Compared with the unimproved deep forest model, for I-gcf on the overall test set, the RMSE is reduced by 45.51 kg and the MAE is reduced by 45.27 kg. Among them, the improvement at Site 3 is more obvious, with the RMSE reduced by 15.03 kg and the MAE reduced by 56.15 kg; the performance at Site 5 shows a slight decline, with the RMSE increased by 4.51 kg and the MAE increased by 54.37 kg.
[0115] Generally speaking, the improved deep forest model shows obvious advantages at most test sites, especially at Sites 3 to 5. The model not only has high overall accuracy but also better prediction stability, verifying the effectiveness of the method of the present invention in cross-site problems.
[0116] (2) Effectiveness of the improved deep forest model:
[0117] ① Effectiveness of the reordering of feature importance:
[0118] Table 3 Experimental results
[0119]
[0120] It can be seen that using the feature processing method in the multi-granularity scanning stage of the deep forest is more effective in improving the model performance. Among them, the best-performing is the XGB-RF feature ranking method. Specifically, compared with the model without feature ranking, the XGB-RF feature ranking method reduces the RMSE, MAE, and MAPE by 45.51 Kg, 45.27 Kg, and 0.0949% respectively. Therefore, the XGB-RF feature ranking method is effective in improving the prediction accuracy.
[0121] ② Effectiveness of the average integration of credible state judgments:
[0122] Table 4 Experimental results
[0123]
[0124] According to the experimental data in Table 4 and Figure 11 the comparison graph, the model with the average integration method of credible state judgment has the best effect. Specifically, for Site 2, the RMSE, MAE, and MAPE of the model after Ea - gcf are reduced by 79.80 kg, 63.49 kg, and 0.1298% respectively compared with gcf; for Site 3, the RMSE, MAE, and MAPE of the model after Ea - gcf are reduced by 15.03 kg, 56.15 kg, and 0.1236% respectively compared with gcf; the improvement of Site 4 is more obvious, and the three indicators are reduced by 323.33 kg, 346.14 kg, and 0.8443% respectively; the prediction results of Site 5 show that the RMSE of Ea - gcf increases by 4.51 kg, the MAE increases by 54.37 kg, and the MAPE increases by 0.0152% compared with gcf.
[0125] The experimental results show that the Ea - gcf model with credible state judgment average integration is superior to the non - integrated gcf model in overall performance, with the RMSE reduced by 45.51 kg, the MAE reduced by 45.27 kg, and the MAPE reduced by 0.0949%. The credible state judgment average integration strategy performs better than the non - integrated at most sites, verifying the effectiveness of the credible state judgment average integration strategy in improving the prediction accuracy of the model.
[0126] Example 2
[0127] This example provides an implementation case of a cross - site vehicle dynamic weighing method based on an improved deep forest model.
[0128] (I) Data collection
[0129] Collect the vehicle - passing data of a certain dynamic weighing site 1 and Site 1 as the sample data for model framework, and collect the vehicle - passing data of certain dynamic weighing sites A, B, C, and D as the prediction sample data. The data collection time and distribution are shown in Table 5.
[0130] Table 5 Data distribution
[0131]
[0132] (II) Feature extraction of vehicle - passing data
[0133] Sort out the average peak value, peak value, compensation value, time difference, and passing vehicle speed of each tire after passing through each sensor, and process them in sequence according to the arrangement order of the passing vehicle characteristic data of the six-axle vehicle in Embodiment 1, and combine and sort them into sample data. Among them, the data of Site 1 and Site 2 are the sample data for training the model, and the data of Sites A, B, C, and D are the prediction sample data.
[0134] (3) Use the sample data of Site 1 and Site 2 to construct 10 vehicle weight prediction models based on the improved deep forest according to the method steps in Embodiment 1.
[0135] (4) Vehicle weight prediction
[0136] Use the 10 improved deep forest prediction models established by training in (3) to predict the sample data of Sites A, B, C, and D. Judge the credible status of the prediction results of the 10 models according to Step 8 of Step 1, and eliminate the uncredible results, where λ is taken as 100 Kg. Take the average value of the credible results and output the final weight prediction result. Figure 12 is the error scatter plot of the vehicle weight prediction results of 4 different sites, indicating that the model has good overall accuracy and prediction stability in cross-site problems.
[0137] Embodiment 3
[0138] Based on the same inventive concept, the embodiment of the present application also provides a cross-site vehicle dynamic weighing system based on an improved deep forest model. The implementation solution provided by the cross-site vehicle dynamic weighing system based on the improved deep forest model is similar to the implementation solution described in the method of Embodiment 1. Therefore, the specific limitations in one or more embodiments of the cross-site vehicle dynamic weighing system based on the improved deep forest model provided below can refer to the limitations on the method in Embodiment 1, and will not be repeated here.
[0139] The present embodiment provides a cross-site vehicle dynamic weighing system based on an improved deep forest model, including:
[0140] A pressure data feature acquisition module configured to: collect passing vehicle data of a vehicle, perform feature processing on the passing vehicle data, and obtain pressure data features;
[0141] A weighing prediction module configured to: send the pressure data features, six-stage temperature features, and impact times features into the improved deep forest model for prediction to obtain the predicted weight of the truck;
[0142] Among them, for the six-stage temperature feature, the collected vehicle passing data is first arranged in chronological order, and the 24 hours of a day are divided into six time periods, namely 0:00 - 4:00, 4:00 - 8:00, 8:00 - 12:00, 12:00 - 16:00, 16:00 - 20:00, and 20:00 - 24:00. Then, the vehicle passing data falling into the corresponding time period is marked with features; among them, 0:00 - 4:00 is marked as 1, 4:00 - 8:00 is marked as 2, 8:00 - 12:00 is marked as 3, 12:00 - 16:00 is marked as 4, 16:00 - 20:00 is marked as 5, and 20:00 - 24:00 is marked as 6.
[0143] The impact times feature is the total cumulative number of vehicle passes on the weighing platform lane within the corresponding time period.
[0144] Embodiment 4
[0145] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the cross-site vehicle dynamic weighing method based on the improved deep forest model described in Embodiment 1.
[0146] Embodiment 5
[0147] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the cross-site vehicle dynamic weighing method based on the improved deep forest model described in Embodiment 1.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: still can modify the specific implementation manners of the present invention or perform equivalent replacements for some technical features; without departing from the spirit of the technical solutions of the present invention, they should all be covered within the scope of the technical solutions claimed by the present invention.
Claims
1. A cross-site vehicle dynamic weighing method based on an improved deep forest model, characterized in that, It includes the following steps: Collect the vehicle passing data, process the characteristics of the passing data to obtain the pressure data characteristics; Send the pressure data characteristics, six-stage temperature characteristics and impact times characteristics into the improved deep forest model for prediction to obtain the predicted weight of the truck; Among them, for the six-stage temperature characteristics, first arrange the collected passing data in chronological order, divide 24 hours of a day into six time periods, namely 0:00~4:00, 4:00~8:00, 8:00~12:00, 12:00~16:00, 16:00~20:00, 20:00~24:00, and then mark the passing data falling into the corresponding time period; among them, 0:00~4:00 is marked as 1, 4:00~8:00 is marked as 2, 8:00~12:00 is marked as 3, 12:00~16:00 is marked as 4, 16:00~20:00 is marked as 5, and 20:00~24:00 is marked as 6; The impact times characteristic is the total cumulative number of passing vehicles on the weighing platform lane within the corresponding time period.
2. The cross-site vehicle dynamic weighing method based on the improved deep forest model according to claim 1, wherein, The method for obtaining the pressure data characteristics is: The weighing platform includes 2 weighing platforms corresponding to the left and right wheels of the truck respectively, and 2 pressure sensors are arranged along the forward direction of the truck on each weighing platform; the output data of the pressure sensors are used as the passing data; For the collected passing data, select the average peak value, peak value, compensation value, time difference and passing speed after each tire passes through each pressure sensor as the characteristic data; among them, the average peak value is the arithmetic mean of 100 pressure values before and after the current sensor peak value, and the compensation value is the pressure value of the sensor in front of the current sensor; the time difference is the time difference between the current sensor peak value and the first sensor peak value of this vehicle; Use the Pearson correlation coefficient method to screen out the features that are most critical to the prediction result. Among them, the features with a Pearson correlation coefficient > 0.4 are selected, including the front average peak value, rear average peak value, front peak value and rear peak value of weighing platforms one and two, as the final input features of the model.
3. The cross-site vehicle dynamic weighing method based on the improved deep forest model according to claim 1 or 2, characterized in that, The improved deep forest model includes: A data input module for taking the feature values, six-stage temperature characteristics and impact times characteristics screened by the Pearson correlation coefficient as inputs into the model; A feature importance calculation module for calculating the feature importance scores according to XGBoost and random forest respectively; A feature rearrangement module for placing the 5 features with the highest scores calculated according to the random forest and the 5 features with the highest scores calculated according to XGBoost side by side in the middle part, and the importance of the remaining features follows the XGBoost result, and they are spliced and rearranged according to the rule that the importance is high in the middle and low on both sides to obtain the rearranged features; A multi-granularity scanning module for using a sliding window to slide the rearranged features to generate multiple subsequences, and each subsequence predicts the target value through a random forest regressor and a completely random forest regressor to obtain the random forest prediction value and the completely random forest prediction value; the output of each sliding window is the random forest prediction value and the completely random forest prediction value of the subsequence of that sliding window; A feature splicing module, configured to splice the outputs of all sliding windows with the rearranged features and use the result as the input of the cascade forest. A cascade forest regression module, adopting a stacked multi-layer regression forest structure, configured to perform model training on the input features. During the model training process, the termination condition of the model training is that the mean squared error no longer decreases or reaches the preset maximum number of layers. A predicted result integrated output module, configured to, after the model training is completed, use the average integration method for reliable state judgment to integrally output the model prediction results. The average integration method for reliable state judgment is as follows: Train N improved deep forest models and for the N prediction results output by the N improved deep forest models M i perform a credible state judgment. The judgment rule is to take the median of the N prediction results output, denoted as M 中 and define the absolute value of the difference between the N prediction results M i and M 中 as the error value E i ; Set the error threshold λ, and only when the error value E i is less than or equal to the error threshold λ, keep the prediction result, and finally output n credible prediction results.
4. A cross-site vehicle dynamic weighing system based on an improved deep forest model, characterized in that, including A pressure data feature acquisition module, configured to: collect the passing vehicle data of the vehicle, perform feature processing on the passing vehicle data, and obtain pressure data features. A weighing prediction module, configured to: send the pressure data features, six-stage temperature features, and impact times features into an improved deep forest model for prediction to obtain the predicted weight of the truck. Among them, for the six-stage temperature features, first arrange the collected passing vehicle data in chronological order, divide 24 hours of a day into six time periods, namely 0:00 - 4:00, 4:00 - 8:00, 8:00 - 12:00, 12:00 - 16:00, 16:00 - 20:00, 20:00 - 24:00, and then perform feature marking on the passing vehicle data falling into the corresponding time periods. Among them, 0:00 - 4:00 is marked as 1, 4:00 - 8:00 is marked as 2, 8:00 - 12:00 is marked as 3, 12:00 - 16:00 is marked as 4, 16:00 - 20:00 is marked as 5, and 20:00 - 24:00 is marked as 6. The impact times feature is the total cumulative number of passing vehicles on the weighing platform lane within the corresponding time period.
5. The cross-site vehicle dynamic weighing system based on the improved deep forest model according to claim 4, characterized in that, The method for obtaining pressure data features is as follows: The weighing platform includes 2 weighing platforms corresponding to the left and right wheels of the truck during driving, and 2 pressure sensors are arranged on each weighing platform along the advancing direction of the truck. The output data of the pressure sensors is used as the passing vehicle data. For the collected passing vehicle data, select the average peak value, peak value, compensation value, time difference, and passing vehicle speed after each tire passes each pressure sensor as feature data. Among them, the average peak value is the arithmetic mean of 100 pressure values before and after the peak value of the current sensor, the compensation value is the pressure value of the sensor in front of the current sensor, and the time difference is the time difference between the peak value of the current sensor and the peak value of the first sensor of this vehicle. Summarize the feature data of the passing vehicle data of each vehicle and merge them in chronological order. Use the Pearson correlation coefficient method to screen out the features that are most critical to the prediction results. Among them, the features with a Pearson correlation coefficient > 0.4 are selected, including the front average peak value, rear average peak value, front peak value, and rear peak value of weighing platforms one and two, as the final input features of the model.
6. The cross-site vehicle dynamic weighing system based on the improved deep forest model according to claim 4 or 5, characterized in that The improved deep forest model includes: A data input module, configured to use the feature values screened by the Pearson correlation coefficient, six-stage temperature features, and impact times features as the input to the model. A feature importance calculation module, configured to calculate the feature importance scores according to XGBoost and random forest respectively. A feature rearrangement module, which is used to place the top 5 features with the highest scores calculated according to the random forest and the top 5 features with the highest scores calculated according to XGBoost side by side in the middle part, and the importance of the remaining features follows the XGBoost result. They are spliced and rearranged according to the rule that the importance is high in the middle and low on both sides to obtain the rearranged features; A multi-granularity scanning module, which is used to generate multiple subsequences by sliding a sliding window over the rearranged features. Each subsequence predicts the target value through a random forest regressor and a completely random forest regressor to obtain the random forest prediction value and the completely random forest prediction value; the output of each sliding window is the random forest prediction value and the completely random forest prediction value of the subsequence of the sliding window; A feature splicing module, which is used to splice the outputs of all sliding windows with the rearranged features and use them as the input of the cascade forest; A cascade forest regression module, which adopts a stacked multi-layer regression forest structure and is used to train the model for the input features; during the model training process, the termination condition of the model training is that the mean square error no longer decreases or reaches the preset maximum number of layers; A prediction result integration and output module, which is used to integrate and output the model prediction results by using the credible state judgment average integration method after the model training is completed; The credible state judgment average integration method is: Train N improved deep forest models and the N prediction results output by the N improved deep forest models M i Perform a credible state judgment. The judgment rule is to take the median of the N prediction results output, denoted as M 中 , and for the N prediction results M i and M 中 , the absolute value of the difference is defined as the error value E i ; Set the error threshold λ, and only when the error value E i is less than or equal to the error threshold λ, keep the prediction result, and finally output n credible prediction results.
7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that When the processor executes the program, it implements the cross-site vehicle dynamic weighing method based on the improved deep forest model according to any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that A computer program is stored on the computer-readable storage medium, and when the program is executed by the processor, it implements the cross-site vehicle dynamic weighing method based on the improved deep forest model according to any one of claims 1 to 3.