By integrating communications in different domains, integrated radio and optical networks can serve a wider range of applications and services. Integrated radio and optical network scenarios will involve more weak-computation-ability network nodes, such as small-cell base stations. To pursue efficient integrated radio and optical networks, more efficient ways to conduct transmission under the demand of edge and cloud collaboration are required. The lack of forward-looking resource allocation may easily lead to a waste of network resources without an expected return. Therefore, an efficient resource allocation scheme needs to consider certain issues: 1) a comprehensive perspective of traffic prediction; 2) a release of pressure on the transmission pipeline during the prediction process; and 3) a reduction of loss of edge nodes due to the computation. In this paper, benefiting from machine learning, we propose a resource allocation with edgecloud collaborative traffic prediction (TP-ECC) in integrated radio and optical networks, where an efficient resource allocation scheme (ERAS) is designed based on the prediction results with the gated recurrent unit model. We maximize the utilization of limited resources to improve the awareness of network status. We present three evaluation indicators and build a network architecture to evaluate our resource allocation scheme. Through edge-cloud collaboration, our proposal can improve traffic prediction accuracy by 9.5% compared with single-point traffic prediction, and resource utilization is also improved by edge-cloud collaborative traffic prediction.INDEX TERMS Integrated radio and optical networks, resource allocation, edge-cloud collaboration, traffic prediction.