Intelligent Mode-switching Framework for Teleoperation