Example 3 Let $X=\{1,2, \cdots, n\}, A_{i}=\left\{a_{i}, b_{i}, c_{i}\right\}\left(a_{i}<b_{i}<c_{i}, i=1\right.$, $2, \cdots, m)$ be 3-element subsets of $X$, such that for any $A_{i}, A_{j}(1 \leqslant i<j \leqslant m), a_{i}=a_{j}, b_{i}=$ $b_{j}, c_{i}=c_{j}$ holds for at most one. Find the maximum value of $m$.
For $2 \leqslant k \leqslant n-1$, consider the 3-element subset $\left\{a_{i}, k, c_{i}\right\}$ with $k$ as the middle element, where $a_{i}<k<c_{i}$. Let the number of such sets be $f(k)$. Since $a_{i}$ can take values from $1,2, \cdots, k-1$, we have $f(k) \leqslant k-1$. Also, $c_{i}$ can take values from $n, n-1, \cdots, k+1$, so $f(k) \leqslant n-k$. Therefore, $f(k) \leqslant \min \{k-1, n-k\}$. Thus,
$$m=\sum_{k=2}^{n-1} f(k) \leqslant \sum_{k=2}^{n-1} \min \{k-1, n-k\}=\left\{\begin{array}{ll}
\frac{n(n-2)}{4} & (n \text { is even }), \\
\left(\frac{n-1}{2}\right)^{2} & (n \text { is odd }) .
\end{array}\right.$$

If we take $A_{1}, A_{2}, \cdots, A_{m}$ to be all 3-element subsets $\{a, b, c\}$ satisfying $a+c=2 b$, then
$$\begin{array}{c}
m=\left\{\begin{array}{ll}
\frac{n(n-2)}{4} & (n \text { is even }), \\
\left(\frac{n-1}{2}\right)^{2} & (n \text { is odd }) .
\end{array}\right. \\
m_{\max }=\left\{\begin{array}{ll}
\frac{n(n-2)}{4} & (n \text { is even }), \\
\left(\frac{n-1}{2}\right)^{2} & (n \text { is odd }) .
\end{array}\right.
\end{array}$$