Example 2 Given positive numbers $a_{1}, a_{2}, \cdots, a_{n}$ and $m>1$. Find real numbers $r_{1}, r_{2}, \cdots, r_{n}$, such that for any non-negative real numbers $x_{1}$, $x_{2}, \cdots, x_{n}$, we have
$$
\sum_{i=1}^{n} r_{i}\left(x_{i}-a_{i}\right) \leqslant\left(\sum_{i=1}^{n} x_{i}^{m}\right)^{\frac{1}{m}}-\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}} .
$$
When $m=2$, it is a problem from the 1988 CMO. This problem is a generalization of that question. In inequality (7), first take $x_{i}=0$, then take $x_{i}=2 a_{i}(i=1,2, \cdots, n)$, respectively, to get
$$
\begin{array}{l}
\sum_{i=1}^{n} r_{i} a_{i} \geqslant\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}}, \\
\sum_{i=1}^{n} r_{i} a_{i} \leqslant\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}} . \\
\text { Thus, } \sum_{i=1}^{n} r_{i} a_{i}=\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}} .
\end{array}
$$

In inequality (7), take $00 .
$$

Similarly, $r_{i}>0(i=2,3, \cdots, n)$.
Therefore, by Hölder's inequality (1), we get
$$
\begin{array}{l}
\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}}=\sum_{i=1}^{n} r_{i} a_{i} \\
\leqslant\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{\frac{1}{m}}\left(\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}}\right)^{\frac{m-1}{m}} .
\end{array}
$$

Thus, $\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}} \geqslant 1$.
Also, from equation (8), inequality (7) is
$\sum_{i=1}^{n} r_{i} x_{i} \leqslant\left(\sum_{i=1}^{n} x_{i}^{m}\right)^{\frac{1}{m}}$.
In the above, take $x_{i}=r_{i}^{\frac{1}{m-1}}$ to get
$\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}} \leqslant\left(\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}}\right)^{\frac{1}{m}}$.
Thus, $\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}} \leqslant 1$.
Combining with equation (10), we get
$$
\sum_{i=1}^{n} r_{i}^{\frac{m}{m-1}}=1 \text {. }
$$

This indicates that equation (9) can only be an equality.
The condition for equality in Hölder's inequality is
$$
r_{i}^{\frac{m}{m-1}}=\lambda a_{i}^{m}(i=1,2, \cdots, n),
$$

Substituting into equation (III) gives $\lambda=\left(\sum_{i=1}^{n} a_{i}^{m}\right)^{-1}$.
Thus, $r_{i}=\left(\frac{a_{i}^{m}}{\sum_{i=1}^{n} a_{i}^{m}}\right)^{\frac{m-1}{m}}(i=1,2, \cdots, n)$.