Gunpowder - Tseng Kung-Liang made the formula publicly available in AD 1040.
Black powder = guns = ownage.
Morse
the portable video recorder
The invention of gunpower :)
The invention of the Firearm
If by "solution for trench warfare", you mean a way to end trench warfare, then the invention and widescale use of tanks, bombers and the Blitzkrieg in WWII solved trench warfare.
The compass. The ancient Chinese invented the compass and revolutionized maritime (ocean / water) navigation.
Gunpowder
It revolutionized the world. Planes linked up the whole world and allowed warfare technology to be developed. Great question by the way.
The saddle
telegraph
Morse
The cotton gin.
Some technological innovations during China's golden age include the invention of gunpowder, which revolutionized warfare; the development of papermaking techniques, which improved communication and education; and the invention of the compass, which transformed navigation.
the invention of the cotton gin
The CAREVEL
the cotton gin
the portable video recorder