Link prediction is critical to completing the missing links in a network or to predicting the generation of new links according to current network structure information, which is vital for analyzing the evolution of a network, such as the logical architecture construction of MEC (mobile edge computing) routing links of a 5G/6G access network. Link prediction can provide throughput guidance for MEC and select appropriate c nodes through the MEC routing links of 5G/6G access networks. Traditional link prediction algorithms are always based on node similarity, which needs predefined similarity functions, is highly hypothetical and can only be applied to specific network structures without generality. To solve this problem, this paper proposes a new efficient link prediction algorithm PLAS (predicting links by analysis subgraph) and its GNN (graph neural network) version PLGAT (predicting links by graph attention networks) based on the target node pair subgraph. In order to automatically learn the graph structure characteristics, the algorithm first extracts the h-hop subgraph of the target node pair, and then predicts whether the target node pair will be linked according to the subgraph. Experiments on eleven real datasets show that our proposed link prediction algorithm is suitable for various network structures and is superior to other link prediction algorithms, especially in some 5G MEC Access networks datasets with higher AUC (area under curve) values.