What role can China play to ensure regional security?

How can China ensure that the territorial sovereignty of other neighboring Asian countries will be secure? Why is China helping Pakistan, if it is looking at collaboration with India to have synergy in the trading world? Except for weapons, in terms of network technology-related soft power and domestic network security, what suggestions does China have?