China plans to restrict US investment in tech firms for security reasons, heightening the ongoing technology rivalry.