Please don't do any research on fictional history.
The male protagonist comes from a good background, but unfortunately has bad luck. In the end, he relies on his own efforts and his father's connections to become an official, and he has to meet noble people and rise through the ranks.
The heroine is of low status but has a quick mind and is unwilling to accept the fate.
The two came together under the changing circumstances of the outside world and supported each other.