Hanlin, a bachelor in Tang dynasty, was a six-grade official. In the Song Dynasty, the official product of Hanlin bachelor was upgraded to three products; During the Ming dynasty, the official products of Hanlin bachelor were further upgraded to positive second products. Hanlin, a bachelor, is the minister of literary attendants around the emperor and is responsible for writing documents, poems and other literary works for the emperor. He was the emperor's literary adviser and secretary, who undertook important clerical work and had an important influence on the cultural affairs of the imperial court.