  Quantum metrology aims to use quantum resources to improve the precision of
measurement. Quantum criticality has been presented as a novel and efficient
resource. Generally, protocols of criticality-based quantum metrology often
work without decoherence. In this paper, we address the issue whether the
divergent feature of the inverted variance is indeed realizable in the presence
of noise when approaching the QPT. Taking the quantum Rabi model (QRM) as an
example, we obtain the analytical result for the inverted variance. We show
that the inverted variance may be convergent in time due to the noise. When
approaching the critical point, the maximum inverted variance demonstrates a
power-law increase with the exponent -1.2, of which the absolute value is
smaller than that for the noise-free case, i.e., 2. We also observe a power-law
dependence of the maximum inverted variance on the relaxation rate and the
temperature. Since the precision of the metrology is very sensitive to the
noise, as a remedy, we propose performing the squeezing operation on the
initial state to improve the precision under decoherence. In addition, we also
investigate the criticality-based metrology under the influence of the
two-photon relaxation. Contrary to the single-photon relaxation, the quantum
dynamics of the inverted variance shows a completely-different behavior. It
does not oscillate with the same frequency with respect to the re-scaled time
for different dimensionless coupling strengths. Strikingly, although the
maximum inverted variance still manifests a power-law dependence on the energy
gap, the exponent is positive and depends on the dimensionless coupling
strength. This observation implies that the criticality may not enhance but
weaken the precision in the presence of two-photon relaxation. It can be well
described by the non-linearity introduced by the two-photon relaxation.
