The suggested solution is look at motifs: windows that are highly similar when trivial matches due to window overlap are excluded. If you take this to its logical conclusion, you end up in the Matrix Profile rabbit hole. https://www.cs.ucr.edu/~eamonn/MatrixProfile.html
If you were to compute it the naive way, that would be slow, but with increasingly sophisticated algorithms developed over a series of twenty papers, you can get massive speedups. Lots of clever tricks to enjoy! Though I guess you can skip the scenic route if you want and just read the first and last papers.