The administrative divisions of the Song Dynasty were as follows: the highest level was the road, under which were prefectures (states), and under prefectures (states) were counties. Places with significant political, economic, and military importance were designated as prefectures, which had a slightly higher status than states. During the Northern Song Dynasty, there were four capitals, each built in a different prefecture: Dongjing was located in Kaifeng Prefecture, serving as the capital; Nanjing was located in Yingtian Prefecture (now Shangqiu City, Henan Province), Xijing was located in Henan Prefecture (now Luoyang City, Henan Province), and Bejing was located in Daming Prefecture (now Daming County, Hebei Province), all serving as auxiliary capitals. According to the Song Dynasty system, each of these four prefectures had a "liushou" (a type of high-ranking military officer) appointed by the emperor when he temporarily left the capital or an auxiliary capital. For example, Taiyuan was an auxiliary capital during the Sui Dynasty, and Li Yuan served as the liushou of Taiyuan, holding significant military power and having the ability to overthrow the Sui Dynasty. As the liushou of Bejing Daming Prefecture, Liang Zhongshu held a strategic position guarding the eastern flank of the capital Dongjing, and his influence was indeed considerable.
Liang Zhongshu's name was actually Shi Jie. "Zhongshu" was not a courtesy name but an official title. If we consider his official title, it would be more appropriate to call him Liang Liushou or Liushou Xianggong, or even Liang Fuyin (a type of high-ranking military officer). However, he was referred to as Zhongshu. The origin of the name "Zhongshu" is complex and has changed over time; it sometimes refers to a government institution or an official position. Even during the Northern Song Dynasty, there were differences between the early and late periods.
After Emperor Shenzong's reform in 1078-1085, the central government institutions followed the Tang Dynasty system, with the Zhongshu Province having a Zhongshu Ling (a type of high-ranking official) as its head, who was a second-grade official; the Zhongshu Shilang (another type of high-ranking official) was the deputy head, also a second-grade official. Liang Zhongshu was actually Shi Jie, and he was referred to as Zhongshu because he held this position.
Liang Zimei, on the other hand, was a different person. He was an official during the Song Dynasty and served as the liushou of Daming Prefecture for four years (1116-1119), which roughly corresponds to the time period in which the story takes place. His personality also shares some similarities with Liang Zhongshu: both were known for their greed and ability to curry favor with those in power.
It is worth noting that the author of the story may have borrowed elements from different sources, including historical figures like Liang Zimei, to create a fictional character like Liang Zhongshu.

