The southern city put nearly US$31 billion into R&D last year, driven partly by robust spending from tech giants like Huawei.