  The low-energy spectra of gamma-ray bursts' (GRBs) prompt emission are
closely related to the energy distribution of electrons, which is further
regulated by their cooling processes. We develop a numerical code to calculate
the evolution of the electron distribution with given initial parameters, in
which three cooling processes (i.e., adiabatic, synchrotron and inverse Compton
cooling) and the effect of decaying magnetic field are coherently considered. A
sequence of results are presented by exploring the plausible parameter space
for both the fireball and the Poynting-flux-dominated regime. Different cooling
patterns for the electrons can be identified and they are featured by a
specific dominant cooling mechanism. Our results show that the hardening of the
low-energy spectra can be attributed to the dominance of synchrotron
self-Compton cooling within the internal shock model, or to decaying
synchrotron cooling within the Poynting-flux-dominated jet scenario. These two
mechanisms can be distinguished by observing the hard low-energy spectra of
isolated short pulses in some GRBs. The dominance of adiabatic cooling can also
lead to hard low-energy spectra when the ejecta is moving at an extreme
relativistic speed. The information from the time-resolved low-energy spectra
can help to probe the physical characteristics of the GRB ejecta via our
numerical results.
