  3C 279 showed enhanced flux variations in Fermi-LAT {\gamma}-ray observations
from January to June 2018. We present a detailed Fermi-LAT analysis to
investigate the variability and spectral behaviors of 3C 279 during the
{\gamma}-ray flares in 2018. In this work, we analyzed the {\gamma}-ray spectra
and found that the spectra in either the flaring or quiescent states do not
show any clear breaks (or cutoffs). This indicates that the dissipation region
is outside the broad-line region, and the energy dissipation may be due to the
inverse Compton process of scattering the dust torus infrared photons, this
result is also consistent with that in Tolamatti et al. An external inverse
Compton scattering of dusty torus (DT) photons is employed to calculate the
broadband spectral energy distribution (SED). This model was further supported
by the fact that we found flare decay timescale was consistent with the cooling
time of relativistic electrons through DT photons. During the SED modeling, a
relatively harder spectrum for the electron energy distribution (EED) is found
and suggests these electrons may not be accelerated by the shock that happened
in the dissipation region. Besides, the magnetic reconnection is also ruled out
due to a low magnetization ratio. Thus, we suggest an injection of
higher-energy electrons from outside the blob and raising the flare.
