The invention discloses a text matching method and device, computer equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: constructing a question feature word set QU, a text feature word set QC and a term set T; performing vectorization processing to obtain a feature vector QE and a term vector TE; performing linear conversion to obtain a key matrix K, a query matrix Q, a value matrix V and a matrix KT; calculating a non-normalized weight matrix AQT, and then performing self-multiplication and normalization processingto obtain a plurality of sub-matrices; and performing equalization processing on the plurality of sub-matrices, performing normalization processing to obtain an influence matrix, performing matrix multiplication on the key matrix K and the query matrix Q to obtain a self-attention matrix A, performing calculation to obtain output of a self-attention module, and performing matching according to the output. According to the method, the matching between known terms is emphasized, the matching between non-terms is reduced, and the effect of improving the matching accuracy is achieved.