In one embodiment, a method includes receiving user behavior data and contextual information associated with the user behavior data, the contextual information comprising a first data portion associated with a first context type includes The method includes, from the user behavior data and the context information, using a hashing algorithm, a first portion representing the user behavior data and a second portion representing the first data associated with the first context type. and generating a first heterogeneous hash code comprising the hash code portion. The method includes accessing a second heterogeneous hash code comprising a third hash code portion representing a second data portion associated with the first context type. The method includes determining a similarity between the second hash code portion of the first heterogeneous hash code and the third hash code portion of the second heterogeneous hash code and comparing the second heterogeneous hash code.
展开▼