Few existing literatures used the text information of the public opinions as the input index for volatility forecasting. This paper uses the text comment information of stockholders to construct a text sentiment factor that integrates the influence of comments and then combines other transaction information on volatility forecasting based on high-frequency finance data with the deep learning model long short-term memory (LSTM). The study finds that under the framework of the LSTM model, the forecasting accuracy for the volatility with the sentiment index is better than that of the LSTM model without the sentiment index and 10 traditional econometric models under the six loss functions. When compared with the traditional econometric model for multistep forecasting, the LSTM model is robust. With the addition of the public opinion index, the accuracy of LSTM is improved by 9.3%, 4.7%, 6.2%, 9.2%, 7.9%, and 16.9%, respectively, under the six evaluation criteria. The research in this article provides a more accurate, robust, and sustainable method for volatility forecasting in the context of big data.