DALIAN, China -- China's No. 2 e-commerce company, JD.com, plans to open 1,000 restaurants fully staffed by robots by 2020, taking on front-runner Alibaba's partially-automated eateries.

The first restaurant, to open in August, is expected to occupy about 400 sq. meters, though its location is yet to be announced. Robots will prepare and serve food to diners who order and pay by smartphone at unmanned eateries. The menus will feature about 40 dishes from all over China.

JD.com will directly run some of the stores while also partnering with other businesses to open franchised locations to accelerate the expansion process.

Larger rival Alibaba Group Holding is also delving into restaurants with automated cash registers as part of its brick-and-mortar growth strategy, but humans still fulfill some of the duties at those sites, such as cooking and washing dishes. JD.com aims to draw on technology from other efforts, such as its 20 automated supermarkets and drone-based deliveries, in chasing the leader.

Robots and automated services are likely to become widespread in China. Rising labor costs and rent are squeezing the country's restaurants and retail shops. The lingering effects of the government's one-child policy, which ended in 2015 after more than three decades, are expected to exacerbate the labor shortage down the road.