Thailand’s monarchs will visit China after receiving an invitation from the president to celebrate a major diplomatic anniversary.