Example 6 Solve the congruence equation $x^{2} \equiv 2\left(\bmod 7^{4}\right)$.
The complete residue system of $7^{4}$ can be represented as
$$\begin{array}{c}
x=x_{0}+x_{1} \cdot 7+x_{2} \cdot 7^{2}+x_{3} \cdot 7^{3} \\
-3 \leqslant x_{j} \leqslant 3, \quad 0 \leqslant j \leqslant 3
\end{array}$$

We solve the congruence equations sequentially
$$\left(x_{0}+x_{1} \cdot 7+\cdots+x_{j} \cdot 7^{j}\right)^{2} \equiv 2\left(\bmod 7^{j+1}\right), \quad 0 \leqslant j \leqslant 3$$

to find $x_{0}, x_{1}, x_{2}, x_{3}$. When $j=0$, solve
$$x_{0}^{2} \equiv 2(\bmod 7)$$

we get $x_{0}= \pm 3$. When $j=1$, solve
$$\left( \pm 3+x_{1} \cdot 7\right)^{2} \equiv 2\left(\bmod 7^{2}\right)$$

we have
$$\begin{array}{l}
9 \pm 6 \cdot 7 x_{1} \equiv 2\left(\bmod 7^{2}\right) \\
\pm 6 x_{1} \equiv-1(\bmod 7)
\end{array}$$

we get $x_{1}= \pm 1$. When $j=2$, solve
$$\left( \pm 3 \pm 1 \cdot 7+x_{2} \cdot 7^{2}\right)^{2} \equiv 2\left(\bmod 7^{3}\right)$$

we have
$$\begin{array}{c}
( \pm 3 \pm 1 \cdot 7)^{2}+2 \cdot( \pm 3) \cdot 7^{2} x_{2} \equiv 2\left(\bmod 7^{3}\right) \\
\pm 6 x_{2} \equiv-2(\bmod 7)
\end{array}$$

we get $x_{2}= \pm 2$. When $j=3$, solve
$$\left( \pm 3 \pm 1 \cdot 7 \pm 2 \cdot 7^{2}+x_{3} \cdot 7^{3}\right)^{2} \equiv 2\left(\bmod 7^{4}\right)$$

we have
$$\begin{array}{c}
\left( \pm 3 \pm 1 \cdot 7 \pm 2 \cdot 7^{2}\right)^{2} \pm 6 \cdot 7^{3} x_{3} \equiv 2\left(\bmod 7^{4}\right) \\
100+40 \cdot 7^{2} \pm 6 \cdot 7^{3} x_{3} \equiv 2\left(\bmod 7^{4}\right) \\
\pm 6 \cdot 7 x_{3} \equiv-2-40\left(\bmod 7^{2}\right) \\
\pm 6 x_{3} \equiv-6(\bmod 7)
\end{array}$$

we get $x_{3}=\mp 1$. Thus, the congruence equation has two solutions:
$$\begin{array}{l}
x_{1} \equiv 3+1 \cdot 7+2 \cdot 7^{2}-7^{3} \equiv-235\left(\bmod 7^{4}\right) \\
x_{2} \equiv-3-1 \cdot 7-2 \cdot 7^{2}+7^{3} \equiv 235\left(\bmod 7^{4}\right)
\end{array}$$

The solution method in Example 6 is to use the $k$-ary representation of integers to solve congruence equations modulo $k^{l}$, where $k$ does not necessarily have to be a prime number.