Due to the low resolution of spectroscopic instrument, the characteristics of elements with similar peak position overlap when detecting heavy metals in soil. Spectral overlapping peaks seriously affect the accuracy of quantitative analysis results. In order to obtain accurate heavy metal content, spectral overlapping peaks need to be decomposed. The African vulture algorithm was used to optimize the overlapping peaks of convolutional neural networks (AVOA-CNN). Firstly, 150 double Gaussian overlapping peaks and 43 triple Gaussian overlapping peaks with noise were simulated by Gaussian function model. Different wavelet basis functions were selected for spectral data denoising. With signal-to-noise ratio and root mean square error (RMSE) as evaluation indexes, coif 3 wavelet basis function was finally determined, and derivative method was used to pretreat spectral overlapping peaks. Then, AVOA-CNN was used to obtain the convolutional neural network (CNN) prediction results. The analytic results show that AVOA-CNN can decompose the overlapping peaks successfully and with high accuracy, and that the parameters of the double and triple Gaussian overlapping peaks (peak intensity, peak location, Peak width) are 3. 15% and 5. 90%, respectively. Finally, by comparing the sparrow search algorithm to optimize CNN, CNN and AVOA-CNN, the results show that the AVOA-CNN model has the highest prediction accuracy. [ABSTRACT FROM AUTHOR]