China stocks ended slightly higher on Thursday after swinging between modest gains and losses in thin trading volumes ahead of the Lunar New Year holidays.