buaazp: 1.improve gen_key 2.update set format logic