Many firms face significant price fluctuations and unpredictable demand for raw materials,making it increasingly important to study optimal procurement strategies under these uncertainties. Previous studies have focused on optimization problems with single parameter uncertainty and assumed the parameter to fluctuate randomly,which is not representative of the real world. Prices and demand in reality are often uncertain simultaneously and cannot be randomly observed. This paper uses online theory to investigate the procurement of raw materials under uncertain price and demand,presents a corresponding mathematical model,and analyzes a dynamic and effective competitive strategy,which is proved to have a better competitive ratio performance. Numerical analysis further demonstrates the strategy has superior empirical performance.