4. Divide the positive integers $1,2, \cdots, 10$ into two groups, $A$ and $B$, where group $A$: $a_{1}, a_{2}, \cdots, a_{m}$; group $B$: $b_{1}, b_{2}, \cdots$, $b_{n}$. Now, take one number from each of the groups $A$ and $B$, and multiply the two numbers taken. Then the maximum value of the sum of all different products of two numbers is
4.756 .

From the condition, the sum of all different products of two numbers is $S=\left(a_{1}+\cdots+a_{m}\right)\left(b_{1}+\cdots+b_{n}\right)$.
$$
\begin{array}{l}
\text { Let } x=a_{1}+\cdots+a_{m}, y=b_{1}+\cdots+b_{n} . \text { Then } \\
x+y=1+2+\cdots+10=55, \\
S=x y=\frac{1}{4}\left[(x+y)^{2}-(x-y)^{2}\right] \\
\leqslant \frac{1}{4}\left(55^{2}-1^{2}\right)=756 .
\end{array}
$$

The equality holds if and only if $|x-y|=1$.
$$
\text { Let } a_{i}=i(i=1,2, \cdots, 7), b_{1}=8, b_{2}=9 \text {, }
$$
$b_{3}=10$. Then $x=28, y=27$. Therefore, the equality can be achieved. Hence, the maximum value of the sum of all different products of two numbers is 756 .