A 4.7-magnitude earthquake hit northern China on Monday morning, shaking buildings in the capital Beijing, the US Geological Survey (USGS) said.