Explainable friend recommendation method based on large language model tag classification

Through the label classification method based on large language model and combined with the multi-objective evolution optimization framework, the trade-off problem of recommendation system between interpretability and performance is solved, the accuracy and diversity of recommendation results are improved, and user trust and recommendation are enhanced. System transparency, especially in data sparsity and cold start-up situations.

CN118964570AActive Publication Date: 2024-11-15ANHUI UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411050497.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-15
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

The existing recommendation system is difficult to weigh between interpretability and performance, which makes it difficult for users to understand the reasons for recommendation, and it is difficult to accurately interpret the recommendation results in the case of data sparsity, which affects user trust and the complexity of the recommendation system.

Method used

Using a tag classification method based on a large language model, a text attribute lexicon is constructed by obtaining the user's text attribute information and attention information, and a text attribute lexicon is used to extract and classify features, and the similarity, attention and recommendation between users are calculated. , combine the multi-objective evolution optimization framework to optimize the recommendation list, and provide explainable personalized friend recommendations.

Benefits of technology

It improves the accuracy and diversity of recommendation results, increases the transparency and user trust of the recommendation system, and provides a better personalized recommendation experience, especially in cold start situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964570A_ABST
    Figure CN118964570A_ABST
Patent Text Reader

Abstract

The invention discloses an interpretable friend recommendation method based on large language model tag classification. The method comprises the following steps: acquiring text attribute information and attention information of a user; constructing a text attribute lexicon of the user, and re-segmenting and updating text attributes of the user based on the text attribute lexicon to obtain an updated text attribute information set; taking the updated text attribute information set as a large language model Qamp; a, inputting a question and answer mode, and performing feature extraction and classification; calculating the similarity, the attention and the recommendation among the users; obtaining a recommended candidate recommendation list CRL based on the recommendation degree; and optimizing the candidate recommendation list CRL by using a multi-objective evolutionary optimization framework to obtain an optimal recommendation list. The method aims at achieving interpretability of recommendation results between users, and finally the balanced solution set meeting the user requirements is obtained to solve the personalized friend recommendation problem at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of friend recommendation, and more specifically to an explainable friend recommendation method based on large language model label classification. Background Art

[0002] The Recommender System (RS) is essentially an information filtering system that aims to recommend products, services or information to users based on their preferences and behaviors. Algorithmic recommendations can save users' time, improve user satisfaction and build user trust. However, users not only want to receive recommendations, but also want to understand the reasons for the recommendations. The explainable recommendation system is different from the traditional recommendation system. While recommending to users, it also provides users with reasons for the recommendations and explains to users why these items are recommended, making the recommendations easier for users to accept. The explainable recommendation system can not only improve the transparency of the recommendation system, but also improve users' trust and acceptance of the recommendation system, thereby improving users' satisfaction with the recommended products.

[0003] In the face of different practical application scenarios, the explanation of the recommendation system has different forms. For example, there are explanations based on users and items. The user-based explanation analyzes the behavioral characteristics of the target user, finds a user group with similar interests and experiences, and then recommends content that may be of interest to the target user based on the preferences of this group, while the item-based explanation allows the user to know that the recommended item is similar to other items he has liked before; the feature-based explanation matches the content features of the user's interest in the candidate items with the user's preferences. By using the features as explanations, the user can intuitively understand why the content is recommended, such as generating scholar recommendations based on research interests, academic fields, and schools; text explanation generates text information as an explanation to help users understand each recommendation; visual explanation uses the intuitiveness of visual images to make explainable recommendations.

[0004] In recent years, with the explosive growth of Internet information, tags (keywords specified by users to describe items) have become increasingly important in the field of Internet information retrieval, and tag recommendation has therefore received widespread attention from researchers. First, tags can be freely associated by users, reflecting their personalized preferences. Second, tags express the semantic relationship between items, which helps to evaluate the quality of potential items. Third, by utilizing the co-occurrence of tags, we can build both user communities and item clusters, and further find relevant and interesting items for target individuals. Therefore, tags provide us with a promising way to solve some thorny problems in recommendation systems, such as the cold start problem.

[0005] A large number of studies have discussed how to apply tags to the field of recommendation systems. Wu et al. proposed a generative model (Tag2Word) to generate words based on the tag-word distribution and the tag itself. He et al. proposed a recommendation algorithm that combines tag data and naive Bayes classification to address the user cold start problem. Tag data is used to represent the user's attribute characteristics, and a naive Bayes classifier is used to match new and old users, and similar user groups are used to infer the interests of new users. Chen et al. proposed a personalized tag recommendation model enhanced by graph neural networks, which incorporates graph neural networks into the pairwise interaction decomposition model and considers two types of interaction graphs generated by tag assignment (i.e., user-tag interaction graph and item-tag interaction graph). For each interaction graph, a graph neural network is used to capture the collaborative signals encoded in the interaction graph, and the collaborative signals are incorporated into the learning of entity representation by transferring and assembling the representation of entity neighbors along the interaction graph. Zou et al. proposed a tag-aware recommendation model based on attention learning, which can capture multiple potential features of users and items based on tags. The model uses an embedding method to generate dense tag-based feature vectors for each user and each item. In order to compress these vectors into fixed-length feature vectors, an attention pooling layer is constructed to automatically assign different weights according to the importance of different features. The feature vectors of users and items are concatenated as the input of a multi-layer fully connected network to learn nonlinear high-level interaction features.

[0006] Although the tag recommendation algorithms are different, the tag recommendation methods can be divided into three categories according to the three characteristics of the tag recommendation task: the diversity of project content, the correlation between tags, and the differences in user preferences: content-based tag recommendation methods; tag correlation-based recommendation methods; and user preference-based recommendation methods. Similarly, there are some challenges that need to be addressed in the current recommendation system. The first point is the high complexity. An explainable recommendation system needs to consider many factors such as user preferences, behavioral characteristics, and recommendation reasons. The system design and implementation are relatively complex. The second point is the trade-off between explainability and performance. While pursuing the explainability of the recommendation system, it may affect the performance and accuracy of the system. It is necessary to balance explainability and performance. The third point is the difficulty of user understanding. Users may find it difficult to understand the explanations or recommendation reasons provided by the recommendation system, resulting in a decrease in the user's trust in the recommendation results. The fourth point is data sparsity. In the face of data sparsity, an explainable recommendation system may find it difficult to accurately explain the reasons or basis for the recommendation results. Summary of the invention

[0007] The purpose of the present invention is to provide an explainable friend recommendation method based on large language model label classification, so as to recommend other friend users with similar characteristics to each user in multiple platforms. The recommendation results must meet the requirements of accuracy and diversity, as well as explainability, so as to explain the reasons or basis for the recommendation results, thereby further realizing personalized friend recommendations for users.

[0008] In one aspect of the present invention, the present invention proposes an explainable friend recommendation method based on large language model label classification. According to an embodiment of the present invention, the method comprises the following steps:

[0009] (1) Obtaining the user's text attribute information and attention information;

[0010] (2) constructing a user's text attribute word library, re-segmenting and updating the user's text attributes based on the text attribute word library, and obtaining an updated text attribute information set;

[0011] (3) The updated text attribute information set is used as the input of the large language model Q&A question-answering mode and features are extracted and classified to construct the user's basic information and obtain the user's classification information;

[0012] (4) Calculate the similarity, attention, and recommendation between users;

[0013] (5) Based on the recommendation degree obtained in step (4), a matrix ReSim with a dimension of N×N is obtained, where each column represents the recommendation degree between the current user and other users. The recommendation degrees are sorted in descending order and the top K are taken, thereby obtaining a candidate recommendation list CRL recommended for N users, with a dimension of K×N;

[0014] (6) The candidate recommendation list CRL is optimized using a multi-objective evolutionary optimization framework to obtain the optimal recommendation list.

[0015] In addition, the explainable friend recommendation method based on large language model label classification according to the above embodiment of the present invention may also have the following additional technical features:

[0016] In some embodiments of the present invention, the step (1) is specifically as follows: Let U be the set of all text attribute information of each user, where U = {u 1 ,u 2 ,…u i ,…u N}; Let V be all the attention information of each user, where V = {v 1 ,v 2 ,…v i ,…,v N}.

[0017] In some embodiments of the present invention, the step (2) is specifically as follows: Assuming there are N users and digital serialization is performed, the text attribute information set U for the N users is U={u 1 ,u 2 ,…u i ,…u N}There is an over-segmentation problem. A new text attribute word library Lex is constructed and the text attribute information set U = {u 1 ,u 2 ,…u i ,…u N} re-segmentation, removal of duplicate information in user attributes, deletion of stop words and unification of capitalization, and finally obtaining the updated text attribute information set U'={u' 1 ,u' 2 ,…,u' i ,…u' N}.

[0018] In some embodiments of the present invention, in step (3), the classification is specifically divided into seven categories of labels, and the classification information is recorded as Lab = {lab 1 ,lab 2 ,…,lab i ,…,lab N}, lab i Represents the tag set of the i-th user.

[0019] In some embodiments of the present invention, the step (4) is specifically as follows:

[0020] (401) Calculate the similarity J between users

[0021] The similarity between users with the same attribute tags is calculated using the Jaccard similarity coefficient:

[0022]

[0023] In the formula, J(A,B) represents the two user label sets A and B lab A and lab B The similarity between A ∩lab B Indicates the number of elements in the intersection of user A's tag set and user B's tag set, lab A ∪lab B Indicates the number of elements in the union of user A's label set and user B's label set. The larger the J value, the more similar the attribute labels between user A and user B are.

[0024] (402) Calculate the attention between users Att

[0025] Based on all the attention information of N users V = {v 1 ,V 2 ,…v i ,…,v N} to build a social network. The set user attention formula represents the attention information of users in the social network. The defined attention is as follows:

[0026]

[0027] In the formula, Att(A,B) represents the potential attention of user A to user B. User B is one of the users followed by user A. AN(A,B) represents the number of users followed by user B. Max(AN(A)) represents the maximum number of users followed by users followed by user A. The larger the Att value, the greater the probability that user A follows user B.

[0028] (403) Calculate the recommendation degree ReSim between users

[0029] The recommendation degree of user A recommending user B is defined as follows:

[0030]

[0031] In the formula, the larger the ReSim value is, the greater the probability that user A recommends user B is.

[0032] In some embodiments of the present invention, step (6) includes the following steps: selecting the accuracy and diversity of the recommendation list as a multi-objective function, initializing the population, and evolving the population.

[0033] In some embodiments of the present invention, the selection of measuring the accuracy and diversity of the recommendation list as a multi-objective function is specifically as follows:

[0034] Let PopSize be the population size, maxGen be the total number of iterations, Gen be the current number of iterations and set to 0, and k be the number of friend users recommended to a single user;

[0035] Regarding accuracy, similarity values ​​are used for combined calculation; for user A, the first k users are selected from the candidate recommendation list CRL for similarity calculation, which is specifically as follows:

[0036]

[0037] Where k is the length of the recommendation list R, ReSim(A,R(i)) represents the recommendation similarity between user A and the i-th user in the friend user list R recommended for user A;

[0038] The diversity of the recommendation list is measured by the number of label attributes. For user A, the number of attribute labels of each user in the friend user recommendation list R is calculated, and the number of labels is used as a reflection of diversity. The specific details are as follows:

[0039]

[0040] Where k is the length of the recommendation list R, and |lab(R(j))| represents the number of tags of the i-th user in the list R recommended for user A.

[0041] In some embodiments of the present invention, the initialization population is specifically as follows: an initial population P is generated by adopting a random initialization strategy, that is, a decision matrix of PopSize rows and k columns is randomly generated, and a target matrix of PopSize rows and M columns is calculated.

[0042] In some embodiments of the present invention, the population evolution comprises the following steps:

[0043] a. Individual choice

[0044] Randomly divide the population P into two equal subpopulations P 1 and P 2 , and the superiority and inferiority between individuals in the two subpopulations are calculated by the density estimate Fit based on the transfer, which is specifically defined as follows:

[0045]

[0046] In the formula, Fit(p i ,P) is individual p i The transition-based density estimate in population P, p i and p j are the i-th and j-th individuals of population P, n represents the number of population P; when d(p i ,p j ) is less than 0, d(p i ,p j ) is 0, otherwise d(p i ,p j ) is the individual p i and individual p j The Euclidean distance between the objective function f; f m is the mth objective function, M represents the number of objective functions f; in this paper, there are two objective functions f, namely Acc and Cov; assuming that the subpopulation P 1 P 2 excellent;

[0047] b. Generation of offspring

[0048] Based on the subpopulation P 1and P 2 , use the crossover operator and mutation operator to generate two new populations P' 1 and P' 2 , and merge these two new populations to obtain the final population P';

[0049] c. Environmental selection

[0050] The population P∪P' is calculated and sorted using the non-dominated sorting algorithm and the transfer-based density estimation method to obtain a sorted candidate population with multiple frontiers; the individuals with the top PopSize are selected and retained for the next generation, that is, updated to the population P; finally, the number of iterations Gen = Gen + 1, and go to step a, and keep looping until the number of iterations Gen> maxGen;

[0051] d. Select the first individual from the sorted population P as the user's optimal recommendation list and output it.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] 1. This paper proposes an explainable friend recommendation method based on large language model label classification, which provides an effective solution for personalized recommendation in the absence of historical data. By using a large language model to extract and represent text terms, and combining user attention information and the personalized friend recommendation capabilities of a multi-objective evolutionary algorithm, the algorithm can improve the recommendation effect in cold start situations. At the same time, the capabilities of the large language model can generate reasonable recommendation explanations, increase the transparency of the recommendation system and user trust, and provide users with a better recommendation experience.

[0054] 2. The current recommendation algorithm is too dependent on general indicators such as popularity and popularity, resulting in a lack of personalization and novelty in the recommendation results. At the same time, there is a lack of explanation and reasoning for the recommendation results, making it difficult for users to understand the basis of the recommendation, which reduces the user's trust in the recommendation system. The present invention uses an explainable friend recommendation method based on large language model label classification, and then uses a large language model to classify the user's text attribute information, and then improves the diversity among users based on a multi-objective evolutionary framework, wherein label classification can well explain the basis of the recommendation results, label-based recommendation degree calculation can improve the accuracy of the recommendation results, and the multi-objective evolutionary framework can increase the diversity of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flowchart of an explainable friend recommendation method based on large language model label classification in an embodiment of the present invention;

[0056] Figure 2It is a schematic diagram of the content classification part of the large language model proposed in an embodiment of the present invention;

[0057] Figure 3 A schematic diagram of a multi-objective evolutionary recommendation part proposed in an embodiment of the present invention;

[0058] Figure 4 This is a friend recommendation interface designed in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] An explainable friend recommendation method based on large language model label classification, the process is as follows Figure 1 As shown, proceed as follows:

[0061] Step 1: Get the user's text attribute information and attention information.

[0062] Let U be the set of all text attribute information of each user, where U = {u 1 ,u 2 ,…u i ,…u N},u i represents the text attribute information of the ith user, N is the total number of users; let V be all the attention information of each user, where V = {v 1 ,v 2 ,…v i ,…,v N},v i Indicates the attention information of the i-th user;

[0063] Step 2: For all users' text attribute information U = {u 1 ,u 2 ,…u i ,…u N} to analyze, find out the attribute information of over-segmentation and build the user's text attribute word library based on it; re-segment and update the user's text attribute information based on the text attribute word library to obtain an updated user text attribute information set. Note: Over-segmentation refers to the process of splitting a word into multiple parts unnecessarily in natural language processing, making the originally grammatically and meaningful words incomplete or inaccurate.

[0064] Assume that there are N users and digital serialization is performed, and the text attribute information set U for N users is U={u 1 ,u 2 ,…u i ,…u N}There is an over-segmentation problem, for example, "Tianjin University of Technology" is divided into "Tianjin" and "University of Technology"; "ping-pong racket" is divided into "ping-pong" and "racket", etc. Based on the above problems, this method first constructs a new vocabulary Lex, which contains the over-segmented words in the data set, and then performs a text attribute information set U = {u 1 ,u 2 ,…u i ,…u N}Re-segment the words, remove duplicate information in user attributes, delete stop words, and unify the capitalization, and finally obtain the updated text attribute information set U'={u' 1 ,u' 2 ,…,u' i ,…u' N}.

[0065] Step 3: Use the updated text attribute information set as the input of the large language model Q&A question-answering mode and perform feature extraction and classification to build the user's basic information and obtain the user's classification information.

[0066] By asking the big language model a question like "Please divide it into 7 categories based on the text attribute terms provided"; then the big language model will answer which 7 categories it is divided into. Assume that we provide the big model with the user information of Scholar.com and ask "Please divide it into 7 categories based on the text attribute terms provided", the big language model's answer is "It can be divided into the following 7 categories: name, work unit or school, research interests, degree or title, academic organization, competition award, and others". According to the 7 categories answered by the big language model, the basic information of the user is constructed to obtain the key information (labels) of N users Lab = {lab 1 ,lab 2 ,…,lab i ,…,lab N}.

[0067] For example Figure 2 As shown in the figure, the user names are serialized into {User1, User2, ..., Useri, ..., UserN}, where Useri is the name of the i-th user; then the text attribute information of each user is subjected to the Q&A question-answering mode of the large language model LLM, all the text attribute information is divided into 7 categories and the labels obtained after the classification of N users are expressed as Lab = {lab 1 ,lab 2,…,lab i ,…,lab N} table indicates that lab i represents the label set of the i-th user, lab i ={Label1, Label2, …, Labelj, …, Labeln}, Labelj is the jth label of the i-th user, and the value of n is determined by the length of the text attribute information of the i-th user.

[0068] Step 4: Calculate the similarity, attention, and recommendation between users.

[0069] Step 4.1: Obtain the similarity J between users.

[0070] The similarity between users with the same attribute tags is calculated using the Jaccard similarity coefficient, which is specifically defined as follows:

[0071]

[0072] In formula (1), J(A,B) represents the two user label sets A and B lab A and lab B The similarity between A ∩lab B where represents the number of elements in the intersection of user A’s tag set and user B’s tag set, lab A ∪lab B Indicates the number of elements in the union of user A's tag set and user B's tag set. The larger the J value, the more similar the attribute tags between user A and user B. For example, user A has 3 tags, user B has 3 tags, and user A and user B have 2 duplicate tags, so J(A,B) = 2 / (3+3-2) = 0.5.

[0073] Step 4.1: Get the attention between users (Att).

[0074] Based on all the attention information of N users V = {v 1 ,v 2 ,…,v N} to build a social network. The set user attention formula can represent the attention information of users in the social network. The defined attention is as follows:

[0075]

[0076] In formula (2), Att(A,B) represents the potential attention of user A to user B. User B is one of the users followed by user A. AN(A,B) represents the number of users followed by user B, and max(AN(A)) represents the maximum number of users followed by user A. The larger the Att value, the greater the probability that user A follows user B. For example, there are 3 users followed by user B, so AN(A,B) = 3. The number of users followed by user B is the largest, so max(AN(A)) = 3, Att(A,B) = 3 / 3 = 1.

[0077] For example Figure 2 As shown, the third user User3 has 3 follow-up information v 3 ={User0, User1, User65}, while User0 follows User73, User1 follows User0, User59, User63, User70, User73 and User76 respectively, and User65 follows User0 and User73 respectively. Because User3 has followed User0, Att(User3, User0) = 0. According to statistics, User59, User63, User70, and User76 have been followed once, and User73 has been followed 3 times, so Att(User3, User59) = 1 / 3, Att(User3, User63) = 1 / 3, Att(User3, User70) = 1 / 3, Att(User3, User76) = 1 / 3, and Att(User3, User73) = 3 / 3 = 1.

[0078] Step 4.2: Obtain the recommendation degree (ReSim) between users.

[0079] The friend candidate recommendation list CRL to be recommended to each user is based on the recommendation value of each user, and the recommendation value is calculated by weighting the similarity between users with the same attributes and the attention of users in the same social network. The sum of the weights is 1. The specific definition of the recommendation value for recommending user B to user A is as follows:

[0080]

[0081] In formula (3), the larger the ReSim value is, the greater the probability of recommending user B to user A is. Based on the examples given in steps 1.3 and 1.4, ReSim(A,B)=(1+0.5) / 2=0.75.

[0082] Step 5: Calculate the recommendation degree between N users based on formula (3) to obtain a matrix ReSim with a dimension of N×N, where each column represents the recommendation degree between the current user and other users. Sort in descending order according to the recommendation degree value and take the first K=100 to obtain a friend candidate recommendation list CRL recommended by N users, with a list length of K.

[0083] Step 6: Use the multi-objective evolutionary optimization framework to optimize the candidate recommendation list CRL, and design two objective functions to meet the accuracy and diversity of user recommendation results; let PopSize be the population size, maxGen be the total number of iterations, Gen be the current number of iterations and set to 0, and k be the number of friend users recommended to a single user.

[0084] Step 6.1: Set the objective function

[0085] The accuracy and diversity of the recommendation list are selected as the multi-objective function. Regarding accuracy, the similarity value is used for combined calculation. For user A, the first k users are selected from the candidate recommendation list CRL for similarity calculation. The details are as follows:

[0086]

[0087] In formula (4), k is the length of the recommendation list R, and ReSim(A, R(i)) represents the recommendation similarity between user A and the i-th user in the friend user list R recommended for user A.

[0088] Regarding the diversity function of the recommendation list, we use the number of label attributes to measure it. For user A, we calculate the number of attribute labels of each user in the friend user recommendation list R, and use the number of labels as a reflection of diversity. The details are as follows:

[0089]

[0090] In formula (5), k is the length of the recommendation list R, and |lab(R(j))| represents the number of labels of the i-th user in the list R recommended for user A.

[0091] Step 6.2: Population evolution

[0092] Step 6.2.1. Individual selection

[0093] Randomly divide the population P into two equal subpopulations P 1 and P 2 , and the superiority and inferiority between individuals in the two subpopulations are calculated by the density estimate Fit based on the transfer, which is specifically defined as follows:

[0094]

[0095] In formula (6), Fit(p i ,P) is individual p i The transition-based density estimate in population P, p i and p j are the i-th and j-th individuals of population P, N represents the number of population P; when d(p i ,p j ) is less than 0, d(p i ,p j ) is 0, otherwise d(p i ,p j ) is the individual p i and individual p j The Euclidean distance between the objective function f; f m is the mth objective function, M represents the number of objective functions f. In this paper, there are two objective functions f, namely Acc and Cov. Assume that the subpopulation P 1 P 2 excellent.

[0096] Step 6.2.2: Generation of offspring

[0097] Based on the subpopulation P 1 and P 2 , use the crossover operator and mutation operator to generate two new populations P' 1 and P' 2 , and merge these two new populations to obtain the final population P';

[0098] Step 6.2.3, Environment Selection

[0099] The population P∪P' is calculated and sorted using the non-dominated sorting algorithm and the transfer-based density estimation method to obtain a sorted candidate population with multiple frontiers; the top PopSize individuals are selected and retained for the next generation, that is, updated to the population P; finally, the number of iterations Gen = Gen + 1, and go to step 6.2.1, and the cycle continues until the number of iterations Gen> maxGen;

[0100] For example Figure 3 As shown, it is assumed that a population P is generated for user User1 and divided into subpopulations P 1 and P 2 , subpopulation P 1 and P 2 Crossover and mutation are performed between them to obtain two new populations P' 1 and P' 2The two new populations are merged to obtain the final population P', and then the next generation population P is selected by the environment. When the number of iterations Gen>maxGen, the optimal individual of population P is output, which is also the recommendation list of User1, with a length of k=5.

[0101] Step 7: Select the first one from the sorted population P as the user's optimal individual recommendation list and output it.

[0102] For example Figure 4 The figure shows the designed user recommendation interface. Assuming we input the question "Recommend other users to user User10", the recommendation interface will output the 5 friend users recommended for user User10 and analyze them. The present invention designs a user recommendation interface that displays the basis of the recommendation results, which not only improves the user's trust in the recommendation results, but also makes it easier for the user to accept the recommendation results. In addition, by displaying the recommendation results through the user interface, it is also more convenient to collect user feedback. Users can directly see the detailed information of the recommended items on the interface, making it easier to interact with the system and provide feedback, making the system more intelligent and personalized.

[0103] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.

Claims

1. An explainable friend recommendation method based on large language model label classification, characterized in that: The following steps are involved: (1) Obtaining the user's text attribute information and attention information; (2) constructing a user's text attribute word library, re-segmenting and updating the user's text attributes based on the text attribute word library, and obtaining an updated text attribute information set; (3) The updated text attribute information set is used as the input of the large language model Q&A question-answering mode and features are extracted and classified to construct the user's basic information and obtain the user's classification information; (4) Calculate the similarity, attention, and recommendation between users; (5) Based on the recommendation degree obtained in step (4), a matrix ReSim with a dimension of N×N is obtained, where each column represents the recommendation degree between the current user and other users. The recommendation degrees are sorted in descending order and the top K are taken, thereby obtaining a candidate recommendation list CRL recommended for N users, with a dimension of K×N; (6) The candidate recommendation list CRL is optimized using a multi-objective evolutionary optimization framework to obtain the optimal recommendation list.

2. The explainable friend recommendation method based on large language model label classification according to claim 1, characterized in that: The step (1) is specifically as follows: Let U be the set of all text attribute information of each user, where U = {u1, u2, ...u i ,…u N }; Let V be all the attention information of each user, where V = {v1,v2,…v i ,…,v N }.

3. The explainable friend recommendation method based on large language model label classification according to claim 2, characterized in that: The specific step (2) is as follows: Assuming there are N users and digital serialization is performed, the text attribute information set U for N users is U={u1,u2,…u i ,…u N }There is an over-segmentation problem. A new text attribute word library Lex is constructed and the text attribute information set U = {u1,u2,…u i ,…u N } performs re-segmentation, removes duplicate information in user attributes, deletes stop words, and unifies capitalization, and finally obtains the updated text attribute information set U'={u'1,u'2,…,u' i ,…u' N }.

4. The explainable friend recommendation method based on large language model label classification according to claim 3, characterized in that: In step (3), the classification is specifically divided into seven categories of labels, and the classification information is recorded as Lab = {lab1, lab2, ..., lab i ,…,lab N }, lab i Represents the tag set of the i-th user.

5. The explainable friend recommendation method based on large language model label classification according to claim 4, characterized in that: The step (4) is specifically as follows: (401) Calculate the similarity J between users The similarity between users with the same attribute tags is calculated using the Jaccard similarity coefficient: In the formula, J(A,B) represents the two user label sets A and B lab A and lab B The similarity between A ∩lab B Indicates the number of elements in the intersection of user A's tag set and user B's tag set, lab A ∪lab B Indicates the number of elements in the union of user A's label set and user B's label set. The larger the J value, the more similar the attribute labels between user A and user B are. (402) Calculate the attention between users Att Based on all the attention information of N users V = {v1, v2, ...v i ,…,v N } to build a social network. The set user attention formula represents the attention information of users in the social network. The defined attention is as follows: In the formula, Att(A,B) represents the potential attention of user A to user B. User B is one of the users followed by user A. AN(A,B) represents the number of users followed by user B. Max(AN(A)) represents the maximum number of users followed by users followed by user A. The larger the Att value, the greater the probability that user A follows user B. (403) Calculate the recommendation degree ReSim between users The recommendation degree of user A recommending user B is defined as follows: In the formula, the larger the ReSin value, the greater the probability that user A recommends user B.

6. The explainable friend recommendation method based on large language model label classification according to claim 5, characterized in that: The step (6) includes the following steps: selecting the accuracy and diversity of the recommendation list as a multi-objective function, initializing the population, and evolving the population.

7. The explainable friend recommendation method based on large language model label classification according to claim 6, characterized in that: The method of selecting the accuracy and diversity of the recommendation list as a multi-objective function is as follows: Let PopSize be the population size, maxGen be the total number of iterations, Gen be the current number of iterations and set to 0, and k be the number of friend users recommended to a single user; Regarding accuracy, similarity values ​​are used for combined calculation; for user A, the first k users are selected from the candidate recommendation list CRL for similarity calculation, which is specifically as follows: Where k is the length of the recommendation list R, ReSim(A,R(i)) represents the recommendation similarity between user A and the i-th user in the friend user list R recommended to user A; The diversity of the recommendation list is measured by the number of label attributes. For user A, the number of attribute labels of each user in the friend user recommendation list R is calculated, and the number of labels is used as a reflection of diversity. The specific details are as follows: Where k is the length of the recommendation list R, and |lab(R(j))| represents the number of tags of the i-th user in the list R recommended for user A.

8. The explainable friend recommendation method based on large language model label classification according to claim 7, characterized in that: The initialization population is specifically as follows: an initial population P is generated by adopting a random initialization strategy, that is, a decision matrix of PopSize rows and k columns is randomly generated, and a target matrix of PopSize rows and M columns is calculated.

9. The explainable friend recommendation method based on large language model label classification according to claim 8, characterized in that: The population evolution comprises the following steps: a. Individual choice The population P is randomly divided into two sub-populations P1 and P2 equally, and the superiority and inferiority of individuals in the two sub-populations are calculated by the density estimate Fit based on the transfer. The specific definition is as follows: In the formula, Fit(p i ,P) is individual p i The transition-based density estimate in population P, p i and p j are the i-th and j-th individuals of population P, N represents the number of population P; when d(p i ,p j ) is less than 0, d(p i ,p j ) is 0, otherwise d(p i ,p j ) is the individual p i and individual p j The Euclidean distance between the objective function f; f m is the mth objective function, M represents the number of objective functions f; suppose that subpopulation P1 is better than P2; b. Generation of offspring Based on the subpopulations P1 and P2, use the crossover operator and mutation operator to generate two new populations P'1 and P'2, and merge the two new populations to obtain the final population P'; c. Environmental selection The population P∪P' is calculated and sorted using the non-dominated sorting algorithm and the transfer-based density estimation method to obtain a sorted candidate population with multiple frontiers; the individuals with the top PopSize are selected and retained for the next generation, that is, updated to the population P; finally, the number of iterations Gen = Gen + 1, and go to step a, and keep looping until the number of iterations Gen> maxGen; d. Select the first individual from the sorted population P as the user's optimal recommendation list and output it.

Citation Information

Patent Citations

  • Social media friend recommendation method based on mixing of blog articles and user relationships

    CN108460153A

  • Friend recommendation method, device and equipment and storage medium

    CN109933731A

  • Project recommendation method and device

    CN115269975A

  • Movie recommendation method based on multi-objective optimization

    CN115905716A

  • Construction method of personalized recommendation system based on multi-individual variation

    CN115935063A