Xi Jinping's recent trip to the UK  was the first by a Chinese President for 10 years, and one of the most complex visits hosted by the British government for many years. Organising a tour that touched down in three locations and involved multiple organisations, ministers and officials was always going to be a challenge. Add the pageantry that comes with an official state visit and you have a level of complexity that would make a NASA scientist feel queasy.

The media focused on the ceremonial bits of the visit and the headline grabbing economic announcements.

The figures were certainly impressive: deals worth more than £42billion, resulting in nearly 30,000 UK jobs, and including Chinese investment in the UK's next generation nuclear power. There was even a £2 billion order for electric buses to be built in Scotland. And the Chinese announced the first RMB Sovereign Bond outside China.

As you would expect, there was some criticism. Some commentators accused the UK of pursuing Chinese investment, while neglecting issues like human rights.

There was also debate over whether Chinese dumping of steel on the global market led to job losses in the UK.

Certainly, the visit well and truly debunked the myth that foreign policy is a remote academic exercise with no relevance to the general public. It matters, and so does getting it right.

There are some who think the UK has got it wrong. Certainly the visit brought into stark contrast how the world has changed. President Xi looked confident, as you might expect from the man in charge of the world's second largest economy. Some critics equated Xi's confidence with arrogance. I see it differently.

For me, the visit demonstrated the power of diplomacy. Countries like the UK face a challenge. Our future prosperity relies on building economic links with fast growing countries. China is a priority for us, as it is for many other countries, including Australia. At the same time, as a permanent member of the UN Security Council, a member of the G7, the G20, the EU and the Commonwealth, the UK is expected to lead on the global stage, and champion the system of international rules that ensures countries are held to account and there is a level global playing field.

These two pursuits don't always sit neatly beside each other.

This is where diplomats come in. It is up to us to ensure the policy makers understand the complexities of individual countries, and how the UK can navigate these while maintaining our core beliefs and values. It is a balancing act and one that requires sustained effort and some critical judgements along the way. And for it to work, it also needs to be a whole of government approach. Gone are the days when foreign policy was the sole preserve of foreign ministries. One example of this change is no less than eight government departments are members of our National Security Council.

So have we got it right? Well, I don't believe any country's relationship with China is a zero sum game. The world is too complicated to see things as starkly as that; just look at developments in the South China Sea last week. For the UK to play a global role and secure its prosperity, it needs to maintain strong relationships with traditional partners and develop its links with emerging powers. What I do know is that behind all the media coverage and references to 'frank conversations' and 'sensitive issues', there was real substance to the discussions between our prime minister, cabinet ministers and their Chinese counterparts.

So our approach is to develop a strong relationship that allows us to talk about things like cyber espionage, democracy in Hong Kong, island building in the South China Sea, and human rights. President Xi acknowledged that during his press conference in London. And, importantly, to do more than just register our concerns but agree ways to address some of these issues. Because of the visit, there are now UK-China partnerships which aim to eradicate extreme poverty, better coordinate on UN peacekeeping operations, help implement climate change commitments, and address the issue of anti microbial resistance. 

As our Foreign Secretary said on the eve of the visit 'we are deepening the relationship in our national interest and with our eyes open'.

Photo courtesy of 10 Downing Street