I have made a detailed video on this historical background topic on Youtube. It's easier to understand. Here's the link https://www.youtube.com/watch?v=slIZRitO1Q8
This drama's background is set in Northern Song Dynasty. The capital is Kai Feng ( also called 'Dong Jing' or 'Bian Jing' in history. It's in He Nan Province nowadays, not Beijing. It is one of the Eight Ancient Capitals of China, having been the capital eight times in history, and is best known for having been the Chinese capital during the Northern Song dynasty. Kaifeng has a history of more than 4,100 years of building a city and a capital.
For more information on Wikipedia click here: https://en.wikipedia.org/wiki/Kaifeng
The drama is partly adapted from a ‘Yuan Qu’ (元曲) - which is a collection of drama and poetry in Yuan Dynasty, like opera. The name of ‘Yuan Qu’ is called " Zhao Pan'er Feng Yue Qiao Ji Qiu Feng Chen’ (means Zhao Pan’er rescues her prostitute sister by smart schemes) written by a famous playwright in Yuan Dynasty called Guan Han Qing (关汉卿) (about 1234-1300). He is the head of the ‘Four Masters of Yuan Qu’.
For more information on Wikipedia click here: https://en.wikipedia.org/wiki/Guan_Hanqing
The Chinese name of this drama is called 'Dong Jing Meng Hua Lu' or 'Meng Hua Lu'. It borrows the name of a memoir written by Meng Yuanlao (孟元老) (c. 1090-1150). Meng's book is a detailed and nostalgic description of the old capital's urban life, seasonal products, and festivals, as well as foods, customs, and traditions.
More information on Wikipedia link here: https://en.wikipedia.org/wiki/Dongjing_Meng_Hua_Lu
Did you notice the end of some of the episodes when the follower of the male lead introduces the lifestyle of Dong Jing according to an ancient painting? This famous ancient painting is called ‘Along the River During the Qingming Festival’ (清明上河图). It is one of the top ten famous paintings in China, painted by the Northern Song Dynasty painter Zhang Ze Duan (about 1085–1145).
More information on Wikipedia link here: https://en.wikipedia.org/wiki/Along_the_River_During_the_Qingming_Festival