Dynamics and extraction of quantum discord in a multipartite open system