China's Zhang Yining, the reigning Olympic champion, has qualified for the Beijing Games despite losing her number one table tennis ranking for the first time in five years.