The invention discloses a method for predicting the link quality of a wireless sensor network, which includes the following steps: S1, using a Kalman filter algorithm to reduce the noise of the link quality parameters, using the maximum and minimum method to standardize the link quality parameters, and using The fuzzy C-means clustering algorithm divides the link quality level; S2, uses the XGBoost algorithm to train the link quality prediction model, and predicts the link quality level at the next moment through the prediction model. Considering the dynamic change of wireless sensor network link quality, the present invention provides an XGBoost-based wireless sensor network link quality prediction method, which can effectively predict the link quality at the next moment, and can improve network throughput, thereby improving The data forwarding efficiency of the network is improved, and it provides a basis for the upper layer routing protocol to select the communication link. In addition, this method has the advantages of prolonging the life of the network and saving node energy.