As the type and volume of traffic increase in mega satellite constellations (MSCs), it is still a challenge to use limited resources to improve the traffic completion rate while providing differentiated services for different traffic. Rational allocation of resources depends on the satellite's accurate prediction of non-uniform traffic from the ground. Considering that centralized training methods require high resource occupancy of traffic data transmission and that numerous satellites need to adjust the prediction network frequently when the service area changes, we propose a federated learning-based traffic management strategy (FLTM). We first classify the traffic according to performance requirements such as delay and connectivity, and create network slices to provide differentiated services. Then we train a unified prediction network between multiple service areas in a distributed manner based on federated learning, reducing the frequency of satellites adjusting the prediction network while sharing the traffic information of these areas. To capture spatial and temporal features of traffic, we also propose a prediction framework combining the densely connected convolutional neural network with the Long Short-Term Memory network. Finally, we adopt traffic prediction results to more reasonably allocate resources among slices. Real traffic data verify the accuracy of the proposed prediction framework and simulation results validate that FLTM can provide differentiated services for different traffic and improve the traffic completion rate of MSCs.