Data-driven Projection Generation for Efficiently Solving Heterogeneous Quadratic Programming Problems