With the rapidly developing artificial intelligence, metaverse, and 5G applications, the traffic in the Data Center Network exploded in the past decade. Optical switches are implemented to forward packets to reduce the impact of such traffic proliferation. However, the lack of optical processing capabilities challenges the controller and scheduler to switch copious traffic. To mitigate the packet loss, multi-task learning LSTM algorithm is deployed to predict the proportion of traffic flows to each server in DCNs. The prediction results achieve the MSE of 6.61E-3. Compared to the traditional LSTM neural network, the proposed scheme reduces the MSE by 20.4%, which can guide the bandwidth scheduling for high utilization in DCNs.