1. Find all functions $f: \mathbf{Z}_{+} \rightarrow \mathbf{Z}_{+}$, such that for any $a, b \in \mathbf{Z}_{+}$, we have
$$
(f(a)+b) \mid\left(a^{2}+f(a) f(b)\right) .
$$
1. Clearly, $f(n)=n\left(n \in \mathbf{Z}_{+}\right)$ satisfies the requirement.

Below is the proof that this is the only function that satisfies the requirement.
In the original problem condition,
(1) Taking $a=b=1$, we get
$$
(f(1)+1) \mid\left(f^{2}(1)+1\right) \Rightarrow f(1)=1 \text {. }
$$
(2) Taking $a=1$, we get
$$
\begin{array}{l}
(b+1) \mid(f(b)+1) \\
\Rightarrow b \leqslant f(b)\left(b \in \mathbf{Z}_{+}\right) .
\end{array}
$$
(3) Taking $b=1$, we get
$$
\begin{array}{l}
(f(a)+1) \mid\left(f(a)+a^{2}\right) \\
\Rightarrow(f(a)+1) \mid\left(a^{2}-1\right) \\
\Rightarrow f(a) \leqslant a^{2}-2(a \geqslant 2) .
\end{array}
$$
(4) Taking $a=p, b=f(p)$ (where $p$ is any prime number), we get
$$
2 f(p)\left|\left(p^{2}+f(p) f(f(p))\right) \Rightarrow f(p)\right| p^{2} \text {. }
$$

From the conclusions of (2) and (3), we know
$$
p \leqslant f(p) \leqslant p^{2}-2 \text {. }
$$

Thus, $f(p)=p$ for any prime number $p$.
(5) Taking $a=p$ (where $p$ is any prime number), we get
$$
\begin{array}{l}
(b+p) \mid\left(p^{2}+p f(b)\right) \\
\Rightarrow(b+p) \mid\left(p^{2}+p f(b)-(p+b)(p-b+f(b))\right) \\
\Rightarrow(b+p) \mid\left(b^{2}-b f(b)\right) .
\end{array}
$$

For any fixed value of $b$, $b^{2}-b f(b)$ is a fixed number, and when $p$ is sufficiently large, $b+p$ can be arbitrarily large, thus, we must have
$$
b^{2}-b f(b)=0 \Rightarrow f(b)=b \text {. }
$$

From the conclusion of (5), we know that the only function that satisfies the requirement is
$$
f(n)=n\left(n \in \mathbf{Z}_{+}\right) .
$$