To summarize, Lev had to replicate his consciousness in the Hive Mind with Dmitri's help. This would, in turn, enable them to simulate which consciousness would match with Lev. As mentioned before, a consciousness that is almost identical to another consciousness could switch. This was what happened to Lev and the Original Lev, except that the Lev from the past was the only one who switched and the Original Lev still existed in his mind.
After the simulations, Lev had to upload his consciousness inside the Hive Mind. This was what the Qwriohls wanted so when Lev uploaded his consciousness (after saying goodbye to Dmitri) the Qwriohls couldn't be bothered by it. Do note that consciousness replication is different from consciousness upload. Consciousness replication is copying one's consciousness into the hive, while consciousness upload is transferring your consciousness directly from your mind into the hive.