Abstract:In the field of precision breeding of cattle, weight is a key indicator for measuring their health and production performance. Traditional weighing methods are not only inefficient but also costly, while existing dynamic weighing algorithms are limited by insufficient robustness and stability. In response to this issue, the hidden information and behavioral information of cattle dynamic weighing signals were quantitatively analyzed, and existing dynamic weighing algorithms were improved by proposing a cattle dynamic weighing algorithm based on classification of time-frequency domain motion state and compensation for error prediction. Firstly, preliminary weight prediction values were obtained through modal decomposition algorithm, and the reference error with static weighing parameters was calculated. Secondly, weights of the window function were optimized to establish an adaptive window function, obtain reliable signal time-frequency domain feature parameters, and explore their relationship with motion labels and corresponding reference errors in the state. Finally, a motion state classification model and two types of error compensation models were established, and the slime mold algorithm (SMA) was used to perform hyperparameter optimization on the latter. Based on this, a complete dynamic weighing model for cattle was established. The experimental results indicated that the dynamic weighing prediction model for cattle performed well. The accuracy of the motion classification model was 98.4%. In low and high activity states, the root mean square error (RMSE) of the final weight prediction values were 4.03kg and 8.96kg, respectively, and the mean percentage error (MAPE) were 0.53% and 0.87%, respectively. This algorithm had good robustness and generalization ability, which can provide reference for intelligent weight monitoring in practical breeding scenarios, and it had certain significance for promoting the development of precision breeding.