The monitoring and replacement of lubricating oil has an important impact on mechanical equipment. In this study, based on the infrared spectroscopy monitoring method, an acid value index prediction model is established. The support vector machine regression method is used to quantitatively analyze the acid number of the oil sample, which verifies the stability and predictive ability of the quantitative prediction model, and we provide a theoretical basis and practical examples for the online monitoring of oil indicators. In addition, a support vector machine regression model is established by observing the changing law of the spectral absorption peak and selecting the dominant wavelength, and it is compared against the prediction algorithm of the long- and short-term memory network. By comparing the deviation relationship between the predicted value and the real chemical value, the feasibility of the infrared spectroscopy prediction model is verified. The experimental results show that the correlation coefficient between the predicted value of the model and the actual measured value reaches 0.98. This proves that the prediction effect of the prediction model based on the infrared spectrum data and the support vector machine regression method is better than that of the long- and short-term memory network trend prediction model, and the predicted results are reliable.