Summarizing Qin family's current family chart for anyone who is confused:
Qin family has 3 branches based on the 3 sons from the second generation: Qin Shu (first branch), Qin Liang (second branch), and Qin An (third branch).
***First generation:
Grandfather Qin was the former Marquis of Zhongyong and he has already passed away.
Grandfather Qin had a legitimate wife (who also passed away already) who birthed 2 sons; Qin Shu and Qin Liang.
The current Madam Qin who is in control of the household in the Qin family ancestral home is the second wife of Grandfather Qin. She birthed Qin An.
***Second generation:
1) First son: Qin Shu. Current Marquis of Zhongyong and regarded highly by the Crown Prince. His legitimate wife is Hu Shi. Qin Yan and Qin Zhaoyu are his legitimate children.
2) Second son: Qin Liang (the one who died saving Shen Wan in the beginning). He is not close to the family and left to live in the Medicine King Valley years ago. Known to be care-free and gentlemanly, he emphasized a lot on etiquettes according to Qin Shu. His wife also passed away years ago and his daughter is Qin Wan (passed away a year ago at the start of the story).
3) Third son: Qin An (the man playing with the crickets in episode 1). Qin An's legitimate wife is Qin Lin (she is weak-willed and is seen hanging around Madam Qin a lot) and they birthed 2 children: Qin Chen and Qin Xiang. Qin An also has concubines and has children with them. His current favorite is concubine Liu. He used to have a concubine named Yang.
***Third generation:
1st Young Master: Qin Chen (ambitious and very different from his dad or so he thought). His legitimate wife is Xinlan and she ends up giving birth to a girl. Legitimate son of Qin An. Died saving his lover, Caihe.
2nd Young Master: Qin Li (the one who has syphilis). Son of Qin An and one of his concubines. Took over the 3rd branch later on to keep it going.
3rd Young Master: Qin Yan. Eldest son of Qin Shu/current Marquis of Zhongyong. Works closely with the Crown Prince.
5th Lady: Qin Xiang (Madam Qin's favorite granddaughter). Mrs. Huo wanted her to marry Huo Ning instead of Qin Wan. Legitimate daughter of Qin An. Later became a concubine of Prince Cheng and killed by Feng Chenbi, Prince Cheng's Princess Consort.
6th Lady: Qin Shuang (the one who got canned for talking shit about the Grand Princess and who Qin Wan saved from the well). Daughter of Qin An and one of his concubines. Later married Xue Qingshan (a good and loyal man), who was supposed to marry Qin Xiang at first.
8th Young Lady: Qin Zhaoyu. Oldest daughter of Qin Shu/current Marquis of Zhongyong. Candidate for the Crown Princess. Later married the Crown Prince but became a widow with his death.
9th Lady: Qin Wan/Shen Wan (our girl). Had an engagement with Huo Ning. Later adopted by the Yue family per Yan Chi's suggestion for support (however, she is still associated with the Qin family due to the name Qin Wan and "blood relations"). Later granted the title 'Princess Yongci" due to her accomplishments. Later taught her forensic skills to students, married Yan Chi (who became a Regent for a few years to aid the newly crowned Emperor Sui), and made changes to the criminal code.
4th and 7th of this third generation are unknown. Likely to have passed away in their childhood.
Link to Imperial Family Tree: https://kisskh.at/discussions/752181-chao-xue-lu/143266-imperial-family-tree-will-update-based-on-episode-released