With the development of advanced information and communication technologies, the electric power grid has been moving forward into an energy internet for improving operational efficiency and reliability. However, energy internet also introduces many internet based entry points, which bring in additional vulnerabilities from malicious cyber-attacks, threatening the economic health of the nations. Therefore, this paper proposes a new defense mechanism based on interval state predictor to effectively detect the malicious attacks. In this mechanism, the variation bounds of each state variable are formulated as a bilevel dual optimization problem. Any resultant state that falls outside the estimated bounds can be recognized as an anomaly, indicating a high possibility of data manipulating. In addition, a typical deep learning algorithm, termed as deep belief network (DBN), is applied for electric load forecasting. DBN has a strong capability for nonlinear feature extraction, which will greatly improve the forecasting accuracy and thus narrow down the variation bounds of state variables, increasing the detection accuracy of the proposed defense mechanism. Finally, the feasibility and effectiveness of the proposed defense mechanism have been validated on IEEE 14- and 118-bus systems.