With the rapid development of the Internet globally since the 21st century, the amount of data information has increased exponentially. Data helps improve people's livelihood and working conditions, as well as learning efficiency. Therefore, data extraction, analysis, and processing have become a hot issue for people from all walks of life. Traditional recommendation algorithm still has some problems, such as inaccuracy, less diversity, and low performance. To solve these problems and improve the accuracy and variety of the recommendation algorithms, the research combines the convolutional neural networks (CNN) and the attention model to design a recommendation algorithm based on the neural network framework. Through the text convolutional network, the input layer in CNN has transformed into two channels: static ones and non-static ones. Meanwhile, the self-attention system focuses on the system so that data can be better processed and the accuracy of feature extraction becomes higher. The recommendation algorithm combines CNN and attention system and divides the embedding layer into user information feature embedding and data name feature extraction embedding. It obtains data name features through a convolution kernel. Finally, the top pooling layer obtains the length vector. The attention system layer obtains the characteristics of the data type. Experimental results show that the proposed recommendation algorithm that combines CNN and the attention system can perform better in data extraction than the traditional CNN algorithm and other recommendation algorithms that are popular at the present stage. The proposed algorithm shows excellent accuracy and robustness.