A personalized search method and system integrating search behavior and friend network

By integrating search behavior with friend network, using technologies such as transformer and graph attention network to build group-based user portraits, solving the problem of insufficient historical behavior when personalized searches in new fields, and achieving more accurate and reliable personalized search results.

CN113987366BActive Publication Date: 2025-05-30RENMIN UNIVERSITY OF CHINA +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111253279.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-05-30
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

When faced with new fields of query, the existing personalized search algorithm has limited historical behavior leading to insufficient reliability of similar users, and it is easy to introduce noisy users when looking for similar users based on lexical or topic similarity.

Method used

The personalized search method that integrates search behavior and friend network is adopted to model the user's short-term and long-term historical behaviors through the transformer structure, and form multiple circles of friends based on friend relationships. The graph attention network, cross attention and query perceptual attention mechanism are used to build a group-based user portrait and perform personalized sorting.

Benefits of technology

Strengthen the influence of similar users through semantic level, reduce historical behavior dependence, and improve the accuracy and reliability of personalized searches, especially when querying in new fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987366B_ABST
    Figure CN113987366B_ABST
Patent Text Reader

Abstract

Through the method in the field of artificial intelligence processing, the present invention realizes a personalized search method that integrates search behavior and friend network and a system applying this method. The method proposes a group-based personalized search model, which integrates search behavior and friend network, uses short-term history and long-term history to improve the user profile, combines the friend relationship and search behavior to combine the user's search behavior with the friend network to construct a group-based user profile, and strengthens the influence of similar users through neural network. Under the interaction of relationship-based and behavior-based friend circles, users who appear in both types of friend circles are further strengthened, thus establishing a group-based user profile. The model combines the personal profile and group profile constructed based on the current query to personalize the search results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and particularly to a personalized search method and system that integrates search behavior and friend network. Background Art

[0002] Personalized search is one of the effective means to improve the user search experience. Existing personalized algorithms mainly build user portraits based on text analysis, and then re-rank the results by comparing the similarity between the user portrait and candidate documents. Early methods for building user portraits were mainly based on feature engineering, which characterized user interests by collecting click features and topic features in the user's historical behavior. The emergence of deep learning enables the model to model user interests at the semantic level. Existing model structures mainly include recurrent neural networks, adversarial neural networks, memory networks, reinforcement learning, etc. However, the lack of historical behavior will render these personalized search algorithms ineffective. To solve this problem, group-based personalized search algorithms have been proposed. These methods expand the user portrait by integrating the behaviors of similar users. They find similar users by analyzing the similarity between the user's historical behaviors, and then consider the portraits of these users simultaneously during personalized ranking. Some studies have also proposed the concept of dynamic grouping, which dynamically finds different similar users for the current user according to different queries and has achieved certain results. Social relationships are also used in some specific systems to improve the retrieval quality. For example, in the Weibo system, existing methods group users by analyzing their social relationships, and then consider the portraits of users closer in the social network during ranking.

[0003] Although existing group-based personalized search technologies have achieved certain results, they have two problems. First, these studies mainly find similar users based on the lexical or topic similarity of historical queries and clicked documents. This method is too simple and inevitably introduces a lot of noisy users. Second, since the existing method for finding similar users still relies on the user's historical behavior, when the user's historical behavior is limited, this method is not sufficient to ensure the reliability of the found similar users. The defect of this method is particularly obvious when facing a query in a completely new field. Summary of the Invention

[0004] To this end, the present invention first proposes a personalized search method that integrates search behavior and friend network. First, a Transformer structure is used to model the user's current query intention using short-term history, and then another Transformer structure is used to dynamically build a personal profile using long-term history, thereby modeling and constructing a personal profile. Then, in order to build a group-based user profile, the friend relationship and search behavior are combined to form a relationship-based friend circle to distinguish the core friend circle and output the core nodes, and the core behavior is output by distinguishing the behavior-based friend circle. After that, using the outputs of the two friend circles, through three steps of constructing a graph attention network of the friend circle, calculating the cross-attention of the relationship and behavior, and constructing a query-aware attention mechanism, a group-based user profile is constructed. Furthermore, through the calculation of the personalized score and relevance score, the results are re-ranked, and the model is trained and optimized to form a method that can output personalized ranking results.

[0005] The method for dynamically building a personal profile is as follows: Design another Transformer to simulate the long-term dependencies between historical behaviors, and the historical interaction representation H u ={h 1 ,..., h n} constitutes the input of the Transformer:

[0006]

[0007] where represents the output of the model, and the weight of each historical interaction is dynamically adjusted through the attention mechanism according to the user's current query intention. Based on the weight α i corresponding to o i under the current query intention, the calculation method is:

[0008]

[0009]

[0010] After that, calculate:

[0011]

[0012] That is, the user's personal profile is obtained

[0013] The method for outputting the core nodes is as follows: The input includes the user's friend network G. Set the candidate node set N including all the friends of the current user and find k core nodes from it to form the corresponding friend circles. In each round, select the friend with the most common friends with the current user as the core node. The nodes and edges related to it on the friend network form a subgraph, representing a friend circle. To ensure the difference between different friend circles, delete the edges included in this friend circle from G, and repeat the above steps. Finally, output k r relation-based friend circles and the corresponding core friends.

[0014] The method for outputting the core behavior points is as follows: Among the nodes of the friend network G, construct edges according to whether the same search behavior is included in the history. At the same time, we add all the behaviors of the current user to this graph. Then, in each round, we select the user behavior that connects the most users and use this behavior as the core node. The users connected to it together form a behavior-based friend circle. The input of this algorithm is the behavior-based friend network and the candidate node set composed of the historical behaviors of the current user. Finally, find k b behavior-based friend circles and the corresponding core behaviors.

[0015] The construction method of the graph attention network for the friend circle is as follows: Use the graph attention network to obtain the representation of this friend circle. For the user g in the friend circle, his personal portrait is represented as The specific calculation is as follows: Assume for the friend circle c i , the representation of the core node is f i , and the aggregation function of the graph attention network is: where is regarded as the representation of the friend circle c i , W is the model parameter, and α ig is the weight of the friend weight user g. The relation-based and behavior-based friend circles are respectively represented as C r,f and C b,f .

[0016] The calculation method of the cross-attention between relations and behaviors is as follows: Connect the representations C r,f and C b,f of the two friend circles, and then input them into the masked transformer: C f =Transformermas k e d ([C r,f , C b,f) Output of the cross-attention layer Represents the representation of the friend circle after fusing relationships and enhancing behaviors.

[0017] The construction method of the query-aware attention mechanism is as follows: learn the attention weights on different circles for the user's current query intention, given the representation of each friend circle We use a query-aware attention mechanism to calculate the group-based user profile according to q s Calculate the group-based user profile The weight of each friend circle is represented as α i , and the calculation method is as follows: Obtain the group-based user profile

[0018] The personalized score is denoted as score Use a multi-layer perceptron to automatically adjust the weights of different parts, and select the cosine similarity to calculate the matching degree between the document and the profile:

[0019] The relevance score is denoted as p(d|q). Considering the semantic similarity between the original query and the document, extract the features F of each document related to clicks and topics q,d , and calculate the relevance score through a multi-layer perceptron. The calculation method of the relevance score is as follows:

[0020] The training and optimization method is as follows: use the LambdaRank sorting algorithm to train the model. On the basis of pairwise, according to the change of the final result MAP after swapping the order of document pairs, add the corresponding weight Δ to each document pair, and select the document d in the relevant document set i and the document d in the irrelevant document set j as a pair of data to train the model. The loss function is the cross-entropy between the predicted value and the actual value, which is defined as follows:

[0021]

[0022] Loss(LambdaRank) = ΔLoss(RankNet)

[0023] where p ij represents the predicted probability that document d i is more relevant than d j , represents the actual probability, which is calculated through the logistic function. The formula is as follows:

[0024]

[0025] Finally, the AdamOptimizer optimizer is used to gradually optimize the model, and the final obtained scores are sorted to obtain the personalized sorting result.

[0026] The technical effects to be achieved by the present invention are as follows:

[0027] (1) By leveraging the advantages of neural networks, the influence of similar users is strengthened at the semantic level, thereby realizing a better group-based personalized search algorithm.

[0028] (2) In order to overcome the over-reliance of existing methods on historical behavior, the user's friend network is introduced into personalized search. The friend network can often reflect the friend relationships in the real world of users, so it can provide effective personalized information.

[0029] (3) In order to more accurately find similar users, the similarity between users is measured by fusing the similarity of search behavior and the closeness of friend relationships.

[0030] (4) According to search behavior and friend relationships, the current user is grouped into different friend circles, thereby finely modeling the user's group-based portrait. Description of the Drawings

[0031] Figure 1 Framework of the group-based personalized search method that fuses search behavior and friend network;

[0032] Figure 2 Algorithm logic of the friend circle; Detailed Embodiment

[0033] The following are the preferred embodiments of the present invention in combination with the drawings, and the technical solutions of the present invention are further described, but the present invention is not limited to this embodiment.

[0034] The present invention proposes a personalized search method that fuses search behavior and friend network and a system using this method.

[0035] The group-based personalized search method that fuses search behavior and friend network is based on the group-based personalized algorithm and the friend network-based personalized search algorithm.

[0036] Group-based personalized algorithm: Group-based search aims to improve search results by leveraging the query logs of similar users. Existing methods for extracting similar users can be divided into two categories: based on search behavior or social relationships. The first method mainly finds the top K users with similar search behavior, and then performs personalized sorting on the results according to these users. The second method mainly models user preferences based on social relationships. They construct a graph containing social relationships with users, queries, and documents, and then apply graph optimization algorithms to iteratively calculate the similarity between queries and documents.

[0037] Personalized Search Based on Friend Network: When users lack historical activities, referring to the user profiles of similar users to personalize results can improve ranking quality. To address existing problems, we propose a friend-enhanced personalized search model that strengthens similar users in the semantic space through neural networks. It integrates the friend network to solve the problem of sparse historical data. Specifically, to construct group-based user profiles in a fine-grained manner, we divide users into multiple friend circles based on their search behaviors and friend relationships. In the following text, they are referred to as behavior-based friend circles and relationship-based friend circles. With their complementary effects, more similar users play a greater role in constructing user profiles.

[0038] Suppose for a user u, whose historical data includes long-term history and short-term history The former includes interaction behaviors in previous sessions where n represents the number of queries included in the previous session, and the latter includes a series of queries and candidate documents in the current session t is the current timestamp. The user's friend network can be represented as a graph, G = {V, E}, where V is the set of nodes containing the current user and his friends, and E represents the friend relationships between these users. When given a new query q and its candidate document set D = {d1, d2,...}, our task is to score each candidate document in D, and the final score is expressed as p(d|q, H, G), which consists of two parts:

[0039]

[0040] where p(d|q) represents the relevance score between the document and the query, represents the personalized score based on the user profile. represents the user's personal profile, represents the group-based user profile. is a multi-layer perceptron (MLP) used to balance the weight relationship between the two. The model diagram is as Figure 1 shown.

[0041] Personalized Search Method Integrating Search Behavior and Friend Network:

[0042] On this basis, the input content of the personalized search method that integrates search behavior and friend network includes the user's friend network, historical search behavior, and current query. First, to construct a personal profile, we use two Transformer structures to model the long-term and short-term history respectively. Then, to build a group-based user profile, we combine friend relationships and search behavior to form multiple friend circles. Under the interaction of two types of friend circles, the core friend circle will be considered more. Next, we will introduce the calculation process of the personalized score in detail.

[0043] 1. Model the personal profile

[0044] The key to personalized search is how to model the user's interests based on the user's historical search behavior. Inspired by previous research, we model the user's long-term and short-term historical search behaviors respectively. The former describes the more long-term user characteristics, and the latter usually represents the user's recent interests or temporary information needs. Since Transformer has a strong long-term dependence ability, we try to apply it to the modeling of the personal profile through the following two steps.

[0045] (2) Dynamically establish the personal profile: Long-term search behavior usually reflects the user's background and stable interests. For example, a user who often submits queries related to "pytorch" is more likely to be a programmer. To model the user's long-term interests, we design another Transformer to simulate the long-term dependence relationship between historical behaviors. Similar to the short-term history, the interaction representation H u ={h 1 ,..., h n} constitutes the input of the Transformer:

[0046]

[0047] where represents the output of the model. Intuitively, not all long-term interactions are relevant to the current query intention. Based on this idea, we dynamically adjust the weight of each historical interaction through the attention mechanism according to the user's current query intention. The personal profile is calculated by weighted summation of historical interactions:

[0048]

[0049] where α i is the weight corresponding to o i under the current query intention. It is calculated by inputting o i and q s into a multi-layer perceptron and normalizing through the softmax function.

[0050]

[0051]

[0052] Finally, we obtain the user's personal profile and the current query intention. However, when the user's historical data is limited, the user's personal profile is not sufficient to fully depict the user's interests. To solve this problem, a group-based user profile is constructed next.

[0053] 2. Formation of friend circles

[0054] In real life, users can usually be divided into different friend circles, such as colleagues, relatives, classmates, etc. Each friend circle can reflect one aspect of the user's characteristics. In this section, we attempt to form multiple friend circles of users to capture the group-based user profile in a fine-grained manner. Friend relationships can provide us with a way to measure the intimacy between users without any behavior. Based on this consideration, we divide users into multiple friend circles according to relationships and behaviors respectively. The former tends to group users with similar backgrounds into one circle, while the latter focuses on similar information needs. The details of forming friend circles from two perspectives are as follows.

[0055] (1) Relationship-based friend circles: This method forms friend circles based on the user's friend relationships. Since friendships in real life are usually established based on shared experiences, users in the same relationship-based friend circle may have the same background. Usually, some friends in each circle are closer to the current user. Establishing friend circles based on these closer friends can more accurately reflect the group information of the user. To find close friends, we use the number of common friends as an indicator to measure the intimacy between users. The algorithm for forming friend circles is as Figure 2 shown.

[0056] The input of the algorithm includes the user's friend network G. We set the candidate node set N and find k core nodes from it and form the corresponding friend circles. Here, the candidate node set includes all the friends of the current user. In each round, we select the friend with the most common friends with the current user as the core node. The nodes and edges related to it on the friend network form a subgraph, representing a friend circle. To ensure the difference between different friend circles, we delete the edges included in this friend circle from G and repeat the above steps. The output of the algorithm is k r relationship-based friend circles and the corresponding core friends.

[0057] (2) Behavior-based friend circles: The formation of friend circles is not only based on the same background, but can also be built on similar interests, such as sports, movie stars, etc. Historical search behaviors can reflect users' interests to a certain extent. In this part, we try to group users according to their historical search behaviors. Users in the same behavior-based friend circle may show similar interests. Some search behaviors can usually reflect group interests. The friend circles formed based on these behaviors are more reliable for building group-based user portraits.

[0058] Among the nodes of the friend network G, we construct edges according to whether the history contains the same search behavior. At the same time, we add all the behaviors of the current user to this graph. Then, in each round, we select the user behavior that connects the most users and use this behavior as the core node, which together with the connected users forms a behavior-based friend circle. The input of this algorithm is the behavior-based friend network and the set of candidate nodes composed of the historical behaviors of the current user. Finally, we can find k b behavior-based friend circles and the corresponding core behaviors.

[0059] 3. Modeling Group-based User Portraits

[0060] In this section, we will introduce how to construct group-based user portraits using the two types of friend circles that have been partitioned. It mainly includes the following three steps:

[0061] Step 1, Graph Attention Network for Friend Circles: Each friend circle calculated in the above steps can be regarded as a graph. To learn the importance of each node on this graph, we use the Graph Attention Network (GAT) to obtain the representation of this friend circle. For user g in the friend circle, his personal portrait is represented as The specific calculation is as follows:

[0062]

[0063] Suppose for friend circle c i , the representation of the core node is f i , and the aggregation function of the graph attention network is:

[0064]

[0065] where is regarded as the representation of friend circle c i , W is the model parameter, and α ig is the weight of user g in the friend weight. Finally, the relationship-based and behavior-based friend circles are respectively represented as C r,f and C b,f .

[0066] Step 2, Cross-Attention of Relationships and Behaviors: As mentioned above, relationship-based friend circles tend to uncover background information, while behavior-based friend circles capture user interests. We believe that friends who appear in both types of circles contribute more to the user profile. In other words, if a relationship-based friend circle and a behavior-based friend circle contain many common users, we should pay more attention to these users through the interaction between the two circles. To achieve such an interaction, we use a masked transformer and only retain the connections between different circles. Specifically, we connect the representations C r,f and C b,f and then input them into the masked transformer:

[0067] C f = Transformer masked ([C r,f ,C b,f )

[0068] The output of the cross-attention layer represents the friend circle after fusing relationship and behavior enhancement.

[0069] Step 3, Query-Aware Attention Mechanism: Intuitively, when a user poses a new query, not all friend circles are helpful. To adjust the weight of each friend circle, we learn the attention weights on different circles for the user's current query intention. Given the representation of each friend circle, we use the query-aware attention mechanism to calculate the group-based user profile s according to q The weight of each friend circle is denoted as α i and is calculated as follows:

[0070]

[0071] Finally, we obtain the group-based user profile which will work together with the personal profile in the personalized re-ranking of search results.

[0072] 4. Re-ranking of Search Results

[0073] In this part, we introduce the calculation method of each part respectively.

[0074] (1) For the personalized score We consider the matching of documents with both individual portraits and group-based user portraits, which we believe will both play a role in personalization. Ultimately, we use a multi-layer perceptron to automatically adjust the weights of different parts. We choose cosine similarity (cossim) to calculate the matching degree between documents and portraits.

[0075]

[0076] (2) For the relevance score p(d|q), we consider the semantic similarity between the original query and the document. In addition, we extract the features F of each document related to clicks and topics q,d , and calculate the relevance score through a multi-layer perceptron. The calculation method of the relevance score is as follows:

[0077]

[0078] 5. Training and Optimization

[0079] We train the model using the LambdaRank sorting algorithm. On a pairwise basis, according to the change in MAP of the final result after swapping the order of document pairs, a corresponding weight Δ is added to each document pair, so that the average accuracy of the final sorting result is higher. We select the document d in the relevant document set i and the document d in the irrelevant document set j as a pair of data to train the model. The loss function is the cross-entropy between the predicted value and the actual value, defined as follows:

[0080]

[0081] Loss(LambdaRank) = ΔLoss(RankNet)

[0082] where p ij represents the predicted probability that document d i is more relevant than d j , represents the actual probability. It is calculated through the logistic function, and the formula is as follows:

[0083]

[0084] Finally, the model is gradually optimized through the AdamOptimizer optimizer. After sorting the scores finally obtained, it is the personalized sorting result.

Claims

1. A personalized search method that integrates search behavior and friend network, characterized in that: First, use the transformer structure to model the user's current query intention using short-term history, and then use another transformer structure to dynamically build a personal profile using long-term history, so as to model and construct a personal profile. Then, in order to build a group-based user profile, combine friend relationships and search behavior to form a relationship-based friend circle, distinguish the core friend circle, and output the core nodes. Output the core behavior through the behavior-based friend circle distinction. Then, use the outputs of the two friend circles to construct a group-based user profile through three steps: constructing a graph attention network of the friend circle, calculating the cross-attention of relationships and behaviors, and constructing a query-aware attention mechanism. Furthermore, through the calculation of personalized scores and relevance scores, re-rank the results, and train and optimize the model to form a method that can output personalized ranking results.

2. The personalized search method that integrates search behavior and friend network according to claim 1, characterized in that: The method for dynamically building a personal profile is as follows: Design a transformer to simulate the long-term dependencies between historical behaviors, and the interaction representation H in history u ={h 1 ,..., h n} constitutes the input of the transformer: Among them represents the output of the model, dynamically adjusts the weight of each historical interaction through the attention mechanism according to the current query q of the user, and is based on o under the current query intention i The corresponding weight α i The calculation method is as follows: After that, calculate: That is, the user's personal portrait is obtained 3. The personalized search method that integrates search behavior and friend network according to claim 2, characterized in that: The method for outputting the core nodes is as follows: The input includes the user's friend network G. Set the candidate node set N including all the friends of the current user, find k core nodes from it and form the corresponding friend circles. In each round, select the friend with the most common friends with the current user as the core node. The nodes and edges related to it on the friend network form a subgraph, representing a friend circle. To ensure the difference between different friend circles, delete the edges included in this friend circle from G, and repeat the above steps. Finally, output k r relationship-based friend circles and the corresponding core friends; The core behavior point output method is as follows: Among the nodes of the friend network G, edges are constructed based on whether the same search behavior is included in the history. At the same time, all the behaviors of the current user are added to the graph formed by the friend network G. Then, in each round, the user behavior that connects the most users is selected, and the user behavior that connects the most users is used as the core node, and together with the connected users, a behavior-based friend circle is formed. Finally, k b behavior-based friend circles and the corresponding core behaviors are found.

4. The personalized search method that integrates search behavior and friend network according to claim 3, characterized in that: The construction method of the graph attention network for the friend circle is as follows: Use the graph attention network to obtain the representation of the friend circle. For user g in the friend circle, his personal portrait is represented as The specific calculation is as follows: Suppose for the friend circle c i , the representation of the core node is f i , and the aggregation function of the graph attention network is: where is regarded as the representation of the friend circle c i , W is the model parameter, and α ig is the weight of user g, the friend circles based on relationships and behaviors are respectively represented as C r,f and C b,f .

5. The personalized search method that integrates search behavior and friend network according to claim 4, characterized in that: The calculation method of the cross-attention of the relationship and behavior is as follows: Connect the representations C r,f and C b,f , and then input them into the masked transformer: C f = Transformer masked ([C r,f , C b,f ) The output of the cross-attention layer represents the representation of the friend circle after fusing the relationship and behavior reinforcement.

6. The personalized search method that integrates search behavior and friend network according to claim 5, characterized in that: The construction method of the query-aware attention mechanism is as follows: learn the attention weights on different circles for the user's current query intention, and given the representation of each friend circle Use the query-aware attention mechanism according to q s Calculate the group-based user profile The weight of each friend circle is represented as α i , and the calculation method is as follows: Obtain the group-based user profile 7. The personalized search method that integrates search behavior and friend network according to claim 6, characterized in that: The personalized score is denoted as score A multi-layer perceptron is used to automatically adjust the weights of different parts, and the cosine similarity is selected to calculate the matching degree between the document and the portrait: The relevance score is denoted as p(d|q). Considering the semantic similarity between the original query and the document, features F related to clicks and topics of each document are extracted. q,d , and the relevance score is calculated through a multi-layer perceptron. The calculation method of the relevance score is as follows:

8. The personalized search method that integrates search behavior and friend network according to claim 7, characterized in that: The training and optimization method is as follows: The LambdaRank sorting algorithm is used to train the model. Based on pairwise, according to the change in MAP of the final result after swapping the order of document pairs, a corresponding weight Δ is added to each document pair. A document d in the relevant document set i and a document d in the irrelevant document set j are used as a pair of data to train the model. The loss function is the cross-entropy between the predicted value and the actual value, which is defined as follows: Loss(LambdaRank) = ΔLoss(RankNet) where p ij represents the predicted probability that document d i is more relevant than d j and represents the actual probability, which is calculated by the logistic function and the formula is as follows: and represents the actual probability, which is calculated by the logistic function and the formula is as follows: Finally, gradually optimize the model through the AdamOptimizer optimizer, and after sorting the finally obtained scores, it is the personalized ranking result.

9. A personalized search system that integrates search behavior and friend network, characterized in that: Apply the personalized search method according to any one of claims 1-8.

Citation Information

Patent Citations

  • User portrait construction method and dialogue method and device based on user portrait

    CN112328849A

  • Social network powered search enhancements

    US20120158720A1