Artificial Intelligence Technique and Wireless Sensor Networks in Energy Management System for Secure Power Optimization