The BEST explanation for how Shi Huangdi tried to defend his empire from attacks by nomads is:
He built a stone wall over 2,600 miles long.
Shi Huangdi, the first emperor of China, is known for initiating the construction of the Great Wall to protect against invasions from nomadic tribes from the north.