Understanding Ion Transport Mechanism in Ionic Devices from a Molecular Level