Quantum memory process with a four-level atomic ensemble