Renewable energy usage is continuing to increase as many countries worldwide are aiming to reach peak carbon emission and achieve carbon neutrality in the near future. One inherent problem with renewable energy is that its generation profile does not often fit well with the electricity usage profile. Therefore, it is of utmost importance that terminal users help to adjust the usage profile. Thermal energy storage (TES) systems have become an important means of adjusting the electricity usage profile of buildings. The operation strategy for TES must be carefully optimized to maximize its economic profile. To this end, we developed a framework for TES operation strategy optimization by integrating deep learning and physics-based modeling. The deep learning model, an attention-based dual-gated recurrent unit (A-dGRU) network, can learn the cooling load change trends from historical data and achieve state-of-the-art performance in hourly cooling load prediction for the next day with a coefficient of variation of the root mean square error of 0.08. For the TES modeling, we took the nonlinear change in the ice-charging rate into consideration based on the heat-transfer model; this change has often been ignored in previous studies. The high prediction accuracy and reliability of the TES model guarantee that the optimal strategy can be achieved by the framework. Compared to the basic TES operation strategy, we confirmed that the optimal operation strategy can further increase the cost savings by 11.2% for the entire ice-cooling season. In summary, the framework proposed in this study performs well in reducing the operation cost of a cooling plant based on the current electricity price tariff. The framework is expected to help the grid fit the electricity generation and usage profile.