Seafloor topography is of considerable value in commercial, engineering, military and scientific research. Currently, gravity field data, such as free air gravity anomalies and vertical gravity gradients, are commonly used to inverse seafloor topography. However, due to the strong multi-resolution of the existing methods to inverse seafloor topography, it is still impossible to obtain accurate high-precision seafloor topography. A new data-knowledge-driven method was proposed to reconstruct accurate seafloor topography, which combines the gravity-density method with random forests. This method was applied to the South China Sea and compared with the gravity-density, random forest, and existing SIO models. The inversion results show that the data-knowledge-driven method provides better inversion performance, followed by the random forest and gravity-density methods, and the SIO model is the worst. The mean absolute error, mean relative error and root mean square error of the data-knowledge-driven are reduced by 21%, 25% and 7%, respectively, compared to those of the gravity-density method, while they are also reduced by 20%, 20% and 20%, respectively, compared to those of the random forest. In addition, the data-knowledge-driven model has a high degree of agreement with the shipboard bathymetry data, with approximately 72% of its differences distributed within ±10 m, which is higher than that of the other three models. The results demonstrate the feasibility and effectiveness of the data-knowledge-driven approach in seafloor topography inversion, which helps to accelerate the mapping of high-precision seafloor topography.