Chinese President Xi Jinping has accepted a Russian invitation to attend the commemorations of the Soviet victory over Nazi Germany in the Second World War, according to Russian state media.