The quantum bit error rate (QBER) based on the weak coherent pulse's quantum key distribution is analyzed. It is
indicate that the coefficient of QBER is not a constant but is increased exponentially with the transmission distance.
Based on the three groups' experimental data, the function fitting for the coefficient of QBER has been done respectively.
We discovered that these fitting functions have the same function form. Subsequently we use fitting function to optimize
the mean photon number for the BB84 quantum key distribution with decoy states. The result shown that the optimized
mean photon number depend on the transmission distance. Using these results and the GYS's experimental parameters
we compared the key generation rates proposed by Lo et al with the modified one. We find that the latter is superior to
the former within a certain distance.