A method for handling a content word in a system comprising i (i>=1) memories of 2N memory words of R bits each, and wherein:
- each memory word comprises at least 2S Bloom Filter (BF) structures;
- each BF structure comprises Floor(R/2S) bits of which P bits define a Flags field, M bits define a Timestamp field, Q bits define a Counter field, such that P+M+Q=Floor(R/2S) and P is a power of 2;
- and
- an absolute time value has increments of time units, and a current time value is the absolute time value modulo 2M;
- the method comprising:
- a) receiving the content word;
- b) hashing the content word into i fixed-size words, each comprising 3 fields Ai, Bi, Ci, of respectively N, S and square root(P) bits;
- c) pointing to i memory words, corresponding respectively to A;
- d) pointing to, and reading, i BF structures respectively in the i pointed memory words, corresponding respectively to B;
- e) checking whether all i pointed and read BF structures have a valid Timestamp field, and if not:
- for BF structures among the i pointed and read BF structures having an invalid Timestamp field:
- writing a “1” in a bit of the Flags field corresponding to C, writing a “0” in all other bits of the Flags field, and resetting to “0” the Counter field;
- and for BF structures among the i pointed and read BF structures having a valid Timestamp field:
- writing a “1” in a bit of the Flags field corresponding to Ci;
- and
- for all BF structures among the i pointed and read BF structures:
- updating the Timestamp field with the current time value, and going to step a);
- f) checking whether all bits of the Flags field in all i pointed and read BF structures are at “1”, and if not:
- writing a “1” in the bit of the Flags field corresponding to Ci;
- and
- for all BF structures among the i pointed and read BF structures:
- updating the Timestamp field with the current time value, and going to step a);
- g) checking whether all bits in Counter fields in all i pointed and read BF structures are at “1”, and if not:
- for BF structures among the i pointed and read BF structures having a Counter field equal to the Min of Counter fields in the i pointed and read BF structures:
- incrementing by one the value of the Counter field;
- and
- for all BF structures among the i pointed and read BF structures:
- updating the Timestamp field with the current time value, and going to step a);
- and
- h) for all BF structures among the i pointed and read BF structures:
- updating the Timestamp field with the current time value, and going to step a).