Example 5 Let $a_{1}, a_{2}, \cdots, a_{n}$ be given non-zero real numbers. If the inequality
$$\begin{array}{l}
r_{1}\left(x_{1}-a_{1}\right)+r_{2}\left(x_{2}-a_{2}\right)+\cdots+r_{n}\left(x_{n}-a_{n}\right) \leqslant \\
\sqrt[m]{x_{1}^{m}+x_{2}^{m}+\cdots+x_{n}^{m}}-\sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}
\end{array}$$
(where $m \geqslant 2, m \in \mathbf{N}^{*}$) holds for all real numbers $x_{1}, x_{2}, \cdots, x_{n}$, find the values of $r_{1}, r_{2}, \cdots, r_{n}$. (A generalization of Problem 1 from the 3rd CMO)
Substitute $x_{i}=0(i=1,2, \cdots, n)$ into the original inequality, we get
$$-\left(r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n}\right) \leqslant-\sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}$$

That is,
$$r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n} \geqslant \sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}$$

Substitute $x_{i}=2 a_{i}(i=1,2, \cdots, n)$ into the original inequality, we get
$$r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n} \leqslant \sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}$$

From (2) and (3), we have
$$r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n}=\sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}$$

By Hölder's inequality, we get
$$\begin{array}{l}
r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n}= \\
r_{1}^{\frac{1}{m-1}} r_{1}^{\frac{1}{m-1}} \cdots r_{1}^{\frac{1}{m-1}} a_{1}+r_{2}^{\frac{1}{m-1}} r_{2}^{\frac{1}{m-1}} \cdots r_{2}^{\frac{1}{m-1}} a_{2}+\cdots+r_{n}^{\frac{1}{m-1}} r_{n}^{\frac{1}{m-1}} \cdots r_{n}^{\frac{1}{m-1}} a_{n} \leqslant \\
\left(r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}}\right)^{\frac{m-1}{m}}\left(a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}\right)^{\frac{1}{m}}
\end{array}$$

Therefore,
$$\left(r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}}\right)^{\frac{m-1}{m}} \geqslant 1$$

That is,
$$r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}} \geqslant 1$$

Substitute (4) into the original inequality, we get
$$r_{1} x_{1}+r_{2} x_{2}+\cdots+r_{n} x_{n} \leqslant \sqrt[m]{x_{1}^{m}+x_{2}^{m}+\cdots+x_{n}^{m}}$$

Substitute $x_{i}=r_{i}^{\frac{1}{m-1}}(i=1,2, \cdots, n)$, we get
$$r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}} \leqslant\left(r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}}\right)^{\frac{1}{m}}$$

That is,
$$r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}} \leqslant 1$$

From (6) and (7), we get
$$r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}}=1$$

Substitute (8) into inequality (5), we get that inequality (5) holds with equality if and only if
$$\begin{array}{l}
r_{1}^{\frac{1}{m-1}}: a_{1}=r_{2}^{\frac{1}{m-1}}: a_{2}=\cdots=r_{n}^{\frac{1}{m-1}}: a_{n}= \\
\sqrt[m]{r_{1}^{\frac{m}{m-1}}+r_{2}^{\frac{m}{m-1}}+\cdots+r_{n}^{\frac{m}{m-1}}}: \sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}= \\
1: \sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}
\end{array}$$

That is, when $r_{i}=\left(\frac{a_{i}}{\sqrt[m]{a_{1}^{m}+a_{2}^{m}+\cdots+a_{n}^{m}}}\right)^{m-1}(i=1,2, \cdots, n)$, the equality holds.
Substitute the obtained $r_{i}(i=1,2, \cdots, n)$ into the left side of the original inequality (1), and use the generalized Cauchy inequality, we get
$$\begin{array}{l}
r_{1}\left(x_{1}-a_{1}\right)+r_{2}\left(x_{2}-a_{2}\right)+\cdots+r_{n}\left(x_{n}-a_{n}\right)= \\
\left(r_{1} x_{1}+r_{2} x_{2}+\cdots+r_{n} x_{n}\right)-\left(r_{1} a_{1}+r_{2} a_{2}+\cdots+r_{n} a_{n}\right) \leqslant \\
\left(\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}}\right)^{\frac{m-1}{m}}\left(\sum_{i=1}^{m} x_{i}^{m}\right)^{\frac{1}{m}}-\sum_{i=1}^{m}\left(\frac{a_{i}}{\sqrt[m]{\sum_{i=1}^{n} a_{i}^{m}}}\right)^{m-1} \cdot a_{i}= \\
\left(\sum_{i=1}^{m} x_{i}^{m}\right)^{\frac{1}{m}}-\left(\sum_{i=1}^{m} a_{i}^{m}\right)^{\frac{1}{m}}
\end{array}$$

This means that the obtained $r_{i}(i=1,2, \cdots, n)$ can make inequality (1) hold for any real numbers $x_{1}$, $x_{2}, \cdots, x_{n}$.