This paper proposes Middo, a novel framework for supervised learning fine-tuning (SFT) of large-scale language models (LLMs). To overcome the limitations of existing static dataset-based approaches, Middo builds a dynamic data optimization system that evolves based on model performance. Using loss patterns, embedding cluster dynamics, and self-alignment scores, Middo identifies inefficient samples and transforms them into educationally valuable ones. This process continuously improves the dataset as the model's capabilities improve, achieving an average accuracy improvement of 7.15% across multiple benchmark experiments. This presents a new paradigm for sustainable LLM learning through the dynamic co-evolution of data and models.