By using the algebraic structure in the operator dual space in the master equation for the driven dissipative harmonic oscillator,we have rewritten the master equation as a Schroedinger-like equation.Then we have used three gauge transformations and obtained an exact solution to the master equation in the particle number representation.