In the development of ethernet passive optical networks (EPONs), quality of service (QoS) support and fairness per optical network unit (ONU) are crucial issues. However, making an elaborate analysis of the existing prediction-based bandwidth allocation algorithm, light load penalty, low prediction precision are pointed out. We present an improved dynamic bandwidth pre-allocation algorithm (R-DBA), which employs recurrent neural network (RNN) to predict the high-priority service traffic in EPON. And we introduce mixed integer linear programming (MILP) for optimally building DBA algorithm. This algorithm achieves the prediction of the high-priority service traffic by RNN during the waiting time and supports bandwidth pre-allocation, thus ensuring the fairness of the bandwidth allocation.