Aiming at the characteristics of the UAV ad hoc network (UAANET), such as topological temporal-varying, node mobility and intermittent connection, a temporal graph embedding model was proposed to present the preprocessed UAANET. To improve the sampling efficiency, the sampling interval was calculated based on linear probability. The network structure features were mapped to the relationship between nodes, and the contextual semantic features of nodes were extracted by adversarial training. With the help of long and short-term memory network, the temporal characteristics of the UAANET were extracted to predict the connection at the next moment. AUC, MAP, and Error Rate were employed as evaluation indexes. The simulation experiments based on NS-3 show that compared with Node2vec, DDNE and E-LSTM-D, the proposed method has a better accuracy. [ABSTRACT FROM AUTHOR]