 He was one of a few Chinese captured in the Battle of Talas, along with artisans Fan Shu and Liu Ci and fabric weavers Le Wei and Lu Li, as mentioned in his writings.After a long journey through Arab countries, he returned by ship to Guangzhou in 762.There he wrote his "Jingxingji", a work which has been almost completely lost.