"You did great for the past 4 weeks - perfect streak" or "you are doing really well - only missed one day in the past 4 weeks". You know, something a human might say.
Start off with a x Days, then switch to x Weeks and then moving average.
My own experience in trying maintaining chains of habits confirms it too - once I slipped on a longer streak, I immediately thought "screw this, I'm not doing this anymore" - because my mental set point moved from "doing something" to "I need to do a streak at least as long as the previous one, and man, how long will that take...".
It is only lost in Duolingo but you have learned some of the language (I am assuming here).
TL;DR - Your hard work wasn't lost. Your knowledge of that language didn't disappear when that streak ended. You just forgot why you downloaded Duolingo in the first place.