A Two-Stage Data Selection Framework for Data-Efficient Model Training on Edge Devices