The cavity is a fundamental ingredient of quantum optical systems. This paper concerns the behavior of a quantum cavity driven by non-classical field in single-photon state. To this end, the number operator has been opted to reveal the number of photons inside the cavity. Then, the quantum filtering equations have been employed to derive a stochastic master equation for the cavity which is driven by single-photon and is observed by either Homodyne or photon-counting detector. Finally, the state of the cavity has been estimated by the derived equations, and the results have been compared with the conventional master equation.