With the development of science and technology, the prediction of earthquake disasters in China has made some progress. For some complex environments, target recognition gradually depends on machine learning algorithms. In order to accurately detect oil and gas fields, this paper intends to analyze and study the lithology of sand bodies before and after the earthquake. This paper intends to use machine learning algorithm to study the prediction method of sand body lithology, in order to improve the accuracy of identification and prediction. In this paper, experimental design and algorithm comparison are mainly used to analyze the scientific and technological use of sand body lithology prediction methods. The experimental results show that the ELLA algorithm proposed in this paper performs well in the classification and prediction of sand body lithology, and the error is less than 15%. Therefore, lithology prediction of sand body based on attribute characteristics can be calculated by ELLA algorithm.