The urgent need of people for a better life in the new era has prompted people to get closer to nature, and tourism is a beautiful form. In response to the sudden increase in the number of tourists, a large number of scenic spots have experienced incidents of exceeding the reception capacity. In order to avoid the number of tourists exceeding the reception capacity of the scenic spot and prevent public safety incidents in time, it is particularly urgent and important to carry out early warning of traveler flow in time and promote the sustainable development of the scenic spot. Therefore, this paper takes the traveler flow prediction of tourist scenic spots as the research object, and proposes a scenic spot traveler flow prediction model based on network attention, aiming to improve the accuracy of tourist flow prediction of tourist attractions. Firstly, the data of user search behavior in Baidu search engine were crawled, and then the indicative prediction index of scenic spot visitor flow was extracted from the user search behavior data, secondly, a neural network prediction model based on long short-term memory network model (LSTM) was constructed, and finally, an empirical study was carried out by taking SiGuNiang Mountain Scenic Area as an example. Experimental results show that the network attention extracted in this paper improves the accuracy of the prediction model, the coefficient of determination R-2 is 0.935, and the fitting accuracy of the prediction model is increased by 11.66%. This study is helpful for the person in charge of scenic spots or tourists to effectively avoid the peak of crowd flow, and then improve the perception of tourist flow by government agencies, tourism and hotel industry.