7. If the equation about $x$
$$
x^{3}+a x^{2}+b x-4=0\left(a 、 b \in \mathbf{N}_{+}\right)
$$

has a positive integer solution, then $|a-b|=$
7.1.

Solution 1 Let $m$ be a positive integer solution of the equation.
If $m \geqslant 2$, then $a m^{2}+b m=4-m^{3}<0$, which contradicts that $a$ and $b$ are both positive integers.
Therefore, only $m=1$. Substituting it in, we get $a+b=3$.
Since $a, b \in \mathbf{N}_{+}$, $\{a, b\}=\{1,2\}$.
Thus, $|a-b|=1$.
Solution 2 It is easy to see that the positive integer solution of the equation must be a divisor of 4. The divisors of 4 are $1,2,4$. Substituting them into the original equation, we get
$$
\begin{array}{l}
a+b-3=0, \\
4 a+2 b+4=0, \\
16 a+4 b+60=0 .
\end{array}
$$

It is easy to see that the last two equations have no positive integer solutions.
Therefore, $a+b=3$.
The rest is the same as Solution 1.