Cooking up a good life
But he missed rural life.
"I've always preferred village life to city life," Ding says.
"I felt a bit depressed staring at the computer all day long, for 12 hours at a time, and having no social life."
He eventually followed his heart and returned home in 2015, when he found Dejiang county was trying to evolve itself into a national e-commerce county.
At that time, Dejiang county was struggling with poverty. Many of its villages were shut off from the outside world. Ding found that local villagers were desperately trying to sell farm produce.
"The farm produce is of good quality," Ding says.
He then decided to start up a business to help locals sell their agricultural produce online.
However, in the beginning, traditional e-commerce didn't work very well.
Ding sold honey, kiwis and oranges online. As their production is seasonal, Ding and his team only managed an annual income of around 100,000 yuan ($14,426).
Transportation also posed a big problem.
The mountainous terrain meant it took four to five days for fruit to reach customers, which made things impossible during summer, as they would not remain fresh.