  Prescriptions for electron injection into the diffusive shock acceleration
process are required in many practical considerations of cosmic-ray
astrophysics, particularly in modeling of the synchrotron emission of
astrophysical sources. In particle-in-cell simulations of quasi-parallel
magnetized collisionless shocks, we analyse the evolution of particle spectra.
We find that in the later stages of shock evolution, the initially strong
suprathermal part in the ion spectra fades, thus leaving the spectra composed
of a Maxwellian and a power law. Once the electron and ion spectra flatten and
become parallel, we find that the amounts of cosmic ray ions and electrons
become similar. We make the step towards relating the micro and macro-scale
physics by applying this injection rule to Blasi's semi-analytical model of
non-linear diffusive shock acceleration, in order to obtain the particle
spectra and electron-to-proton ratio $K_{\mathrm{ep}}$ at high energies. By
using shock jump conditions that include the electron heating, we find
$K_{\mathrm{ep}}$ as a function of Mach number. For Mach number $\sim$ 100, our
model finely reproduces the typically observed ratio for Galactic cosmic-rays
$K_{\mathrm{ep}} \sim$ 1:100 in the test particle regime.
