Text this: Design and optimization of distributed energy management system based on edge computing and machine learning