With the rapid growth and widespread popularity of the Internet, people's access to information is diversified and convenient. The existing text representation methods have some problems, such as insufficient semantic information extraction, high dimension of representation model, and high complexity of model construction. In this paper, a semantic matching algorithm of intelligent question answering system based on BERT is proposed, and the semantic similarity of a concept at the next level pointed by the attribute is found under certain attribute matching rules. Finally, the concept similarity method is recursively called to calculate the similarity of each concept, so that the similarity of all concepts at all levels is weighted and integrated to obtain the semantic similarity between ontologies. The simulation results show that after the system is deployed, the ideal effect can be obtained by comparing the accuracy and response time of text selection. This shows that the improved method proposed in this paper can effectively improve the performance of BERT model, and then effectively reduce the model parameters and accelerate the pre-training speed under the same performance.