Chen Rui remembered the time where she got into an accident.
One of Ye Fanfan's men who was following the real Ye Shuxin was the person who saved her.
Yes, during that time, she had amnesia and because of that amnesia, Ye Fanfan took advantage of that situation. Her daughter was gone so having Chen Rui, who looked like her own daughter was her only comfort. She started filling up her mind with how Ye Shuxin was.
Not long, Cai Sijian found out where Chen Rui was and when he learned what Ye Fanfan was trying to do, at first, he was adamant against it but if not for the dangers that surrounded Chen Rui, he wouldn't have agreed with Ye Fanfan to hypnotize her when her memories as Chen Rui returned.
They showed her photos of all the people she knew that's why they were able to create a fake 'memory' and persona in her.
Since Ye Fanfan has always been sending her men to monitor Ye Shuxin's daily life, she filled Chen Rui's mind with it until she began living as 'Ye Shuxin'.