Memory device and data-processing method based on multi-layer rram crossbar array