The invention discloses a method for solving the formula proportion of each component oil in a blended oil product based on
near infrared spectroscopy, which comprises the following steps: collecting the component oil participating in blending, firstly carrying out spectrum scanning on the pure component oil through a near
infrared spectrum analyzer, and respectively obtaining near
infrared spectrum data X1, X2... Xn of each component oil; the method comprises the following steps: performing spectrum scanning on blend oil with different formula proportions through a near
infrared spectrum analyzer, collecting corresponding near infrared spectrum data Y1, Y2... Yp, pre-
processing the near infrared spectrum of the mixed oil product by setting a solving target and constraint conditions, and quickly solving the formula proportion of the mixed oil product by utilizing an lsplin optimization
algorithm. The method can be used for the online monitoring process of oil products, is good in robustness, and can still accurately predict the formula ratio of each oil product even in the mixing process of various oil products.