The present invention relates to the technical field of
knowledge graph completion tasks, and particularly relates to a
knowledge graph link prediction method. The method comprises: using a
precoding model to obtain an embedding layer vector, and constructing a corresponding masked triple; adding a corresponding position code to each element in the masked triple, so as to obtain a corresponding input sequence, inputting the input sequence into a trained main masking model, and outputting an entity classification probability; and on the basis of the entity classification probability, predicting
potential candidate entities. The method further comprises: concatenating
semantic information corresponding to the embedding layer vector and structural information obtained by an embedding model, so as to obtain fused head entity and relation representations, and constructing a corresponding fused masked triple; and adding a corresponding position code to each element in the fused masked triple, so as to obtain a corresponding fused input sequence. The present invention uses a
precoding method, thereby effectively reducing the training burden on a model, and improving the
inference speed of a model; and a fusion module is used before inputs are fed into a main masked model, thereby ensuring the integrity of textual description information and improving prediction accuracy.