7. Given that $C$ is a moving point on the line segment $A B$ of length 1, point $D$ is such that $D B \perp A B$, and $B D=A C$, connect $A D$, and construct $C E \perp A D$, with the foot of the perpendicular being $E$. Let $A C=x, B E=$ $y$. Then the function expression of $y$ in terms of $x$ is $\qquad$, and the minimum value of $y$ is $\qquad$.
7. $y=\sqrt{\frac{2 x^{2}-2 x+1}{x^{2}+1}}(0<x \leqslant 1), \frac{\sqrt{5}-1}{2}$.

From the problem, we know
$$
A E=\frac{x}{\sqrt{1+x^{2}}}, \cos A=\frac{1}{\sqrt{1+x^{2}}} .
$$

In $\triangle A B E$, by the cosine rule we have
$$
\begin{array}{l}
B E^{2}=A E^{2}+A B^{2}-2 A E \cdot A B \cos A \\
\Rightarrow y=\sqrt{\frac{2 x^{2}-2 x+1}{x^{2}+1}}(0<x \leqslant 1) .
\end{array}
$$

Let $x=\tan t\left(t \in\left(0, \frac{\pi}{4}\right]\right)$.
Then, by trigonometric transformations, equation (1) simplifies to
$$
y=\sqrt{\frac{3-\sqrt{5} \sin (2 t+\varphi)}{2}}\left(\tan \varphi=\frac{1}{2}\right) \text {. }
$$

The minimum value of equation (1) is $\frac{\sqrt{5}-1}{2}$, which occurs if and only if $\sin (2 t+\varphi)=1$.