A question recommendation method based on motifs in a question and answer community
By combining the learning algorithms of phantom graph neural networks and metapath heterogeneous information networks, and integrating user behavior patterns and text semantic information, the problem of low recommendation accuracy in question-and-answer communities is solved, and more efficient user participation and recommendation effects are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-04-10
AI Technical Summary
Existing question recommendation methods in Q&A communities fail to fully leverage users' mutual assistance history and higher-order information within the network structure, resulting in low recommendation accuracy and decreased user engagement.
We employ a motif-based graph neural network embedding learning algorithm and a meta-path-based heterogeneous information network embedding learning algorithm. By combining user personal characteristics and textual semantic information, we learn user behavior patterns and respondent preferences, and make recommendations by fusing high-order information from multiple motif networks.
It improved the accuracy of question recommendations, enhanced the modeling quality of user embedding, and increased user engagement and recommendation effectiveness.
Smart Images

Figure CN115544373B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of data mining recommendation system based on network embedding learning, and mainly relates to a question recommendation method based on motif in a question and answer community. BACKGROUND
[0002] A question and answer community is an online communication platform in which users can ask questions on a website and other users can answer the questions. It provides a place for people to share and acquire knowledge by asking and answering questions. Since the answering process involves human participation, the questioner can obtain more accurate information. Although the question and answer community has some advantages compared with traditional information search methods, it also faces some unique challenges. First, as the number of users on the website increases, the number of questions also increases, but many questions cannot be answered in a timely manner, which leads to a decrease in the user's confidence in using the website. Second, a user is usually interested in and good at only one or two fields, but the numerous questions make it difficult for a user who wants to answer questions to find suitable questions in a short period of time, thereby reducing the desire to answer questions, which also reduces the user's stickiness to the website. Third, the numerous questions on the website involve a wide range of knowledge and have varying quality, which obviously brings a heavy burden to the website manager. Therefore, recommending the user's help-seeking question to a suitable user for answering can shorten the waiting time of the help-seeking user and find suitable help objects for the user who intends to provide help, thereby improving the user participation of the community and greatly facilitating the operation of the website manager.
[0003] Current methods for question recommendation can be roughly divided into three categories: feature engineering-based, matrix factorization-based, and network embedding learning-based. Feature engineering-based algorithms focus on extracting features from website records. Features such as question tags and the number of questions answered by users are extracted from the answer history. These methods represent the input query with multi-modal characteristics, and then input these features into linear models such as logistic regression or ranking models. These algorithms rely on manually extracted features, which are very time-consuming; matrix factorization models aim to represent answerers and questions in the same latent space. Answerer representation models the expertise of each answerer using selected vocabulary, and question representation is represented by the relevance to these words, and then the answerer is ranked using the inner product of the answerer and question vectors. However, this method relies heavily on the bag-of-words model and usually cannot capture the context information of the question; network embedding learning algorithms recommend users based on the relative expertise of the user and the social relationship based on the question, and learn the representation of the questioner, question and answerer in the same latent space, network embedding learning has become a research hotspot in recent years. Network embedding models learn the global structure information of nodes in the network, and represent the nodes in a low-dimensional latent space, and then use node embedding for recommendation. However, current embedding learning for heterogeneous networks ignores the high-order structure information in the network, which is reflected in question recommendation, that is, the user's mutual assistance history information is not fully mined, and the user's behavior patterns and behavior rules information contained in the network structure are not fully mined. SUMMARY
[0004] In view of the problems existing in the prior art, the present application provides a question recommendation method based on motif in a Q&A community, which can more fully capture the user behavior patterns and behavior rules information contained in the network high-order structure, and fuse with user personal feature information and text semantic information, thereby improving the accuracy of question recommendation.
[0005] The present application adopts the following technical solutions to solve the technical problems:
[0006] The question recommendation method based on motif in a Q&A community of the present application is characterized in that the following steps are performed:
[0007] Step 1, collect the mutual assistance relationship of users in the Q&A community, question text and user feature information and pre-process, so as to establish the questioner set R = {r1, r2,..., r m ..., r M}, the answerer set A = {a1, a2,..., a k ,..., a K}, the question set Q = {q1, q2,..., q l ,..., q LUser set U = {u1, u2, ..., u} s , ..., u S}, and U=R∪A; where r m Let a represent the m-th questioner. k Let q represent the k-th respondent. l Let u represent the l-th question. s Let S represent the s-th user, M represent the total number of questioners, K represent the total number of answerers, L represent the total number of questions, and S represent the total number of users, and S≤M+K;
[0008] Step 2: Establish a heterogeneous network G1 = (V1, E1, T) for questions and answers in the question-and-answer community, and a homogeneous network G2 = (V2, E2) for users. Here, V1 represents the node set consisting of the question set Q and the answerer set A, i.e., V1 = Q∪A, and E1 is the set of edges connecting question nodes and answerer nodes. If the k-th answerer a... k Answered question l q l Then establish the k-th responder a k Node and the l-th question q l Corresponding edges between nodes (q) l a k ); T is the set of two node types: questions and answerers, and T = {t} a , t q}, t a This indicates that the node type is a responder node, t q The node type is a question node; V2 represents the node set consisting of users, i.e., V2 = U, and E2 is the directed edge between users in the user set U, pointing from the questioner node to the answerer node;
[0009] Step 3: Initialize the node embedding set of the respondent in network G1. in, Represents the responder node a k Node embedding in network G1; Initialize the user's node embedding set in network G2. in, Represents user node u s Node embedding in network G2;
[0010] The question set Q is converted into pre-trained vectors using a word2vec pre-trained model. These pre-trained vectors are then input into an LSTM model to obtain a set of question text embeddings. in, Let q represent the l-th question. l Text embedding;
[0011] Step 4, learn node embeddings of G1 and G2 using meta-path based heterogeneous information network embedding learning algorithm and motif based graph neural network embedding learning algorithm respectively;
[0012] Step 4.1, processing of meta-path based heterogeneous information network embedding learning algorithm:
[0013] Step 4.1.1, calculate the transition probability p(q a , P) from a (i) type node to node q (i+1) using formula (1): (i +1) |a (i) , P):
[0014]
[0015] In formula (1), P is a meta-path, a (i) is the i-th node of t a type in the meta-path P, q (i+1) is the i+1-th node of t q type in the meta-path P, and N q is the number of neighbor nodes of a (i) of t q type;
[0016] Step 4.1.2, according to the process of step 4.1.1, obtain the transition probability p(a q |q (i+1) , P) from node q (i+2) of t (i+2) type to node a (i+1) ; wherein a (i+2) is the i+2-th node of t a type in the meta-path P;
[0017] Step 4.1.3, process the meta-path P by negative sampling, and obtain a positive sample set D and a negative sample set D', so as to construct a likelihood function using formula (2): and optimize the likelihood function using an optimization strategy to obtain an optimized parameter set Θ 1 :
[0018]
[0019] In formula (2), Θ is a parameter set to be optimized, and contains four parts: all embeddings of questioners, embeddings of answerers in G1, embeddings of answerers in G2, and parameters of LSTM; represents the embedding of the l-th question q lthe embedding of the center node, the embedding of the neighbor node of the center node in the network G1, σ represents the Sigmoid function, the optimization strategy is to maximize the likelihood of the positive sample set D and minimize the likelihood of the negative sample set D';
[0020] based on the optimized parameter set Θ 1 , using the meta-path-based heterogeneous information network embedding learning algorithm on V Q , V A processing, thereby obtaining the updated question text embedding set and the updated answerer embedding set wherein, represents the node embedding of the lth question q l in the network G1, represents the node embedding of the kth answerer a k in the network G1;
[0021] Step 4.2, processing of the motif-based graph neural network embedding learning algorithm:
[0022] Step 4.2.1, using the motif mining algorithm ESU to mine motifs in the user homogenous network G2, obtaining the motif set M = {m0, m1,..., m j ..., m J-1} in the network G2, wherein m j represents the jth motif; J represents the total number of motifs;
[0023] Based on the motif set M, generate the motif network using formula (3):
[0024]
[0025] In formula (3), is the motif network generated based on the motif m j , and is represented by an adjacency matrix; y and z respectively represent the number of rows and columns in the adjacency matrix ;
[0026] Step 4.2.2, construct the loss function
[0027]
[0028] In formula (4), is the node embedding generated based on the motif network , is the adjacent node of u s , is the node embedding generated based on the motif network , sembedding of the neighboring nodes of u, P n is the probability distribution of negative sampling, P n (c) is the probability distribution of the node , represents the expectation of the node under the probability distribution P n (c), Q is the number of negative samples, T represents the transpose of the adjacency matrix, and σ represents the Sigmoid function.
[0029] Based on the optimized parameter set Θ 2 , the W U is processed by using a motif-based graph neural network embedding learning algorithm, so as to obtain an updated user embedding set wherein, is the node embedding of the user node u s in the motif network .
[0030] Step 4.2.3, merging the user node embeddings based on J motif networks by using formula (5), so as to obtain a merged user embedding set
[0031]
[0032] In formula (5), α j is the weight of the node embedding corresponding to the jth motif network ; represents the user embedding of the user u s obtained after merging;
[0033] Step 4.3, distinguishing the questioners and the answerers in the user embedding set W U , so as to obtain a questioner embedding set and an answerer embedding set wherein, represents the node embedding of the questioner node r m in the network G2, represents the node embedding of the answerer node a k in the network G2.
[0034] Step 5, for a query γ = (r m , q1), generating an answerer set A γ under the query γ, and letting a * be the best answerer of the lth question q l , and a * ∈ A γ .
[0035] Step 6, constructing a scoring function F by using formula (6):
[0036]
[0037] In equation (6), Respondent A - Node embedding in the G1 network Respondent A - Node embedding in the G2 network Respondent A * Node embedding in the G1 network Respondent A * In the G2 network, node embedding, v a This indicates the node embedding of respondent a in the G1 network, w a This indicates that respondent a has node embedding in the G2 network, and but That is, the respondent a is the l-th question q l The respondent, and respondent a - Not the first question q l The respondent;
[0038] Step 6: Assume the l-th question is q l The corresponding questioner is r m Then, using equation (7), we can calculate the k-th respondent a. k Matching score with the l-th question ql
[0039]
[0040] In equation (7), F is the scoring function and satisfies the inequality conditions in equation (6);
[0041] Step 7: Construct the optimization objective s using equation (8) Rank (D,D′|Θ 2 ):
[0042]
[0043] In equation (8), Respondent A * With the l-th question q l Match score, This indicates that the respondent a and the l-th question q are related. l Match score, Respondent A - With the l-th question q l Match score;
[0044] The objective functions of formula (2) and (8) are alternately maximized by a gradient-based algorithm and back propagation, and the loss function of formula (4) is minimized, so as to obtain an optimized parameter set Θ 3 ;
[0045] Step 8, according to the optimized parameter set Θ 3 , for a certain user r m the lth question q proposed l , the matching scores of all answerers are calculated according to formula (7), and are sorted in descending order according to the scores, the top N users are selected to form a recommendation list, and the users in the recommendation list are invited to answer the lth question q l .
[0046] The electronic device comprises a memory and a processor, and the memory is used for storing a program supporting the processor to execute the question recommendation method, and the processor is configured to execute the program stored in the memory.
[0047] The computer readable storage medium stores a computer program, and the computer program is configured to execute the steps of the question recommendation method when executed by a processor.
[0048] Compared with the prior art, the present application has the following beneficial effects:
[0049] 1. The present application fully integrates user personal feature information, network structure information and text semantic information, learns the preference representation of the answerer for the question and the preference representation of the answerer for the questioner through the meta-path-based heterogeneous information network embedding learning algorithm and the motif-based graph neural network embedding learning algorithm, and fuses the matching scores of the two aspects for recommendation, solves the problem of insufficient user network mining, and improves the overall recommendation effect.
[0050] 2. The motif of the present application captures high-order structure containing user behavior patterns and behavior regularity information, and the graph neural network can effectively learn the high-order information in the motif network and fuse the user behavior information from multiple motif networks through the attention mechanism, so as to integrate different user behavior patterns and behavior regularity information into the user embedding, and improve the modeling quality.
[0051] 3. The present application fully utilizes user personal feature information, takes personal feature information as node attributes in the motif network, and integrates node attributes into user embedding through the graph neural network embedding learning algorithm, so that the user embedding contains the activity representation of the user itself, thereby realizing the enhancement of the user initial feature vector and improving the accuracy of recommendation. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 This is a flowchart of the overall process of the method of the present invention. Detailed Implementation
[0053] In this embodiment, a motif-based question recommendation method in a question-and-answer community includes: 1. Collecting and preprocessing user mutual assistance relationships, question texts, and user feature information in the question-and-answer community to construct a question-and-answer community network; 2. Using a motif mining algorithm to mine motifs in the user homogeneous network and constructing a motif network based on the motifs; 3. Using a meta-path-based heterogeneous information network embedding learning algorithm and a motif-based graph neural network embedding learning algorithm to learn the node embeddings of the network, learning the answerer's preference for the questioner and the answerer's preference for the question; 4. Integrating the answerer's two preferences and selecting an appropriate loss function to optimize the model parameters and feature vectors; 5. Using a recommendation model to predict the answerer's matching degree for unanswered questions, ranking the answerers in descending order based on the matching score, and recommending the question to the top N users for answering, thereby completing the question recommendation task. Specifically, as... Figure 1 As shown, the procedure is as follows:
[0054] Step 1: Collect user interaction relationships, question texts, and user characteristic information from the Q&A community. Characteristic information includes the number of followers, number of fans, community level, and registration duration. This information is then preprocessed to establish the questioner set R = {r1, r2, ..., r...} of the Q&A community. m ..., r M The set of respondents A = {a1, a2, ..., a...} k , ..., a K The problem set Q = {q1, q2, ..., q} l , ..., q L User set U = {u1, u2, ..., u} s , ..., u S}, and U=R∪A; where r m Let a represent the m-th questioner. k Let q represent the k-th respondent. l Let u represent the l-th question. s Let S represent the s-th user, M represent the total number of questioners, K represent the total number of answerers, L represent the total number of questions, and S represent the total number of users, and S≤M+K;
[0055] Step 2: Establish a heterogeneous network G1 = (V1, E1, T) for questions and answers in the question-and-answer community, and a homogeneous network G2 = (V2, E2) for users. Here, V1 represents the node set consisting of the question set Q and the answerer set A, i.e., V1 = Q∪A, and E1 is the set of edges connecting question nodes and answerer nodes. If the k-th answerer a... k Answered question l ql , then the kth answerer a k is established l The corresponding edge between nodes (q l , a k ) is established; T is the set of two node types of questions and answerers, and T = {t a , t q}, t a represents that the node type is an answerer node, and t q represents that the node type is a question node; V2 represents the set of nodes composed of users, that is, V2 = U, and E2 is the directed edge between users in the user set U, and is pointed to by the questioner node to the answerer node;
[0056] Step 3, initialize the node embedding set of the answerer in the network G1 wherein, represents the node embedding of the answerer node a k in the network G1; initialize the node embedding set of the user in the network G2 wherein, represents the node embedding of the user node u s in the network G2;
[0057] Convert the question set Q into a pre-trained vector using the word2vec pre-trained model, and input the pre-trained vector into the LSTM model to obtain the question text embedding set wherein, v ql represents the text embedding of the lth question q l ;
[0058] Step 4, learn the node embedding of G1 and G2 using the meta-path-based heterogeneous information network embedding learning algorithm and the motif-based graph neural network embedding learning algorithm, respectively;
[0059] Step 4.1, processing of the meta-path-based heterogeneous information network embedding learning algorithm:
[0060] Step 4.1.1, calculate the transition probability p(q a from the node a (i) of type t (i+1) to the node q (i +1) |a (i) , P) using formula (1):
[0061]
[0062] In formula (1), P is a meta-path, a (i) is the ith node of type t a in the meta-path P, and q(i+1) For the (i+1)th t in the metapath P q Nodes of type N q For node a (i) t q Number of neighbor nodes of type;
[0063] Step 4.1.2: Following the process in step 4.1.1, obtain the result from t. q Node of type q (i+1) Transfer to node a (i+2) The transition probability p(a) (i+2) |q (i+1) ,P); where, a (i+2) For the (i+2)th t in the metapath P a Nodes of type;
[0064] Step 4.1.3: Process the metapath P through negative sampling to obtain the positive sample set D and the negative sample set D′, and then use equation (2) to construct the likelihood function. And an optimization strategy is used to optimize the likelihood function. Optimization is performed to obtain the optimized parameter set Θ. 1 :
[0065]
[0066] In equation (2), Θ is the set of parameters to be optimized, and it includes four parts: all embeddings of the questioner, the embedding of the answerer in G1, the embedding of the answerer in G2, and the parameters of the LSTM. This indicates that in network G1, the l-th question q l Embedding of the central node, For the embedding of neighboring nodes of the central node in network G1, σ represents the Sigmoid function, and the optimization strategy is to maximize the likelihood of the positive sample set D and minimize the likelihood of the negative sample set D′.
[0067] Based on the optimized parameter set Θ 1 Using a meta-path-based heterogeneous information network embedding learning algorithm to study V Q V A This process is performed to obtain an updated set of question text embeddings. and the updated set of embedded respondents in, In network Gx, the l-th problem q represents... l Node embedding, This represents the k-th responder a in network G1. k Node embedding;
[0068] Step 4.2, Processing of the graph neural network embedding learning algorithm based on the motif:
[0069] Step 4.2.1: Use the ESU (Edge Module Extraction) algorithm to mine the morphemes in the user isomorphic network G2, and obtain the set of morphemes M = {m0, m1, ..., m} in network G2. j ..., m J-1}, where m j This represents the j-th motif; J represents the total number of motifs.
[0070] Based on the motif set M, the motif network is generated using equation (3):
[0071]
[0072] In equation (3), For motif m j The generated motif network is represented by adjacency matrices; y and z represent the adjacency matrices, respectively. The number of rows and columns in the data;
[0073] Step 4.2.2: Construct the loss function using equation (4).
[0074]
[0075] In equation (4), For motif-based networks The generated node embedding, is u s The adjacent nodes, For motif-based networks The generated u s Embedding of neighboring nodes, P n It is the probability distribution of negative sampling, P n (c) is a node The probability distribution, Indicates obedience to P n (c) Nodes of the probability distribution The expected value of Q is the number of negative samples, T represents the transpose of the adjacent matrix, and σ represents the Sigmoid function.
[0076] Based on the optimized parameter set Θ 2 Using a motif-based graph neural network embedding learning algorithm to study W U This process is performed to obtain the updated user embedding set. in, For user node u s In motif network Node embedding in;
[0077] Step 4.2.3: Use equation (5) to merge the user node embeddings based on the J motif networks to obtain the merged user embedding set.
[0078]
[0079] In equation (5), α j For the network corresponding to the j-th motif The weight of the node embedding; Indicates the user u obtained after the merger s User embedding; weight α j It can be calculated from equations (6) and (7):
[0080]
[0081]
[0082] In equations (6) and (7), E c and E e These are randomly initialized learnable parameters; Equation (7) is used to... First, a fully connected transformation is applied, followed by an activation function tanh to obtain the parameter e. j ;
[0083] Distinguish user embedding set W U The questioners and answerers in the network can be used to obtain the questioner embedding set in network G2. and the answerer embedding set in, Represents the questioner node r m Embedded in the nodes of network G2, Represents the responder node a k Embedded in nodes of network G2;
[0084] Step 5: For a query γ = (r m ,q1), generate the set of respondents A under query γ. γ and let a * For the l-th question q l The best answerer, and a * ∈A γ ;
[0085] Construct the scoring function F using equation (8):
[0086]
[0087] In equation (8), Respondent A - Node embedding in the G1 network Respondent A - Node embedding in the G2 network Respondent A * Node embedding in the G1 network Respondent A * In the G2 network, node embedding, v a This indicates the node embedding of respondent a in the G1 network, w a This indicates that respondent a has node embedding in the G2 network, and but That is, the respondent a is the l-th question q l The respondent, and respondent a - Not the first question q l The respondent;
[0088] Step 6: Assume the l-th question is q l The corresponding questioner is r m Then, using equation (9), we can calculate the k-th respondent a. k With the l-th question q l Match score
[0089]
[0090] Where F is the scoring function, which satisfies the inequality condition in equation (8);
[0091] Step 7: Construct the optimization objective S using equation (10) Rank (D,D′|Θ 2 ):
[0092]
[0093] In equation (8), Respondent A * With question q l Match score, This indicates that the respondent a and the question q are related. l Match score, Respondent A - With question q l Match score;
[0094] By alternately maximizing the objective function of equations (2) and (10) and minimizing the loss function of equation (4) using a gradient-based algorithm and backpropagation, the optimized parameter set Θ is obtained. 3 ;
[0095] Step 8: Based on the optimized parameter set Θ 3For a certain user r m The lth question q is proposed l The matching scores of all the answerers are calculated according to formula (7), and the top N users are selected to form a recommendation list according to the descending order of the scores, and the users in the recommendation list are invited to answer the lth question q l .
[0096] In this embodiment, an electronic device includes a memory for storing a program supporting a processor to execute the above question recommendation method, and the processor is configured to execute the program stored in the memory.
[0097] In this embodiment, a computer readable storage medium has a computer program stored thereon, and the computer program is run by a processor to execute the steps of the question recommendation method.
Claims
1. A modal-based question recommendation method in a question-and-answer community, characterized by: Follow these steps: Step 1: Collect and preprocess user interaction relationships, question texts, and user characteristic information from the Q&A community to establish the questioner set R = {r1, r2, ..., r}. m …,r M The set of respondents A = {a1, a2, ..., a...} k ,…,a K Problem set Q = {q1, q2, ..., q} l ,…,q L User set U = {u1, u2, ..., u} s ,…,u S }, and U=R∪A; where r m Let a represent the m-th questioner. k Let q represent the k-th respondent. l Let u represent the l-th question. s Let S represent the s-th user, M represent the total number of questioners, K represent the total number of answerers, L represent the total number of questions, and S represent the total number of users, and S≤M+K; Step 2: Establish a heterogeneous network G1 = (V1, E1, T) for questions and answers in the question-and-answer community, and a homogeneous network G2 = (V2, E2) for users. Here, V1 represents the node set consisting of the question set Q and the answerer set A, i.e., V1 = Q ∪ A, and E1 is the set of edges connecting question nodes and answerer nodes. If the k-th answerer a... k Answered question l q l Then establish the k-th responder a k Node and the l-th question q l Corresponding edges between nodes (q) l ,a k ); T is the set of two node types: questions and answerers, and T = {t} a ,t q }, t a This indicates that the node type is a responder node, t q The node type is a question node; V2 represents the node set consisting of users, i.e., V2 = U, and E2 is the directed edge between users in the user set U, pointing from the questioner node to the answerer node; Step 3: Initialize the node embedding set of the respondent in network G1. in, Represents the responder node a k Node embedding in network G1; Initialize the user's node embedding set in network G2. in, Represents user node u s Node embedding in network G2; The question set Q is converted into pre-trained vectors using a word2vec pre-trained model. These pre-trained vectors are then input into an LSTM model to obtain a set of question text embeddings. in, Let q represent the l-th question. l Text embedding; Step 4: Use the heterogeneous information network embedding learning algorithm based on meta-path and the graph neural network embedding learning algorithm based on motif to learn the node embeddings of G1 and G2 respectively. Step 4.1: Processing of the heterogeneous information network embedding learning algorithm based on meta-path: Step 4.1.1: Calculate the value from t using equation (1). a Node of type a (i) Transfer to node q (i+1) The transition probability p(q) (i+1) |a (i) ,P): In equation (1), P is the metapath, a (i) For the i-th t in the metapath P a Nodes of type q (i+1) For the (i+1)th t in the metapath P q Nodes of type N q For node a (i) t q Number of neighbor nodes of type; Step 4.1.2: Following the process in step 4.1.1, obtain the result from t. q Node of type q (i+1) Transfer to node a (i+2) The transition probability p(a) (i+2) |q (i+1) ,P); where a (i+2) For the (i+2)th t in the metapath P a Nodes of type; Step 4.1.3: Process the metapath P through negative sampling to obtain the positive sample set D and the negative sample set D', and then use equation (2) to construct the likelihood function. And an optimization strategy is used to optimize the likelihood function. Optimization is performed to obtain the optimized parameter set Θ. 1 : In equation (2), Θ is the set of parameters to be optimized, and it includes four parts: all embeddings of the questioner, the embedding of the answerer in G1, the embedding of the answerer in G2, and the parameters of the LSTM. This indicates that in network G1, the l-th question q l Embedding of the central node, For the embedding of neighboring nodes of the central node in network G1, σ represents the Sigmoid function, and the optimization strategy is to maximize the likelihood of the positive sample set D and minimize the likelihood of the negative sample set D'. Based on the optimized parameter set Θ 1 Using a meta-path-based heterogeneous information network embedding learning algorithm to study V Q V A This process is performed to obtain an updated set of question text embeddings. and the updated set of embedded respondents in, In network G1, the l-th problem q represents... l Node embedding, This represents the k-th responder a in network G1. k Node embedding; Step 4.2, Processing of the graph neural network embedding learning algorithm based on the motif: Step 4.2.1: Use the ESU (Edge Activation Unit) algorithm to mine the motifs in the user isomorphic network G2, obtaining the set of motifs M = {m0, m1, ..., m} in network G2. j …,m J-1 }, where m j This represents the j-th motif; J represents the total number of motifs. Based on the motif set M, the motif network is generated using equation (3): In equation (3), For motif m j The generated motif network is represented by adjacency matrices; y and z represent the adjacency matrices, respectively. The number of rows and columns in the data; Step 4.2.2: Construct the loss function using equation (4). In equation (4), For motif-based networks The generated node embedding, is u s The adjacent nodes, For motif-based networks The generated u s Embedding of neighboring nodes, P n It is the probability distribution of negative sampling, P n (c) is a node The probability distribution, Indicates compliance with P n (c) Nodes of the probability distribution The expected value, where Q is the number of negative samples. This represents the transpose of adjacent matrices, and σ represents the Sigmoid function; Based on the optimized parameter set Θ 2 Using a motif-based graph neural network embedding learning algorithm to study W U This process is performed to obtain the updated user embedding set. in, For user node u s In motif network Node embedding in; Step 4.2.3: Use equation (5) to merge the user node embeddings based on the J motif networks to obtain the merged user embedding set. In equation (5), α j For the network corresponding to the j-th motif The weight of the node embedding; Indicates the user u obtained after the merger s User embedding; Distinguish user embedding set W U By identifying the questioners and answerers in network G2, we can obtain the questioner embedding set in network G2. and the answerer embedding set in, Represents the questioner node r m Embedded in the nodes of network G2, Represents the responder node a k Embedded in nodes of network G2; Step 5: For a query γ = (r m ,q l Generate the set of respondents A under query γ. γ and let a * For the l-th question q l The best answerer, and a * ∈A γ ; Construct the scoring function F using equation (6): In equation (6), Respondent A - Node embedding in the G1 network Respondent A - Node embedding in the G2 network Respondent A * Node embedding in the G1 network Respondent A * In the G2 network, node embedding, v a This indicates the node embedding of respondent a in the G1 network, w a This indicates that respondent a has node embedding in the G2 network, and but That is, the respondent a is the l-th question q l The respondent, and respondent a - Not the first question q l The respondent; Step 6: Assume the l-th question is q l The corresponding questioner is r m Then, using equation (7), we can calculate the k-th respondent a. k With the l-th question q l Match score In equation (7), F is the scoring function and satisfies the inequality conditions in equation (6); Step 7: Construct the optimization objective S using equation (8) Rank (,D'|Θ 2 ): In equation (8), Respondent A * With the l-th question q l Match score, This indicates that the respondent a and the l-th question q are related. l Match score, Respondent A - With the l-th question q l Match score; By alternately maximizing the objective function of equations (2) and (8) and minimizing the loss function of equation (4) using gradient-based algorithms and backpropagation, the optimized parameter set Θ is obtained. 3 ; Step 8: Based on the optimized parameter set Θ 3 For a certain user r m The l-th question q l Calculate the matching score of all respondents according to equation (7), sort them in descending order according to the score, select the top N users to form a recommendation list, and invite users in the recommendation list to answer the l-th question q. l .
2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the problem recommendation method of claim 1, the processor being configured to execute the program stored in the memory.
3. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the problem recommendation method of claim 1.
Citation Information
Patent Citations
Answerer recommendation method applied to an open-source question and answer community
CN109657048A
High-order logic knowledge graph representation learning method based on structural features
CN114741535A