Example 4 Let real numbers $x_{1}, x_{2}, \cdots, x_{1999}$ satisfy the condition $\sum_{i=1}^{1990}\left|x_{i}-x_{i+1}\right|=1991$.
And $y_{k}=\frac{1}{k} \sum_{i=1}^{k} x_{i}(k=1,2, \cdots, 1991)$. Try to find the maximum value of $\sum_{i=1}^{1990}\left|y_{i}-y_{i+1}\right|$. ${ }^{[3]}$
【Analysis】For $k=1,2, \cdots, 1990$, we have
$$
\begin{array}{l}
\left|y_{k}-y_{k+1}\right|=\left|\frac{1}{k} \sum_{i=1}^{k} x_{i}-\frac{1}{k+1} \sum_{i=1}^{k+1} x_{i}\right| \\
=\left|\frac{1}{k(k+1)}\left(\sum_{i=1}^{k} x_{i}-k x_{k+1}\right)\right| \\
\leqslant \frac{1}{k(k+1)} \sum_{i=1}^{k} i\left|x_{i}-x_{i+1}\right| . \\
\text { Hence } \sum_{i=1}^{190}\left|y_{i}-y_{i+1}\right| \\
\leqslant \sum_{i=1}^{1990}\left[i\left|x_{i}-x_{i+1}\right| \sum_{k=i}^{1990} \frac{1}{k(k+1)}\right] \\
=\left(\sum_{i=1}^{1990}\left|x_{k}-x_{k+1}\right|\right)\left(1-\frac{k}{1991}\right) \\
\leqslant 1991\left(1-\frac{1}{1991}\right)=1990 .
\end{array}
$$

The maximum value 1990 is achieved when $x=1991, x_{2}=x_{3}=\cdots=x_{1991}=0$.