Question routing method in question and answer community based on heterogeneous graph neural network
Through the method based on heterogeneous graph neural network, a question-and-answer heterogeneous graph is constructed and deep learning technology is used to extract user answering behavior and structure information, which solves the problem that the user information and question-and-answer data cannot be effectively utilized in the existing technology, and achieves the correctness and correctness of the data. Full learning of node relationships in the Q&A community and the accuracy of problem routing are improved.
Patent Information
- Application Number
- CN202310588715.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2024-11-26
AI Technical Summary
The existing Q&A community question routing methods cannot fully utilize user information and Q&A pair data, cannot effectively capture the rich semantic and structural information in the community, and cannot comprehensively evaluate the correlation between users and questions.
Using a method based on heterogeneous graph neural network, a heterogeneous graph of Q&A was constructed, and an embedded representation was performed using Bert pre-trained model. User answering behavior characteristics were extracted in combination with skip-gram and Bi-LSTM, and random walk and double-layer attention mechanisms were used. Structural information is extracted and a convolutional neural network ranking model is constructed to calculate the correlation between the respondent and the question.
It realizes full learning of node relationships in the Q&A community and the utilization of multi-source information, improves the accuracy and efficiency of problem routing, and can more comprehensively evaluate the relevance of users and problems.
Smart Images

Figure CN119025630A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information retrieval, and specifically is a question routing method in a question-answering community based on a heterogeneous graph neural network. Background Art
[0002] With the rapid development of the Internet era, more and more users choose to use search engines to obtain the information they want. However, with the increase in the complexity of questions, existing search engines can no longer help users get answers accurately, and the human-computer interaction method also brings a bad experience to users. Therefore, the question-answering community based on human-human interaction came into being and has developed rapidly due to its high efficiency and accuracy. Nowadays, the community question-answering system has become one of the most important knowledge acquisition platforms on the Internet, involving many users and questions. With the increasing number of users entering the question-answering community, a large number of questions are generated in the community every day, and the existing question routing algorithm can no longer meet the needs of users, resulting in a backlog of a large number of unanswered and unresolved questions in the community, which seriously affects the development of the question-answering community. Therefore, it is very necessary to study how to quickly and accurately push questions to appropriate experts for answers. In addition, assigning questions to users is not a simple random assignment. It is necessary to comprehensively infer whether the user is a suitable answerer based on the user's attributes, tags, and behaviors in the question-answering community.
[0003] At present, the methods for question routing based on question-answering communities can be mainly divided into the following three types:
[0004] The first is the method based on language and topic models, which tends to build profiles of users and questions and perform question routing by matching the similarity of user and question files. For example, the similarity between user topic words and archived question words is calculated through the likelihood language model; the topic model classifies users and question topics through LDA, thereby routing questions based on topic matching. Current methods often combine these two models.
[0005] The second is the classification / ranking based method, which treats the question routing task as a classification or ranking task. First, multiple features of users and questions are extracted, and then experts are classified and ranked through binary classifiers or ranking models.
[0006] The third is the network-based method, which first builds a heterogeneous network of question-answering communities based on user information and question-answering data, and then uses relevant methods to analyze the relationship between users and question nodes. The methods here are divided into two types: deep learning and non-deep learning. The non-deep learning method mainly analyzes the relationship between users and question nodes through methods such as link analysis technology and network centrality measurement; while the deep learning method mainly embeds nodes through related algorithms of graph neural networks, thereby calculating the similarity between question and user nodes to complete question routing.
[0007] The three main existing question routing methods all have some problems. First, the language model is based on precise word matching and cannot capture the high-level semantics of the sentence, while the topic model is not universal. Questions may involve multiple fields, and the topic model often chooses to route to one topic, which is prone to deviation. Secondly, the classification / ranking method relies heavily on manually selected features, which is very time-consuming and labor-intensive, and the features are subjective. The quality of the selection directly determines the accuracy of question routing. The development of this method has certain limitations. Finally, the problem of using non-deep learning methods in network-based methods is that they cannot utilize text information, topic information, and category information. Generally, they are based on the user's general knowledge rather than the expertise of a specific topic to complete the question routing task. The problem of using deep learning methods is that they cannot fully utilize the content and structural information contained in the question-answering network. The network has a rich variety of nodes and complex relationships between edges. Existing methods often cannot maximize the use of this information. At the same time, when using meta-paths to embed heterogeneous graphs in existing question routing methods, they often study a single path and cannot comprehensively consider and study the rich paths in the community question-answering heterogeneous graph network.
[0008] The difficulties in solving the above problems and defects are: 1. How to make full use of user information and question-and-answer data in the question-and-answer community system. 2. How to fully study and research the community question-answering heterogeneous graph network and extract rich semantic and structural information from it. 3. How to more comprehensively evaluate the correlation between users and issues in the community. Summary of the invention
[0009] Based on the above problems, the present invention proposes a question routing method in a question-answering community based on a heterogeneous graph neural network. The specific steps of the method are as follows:
[0010] S1, collects question-answering datasets and user information from the community question-answering system Stack Exchange, and constructs a question-answering heterogeneous graph based on the relationship between users and questions;
[0011] The question-answer heterogeneous graph is represented by G, G=(V, E), V represents a node set in the question-answer heterogeneous graph, E represents an edge set formed between nodes in the question-answer heterogeneous graph, and the nodes in the node set V include answerer nodes, question nodes, and questioner nodes;
[0012] S2, uses the Bert pre-trained model to embed the answerer and question content;
[0013] S3, using the question-answer meta-path to sample the question-answer heterogeneous graph, and using the skip-gram algorithm to extract feature information from the user's complete answering behavior;
[0013] S4, based on the attention mechanism and Bi-LSTM, obtains the sequence features of users’ recent answers;
[0014] S5, uses random walk to update the user vector, and extracts the feature information contained in the connection relationship between users’ answers through meta-path combination and double-layer attention mechanism;
[0015] S6 uses a convolutional neural network to build a ranking model and calculate the correlation score between the answerer vector and the question vector.
[0016] The step S3 comprises the following steps:
[0017] S3.1, in the question-answering heterogeneous graph, the questioner is R, the question is Q, the answerer is A, and the question-answering meta-path is "AQRQA". The sampling length is set, and the sampling method and probability formula of the question-answering heterogeneous graph established in S1 are modified in combination with the voting and time information of the answer;
[0018] S3.2, sampling the question-answer heterogeneous graph through the question-answer meta-path to obtain a sequence of node components;
[0019] S3.3, use the skip-gram algorithm to learn the node sequence and obtain the representation vector of the feature information in each user's complete answering behavior;
[0020] The step S4 comprises the following steps:
[0021] S4.1, extract the most recently answered questions of each user and form a sequence Q according to the order of answering questions, where the older the answer, the higher the ranking;
[0022] S4.2, obtain the embedded representation of the user ID and obtain the question representation vector through the Bert model;
[0023] S4.3, the question sequence and the user representation are used to obtain the weight of each question through the attention mechanism and normalize it, and then the question vector and the weight are multiplied one by one to obtain the content features in the user's answer sequence;
[0024] S4.4, input the question sequence Q into the bidirectional long short-term memory network, obtain the hidden layer output at each moment, and add the outputs at each moment bit by bit to get the average, and obtain the time series features in the answer sequence;
[0026] S4.5, concatenate the content features and timing features obtained in S4.3 and S4.4 through a fully connected layer to obtain the sequence features of the user's answers.
[0025] S4.6, the answer sequence features, the feature information of the complete answering behavior and the user attributes are concatenated and passed through a fully connected layer to obtain the vector representation result based on the user answering behavior modeling.
[0026] The step S5 comprises the following steps:
[0027] S5.1, use random walks to extract the implicit structural information in the question-answer heterogeneous graph and update the embedding representation of the answerer nodes in the network;
[0028] S5.2, explore the connection relationship generated by users' answers and select the connection path combination;
[0029] S5.3, using the path combination in S5.1, sampling the question-answer heterogeneous graph through a meta-path-based method to obtain neighboring respondents who are valuable to the target respondent;
[0030] S5.4, a two-layer attention mechanism is used to hierarchically aggregate user information from the node to the path level.
[0031] The step S6 comprises the following steps:
[0032] S6.1, concatenating the final representation result based on the user's answering behavior and connection relationship with the question vector;
[0033] S6.2, use convolution kernels of different sizes to perform convolution operations on the concatenated feature maps;
[0034] S6.3, perform a linear transformation operation on the convolution result to obtain the relevance score of each respondent to the question and rank them.
[0035] This solution solves the following problems:
[0036] A heterogeneous graph network based on questioner-question-answerer is constructed through user information and question-answer pair data, and a pre-trained language model is used to utilize user and question text information to reduce information loss.
[0037] Based on the user's question-answering behavior modeling, it is proposed to conduct research from two perspectives: the complete question-answering behavior and the sequence characteristics of the answer. First, the characteristic information of the user's overall question-answering behavior is obtained by sampling and learning the complete question-answering behavior, and then the sequence characteristics of the user's answer are represented by combining Bi-LSTM and attention mechanism. A comprehensive and detailed study of the user's answering behavior is achieved.
[0038] Based on the study of the question-answering relationship between users and questions, the connection relationship between users generated by answering questions is fully explored, and a method based on a double-layer attention mechanism is proposed to aggregate effective information between users from both the node and meta-path levels.
[0039] The question-answer relationship between users and questions is fully studied, and the potential information of the connection between users is further mined. It makes full use of the attributes of multiple nodes in the question-answer community, fully learns the relationship between nodes in the community, and makes full use of multi-source information in the question-answer community.
[0040] Beneficial effects of the present invention:
[0041] The various relationships between nodes in the question-and-answer heterogeneous graph are fully learned, and the characteristic information of nodes and networks is fully utilized, thus realizing the effective use of multi-source information in the question-and-answer community. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for specific implementation.
[0043] Figure 1 It is a flow chart of the model framework of the present invention.
[0044] Figure 2 It is a model framework diagram that conducts research from two perspectives: the user's complete answering behavior and the answering sequence characteristics.
[0045] Figure 3 It is a meta-path diagram for studying the relationship between users’ answers.
[0046] Figure 4 It is a model framework diagram that aggregates the connection relationships generated by users answering questions.
[0047] Figure 5 It is a user ranking model graph. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present invention will be fully described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0049] A question routing method in a question-answering community based on heterogeneous graph neural networks, such as Figure 1 ,2 , 4 and 5, comprising the following steps:
[0050] S1, collect the question and answer data set and user information in the community question and answer system Stack Exchange, and construct a question and answer heterogeneous graph based on the user and question and answer relationship. The question and answer heterogeneous graph is represented by G, G = (V, E), V represents the node set in the question and answer heterogeneous graph, E represents the edge set formed between the nodes in the question and answer heterogeneous graph, and the edges include two types of edges: asking questions and answering questions, and the nodes in the node set V include answerer nodes (A), question nodes (Q), and questioner nodes (R), and the question and answer data set is divided into a training set and a test set;
[0051] This example selects the question-and-answer datasets of the Biology and English sub-communities in the SE community, selects 90% of the questions and corresponding users in the dataset as the training set, and the remaining 10% of the questions as the test set for verification.
[0052] S2, use the Bert pre-trained model to embed the respondent attributes and question content, select the three parts of the question's label set, title and content, use the pre-trained model Bert to represent them and splice them to get the question representation; select the user's honor value, effective browsing times and answer label set as user attribute embedding.
[0053] S3.1, in the question-answer heterogeneous graph, the questioner is R, the question is Q, the answerer is A, the question-answer meta-path is “AQRQA”, and the sampling length is set to 17, which is exactly four path cycles;
[0054] S3.2, sampling the question-answer heterogeneous graph through the question-answer meta-path to obtain a sequence of nodes. The number of votes for each answer of the answerer in the question-answer community is different, that is, the modeling of the answering behavior of the answerer is focused, and the selection of uniform probability will be detrimental to the representation learning of the long-term answering performance of the answerer. The more votes the answerer gets, the stronger his professional ability in the field to which the question belongs, and the more important it is to select the neighbor node for information aggregation. At the same time, the present invention takes the user's answering time into consideration, that is, the answering history that is very far away from now will have a certain degree of decay;
[0055] Using the mechanism of joint guidance of votes and time information, a comprehensive weight is proposed, and the calculation formula is as follows. The time decay factor σ represents the proportion of the time of the user's answer to the earliest answer time in the data set. The probability value in the sampling process can be obtained by multiplying the time decay factor by the number of votes for the user's answer and then normalizing it. That is, when sampling through the meta-path The probability of selecting the next node;
[0056] Specifically, when the next node is a questioner or question node, the mean probability method is used for sampling. When the next node is an answerer node, the comprehensive weight guidance probability is used for sampling. In this way, the professional path sequence of the user's long-term answering is obtained. There are two types of voting: approval and disapproval. Disapproval votes are expressed as negative numbers, and s is the number of votes obtained by the answerer. The present invention believes that disapproval votes have no practical significance for user professional knowledge modeling, so the answer score with disapproval votes is set to 0. In this section, the time decay factor is calculated as a parameter of the exponential function
[0057] S3.3 trains the obtained professional path sequence through the embedding learning method.
[0058] After obtaining a large number of path sequences composed of nodes, the Skip-gram algorithm is selected and the sequence is input into the algorithm for training. In the path sequence with a sequence length of 17, the window size is set to 5, and the entire sequence is traversed in turn. Each time, the central node generates the embedded representation of its context node. Node embedding learning of heterogeneous graphs is a self-supervised process. Usually, a certain number of negative sample nodes are selected during training to help the model perform comparative learning. Positive samples are nodes in the node sequence that have an edge with the current node, while negative samples are nodes that do not have an edge with the current node. This simplifies model training and obtains the representation results of feature information in the user's complete answering behavior through this algorithm.
[0059] S4.1, construct the historical question sequence of the respondent's recent answers as Q = [Q1, Q2, ... Qk], and sort them according to the answer time. The older the answer record is from the current time, the higher the ranking is. That is, Q1 is the earliest question in the recent period, Qk is the closest to the present, and K is the number of selected questions. The question sequence is encoded by the question representation module, and the number K selected in the invention is 6.
[0060] S4.2, obtain the embedded representation of the user ID and obtain the question representation vector through the Bert model.
[0061] S4.3, the respondent's recent answer sequence reflects the dynamic change of his or her interests in the short term.
[0062] The bidirectional long short-term memory network has a very powerful function for feature learning of time series questions. The question sequence Q is input into the Bi-LSTM network, and the dynamic changes of the respondent's answer preference in the short term are perceived through bidirectional modeling.
[0063] In order to better utilize the different information contained in different time series features, the present invention weights the feature sequences at each moment by bit, and takes the weighted vector average as the time series modeling representation of the user's answer sequence
[0064] S4.4, the content of the respondents' recent answers represents their professional preferences in terms of content. However, for the respondents, different questions have different professional weights.
[0065] The attention mechanism is used to model the weight of the question sequence that the answerer has recently answered. After the question sequence and the user representation are concatenated, the attention size between the two nodes is calculated through the attention vector, and the weight value of the question is obtained through normalization.
[0066] S4.5, the content and timing information contained in the answer sequence are concatenated and the sequence features of the user's answers are obtained through a fully connected layer. Finally, the user's complete answer performance and the answer sequence features are concatenated to obtain the final representation result based on the user's answer behavior modeling.
[0067] S4.6: Concatenate the answer sequence features, the feature information of the complete answering behavior, and the user attributes and pass them through a fully connected layer to obtain a vector representation result based on the user answering behavior modeling.
[0068] S5, the attributes of nodes in heterogeneous graph networks are composed of their structural features and content features. Content features are the embodiment of the node's own attributes. Use random walks to update user vectors, and extract feature information contained in the connection relationship generated by user answers through meta-path combination and double-layer attention mechanism;
[0069] S5.1, using the Deep Walk algorithm, setting the size of the context window and the length of sampling, sampling by random walk, and inputting the sampling sequence into Skip-gram for learning and calculation to obtain the structural features of the question-answer heterogeneous graph;
[0070] The attributes of the answerer node are divided into internal attributes and external attributes. The internal attributes include three features extracted from user documents, and the external attributes are divided into question attributes and structural attributes.
[0071] The question attribute selects the label set of the five questions recently answered by the user as the information source for question embedding;
[0072] The three attributes are concatenated and fused to obtain a comprehensive embedding representation of the respondent node for subsequent research on user relationships.
[0073] Many questions in the Q&A community are answered by more than one user. Users are not directly connected to each other, but are indirectly connected through several questions or user nodes after answering the questions.
[0074] A1 and A2 jointly answered Q1, forming a common answer path and an indirect connection. These respondents answered questions in the same field, so when a similar new question Q2 appears later, the two users who have jointly answered the same field question Q1 may answer this new question again.
[0075] S5.2, explore the connection relationship generated by the user's answering questions, and select the connection path combination. The present invention selects three connection paths generated by the user's answering questions, such as Figure 3 As shown, they are “AQA”, “AQRQA” and “AQAQA” respectively. These three paths are of great significance for aggregating the potential information generated by answering questions between users.
[0076] Certain potential information will be generated between respondents who have answered the same question, answered two questions asked by the same questioner, or have intersections in their common answer networks.
[0077] S5.3, using the three path combinations in S5.2, the question-answer heterogeneous graph is sampled through a meta-path-based method to obtain neighboring respondents who are valuable to the target respondent.
[0078] The influence between different users in the same answer path varies in magnitude, and the semantic information contained in these paths needs to be integrated;
[0079] There are many types of meta-paths in community question-answering heterogeneous graphs. A fixed meta-path can only reflect the neighbor node relationship at a single level of the answerer, and cannot reflect the semantic level relationship under multiple connection relationships. Different answer paths also generate different potential information. The heterogeneous graph sampling method guided by a single meta-path cannot cover all user relationships.
[0080] S5.4, such as Figure 4 As shown, this model can be divided into two parts: first, the aggregation of user information within a single meta-path, and second, the aggregation of user information between different meta-paths;
[0081] Select respondent i and its neighbor respondent node j found through path p, concatenate the two respondent vectors and transform them by multiplying them by the attention vector to get the attention of node j to node i under meta-path p. The attention here is not symmetric, because for each node itself, its neighbor node set is different, and the calculated result is also different.
[0082] The attention weight of each respondent node found through the meta-path p is obtained through the normalization operation;
[0083] After multiplying the weight of each node by its respective embedding representation and accumulating the sum, the final embedding representation of the respondent node in this meta-path is obtained through the output of the activation function;
[0084] This represents the result of information aggregation of the respondent and all its valuable neighboring respondent under this meta-path. Given m meta-paths, the embedding representation of m corresponding respondent nodes i can be calculated through the node-level attention mechanism: [A p1 , A p2 , ..., A pm ].
[0085] The information aggregation results of all common answer paths of the user are obtained. Next, the meta-path level attention The force mechanism is used to aggregate the feature information between different paths. The calculation expression is as follows:
[0086] In the formula That is, the result of concatenating the representation vectors of the two answerer nodes, multiplying them by the attention vector, and calculating the attention weight value between the two. That is, the normalized weight value of the attention size of the respondent node to the target node obtained by sampling all the same connection meta-paths;
[0087] The importance of each meta-path can be obtained by performing a nonlinear transformation on the node-level respondent representation sequence, multiplying it with the semantic-level attention vector q, and performing an average operation. The attention calculations of all meta-paths share the calculation parameters in this formula to facilitate meaningful comparison.
[0088] The attention value of the meta-path is normalized by the softmax function to obtain the weight value of each path. The calculation expression is as follows:
[0089] Where W Pk That is, it is the result of calculating the attention size between different meta-paths through the attention vector, β Pk That is, the weight calculation result after normalizing the attention between all paths;
[0090] The embedding set of the respondent nodes under each meta-path and the corresponding importance weight values are obtained. After multiplying and accumulating them one by one, the respondent embedding representation A based on the double-layer attention mechanism can be obtained. c , which represents the representation result of the feature information contained in the user connection relationship.
[0091] After learning the representation of users from two perspectives, namely the question-answer relationship between users and questions and the connection relationship between users caused by answering questions, this study concatenates these two parts of the embedding results and obtains the comprehensive embedding representation of the user through the fully connected layer to obtain the comprehensive representation result of the answerer. The calculation expression is as follows: A=fc([A p ; A c ])
[0092] S6, uses convolutional neural network to build a ranking model and calculate the correlation score between the answerer vector and the question vector;
[0093] In order to calculate the score ranking of the respondent set for different questioners and questions, conventional methods such as vector dot product and cosine similarity can easily obtain the respondent score, but this cannot extract the deep relationship between the respondent and the question.
[0094] Convolutional neural networks (CNNs) perform well in finding hidden correlations between entities;
[0095] S6.1, e.g. Figure 5 As shown in the figure, the final representation result based on the user's answering behavior and connection relationship is concatenated with the question vector. The embedding representations of the answerer A and the question Q are both d-dimensional. The two vectors are stacked to form a feature matrix of size d×2.
[0096] S6.2, select two convolution kernels of different sizes, k1∈R d×1 and k2∈R d×2 Perform convolution operation on the feature matrix. Select n convolution kernels for each type, and after convolution, obtain a feature matrix of size n×3.
[0097] The convolution result is linearly transformed to obtain the relevance score S of each respondent to the question and rank them. The score calculation expression is as follows: S=w2*((w1*M) T +b)
[0098] In the formula, w1∈1×n, w2∈1×3, b∈3×1. S is the score obtained by the respondent for this question.
[0099] The present invention selects three samples from the respondent set for sampling, namely, the respondent who has accepted the current question, other respondent who answered the current question, and respondent who did not answer the current question. The present invention believes that the score of the respondent who has accepted is higher than that of other respondent, and the score of the respondent who answered the current question is higher than that of the respondent who did not answer the current question.
[0100] The loss function of the present invention selects pairwise loss for calculation, and the calculation expression is as follows:
[0101] formula is the score of accepted respondents, is the score of other answerers of the current question, is the score of other respondents who have not answered the current question, negative sampling is performed from the set of other respondents, and q is the selected current question. The purpose of using the pairwise loss function is to maximize the score gap between each grouping, thereby optimizing the embedding representation of the entire model.
[0102] To avoid the cold start problem, the users selected in the test set should have at least 5 records of asking or answering questions. The candidate set size for each question is set to 20, which includes the answerer of the current question and other potential users with expertise. These candidates are ranked, and the user with the highest score is considered the answerer of the predicted acceptable answer. Among them, the provider of the accepted answer is the de facto standard.
[0103] The deep learning framework used in this invention is PyTorch. In the experiment, the question title, content and label are spliced and converted through the connection layer, and the dimension is uniformly set to 128. The Adam optimizer is selected in the experiment, which has excellent performance and is one of the current mainstream optimizers. The learning rate is set to 0.001. At the same time, the EarlyStopping strategy is used during the training process.
[0104] Table 1 Experimental results on question answering dataset
[0105]
[0106] Among them, Score is the simplest evaluation method, which recommends the respondent with the largest number of accepted answers as the predicted accepted respondent; NMF regards the question routing task as a ranking task, and decomposes the respondent features into non-negative matrix factors by matrix decomposition to obtain the respondent's professional knowledge ranking for the question words; L2R uses the learning ranking algorithm of SVM and RankingSVM. The relationship between users and questions is studied, and the corresponding features are extracted to predict the respondent ranking; Metapath2Vec first proposed a random walk method guided by meta-paths to sample heterogeneous neighbor sets, and studied the representation relationship of all types of nodes through the Skip-gram model, and extracted the corresponding features to predict the respondent ranking; NeRank constructed a heterogeneous information network of the question-answering community, and learned the node embedding in the network by a meta-path-based method. It is one of the most advanced question routing methods based on network embedding; TCQR mainly considers the impact of time features on the question routing task, and models the user's multi-faceted professional knowledge through a time context-aware model. As can be seen from the table, this application is superior to the above six comparison models in the three indicators of the two data sets, and the indicators have been improved by about 4%.
[0107] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the embodiments. It can be fully applied to various fields suitable for the present invention. For those familiar with the art, other modifications can be easily realized. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A question routing method in a question-answering community based on a heterogeneous graph neural network, comprising the following steps: S1, collects question-answering datasets and user information from the community question-answering system Stack Exchange, and constructs a question-answering heterogeneous graph based on the relationship between users and questions; The question-answer heterogeneous graph is represented by G, G=(V, E), V represents a node set in the question-answer heterogeneous graph, E represents an edge set formed between nodes in the question-answer heterogeneous graph, and the nodes in the node set V include answerer nodes, question nodes, and questioner nodes; S2, uses the Bert pre-trained model to embed the respondent attributes and question content; S3, using the question-answer meta-path to sample the question-answer heterogeneous graph, and using the skip-gram algorithm to extract feature information from the user's complete answering behavior; S4, based on the attention mechanism and Bi-LSTM, obtains the sequence features of the user's recent answers, and concatenates the sequence features with the feature information in the user's complete answering behavior to obtain a complete representation result based on the user's answering behavior modeling; S5, uses random walk to update the user vector, and extracts the feature information contained in the connection relationship between users’ answers through meta-path combination and double-layer attention mechanism; S6, uses a convolutional neural network to build a ranking model and calculate the correlation score between the answerer vector and the question vector.
2. According to the method for question routing in a question-answering community based on a heterogeneous graph neural network according to claim 1, step S3 comprises the following steps: S3.1: In the question-answering heterogeneous graph, the questioner is R, the question is Q, the answerer is A, and the question-answering meta-path is "AQRQA". The sampling length is set, and the sampling method and probability formula of the question-answering heterogeneous graph established in S1 are modified based on the voting and time information of the answer; S3.2: Sample the question-answer heterogeneous graph through the question-answer meta-path to obtain a sequence of node components; S3.3: Use the skip-gram algorithm to learn the node sequence and obtain the representation vector of the feature information in each user's complete answering behavior.
3. According to the method for question routing in a question-answering community based on a heterogeneous graph neural network according to claim 1, step S4 comprises the following steps: S4.1: Extract the most recently answered questions of each user and organize them into a sequence Q in the order of answering. The older the answer, the higher the ranking. S4.2: Obtain the embedding representation of the user ID and obtain the question representation vector through the Bert model; S4.3: The question sequence and the user representation are used to obtain the weight of each question through the attention mechanism and normalize it. Then, the question vector and the weight are multiplied one by one to obtain the content features in the user's answer sequence; S4.4: Input the question sequence Q into the bidirectional long short-term memory network, obtain the hidden layer output at each moment, add the outputs at each moment bit by bit and calculate the average, and obtain the time series features in the answer sequence; S4.5: Concatenate the content features and temporal features obtained in S4.3 and S4.4 through a fully connected layer to obtain the sequence features of the user's answer; S4.6: Concatenate the answer sequence features, the feature information of the complete answering behavior, and the user attributes and pass them through a fully connected layer to obtain a vector representation result based on the user answering behavior modeling.
4. According to the question routing method in the question-answering community based on heterogeneous graph neural network described in patent claim 3, the expression for calculating the content features based on the attention mechanism in step S4.3 is: Where α i is the weight obtained after the attention mechanism and normalization, a c It is the content feature in the user's answer sequence obtained by multiplying the weight value and the question sequence one by one.
5. According to the question routing method in the question-answering community based on heterogeneous graph neural network described in patent claim 3, the expression for calculating the time series feature based on the bidirectional long short-term memory network in step S4.4 is: Where h t is the hidden layer output of a certain problem obtained through the bidirectional long short-term memory network, a t It is the representation result after adding the hidden output of the problem at each moment bit by bit and calculating the average.
6. According to the question routing method in the question-answering community based on heterogeneous graph neural network described in patent claim 3, the expression for calculating the sequence characteristics of the user's answer in step S4.5 is: A S =f c ([a t ; a c ]) Where A S That is, the representation result after the temporal features and content features are concatenated and output through the fully connected layer.
7. According to the question routing method in the question-answering community based on heterogeneous graph neural network described in patent claim 3, the calculation expression based on the user answering behavior modeling in step S4.6 is: A=f c ([A L ; A S ; A U ]) Where A is the vector representation result after studying from two perspectives in the user's answering behavior and fusing it with the user's attributes.
8. According to the method for question routing in a question-answering community based on a heterogeneous graph neural network according to claim 1, step S5 comprises the following steps: S5.1, use random walks to extract the implicit structural information in the question-answer heterogeneous graph and update the embedding representation of the answerer nodes in the network; S5.2, explore the connection relationship generated by users' answers and select the connection path combination; S5.3, using the path combination in S5.1, sampling the question-answer heterogeneous graph through a meta-path-based method to obtain neighboring respondents who are valuable to the target respondent; S5.4, a two-layer attention mechanism is used to hierarchically aggregate user information from the node to the path level.
9. According to the question routing method in the question-answering community based on heterogeneous graph neural network according to claim 8, the expression for calculating the user information aggregation result based on the double-layer attention mechanism in step S5.4 is: In the formula A is the representation result of the information aggregation of the answerer nodes within a single path. c It is the information aggregation result after applying the attention mechanism between m meta-paths.
10. According to the method for question routing in a question-answering community based on a heterogeneous graph neural network according to claim 1, step S6 comprises the following steps: S6.1, concatenating the final representation result based on the user's answering behavior and connection relationship with the question vector; S6.2, use convolution kernels of different sizes to perform convolution operations on the concatenated feature maps; S6.3, perform a linear transformation operation on the convolution result to obtain the relevance score of each respondent to the question and rank them.
11. According to the question routing method in the question-answering community based on heterogeneous graph neural network according to claim 10, the calculation expression of the linear transformation operation in step S6.3 is: S=w2*((w1*M) T +b) Where S is the relevance score between the user and the question after convolution and linear transformation operations.
