Example 3.12 (2006 China National Team Training Problem) For $x, y, z$ not all positive, satisfying
$$k\left(x^{2}-x+1\right)\left(y^{2}-y+1\right)\left(z^{2}-z+1\right) \geqslant(x y z)^{2}-x y z+1$$

Find the minimum value of the real number $k$.