This invention discloses a method, apparatus, device, and medium for tracing filter rod quality anomalies. The method includes: acquiring images of the end faces of multiple first filter rod sets entering a filter rod
library at preset time intervals; determining corresponding first filter rod set information based on the acquired images of each first filter rod set, wherein the first filter rod set information includes at least the identifier of the
molding machine that produced the first filter rod set, the quality parameters of the first filter rod set, and the time of
image acquisition; establishing logical units with the
molding machine's startup to shutdown period as a time window; for each logical unit, aggregating the first filter rod set information corresponding to all first filter rod sets processed in the target area of the filter rod
library within the corresponding time window of the logical unit, as well as the time window itself, into the logical unit, to perform filter rod quality anomaly tracing according to the logical unit; wherein, the target area of the filter rod
library is the remaining filter rod
processing area in the filter rod library excluding the
buffer zone. This invention enables efficient and accurate tracing of filter rod quality anomalies.