Here, we propose a protocol for coal spontaneous combustion temperature prediction based on a Sparrow Search Algorithm (SSA)-optimized convolutional neural networks (CNN)-long short-term memory (LSTM)-Attention framework. This protocol addresses the limitations of fixed network architectures, restricted generalization, and poor transferability commonly encountered in conventional methods. The framework extracts spatial features using CNN and captures temporal dependencies with LSTM networks, while the attention mechanism highlights critical temperature phases and salient features. The SSA jointly optimizes network depth and hyperparameters, enabling dynamic adaptation to varying data complexities across different mining sites and experimental conditions. The protocol consists of data acquisition, feature preprocessing, model construction, parameter optimization, and validation steps. Experimental results demonstrate that the proposed model achieves significantly higher predictive accuracy on homogeneous datasets and maintains robust generalization performance across heterogeneous datasets, making it well-suited for real-time coal mine temperature monitoring and early-warning systems.