With the rapid development of artificial intelligence technology, the use of information processing technology for the study of ancient writing has also attracted more and more attention from the academic community. In this paper, we propose a technology for recognizing and translating ancient texts, aiming to assist in the advancement of ancient text research. Based on the network model SiameseWord and the twin network based on the deep residual network Resnet50, the image pair approach is used as the input of the network, and the feature vectors of each picture in the image pair are extracted by the network to realize the recognition of ancient characters. The mask matrix strategy is introduced into the BERT model, and the internal fusion and dynamic weighting of the multi-attention mechanism are used to construct an improved Masking-BERT model and improve the translation performance of the model. The Shang and Zhou gold text dataset is used as a research object to carry out ancient text recognition and translation practices. This paper’s method maintains a high recognition accuracy of 88.55% even when the number of Shang and Zhou gold text categories reaches 550. This paper’s translation method achieves a translation overlap rate of 25.26%, surpassing that of the comparative CUDA and PSO models, and it also achieves the highest contextual fitness, with a fitness of 60.07%.