7. Let the function $f(x)$ satisfy $f\left(2^{x}\right)=x^{2}-2 a x+a^{2}$ -1, and $f(x)$ has a range of $[-1,0]$ on the interval $\left[2^{a-1}, 2^{a^{2}-2 a+2}\right]$, then the range of values for $a$ is $\qquad$.
7. Solution: Let $g(x)=f\left(2^{x}\right)$, then $f(x)=g\left(\log _{2} x\right)=$ $\log _{2}^{2} x-2 a \log _{2} x+a^{2}-1$, hence the range of $f(x)$ on the interval $\left[2^{a-1}\right.$, $\left.2^{a^{2}-2 a+2}\right]$ being $[-1,0]$ is equivalent to the range of $g(x)=x^{2}-$ $2 a x+a^{2}-1$ on $\left[a-1, a^{2}-2 a+2\right]$ being $[-1$, $0]$.

Since $g(a)=-1$ is the minimum value of $g(x)$ in $\mathbf{R}$, it follows from the condition that $a \in\left[a-1, a^{2}-2 a+2\right]$, and the maximum value of $g(x)$ in this interval is reached at the endpoints; also, the function value of $g(x)$ at the left endpoint $g(a-1)=0$ is precisely the maximum value of $g(x)$ in this interval, so $a$ must be in the right half of the interval, i.e., $\frac{(a-1)+\left(a^{2}-2 a+2\right)}{2} \leqslant a \leqslant a^{2}-2 a+2$, from which we can solve $\frac{3-\sqrt{5}}{2} \leqslant a \leqslant 1$ or $2 \leqslant a \leqslant \frac{3+\sqrt{5}}{2}$.

Note: Since $g(a+1)=g(a-1)=0$, it must be that $a \leqslant a^{2}-$ $2 a+2 \leqslant a+1$, from which we can solve $\frac{3-\sqrt{5}}{2} \leqslant a \leqslant 1$ or $2 \leqslant a \leqslant$ $\frac{3+\sqrt{5}}{2}$.