Example 4 Given the sine function $y=A \sin (\omega x+\varphi)(A>0, \omega>0,0<\varphi<2 \pi)$, its graph intersects the $y$-axis at the point $(0,1)$, and within the same period, the coordinates of one of its highest points are $(2, \sqrt{2})$. Find the expression of the function.
Since the point $(2, \sqrt{2})$ is the highest point, $A=\sqrt{2}$. From the point $(0,1)$ on the curve, we get $\sqrt{2} \sin \varphi=1$. Since $0<\varphi<\pi$,
$$
\varphi=\frac{\pi}{4} \text{ or } \varphi=\frac{3 \pi}{4}.
$$
If $\varphi=\frac{\pi}{4}$, then $y=\sqrt{2} \sin \left(\omega x+\frac{\pi}{4}\right)$. Since the point $(2, \sqrt{2})$ is the highest point, we have $\omega \cdot 2+\frac{\pi}{4}=\frac{\pi}{2}+2 k \pi, k \in \mathbf{Z}$, which implies $\omega=k \pi+\frac{\pi}{8}$. Since the point $(0,1)$ is on the curve, we have $\sqrt{2} \sin \left(\frac{\pi}{4}\right)=1$, which is true. Therefore, $\omega=k \pi+\frac{\pi}{8}$. Since the point $(2, \sqrt{2})$ is the highest point, we have $\omega \cdot 2+\frac{\pi}{4}=\frac{\pi}{2}+2 k \pi, k \in \mathbf{Z}$, which implies $\omega=k \pi+\frac{\pi}{8}$. Since the period $T=\frac{2 \pi}{\omega}=\frac{2 \pi}{k \pi+\frac{\pi}{8}}>2$,
$$
-\frac{1}{8}<k<\frac{7}{8}.
$$
Since $k \in \mathbf{Z}$, we have $k=0, \omega=\frac{\pi}{8}$. Therefore, the function expression is: $y=\sqrt{2} \sin \left(\frac{\pi}{8} x+\frac{\pi}{4}\right)$.

If $\varphi=\frac{3 \pi}{4}$, then $y=\sqrt{2} \sin \left(\omega x+\frac{3 \pi}{4}\right)$. Since the point $(2, \sqrt{2})$ is the highest point, we have $\omega \cdot 2+\frac{3 \pi}{4}=\frac{\pi}{2}+2 k \pi, k \in \mathbf{Z}$, which implies $\omega=k \pi-\frac{\pi}{8}$. Since the point $(0,1)$ is on the curve, we have $\sqrt{2} \sin \left(\frac{3 \pi}{4}\right)=1$, which is true. Therefore, $\omega=k \pi-\frac{\pi}{8}$. Since the period $T=\frac{2 \pi}{\omega}=\frac{2 \pi}{k \pi-\frac{\pi}{8}}>2$,
$$
-\frac{1}{8}<k<\frac{9}{8}.
$$
Since $k \in \mathbf{Z}$, we have $k=1, \omega=\frac{7 \pi}{8}$. Therefore, the function expression is: $y=\sqrt{2} \sin \left(\frac{7 \pi}{8} x+\frac{3 \pi}{4}\right)$.

In summary, the function expressions that meet the conditions are: $y=\sqrt{2} \sin \left(\frac{\pi}{8} x+\frac{\pi}{4}\right)$ or $y=\sqrt{2} \sin \left(\frac{7 \pi}{8} x+\frac{3 \pi}{4}\right)$.

Explanation: To find the expression of the function $y=A \cdot \sin (\omega x+\varphi)$ from points on a sine-type curve, the key is to determine the values of $\omega$ and $\varphi$. This is often a tricky task. From this example, we can see that if the concept of period is used appropriately, this problem is not difficult to solve. Generally, let $A\left(x_{1}, y_{1}\right), B\left(x_{2}, y_{2}\right)$ be any two points on the sine-type curve $y=A \sin (\omega x+\varphi)$. When $A, B$ are within the same period, by the concept of period, the period $T \geqslant\left|x_{2}-x_{1}\right|$. When $A, B$ are within $\frac{k}{n}\left(n, k \in \mathbf{N}^{*}\right)$ periods, $\frac{k}{n} \cdot T \geqslant\left|x_{2}-x_{1}\right|$. When $A, B$ are outside $\frac{k}{n}$ periods, $\frac{k}{n} \cdot T<\left|x_{2}-x_{1}\right|$. In the solution above, this simple fact is used to accurately and conveniently determine the function expression of the curve $y=A \sin (\omega \pi+\varphi)$ based on the coordinates of points on the curve.