DeepSeek's rise came as a timely confidence boost as the Chinese leadership faces a prolonged economic gloom and a brewing trade war with U.S.