Beijing is planning regulations that may force tech firms to give up secrets in exchange for doing business in China.