4. Find all positive integer triples $(x, y, z)$, such that:
$$
x^{3}+y^{3}+z^{3}-3 x y z=2012 \text{. }
$$
Prompt: From the above equation, we have
$$
\begin{array}{l}
(x+y+z)\left[(x-y)^{2}+(y-z)^{2}+(z-x)^{2}\right] \\
=4024 .
\end{array}
$$

Also, $4024=2^{3} \times 503$, and
$$
\begin{array}{l}
(x-y)^{2}+(y-z)^{2}+(z-x)^{2} \equiv 0(\bmod 2), \\
\text { then }\left\{\begin{array}{l}
x+y+z=k, \\
(x-y)^{2}+(y-z)^{2}+(z-x)^{2}=\frac{4024}{k},
\end{array}\right.
\end{array}
$$

where, $k \in\{1,2,4,503,1006,2012\}$.
Assume $x \geqslant y \geqslant z\left(x, y, z \in \mathbf{Z}_{+}\right)$.
Let $x-y=m, y-z=n$.
Then $m \geqslant 0, n \geqslant 0, x-z=m+n$.
Thus, $\left\{\begin{array}{l}m+2 n+3 z=k, \\ m^{2}+n^{2}+m n=\frac{2012}{k}\end{array}\right.$.
Therefore, $k=m+2 n+3 z \geqslant 3$.
If $k=4,1006$, this system of equations has no non-negative integer solutions.
If $k=503$, we get
$$
\begin{array}{l}
\left\{\begin{array}{l}
m+2 n+3 z=503, \\
m^{2}+n^{2}+m n=4
\end{array}\right. \\
\Rightarrow\left\{\begin{array}{l}
m=2, \\
n=0
\end{array} \Rightarrow(x, y, z)=(169,167,167) .\right.
\end{array}
$$

In this case, $(x, y, z)=(169,167,167)$ and its permutations give 3 sets.
If $k=2012$, we get
$$
\begin{array}{l}
\left\{\begin{array}{l}
m+2 n+3 z=2012, \\
m^{2}+n^{2}+m n=1
\end{array}\right. \\
\Rightarrow\left\{\begin{array}{l}
m=0, \\
n=1
\end{array} \Rightarrow(x, y, z)=(671,671,670) .\right.
\end{array}
$$

In this case, $(x, y, z)=(671,671,670)$ and its permutations give 3 sets.