The increasing penetration of distributed energy resources in next-generation distribution networks has resulted in an explosion of the Internet of Things to upgrade their control and monitoring systems. This poses new challenges for the efficient energy management and reliable decision-making of these systems. This is due to the potentially large amount of data that cannot be handled by the traditional architecture of control and data acquisition systems, which have limited storage and computation capabilities. In order to adapt to the new energy management requirements of next-generation distribution networks, a state-of-the-art energy management method called cloud-fog hierarchical architecture is proposed in this work. Based on this architecture, we established a utility and revenue model for various stakeholders, including normal customers, prosumers, and distribution system operators. Furthermore, by embedding an artificial intelligence module in the proposed architecture, energy management could be implemented automatically. Neural networks were used at fog computing layers to achieve regression prediction of energy usage behavior and power source output. Moreover, based on the maximizing utility objective function, the amount of energy consumption of customers and prosumers in the distribution network was optimized with a genetic algorithm at cloud layer. The proposed methods were tested with a set of normal customers and prosumers in a general distribution network, and the results, including the captured usage patterns of the customers and revenues of various stakeholders, verify the effectiveness of the proposed method. This work provides an effective reference for the development of real-time energy management systems for the next-generation distribution network.