China will act to defend its companies' interests if Australia forcibly buys back control of the strategic northern port of Darwin, Beijing's ambassador has warned.