Kompyang was named after Qi Jiguang, who invented it, taking the idea from Japanese onigiri. When Qi Jiguang led his troops into Fujian in 1562, the Japanese pirates, fearing his name, engaged mainly in guerrilla-style battles. Qi Jiguang noticed that the Japanese pirates could always trace where his troops camped because of the smoke that rose up to the sky when the soldiers prepared their meals. He found out the Japanese pirates had no such problem because they brought onigiri with them. So Qi Jiguang invented a kind of cake with a hole in the center so that they could be strung together to be conveniently carried along. Later, to commemorate Qi Jiguang's victory against the pirate raiders, the cakes were named guang bing.
Kompyang is made with lard, onions, salt and flour. A ball of flour is stuffed with a filling of other desired ingredients and flattened with a rolling pin. It is then slapped onto the sides of a traditional home-made Chinese oven. Meat is usually, but not necessarily, used as a filling in the biscuits. The biscuits take approximately 15 minutes to bake.