The embodiment of the invention provides a method and a device for training a graph neural network model used for characterizing a knowledge graph, and the method comprises the steps: obtaining a triad from the knowledge graph, and the triad comprises a first node, a second node, and a first connection edge pointing to the second node from the first node; then, in an edge embedding layer, determining a corresponding first edge vector according to the relationship type corresponding to the first connecting edge and the edge attribute characteristics; in the node embedding layer, the first nodeand the second node serving as target nodes respectively, conducting multi-level vector embedding according to the node attribute characteristics of the target nodes and a neighbor node set of the target nodes, and therefore a first high-order vector and a second high-order vector corresponding to the first node and the second node are obtained respectively; then, according to the first high-ordervector, the second high-order vector and the first edge vector, determining the probability that the first node is connected to the second node through the first connecting edge, and updating the edge embedding layer and the node embedding layer with the maximization probability as the target;