Understanding the switching mechanism of the volatile resistive switching random access memory (RRAM) device is important to harness its characteristics and further enhance its performance. Accurate modeling of its dynamic behavior is also of deep value for its applications both as selector and as short-term memory synapse for future neuromorphic applications operating in temporal domain. In this work, we investigate the switching and retention (relaxation) processes of the Ag-based metallic filamentary volatile resistive switching devices. We find that the switching process can be modeled by the ionic drift under electric field, while the retention process can be modeled by the ionic diffusion along the filament surface driven by the gradi...