Japan’s legacy automakers are jumping on the big-tech bandwagon as they race to revive waning interest among Chinese consumers.

In recent weeks, Toyota said it would partner with Chinese technology giant Tencent Holdings on areas including artificial intelligence, cloud computing, big data and social media connection. Meanwhile, Nissan will collaborate with Baidu on AI, including smart cockpits.

The tie-ups highlight the pressure facing foreign carmakers to win back ground they’ve lost to Chinese companies, which are able to quickly roll out tech-centric offerings that meet the needs of increasingly selective local consumers. For Japanese manufacturers, that’s meant cutting back production and staffing or, in the case of Mitsubishi Motors, pulling out of China altogether.