Ethnic music, as a valuable treasure created in the long-term historical development of the Chinese nation, has the unique cultural elements of the Chinese nation in its musical form, artistic value and ideological concepts, and its integration into the music curriculum of preschool education in colleges and universities can help students to deepen their understanding of the ethnic culture and promote the inheritance of ethnic music culture. For this reason, the study builds an immersive situation in the ethnic music classroom of preschool education in colleges and universities, and explores the effective path of the music generation model in promoting the reform of experiential ethnic music teaching. Based on the elaboration of related music knowledge and MIDI file format, we innovatively constructed a multi-track ethnomusicological music generation model Tr-MTMG based on Transformer, which consists of three parts: data preprocessing network, learning network and generating network, and is capable of generating multi-track music. Through a series of experiments, in the Lakh MIDI dataset, the entropy value of the level histogram of this model is 2.8504, which is closest to the real samples, and it proves that the model based on this paper can generate more harmonized and more realistic music. The music created by this model achieved a high score of 105.65 in the Turing test. After multiple evaluations, it is verified that the model proposed in this paper can generate good quality music, and can be effectively applied to music tasks in pre-school education in universities.