AbstractLong-distance oil pipelines consume extensive energy during the operation. Accurate prediction of pipeline’s energy consumption is the basis of intelligent management and energy-saving plan. This work demonstrates an effective data-driven model to predict a pipeline’s energy consumption. The model first extracts features through correlation analyses and then uses a hybrid support vector machine for prediction. In the hybrid model, the fruit fly optimizer, simulated annealing algorithm, and cross factor are fused to form an improved fruit fly optimizer used to optimize the traditional support vector machine. The proposed model is tested on a pipeline in China, and the results indicate that the model has a high prediction accuracy (prediction accuracy is measured by one minus mean absolute percentage error, and the accuracy exceeds 80%). Compared with the three benchmark models, the accuracy of the proposed model is increased by 4.18%–25.47%. This paper discusses the influence of the kernel function on the prediction. The results show that the support vector machines with radial basis kernel function and polynomial kernel function perform well in Dataset I, while support vector machines with radial basis kernel function, polynomial kernel function, and linear kernel function perform almost the same in Dataset II. Moreover, this paper also discusses the input of the model on a deeper level. More experiments show that removing highly repetitive input can ensure higher prediction accuracy in engineering and reduce the complexity of the model.