The Space-ground integrated network consists of deep space network, space network and ground network. The ground network is vulnerable to network attacks due to its complex networking structure, high randomness of device access, limited node processing capacity and computing resources. This paper focuses on traffic anomaly detection from the perspective of Space-ground integrated network security. We mine the characteristics of traffic data and use the GPT method to detect abnormal traffic. We suggest incorporating GPT-style loss as a semi-supervised auxiliary term to aid in training. This paper solves the problem that 1) Traditional RNN and LSTM methods have insufficient context detection performance and cannot be parallelized. 2) Improve the traffic classification performance with limited labeled data. The network simulation software CORE is used to simulate the Space-ground network structure. We inject DOS attacks into the nodes of the ground network and conduct binary classification experiments on abnormal traffic. Experiments demonstrate the proposed method greatly reduces the requirements of labeled data in network anomaly detection. On simulation dataset, given only 5% training labels, our approach achieves a significant 98.92% accuracy and 98.74% F1-score.