Spike is an important and widely accepted biomarker used in the diagnosis of epilepsy based on scalp electroencephalogram (sEEG). Due to the similarity of its waveform with non-epileptic brain activity and artifacts, it is essential to develop an automated spike detection method based on waveform characteristics to assist physicians. Therefore, this paper proposes a novel algorithm for automatic spike detection that uses an adaptive template matching method as a pre-processor to optimise the selection of candidate spikes for efficient segmentation of sEEG signals. The process aims to eliminate the impact of data overlap caused by sliding window segmentation. The 1D convolutional neural network with a simple structure achieves excellent performance. Besides, it requires fewer trainable parameters and imposes a smaller demand on computational resources. The proposed method is evaluated on sEEG data recorded at Zhejiang University Children's Hospital. Moreover, the experimental results demonstrate that our model achieves average accuracy, sensitivity, specificity, F1 score, and AUC of 98.7\%, 97.39\%, 100\%, 98.67\%, and 99.3\%, respectively.