Addressing the issue of seismic signal classification and recognition for natural earthquakes and artificial blasting, a deep learning model suitable for seismic signal classification and recognition is proposed. In this study, a dataset is created by selecting 14,001 natural earthquake waveforms and 12,870 artificial blasting waveforms from the seismic waveform data provided by the China National Earthquake Science Data Sharing Centre for the years 2010-2016. Based on the DenseNet architecture, an attention mechanism is introduced into the original Dense Block, adaptively enhancing valuable feature channels, thereby improving the model's perception and expression capabilities for important information. The model achieves an accuracy of 96.25% on the test set, surpassing the compared methods. Experimental results demonstrate that the attention-enhanced DenseNet exhibits excellent classification effectiveness and generalization ability when applied to seismic signals.