They get various types of bulletins from the manufacturers. Most likely some of those would supply, say, a look-up table of serial numbers by year. It could be done any way the manufacturer decided to do it, so long as it wasn't transparent to customers.