Recent advances of perovskite materials in energy-related and electronic applications