China obviously has had a massive trade surplus for decades and they've mostly invested it reasonably well, despite a lot of fraud and corruption.
Norway has done the same thing, more efficiently I think, on a much smaller scale.
China has little internal oil supply, like Japan, so that is critical for them now and they'd like to reduce that dependence. Duh.
We've "invested" in more and more debt and the military stuff.