This paper suggests a sentiment analysis model based on knowledge enhancement to address the issues of inadequate mining of semantic information and incomplete extraction of deep-level features when traditional algorithms perform sentiment analysis on text. To obtain the word embedding representation of the text in this study, static word vectors GloVe and ELMo are used, followed by CNN and Self- attention, to obtain the contextual relationship features of the text. Afterwards, an attention mechanism is used to interact with the text and obtain the text’s deep semantic information. The experimental findings demonstrate that the model in this work is more accurate than other models, with a 51.6% accuracy on the SST dataset.