Computer-implemented method, device, and computer-readable storage medium
By applying deep learning architecture in user behavior data processing, including category attention and TAACNN, the high cost of computing similarity in large-scale user behavior data is solved, and efficient and accurate similarity search is achieved.
Patent Information
- Application Number
- CN202080019076.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-20
- Filing Date
- 2020-03-06
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2040-03-06
AI Technical Summary
The prior art is costly to calculate user similarity when processing large-scale user behavior data, and traditional deep binary hashing methods are difficult to effectively process the time sensitivity and context characteristics of sequential behavior data.
Deep learning-based architectures, including category attention models and time-aware attention convolutional neural networks (TAACNNs), are adopted to learn binary hashs for sequential behavioral data. This architecture generates efficient user embeddings by capturing users' long-term and short-term preferences, combining advanced metadata information.
It significantly reduces the computational complexity of nearest neighbor search, improves retrieval efficiency, can effectively capture the dynamicity and context information of user behavior, and improves the accuracy of similarity search.
Smart Images

Figure CN113544659B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to user activity modeling and similarity searching. Background Art
[0002] In big data systems for advertising and marketing, finding and ranking groups of similar users (known as nearest neighbor search) is a critical task, especially for applications such as lookalike search, user segmentation, and recommendations. Modern devices of many types, including TVs and mobile devices, have detailed profiles of users' interaction history with content, such as live TV, video on demand, games, applications, and external devices, which can be used to calculate similarities between users and ultimately their "nearest neighbors". However, due to the large-scale nature of this data (which may involve tens of millions of users with continuously updated interaction histories, each spanning millions of sessions over time), such a task is computationally expensive.
[0003] One way to speed up nearest neighbor searches is to use deep neural networks for hashing. Hashing converts data in any fixed format (such as images, sounds, and text) into a fixed-size hash code. Similarity operations can then be performed by comparing hash codes. The efficiency gain is particularly significant when the generated hash codes are binary vectors (whose comparisons are only bit operations). However, user behavior history has contextual features and patterns that are different from data formats that are compatible with this technique. Summary of the invention BRIEF DESCRIPTION OF THE DRAWINGS
[0004] Figure 1 An example high-level architectural architecture of an embodiment of the disclosed hashing system is shown.
[0005] Figure 2 An example architecture for a heterogeneous hashing model is shown.
[0006] Figure 3 An example architecture of a time-aware attention convolutional neural network is shown.
[0007] Figure 4A-4C An example architecture of a system for generating and using heterogeneous hash codes is shown.
[0008] Figure 5 An example method of operation of a system for generating and using heterogeneous hash codes is shown.
[0009] Figure 6 An example method of operation of a system for generating and using heterogeneous hash codes is shown.
[0010] Figure 7An example architecture for a heterogeneous hashing model is shown.
[0011] Figure 8 An example architecture of a trainable gate is shown.
[0012] Fig. 9 An example architecture of the aggregation layer is shown.
[0013] Fig.10 An example architecture for a heterogeneous hashing model is shown.
[0014] Fig.11 Example preprocessing steps and network layers are shown.
[0015] Figure 12A-12B Example operations performed by the layers of the heterogeneous hashing model are shown.
[0016] Figure 13A-13B Example operations performed by the layers of the heterogeneous hashing model are shown.
[0017] Fig.14 Heterogeneous hash codes are shown.
[0018] Fig.15 Example hash codes are shown.
[0019] Fig.16 Example hash codes are shown.
[0020] Fig.17 An architectural representation of the applied hashing system is shown.
[0021] Fig.18 An example framework for training a heterogeneous hashing model is shown.
[0022] Fig.19 An example model of a system for training and using a time-aware attention convolutional neural network is shown.
[0023] Figure 20A-20C An example architecture of a time-aware attention convolutional neural network is shown.
[0024] Fig.21 Example user behavior representations are shown.
[0025] Fig. 22 The performance of the hashing system on various data sets is shown.
[0026] Fig.23 An example computer system is shown. DETAILED DESCRIPTION
[0027] In a variety of applications, hash learning is widely adopted as a solution for approximate nearest neighbor search for large-scale data retrieval. Due to its computational efficiency and retrieval quality, applying deep architectures to learn hashing has particular benefits. However, these deep architectures may not be fully suitable for correctly processing data known as "sequential behavior data". Sequential behavior data may include data types observed in application scenarios related to user modeling. In a particular embodiment, in order to learn binary hashes for sequential behavior data, the system can capture the user's evolving preferences (e.g., measured over an extended period of time) or utilize the user's activity patterns at different time scales (e.g., by comparing activity patterns at short time scales and long time scales). The disclosed technology provides a novel deep learning-based architecture to learn binary hashes for sequential behavior data. The effectiveness of the architecture of the disclosed technology is shown by different experiments.
[0028] The problem of approximate nearest neighbor (ANN) search arises in a variety of applications related to large-scale data search and retrieval. For example, an example application may be referred to as the "LookALike" extension method, which seeks to identify a seed object or data set, and identifies other objects or data sets that have a threshold similarity to the seed object or data set. The final quality of the LookALike audience extension method, which is widely used in advertising targeting, may be highly dependent on the performance of the ANN algorithm used. Binary hashing is a method for efficiently handling ANN problems in high-dimensional space. In binary hashing, the original feature space can be projected into a low-dimensional Hamming space while keeping the similarity value or ranking of the original data within a predictable error range. Since the Hamming distance between two points can be calculated by bit operations, searches in the Hamming space are often fast and efficient. In addition, as with general hashing, the number of comparisons can be greatly reduced.
[0029] Deep binary hashing techniques can demonstrate improved performance in highly complex feature spaces. In certain embodiments, in deep binary hashing, a neural network can be optimized based on a similarity or ranking function while maintaining a loss function, with the goal of converting raw features to their corresponding embeddings. The corresponding embeddings are ultimately converted to binary hash codes. The latter process can be achieved by using a sign function. Continuation methods have been developed to iteratively approximate sign functions during learning to address the problem of vanishing gradients during backpropagation.
[0030] Deep binary hashing algorithms may not always be suitable for behavioral data, especially when the behavioral data is sequential in nature. Sequential behavioral data is often observed in applications that process user behavior patterns over a specific time period. Examples include user interactions with websites, mobile applications, multimedia content, etc. The disclosed technology provides a method for binary hashing sequential behavioral data that captures the evolving preferences of users and the dynamic nature of user behavior at different time scales. By way of example and not limitation, time scales may include hourly, daily, weekly, monthly, or shorter or longer time scales, depending on the application and use case.
[0031] In scenarios such as LookALike, a computing system can capture the common behavior of a group of users whose preferences and needs are roughly similar. In this case, the computing system can treat a specific user group as a basic unit of binary hash projection, which can be modeled using a similarity function of activity patterns. For example, two users often visit the same fantasy sports website because they are both avid fans of fantasy sports. In addition, when the behavioral data is continuous, especially when it is associated with specific time events, the computing system can capture the dynamic nature of user behavior across different temporal horizons. For example, two users often watch the same TV show on the same day and at the same time of the week because they both live in the same time zone and subscribe to the same cable TV provider.
[0032] With these design principles in mind, the disclosed technology provides a novel deep learning-based architecture that is significantly different from previous deep binary hashing methods. The first deep learning-based architecture described in a specific embodiment is categorical attention, which uses a novel set of intermediate attention layers to convert raw feature data into high-level metadata (e.g., category or genre) embeddings, with the goal of capturing users' evolving preferences. The second deep learning-based architecture described in a specific embodiment is the Relation and Attention CNN (RACNN). RACNN uses a set of intermediate relations and attention layers that represent sequential user behaviors of different time window sizes in 2D space, as well as additional convolutional layers associated with the relations and attention layers, to minimize the loss of isolated feature information in the original data input. Because RACNN reveals information based on the temporal characteristics of user interactions, it can also be called Time-Aware Attention CNN (TAACNN).
[0033] The disclosed technology introduces a unified deep binary hashing framework, the purpose of which is to efficiently learn hashes for sequential behavior data. It is conceivable that there may be multiple variations associated with the disclosed technology. The disclosed technology provides a category attention model that captures a user's preferences for high-level metadata information. In a particular embodiment, such a model may be more suitable for modeling a user's long-term preferences and consistent preferences. The disclosed technology also provides a RACNN / TAACNN model that captures user behavior at various time scales. In a particular embodiment, such a model combines a user's long-term preferences with her short-term preferences. Therefore, the RACNN / TAACNN model may be suitable for modeling a user's more dynamic behavior patterns. In addition, several experiments have been run, which show that the disclosed technology outperforms other benchmark hashing methods. The experiments also demonstrate that the disclosed technology effectively handles nearest neighbor searches for sequential behavior data.
[0034] One approach to binary hashing for nearest neighbor search is locality-sensitive hashing (LSH), which uses random projections. Deep learning-based binary hashing methods have been introduced. Several deep learning-based methods focus on multimedia content (images and videos), where CNN-type structures can be utilized to create image embeddings that are then converted into similarity-preserving hash codes. However, sequential behavioral data is significantly different from multimedia data, making it difficult to apply these methods.
[0035] Another research direction is deep binary hashing for text (e.g., document similarity matching). These include semantic hashing, semantic hashing using tags and topic modeling (SHTTM), and variational deep semantic hashing for text (VDSH). These methods take documents as input packages of words and then learn binary hashes using encoder-decoder networks. Deep binary hashing has also been applied to recommendations, where discrete deep learning methods decompose the user-item matrix into latent vectors in Hamming space to generate binary hash codes for users and items. Even these are not suitable for sequential behavior data types (such as user interaction data over time related to the disclosed technology) because the most advanced bag of words and matrix decomposition methods ignore the time-sensitive aspects of sequential behavior data.
[0036] The present disclosure extends the deep learning-based method of generating user embeddings from user sequential behavior data. For example, for a sequential recommendation system, a method can model the user's long-term preferences that evolve over time by distinguishing short-term history from long-term history, and then use attention to generate a long-term history representation. Attention is again used to combine the output of the long-term representation with the short-term history representation. However, a shortcoming of a specific embodiment of this method is that it only generates embeddings from sequential user-item interactions, while ignoring high-level metadata (e.g., category) information for each item. As a result, it cannot correctly capture the user's preferences (e.g., action movie fans). The disclosed technology provides an improved method.
[0037] Figure 1 An example high-level structural architecture of an embodiment of the disclosed technology including a deep binary hashing architecture 100 is shown. As shown, the architecture 100 includes three key components: (1) network layers 120a and 120b (e.g., category attention or RACNN / TAACNN) for generating user representations from behavioral data; (2) fully connected hashing layers 130a and 130b for converting user representations into K-dimensional user embeddings; and (3) symbolic activation functions 140a and 140b for binarizing the embeddings for Hamming distance comparison.
[0038] One major use of binary hashing of the disclosed technology is how to quickly determine whether two users are similar to each other based on their behavioral histories. The disclosed technology defines a user's behavioral history as a sequence of user actions (e.g., a series of book reviews by the same user or a series of clicks by a user on a website), each of which is associated with a timestamp. In a specific embodiment, in order to measure the similarity between users, the disclosed technology can efficiently vectorize their behavioral histories and utilize a vector distance metric. Traditionally, one disadvantage of such distance calculations is the complexity involved as the dimension of the associated vector increases. In order to efficiently approximate the nearest neighbor search, a specific embodiment of the disclosed technology can reduce the overall computational complexity and the number of comparisons. A specific embodiment of the disclosed technology can achieve this by hashing the user's behavioral history vector into a Hamming space.
[0039] Figure 1An example embodiment workflow of the disclosed technique for deep binary hashing is shown. Inputs 115a and 115b arrive in pairs with preprocessed user behavior histories, each associated with a corresponding user 110a and 110b. According to the Siamese structure, the preprocessed user behavior histories are fed to the network layers (e.g., 120a and 120b, respectively). The network layers 120a and 120b produce user representations. The user representations are compressed into K-dimensional user embeddings by hash layers 130a and 130b, respectively. The embeddings are binarized into K-bit binary hash codes using symbolic activation functions 140a and 140b. Finally, a Hamming distance calculation 150 is performed to determine whether two users are similar or dissimilar.
[0040] As an improvement over previous deep learning-based methods, the disclosed technology uses high-level metadata information of items (e.g., categories or genres) to generate user embeddings from sequential user-item interactions. The necessity of generating user embeddings based on user groups according to preferences can be illustrated by the following example. Suppose user A is an action / adventure movie fan, and user B is a romantic movie fan. Suppose a romantic movie is recommended to both users. User B may naturally like to watch the romantic movie because it fits his movie genre preference well. User A may still watch this movie even if it is not his most preferred movie genre, but it may be because it is a popular movie and in a specific context, user A likes to watch popular movies. As can be seen from this example, user events can have different semantics, so user preferences are an influencing factor for user modeling.
[0041] To efficiently learn user representations (embeddings) from sequential behavioral data to generate binary hashes, the disclosed technique provides a novel hybrid attention network (category attention) to capture users' underlying preferences. Figure 2An example embodiment of the disclosed technology including an overall structural architecture of a category attention network 200 is shown. In the category attention network 200, user representations are learned by combining attention networks for each high-level metadata (e.g., category). In a particular embodiment, attention may be selected as the base network of the disclosed technology instead of long short-term memory (LSTM) or gated recurrent unit (GRU) due to its superior performance. The network 200 of the disclosed technology includes four layers: (1) a sparse input layer 210 that sparses user and item inputs 215a-215f by grouping items for each high-level metadata (e.g., one-hot representation); (2) an embedding layer 220 that learns an embedding 225a-225f for each item; (3) an attention layer 230 for each high-level metadata that computes a weighted sum of the item embeddings of each high-level metadata in the network for each group 235a-235c; and (4) a layer 240 that combines from the high-level metadata attention layers. The output 250 of this particular layer represents the user and also their category preference.
[0042] In a particular embodiment, the disclosed technology first sorts all items in chronological order and classifies them according to their high-level metadata information to produce an item group containing items 215a-215f. Metadata can have a wide range of meanings. Examples of metadata include, but are not limited to, genres, themes, categories, preferences, etc. Each item 215a-215f found in a metadata group is represented by GijU, where G is a group, i is the index of the group, j is the index of the item in the i-th group, and U represents a user. Based on the item group, the embedding layer 220 generates an item embedding 225a-225f corresponding to each metadata group 215a-215f. The attention layer 230 layer captures the internal relationships between all items found in a given high-level metadata group (e.g., 225a) of each group (creating attention nets 235a-235c). Here, the disclosed technology uses user preferences (e.g., "sports") to illustrate this. Based on the grouped embedding layer 220 for each preference, the disclosed technology captures the internal relationships in each item embedding 225a-225f. As the disclosed techniques capture these internal relationships, some user-item interactions inflate or deflate. The output of the embedding layer 220 is viewed as a representation of the user's sequential behavior that reflects the impact of other items on a given preference. The disclosed techniques can modify another self-attention structure to take into account user attention for each preference. Let Hi be a matrix comprising a sequence of embedding outputs from items 215a-215f grouped by each user preference i, where G is the group and U represents the user (Equation 1). The disclosed techniques can apply a nonlinear function tanh to Hi (Equation 2). Ti represents the number of ordered items in the i-th preference (Equation 3). The representation ri of the sequence is formed by the weighted sum of these output vectors (Equation 4):
[0043] Hi= GiU (1)
[0044] Mi=tanh(Hi) (2)
[0045]
[0046] After obtaining the attention of each like using Equation 4, the disclosed technique adds ri together to retrieve the user embedding, Where N is the number of likes. Algorithm 1 shown below introduces the general method of category attention according to the described equation.
[0047] Algorithm 1 Category Attention
[0048] Input: user groups U, grouped project Gu high-level metadata for each user group U (e.g., a list of project ids containing the i-th high-level metadata) ), K: the dimension of the hash bit
[0049] Output: The generated K-dimensional user embedding Ue
[0050] for each user in Ui do
[0051] for each group in Ui do
[0052] ItemList = sorted by timestamp
[0053] ItemEmbedding = Compute high-level metadata attention generated by the K-dimensional embedding layer (Eq. 1-4)
[0054] end for
[0055] Uei = sum of generated high-level metadata attention embeddings
[0056] end for
[0057] Figure 3 An example embodiment of the disclosed technology including the architecture of RACNN / TAACNN 300 is shown. Figure 3 Certain parameter selections are implied, as will be discussed further below, but the present disclosure contemplates certain generalizations to this structure. Figure 3 In the text, “ST” is the abbreviation for short time, “MT” is the abbreviation for medium time, and “LT” is the abbreviation for long time, which will be further described below.
[0058] It is well known that attention models are effective in processing sequential data, but the present disclosure is based on methods that further demonstrate the potential of CNN in processing sequential data. However, in these methods, due to data structure limitations, the CNN structure applies convolution kernels of a single dimension even when embedding is in place. In the case of the disclosed technology with sequential data, this may lead to the loss of long-term attention features, which may affect the similarity preservation during binary hash code generation. To alleviate this potential problem, the disclosed technology provides a relation and attention CNN (RACNN) architecture / time-aware attention CNN (TAACNN) architecture 300 to decompose sequential user behaviors into hash codes while maintaining the similarity of sequential user behaviors. Specific embodiments of the disclosed technology are capable of converting given sequential behavior data into a high-dimensional structure to extract short-term (relation) features and long-term (attention) features for each user, thereby achieving better similarity preservation during binary hashing.
[0059] The structure starts with a user behavior representation 315 in the input layer 310. Because user behavior data is usually represented in terms of user-item interactions, in order to fit the sequential behavior data into the RACNN / TAACNN structure, the disclosed technology first maps each item to its category domain to reduce its dimensionality. For example, each category can be encoded using a unique hot encoding, and the item can be multi-hot encoded because the item can belong to multiple categories (e.g., a book or a movie). Thereafter, the system using the RACNN / TAACNN structure can sessionize the user's data by a specific time unit (e.g., hours, days, weeks, etc.). In each session, the disclosed technology aggregates all items that the user has interacted with within a specific time unit, using a multi-hot encoding of each item to represent the user's aggregate behavior in the session. Next, the system using the RACNN / TAACNN structure can reshape the user's behavior into a high-dimensional space U∈RH×W×C, where H is a short-term dimension (e.g., day), W is a long-term dimension (e.g., month), and C is the category size. The exact time required for each dimension may be related to the length of time selected for the session. After obtaining the user behavior representation 315, an embedding layer 320 is used. This layer uses a 1×1 convolution kernel 325 to map the low-dimensional sparse input U to a high-dimensional adaptive dense embedding Ue∈RH×W×E, where E is the embedding size (e.g., 128 here).
[0060] In the relation and attention layer 330, the disclosed technology utilizes different kernels to extract different features to better preserve user similarity. The relation kernel set kR 332 has a finite number of kernels. In a specific embodiment, the relation kernel set 332 includes three kernels, namely {k3×1, k5×1, k7×1}. The attention kernel set kA 337 also has a finite number of kernels. In a specific embodiment, the attention kernel set 337 includes three kernels, namely {k1×3, k1×5, k1×7}.
[0061] In certain embodiments, in order to avoid the loss of isolated features from the original user behavior representation 315, an isolated convolution 338 based on an average pooling function 333 may be added in the relation and attention layer 330, such as Figure 3 The following Algorithm 2 shows how to calculate user features in the relationship and attention layer 330 of the disclosed technology according to a specific embodiment. All features 345a-345g extracted from the relationship and attention layer 330c are flattened and concatenated together in the aggregation layer 340 for further similarity calculation.
[0062] Algorithm 2 Relation and attention / time-aware attention feature extraction
[0063] Input: 2D embedded representation of user behavior
[0064]
[0065] Output: User Features (dedicated feature extraction from relation and attention layers)
[0066] for U e Each user in do
[0067] for relation core set K ST Each core in do
[0068] (Each convolution will have a stride of 2 on its convolution axis)
[0069] (apply a step size of 2 on each axis)
[0070] end for
[0071] for relation core set K LT Each core in do
[0072] (Each convolution will have a stride of 2 on its convolution axis)
[0073] (apply a step size of 2 on each axis)
[0074] end for
[0075]
[0076]
[0077] End-user characteristics
[0078] end for
[0079] The last layer (250 and 350, respectively) of both the Category Attention Network 200 and the RACNN 300 generates user embeddings in the form of continuous vectors (e.g., 255). Therefore, it is necessary to convert them into binary hashes as shown below. Formally, similarity-preserving hashing is to convert data from the input space (composed of D-dimensional feature vectors xi∈RD) is represented in the hash space (composed of K-bit binary hash codes yi∈{-1, 1}K) while still maintaining similarity. The problem can be described as: given N points of D-dimensional input data X∈RN×D, the goal is to learn a hash function f:x→y to generate a K-bit binary code Y∈HN×K.
[0080] To define similarity, in most Siamese structures, similarity is usually defined as: Sij∈{0,1}. Sij=1 means that xi and xj are similar, while Sij=0 means that they are not similar. In one method, the similarity of each pair is determined using the labels associated with each pair. In this method, Sij=1 when the two input objects share at least one label, otherwise Sij=0. However, according to the disclosed technology, such a definition is too loose, and a finer-grained similarity (e.g., a true value similarity score) is beneficial. Euclidean, cosine, or Jaccard distance can be used to achieve such a goal. Therefore, the disclosed technology defines the true value similarity function Sij as:
[0081] Sij=ci·cj / (||ci||||cj||)
[0082] where ci, cj∈CM, and M is the number of segments, genres, or categories, respectively. For binary codes, the Hamming distance is the most widely used similarity measure. Observe that there is also a relationship between the Hamming distance and the inner product:
[0083]
[0084] where K is the length of the hash code, W is a K×K diagonal matrix, yi=[h1(xi),...,hk(xi),...,hK(xi)] and yj=[h1(xj),...,hk(xj),...,hK(xj)]∈Y. Since the basic concept of Hamming distance cannot fully capture the different levels of influence from different hash bits, the disclosed technology introduces a weighted Hamming distance metric. More precisely, between two binary codes yi and yj, the disclosed technology defines
[0085]
[0086] where wk∈W. The weighted Hamming distance metric can also be written as:
[0087]
[0088] Given a pairwise similarity set of N training data points, let yiWyjT be expressed as <y i ,y j > w, then the likelihood function is
[0089]
[0090] Therefore, the maximum likelihood estimate of the hash code output for all training points is given as follows:
[0091]
[0092] For each pair, P(s ij | <y i ,y j > w ) can be defined as:
[0093] P(s ij | <y i ,y j > w )=1-||s ij -σ( <y i ,y j >w)||1 (7)
[0094] where σ(x) = 1 / (1+e-αx) is an adaptive sigmoid function with a hyperparameter α that controls its bandwidth (i.e., the steepness of the function). ||s ij -σ( <y i ,y j > w )|| 1 is the similarity label and <y i ,y j > w The Euclidean distance between the sigmoid outputs of . According to Equation 7, it can be obtained as:
[0095]
[0096] By incorporating Equation 7 into the maximum likelihood estimate in Equation 6, the optimization problem can be defined as:
[0097]
[0098] Where Θ represents the set of all parameters in a given deep network. Due to the vanishing gradient problem of the sign function, an alternating relaxation method can be used to optimize Equation 8, such as continuous relaxation using tanh or softsign.
[0099] In big data systems for advertising and marketing, finding and ranking similar groups of users (nearest neighbor search) is a critical task, especially for applications such as similar search, user segmentation and recommendations. Modern devices (such as TVs and mobile devices) have detailed profiles of users' interaction history with content, such as live TV, video on demand, games, applications and external devices, which can be used to calculate similarities between users and thus their "nearest neighbors". However, due to the large-scale nature of this data (which may involve tens of millions of users with continuously updated interaction histories, each spanning millions of sessions over time), such a task is computationally expensive.
[0100] One method for speeding up nearest neighbor searches is to use deep neural networks for hashing. Hashing converts data in any fixed format (such as images, sounds, and text) into a hash code of fixed size. Similarity operations can then be performed more efficiently by comparing hash codes. The efficiency gain is particularly evident when the generated hash code is a binary vector (whose comparison is only a bit operation). However, user behavior history has contextual features and patterns that are different from images, sounds, and text. Specific embodiments of the systems and architectures described in this disclosure can take advantage of these differences to achieve better and more efficient results when hashing, which will help operators in applications such as similar searches, user segmentation, and recommendations.
[0101] Scalability and efficiency are the most difficult issues in big data user behavior modeling. For large device manufacturers, there may be millions of users providing user behavior data, resulting in billions of individual records of user behavior data that may need to be processed every day. However, for businesses like online interactive advertising, services may need to provide responses within an extremely limited time period (usually in milliseconds). Therefore, a scalable and efficient framework is very beneficial. It may also be necessary for the framework to combine both offline and online computing to best serve advertising requests.
[0102] Previously, methods for solving the nearest neighbor problem using hashing have been used for large-scale data sets, such as LSH and other binary hashing mechanisms. Typically, these methods only capture the behavior of users at a high level or over a long period of time. Considering the temporal order of changing user behavior, the performance of these methods is generally poor. In addition, these historical methods do not consider changes in user behavior based on the various contextual environments in which users may be generating user behavior data (e.g., how users interact with content). For example, in the field of advertising, users' preferences may change over time and from one location to another, depending on the device they are using, the class of activities they are performing, or the social group they are in, to name just a few of the contexts that can be considered. Specific embodiments of the systems and architectures disclosed herein address these problems, using novel and efficient hashing methods to capture all contextual aspects while still maintaining the user's preferences. By utilizing hash codes generated by these novel methods, the disclosed technology can be applied to applications such as user segmentation and similar user search.
[0103] The present disclosure solves the general problem of nearest neighbor search by hashing the user behavior history. The overall framework described herein provides a novel method for solving the problems described above. In addition, the architecture and framework solve multiple technical problems that lead to the general problem. For example, the present disclosure provides a time-based hash of the user behavior history, which is a novel implementation of the hash. The user behavior history usually shows a specific time pattern. For example, the user may have some habits according to the time of the day, such as watching a specific program in the morning, evening or on holidays. By generating a hash code that can reveal these patterns, the disclosed system helps to compare users and their usage patterns more effectively over time. As another example, the present disclosure provides a social group-based hash of the user behavior history. Metadata that can be used to provide additional contextual elements to the user behavior data includes demographic and social network information. In addition to a separate hash code, demographic and social network information can be used to generate a hash code based on a social group. The hash code based on the social group promotes similarity searches within and between groups according to the orientation and analysis needs of the end customer. As another example, the present disclosure provides a location-based hash of the user behavior history. Users often change their behavior according to the location. Exploiting location-specific patterns in user behavior history allows location-aware similarity search. As another example, the present disclosure provides an activity-classification-based hash of user behavior history. Another aspect of metadata that can be used includes records of different activity classifications (such as content type, genre, etc.) to exploit unique user similarity patterns in these classifications. As another example, the system and architecture described herein employ heterogeneous hash codes. Hash codes in existing systems tend to capture user preferences as an overall value. However, using such hash codes, previous systems cannot efficiently distinguish different aspects of user preferences and cannot optimally distinguish users based on these preferences. As described herein, the present disclosure solves this problem by generating a heterogeneous hash code composed of hash segments that can capture different aspects of user preferences and context. As another example, the present invention solves the problem of how to efficiently store heterogeneous hash codes and efficiently update hash codes when needed. Because the ultimate goal of hashing is to accelerate applications such as nearest neighbor search, reducing the complexity of storage and updates is an important part of any system that employs the technology described herein. As another example, the technology described herein greatly improves the use and application of user behavior history hash codes. Once various hash codes are generated for a user (or user group), a system using the technology described herein can use them in specific applications (such as performing nearest neighbor searches). The present disclosure addresses the challenge of how to do this in an optimal way by utilizing context, weights, and both heuristic and learned decisions. User segmentation and similar user search are challenging problems in problem areas such as advertising.First, machine learning methods and human rules are used to classify and identify user partitions. Previous methods then apply suboptimal methods (such as LSH) to the seed user partitions to find similar users. A significant problem with these methods is the quality of the user partitions, which has a large and adverse impact on the performance of these systems, ultimately affecting the return on investment in advertising to customers. Typically, user partition quality is a key performance indicator for advertising targeting service providers. The present disclosure provides a solution to efficiently refine existing partitions and expand existing partitions with high-quality users.
[0104] In a particular embodiment, the present disclosure describes a system and architecture for performing a nearest neighbor search via a deep hash of a user's behavior history. The present disclosure describes a solution to the problem described in the preceding paragraph. The particular solution described in detail herein includes a time-based hash of a user's behavior history. The disclosed architecture hashes the user's behavior history with content in multiple adaptive time windows so as to model the temporal structure patterns in the user's behavior with content. For example, this is accomplished by learning to define "serial" and "periodic" patterns heuristically or through deep neural networks. Then, the user's time-based preferences can be directly hashed into hash partitions, or the user's behavior history can be decomposed according to the time window. Finally, a separate hash code for each window can be generated. Another solution described herein includes a social group-based hash of the user's behavior history. In addition to the separate hash code, the architecture described herein uses available demographic and social network information to generate a hash code based on a social group. In a particular embodiment, this is accomplished by obtaining a detailed description of a family (e.g., the individuals that make up the family) and a social network and associating them with the family's behavior history. For example, the association is performed using content through a heuristic or deep learning model to generate hash partitions for joint interactions and individual interactions, or to decompose them into different hash codes. Another solution described herein includes location-based hashing of user behavior history. When location information is available, the disclosed system and architecture utilize location information to either generate hash partitions of behavior preferences for user locations or to generate hash codes separately for user behavior history at different locations. Such an architecture also uses a heuristic or deep learning model to cluster these locations based on available tags (such as "home", "grocery store", "restaurant", etc.) using a joint hash code of each tag. Another solution described herein includes activity-based hashing of user behavior history. Using a heuristic or deep learning model, user behavior history is grouped according to the user's activity classification. In a specific embodiment, the disclosed system can generate a hash partition representing the user's activity preference, or can decompose the user behavior history into separate hash codes according to each activity classification. Another solution described herein includes heterogeneous hash codes. In a specific embodiment, each context feature can be trained to contribute to a specific part of the final hash code of each context part. In this case, the hash code may not be required to conform to a fixed length. By comparing corresponding hash bits with different weights (depending on the given context), the similarity between users can be easily measured. Another solution described herein is the storage and update of user behavior history hash codes. The disclosed system and architecture store hash codes for each user in each of the above dimensions, as well as weights associated with these hash codes. In a specific embodiment, the weights can be obtained, for example, from a statistical factor analysis.Systems using the techniques described herein may also store general weights describing the importance of each dimension, which may also be learned from factor analysis. Updates may be made based on the length and magnitude of changes in the user's behavior history. Another solution described herein is to use a user behavior history hash code. In a particular embodiment, retrieval and use are performed by a context-aware decision engine that analyzes the advertising and marketing needs of a marketing client and retrieves the most relevant hash codes for comparison based on, for example, the desired similarity dimensions and the purpose of the retrieval. Such an architecture supports at least three search modes: expansion, refinement, and analysis. The expansion search mode finds a target number of users that are most similar to a "seed" user group. The refinement search mode obtains a "seed" user group and attempts to filter out the noise. For user groups, the analysis search mode describes the statistical properties of their hash codes, such as average similarity, the most important dimensions, relevance, and the like.
[0105] Figure 4A An example architecture of a system 400a for generating and using heterogeneous hash codes according to a particular embodiment is shown. System 400a includes a user behavior data database 410. User behavior database 410 stores information about the user's interaction with various applications, content items, media, websites, and other interactive elements tracked by user devices. User behavior database 410 also stores metadata about those interactions. System 400a includes a context information database 420. Context information database 420 stores any additional data obtained from various devices used by users to interact with media or other items that affect the interaction of a specific user item. As an example and not a limitation, such context information may include the user's demographic distribution (age, gender, income, etc.), location information, time information, device information, and various other suitable context information. System 400a also includes a heterogeneous hash model 430. The heterogeneous hash model 430 described herein is a machine learning model trained to provide a heterogeneous hash code that can implement multiple features of the features of the disclosed system. System 400a includes a heterogeneous hash code database 440. The heterogeneous hash code database 410 stores generated hash codes that capture different levels and aspects of user preferences while maintaining similarities between users. In certain embodiments, the heterogeneous hash code database 440 is organized for fast, on-demand retrieval of heterogeneous hash codes.
[0106] An example application system 450 is also shown as part of the architecture of system 400a. Although only a single application system 450 is shown, the present disclosure contemplates that multiple applications may be used within the system and that multiple applications may be combined with one or more heterogeneous hash code databases 440. The present disclosure will describe a specific instance of a similar extended application, although other suitable applications are also contemplated. Input to application system 450 includes contextual conditions 460. Contextual conditions 460 describe the uniting factors or conditions of the requested new partitioning. Contextual conditions 460 may be specified by a client (or client application) using system 400a. For example, the contextual conditions may specify that the client is searching for a family of four watching a sports game in California. Application system 450 includes application blocks 455. In particular embodiments, application blocks 455 may include programming related to the implementation of the application itself. In FIG. 4A to FIG. 4C In the example shown, the application consists of similar user partition extensions. The problem solved by the application block 455 can be summarized as: given a seed user partition, find the most similar user that is most suitable for advertising targeting. It is conceivable that various other applications that can use hash codes, such as advertising technology, marketing technology, recommendation engines, user profiles, detailed user partitions, bid optimization, tendency prediction, and a variety of other suitable applications. In a specific embodiment, the application block 455 can describe the changes of the application based on the needs of the customer. For example, it can specify that various distance functions (such as Hamming distance) can be used to calculate similar extensions. In a specific embodiment, the application system 450 also receives seed partition 453 as input. The seed partition 453 can change based on the application block 455. In similar modeling, the seed partition 453 can represent a user group that has been selected as a representative of the target partition (for example, by a customer) or has been a target (for example, to be excluded from new users). In a specific embodiment, the output of the application system 450 can also change with the application block 455. For example, in similarity modeling, the output may be an expanded partition 457 (new user partition) that includes users that are most similar to the seed partition based on the target contextual condition 460 .
[0107] Figure 5A method 500 of operating a disclosed system for generating and using heterogeneous hash codes according to one embodiment of the architecture disclosed herein is shown. The method may begin at step 510, where a computing system may receive user behavior data from one or more client devices. For example, the system may receive a record of a user's interaction with an application or an indication that a user has watched a particular video. At step 515, the system may also receive context information associated with the user behavior data. As described herein, the context information may include information such as the time of the interaction, the location of the interaction, the device used for the interaction, demographics associated with the user and the user's family, and the like. At step 520, the system may generate a vector embedding of the user interaction. The result of the embedding process may be a vector representation of the user behavior in the embedding space. At step 525, the system may construct a user representation from the vector representation of the user interaction and the received context information. The user representation may include information about the user's preferences organized in a reasonably human-readable format. The user representation may include a dedicated format to allow the user representation to be used as an input to a hash code generation model (e.g., the heterogeneous hash model 430). In certain embodiments, steps 510-525 involve preprocessing data or constructing inputs to an inference or modeling phase that generates heterogeneous hash codes for all users. At step 530, the system can confirm that the preprocessing step was successful. If it is determined that the processing was unsuccessful, the method can return to step 510 to try again. The processing may be unsuccessful for a variety of reasons, including that the amount of data collected for the user is insufficient, the data may be too sparse to create a meaningful representation, or a variety of other reasons. If it is determined that the processing was successful, the method can proceed to step 535.
[0108] In step 535, the system may use the heterogeneous hash model 430 to generate a heterogeneous hash code based on the user representation. This process may be referred to differently as model inference, as further described herein, because the heterogeneous hash model 430 may be a machine learning model that has been trained to generate heterogeneous hash codes. The generated hash code may be configured to maintain information about the user's activity data and the contextual information required to calculate the similarity of the user in behavior and context. In a particular embodiment, the generated hash code may not maintain the exact history of the behavior and context. In this way, the hash code can be much smaller than the original data they encode, and therefore faster to compare. In step 540, the system may evaluate the generated hash code to confirm that the hash code has been successfully created. Step 540 may include confirming that the hash code complies with rules related to formatting, data organization, error checking, and other related requirements. These requirements may be pre-specified by the system or application system for which the heterogeneous hash model 430 generates the hash code. Steps 535 and 540 are together responsible for generating hash codes for user data and context information.
[0109] In a particular embodiment, steps 545-575 may be performed in part or in whole by an application system (e.g., application system 450) using heterogeneous hash codes. At step 545, application system 450 may receive a seed partition of a user. The seed partition of a user may be a set of users selected by application system 450 or its user as a representative of the user group of the extension that the user wants to identify. In a particular embodiment, the seed partition may include users who have received ad targeting or users who have been identified as successful matches for similar extensions. At step 550, application system 450 may receive contextual conditions 460 that the user of application system 450 desires to target. At step 555, application system 450 may obtain a seed hash code from heterogeneous hash code database 440 based on the received seed partition 453 and contextual conditions 460. Because, as described herein, heterogeneous hash codes are stored in a manner that allows application system 450 to retrieve only the most relevant hash codes based on contextual conditions 460, even if seed partition 453 is the same, application system 450 may retrieve different heterogeneous hash codes for varying contextual conditions 460. Therefore, the retrieval of the correct heterogeneous hash code is the main component to achieve hash code comparison acceleration, which is a technical advantage of the described technology.
[0110] At steps 560 and 565, the application system 450 may execute the application for which the heterogeneous hash code has been retrieved. For example, the application system 450 may perform a similar extension. At step 560, the application system 450 may compare the hash codes of various users that are not in the seed partition 453 to retrieve the seed heterogeneous hash code retrieved from the heterogeneous hash code database 440. In a specific embodiment, the comparison may include calculating the distance between the heterogeneous hash codes in the embedding space. The heterogeneous hash model 430 may have generated heterogeneous hash codes, which is trained to generate similar heterogeneous hash codes when the underlying user activity data is similar, and to generate dissimilar heterogeneous hash codes when the underlying user activity data is dissimilar. Therefore, the distance between the two heterogeneous hash codes roughly reflects the difference between the underlying user activity data. At step 565, the application system 450 may retrieve the user that is most similar to the user in the seed partition 453. The most similar user may be a user whose corresponding heterogeneous hash code is closest to the seed heterogeneous hash code in the embedding space. In certain embodiments, the application system 450 may identify all users within a threshold distance. In certain embodiments, the application system 450 may identify a threshold number of users, such as the fifty closest users.
[0111] In certain embodiments, the application system 450 may be configured to make a novelty determination about the retrieved user. For example, at step 570, the application system 450 may compare the retrieved user partitions with the user's seed partitions to determine whether the retrieved partitions have a sufficient number of users or whether the retrieved user partitions meet a threshold similarity. The application system 450 may determine that the retrieved user partitions have too high an overlap with the user's seed partitions and proceed to step 555, where the application system 450 may identify additional heterogeneous hash codes to be compared with the user's seed partitions. If the application system 450 determines that the retrieved user partitions meet the threshold, the application system 450 may proceed to step 575, where the application system 450 aggregates a set of user partitions (e.g., including or excluding seed partitions as appropriate) and prepares an expanded user partition to return to the user of the application system 450.
[0112] In certain embodiments, the process of comparing users can rely on a weight matrix. As described herein, the process of generating heterogeneous hash codes can result in hash codes having substantially similar hash values for specific context information and substantially dissimilar hash values for other context information. A system or application system that compares hash values can be configured to weight specific portions of the hash code comparison according to a weighting matrix that identifies a portion of the hash code (e.g., specific context information) that is important in identifying, for example, similar user partitions. When generating heterogeneous hash codes, a weighting matrix can also be used as a method to speed up comparisons. The weights stored in the weighting matrix can be machine-learned or based on heuristic values, depending on the knowledge-based methods available to the operator of the system or application system.
[0113] Figure 7An example architecture 700 of a heterogeneous hashing model is shown. An input layer 710 includes pre-processed data, such as general behavior data 711 (e.g., retrieved from a user behavior data database 410) and various context information 713a-713c (e.g., retrieved from a context information database 420). In this example, the pre-processed data may be considered only for a single user, for illustration purposes only. The same architecture may be used to process user activity data for multiple users in parallel. Data may be passed to various structures in the architecture substantially simultaneously. For example, general behavior data 711 may be passed to a trainable gate 725a specifically set up for general behavior data 711. Trainable gate 725a may be just one component of a trainable gate layer 720 that constitutes the architecture. Trainable gate layer 720 may be considered to include multiple other trainable gates 725b-725d, each of which corresponds to one input stream (e.g., one for each type of context information 713a-713c). The general behavior data 711 may also be passed to various other trainable gates 725b-725d. As further described below, each gate 725a-725d may receive data from each type of input as a method of identifying and implementing internal relationships of the data (i.e., the impact of each context collected in the data on the user activity data and other contextual data). The general behavior data 711 may also be passed to an aggregation block 735a of an aggregation layer 730 of the network architecture. The aggregation layer 730 may also include multiple other aggregation blocks 735b-735d, each other aggregation block 735b-735d corresponding to an input stream (e.g., there is one other aggregation block for each type of context information 713a-713c). The general behavior data 711 may also be passed to a category-aware attention (CAA) block 745a of a network layer 740 of the network architecture. The network layer 740 may also include multiple other CAA blocks 745b-745d, each corresponding to one input stream (e.g., one for each type of context information 713a-713c). The same data arrangement through the model architecture 700 may be used for each of the context information data types 713a-713c. For example, context information 1 data 713a may be passed to each of the trainable gates 725a-725d, the context information 1 aggregation block 735b, and the CAA block 745b.
[0114] In a particular embodiment, each gate of the trainable gate layer 720 considers all behaviors and contextual information and selects among them accordingly. Gates 725a-725d select among the data by applying learned weights to the values of the data, because the learned weights will be reflected in the data that is ultimately maintained in the hash code component. The weights can be learned by backpropagation of values or other suitable neural network training techniques. The purpose of training can be to cause the gate to emphasize contextual data that has a significant impact on the values of the behavioral data 711 and the specific contextual information data associated with the trainable gate. For example, if the gate is weighting the value of contextual information related to the device used, the gate can emphasize the value of location (because the home TV device may be highly correlated with the interaction at the home location) and de-emphasize the value of age demographic information because the use of the home TV device may not be highly correlated with age).
[0115] Figure 8 A detailed diagram of a single trainable gate 800 (e.g., gates 725a-725d) is shown. The trainable gate 800 receives multiple data sources as inputs 810a-810c, applies weights 815a-815c to each input 810a-810c, and combines the weighted values into a single output value 820. The output value 820 can be a weighted sum of the inputs 810a-810c. The weights applied by the trainable gate 800 are determined by stochastic gradient descent. Conceptually, in certain embodiments, the values of the weights can be learned based on the amount of change in the data to which the weights are applied. For example, in a case where the value of the temporal context information varies greatly, while the value of the location context information does not vary much, the gate 800 can give a greater weight to the time value. The weight values can be learned for the entire system and stored in a global weight matrix. In certain embodiments, weights can be learned for independent contexts (e.g., the temporal context can have a different weight value than the location context). The weights are used to influence the representation of context information in the embedding space.
[0116] Fig. 9 A detailed diagram of a single block 900 (e.g., aggregation blocks 735a-735d) of the aggregation layer is shown. In certain embodiments, the aggregation block 900 receives multiple inputs 910a and 910b and adds them together to generate an output 920 of the aggregation block 920. In certain embodiments, the output 920 can be the result of a weighted sum of the inputs 910a and 910b with learned weights. The outputs of the trainable gate layer 720 and the aggregation layer 730 constitute the inputs of the network layer 740.
[0117] Fig.10 It shows that Figure 7Another arrangement of the example architecture 700 of a heterogeneous hashing model is shown in FIG. Fig.10 The elements of the network layer 740 are expanded, showing two sub-layers of the network layer 740: the attention layer 1000 and the embedding layer 1010. The data from the input layer 710 is received as sequential data (e.g., user_id, item_id) associated with context information (e.g., user_id, item_id). Figure 7 As shown). The polymer layer 730 is Figure 7 The output of the gate layer 720 shown. Note that the aggregation layer maintains the internal relationship information of the general behavior data 711 and the context information 713a-713c through a weighting system. The internal relationship information records the impact of one type of context information measured on another type of context information. Blocks 1005a-1005d of the attention layer 1000 can receive inputs from blocks 1015a-1015h of the embedding layer 1010 and the aggregation layer 730. The embedding layer 1010 presents a representation of the output of the general behavior data 711 and the context information 713a-713c in the embedding space. The blocks of the attention layer 1000 mark the importance of each data item in the embedding layer 1010 and the aggregation layer 730. The output of the attention layer blocks 1005a-1005d are the general behavior hash code portion 750 and the context information hash code portion 755a-755c. Each attention layer block is trained to generate a corresponding hash code portion. For clarity, the attention layer 1005a for general behavior data is trained to generate general behavior hash codes 750, etc.
[0118] Fig.11 An example of the preprocessing steps and network layer 740 is shown. For simplicity, Fig.11 Only one example of a method of preprocessing item history with contextual information is shown, and the present disclosure contemplates other methods. The purpose of the preprocessing step is to prepare the data for embedding and processing by the attention layer 1000. Fig.11 Various content items 1110a-1110f with which the user has interacted are shown, along with categories 1120a-1120f of the items. Categories 1120a-1120f may be examples of the type of contextual information recorded with each item interaction. Items 1110a-1110f are organized along timeline 1100 so that items that appear to the left of another item are interacted with first. For example, the user interacted with item 1110b before interacting with item 1110d. Additionally, Fig.11is divided into two halves. The upper half shows the organization of items 1110a-1110f before the preprocessing step occurs (for example, because items 1110a-1110f can be organized in the user behavior data database 410). The lower half shows the organization of items 1110a-1110f after the preprocessing step occurs. The system first sorts the items 1110a-1110f and the associated context information 1120a-1120f in chronological order. Next, items 1110a-1110f are grouped according to their context information. For example, items 1110a-1110f are grouped according to the categories 1120a-1120f they declare. Each item associated with a particular context is represented by (1130a-1130b) represents, where G is a group, i is the index of the group, j is the index of the item in the i-th group, and U represents a user.
[0119] Through this formalized grouping, the operation of the attention layer 1000 can be formally stated. As previously described, the attention layer 1000 captures the internal relationships between all items found in a given context information classification. According to the embedding layer 1010 grouped according to each context (e.g., category), the internal relationship is captured in each item embedding 1015a-1015h. In a specific embodiment, some user-item interactions can expand or contract (e.g., the weights attached to the influence on the user-item interaction can be adjusted). The output of the attention layer 1000 is regarded as a representation of the user's sequential behavior reflecting the influence on other items in the given preference context information. As described above, the attention layer 1000 can be formulated as follows: Let H_i be a matrix composed of the embedding output sequence of the items grouped by the context information i of each user, where G and U represent the context group and the user group respectively (Equation 1). A nonlinear activation function is applied to H_i (Equation 2). T_i represents the number of items ordered in the i-th context (Equation 3). The representation r_i of the sequence is formed by the weighted sum of these output vectors (Equation 4). After obtaining the attention of each context using Equation 4, r_i is added together to retrieve the user embedding (Equation 5). In certain embodiments, the operation of Equation 5 can be partially replaced to other layers. Algorithm 1 provided above shows the pseudo code of the attention operation.
[0120] Figure 12A-Figure 13B Shown by Figure 7-10 A detailed example of the operations performed by each layer of the illustrated architecture 700. The example includes preparing a heterogeneous hash code based on user behavior data captured for a user designated as "u1". Figure 12A-12BThe input and output of the input layer 1220 and the embedding layer 1230a-1230b are shown. Table 1210 represents user behavior data received from various user devices, which is related to the activities of u1. The user behavior data can be stored in the user behavior data database 410 until the information is retrieved for processing by the heterogeneous hash model 430. The user behavior data has been organized in chronological order, and the user behavior data that first appears in the table involves early interactions with a specific item. The table is organized as follows: the table presents the identifier of the user (in this example, all interactions are performed by the same user u1, however, in practice, the activities of multiple users can be recorded); the table records the identifiers of the items with which the user has interacted (e.g., i1, i2, etc.); the table then records the various contexts associated with the interaction. The specific context available may depend on, for example, the type of interaction, the type of item interacted with, the device recording the interaction, etc. In Table 1210, the recorded interaction includes context 1 (location of the interaction), context 2 (approximate time of the interaction), context 3 (application recording the interaction), context 4 (operating system of the device recording the interaction), context 5 (model identifier of the device recording the interaction), and context 6 (placeholder for additional context information).
[0121] Through input layer 1220 (e.g., input layer 710), data is grouped based on the context to be processed. Thus, in certain embodiments, behavioral data (e.g., items interacted with) or pointers may be processed together with context data items. The above reference may be substantially as described above. Fig.10 The grouping may be performed using the techniques described in . For example, if not all contexts are needed to process heterogeneous hash codes for a particular customer application, not all contexts may be grouped. In this example, the items in table 1210 are grouped into context 1 1225a, context 2 1225b, and context 3 1225c.
[0122] Next, embedding is generated for each item in each specific context group through embedding layer 1230a (e.g., embedding layer 1010). Fig. 12A As shown, embeddings 1235-1a to 1235-1f are generated for each item in context 1 1225a. Fig. 12BAs shown, embeddings 1235-2a to 1235-2f are generated for each item in context 2 1225c. In a particular embodiment, the embedding may include a real-valued vector of a given dimension. The dimension may be specified by a heterogeneous hash model or an application system that will use the hash code. Note that in this example, the embedding is generated only for the value of the context item itself, so all item interactions occurring at the same location will have similar embeddings generated. Therefore, there will be four identical embeddings 1235-1a, 1235-1c, 1235-1d, and 1235-1f generated for four interactions associated with the "living room" context value, and there will be two unique embeddings generated for the other two interactions associated with the "family room" context value 1235-1b and the "bedroom" context value 1235-1e. Generate embeddings so that similar context values will have similar context embeddings (e.g., similar context values have embeddings that are close to each other in the embedding space). Thus, in the example of context 11225a, the embeddings for the "living room" items (1235-1a, 1235-1c, 1235-1d, and 1235-1f) would be closer to the embedding for the "family room" item (1235-1b) than to the "bedroom" item (1235-1e) because, heuristically, living rooms are more similar to family rooms than bedrooms are. Fig. 12B In the example embedding shown in , there is a unique embedding 1235-2b generated for the "Saturday night" context item, a common embedding generated for each "Sunday morning" context item 1235-2a and 1235-2f, a unique embedding 1235-2e generated for the "Sunday night" context item, and a common embedding generated for each "Monday night" context item 1235-2c and 1235-2d. The embeddings are generated so that similar context values will have similar context embeddings. Therefore, in the example of context 2 1225b, the embedding of the "Saturday night" item (1235-2b) will be closer to the embedding of the "Sunday night" item (1235-2e) than the "Monday night" item (1235-2c and 1235-2d) because, in a heuristic sense, Saturday night is more similar to Sunday night than Monday night. Embeddings can be generated from a learnable training process and provided from, for example, a deep learning framework.
[0123] Figure 13A-13B The inputs and outputs of the embedding layer 1230 , aggregation layer (eg, aggregation layer 730 ), attention layer 1300 , fully connected layer 1320 , and sign function 1330 are shown. Figure 13A-13B continue Figure 12A-12B. For each context, the embedding generated each time in the table is passed to the attention layer together with the embedding from the aggregation layer (e.g., 730). The value from the aggregation layer 730 includes an aggregation of the value from the corresponding trainable gate and the value context information embedding using a weighted and combined method. For example, for context 1, embeddings 1235-1a to 1235-1f are passed to the attention layer 1300. In the attention layer 1300, the embedded values are also associated with weights 1303-1a to 1303-1c corresponding to the specific decisive influence of the value. For example, in some embodiments, the embeddings 1235-1a, 1235-1c, 1235-1d, and 1235-1f generated for the living room context item can all be associated with weights W1 1303-1a. The embedding 1235-1b generated for the family room context item can be associated with weights W2 1303-1b. The embedding 1235-1c generated for the bedroom context item can be associated with the weight W3 1303-1c. The aggregate embedding 1305a can also be passed to the attention layer 1300 together with the weight W4 1307a. In a particular embodiment, the weights 1303-1a to 1303-1c and 1307a can be generated by the attention layer 1300. The weights can be recorded as a weight matrix. The weights can be learned weights generated from a machine learning model (such as a gradient descent process). Once the weights are stable, the output of the attention layer 1300 is passed to the fully connected layer 1320, which can be divided into multiple blocks or stages 1323 and 1325. The output of the fully connected layer 1320 can be passed to the symbol function 1330. The symbol function 1330 can evaluate the components of the output of the fully connected layer 1320 and determine, for example, whether each component meets a specific threshold and determines the value in the hash code 1340a of the context. For values that meet the threshold, the sign function 1330 may assign a value in the hash code 1340a of 1, and for values that do not meet the threshold, the sign function 1330 may assign a value in the hash code 1340a of 0. The result is the hash code 1340a for context 1.
[0124] For the example of context 2, embeddings 1235-2a to 1235-2f are passed to the attention layer 1300. In the attention layer 1300, the embedded values are also associated with weights 1303-2a to 1303-2d corresponding to the specific decisive influence of the value. For example, in some embodiments, the embeddings 1235-2a and 1235-2e generated for the Sunday morning context item can both be associated with weight W1 1303-2a. The embedding 1235-2b generated for the Saturday evening context item can be associated with weight W3 1303-2c. The embeddings 1235-2c and 1235-2f generated for the Monday evening item can be associated with weight W4 1303-2d. The embedding 1235-2d generated for the Sunday evening context item can be associated with weight W2 1303-2b. The aggregate embedding 1305b can also be passed to the attention layer 1300 together with weight W5 1307b. The attention layer can be described according to the architecture and formalism provided above (e.g., equations (4) and (5) and Fig.10 ) generates an output. Note that the output of layer 1300 is passed to a fully connected layer 1320, which can be divided into multiple blocks or stages 1323 and 1325. The output of fully connected layer 1320 can be passed to a sign function 1330. Sign function 1330 can evaluate the components of the output of fully connected layer 1320 and determine, for example, whether each component meets a specific threshold and determines the value in a hash code 1340b of the context. The output of sign function 1330 is a hash code 1340a for context 1. In certain embodiments, fully connected layer 1320 and sign function 1330 can be substantially similar in various contexts, or can vary based on the type of context and the impact of the context on the similarity prediction ability of the hash code.
[0125] A hash code 1340a-1340b is generated for each context or each substantial context associated with each user in the data set. Fig.14 As shown, the result is a sequence of hash code portions 1410a-1410d. The number of hash code portions 1410a-1410d can naturally vary based on the number of contexts being evaluated. Each hash code portion 1410a-1410d forms part of a heterogeneous hash code for the user. After all hash codes have been generated, these hash codes are combined (e.g., by concatenation) to generate a complete heterogeneous hash code 1400. Although the portions of the heterogeneous hash code 1400 shown are all of the same length, it is conceivable that the size of the hash code for each context can be variable. Heterogeneous hash codes 1400 can be generated for each user whose activities are stored in the user activity database in substantially the same manner.
[0126] Variable hash code sizes can be achieved by using a configuration file that specifies the length of each context part of the heterogeneous hash code. Fig.17 An architectural representation 1700 of a hash system and application is shown. The system can be combined with the use of a configuration file 1710. As shown, the configuration file includes at least an identifier of a context (e.g., context 1, context 2 ...) and a bit range of a heterogeneous hash code 1400 associated with each context. The configuration file can also specify the starting bit position and length of each hash code (or hash code portion). The configuration file can be specified by various components of the system or by a user of the system (including an application customer or administrator). The configuration file 1710 can be passed to or accessed by a model training module 1720 of the system. In this case, the model training module 1720 can include any part of the architecture involved in the model training for generating heterogeneous hash codes. The model training module 1720 can use the configuration file 1710 to enable the model 1730 to generate only heterogeneous hash codes (e.g., hash code portions) that meet the configuration file 1710. For example, a generated hash code that does not meet the requirements of the configuration file 1710 can be directly rejected by the training module 1720. The model training module 1720 can generate a heterogeneous hash model 1730. Although the model 1730 may not necessarily have direct access to the configuration file 1710, it still conforms to the configuration file 1710 in its training nature. In addition, the configuration can be implicitly used by the model inference module 1740 of the architecture. The model inference module 1740 represents the part of the architecture responsible for generating the heterogeneous hash code 1400 that is ultimately stored in the heterogeneous hash code database 440. The configuration file 1710 can also be used (or specified) by the application 455 to rely on the heterogeneous hash code. For example, the application 455 can use the configuration file 1710 to specify which parts of the heterogeneous hash code 1400 are retrieved from the heterogeneous hash code database 440 when the application 455 is running (for example, when a similar extension application checks hash code similarity).
[0127] Fig.18An example framework 1800 for training a heterogeneous hash model 1840 is shown. The framework 1800 is configured to train the model 1840 in a parallel or Siamese manner, wherein the training input includes activity data and contextual information about two users, and the training is performed based on a determination of user similarity or dissimilarity as a function of cross entropy and loss reduction relative to a reference standard (groundtruth). Information about two users 1810a and 1810b is provided to input modules 1820a and 1820b, respectively. Contextual information 1830a and 1830b associated with each user is also provided to the corresponding input modules 1820a and 1820b. In a particular embodiment, the input modules 1820a and 1820b may perform preprocessing of the data to generally prepare the data for reception by the heterogeneous hash model 1840. The preprocessing may be similar to the method described above. In a particular embodiment, data can be provided to the model 1840 in two pipelines so that the same model 1840 effectively processes the information of two users 1810a and 1810b at the same time. First, the corresponding network layers 1843a and 1843b of the model 1840 receive input. The network layer can be substantially similar to the network layer of the above-mentioned architecture. The output of the network layer 1843a and 1843b can be passed to the corresponding binary hash layers 1845a and 1845b of the heterogeneous hash model 1840. The binary hash layers 1845a and 1845b can generate hash codes including binary comparison data. The output of the binary hash layers 1845a and 1845b can be provided to the comparator 1850, which evaluates whether the user will be determined to be similar or dissimilar based on the binary hash generated by the model 1840. The result of the comparator 1850 can be compared with the reference standard value, and the result of the final comparison can be used to correct the model 1840. The nature of the correction can be based on the underlying machine learning process used to construct 1843a and 1843b and the binary hashing layers 1845a and 1845b. Different deep neural networks can be applied to the network layers 1843a and 1845b, such as the described CAA network and TAACNN.
[0128] Figure 4BAnother example architecture of a system 400b for generating and using heterogeneous hash codes according to certain embodiments is shown. System 400b includes multiple heterogeneous hash code generation and storage systems operating in parallel, wherein hash codes are separated based on the type of context information before generating context hash codes. Thus, the output hash codes are context hash codes that can be combined in a variety of ways to construct heterogeneous hash codes. One advantage of this embodiment is that for application clients who wish to target only specific types of context information, they do not need to manage or retrieve unnecessary context information. Therefore, in certain embodiments, system 400b can operate more efficiently for certain clients.
[0129] System 400b includes multiple user behavior data databases 410a-410b. User behavior databases 410a-410b store information about the interaction of users with various applications, content items, media, websites and other interactive elements tracked by user devices. User behavior databases 410a-410b further store metadata about those interactions. System 400b includes multiple context information databases 420a-420b. Context information databases 420a-420b store any additional data obtained from various devices used by users to interact with media or other items that affect the interaction of specific user items. As an example and not a limitation, such context information may include the demographic distribution of users (age, gender, income, etc.), location information, time information, device information and various other suitable context information. When receiving information from various devices, the system can be combined with a module to separate user behavior data and context information based on context type. System 400b also includes multiple heterogeneous hash models 430a-430b. The heterogeneous hash models 430a-430b can be substantially similar to the heterogeneous hash model 430 described herein. The heterogeneous hash models 430a-430b can be specifically trained to generate heterogeneous hash codes based on a specific type of context information that the hash pipeline has been assigned. The system 400c includes a plurality of heterogeneous hash code databases 440a-440b to store generated hash codes that capture different levels and aspects of user preferences while maintaining similarities between users. The application system 450 and related components can be substantially similar to the above referenced system 400c. Figure 4A As described, among other things, it is configured to retrieve information from a plurality of heterogeneous hash code databases 440a-440b.
[0130] Fig.15Hash codes that can be generated by a system 400b that combines multiple context information specific hash pipelines are shown. The example shown includes preparing heterogeneous hash codes based on user behavior data captured for a user designated as "u1". Tables 1500a-1500b represent user behavior data received from various user devices, which are related to the activities of u1. The user behavior data can be stored in multiple user behavior data databases 410a-410b until the information is retrieved for processing by heterogeneous hash models 430a-430b. The user behavior data has been organized in chronological order, and the user behavior data that first appears in tables 1500a-1500b involves early interactions with specific items. The table is organized as follows: the table presents the identifier of the user (in this example, all interactions are performed by the same user u1, however, in practice, the activities of multiple users can be recorded); the table records the identifiers of the items with which the user has interacted (e.g., i1, i2, etc.); the table then records the various contexts associated with the interaction. The specific contexts available may depend on, for example, the type of interaction, the type of item being interacted with, the device recording the interaction, etc. In table 1500a, the recorded interactions include context 1 (location of the interaction), context 3 (application recording the interaction), context 4 (operating system of the device recording the interaction), context 5 (model identifier of the device recording the interaction), and context 6 (placeholder for additional context information). In table 1500b, the recorded interactions include context 2 (approximate time of the interaction), context 3 (application recording the interaction), context 4 (operating system of the device recording the interaction), context 5 (model identifier of the device recording the interaction), and context 6 (placeholder for additional context information). For both tables 1500a and 1500b, contexts 3-6 may be referred to as general behavior data because the information therein is recorded and stored with two contexts and can therefore be used to influence the hash codes generated by the heterogeneous hash models 430a-430b, respectively.
[0131] Hash codes can be generated substantially according to the techniques described herein, but it should be noted that the resulting heterogeneous hash codes are limited to being affected by only one specific context at a time. The generated hash codes 1510 and 1520 may include two components: a first component in which the hash code encodes the value of the context type, and a second component in which the hash code is based on general behavior data. For example, hash code 1510 is generated based on context 1 1505 (position context). Hash code 1510 includes a first component 1515 based on position 1505 and a second component 1519 based on general behavior data 1509. Hash code 1520 is generated based on context 2 1507 (time context). Hash code 1520 includes a first component 1525 based on time 1507 and a second component 1529 based on general behavior data 1509. Note that since the general behavior data hash code is partially affected by the context information shown in Tables 1500a and 1500b, their original values are usually different even if the same general behavior data is used. Hash codes 1510 and 1520 can be combined in various ways to form a user's heterogeneous hash code. A first heterogeneous hash code 1530a is organized in which each complete hash code portion is concatenated together. A second hash code 1530b is organized in which the context-based portion is concatenated first and the general behavior-based portion is concatenated second. The arrangement of the heterogeneous hash codes can be specified in a configuration file.
[0132] Figure 4C Another example architecture of a system 400c for generating and using heterogeneous hash codes according to a particular embodiment is shown. System 400c includes a user behavior data database 410. User behavior database 410 stores information about a user's interactions with various applications, content items, media, websites, and other interactive elements tracked by a user device. User behavior database 410 also stores metadata about those interactions. System 400c includes a context information database 420. Context information database 420 stores any additional data obtained from various devices used by users to interact with media or other items that affect the interaction of a particular user item. By way of example and not limitation, such context information may include the user's demographic distribution (age, gender, income, etc.), location information, time information, device information, and various other suitable context information.
[0133] System 400c also includes a context decomposition module 460. Context decomposition module 460 can be configured to decompose user behavior data into context-specific behaviors. For example, instead of treating the record of the interaction as dependent on each piece of context information, context decomposition can group specific interactions as being related because of their context information. In a particular embodiment, grouping can be performed by aggregation or machine learning via clustering. Context decomposition module 460 decomposes user behavior data (e.g., retrieved from user behavior database 410) and context information 420 into context-specific behaviors 470. Context-specific behaviors 470 can be organized into their context partitions based on their associated context tags. Based on context-specific behaviors 470, one or more multi-hashing and storage methods can be used to convert context-specific behavior partitions into efficient hash codes.
[0134] An example application system 450 is also shown as part of the architecture of system 400c. Application system 450 may be substantially similar to the above referenced Figure 4A The application system 450 is described except that the application system 450 is configured to use context-based hash codes.
[0135] Fig.16 A hash code that can be generated by system 400c incorporating a context decomposition model prior to hashing is shown. The example shown includes preparing a heterogeneous hash code based on user behavior data captured for a user designated as "u1". Table 1600 represents user behavior data received from various user devices, which is related to the activities of u1. The user behavior data has been organized in chronological order, and the user behavior data that first appears in table 1600 relates to early interactions with a particular item. The table is organized as follows: the table presents an identifier of the user (in this example, all interactions are performed by the same user u1, however, in practice, the activities of multiple users can be recorded); the table records the identifiers of the items with which the user has interacted (e.g., i1, i2, etc.); the table then records the various contexts associated with the interaction. The specific context available may depend on, for example, the type of interaction, the type of item interacted with, the device on which the interaction was recorded, etc. In table 1600, the recorded interaction includes context 1 (location of the interaction), context 2 (approximate time of the interaction), context 3 (application recording the interaction), context 4 (operating system of the device recording the interaction), context 5 (model identifier of the device recording the interaction), and context 6 (placeholder for additional context information). Contexts 3-6 may be referred to as general behavioral data because the information therein is recorded and stored with all contexts. System 400c has been configured not to perform context resolution with respect to these contexts.
[0136] Hash codes can be generated substantially according to the techniques described herein, but it should be noted that the resulting heterogeneous hash codes are generated to combine information about context decomposition. In order to perform context decomposition, the context decomposition module 460 (or other responsible modules in some embodiments) selects the specific context type according to which the decomposition will occur. In this example, the decomposition will be based on context 1 (the location of the interaction). The context decomposition module 460 identifies various values associated with context 1 1605 (e.g., "family room", "living room", and "bedroom") in the user behavior database 410. The hash specific behavior module 470 (or other responsible modules in some embodiments) groups the interaction records based on the values associated with context 1. For example, all records associated with the "family room" value are grouped, all records associated with the "living room" value are grouped, and all records associated with the "bedroom" value are grouped. Then, the multi-hash and storage module 480 uses these grouped values to generate the hash code portion (e.g., these grouped values can be used as input to the heterogeneous hash model).
[0137] The generated hash codes 1610, 1620, and 1630 may include two components: a first component in which the hash code encodes the context type value 1605, and a second component in which the hash code is based on general behavior data (e.g., the remaining context value). For example, hash code 1610 is generated based on a "living room" value. Hash code 1610 includes a first component 1615 that encodes the "living room" value and a second component 1619 that is based on general behavior data. Hash code 1620 is generated based on a "bedroom" value. Hash code 1620 includes a first component 1625 that encodes the "bedroom" value and a second component 1629 that is based on general behavior data. Hash code 1630 is generated based on a "family room" value. Hash code 1630 includes a first component 1635 that encodes the "family room" value and a second component 1639 that is based on general behavior data. Hash codes 1610, 1620, and 1630 can be combined in various ways to form heterogeneous hash codes for a specific context of a user. A first heterogeneous hash code 1630a is organized, where each complete hash code portion is concatenated together (e.g., the entirety of hash codes 1610, 1620, and 1630 is concatenated). A second hash code 1630b is organized, where the context-based portion is concatenated first, and the general behavior-based portion is concatenated second (e.g., portions 1615, 1625, and 1635 are concatenated first, and portions 1619, 1629, and 1639 are concatenated second). The arrangement of heterogeneous hash codes can be specified in a configuration file. The generated hash codes can then be stored in association with the user. The system can generate multiple hash codes based on different context values (e.g., for location, time, demographics). The system can combine (e.g., concatenate) multiple hash codes into a single hash code for a user.
[0138] Figure 6A method 600 of operating a disclosed system for generating and using heterogeneous hash codes according to one embodiment of the architecture disclosed herein is shown. The method 600 may include a process for use with a system configured similar to the system architecture 400c incorporating context decomposition. The method 600 may begin at step 610, where a computing system receives user behavior data from one or more client devices. For example, the system may receive a record of a user's interaction with an application or an indication that a user has watched a particular video. At step 615, the system may also receive context information associated with the user behavior data. As described herein, the context information may include information such as the time of the interaction, the location of the interaction, the device used for the interaction, demographics associated with the user and the user's family, and the like. At step 620, the system may filter user behavior and context information based on a particular context. The system may also filter user behavior based on a particular value of the context. In a particular embodiment, the system may filter user behavior using a context decomposition module 460 and a context-specific behavior module 470. In one example, as described above, the system may filter user behavior based on location, and further filter data based on a particular location value. In certain embodiments, steps 610-620 may be viewed as involving preprocessing data or constructing inputs to an inference or modeling phase that generates heterogeneous hash codes for all users. At step 625, the system may confirm that the preprocessing step was successful. If it is determined that the processing was unsuccessful, the method may return to step 610 to try again. The processing may be unsuccessful for a variety of reasons, including that the amount of data collected for the user is insufficient, the data may be too sparse to create a meaningful representation, or a variety of other reasons. If it is determined that the processing was successful, the method may proceed to step 630.
[0139] In step 630, the system may use the heterogeneous hash model 430 to generate a heterogeneous hash code based on the filtered data. In a particular embodiment, the system may use a multi-hash and storage module 480. The heterogeneous hash model 430 may be incorporated into the multi-hash and storage module 480. This process may be referred to differently as model inference because, as further described herein, the heterogeneous hash model 430 may be a machine learning model that has been trained to generate a heterogeneous hash code. The generated hash code may be configured to maintain information about the user's activity data and the contextual information required to calculate the user's similarity in behavior and context. In a particular embodiment, the generated hash code may not maintain the exact history of the behavior and context. In this way, the hash code can be much smaller than the original data they encode, and therefore faster to compare. In step 635, the system may evaluate the generated hash code to confirm that the hash code has been successfully created. Step 635 may include confirming that the hash code complies with rules related to formatting, data organization, error checking, and other related requirements. These requirements may be pre-specified by the system or application system for which the hash code is generated. Steps 630 and 635 together are responsible for generating hash codes for the user data and context information.
[0140] In a particular embodiment, steps 640-675 may be performed in part or in whole by an application system (e.g., application system 450) using a heterogeneous hash code. In step 640, application system 450 may receive a seed partition of a user. The seed partition of a user may be a set of users selected by application system 450 or its user as a representative of the extended user group that the user wants to identify. In a particular embodiment, the seed partition may include users who have received ad targeting or users who have been identified as successful matches for similar extensions. In step 645, application system 450 may receive contextual conditions 460 that the user of application system 450 desires to target. In step 650, application system 450 may decompose the seed partition using the contextual condition information received in the previous partition. This may include decomposing the seed partition data based on the target condition. Application system 450 may perform decomposition in a manner similar to the way context decomposition module 460 decomposes user behavior data 410. In a particular embodiment, application system 450 may combine context decomposition module for this purpose. At step 655, the application system 450 may obtain a seed hash code from the multi-hash and storage module 470 based on the decomposed seed partition 453 and the contextual condition 460. In certain embodiments, the seed partition may require performing multi-hashing on the decomposed behavior to generate the seed hash code without pre-preparing the decomposed seed hash code. As described herein, because the heterogeneous hash codes are stored in a manner that allows the application system 450 to retrieve only the most relevant hash code based on the contextual condition 460, the application system 450 may retrieve different heterogeneous hash codes for the varying contextual condition 460 even if the seed partition 453 is the same. Therefore, the retrieval of the correct heterogeneous hash code is a major component of achieving hash code comparison acceleration, which is a technical advantage of the described technology.
[0141] In steps 660 and 665, the application system 450 may execute the application for which the heterogeneous hash code has been retrieved. For example, the application system 450 may perform a similar extension. In step 660, the application system 450 may compare the decomposed hash codes of various users that are not in the seed partition 453 with the seed heterogeneous hash code. In a specific embodiment, the comparison may include calculating a bit-by-bit comparison or distance between the heterogeneous hash codes in the embedding space. The heterogeneous hash model 430 may have generated heterogeneous hash codes, which is trained to generate similar heterogeneous hash codes when the underlying user activity data is similar, and to generate dissimilar heterogeneous hash codes when the underlying user activity data is dissimilar. Therefore, the distance between the two heterogeneous hash codes roughly reflects the difference between the underlying user activity data. In step 665, the application system 450 may retrieve the user that is most similar to the user in the seed partition 453. The most similar user may be a user whose corresponding heterogeneous hash code is closest to the seed heterogeneous hash code in the embedding space. In a specific embodiment, the application system 450 may identify all users within a threshold distance. In certain embodiments, the application system 450 may identify a threshold number of users, such as fifty closest users. The application system 450 may hash the users into buckets and use distance calculations, using contextual conditions as filters to rank general users.
[0142] In certain embodiments, the application system 450 may be configured to make a novelty determination about the retrieved user. For example, at step 670, the application system 450 may compare the retrieved user partitions with the user's seed partitions to determine whether the retrieved partitions have a sufficient number of users or whether the retrieved user partitions meet a threshold similarity. The application system 450 may determine that the retrieved user partitions have too high an overlap with the user's seed partitions and proceed to step 655, where the application system 450 may identify additional hash codes to be compared with the user's seed partitions. If the application system 450 determines that the retrieved user partitions meet the threshold, the application system 450 may proceed to step 675, where the application system 450 aggregates a set of user partitions (e.g., including or excluding seed partitions as appropriate) and prepares an expanded user partition to return to the user of the application system 450.
[0143] In certain embodiments, the process of comparing users can rely on a weight matrix. As described herein, the process of generating heterogeneous hash codes can result in hash codes having substantially similar hash values for specific context information and substantially dissimilar hash values for other context information. A system or application system that compares hash values can be configured to weight specific portions of the hash code comparison according to a weighting matrix that identifies a portion of the hash code (e.g., specific context information) that is important in identifying, for example, similar user partitions. When generating heterogeneous hash codes, a weighting matrix can also be used as a method to speed up comparisons. The weights stored in the weighting matrix can be machine-learned or based on heuristic values, depending on the knowledge-based methods available to the operator of the system or application system.
[0144] As previously mentioned, in certain embodiments, another method for performing nearest neighbor search via deep hashing of user behavior history involves using a time-aware attention CNN (TAACNN) to generate hash codes for user comparison. TAACNN extracts user behavior at different time scales. In certain embodiments, this model combines features of a user's long-term preferences with her short-term preferences. Therefore, the RACNN / TAACNN model may be suitable for modeling more dynamic behavior patterns of users.
[0145] TAACNN stems from the inquiry of several technical problems in the field of user activity modeling. For example, the first problem involves how to appropriately preprocess sequential behavior data to be used by deep learning algorithms? Deep learning algorithms show promise in processing sequential data. However, current deep learning models for sequential data are designed for text analysis or video analysis. Sequential behavior data is another category of data. For example, first, sequential behavior data is basically one-dimensional data and does not include similarity structures like image data. Second, sequential behavior data is discontinuous. The second problem involves how to generalize user representations of sequential behavior data when only specific parts of the data may reliably have metadata information? Unlike other sequential data such as text and video that do not have complementary data, sequential behavior data can be linked to metadata. Metadata information may prove useful for binary hashing. Therefore, one problem that needs to be solved is how to make a general deep learning algorithm to create user representations that use metadata when metadata is available but do not rely entirely on metadata. The third problem involves how to consider processing users' long-term and short-term behaviors? Sequential behavior data inherently stores users' long-term and short-term behavior information in it. For example, behavioral data can reveal a user's preferences at the moment as well as preferences across months or years. Since long-term and short-term behaviors may show different patterns, the question is how to process them separately to extract accurate features without negatively affecting hashing performance. The fourth problem involves how to extract user behavior patterns at multiple time-aware scale levels? Even when specifically targeting long-term or short-term features, how to dynamically identify features at different time scale levels is a complex and difficult problem.
[0146] In a particular embodiment, a solution to these problems considered by the present disclosure is a time-aware attention convolutional neural network (TAACNN) for performing binary hashing of sequential behavior data. This binary hashing model can be integrated into various networks and applications that must compare information about users (partition expansion, user analysis, etc.). This new deep learning-based model solves the aforementioned problems at least in the following ways. The TAACNN model introduces an input layer that preprocesses the user's sequential behavior and maps one-dimensional data to three dimensions. This allows one-dimensional data to be processed entirely by a convolutional neural network. In the mapping process from low-dimensional data to high-dimensional data, sequential behavior data is aggregated to ensure that high-dimensional data does not suffer from severe sparsity problems. An additional benefit is that the data in the analysis can be more freely regarded as continuous data. The proposed input layer and the proposed embedding layer enable TAACNN to adapt to and be compatible with a variety of different embedding algorithms. Such a feature makes TAACNN compatible with data that may or may not have metadata information. The two core sets in the time-aware attention layer of TAACNN help the TAACNN model separate the user's long-term behavior attention and short-term behavior attention and extract their features separately. This prevents confusion of attention features that are irrelevant to other content to help improve the quality of hash codes generated from TAACNN. The proposed TAACNN supports different kernel sizes in the proposed time-aware attention layer to facilitate the identification of long-term and short-term behaviors at different time scale levels. This increases the coverage of the time awareness of this model and creates a deeper representation of the user profile.
[0147] Fig.19 An example model of a system for training and using the proposed TAACNN is shown. As proposed by model 1900, the training system 1980 and the hashing system 1990 are tightly linked. As will be described herein, the TAACNN 1920 can be updated during the training process (sometimes, online), which can improve hashing performance.
[0148] During the training process 1980, the user pair (including data about two users 1910a and 1910b) can be loaded into a Siamese or parallel training structure. The data from the two users 1910a and 1910b is passed to the TAACNN model 1920 based on deep learning. TAACNN 1920 generates user embeddings for the two users using the method further described herein. These continuous embeddings from the two users 1910a and 1910b are passed to two binary hash layers 1930a and 1930b to generate binary hash codes for each of the two users 1910a and 1910b. The binary hash layers 1930a and 1930b can be configured to generate hash codes using various algorithms (including, by way of example only and not limitation, different activation functions or different thresholds). In a particular embodiment, the binary hash layers 1930a and 1930b of user 1 1910a and user 2 1910b can share the same binary hash algorithm. In a particular embodiment, if desired, the binary hash layers 1930a and 1930b for user 1 1910a and user 2 1910b can use different algorithms based on the arrangement of the user data. After two hash codes are generated for the user pair, the hash codes are provided to the similarity judgment layer 1940 to calculate their similarity labels. The similarity judgment layer 1940 can support various comparison methods, including but not limited to Hamming distance, Euclidean distance, etc. After the similarity judgment layer 1940 calculates the similarity result for the user pair, the similarity result is compared with the reference standard true similarity label provided by the administrator of the training process 1980. Any error between the similarity result and the true similarity label can be back-propagated through the architecture for updating the TAACNN model 1920 during the training process.
[0149] During the hashing process 1990, the TAACNN model 1920 trained according to the training process 1980 is used to generate hash codes for large-scale user sequential behavior data stored in the user database 1960. In a specific embodiment, the user database 1960 can be equivalent to the user activity data database 410. Another binary hashing layer 1930c generates a binary hash according to the hash code generated by the TAACNN model 1920. The output (e.g., the hash code) is stored in the user hash code database 1970. In a specific embodiment, the user hash code database 1970 can be equivalent to the heterogeneous hash code database 440, but it should be noted that the user hash code database 1970 stores not heterogeneous hash codes, but TAA-based user hash codes. The TAACNN model 1920 in the hashing process 1990 comes directly from the training process 1980 and is updated as changes are made during the training process. The present disclosure contemplates at least two methods of updating the TAACNN model 1920: online update and batch update. During online updates, the training process 1980 and the hashing process 1990 run substantially simultaneously, and depending on the system design, the TAACNN model 1920 is updated simultaneously in both processes or at specific checkpoints during the process (e.g., an amount of time has passed without an update). In certain embodiments, online updates can provide the hashing process 1990 with the flexibility to process streaming data. For batch processing, the TAACNN model 1920 update occurs at the end of a complete training process operation. In certain embodiments, batch updates ensure that only fully updated TAACNN models 1920 are propagated to the hashing model 1990.
[0150] Fig. 20A An example architecture 2000a of a TAACNN 1920 is shown. The output of the TAACNN 1920 (actually the example architecture 2000a) is a user embedding 2050 used by a binary hashing layer (e.g., 1930a and 1930b) to compute a hash code for each user. The quality of the user embedding 2050 largely determines the quality of the hash code, and thus the quality of the comparison. The input layer 2010 is a data preprocessing layer that maps the sequential behavior data input (with or without metadata in a particular embodiment) into a three-dimensional structure that can be processed by the CNN. The result of the preprocessing is the user behavior representation 2015, which can be referenced by Fig.21 To further understand.
[0151] User behavior data is typically represented by a record of a user's interaction with a particular item. The first step in the data preprocessing phase is to embed each item into a vector representation. Various appropriate algorithms can be used here, depending on, for example, whether the input data has metadata associated with it. If there is no metadata, an embedding algorithm similar to word2vec can be used here. If metadata is available, an embedding algorithm similar to single hot or multi-hot embedding can be used, depending on the specific arrangement of the metadata. The next step in the data preprocessing phase is to sessionize the user's activity history by the desired time unit. The choice of the time unit for each session may affect the reliability of the user embedding 2050 associated with a particular time scale. As an example, a session length of one hour can be selected. In a particular embodiment, a longer or shorter session length can be envisioned. For each session, all items that the user under consideration has interacted with during the session time frame are aggregated using the embedding of the corresponding item generated from the previous step. For example, between time = 0 and time = 1 hour, all interactions are placed in the first session, and between time = 1 hour and time = 2 hours, all interactions are placed in the second session. This aggregation represents the summary of user behavior for a given session.
[0152] After sessionization, each user's behavioral input is reshaped or mapped into a high-dimensional space U∈RH×W×C, where H is the short-term dimension (e.g., day), W is the long-term dimension (e.g., month), and C is the category / embedding size. The exact time required for each dimension can be related to the time length chosen for the session. Fig.21 An example of how user sequential behavior data can be conceptually presented after mapping is shown. Fig.21 , short-term axis 2110 corresponds to short-term time units (e.g., on an hourly basis), long-term axis 2120 corresponds to long-term time units (e.g., on a dayly basis), and embedding axis 2130 corresponds to embedding sizes of different item embeddings. In certain embodiments, the short-term time unit may, but need not, be equal to the length of the selected session time frame. In certain embodiments, the short-term dimension and the long-term dimension may be selected to approximately balance (or avoid imbalance) in the user representation. For example, if a short-term dimension of 1 hour is selected, then selecting 1 year as the long-term dimension may be inappropriate or inefficient. This may be specified by a heuristic model set by the client application.
[0153] In a particular embodiment, the embedding from the input layer 2010 may be sparse or the result of a hand-crafted embedding. Therefore, the user behavior representation 2015 may carry more conceptual information than actual similarity information. This scenario can have a negative impact on the overall performance of the TAACNN, especially its ability to maintain similarity information at a larger scale. To overcome this limitation, an embedding layer 2020 is introduced as part of the architecture 2000a. The embedding layer 2020 applies a convolution kernel 2025 (e.g., a mapping or embedding kernel) to convert the output of the input layer 2010 into an adaptive distributed representation based on a sparse representation. The embedding layer 2020 can use a 1×1 convolution kernel 2025 to map a low-dimensional sparse input U to a high-dimensional adaptive dense embedding Ue∈RH×W×E, where E is the embedding size (e.g., 128).
[0154] The time-aware attention layer 2030 is used to extract the time-aware attention features in the architecture 2000a of the TAACNN model. The time-aware attention layer 2030 separates the attention features into short-term features and long-term features. Fig.21 The long-term attention feature (shown as axis 2110 in Fig.21 The short-term attention feature (shown as axis 2120) is a feature extraction that encapsulates the importance of relatively independent activities over a longer period of time. As an example, the short-term attention feature can depict a user scenario in which the user's TV viewing behavior at 8:00 this evening is highly correlated with the user's TV viewing behavior at 9:00 this evening. Then, the long-term attention feature can depict the user's TV viewing behavior at 8:00 on Monday night, rather than the TV viewing behavior at 8:00 last Monday night. Due to the difference in the representation of time units, short-term attention features and long-term attention features are not easy to combine. Therefore, short-term attention features and long-term attention features are represented and processed separately in the architecture 2000a of TAACNN. It can be seen from this that the traditional square convolution kernel used in previous CNNs is a suboptimal kernel option for the time-aware attention layer 2030, rather than the optimal kernel option for our time-aware attention mechanism with sequential behavior data.
[0155] To address this issue, two independent designs for two different kernel sets are developed for short-term and long-term attention features. Fig. 20AIn the example architecture 2000a shown, short-term kernel sets (2035a - 2035c) with different dimensions are applied along the short-term axis 2110 of the user behavior representation 2015. The dimensions are: 1xN (2035a), 1xM (2035b), and 1xV (2035c), where N < M < V. These kernels are respectively the small short-term (SST), middle short-term (MST), and large short-term (LST) for attention feature extraction. Long-term kernel sets (2035d - 2035f) with different dimensions are applied along the long-term axis 2120 of the user behavior representation 2015. The dimensions are: Tx1 (2035d), Yx1 (2035e), and Ux1 (2035f), where T < Y < U. The long-term kernel sets are respectively the small long-term (SLT), middle long-term (MLT), and large long-term (LLT) for attention feature extraction. For each kernel set, different kernel sizes within the kernel set are used to increase the time-aware coverage in the case of feature loss. Although in this example, each kernel set includes three kernels, each set can use more or fewer kernels, and in appropriate cases, the sizes of these sets can be unequal. In some embodiments, the size of the kernel set can be based on the characteristics of the sequential behavior dataset used (e.g., sparsity, time range of the dataset, etc.). In some embodiments, regardless of the number of kernels in a set, their sizes can follow the following rule:
[0156] 2(i + 1)
[0157] where i ∈ 1, 2, 3,..., R, and
[0158] R is the number of kernels in this kernel set.
[0159] To prevent information loss during possible interactions between short-term and long-term attention features, a pooling layer 2037 is introduced into the time-aware attention layer 2030 to extract correlation features as supplementary features. The pooling layer 2037 and various convolutional kernels 2035a - 2035f are used to perform convolution on the user behavior representation (shown as convolution blocks 2039 and 2038). The pseudocode algorithm (as Algorithm 2) that explains how the time-aware layer extracts features has been discussed previously. Algorithm 2 shows how to calculate the features in the time-aware attention layer according to a specific embodiment.
[0160] The outputs of convolution blocks 2039 and 2038 are correlation features 2045a and various attention features 2045b-2045g. Short-term features 2045b, medium-term features 2045c, and long-term features 2045d are the results of convolving the user behavior representation 2015 with convolution kernels 2035a, 2035b, and 2035c, respectively. Short-term features 2045e, medium-term features 2045f, and long-term features 2045g are the results of convolving the user behavior representation 2015 with convolution kernels 2045d, 2035e, and 2035f, respectively. In the aggregation layer 2040, all features output from the time-aware attention layer 2030 are flattened and concatenated together. Thus, the final user embedding 2050 is prepared. The user embedding 2050 will eventually be used for similarity training and / or hashing.
[0161] Fig. 20B Another example architecture 2000b of TAACNN 1920 is shown. Architecture 2000b is built on Fig. 20A The architecture 2000a is shown, and like numbered components should be understood to function similarly unless otherwise specifically noted. Fig. 20B The architecture 2000b shown in includes another attention layer 2060 after the aggregation layer 2040. If the time range of the sequential data is too large (e.g., more than a few decades), or if there is a large difference between the time scale covered by the session size and the time scale of one or more of the short-term axis 2110 and the long-term axis 2120, it may be necessary to implement additional kernels in order to cover the time-aware analysis as deeply as possible. In certain embodiments, this may make it impractical to train a deep learning model and generate user embeddings directly from the aggregation layer 2040, because the aggregation layer 2040 may be considered to have too many parameters (e.g., the resulting user embedding 2050 may have too high a dimension to be effectively stored, retrieved, and compared). In this case, an attention layer 2060 is added to extract combined short-term attention features 2065 and long-term attention features 2067. The short-term attention features 2065 extract short-term features 2045b, medium-term features 2045c, and long-term features 2045d, as well as other additional features generated as a result of the additional kernel selected to process the user behavior representation 2015. The long-term attention features 2067 extract short-term features 2045e, medium-term features 2045f, and long-term features 2045g, as well as other additional features generated as a result of the additional core selected to process the user behavior representation 2015. In this example, because no additional extraction of the correlation feature 2045a is required, the correlation feature 2045a is simply passed forward. The correlation feature 2045a, the short-term attention feature 2065, and the long-term attention feature 2067 (as well as any attention features that can be used) are combined to form the user embedding 2050.
[0162] Fig. 20C Shows another example architecture 2000c of TAACNN 1920. Architecture 2000c is related to the architecture 2000a shown in Fig. 20A and components with similar numbers should be understood to act similarly unless otherwise specifically stated. Generally, architecture 2000c is a simplified version of architecture 2000a. If the time range of the user sequential behavior data is small (e.g., only one day of behavior data is available), then long-term attention and short-term attention may become closely related to each other. In this case, the asymmetric convolutional kernels 2035a - 2035f of architecture 2000a can be replaced with more traditional square-like pooling 2053 and convolutional kernels 2055 and 2057 to extract features. Each of the pooling 2053, the NxN convolutional kernel 2055, and the MxM convolutional kernel 2057 (N < M) can be convolved with the user behavior representation 2015 to generate attention features. In this architecture, the short-term attention feature 2073 is the result of the pooling 2053, the mid-term attention feature 2075 is the result of the NxN convolutional kernel 2055, and the long-term attention feature 2077 is the result of the MxM convolutional kernel 2057. In the aggregation layer 2040, the attention features 2073, 2075, and 2077 are combined to form the user embedding 2050.
[0163] In a particular embodiment, TAACNN and these adaptive architectures can be used especially in various application systems. For example, the methods described herein can be used for fast and efficient user analysis. By providing accurate time perception for the long-term and short-term attention of user behavior, TAACNN provides high-quality user embeddings, which can be used by various application customers as the basis for user analysis models. In particular, the embeddings can facilitate the faster development of accurate user analysis models by providing a strong and adaptive starting point for future systems while avoiding problems related to data sparsity and noise. For example, advertising analysis can use the hash code or embedding of each user to run demographic analysis models to identify appropriate target customers. As another example, the methods described herein can be used for fast and efficient recommendation systems. Since TAACNN can provide high-quality hash codes for users and (from the input layer of TAACNN) embeddings for items, TAACNN can help provide high-performance recommendation systems. In addition, TAACNN can be used to support similar modeling systems. Since TAACNN provides high-quality hash codes for each user, TAACNN can be used to create high-performance similar systems as described above. For example, if an advertising team has a group of seed users interested in programming types, by comparing user hash codes, the advertising team can easily expand the seed group by introducing users with similar hash codes compared to the seed user group.
[0164] Several experiments have been conducted to evaluate the performance of the disclosed technique relative to other existing binary hashing techniques. More specifically, the disclosed technique is compared with other benchmark hashing methods such as LSH and VDSH-S on public (MovieLens, Goodreads) and proprietary anonymous user activity data. All of these datasets contain sequential user activities related to specific projects.
[0165] All datasets are preprocessed by removing some anomalous user activities (e.g., too many ratings by a single user) to ensure more accurate evaluation results. Table 1 contains summary statistics for such preprocessed datasets.
[0166] Table 1: Dataset statistics (after preprocessing)
[0167]
[0168] Since there is no reference standard for user similarity labels on a given dataset, a reference standard is created using the Jaccard index from the most recent time period of each dataset. Next, the most similar and least similar users (i.e., 5 similar users vs. 5 dissimilar users) for each user are classified based on the predefined Jaccard index values. From those instances before the most recent time period, input features are extracted for the disclosed models (category attention and RACNN / TAACNN). The extracted features are then reintegrated with the similarity labels (starting from the current time) and split into 80% / 20% to produce the training set and test set, respectively.
[0169] There may be a calculation (i.e., accuracy) of the number of correct predictions divided by the total number of predictions made by changing the hash code length through the trained category attention and RACNN / TAACNN models. For LSH, the model is built based on the relative frequency of item categories appearing in user-item interactions. Approximate similarity joins are then performed on the trained LSH model to infer the similarity or dissimilarity of user pairs. For VDSH-S, the model is trained using the tf-idf values calculated for all items present in the user interaction history in conjunction with the item categories most frequently viewed by the user as labels. Next, the hash codes generated by the trained VDSH-S model are extracted to predict the similarity of pairs of users based on the Hamming distance between the given hash codes. The accuracy of LSH and VDSH-S is measured by comparing their predicted outputs with the similarity labels of the disclosed technology.
[0170] Table 2 and Fig. 22 The performance of all methods is shown for the three datasets considered in the experiments. Fig. 22Accuracy evaluation results from the three described user behavior datasets (ie, Goodreads 2200, MovieLens 2210, and proprietary user activity data 2220) are shown.
[0171] Table 2: Accuracy of user similarity prediction for different numbers of hash bits on three user behavior datasets
[0172]
[0173] From the given results, it can be observed that Category Attention and RACNN / TAACNN significantly outperform other baseline binary hashing techniques on all datasets across different hash bit lengths. This verifies that both LSH and VDSH-S cannot take into account category preferences or time scales in user-item interaction history. It can also be observed that the highest accuracy improvement is observed in the case of the MovieLens dataset (0.34 / 0.2 relative to VDSH-S / LSH). This is because the interaction data points for each user of the MovieLens dataset are much sparser compared to other datasets (see Table 2). Because the techniques described in this paper can model users' sequential behaviors with high accuracy using advanced metadata and various time scales, the hash codes generated for each user are more accurate compared to other baseline models.
[0174] Category attention shows strong performance on datasets such as MovieLens and Goodreads, where user activities are sparse, because category attention generates category embeddings that capture long-term preferences. RACNN / TAACNN may be suitable for datasets with denser user-item interaction data points, such as the proprietary user activity data of the disclosed technique, because RACNN / TAACNN is more sensitive to temporal changes.
[0175] Two example deep binary hashing architecture embodiments for deriving binary hash codes that preserve similarity for sequential behavioral data are described herein. Category attention leverages high-level metadata to capture user preferences. RACNN / TAACNN explores user preferences that evolve over different time scales. Experiments on various datasets demonstrate the effectiveness of embodiments of the disclosed technology through their significant performance improvements over other known hashing methods. This article also shows that category attention is more effective for datasets where user activities are not very frequent over time, while RACNN / TAACNN is more effective for datasets where user activities are more frequent over time. This disclosure illustrates the importance of developing accurate models specifically for binary hashing of sequential behavioral data.
[0176] Fig.23An example computer system 2300 is shown. In certain embodiments, one or more computer systems 2300 perform one or more steps of one or more methods described or shown herein. In certain embodiments, one or more computer systems 2300 provide functionality described or shown herein. In certain embodiments, software running on one or more computer systems 2300 performs one or more steps of one or more methods described or shown herein, or provides functionality described or shown herein. Certain embodiments include one or more portions of one or more computer systems 2300. Here, references to computer systems may include computing devices, and vice versa, where appropriate. Furthermore, references to computer systems may include one or more computer systems, where appropriate.
[0177] The present disclosure contemplates any suitable number of computer systems 2300. The present disclosure contemplates computer systems 2300 taking any suitable physical form. By way of example and not limitation, computer system 2300 may be an embedded computer system, a system-on-chip (SOC), a single-board computer (SBC) system (such as a computer-on-module (COM) or a system-on-module (SOM)), a desktop computer system, a laptop or notebook computer system, an interactive kiosk, a mainframe, a computer system grid, a mobile phone, a personal digital assistant (PDA), a server, a tablet computer system, an augmented / virtual reality device, or a combination of two or more of these. Where appropriate, computer system 2300 may include one or more computer systems 2300; be integrated or distributed; span multiple locations; span multiple machines; span multiple data centers; or reside in a cloud, which may include one or more cloud components in one or more networks. Where appropriate, one or more computer systems 2300 may perform one or more steps of one or more methods described or illustrated herein without substantial spatial or temporal limitations. As an example and not limitation, one or more computer systems 2300 may perform one or more steps of one or more methods described or illustrated herein in real time or in batch mode. Where appropriate, one or more computer systems 2300 may perform one or more steps of one or more methods described or illustrated herein at different times or in different locations.
[0178] In a particular embodiment, computer system 2300 includes a processor 2302, memory 2304, storage 2306, input / output (I / O) interface 2308, communication interface 2310, and bus 2312. Although this disclosure describes and illustrates a particular computer system having particular numbers of particular components in a particular arrangement, this disclosure contemplates any suitable computer system having any suitable numbers of any suitable components in any suitable arrangement.
[0179] In a particular embodiment, the processor 2302 includes hardware for executing instructions, such as instructions that constitute a computer program. By way of example and not limitation, to execute instructions, the processor 2302 may retrieve (or fetch) instructions from an internal register, an internal cache, memory 2304, or storage 2306; decode and execute these instructions; and then write one or more results to an internal register, an internal cache, memory 2304, or storage 2306. In a particular embodiment, the processor 2302 may include one or more internal caches for data, instructions, or addresses. The present disclosure contemplates a processor 2302 that includes any suitable number of any suitable internal caches, where appropriate. By way of example and not limitation, the processor 2302 may include one or more instruction caches, one or more data caches, and one or more translation lookaside buffers (TLBs). The instructions in the instruction cache may be copies of the instructions in the memory 2304 or storage 2306, and the instruction cache may speed up the retrieval of those instructions by the processor 2302. The data in the data cache may be a copy of data in the memory 2304 or storage device 2306 for the instructions executed at the processor 2302 to operate on; the results of previous instructions executed at the processor 2302 for access by subsequent instructions executed at the processor 2302 or for writing to the memory 2304 or storage device 2306; or other suitable data. The data cache may speed up the read or write operations of the processor 2302. The TLB may speed up the virtual address translation of the processor 2302. In a particular embodiment, the processor 2302 may include one or more internal registers for data, instructions, or addresses. The present disclosure contemplates a processor 2302 including any suitable number of any suitable internal registers, where appropriate. Where appropriate, the processor 2302 may include one or more arithmetic logic units (ALUs); be a multi-core processor; or include one or more processors 2302. Although the present disclosure describes and illustrates a particular processor, the present disclosure contemplates any suitable processor.
[0180] In certain embodiments, memory 2304 includes main memory for storing instructions for processor 2302 to execute or data for processor 2302 to operate. By way of example and not limitation, computer system 2300 may load instructions from storage device 2306 or another source (such as another computer system 2300) to memory 2304. Processor 2302 may then load instructions from memory 2304 to an internal register or internal cache. To execute the instructions, processor 2302 may retrieve the instructions from the internal register or internal cache and decode the instructions. During or after execution of the instructions, processor 2302 may write one or more results (which may be intermediate or final results) to the internal register or internal cache. Processor 2302 may then write one or more of these results to memory 2304. In certain embodiments, processor 2302 executes only instructions in one or more internal registers or internal caches or memory 2304 (rather than storage device 2306 or elsewhere), and operates only on data in one or more internal registers or internal caches or memory 2304 (rather than storage device 2306 or elsewhere). One or more memory buses (each of which may include an address bus and a data bus) may couple the processor 2302 to the memory 2304. The bus 2312 may include one or more memory buses, as described below. In a particular embodiment, one or more memory management units (MMUs) reside between the processor 2302 and the memory 2304 and facilitate access to the memory 2304 requested by the processor 2302. In a particular embodiment, the memory 2304 includes a random access memory (RAM). Where appropriate, the RAM may be a volatile memory. Where appropriate, the RAM may be a dynamic RAM (DRAM) or a static RAM (SRAM). In addition, where appropriate, the RAM may be a single-port or multi-port RAM. The present disclosure contemplates any suitable RAM. Where appropriate, the memory 2304 may include one or more memories 2304. Although the present disclosure describes and illustrates specific memories, the present disclosure contemplates any suitable memory.
[0181] In a particular embodiment, storage device 2306 includes a large-capacity storage device for data or instructions. As an example and not limitation, storage device 2306 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, storage device 2306 may include a removable or non-removable (or fixed) medium. Where appropriate, storage device 2306 may be inside or outside computer system 2300. In a particular embodiment, storage device 2306 is a non-volatile solid-state memory. In a particular embodiment, storage device 2306 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable PROM (EAROM), or a flash memory, or a combination of two or more of these. The present disclosure contemplates a large-capacity storage device 2306 in any suitable physical form. Where appropriate, storage 2306 may include one or more storage control units to facilitate communication between processor 2302 and storage 2306. Where appropriate, storage 2306 may include one or more storage 2306. Although this disclosure describes and illustrates particular storage, this disclosure contemplates any suitable storage.
[0182] In a particular embodiment, I / O interface 2308 includes hardware, software or both, providing one or more interfaces for communication between computer system 2300 and one or more I / O devices. Where appropriate, computer system 2300 may include one or more of these I / O devices. One or more of these I / O devices may enable communication between a person and computer system 2300. As an example and not limitation, I / O devices may include keyboards, keypads, microphones, monitors, mice, printers, scanners, speakers, static cameras, styluses, tablets, touch screens, trackballs, cameras, other suitable I / O devices or a combination of two or more of these devices. I / O devices may include one or more sensors. The present disclosure contemplates any suitable I / O devices and any suitable I / O interface 2308 for them. Where appropriate, I / O interface 2308 may include one or more devices or software drivers so that processor 2302 can drive one or more of these I / O devices. Where appropriate, I / O interface 2308 may include one or more I / O interfaces 2308. Although this disclosure describes and illustrates a particular I / O interface, this disclosure contemplates any suitable I / O interface.
[0183] In certain embodiments, the communication interface 2310 includes hardware, software, or both, providing one or more interfaces for communication (e.g., packet-based communication) between the computer system 2300 and one or more other computer systems 2300 or one or more networks. By way of example and not limitation, the communication interface 2310 may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or other wired network, or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network (such as a WI-FI network). The present disclosure contemplates any suitable network and any suitable communication interface 2310 for the network. By way of example and not limitation, the computer system 2300 may communicate with one or more parts of an ad hoc network, a personal area network (PAN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or the Internet, or a combination of two or more of these. One or more parts of one or more of these networks may be wired or wireless. As an example, the computer system 2300 may communicate with a wireless PAN (WPAN) (such as, for example, a Bluetooth WPAN), a WI-FI network, a WI-MAX network, a cellular telephone network (such as, for example, a Global System for Mobile Communications (GSM) network), or other suitable wireless networks, or a combination of two or more of these networks. Where appropriate, the computer system 2300 may include any suitable communication interface 2310 for any of these networks. Where appropriate, the communication interface 2310 may include one or more communication interfaces 2310. Although the present disclosure describes and illustrates particular communication interfaces, the present disclosure contemplates any suitable communication interface.
[0184] In certain embodiments, bus 2312 includes hardware, software, or both that couple the components of computer system 2300 to each other. By way of example and not limitation, bus 2312 may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front side bus (FSB), a HYPERTRANSPORT (HT) interconnect, an industry standard architecture (ISA) bus, an INFINIBAND interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCIe) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus, or another suitable bus, or a combination of two or more of these buses. Where appropriate, bus 2312 may include one or more buses 2312. Although the present disclosure describes and illustrates a particular bus, the present disclosure contemplates any suitable bus or interconnect.
[0185] Here, the computer-readable non-transitory storage medium(s) may include one or more semiconductor-based or other integrated circuits (ICs) (such as, for example, field programmable gate arrays (FPGAs) or application-specific ICs (ASICs)), hard disk drives (HDDs), hybrid hard disk drives (HHDs), optical disks, optical disk drives (ODDs), magneto-optical disks, magneto-optical disk drives, floppy disks, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM drives, SECURE DIGITAL cards or drives, any other suitable computer-readable non-volatile storage media, or any suitable combination of two or more of these. Where appropriate, the computer-readable non-transitory storage medium may be volatile, non-volatile, or a combination of volatile and non-volatile.
[0186] Here, "or" is inclusive and not exclusive, unless expressly indicated otherwise or indicated otherwise by context. Thus, as used herein, "A or B" means "A, B, or both A and B," unless expressly indicated otherwise or indicated otherwise by context. Furthermore, "and" is conjunctive, unless expressly indicated otherwise or indicated otherwise by context. Thus, as used herein, "A and B" means "A and B, jointly," unless expressly indicated otherwise or indicated otherwise by context.
[0187] Here, "automatically" and its derivatives mean "without human intervention" unless expressly stated otherwise or indicated otherwise by context.
[0188] The scope of the present disclosure includes all changes, substitutions, variations, alterations and modifications to the example embodiments described or shown herein that will be understood by those of ordinary skill in the art. The scope of the present disclosure is not limited to the example embodiments described or shown herein. In addition, although the present disclosure describes and illustrates various embodiments including specific components, elements, features, functions, operations or steps, any of these embodiments may include any combination or arrangement of any components, elements, features, functions, operations or steps described or shown anywhere herein, which is understood by those of ordinary skill in the art. In addition, in the appended claims, references to devices or systems or components of devices or systems that are suitable for, arranged to, capable of, configured to, implemented to, operable to or operable to perform a specific function include the device, system, component, regardless of whether it or the specific function is activated, turned on or unlocked, as long as the device, system or component is so suitable for, arranged to, capable of, configured to, implemented to, operable to or operable to. In addition, although the present disclosure describes or illustrates specific embodiments as providing specific advantages, specific embodiments may not provide or provide some or all of these advantages.
Claims
1. A computer-implemented method comprising: receiving user behavior data and context information associated with the user behavior data, the context information comprising a first data portion associated with a first context type; generating a first heterogeneous hash code from the user behavior data and the context information using a hash algorithm, the first heterogeneous hash code comprising a first hash code portion representing the user behavior data and a second hash code portion representing a first data portion associated with a first context type; accessing a second heterogeneous hash code comprising a third hash code portion representing a second data portion associated with the first context type; as well as Comparing the first heterogeneous hash code and the second heterogeneous hash code includes determining a similarity between a second hash code portion of the first heterogeneous hash code and a third hash code portion of the second heterogeneous hash code.
2. The method according to claim 1, wherein: The context information also includes a third data portion associated with a second context type; and wherein the first heterogeneous hash code also includes a fourth hash code portion representing the third data portion associated with the second context type.
3. The method according to claim 2, wherein: The first context type includes at least one of a location type, a date / time type, or a demographic type, and wherein the first context type is different from the second context type.
4. The method according to claim 2, wherein: the second heterogeneous hash code comprising a fifth hash code portion representing a fourth data portion associated with a second context type; and Wherein, comparing the first heterogeneous hash code and the second heterogeneous hash code further includes: determining similarity between a fourth hash code portion of the first heterogeneous hash code and a fifth hash code portion of the second heterogeneous hash code.
5. The method according to claim 1, wherein: The second hash code portion is also based on a correlation between the first data portion and the third data portion; and The fourth hash code portion is further based on a correlation between the third data portion and the first data portion.
6. The method according to claim 1, wherein: The first hash code portion is also based on a correlation between the user behavior data and the first data portion; as well as The second hash code portion is also based on the correlation between the first data portion and the user behavior data.
7. The method according to claim 1, further comprising: identifying a new partition of one or more users within a threshold level of similarity for a given set of one or more users based on comparing the first heterogeneous hash code to the second heterogeneous hash code; and The given set is expanded by adding at least one user from the new partition.
8. The method according to claim 1, further comprising: A first heterogeneous hash code is stored in a heterogeneous hash code database, wherein, when stored, the first hash code portion is separately accessible from the second hash code portion, and wherein the second hash code portion is stored in association with the first context type.
9. The method according to claim 8, wherein: Comparing the first heterogeneous hash code with the second heterogeneous hash code includes: receiving a request to compare a first heterogeneous hash code and a second heterogeneous hash code based on a first context type; Hash code portions of a first heterogeneous hash code and a second heterogeneous hash code associated with a first context type are retrieved from a heterogeneous hash code database.
10. The method according to claim 1, wherein: 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 includes: A bitwise distance between the second hash code portion and the third hash code portion is calculated.
11. A computer-implemented apparatus comprising: one or more computer-readable storage media containing instructions; as well as One or more processors coupled to the storage medium and configured to execute instructions to: receiving user behavior data and context information associated with the user behavior data, the context information comprising a first data portion associated with a first context type; generating a first heterogeneous hash code from the user behavior data and the context information using a hash algorithm, the first heterogeneous hash code comprising a first hash code portion representing the user behavior data and a second hash code portion representing a first data portion associated with a first context type; accessing a second heterogeneous hash code comprising a third hash code portion representing a second data portion associated with the first context type; as well as Comparing the first heterogeneous hash code and the second heterogeneous hash code includes determining a similarity between a second hash code portion of the first heterogeneous hash code and a third hash code portion of the second heterogeneous hash code.
12. The device according to claim 11, wherein: The context information also includes a third data portion associated with a second context type; and wherein the first heterogeneous hash code also includes a fourth hash code portion representing the third data portion associated with the second context type.
13. The device according to claim 12, wherein: The first context type includes at least one of a location type, a date / time type, or a demographic type, and wherein the first context type is different from the second context type.
14. The device according to claim 12, wherein: the second heterogeneous hash code comprising a fifth hash code portion representing a fourth data portion associated with a second context type; and Wherein, comparing the first heterogeneous hash code and the second heterogeneous hash code further includes: determining similarity between a fourth hash code portion of the first heterogeneous hash code and a fifth hash code portion of the second heterogeneous hash code.
15. One or more computer-readable storage media containing instructions which, when executed, are operable to perform the method of any one of claims 1 to 10.