The hallways are filled with the sound of pupils singing and reciting from Chinese texts during a recent visit one weekday morning to Liangxiang No. 4 Elementary School in Beijing.

In music and language classes, it is not just teachers who keep an eye on the children - two classrooms were recently fitted with an artificial intelligence (AI) system that keeps watch on how pupils behave and react to lessons in class.