add min hamming distance to match

Signed-off-by: yuanhuan <yuanhuan@tcl.com>