In this paper, we propose an algebraic approach to investigate the diagnosis of partially observable labeled Petri nets based on state estimation on a sliding window of a predefined length h. Given an observation, the resulting diagnosis state can be computed while solving integer linear programming problems with a reduced subset of basis markings. \blue{The proposed approach consists in exploiting} a subset of h observations at each estimation step, which provides a partial diagnosis relevant to the current observation window. This technique allows a status update with a "forgetfulness" of past observations and enables distinguishing repetitive and punctual faults. The complete diagnosis state can be defined as a function of the partial diagnosis states interpreted on the sliding window. As \blue{the} analysis shows that some basis markings can present an inconsistency with a future evolution, which possibly implies unnecessary computations of basis markings, a withdrawal procedure of these \blue{irrelevant} basis markings based on linear programming is proposed.