Multiple Object Tracking (MOT) is a classical task in the field of computer vision, which aims to identify and track all objects in a video scene and assign a unique ID number to each object. Tracking-by-Detection (TBD) paradigm has become the mainstream framework for MOT due to its high Tracking accuracy. With the development of UAV technology, MOT research for UAV video has important military and civilian value. However, it faces challenges such as class imbalance, many small targets, and occlusion of targets in the scene, which makes it difficult to correctly match and continuously track the targets. We propose a new algorithm for the MOT problem in the UAV scenario. On the one hand, to solve the class imbalance problem of small targets, a dynamic adjustment parameter adjustment method based on the gradient information of training samples is proposed to improve the generalization ability of traditional loss function in multi-class target tracking. On the other hand, to improve the accuracy of inter-frame matching, this paper introduces a new feature similarity calculation method, which is based on the Wasserstein distance and optimizes the matching process according to the weight allocation mechanism of feature importance. Finally, the effectiveness of the proposed algorithm is verified on the VisDroneMOT2019 dataset. The results show that compared with the existing MOT algorithm, the proposed algorithm has significant improvements in tracking accuracy, trajectory integrity and identity maintenance, achieving 38.8% MOTA and 52.8% IDF1, which are better than the existing state-of-the-art tracking algorithms.