Threat Analysis and Data-driven Cyber Defence Strategies in Smart Grids