He served as an envoy to the Liao Kingdom and led troops in battle. At one time he served as the highest financial official in the empire, and was even director of the imperial observatory.
他當過出使遼國的使臣，帶過兵指揮作戰；他還當過國家最高財政官員，及國家天文台台長的職務。