Realization of long retention properties of quantum conductance through confining the oxygen vacancy diffusion