Plus India is uniting a bunch of Indo Europeans and Dravidians into one identity which has somewhat failed due to southern india aka the dravidian part resenting the north aka the Indo European parts.Not really "molding," or at least not in the sense that one might use the word to describe Indian attempts to build a cohesive identity.
Most of the "molding" happened ~3000 years ago during the expansion of the Zhou dynasty's feudal system, which brought a large region under the same cultural umbrella. Confucius came along ~500 years later and introduced the basis of a 'formal' system based on that cultural umbrella, which would be built on and go on to become official state philosophy another ~500 years later, which is around the time it really became a formal system that would carry on officially for ~2000 years until quite recently. Notably, it was formalized as the method of selection of government officials about ~500 years in during the Sui dynasty and solidified by the succeeding Tang. Confucianism is no longer official government policy or doctrine in any way, but the impact on Chinese culture is quite profound, considering that it's had two thousand years to marinate.
So it's not really "molding several ethnic groups into one identity," because by any real measurement those "several ethnic groups" are really a single group, have spoken the same language (mutually intelligible since at least the Zhou dynasty), written the same language (mutually legible since at least the Zhou, exactly the same since standardization by Qin ~2200 years ago) and shared the same cultural values (since at least early Zhou ~3000 years ago, greatly strengthened during Han ~200 years ago and by succeeding dynasties).
Of course, there have been small tribes throughout history in the past ~3000 years that assimilate, but that's not "molding."
China on the other had has been and always was a union of Sino Tibetan People after all both Yan and Huang were Sino tibetan tribes with Yi and Ancient Qiangs (Who would become Tibetans) joining later.
