Suppression of top-up injection backgrounds with offline event filter in the BESIII experiment