Jannik Sinner booked his place in the Beijing Open final after a hard-fought 6-3, 4-6, 6-2 victory over Australia's Alex de Minaur in a thrilling semi-final.