Fine-grained End-to-End RAG Optimization and Reconstructed Technical Framework for Generative Engines