Current machine reading comprehension methods focus on modeling local or global interactions between texts. This method, which does not pay attention to both local and global structures, easily leads to problems such as insufficient machine understanding of semantics and inaccurate answering of questions. Aiming at the problem that when the traditional LSTM is used as the encoder at the encoding layer, there is a problem that the current input and the hidden state are independent of each other, resulting in the loss of context information. This paper introduces a variant of the LSTM network to enhance the information perception and interaction between text contexts and obtain richer information. Semantic representation. At the same time, considering that the attention mechanism cannot effectively extract the local structure of the text, which hinders the model from understanding the deep semantics of the text, a combination of dynamic convolutional attention and multiple attention mechanisms is used in the attention layer to capture text from different scales. Structure. Experimental verification is carried out on the DuReader2.0 data set, and the results are analyzed, which proves that the proposed model can effectively improve the ability of the machine to answer questions.