Origin almost certainly Japanese. There are references to the cookies in Japanese literature and history, including an 1878 image of a man making them in a bakery. China and Japan do not have a tradition of dessert following a meal.
REFERENCE: AAJA Handbook to Covering Asian America