• An novel link prediction framework based on entity-relation-level GAT. • Locally topological structures with relational features are hierarchically embedded. • The attention mechanism is used for the potential semantic information. Limited by the sufficiency and timeliness of information obtained, the connections among entities of knowledge graphs need to be updated continuously. Therefore, how to infer the possibility of linking between two unlinked entities with known information has important significance in real applications. Most existing works implemented the triple-level graph learning, which focused on the learning of graph features among triples but ignore triple-inside information. In this article, an entity-relation-level graph attention network model is proposed to fully learn the information of entities and relationships in the graph. Firstly, for each entity, the information of entities in their surrounding neighborhoods is learnt, and then the obtained information with relations of entities is integrated into the graph attention network for embeddings. Secondly, a novel entity and relation embedding method is implemented to map each element of the triple into the vector space for achieving deep interactions between entities and relations. Thirdly, ConvKB is used as decoder to complete the task of link prediction. Extensive experiments on real datasets show the promising results of the proposed method.