Training methods, devices, equipment and storage media for vehicle-mounted weighing models

By training a nonlinear model and combining it with vehicle angle data, the load error problem of the vehicle-mounted weighing model was solved, and the accuracy and precision of load estimation were improved.

CN117686074BActive Publication Date: 2026-07-17SHENZHEN HAIXING ZHIJIA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HAIXING ZHIJIA TECH CO LTD
Filing Date
2023-12-05
Publication Date
2026-07-17

Smart Images

  • Figure CN117686074B_ABST
    Figure CN117686074B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for training an on-board weighing model, belonging to the field of model training technology. The on-board weighing model training method includes acquiring multiple sets of experimental data; each set of experimental data includes the vehicle roll angle, vehicle pitch angle, and multiple vehicle body strain values ​​collected for the same vehicle's actual counterweight value; wherein the actual vehicle counterweight value corresponds to different sets of experimental data; based on the multiple sets of experimental data, multiple different nonlinear models are trained to obtain the load estimation results of each nonlinear model; based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value, each nonlinear model is evaluated to determine the optimal nonlinear model. This invention significantly improves the accuracy of on-board weighing models for estimating vehicle load, thereby reducing weighing system errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model training technology, and in particular to a method, apparatus, equipment and storage medium for training vehicle-mounted weighing models. Background Technology

[0002] In related technologies, vehicle weighing involves controlling the cargo box to be in a specified tilt state, acquiring multiple stress data detected by multiple stress sensors in the cargo box under the specified tilt state, and determining the vehicle weight through a linear mapping relationship with the vehicle weight.

[0003] However, the load estimate obtained by the vehicle weighing model based on linear mapping has a large error compared with the actual vehicle load, and cannot meet the requirements of vehicle weighing. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for training vehicle-mounted weighing models, aiming to solve the technical problem in related technologies where the weighing error is large and cannot meet the requirements of vehicle-mounted weighing.

[0005] To achieve the above objectives, the present invention provides a method for training an on-board weighing model, which includes the following steps:

[0006] Multiple sets of experimental data were acquired; each set of experimental data included the vehicle roll angle, vehicle pitch angle, and multiple vehicle strain values ​​collected for the same vehicle's actual weight. The actual weight values ​​of the vehicle were different for different sets of experimental data.

[0007] Based on multiple sets of experimental data, several different nonlinear models were trained to obtain the load estimation results of each nonlinear model.

[0008] Based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value, each nonlinear model is evaluated, and the optimal nonlinear model is determined.

[0009] Optionally, the step of training multiple nonlinear models based on multiple sets of experimental data to obtain the load estimation results of each nonlinear model includes:

[0010] The multiple sets of experimental data are divided into a predetermined number of non-overlapping training subsets of the same size;

[0011] Select one training subset from a predetermined number of training subsets as the validation set, and use the remaining training subsets as the training set;

[0012] Multiple nonlinear models that are different from each other are trained based on the training set to obtain multiple trained nonlinear models.

[0013] The training nonlinear models are validated based on the validation set to obtain the load prediction values ​​output by each nonlinear model.

[0014] Select a training subset from the training set that was not used for validation as a new validation set, and update the training set based on the remaining training subsets;

[0015] Return to the execution and train multiple different nonlinear models based on the training set to obtain multiple trained nonlinear models, until the preset number of iterations are performed.

[0016] For each nonlinear model, the load prediction value output by the nonlinear model is used as the load estimation result.

[0017] Optionally, the step of evaluating each nonlinear model and determining the optimal nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value includes:

[0018] For each nonlinear model, determine the root mean square error, coefficient of determination, and mean absolute error between the load estimation result and the corresponding actual weight values ​​of all vehicles.

[0019] Based on the root mean square error, coefficient of determination, and mean absolute error, each nonlinear model is evaluated, and the optimal nonlinear model is determined.

[0020] Optionally, after evaluating each nonlinear model based on its load estimation results and the corresponding actual vehicle counterweight, and determining the optimal nonlinear model, the method further includes:

[0021] The optimal nonlinear model is optimized by finding the model parameters to obtain the target weighing model.

[0022] Optionally, the vehicle body strain value is acquired by strain measurement sensors installed on the vehicle axle.

[0023] Optionally, the steps for obtaining multiple sets of experimental data include:

[0024] The vehicle's permissible load range is evenly divided into a second preset number of load intervals, the vehicle's roll angle range is evenly divided into a second preset number of roll angle intervals, and the vehicle's pitch angle range is evenly divided into a second preset number of pitch angle intervals.

[0025] A load sampling value is determined for each load range, a roll angle sampling value is determined for each vehicle roll angle range, and a pitch angle sampling value is determined for each vehicle pitch angle range.

[0026] An orthogonal experimental table was constructed based on all load sampling values, all roll angle sampling values, all pitch angle sampling values, and the Latin hypercube method. Calibration experiments were conducted according to the orthogonal experimental table to obtain multiple sets of experimental data.

[0027] Optionally, after evaluating each nonlinear model based on its load estimation results and the corresponding actual vehicle counterweight, and determining the optimal nonlinear model, the method further includes:

[0028] Obtain the current vehicle's roll angle, pitch angle, and multiple vehicle body strain values;

[0029] By inputting the vehicle roll angle, vehicle pitch angle, and multiple vehicle strain values ​​into the optimal nonlinear model, the current vehicle load estimation result output by the optimal nonlinear model is obtained.

[0030] Furthermore, to achieve the above objectives, the present invention also provides a vehicle-mounted weighing model training device, the device comprising:

[0031] The data acquisition module is used to acquire multiple sets of experimental data; each set of experimental data includes the vehicle roll angle, vehicle pitch angle and multiple vehicle body strain values ​​collected for the same vehicle's actual counterweight value.

[0032] The model training module is used to train multiple nonlinear models that are different from each other based on multiple sets of experimental data, and obtain the load estimation results of each nonlinear model.

[0033] The model optimization module is used to evaluate each nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value, and to determine the optimal nonlinear model.

[0034] In addition, to achieve the above objectives, the present invention also provides a vehicle-mounted weighing model training device, the device comprising: a memory, a processor, and a vehicle-mounted weighing model training program stored in the memory and executable on the processor, the vehicle-mounted weighing model training program being configured to implement the steps of the vehicle-mounted weighing model training method as described above.

[0035] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a vehicle-mounted weighing model training program, which, when executed by a processor, implements the steps of the vehicle-mounted weighing model training method as described above.

[0036] This invention introduces vehicle roll angle and vehicle pitch angle into the training process of the vehicle-mounted weighing model. By training each nonlinear model in the nonlinear model set, the trained nonlinear models can adapt to vehicle load estimation in different slope scenarios. Based on this, each trained nonlinear model is evaluated by comparing the load estimation results with the actual vehicle weight value. The optimal nonlinear model whose load estimation result is closest to the actual vehicle weight value is determined for vehicle load estimation. Thus, the accuracy of vehicle load estimation by the vehicle-mounted weighing model is significantly improved from the two dimensions of adaptability to slope scenarios and model optimization, thereby reducing the weighing system error. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the structure of the vehicle-mounted weighing model training device in the hardware operating environment involved in the embodiments of the present invention;

[0038] Figure 2 This is a flowchart illustrating the first embodiment of the vehicle-mounted weighing model training method of the present invention;

[0039] Figure 3 This is a flowchart illustrating the second embodiment of the vehicle-mounted weighing model training method of the present invention;

[0040] Figure 4 This is a flowchart illustrating the third embodiment of the vehicle-mounted weighing model training method of the present invention;

[0041] Figure 5 A schematic diagram of the vehicle weighing system architecture, which is an example of the vehicle weighing model training method of the present invention;

[0042] Figure 6 This is a schematic diagram of the hardware installation location for an example of the vehicle-mounted weighing model training method of the present invention;

[0043] Figure 7 This is a schematic diagram illustrating the technical logic of the vehicle-mounted weighing model training method of the present invention.

[0044] Figure 8 This is a schematic diagram illustrating the specific implementation process of the vehicle-mounted weighing model training method of the present invention;

[0045] Figure 9 This is a comparison chart of the test result error of the vehicle-mounted weighing model training method of the present invention and the test result error of related technologies;

[0046] Figure 10 This is a schematic diagram of the functional modules of the first embodiment of the vehicle-mounted weighing model training method of the present invention.

[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0048] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0049] Analysis of relevant technologies reveals the following mainstream solutions to meet the weighing requirements of commercial vehicles: ① Traditional weighbridges. Problems: Vehicles must be parked sequentially on the weighbridge for weighing, resulting in time-consuming and inefficient operations. ② Improved weighbridges using WIM technology, where vehicles can be weighed simply by passing over the weighbridge surface at a certain speed. Problems: Vehicle speed affects weighing accuracy, ground installation is difficult, and environmental factors can introduce computational noise. ③ Using vehicle dynamics models to estimate vehicle load. Problems: Vehicles must maintain a constant speed or uniform acceleration on a level surface for load calculation, making the application conditions demanding and resulting in significant errors.

[0050] In other schemes, test objects are sequentially installed at different locations in the cargo compartment, and the sensor readings are recorded at each installation. A statically indeterminate equation is constructed based on the test object mass array, sensor reading array, and sensor allocation coefficient array. The optimal allocation coefficients for each sensor are obtained by solving the least-squares solution of this statically indeterminate equation. Test objects are sequentially installed at any location in the cargo compartment, and the actual mass of each installed test object is recorded. The corresponding sensor readings are recorded at each installation to determine the measurement error for each installation. Polynomial fitting is performed to determine the relationship between the measurement error value and the measured mass. The actual cargo mass is obtained by summing the measured mass of the actual cargo and the measurement error of the cargo. However, this scheme uses polynomial fitting to estimate the weighing model, which is too limited and cannot guarantee that the weighing process has been abstracted into an optimal model, thus leading to excessive weighing errors.

[0051] To address this, the present invention introduces vehicle roll angle and vehicle pitch angle into the training process of the vehicle-mounted weighing model. Training is performed on each nonlinear model in the nonlinear model set, enabling the trained nonlinear models to adapt to vehicle load estimation in different slope scenarios. Furthermore, by comparing the load estimation results with the actual vehicle weight value, each trained nonlinear model is evaluated, and the optimal nonlinear model whose load estimation result is closest to the actual vehicle weight value is determined for vehicle load estimation. This significantly improves the accuracy of the vehicle-mounted weighing model for vehicle load estimation from both the perspectives of adaptability to slope scenarios and model optimization, thereby reducing weighing system errors.

[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of the vehicle-mounted weighing model training device in the hardware operating environment of the embodiment of the present invention.

[0053] like Figure 1As shown, the vehicle-mounted weighing model training device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the vehicle-mounted weighing model training device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0055] like Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a vehicle-mounted weighing model training program.

[0056] exist Figure 1 In the vehicle-mounted weighing model training device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the vehicle-mounted weighing model training device of the present invention can be set in the vehicle-mounted weighing model training device. The vehicle-mounted weighing model training device calls the vehicle-mounted weighing model training program stored in the memory 1005 through the processor 1001 and executes the vehicle-mounted weighing model training method provided in the embodiment of the present invention.

[0057] This invention provides a method for training a vehicle-mounted weighing model, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of a vehicle-mounted weighing model training method according to the present invention.

[0058] In this embodiment, the vehicle-mounted weighing model training method includes:

[0059] Step S100: Obtain multiple sets of experimental data.

[0060] Understandably, training samples need to be prepared before model training. In this embodiment, a calibration experiment is designed based on three dimensions: the vehicle's actual weight distribution, the vehicle's roll angle, and the vehicle's pitch angle. Multiple vehicle strain values ​​are obtained through the calibration experiment, and multiple sets of experimental data are then obtained for subsequent model training.

[0061] Each set of experimental data includes the vehicle roll angle, vehicle pitch angle, and multiple vehicle body strain values ​​collected for the same vehicle's actual weight value. In other words, the actual weight values ​​of the vehicle are different for different sets of experimental data.

[0062] In one specific implementation, the vehicle body strain value is collected by multiple strain measurement sensors installed on the vehicle axle; therefore, the vehicle body strain value is also the axle strain value. This allows for the acquisition of axle strain values ​​that reflect the vehicle's load without modifying the vehicle body structure, thus ensuring that the vehicle body strength remains unaffected while estimating the vehicle load.

[0063] Furthermore, to obtain the experimental data set, in some specific embodiments, calibration experiments can be performed by combining orthogonal experimental design and Latin hypercube experimental design. Therefore, in this embodiment, step S100 specifically includes:

[0064] Step S110: Divide the vehicle's allowable load range evenly into a second preset number of load intervals, divide the vehicle's roll angle range evenly into a second preset number of roll angle intervals, and divide the vehicle's pitch angle range evenly into a second preset number of pitch angle intervals.

[0065] Step S120: Determine a load sampling value from each load range, determine a roll angle sampling value from each vehicle roll angle range, and determine a pitch angle sampling value from each vehicle pitch angle range.

[0066] Step S130: Construct an orthogonal experimental table based on all load sampling values, all roll angle sampling values, all pitch angle sampling values, and the Latin hypercube method, and conduct calibration experiments according to the orthogonal experimental table to obtain multiple sets of experimental data.

[0067] Understandably, orthogonal experimental design and Latin hypercube experimental design can obtain more comprehensive and reliable data with a fewer number of experiments, thereby improving calibration efficiency and accuracy. The basic idea of ​​orthogonal experimental design is to stratify experimental factors, making them independent of each other, thus reducing the number of experiments and increasing experimental efficiency. Latin hypercube experimental design, on the other hand, uses a hypercube as its basis, evenly distributing experimental points within the hypercube to obtain comprehensive and uniform experimental data.

[0068] Specifically, in this embodiment, the experimental factors include the vehicle's actual weight distribution, roll angle, and pitch angle. Therefore, it is first necessary to determine the vehicle's permissible load range, roll angle range, and pitch angle range. These range parameters can be adjusted specifically according to the vehicle model and its operating environment, and are not limited here.

[0069] Then, the vehicle's permissible load range, vehicle roll angle range, and vehicle pitch angle range are each evenly divided into a second preset number of intervals, resulting in a second preset number of load intervals, a second preset number of roll angle intervals, and a second preset number of pitch angle intervals.

[0070] Next, a data value is randomly selected from each interval of each experimental factor as a sample value, thus obtaining a second preset number of load sample values, a second preset number of roll angle sample values, and a second preset number of pitch angle sample values. Then, using the Latin hypercube experimental design method, each sample value of each experimental factor is fully covered to each level of the second preset number of levels, thus obtaining an orthogonal experimental table containing multiple experimental combinations.

[0071] Finally, calibration experiments can be conducted using the orthogonal experimental table to obtain multiple axle strain values ​​corresponding to each experimental combination. Based on this, each axle strain value, along with its corresponding roll angle and pitch angle sampling values, can be combined to form experimental data sets, thereby obtaining multiple sets of experimental data.

[0072] For example, in a specific scenario, the three experimental factors—the vehicle's actual weight, roll angle, and pitch angle—can be divided into 10 intervals based on their corresponding actual ranges, each with a 10% sampling interval. Then, a sampling point is randomly selected from each interval for each experimental factor. These points constitute the total of a Latin hypercube, comprising 10^3 = 1000 points. However, to collect complete calibration data, 1000 calibration experiments would be required. Therefore, to avoid overly cumbersome calibration data collection, an orthogonal experimental table with 100 experimental data sets can be designed based on the Latin hypercube experimental design method. The orthogonal experimental table designs the experimental scheme by rationally allocating the various levels of the experimental factors to obtain comprehensive and uniform data. Therefore, for the three experimental factors in this example, each with ten levels, an orthogonal experimental table can be used to generate 100 experimental points, each representing an experimental data set.

[0073] Therefore, it can be seen that combining orthogonal experimental design and Latin hypercube experimental design can solve the problem of complex calibration process caused by uniform data acquisition. In multi-parameter and multi-level input scenarios, selecting an appropriate amount of representative and typical data as model training input can significantly reduce the workload of calibration experiments.

[0074] In addition, during calibration experiments, weights or standard counterweights (such as steel pipes, iron blocks, and earthworks of known weight) can be used to provide the actual vehicle counterweight values ​​required for the experimental scheme. A hydraulic lifting test platform or a multi-slope surface can be used to provide the different vehicle attitudes required for the experimental scheme. The vehicle attitude can be reflected by the vehicle roll angle and vehicle pitch angle collected by tilt sensors installed on a horizontal surface of the chassis.

[0075] In the specific experiment, the strain values ​​of the vehicle axle were collected by combining 100 experimental data sets in the orthogonal experimental table with different loads and vehicle body postures.

[0076] Furthermore, during the acquisition of axle strain values, vehicle roll angle, and vehicle pitch angle, a preset filtering algorithm can be used to denoise the acquired data. This preset filtering algorithm can be any of the following: mean filtering, median filtering, or wavelet threshold filtering. Taking the mean filtering algorithm as an example, data transmitted from strain measurement sensors, vehicle roll angle data, and vehicle pitch angle data transmitted from tilt sensors within a preset time period can be acquired. After denoising using the preset algorithm, the mean value of the sensor data within the sampling time period is obtained as the final sampled value. This reduces the impact of individual abnormal data on the final sampled value, thereby ensuring the accuracy of the sampled data.

[0077] Furthermore, the final roll angle sampled values, pitch angle sampled values, and axle strain sampled values ​​can be normalized simultaneously to avoid the adverse effects of different input dimensions on model training.

[0078] Step S200: Based on multiple sets of experimental data, train multiple nonlinear models that are different from each other to obtain the load estimation results of each nonlinear model.

[0079] Specifically, after obtaining multiple sets of experimental data, these sets can be divided into training and validation sets. The experimental data sets in the training set are then input into multiple different nonlinear models for training. After training, each nonlinear model is validated using the validation set to obtain load estimation results based on the validation set.

[0080] The types of nonlinear models include any two or more of the following that can be used for regression analysis: neural networks, support vector machine regression, and decision tree regression.

[0081] Furthermore, in this embodiment, in order to make full use of all samples in the experimental data set for training and testing, and to minimize the bias caused by unreasonable data partitioning, the k-fold cross-validation training method can be preferred for training the nonlinear model. The specific training process steps S200 include:

[0082] Step S210: Divide the multiple sets of experimental data into a predetermined number of non-overlapping training subsets of the same size.

[0083] Step S220: Select one training subset from a preset number of training subsets as the validation set, and use the remaining training subsets as the training set.

[0084] Step S230: Train multiple nonlinear models that are different from each other based on the training set to obtain multiple trained nonlinear models.

[0085] Step S240: Validate multiple trained nonlinear models based on the validation set to obtain the load prediction values ​​output by each nonlinear model.

[0086] Step S250: Select a training subset from the training set that was not used for validation as a new validation set, and update the training set based on the remaining training subsets; return to execute step S230, and repeat until the preset number of iterations are performed.

[0087] Step S260: For each nonlinear model, use the load prediction value output by the nonlinear model as the load estimation result.

[0088] Specifically, the experimental data sets are first divided into a predetermined number of disjoint training subsets of the same size. This predetermined number is the k-value in the k-fold cross-validation training method. The k-value can be adjusted based on factors such as the size of the dataset, the number of features, and computational resource limitations in specific application scenarios; no specific limit is imposed here.

[0089] Then, select one subset from the obtained k training subsets as the validation set, and use the remaining k-1 training subsets as the training set. Input the obtained training set into each nonlinear model for training, and obtain multiple trained nonlinear models. Then input the validation set into each trained nonlinear model for validation, and obtain the load prediction value output by each nonlinear model based on the validation set, and save it.

[0090] Next, select a training subset from the training set that was not used for validation as a new validation set, and use the remaining training subsets as a new training set. Return to step S230 and continue until the number of iterations reaches k.

[0091] Finally, all load prediction values ​​obtained after k iterations of training and validation for each nonlinear model are used as load estimation results for subsequent model evaluation.

[0092] For example, taking the aforementioned 100 experimental data sets as an example, if k is set to 100, then after 100 iterations of training and validation for each nonlinear model, each nonlinear model can output 100 load prediction values. Finally, these 100 load prediction values ​​can be used as the load estimation results of the corresponding nonlinear model.

[0093] Step S300: Based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value, evaluate each nonlinear model and determine the optimal nonlinear model.

[0094] Understandably, after obtaining the load estimation results of all nonlinear models, the predicted load values ​​in the load estimation results can be compared and evaluated with the corresponding actual vehicle weight values ​​to determine the optimal nonlinear model from all nonlinear models whose predicted load values ​​are closest to the corresponding actual vehicle weight values.

[0095] Furthermore, in some specific evaluation methods, the performance of the nonlinear model can be evaluated based on specific preset evaluation indicators. Therefore, in this embodiment, the evaluation step S300 of the nonlinear model specifically includes:

[0096] Step S310: For each nonlinear model, determine the root mean square error, coefficient of determination, and mean absolute error between the load estimation result and the corresponding actual weight values ​​of all vehicles.

[0097] Step S320: Based on the root mean square error, coefficient of determination, and mean absolute error, evaluate each nonlinear model and determine the optimal nonlinear model.

[0098] Specifically, for each nonlinear model, the root mean square error (RMSE) and coefficient of determination (R²) between all predicted load values ​​and the corresponding actual vehicle weight values ​​are calculated. 2 The mean absolute error (MAE) is used to evaluate all nonlinear models. By comprehensively comparing the root mean square error (RMSE), coefficient of determination (CDO), and mean absolute error (MAE) of all models, the nonlinear model with the smallest MSE and MAE and a CDO closest to 1 is identified. Specifically, the weights of these three indicators can be set to 1:1:1, and a voting system can be used to select the optimal model. First, all nonlinear models can be ranked from smallest to largest based on each indicator, and scores can be assigned according to the ranking (e.g., first place gets 1 point, second place gets 2 points, and so on), resulting in score tables based on these three indicators. Finally, the nonlinear models are evaluated based on the combined score of the three indicators, and the nonlinear model with the lowest combined score is the optimal model.

[0099] Of course, in some specific implementations, the evaluation index of the model can also be other evaluation indexes that can reflect the performance of the weighing model, and the weight division of each index can be adaptively adjusted according to the specific application scenario.

[0100] In this embodiment, by introducing vehicle roll angle and vehicle pitch angle during the training process of the vehicle-mounted weighing model, and training each nonlinear model in the nonlinear model set, the trained nonlinear model can adapt to vehicle load estimation in different slope scenarios. Based on this, by comparing the load estimation results with the actual vehicle counterweight value, each trained nonlinear model is evaluated, and the optimal nonlinear model whose load estimation result is closest to the actual vehicle counterweight value is determined for vehicle load estimation. Thus, this invention significantly improves the accuracy of vehicle load estimation by the vehicle-mounted weighing model from two dimensions: adaptability to slope scenarios and model optimization, thereby reducing weighing system errors.

[0101] Furthermore, a second embodiment is proposed based on the first embodiment, with reference to... Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the vehicle-mounted weighing model training method of the present invention.

[0102] In this embodiment, parameter optimization can be performed based on the optimal nonlinear model. Therefore, after step S300, the method further includes:

[0103] Step S400: Optimize the model parameters of the optimal nonlinear model to obtain the target weighing model.

[0104] Understandably, the goal of parameter optimization is to find the optimal combination of parameters that allows the model to best fit the training samples while also exhibiting good generalization ability on different test data. In other words, the aim of parameter optimization is to find the parameters that can most accurately fit the data and make accurate predictions on unknown data. Parameter optimization can be achieved through various optimization algorithms, such as grid search, random search, genetic algorithms, gradient descent, and particle swarm optimization (PSO). These algorithms can search for suitable parameter combinations in the parameter space, evaluate the model's performance based on predefined performance metrics, and continuously update the parameter values ​​until the optimal parameter combination is found.

[0105] To enable those skilled in the art to have a clearer understanding of the parameter optimization in this embodiment, the optimization process of the PSO algorithm is used as an example below.

[0106] Understandably, in the PSO algorithm, each particle represents a combination of parameters for a nonlinear model. The particle's position indicates the parameter value, while the particle's velocity determines the direction and speed of parameter value updates.

[0107] Specifically, for each particle, each element in its position vector corresponds to a model parameter of the nonlinear model. For example, assuming there are four model parameters a, b, c, and d, then the position vector of each particle is a vector with four elements, representing the values ​​of parameters a, b, c, and d respectively.

[0108] The particle's velocity vector determines its direction and speed of movement in the search space. Each element in the velocity vector corresponds one-to-one with a corresponding element in the position vector; that is, each parameter has a corresponding velocity. By updating the velocity and position vectors, the particle can continuously adjust its parameter values ​​in the search space to find a better solution.

[0109] In each iteration, the particles update their velocity and position using an update formula based on their current velocity and position information. In this way, each particle in the swarm continuously adjusts its parameter values ​​based on its own experience and the guidance of the global best position (gbest), thereby gradually approaching or finding the optimal solution.

[0110] The following is the specific process of finding the optimal model parameters for the optimal nonlinear model in this embodiment:

[0111] First, a corresponding fitness function needs to be established based on the model's preset evaluation index. In this embodiment, the root mean square error (RMSE) between the load prediction value of the optimal nonlinear model and the corresponding actual vehicle weight can be used as the fitness function, i.e.:

[0112]

[0113] Among them, y i This represents the vehicle's actual weight distribution. The predicted load capacity, where n is the number of samples.

[0114] Next, the appropriate number of particles and iterations can be set according to the problem complexity and computational resource limitations of the specific application scenario. In this embodiment, the position of each particle represents the model parameter vector of the optimal nonlinear model; the velocity represents the rate of change of the model parameters.

[0115] Understandably, the PSO algorithm requires recording the historical best position of each particle. During initialization, the historical best position of each particle can be initialized to its initial position. Then, the algorithm iterates through the following steps:

[0116] Step 1: For each particle, calculate the impact of its current velocity and position on the global optimum and its individual historical optimum, and update its velocity accordingly. The velocity update formula is:

[0117] Formula 1: V i,t+1 =wv i,t +c1r1(pbest i -x i,t )+c2r2(gbest-x i,t );

[0118] Among them, V i,t+1 Let represent the velocity of the i-th particle at step t+1, w be the inertial weight, and pbest. i `x` and `gbest` represent the historical best position and the global best position of the i-th particle, respectively. i,t Let represent the position of the i-th particle at step t, where c1 and c2 are two constants, and r1 and r2 are random numbers between 0 and 1.

[0119] Step Two: Using the new velocity calculated in Step One, the position of each particle can be updated. The position update formula is:

[0120] Formula 2: x i,t+1 =x i,t +v i,t+1 ;

[0121] Where, x i,t+1This represents the position of the i-th particle at step t+1.

[0122] Step 3: Using the new positions updated in Step 2, the fitness function value for each particle can be calculated. In this example, the fitness function is RMSE.

[0123] Step 4: For each particle, compare its current position with the fitness function value of its historical best position to determine if the historical best position needs to be updated. If the fitness function value RMSE of the current position is better than that of the historical best position, then update the historical best position to the current position.

[0124] Step 5: Determine if the current iteration count has reached the preset maximum iteration count. If yes, exit the iteration loop; otherwise, return to steps 1 through 4.

[0125] Step 6: Based on the model parameter vector corresponding to the best historical position of each particle, find the optimal model parameters to obtain the target weighing model.

[0126] Of course, the implementation process of particle swarm optimization algorithms based on other evaluation metrics is similar to the steps described above. It can be referred to as the model parameter optimization process using the root square error function as the fitness function, which will not be elaborated here.

[0127] In this embodiment, based on obtaining the optimal nonlinear model, the particle swarm optimization algorithm is used to optimize the model parameters of the optimal nonlinear model, find the model parameter combination that can most accurately fit the data and accurately predict unknown data, and obtain a target weighing model with better fitting effect, so that the target weighing model has better generalization ability on different test data.

[0128] Furthermore, a third embodiment is proposed based on the first embodiment, with reference to... Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the vehicle-mounted weighing model training method of the present invention.

[0129] In this embodiment, the obtained optimal nonlinear model can be incorporated into the vehicle weighing controller to calculate the vehicle load in real time. Therefore, after step S300, the method further includes:

[0130] Step S500: Obtain the current vehicle's roll angle, pitch angle, and multiple vehicle body strain values.

[0131] Step S600: Input the vehicle roll angle, vehicle pitch angle and multiple vehicle strain values ​​into the optimal nonlinear model to obtain the current vehicle load estimation result output by the optimal nonlinear model.

[0132] Specifically, the vehicle weighing controller uses the vehicle's tilt sensor to collect the vehicle's roll angle and pitch angle, and uses the vehicle's strain measurement sensor to collect multiple strain values ​​of the vehicle body. To ensure that the vehicle body strength is not affected, the strain measurement sensor can be mounted on the axle of the vehicle chassis; therefore, the corresponding vehicle body strain value is also the axle strain value.

[0133] Then, the obtained vehicle roll angle, vehicle pitch angle, and multiple axle strain values ​​are simultaneously input into the optimal nonlinear model for calculation, which can obtain the current vehicle load estimation result and complete the real-time calculation of vehicle load.

[0134] In this embodiment, the vehicle roll angle, vehicle pitch angle and vehicle strain value are collected by the weighing controller, and the collected data are input into the optimal nonlinear model to obtain the current vehicle load estimation result, realizing the real-time calculation of vehicle load.

[0135] Furthermore, the optimal nonlinear model can also be applied to a vehicle load measurement device. This device includes a strain gauge sensor, an inclination sensor, a vehicle weighing controller, a central control screen, a server, and an operation and maintenance platform. The optimal nonlinear model runs within the vehicle weighing controller. The vehicle weighing controller can output real-time calculated vehicle load data to the central control screen and the server to achieve human-machine interface and cloud-based services for the weighing system.

[0136] To enable those skilled in the art to better understand the scope of protection of the claims of this application, specific implementation examples in specific application scenarios are used to explain and illustrate the technical solutions described in the claims of this application. It should be understood that the following examples are only used to explain this application and are not intended to limit the scope of protection of the claims of this application.

[0137] Example: In a specific vehicle-mounted weighing model training scenario, the vehicle-mounted weighing system architecture for which the vehicle-mounted weighing model training method is applied is as follows: Figure 5As shown in the diagram, the bottom layer of the architecture is the "system platform layer," which mainly contains the carrier of the weighing system, namely the commercial vehicle's drive-by-wire or non-drive-by-wire chassis; the second layer is the "electronic and electrical layer," which contains two types of sensors, as well as the weighing controller and the vehicle's central control screen. Strain measurement sensors are installed on the chassis axle to detect minute axle deformations, reflecting changes in vehicle weight; tilt sensors are installed on a horizontal surface of the chassis to measure the vehicle's pitch and roll angles; the weighing controller is installed in the glove box of the cab to read, process, and publish sensor data, as well as diagnose system faults; the in-vehicle central control screen is installed in the cab for human-machine interaction; the third layer is the "system software layer," which provides an operating platform for the upper-level functional software; the fourth layer is the "functional software layer," which contains the specific functions implemented by the vehicle weighing system, implemented in the weighing controller, the in-vehicle central control screen, and the scientific analysis platform; the fifth layer is the "human-machine service layer," which contains functions that the driver can perceive, allowing the driver to operate the central control screen in the cab to display weighing results, monitor the weighing system status, zero and tare, trigger overload alarms, display faults, and cache data; the top layer is the "cloud service layer," where system data is uploaded to the cloud by the weighing controller via 5G, enabling data feedback, data storage, and OTA upgrades for the weighing controller system.

[0138] Furthermore, refer to Figure 6 , Figure 6 This is a schematic diagram of the hardware installation locations for this example. The strain measurement sensor 3 is installed on the chassis axle; the tilt sensor 4 is installed on a horizontal surface of the chassis; the weighing controller 1 is installed inside the glove box in the driver's cab; and the vehicle-mounted central control screen 2 is installed inside the driver's cab.

[0139] Furthermore, refer to Figure 7 , Figure 7 This is a schematic diagram of the technical logic for this example. Figure 7 As shown, the vehicle weighing controller with the vehicle weighing model is used to calculate the vehicle load by collecting axle strain data from strain measurement sensors, vehicle roll angle data and vehicle pitch angle data from tilt sensors, and then outputting the weighing results to the vehicle central control screen for human-machine interaction and to the server for storage and maintenance.

[0140] Furthermore, refer to Figure 8 , Figure 8 This is a schematic diagram illustrating the specific implementation process of this example. For example... Figure 8 As shown, the implementation process specifically includes the following steps:

[0141] Step a10: Deploy the system hardware modules on the vehicle side according to the design requirements. See [link to specific installation requirements] for details. Figure 6 .

[0142] Step a20: Connect the multi-channel strain measurement sensor data to the weighing controller. The data can be analog or digital. If analog, add an AD conversion module to the weighing controller for conversion; if digital, transmit via protocols such as CAN, RS232, and RS485. Connect the tilt angle data to the weighing controller and transmit via protocols such as CAN, RS232, and RS485.

[0143] Step a30: Combining the orthogonal experimental design method and the Latin hypercube experimental design method, a three-factor, ten-level design table is created with the vehicle roll angle, vehicle pitch angle and vehicle actual weight as three factors. The experimental plan is designed based on the design table.

[0144] Specifically, each factor is divided into 10 non-overlapping intervals, with each interval having the same probability; a sampling point is randomly selected from each interval of each factor; these points constitute the total of the Latin hypercube, with a total of 10^3 = 1000 points; consult orthogonal array design manuals (such as SPSSAU and other analysis tools) to design an orthogonal experimental table based on the Latin hypercube (the table corresponds to 100 sets of data combinations, each combination containing the specific values ​​of the 3 factors);

[0145] Step a40: Collect sensor data for a period of time under each different counterweight and vehicle posture, and perform noise reduction processing using a filtering algorithm. The filtering algorithm can be any one of mean filtering, median filtering, and wavelet threshold filtering. Normalize the preprocessed data to obtain the preprocessed dataset.

[0146] Specifically, sensor data acquisition and data processing include the following steps:

[0147] Step a41: Starting with group 1, use weights to provide the values ​​corresponding to the "actual vehicle counterweight value" factor in this group of data; use a hydraulic lifting test platform to provide the vehicle attitude corresponding to the "vehicle roll angle" and "vehicle pitch angle" in this group of data.

[0148] Step a42: Under the conditions of step a41, collect data transmitted from n strain measurement sensors over a period of time, and simultaneously collect vehicle roll angle data and vehicle pitch angle data from tilt sensors over a period of time. Use a filtering algorithm to process the data to obtain the average value of the sensor data within the sampling time, and obtain 1 row (n+2) columns of sensor data.

[0149] Step a43: Based on the input orthogonal experimental table, traverse the remaining groups of data and repeat S41 and S42;

[0150] Step a44: Combine all the sensor data obtained in S43 to form a 100×(n+2) order input matrix data;

[0151] Step a45: Normalize the 100×(n+2) order input matrix data to obtain 100×(n+2) order sensor input matrix data with the same dimensions.

[0152] Step a50: Based on the preprocessed dataset obtained in step a40, use commonly used nonlinear models (such as neural networks, support vector machine regression, and decision tree regression) as a set of nonlinear models that map the input space to the output space of the weighing system. Use the K-fold cross-validation training method to train and validate each nonlinear model in the set of nonlinear models.

[0153] Specifically, the training and validation of nonlinear models includes the following steps:

[0154] Step a51: Divide the 100×(n+2) order sensor input matrix data obtained in step a45 and the corresponding 100 vehicle real weight values ​​into k mutually exclusive training subsets of the same size using a random partitioning method, ensuring that each training subset can represent the overall data distribution.

[0155] Step a52: In each iteration, select one of these k training subsets as the validation set, and the other k-1 subsets as the training set;

[0156] Step a53: Perform the following operation for each nonlinear model in the set of nonlinear models;

[0157] The nonlinear model is trained using the training set to obtain the model parameters; the model is validated using the validation set to obtain the load prediction values ​​output by the nonlinear model; each nonlinear model is iterated and trained and validated k times; 100 load prediction values ​​are obtained for each nonlinear model.

[0158] Step a60: Based on the load prediction values ​​obtained in step a53, calculate the root mean square error (RMSE) and coefficient of determination (R²) between the 100 load prediction values ​​of each nonlinear model and the corresponding 100 actual vehicle weight values. 2 The three indicators are: mean absolute error (MAE).

[0159] Step a70: RMSE, R 2 The three indicators, MAE, and MIRV, are weighted at 1:1:1, and the optimal model is selected by voting.

[0160] Specifically, the nonlinear models are ranked from highest to lowest performance based on the performance reflected by each indicator. The first-ranked model gets 1 point, the second-ranked model gets 2 points, and so on. The model with the lowest overall score is the optimal model.

[0161] Step a80: Using the optimal performance model obtained in step a70 as the baseline model, initialize a swarm of particles based on the particle swarm optimization algorithm, and find the optimal solution of the model parameters through iteration to obtain the final weighing model. The optimization process of the model parameters of the particle swarm optimization algorithm can refer to the optimization process in the previous embodiment, and will not be repeated here.

[0162] Step a90: Import the final weighing model and configuration parameters into the weighing controller.

[0163] Step a100: The weighing controller calculates the vehicle load data in real time and outputs it to the vehicle central control screen and server to realize human-machine service and cloud service of the weighing system.

[0164] Furthermore, refer to Figure 9 , Figure 9 This is a comparison chart of the test result errors of the present invention and the test result errors of related technologies.

[0165] The left figure shows the test result error of the present invention, while the right figure shows the test result error of related technologies. The present invention accounts for 89% of the test data with an error within 5%; while the polynomial fitting method of related technologies performs poorly, with some individual test results having errors exceeding 50%. Furthermore, the test data with errors within 5% all have sampling points with nearly horizontal ground slopes. Therefore, it is evident that the present invention has significant advantages over related technologies in terms of the accuracy of load prediction and adaptability to slope environments.

[0166] Furthermore, to achieve the above objectives, the present invention also provides a vehicle-mounted weighing model training device, which may include:

[0167] The data acquisition module is used to acquire multiple sets of experimental data; each set of experimental data includes the vehicle roll angle, vehicle pitch angle and multiple vehicle body strain values ​​collected for the same vehicle's actual counterweight value.

[0168] The model training module is used to train multiple nonlinear models that are different from each other based on multiple sets of experimental data, and obtain the load estimation results of each nonlinear model.

[0169] The model optimization module is used to evaluate each nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle counterweight value, and to determine the optimal nonlinear model.

[0170] It should be noted that the functions and corresponding technical effects of each module in the vehicle-mounted weighing model training device provided in this embodiment can be referred to the description of the specific implementation methods in the various embodiments of the vehicle-mounted weighing model training method of this invention. For the sake of brevity, they will not be repeated here.

[0171] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing a vehicle-mounted weighing model training program. When executed by a processor, the vehicle-mounted weighing model training program implements the steps of the vehicle-mounted weighing model training method described above. Therefore, it will not be repeated here. Additionally, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in the present invention, please refer to the description of the method embodiments of the present invention. As an example, program instructions can be deployed to execute on a single computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0172] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising a vehicle-mounted weighing model training" does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0173] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0174] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0175] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A training method for a vehicle-mounted weighing model, characterized in that, The vehicle-mounted weighing model training method includes the following steps: Multiple sets of experimental data are acquired; each set of experimental data includes the vehicle roll angle, vehicle pitch angle, and multiple vehicle body strain values ​​collected for the same vehicle's actual weight value; wherein, the actual weight value of the vehicle is different for different sets of experimental data. Based on the aforementioned sets of experimental data, multiple nonlinear models that are different from each other are trained to obtain the load estimation results of each nonlinear model. Based on the load estimation results of each nonlinear model and the corresponding actual vehicle weight value, each nonlinear model is evaluated to determine the optimal nonlinear model. The steps for obtaining multiple sets of experimental data include: The vehicle's permissible load range is evenly divided into a second preset number of load intervals, the vehicle's roll angle range is evenly divided into a second preset number of roll angle intervals, and the vehicle's pitch angle range is evenly divided into a second preset number of pitch angle intervals. A load sampling value is determined from each of the aforementioned load ranges; a roll angle sampling value is determined from each vehicle roll angle range; and a pitch angle sampling value is determined from each vehicle pitch angle range. An orthogonal experimental table is constructed based on all the load sampling values, all the roll angle sampling values, all the pitch angle sampling values, and the Latin hypercube method, so as to conduct calibration experiments according to the orthogonal experimental table and obtain the multiple sets of experimental data. The step of evaluating each nonlinear model and determining the optimal nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle weight value includes: For each of the aforementioned nonlinear models, determine the root mean square error, coefficient of determination, and mean absolute error between the load estimation result and all the corresponding actual vehicle weight values; Based on the root mean square error, coefficient of determination, and mean absolute error, each nonlinear model is evaluated, and the optimal nonlinear model is determined. The optimal nonlinear model is optimized by finding the model parameters to obtain the target weighing model.

2. The vehicle-mounted weighing model training method as described in claim 1, characterized in that, The step of training multiple nonlinear models based on the multiple sets of experimental data to obtain the load estimation results of each nonlinear model includes: The multiple sets of experimental data are divided into a predetermined number of non-overlapping training subsets of the same size; Select one of the training subsets from the predetermined number of training subsets as the validation set, and use the remaining training subsets as the training set; Based on the training set, the multiple nonlinear models that are different from each other are trained to obtain multiple trained nonlinear models. The multiple trained nonlinear models are validated based on the validation set to obtain the load prediction values ​​output by each nonlinear model. Select a training subset that was not used for validation from the training set as a new validation set, and update the training set based on the remaining training subsets; Return to the step of training the multiple different nonlinear models based on the training set to obtain multiple trained nonlinear models, until a preset number of iterations are performed. For each nonlinear model, the load prediction value output by the nonlinear model is used as the load estimation result.

3. The vehicle-mounted weighing model training method as described in claim 1, characterized in that, The vehicle body strain value is obtained by strain measurement sensors installed on the vehicle axle.

4. The vehicle-mounted weighing model training method as described in claim 1, characterized in that, After the step of evaluating each nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle weight value, and determining the optimal nonlinear model, the method further includes: Obtain the current vehicle's roll angle, pitch angle, and multiple vehicle body strain values; The vehicle roll angle, the vehicle pitch angle, and the multiple vehicle body strain values ​​are input into the optimal nonlinear model to obtain the load estimation result of the current vehicle output by the optimal nonlinear model.

5. A vehicle-mounted weighing model training device, characterized in that, The device includes: The data acquisition module is used to acquire multiple sets of experimental data; each set of experimental data includes the vehicle roll angle, vehicle pitch angle and multiple vehicle body strain values ​​collected for the same vehicle's actual counterweight value. The model training module is used to train multiple nonlinear models that are different from each other based on the multiple sets of experimental data, and to obtain the load estimation results of each nonlinear model. The model optimization module is used to evaluate each nonlinear model based on the load estimation results of each nonlinear model and the corresponding actual vehicle weight value, and to determine the optimal nonlinear model. The acquisition of multiple sets of experimental data includes: The vehicle's permissible load range is evenly divided into a second preset number of load intervals, the vehicle's roll angle range is evenly divided into a second preset number of roll angle intervals, and the vehicle's pitch angle range is evenly divided into a second preset number of pitch angle intervals. A load sampling value is determined from each of the aforementioned load ranges; a roll angle sampling value is determined from each vehicle roll angle range; and a pitch angle sampling value is determined from each vehicle pitch angle range. An orthogonal experimental table is constructed based on all the load sampling values, all the roll angle sampling values, all the pitch angle sampling values, and the Latin hypercube method, so as to conduct calibration experiments according to the orthogonal experimental table and obtain the multiple sets of experimental data. The model optimization module is also used to determine, for each of the nonlinear models, the root mean square error, the coefficient of determination, and the mean absolute error between the load estimation result and all the corresponding actual vehicle weight values. Based on the root mean square error, coefficient of determination, and mean absolute error, each nonlinear model is evaluated, and the optimal nonlinear model is determined. The optimal nonlinear model is optimized by finding the model parameters to obtain the target weighing model.

6. A vehicle-mounted weighing model training device, characterized in that, The device includes: a memory, a processor, and an on-board weighing model training program stored in the memory and executable on the processor, the on-board weighing model training program being configured to implement the steps of the on-board weighing model training method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a vehicle-mounted weighing model training program, which, when executed by a processor, implements the steps of the vehicle-mounted weighing model training method as described in any one of claims 1 to 4.