In the text matching task, we are faced with the problems of how to better obtain the contextual semantic information of the text and the difficulty of extracting word meaning features, which often lead to unsatisfactory matching results. Based on this, this paper proposes a text matching model based on the combination of ERNIE network and composite graph attention network. First, the pre-trained network ERNIE based on knowledge graph is used as the embedding layer to obtain a more accurate word vector representation. Secondly, a composite graph attention network is designed. First, a two-layer graph attention network is used to model the text to obtain more comprehensive context information and overall relationships. Then, DPCNN is used to extract and integrate model features. The deep pyramid structure makes The network can effectively learn semantic feature representations of different granularities, enhance the receptive field and local continuity, and extract features better. Finally, the hidden output of ERNIE is fused with the extracted feature information, that is, the important information of the text itself is preserved and relatively complete interaction information is obtained. The experimental results show that on the two text matching task datasets of LCQMC and BQ, the improvement effect is significant, and the two indicators of accuracy and F1 value have achieved a good improvement effect.