The accurate oil prediction of wells is essential for making informed decisions regarding the extension of the well lifespan and the enhancement of oil recovery rates. However, the prediction of oil well production is highly challenging due to the complex, nonlinear, and non-stationary data influenced by reservoir geological characteristics and operational adjustments. To address this, a novel prediction method for oil well production is proposed in this study. Firstly, the data-cleaning approach designed in this study is utilized to eliminate outliers from the raw dataset and impute missing values. Subsequently, relevant features are identified through analysis to form a usable dataset. The proposed deep learning neural network, namely the self-attention mechanism integrated with long short-term memory, is trained and learned on this dataset. Finally, the predictive performance of the model is validated using a set of actual oil production data. Through data experiments, the proposed model effectively predicts oil well production with superior accuracy compared to baseline models, achieving an R-squared of 0.872. This method provides reliable decision support for optimizing oil field development and management.