In this paper, an intelligent multiple Quality of Service (QoS) constrained traffic path allocation scheme with corresponding algorithm is proposed. The proposed method modifies deep Q-learning network (DQN) by graph neural network (GNN) and prioritized experience replay to fit the heterogeneous network, which is applied for production management and edge intelligent applications of smart factory. Moreover, through designing the reward function, the learning efficiency of the agent is improved under the sparse reward condition, and the multi-object optimization is realized. The simulation results show that the proposed method has high learning efficiency, and strong generalization ability adapting the changing of topological structure of network caused by network error, which is more suitable than the compared methods. In addition, it is also verified that combining the field knowledge and deep reinforcement learning (DRL) can improve the performance of the agent. The proposed method can achieve good performance in the network slicing scenario as well.