Do dogs know you are coming back?
Dogs know the smell of their owners very well. Their scent lingers long after they leave home and gradually diminishes over the course of the day only to return back strongly when they arrive home. So, dogs learn to associate their owner's arrival through their strong sense of smell.
Dogs most certainly recognize and remember their owners, even after long absences. This can be attributed to numerous factors, but they mainly rely on their sense of smell. According to PBS, dogs have up to 300 million olfactory receptors in their noses.
Dogs are able to identify, with ease, the scent of someone they recognize over the someone they have yet to meet. Even before an individual walks through the door, dogs have been alerted to who it is using their senses of smell and hearing.
What did they find? That dog's can tell when we've been gone for a while! The study noted marked differences in the way dogs behaved (i.e. increased tail wagging, more face licking) when an owner had been gone for two hours relative to when they'd only been gone for 30 minutes.
The truth is that your dog will almost always remember you, however long you've been apart. Dogs don't forget their beloved owners, even after months or even years apart.