Tian Yan is intelligent by nature, likes reading since childhood, can recite after reading, has little ambition and is broad-minded. In the year of famine, there was a drought in Jingning, and the hungry people floated on the ground. Tian Yan said to his father, "There are thousands of stones in my valley, and all of them are surplus in the warehouse. Why not give relief to the hungry? " My father was surprised that he was so open-minded when he was in primary school, so he opened a warehouse to get food to help hungry people. Tian Yan, 15 years old, from Buzhou, is not satisfied with her knowledge and study. So she went to Xiyansi Mountain in the suburbs to study the Buddhist classic Tripitaka and studied hard for many years. After reading four books intensively, my knowledge is improving day by day. In the third year of Shunzhi (1646), Tian Yan took the provincial examination at the age of 23, and was a scholar in the twelfth year of Shunzhi (1655). The following year, the official department sent it to the magistrate of Qiantang County, Zhejiang Province. Since then, he has experienced a long career as an official. As he said, "Confucian scholars' learning is more important than promising, eliminating great harm and prospering Italy, and scholars are the most concerned." When he embarked on his official career, he began to show his ambition to help the world. As a magistrate of Qiantang County, it's just like fighting along the coast and preparing to recover Taiwan Province Province. The burden on the people is too heavy, the supply is numerous, and the official clothes kill the people, which is miserable. Tian Yan took office and spared no effort to eliminate the accumulated disadvantages and reduce the burden on the people. When the army was stationed in Zhejiang Province, it was ready to occupy the houses. Tian Yan insisted that the camp should be built on the river bank and the houses should not be occupied. After the emperor's imperial edict: "How can soldiers enter the city when they defend the people?" Everyone trusts his knowledge. In Zhejiang province, bandits have been hiding in the mountains since the late Ming Dynasty, grabbing children's tickets and extorting ransom, which has been going on for many years. Zhang Ba, a giant thief in Qiantang, is rich, and local officials can't control him. Tian Yan managed to capture and kill dozens of his main criminals and released them through education, which made the border between the four countries peaceful. Tian Yan served as the magistrate of Qiantang County for seven years, and promoted the advantages and eliminated the disadvantages, and the people's customs changed greatly.