With the high-speed development of network technology, time-sensitive networks (TSNs) are experiencing a phase of significant traffic growth. At the same time, they have to ensure that highly critical time-sensitive information can be transmitted in a timely and accurate manner. In the future, TSNs will have to further improve network throughput to meet the increasing traffic demand based on the guaranteed transmission delay. Therefore, an efficient route scheduling scheme is necessary to achieve network load balance and improve network throughput. A time-sensitive software-defined network (TSSDN) can address the highly distributed industrial Internet network infrastructure, which cannot be accomplished by traditional industrial communication technologies, and it can achieve distributed intelligent dynamic route scheduling of the network through global network monitoring. The prerequisite for intelligent dynamic scheduling is that the queue length of future switches can be accurately predicted so that dynamic route planning for flow can be performed based on the prediction results. To address the queue length prediction problem, we propose a TSN switch queue length prediction model based on the TSSDN architecture. The prediction process has three steps: network topology dimension reduction, feature selection, and training prediction. The principal component analysis (PCA) algorithm is used to reduce the dimensionality of the network topology to eliminate unnecessary redundancy and overlap of relevant information. Feature selection requires comprehensive consideration of the influencing factors that affect the switch queue length, such as time and network topology. The training prediction is performed with the help of our enhanced long short-term memory (LSTM) network. The input-output structure of the network is changed based on the extracted features to improve the prediction accuracy, thus predicting the network congestion caused by bursty traffic. Finally, the results of the simulation demonstrate that our proposed TSN switch queue length prediction model based on the improved LSTM network algorithm doubles the prediction accuracy compared to the original model because it considers more influencing factors as features in the neural network for training and learning.