[go: up one dir, main page]

CN109033463B - Community question-answer content recommendation method based on end-to-end memory network - Google Patents

Community question-answer content recommendation method based on end-to-end memory network Download PDF

Info

Publication number
CN109033463B
CN109033463B CN201811008620.4A CN201811008620A CN109033463B CN 109033463 B CN109033463 B CN 109033463B CN 201811008620 A CN201811008620 A CN 201811008620A CN 109033463 B CN109033463 B CN 109033463B
Authority
CN
China
Prior art keywords
title
memory
vector
layer
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201811008620.4A
Other languages
Chinese (zh)
Other versions
CN109033463A (en
Inventor
陈细玉
林穗
孙为军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201811008620.4A priority Critical patent/CN109033463B/en
Publication of CN109033463A publication Critical patent/CN109033463A/en
Application granted granted Critical
Publication of CN109033463B publication Critical patent/CN109033463B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于端到端记忆网络的社区问答内容推荐方法,首先获取标题作为数据集并对数据集进行预处理,将数据集划分为训练集、验证集和测试集;然后根据数据集建立端到端记忆网络模型;最后使用具有AdaGrad更新规则的随机梯度下降(SGD)优化模型。

Figure 201811008620

The invention discloses a community question and answer content recommendation method based on an end-to-end memory network. First, a title is obtained as a data set, and the data set is preprocessed, and the data set is divided into a training set, a verification set and a test set; Sets to build an end-to-end memory network model; finally the model is optimized using stochastic gradient descent (SGD) with AdaGrad update rules.

Figure 201811008620

Description

Community question-answer content recommendation method based on end-to-end memory network
Technical Field
The invention relates to the field of content recommendation, in particular to a community question and answer content recommendation method based on an end-to-end memory network.
Background
The network community question-answering is a main use platform for solving problems and sharing knowledge and experience of people at present, for example, knowing that the information range is wide, but not everyone is interested, so that the content which the user is interested in needs to be recommended to the user, and the viscosity of the user is increased.
Disclosure of Invention
The invention aims to solve one or more defects and provides a community question and answer content recommendation method based on an end-to-end memory network.
In order to realize the purpose, the technical scheme is as follows:
a community question-answer content recommendation method based on an end-to-end memory network comprises the following steps:
s1: acquiring a title as a data set, preprocessing the data set, and dividing the data set into a training set, a verification set and a test set;
s2: establishing an end-to-end memory network model according to the data set;
s3: a random gradient descent (SGD) optimization model with AdaGrad update rules was used.
Preferably, the data set of step S1 is divided into training set, verification set and test set on average.
Preferably, the title in step S1 is a content title of the user browsing and historical behavior in the community question and answer.
Preferably, the end-to-end memory model comprises a single layer model and a multilayer model; wherein the single-layer model comprises a memory component, an input component, and an output component;
wherein the memory component represents: title set D ═ x for storing historical behaviors1,x2...xnWill each word w using a matrix A of size dim x V |ij∈xiMemory vector { a) embedded into d-dimensionijIn such a thatij=Awij. Entire sentence set { xiUsing matrix A to convert into memory vector of dimension d { a }i};
The input component represents: the forward browsing title q is converted into vector B by B matrix, B is calculated and a is memorizediThe matching degree between the two formulas is as follows: p is a radical ofi=Softmax(bTai) (ii) a Wherein Softmax (z)i)=eZi/∑jeZjP is the probability vector on the input;
the output component represents: title set of historical behavior D ═ { x ═ x1,x2...xnD, using a matrix C to convert into an output vector C with dimension diThe output o is the output vector ciAnd probability vector weighted sum, formula:
Figure BDA0001780630110000021
final prediction f ═ Softmax (W (o + b));
the multi-layer model is that the header q of the input element is the sum of the previous-hop input header b and the output o, i.e. the input of the next layer k +1 is the output o from the layer kkAnd input bkThe formula: bk+1=ok+bk;
Wherein each layer has its own embedded matrix ak,CkFor embedding input { xi}。
Preferably, the multi-layer model further comprises a sentence representation, each sentence xi={xi1,xi2,...,xinEmbed each word and sum the resulting vectors, and add a time representation, the word vector being a 0-1 vector of length V, such that ai=∑jAxij+TA(i) (ii) a Wherein T isA(i) Is a special matrix T encoding time informationARow i of (1); all in oneMatrix Tc, ci ═ Σ for output embeddingjCxij+TC(i)。,TAAnd TCAre learned during training.
Preferably, the multilayer model further comprises word similarity, and in the currently browsed title q in the first layer, keywords with similarity exceeding 0.8 in q in memory are added into q by using the word similarity, so that the situation that the weight of the titles with different words is too low while the keywords are similar or similar to the keywords in q in memory is avoided;
selecting keywords of the title being browsed from a corpus consisting of all preprocessed titles, and carrying out similarity calculation between every two words and the rest keywords to calculate a formula:
Figure BDA0001780630110000022
where yi is the coefficient for w1 and w2 branching at the beginning of the ith layer.
Preferably, the evaluation criteria for the model are accuracy, recall, and F1 score.
Compared with the prior art, the invention has the beneficial effects that:
the end-to-end memory network can remember a large amount of user behaviors and add time, so that the interest prediction of the user is more accurate and reliable. And reducing supervision items by adopting end-to-end training. The attention mechanism is included, so that different titles have different weights, the predicted interest points can be sequenced, the recommended emphasis points are different, the interest points with large weights are ranked highly, and the recommended content of the interest points is more than that of other interest points. And the word similarity is added, so that the prediction is more accurate.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
the invention is further illustrated below with reference to the figures and examples.
Example 1
Referring to fig. 1, a community question-answer content recommendation method based on an end-to-end memory network includes the following steps:
s1: acquiring a title as a data set, preprocessing the data set, and dividing the data set into a training set, a verification set and a test set;
s2: establishing an end-to-end memory network model according to the data set;
s3: a random gradient descent (SGD) optimization model with AdaGrad update rules was used.
For example, it is known that questions and their answers are more likely to be shared than known in hundredths, rather than being answered. Each question is short and descriptive, so the question is the title. All the acquired titles need to be preprocessed, each title is firstly subjected to word segmentation, stop words and special characters such as 'a' and 'a' are then deleted, and because many 'reasons', 'how' and 'experiences' in questions are known, the words are also deleted, so that the situation that the weight of common irrelevant words is too large, required key words are covered, the maximum length of sentences is set to be 50, and the exceeding contents need to be cut is avoided. The data set is evenly divided into a training set, a validation set and a test set.
The method comprises the steps of selecting titles of historical behaviors of a user as memory in a model, wherein the historical behaviors comprise removing the latest browsed titles and agreeing titles which are browsed, answering the titles, paying attention to the titles, selecting the latest 5 titles according to time, and recommending the content related to the latest interest of the user, so that the selected titles are sorted according to the operation time of the user to form a title set D, the test effect is better when the embedding dimension of each title is 300-500-.
In this embodiment, the end-to-end memory model includes a single-layer model and a multi-layer model; wherein the single-layer model comprises a memory component, an input component, and an output component;
wherein the memory component represents: title set D ═ x for storing historical behaviors1,x2...xnUsing a matrix of size dim x V |)A will each word wij∈xiMemory vector { a) embedded into d-dimensionijIn such a thatij=Awij. Entire sentence set { xiUsing matrix A to convert into memory vector of dimension d { a }i};
The input component represents: the forward browsing title q is converted into vector B by B matrix, B is calculated and a is memorizediThe matching degree between the two formulas is as follows: p is a radical ofi=Softmax(bTai) (ii) a Wherein Softmax (z)i)=eZi/∑jeZjP is the probability vector on the input;
the output component represents: title set of historical behavior D ═ { x ═ x1,x2...xnD, using a matrix C to convert into an output vector C with dimension diThe output o is the output vector ciAnd probability vector weighted sum, formula:
Figure BDA0001780630110000041
final prediction f ═ Softmax (W (o + b));
the multi-layer model is that the header q of the input element is the sum of the previous-hop input header b and the output o, i.e. the input of the next layer k +1 is the output o from the layer kkAnd input bkThe formula: bk+1=ok+bk
Wherein each layer has its own embedded matrix ak,CkFor embedding input { xi}。
In this embodiment, the multi-layer model further includes sentence representations, each sentence xi={xi1,xi2,...,xinEmbed each word and sum the resulting vectors, and add a time representation, the word vector being a 0-1 vector of length V, such that ai=∑jAxij+TA(i) (ii) a Wherein T isA(i) Is a special matrix T encoding time informationARow i of (1); similarly, the matrix Tc, ci ═ Σ for output embeddingjCxij+TC(i)。,TAAnd TCAre all in the training periodAnd (4) learning.
Wherein each matrix such as A, B, C, W is also obtained by training, and the first jump matrix A is used for reducing the number of parameters for convenient training1B, last hop matrix WT=CKThe other memory matrix A of each hop is the same as the output matrix C of the previous hop, namely Ak+1=CkFor the same reason, the matrix T for time representationA,TCThe parameters are reduced in the same way.
In this embodiment, the multi-layer model further includes word similarity, and in the currently-viewed title q in the first layer, the keyword whose similarity in memory with that in q exceeds 0.8 is added to q by using the word similarity, so as to avoid that the title weight which is the same as or similar to that in q in memory but different from words is too low;
selecting keywords of the title being browsed from a corpus consisting of all preprocessed titles, and carrying out similarity calculation between every two words and the rest keywords to calculate a formula:
Figure BDA0001780630110000042
where yi is the coefficient for w1 and w2 branching at the beginning of the ith layer.
And the predicted result of the model is used as the nearest interest point of the user, and for each browsing title, the top 5 predicted interest points are selected according to the ranking. And taking the interest points as tags, recommending hot content corresponding to the tags, for example, if a predicted result tag comprises a friend, recommending the hot content with the friend tag.
In this embodiment, the evaluation criteria of the model are accuracy, recall, and F1 score.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (4)

1.一种基于端到端记忆网络的社区问答内容推荐方法,其特征在于,包括以下步骤:1. a community question and answer content recommendation method based on end-to-end memory network, is characterized in that, comprises the following steps: S1:获取标题作为数据集并对数据集进行预处理,将数据集划分为训练集、验证集和测试集;S1: Obtain the title as a data set and preprocess the data set, and divide the data set into training set, validation set and test set; S2:根据数据集建立端到端记忆网络模型;S2: Build an end-to-end memory network model based on the dataset; S3:使用具有AdaGrad更新规则的随机梯度下降(SGD)优化模型;S3: Optimize the model using stochastic gradient descent (SGD) with AdaGrad update rules; 所述端到端记忆模型包括单层模型和多层模型;其中所述单层模型包括记忆组件、输入组件和输出组件;The end-to-end memory model includes a single-layer model and a multi-layer model; wherein the single-layer model includes a memory component, an input component and an output component; 其中记忆组件表示:存放历史行为的标题集D={x1,x2...xn},使用大小为dim×|V|的矩阵A将每个字wij∈xi嵌入到d维的记忆向量{aij}中,使得aij=Awij, 整个句子集{xi}使用矩阵A转换为维度为d的记忆向量{ai};The memory component represents: the title set D = {x 1 , x 2 ... x n } that stores historical behaviors, and each word w ij ∈ x i is embedded in the d dimension using a matrix A of size dim×|V| In the memory vector {a ij } of , such that a ij =Aw ij , the entire sentence set {x i } is converted into a memory vector {a i } with dimension d using matrix A; 输入组件表示:正浏览标题q被B矩阵转换为向量b,计算b和每个记忆ai之间的匹配度,公式:pi=Softmax(bTai);其中Softmax(zi)=eZi/∑jeZj,p是输入上的概率向量;The input component represents: the current browsing title q is converted into a vector b by the B matrix, and the matching degree between b and each memory a i is calculated, the formula: p i =Softmax(b T a i ); where Softmax(z i )= e Zi /∑ j e Zj , p is the probability vector on the input; 输出组件表示:历史行为的标题集D={x1,x2...xn},使用矩阵C转换为维度为d的输出向量ci,输出o是输出向量ci和概率向量加权和,公式:
Figure FDA0003267401270000011
The output component represents: the title set D = {x 1 , x 2 ... x n } of historical behavior, converted to an output vector c i of dimension d using a matrix C, and the output o is the weighted sum of the output vector c i and the probability vector ,formula:
Figure FDA0003267401270000011
最终预测f=Softmax(W(o+b));Final prediction f=Softmax(W(o+b)); 所述多层模型则为输入组件的标题q是上一跳输入标题b与输出o之和,即下一层k+1的输入是来自层k的输出ok和输入bk的总和,公式:bk+1=ok+bkThe multi-layer model is that the title q of the input component is the sum of the input title b and the output o of the previous hop, that is, the input of the next layer k+1 is the sum of the output o k and the input b k from the layer k, the formula : b k +1 =ok +b k ; 其中每个层都有自己的嵌入矩阵Ak,Ck,用于嵌入输入{xi};where each layer has its own embedding matrix A k , C k for embedding the input {x i }; 所述多层模型还包括句子表示,每一个句子xi={xi1,xi2,...,xin},嵌入每个单词并对得到的向量求和,并加入时间表示,单词向量是一个长度为V的0-1向量,使得ai=∑jAxij+TA(i);其中TA(i)是编码时间信息的特殊矩阵TA的第i行;同理,输出嵌入用矩阵Tc,ci=∑jCxij+TC(i),TA和TC都是在训练期间学习的;The multi-layer model also includes sentence representation, for each sentence x i = {x i1 , x i2 , ..., x in }, embedding each word and summing the resulting vectors, and adding the temporal representation, the word vector is a 0-1 vector of length V such that a i = ∑ j Ax ij + T A (i); where T A (i) is the ith row of the special matrix T A that encodes time information; similarly, output Embedding matrix Tc, ci = ∑ j Cx ij + T C (i), both T A and T C are learned during training; 所述多层模型还包括词相似度,在第一层的正浏览标题q中,利用词相似度,将记忆中与q中相似度超过0.8的关键词加入q中,避免记忆中与q中意思一样或相近,词却不一样的标题权重过低;The multi-layer model also includes word similarity. In the current browsing title q of the first layer, the word similarity is used to add keywords in memory with a similarity of more than 0.8 to q, so as to avoid the similarity between memory and q. Titles with the same or similar meaning but different words have too low weight; 在由所有预处理过的标题构成的语料库中,选出正浏览标题的关键字,与剩下的关键字进行两两词相似度计算,计算公式:In the corpus composed of all the preprocessed titles, select the keywords of the title being browsed, and perform pairwise similarity calculation with the remaining keywords. The calculation formula is:
Figure FDA0003267401270000021
其中yi为w1和w2在第i层开始分支的系数。
Figure FDA0003267401270000021
where yi is the coefficient for w1 and w2 to start branching at layer i.
2.根据权利要求1所述的一种基于端到端记忆网络的社区问答内容推荐方法,其特征在于,步骤S1所述数据集平均划分为训练集、验证集和测试集。2 . The method for recommending community question and answer content based on an end-to-end memory network according to claim 1 , wherein the data set in step S1 is equally divided into a training set, a verification set and a test set. 3 . 3.根据权利要求1所述的一种基于端到端记忆网络的社区问答内容推荐方法,其特征在于,步骤S1所述标题为用户在社区问答中正在浏览和历史行为的内容标题。3 . The method for recommending content in a community question and answer based on an end-to-end memory network according to claim 1 , wherein the title described in step S1 is the title of the content that the user is browsing and historical behavior in the community question and answer. 4 . 4.根据权利要求1所述的一种基于端到端记忆网络的社区问答内容推荐方法,其特征在于,所述模型的评估标准为精确度、召回率和F1得分。4. A community question-and-answer content recommendation method based on an end-to-end memory network according to claim 1, wherein the evaluation criteria of the model are precision, recall and F1 score.
CN201811008620.4A 2018-08-28 2018-08-28 Community question-answer content recommendation method based on end-to-end memory network Expired - Fee Related CN109033463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811008620.4A CN109033463B (en) 2018-08-28 2018-08-28 Community question-answer content recommendation method based on end-to-end memory network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811008620.4A CN109033463B (en) 2018-08-28 2018-08-28 Community question-answer content recommendation method based on end-to-end memory network

Publications (2)

Publication Number Publication Date
CN109033463A CN109033463A (en) 2018-12-18
CN109033463B true CN109033463B (en) 2021-11-26

Family

ID=64625982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811008620.4A Expired - Fee Related CN109033463B (en) 2018-08-28 2018-08-28 Community question-answer content recommendation method based on end-to-end memory network

Country Status (1)

Country Link
CN (1) CN109033463B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134771B (en) * 2019-04-09 2022-03-04 广东工业大学 Implementation method of multi-attention-machine-based fusion network question-answering system
CN110188272B (en) * 2019-05-27 2023-04-21 南京大学 A tag recommendation method for community Q&A websites based on user background

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126596A (en) * 2016-06-20 2016-11-16 中国科学院自动化研究所 A kind of answering method based on stratification memory network
CN106407316A (en) * 2016-08-30 2017-02-15 北京航空航天大学 Topic model-based software question and answer recommendation method and device
CN108133038A (en) * 2018-01-10 2018-06-08 重庆邮电大学 A kind of entity level emotional semantic classification system and method based on dynamic memory network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9063975B2 (en) * 2013-03-15 2015-06-23 International Business Machines Corporation Results of question and answer systems
US20140030688A1 (en) * 2012-07-25 2014-01-30 Armitage Sheffield, Llc Systems, methods and program products for collecting and displaying query responses over a data network
US20180165361A1 (en) * 2016-12-09 2018-06-14 At&T Intellectual Property I, L.P. Mapping service and resource abstractions to network inventory graph database nodes and edges
CN107330130B (en) * 2017-08-29 2020-10-20 北京易掌云峰科技有限公司 Method for realizing conversation robot recommending reply content to manual customer service

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126596A (en) * 2016-06-20 2016-11-16 中国科学院自动化研究所 A kind of answering method based on stratification memory network
CN106407316A (en) * 2016-08-30 2017-02-15 北京航空航天大学 Topic model-based software question and answer recommendation method and device
CN108133038A (en) * 2018-01-10 2018-06-08 重庆邮电大学 A kind of entity level emotional semantic classification system and method based on dynamic memory network

Also Published As

Publication number Publication date
CN109033463A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN110825879B (en) Decide a case result determination method, device, equipment and computer readable storage medium
US11275895B1 (en) Generating author vectors
CN106815252B (en) Searching method and device
CN111708873A (en) Intelligent question answering method and device, computer equipment and storage medium
US20160378863A1 (en) Selecting representative video frames for videos
CN110263235A (en) Information pushes object updating method, device and computer equipment
CN112487291B (en) Big data-based personalized news recommendation method and device
US10997703B1 (en) Methods and systems for automated attractiveness prediction
WO2014160282A1 (en) Classifying resources using a deep network
CN113505307B (en) Social network user region identification method based on weak supervision enhancement
CN111309887B (en) Method and system for training text key content extraction model
CN109992674B (en) Recommendation method fusing automatic encoder and knowledge graph semantic information
CN114443956B (en) Content recommendation method and related equipment
CN113609248B (en) Word weight generation model training method and device, and word weight generation method and device
CN110321421B (en) Expert recommendation method for website knowledge community system and computer storage medium
US20110219299A1 (en) Method and system of providing completion suggestion to a partial linguistic element
CN112380421A (en) Resume searching method and device, electronic equipment and computer storage medium
CN113011172A (en) Text processing method and device, computer equipment and storage medium
WO2020135642A1 (en) Model training method and apparatus employing generative adversarial network
KR102612805B1 (en) Method, device and system for providing media curation service based on artificial intelligence model according to company information
CN109033463B (en) Community question-answer content recommendation method based on end-to-end memory network
CN116205700A (en) Recommendation method and device for target product, computer equipment and storage medium
CN117556004A (en) A knowledge question and answer method, device and storage medium based on food engineering
CN111159242B (en) Client reordering method and system based on edge calculation
CN115329085B (en) A social robot classification method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211126