4. Let the line $l$ with a slope of $\frac{\sqrt{2}}{2}$ intersect the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1$ $(a>b>0)$ at two distinct points $P$ and $Q$. If the projections of points $P$ and $Q$ on the $x$-axis are exactly the two foci of the ellipse, then the eccentricity of the ellipse is