Patent attributes
Methods and devices for scanning an incoming datastream for a plurality of target patterns. The scanning system receives an incoming data stream and stores the stream as sequential symbols in a register array. Previously received symbols are shifted in the array as incoming symbols are shifted in. A trigger stage computes a hash value based on the k most recently received symbols. The trigger stage then uses the hash value to determine whether a more detailed symbol by symbol comparison is required between a group of sequential symbols stored in the array and a target pattern stored in external storage. This is done by comparing the hash value with the indices of the target patterns in the external storage. If the more detailed comparison is indicated, a full comparison stage retrieves the relevant target pattern and compares the target pattern with the sequentially stored symbols in the array. To improve the determination of whether the detailed comparison is required, a confidence stage may be placed between the trigger stage and the full comparison stage. The confidence stage computes a hashing function value based on c sequential symbols in the array with c≧k. The hashing function value is then used to determine whether the more time consuming symbol by symbol comparison is needed.