Markovian representation of the continuity equation