The sum of the binomial expansion coefficients of three terms equals 22, and the middle term of this expansion equals 540000, find the value of $x$.

 untranslated part:
 的㑑。 

Note: The last part "的㑑。" seems to be a typographical error or a non-standard phrase, and it is not translated as it does not have a clear meaning in this context. If you meant to ask for the value of $x$, the translation reflects that. If "的㑑" is a specific term or has a specific meaning, please provide more context.
From the given, we have
$$
C_{n}^{n-2}+C_{n}^{n-1}+C_{n}^{n}=22 .
$$

That is, $\frac{n(n-1)}{2}+n+1=22$.
Simplifying and rearranging, we get: $n^{2}+n-42=0$.
Solving for $n$, we get $n=6, n=-7$ (discard $n=-7$).
Therefore, the middle term is the 4th term.
By the general term formula, the middle term is
$$
T_{3+1}=C_{0}^{3} \quad\left(x^{1 g x}\right)^{3} \cdot 3^{3}=540 x^{31 g x} \text{. }
$$

From the given conditions, we have:
$$
540 x^{31 g x}=540000
$$

That is, $x^{31 g x}=1000$.
Thus, $3 \lg ^{2} x=3$.

That is, $\lg ^{2} x=1$,
So, $x=10$ or $x=\frac{1}{10}$.