The proliferation of grassland rodents has aggravated the degradation process of desert grassland. Additionally, it carries many viruses that threaten human and animal health. Accurate spatial distribution in grassland between rodent populations, vegetation, and bare soil is essential for developing rodent control measures. However, the traditional survey method of grassland rodent pest information is time-consuming and costly, and the period is long. In addition, satellite remote sensing cannot meet the accuracy requirements for the identification of grassland rat holes due to the limitation of spatial resolution. To realize intelligent grassland rodent infestation monitoring, this paper adopts an unmanned aerial vehicle hyperspectral remote sensing platform for data acquisition. Meanwhile, a transformer attention network (TAN) is proposed for grassland rodent infestation information extraction. The network adopts a two-stage feature extraction structure that effectively improves the classification performance of the model. In each stage, first, local features are extracted by a fixed convolution kernel to enhance detailed texture features; second, the extracted local features are refined using the contour convolution module to enrich feature information at the edges of the feature map; finally, the transformer attention module is used to focus on the global pixels, thus suppressing background information and enhancing effective information output. The results show that the overall accuracy (OA), average accuracy, and kappa coefficient of the TAN network can reach 97.71%, 98.44%, and 0.9538, respectively. Compared with several networks, such as two-dimensional CNN, three-dimensional CNN, HybridSN, and CTN, the OA values of the TAN network were improved by 2.59%, 2.45%, 2.94%, and 1.03%, respectively. The results of this study effectively improve the efficiency of the grassland rodent information survey and provide a solid theoretical basis for the investigation and statistics of grassland rodent infestation.