Xijing International Corps space battleship pilot Wang Lei was killed on the planet Pandora, and his brain was secretly used by the military for the Quantum Travel Operation - a top-secret project that uses the residual memories of the deceased's brains to investigate terrorist attacks. His consciousness was repeatedly implanted into the body of Zhang Jie, a victim of the commuter train bombing, searching for the bomber in each 5-minute cycle to prevent subsequent terrorist attacks.
Logic is fine, so is imagination.