CN108304587A - A kind of community's answer platform answer sort method - Google Patents

A kind of community's answer platform answer sort method Download PDF

Info

Publication number
CN108304587A
CN108304587A CN201810186972.2A CN201810186972A CN108304587A CN 108304587 A CN108304587 A CN 108304587A CN 201810186972 A CN201810186972 A CN 201810186972A CN 108304587 A CN108304587 A CN 108304587A
Authority
CN
China
Prior art keywords
vector
answer
sequence
text
theme
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.)
Granted
Application number
CN201810186972.2A
Other languages
Chinese (zh)
Other versions
CN108304587B (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.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
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 University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201810186972.2A priority Critical patent/CN108304587B/en
Publication of CN108304587A publication Critical patent/CN108304587A/en
Application granted granted Critical
Publication of CN108304587B publication Critical patent/CN108304587B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of community's answer platforms to answer sort method, can make full use of problem and the abundant metadata of answer (content of text of such as theme, timestamp and question answering) to solve to answer sequencing problem;Meanwhile answer sequencing problem is carried out using with enhanced attention mechanism Recognition with Recurrent Neural Network model (EARNN), compared to conventional model, use more information.For prediction as a result, improving in multiple evaluation indexes.

Description

A kind of community's answer platform answer sort method
Technical field
The present invention relates to machine learning and question answering system fields more particularly to a kind of community's answer platform to answer sequence side Method.
Background technology
Community's answer platform, such as Baidu is known, search dog is asked, and a line of questioning reconciliation is provided for Internet user The platform answered, the high quality to help people to be quickly obtained daily or professional problem are answered.As community's question and answer become increasingly It is welcome, platform when the problem of also gradually emerge out, one of them is exactly that the quality answered is irregular and low The answer of quality can greatly influence experience of the user on platform.Although these current platforms are proposed mechanism such as " thumbing up ", But for those emerging problems and answer, since time of occurrence is short, it is also unstable to lead to thumb up number, cannot embody back The quality height answered.Therefore, one that the quality height of answer is community's answer platform urgent need solution how is effectively weighed to grind Study carefully problem.
It studies a question around this, researchers propose various ways, wherein it is quick that " answering sequence " is to aid in user Choose a kind of effective means of high quality answer in a series of answer irregular from quality.Relevant research is concentrated mainly on Morphology, syntax or semantic matches between problem and answer, and the metadata informations such as theme and timestamp are had ignored in the row of answer Caused actively impact in sequence problem.
Invention content
The object of the present invention is to provide a kind of community's answer platforms to answer sort method, can make full use of problem and answer Abundant metadata (content of text of such as theme, timestamp and question answering) come solve answer sequencing problem.
The purpose of the present invention is what is be achieved through the following technical solutions:
A kind of community's answer platform answer sort method, including:
A certain amount of data are crawled from community answer platform website, the data crawled for a problem include:Problem Content of text, the theme belonging to problem, a series of content of text of the corresponding answers of problem, the timestamp each answered and Each answer thumbs up number;
A series of text of the corresponding answers of theme, problem belonging to content of text, problem based on each problem crawled Content builds enhanced attention mechanism Recognition with Recurrent Neural Network model, and related answers are carried out in conjunction with the timestamp of each answer The sequence score of quality;In conjunction with the object function of sequence score and preset time-sensitive and use the pairs of instruction of problem dependence Practice strategy to be trained enhanced attention mechanism Recognition with Recurrent Neural Network model;
For a new problem and its a series of answer, using belonging to the content of text of new problem, new problem theme, A series of content of text of the corresponding answers of new problem and the timestamp each answered, to build a series of example and successively It is input in trained enhanced attention mechanism Recognition with Recurrent Neural Network model, to obtain a series of sequence score, root According to the size of sequence score, it is ranked up in a manner of vertical to accordingly answering.
As seen from the above technical solution provided by the invention, with enhanced attention mechanism Recognition with Recurrent Neural Network model (EARNN) answer sequencing problem is carried out, compared to conventional model, has used more information.For prediction as a result, more It improves in a evaluation index.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the flow chart that a kind of community's answer platform provided in an embodiment of the present invention answers sort method.
Specific implementation mode
With reference to the attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this The embodiment of invention, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, belongs to protection scope of the present invention.
The embodiment of the present invention provides a kind of community's answer platform answer sort method, includes mainly as follows as described in Figure 1 Step:
Step 1 crawls a certain amount of data from community answer platform website, the data packet crawled for a problem It includes:The content of text of theme, a series of corresponding answers of problem belonging to the content of text of problem, problem, each answer when Between stab and each answer thumbs up number.
A series of corresponding answers of step 2, the content of text based on each problem crawled, the theme belonging to problem, problem Content of text build enhanced attention mechanism Recognition with Recurrent Neural Network model, in conjunction with each answer timestamp carry out it is related The sequence score of the quality of answer;It is relied in conjunction with the object function of sequence score and preset time-sensitive and using problem Pairs of Training strategy is trained enhanced attention mechanism Recognition with Recurrent Neural Network model.
Step 3, for a new problem and its a series of answer, belonging to the content of text of new problem, new problem Theme, a series of corresponding answers of new problem content of text and the timestamp each answered, to build a series of reality Example is simultaneously sequentially input into trained enhanced attention mechanism Recognition with Recurrent Neural Network model, to obtain a series of sequence Score is ranked up in a manner of vertical to accordingly answering according to the size of sequence score.
In order to make it easy to understand, being described in detail below for the above process.
1, data crawl.
In the embodiment of the present invention, a certain amount of data are crawled from community answer platform website, a problem is crawled Data include:Theme (may belong to multiple themes), problem belonging to the content of text of problem, problem is a series of times corresponding The content of text answered, the timestamp each answered and each answer thumb up number.
2, data prediction.
It also needs to locate the data crawled in advance before building enhanced attention mechanism Recognition with Recurrent Neural Network model Reason, to ensure the effect of model;Pretreatment is main as follows:
1) the problem of word number in content of text is less than setting quantity and answer are removed.
In the embodiment of the present invention, need to remove the relatively low problem of certain quality and answer, it is generally recognized that in content of text The problem of word number is less than setting quantity and answer are that quality is lower;Illustratively, setting quantity herein can be 10.
2) removal thumb up quantity whithin a period of time wave band be more than preset range the problem of and answer.
In the embodiment of the present invention, if thumbing up quantity, wave band is more than preset range whithin a period of time, then it is assumed that thumbs up number There are no tending towards stability, these data are devious for model evaluation, thus removal thumb up the also unstable problems of number with It answers.
3) word segmentation processing is carried out to the residue problem after above-mentioned two step and the content of text of answer, then for each problem Data become:The word segmentation result of the content of theme, each answer belonging to the word segmentation result of the content of text of problem, problem, The timestamp of each answer and each answer thumb up number;Wherein each answer thumbs up verification of the number for model quality, Remaining information is used as the input of model, each assessment for answering quality for after.
3, enhanced attention mechanism Recognition with Recurrent Neural Network model is built.
It includes four parts to build enhanced attention mechanism Recognition with Recurrent Neural Network model:Input layer, shot and long term remember net Network layers, attention layer and assessment layer.
1) input layer:One is answered, it is believed that the answer is made of multiple sentences, and each sentence is made of multiple words; For corresponding problem, it is believed that the problem is made of a sentence, which is made of multiple words;For the master belonging to problem Topic, it is believed that theme is made of multiple words;Using Word Embedding technologies, by the word occurred in text all with a fixed length The vector of degree indicates that then, each word that the content of text of problem, the content of text of answer and theme occur will be replaced The vector tieed up at a K;Assuming that the sequence vector TQ of the content of text of problem is made of N number of vector, it is denoted as TQ={ x1,x2,…, xN},xp∈RK, p=1,2 ..., N;Assuming that the sequence vector TA of the content of text of an answer is made of M sentence, each sentence Son is made of D vector, then TA={ s1,s2,…,sM, sm={ ym1,ym2,...,ymD},ymd∈RK, m=1,2..., M, d= 1,2,...,D;Assuming that theme TC is made of C vector, it is denoted as TC={ z1,z2,...,zC},zq∈RK, q=1,2 ..., C.On It is non-fixed value to state middle N, M, D, C all, can be changed with the difference of input example.
2) shot and long term memory network layer:The sequence vector TQ and an answer sequence vector TA of problem are used two long Sequence vector in short-term memory network LSTM_Q and LSTM_A difference modeling problem and answer, and by last in LSTM_Q A cell vector is used for the initialization of cell vector in LSTM_A;Then it obtains problem and one is answered by shot and long term memory net Sequence vector after network, respectively MQ and MA, each vector contains the semantic information of context in sequence vector MQ and MA.
In the embodiment of the present invention, for the sequence vector TQ={ x of problem1,x2,...,xN, shot and long term memory network is at any time Between t=1,2..., N update LSTM_Q in cell sequence vector c={ c1,c2,...,cNAnd obtain hidden sequence vector h= {h1,h2,...,hN, calculation is as follows:
it=σ (Wxixt+Whiht-1+bi);
ft=σ (Wxfxt+Whfht-1+bf);
ct=ft·ct-1+it·τ(Wxcxt+Whcht-1+bc);
ot=σ (Wxoxt+Whoht-1+bo);
ht=ot·τ(ct);
Wherein, serial number vectorial in the numerical value at moment and the sequence vector TQ of problem corresponds, i.e. first moment t= 1 corresponds to the vector x of serial number 1 in TQ1;Particularly, cell vector c0With hidden vector h0It is initialized as null vector;it,ft,otRespectively For input gate, forget door and out gate;σ (), τ () are respectively sigmoid (), tanh () nonlinear activation letter Number;It is that element multiplies operation;{Wxi,Whi,Wxf,Whf,Wxc,Whc,Wxo,WhoIt is parameter matrix to be optimized in model, { bi,bf, bc,boIt is parameter vector to be optimized in model.
Similar, for each sentence sequence vector s in answerm={ ym1,ym2,...,ymD, shot and long term remembers net T'=1,2..., D update the cell sequence vector c'={ c' in LSTM_A to network at any time1,c'2,...,c'DAnd obtain it is hidden to Amount sequences h 'm={ h'm1,h'm2,...,h'mD}.Particularly, for the relationship between modeling problem and answer, so as to get it is hidden Vectorial h'mIt can be changed according to the difference of problem, enable cell vector c'0=cN, hidden vector h'm0It is initialized as null vector.Together It manages, the numerical value at moment is also corresponded with serial number vectorial in each sentence sequence vector herein.
By this layer, can be obtained by the sequence vector TQ and TA of problem and answer corresponding number hidden vector h and h'mAlthough the dimension and input of the quantity of hidden vector and vector remain unchanged, it contains the semantic information of context, Hidden sequence vector h namely sequence vector MQ, hidden sequence vector h' thereinmSet namely sequence vector MA.
3) attention layer:It can be effectively by the sequence vector MQ of problem, an answer using the attention mechanism of sentence grade Sequence vector MA interact to obtain problem one answer of vector sum vector;Alternatively, the attention mechanism based on sentence grade, Deeper word grade attention mechanism can be designed, theme is become into a vector FC from sequence vector TC;Then by theme Vectorial FC, the sequence vector MQ of problem and the sequence vector MA of an answer carry out fusion and finally obtain the vector sum one of problem The vector of a answer.
In the embodiment of the present invention, the attention mechanism of sentence grade can be used when specific implementation, it can also word grade attention machine System finally obtains corresponding vector to MQ, MA processing.For the ease of distinguishing, during following introduction, sentence grade is utilized Attention mechanism obtain the vector of problem, the vector of an answer corresponding is denoted as FQ1、FA1;Utilize word grade attention mechanism The vector of the vector, an answer that obtain problem is corresponding to be denoted as FQ2、FA2
It elaborates below for the attention mechanism and word grade attention mechanism of sentence grade.
A, the sequence vector MQ of the problem sequence vector MA answered with one are handed over using the attention mechanism of sentence grade The process for mutually obtaining the vector of one answer of vector sum of problem is as follows:
To the sequence vector MQ of problem, it is denoted as a K using average pond (averagepooling) operation and ties up Vectorial FQ1
Wherein, MQpIndicate the vector of p-th of word in sequence vector MQ.
For the sequence vector MA of answer, first using each sentence in the sequence vector MA of average pond operation handlebar answer Son is indicated with the vector of K dimensions, obtains several semantic expressiveness r'm, m=1,2..., M;Then, it is calculated using distance function Their own attention score α 'm, m=1,2..., M can be obtained the vector expression FA of answer using weighted average later1
Wherein, MAmdIndicate that the vector of d-th of word in sequence vector MA in m-th of sentence, f () indicate that cosine is similar Spend function.
B, using word grade attention mechanism, theme is become into a vector FC from sequence vector TC;Then by theme to The vector sum one that the sequence vector MA of amount FC, the sequence vector MQ of problem and an answer merge the problem that finally obtains returns The process for the vector answered is as follows:
To giving problem theme TC={ z1,z2,...,zC, become a regular length using the operation of average pondization Vectorial FC:
After obtaining vectorial FC, word grade attention mechanism is with it come the attention of each word in computational problem and answer Score;
For the sequence vector MQ of problem, it is made of a series of vector of semantic expressiveness, we are come using transition matrix W The distance between the vectorial FC of vector sum theme of each word in computational problem, calculated later using softmax operations The attention score β of p-th of word in problemp;The vectorial FQ for the problem of finally obtaining2It is expressed as:
Wherein, MQp、MQiThe corresponding pth indicated in sequence vector MQ, i vector, h (a, b)=aTWb is used for calculating not The distance of isospace vector, (FC, MQ of (a, b) corresponding above formula hereinp)、(FC,MQi)。
For the sequence vector MA of answer, with above-mentioned similar method be in answering in m-th of sentence d-th word to Amount calculates an attention score βmd, and the vector for obtaining m-th of sentence indicates rm;Then using similar to α 'm、FA1Calculating The attention score α of m-th of sentence in attention mechanism of the method to calculate word grademFA is indicated with the vector of answer2
Wherein, MAmd、MAmlThe corresponding vector for indicating d, l words in m-th of sentence in sequence vector MA.
In the embodiment of the present invention, the vector of the sequence vector MQ of the main Utilizing question of sentence grade attention mechanism and an answer Sequence MA, to distinguish the significance level of each sentence in answer, and word grade attention mechanism is then in sentence grade attention mechanism On the basis of further by using the additional information of theme TC capture theme, problem and to answer profound level between three semantic Relationship, while further discriminating between the importance of word and sentence in problem and answer.
It by the above method, can finally obtain, problem and the vector answered indicate, wherein FQ1、FA1、FQ2、FA2∈RK
4) layer is assessed:Answer deep layer language matching score is calculated in conjunction with the vector of one answer of vector sum of problem, then is tied Time effect is also included in by the timestamp that conjunction is answered considers range to obtain sequence score.
In the embodiment of the present invention, first, answer deep layer language is calculated in conjunction with the vector of one answer of vector sum of problem With scoreFormula is as follows:
Wherein, σ (), τ () are respectively sigmoid (), tanh () nonlinear activation function;Indicate splicing behaviour Make;{W1,W2It is parameter matrix to be optimized in model, { b1,b2It is parameter vector to be optimized in model;In above formula, FQy、 FAy, the associated vector of the above-mentioned calculation formula of the expressions of y=1 or 2 can be the result of calculation of sentence grade attention mechanism, can also be The result of calculation of word grade attention mechanism.
In conjunction with the time stamp T of answer, time effect is also included in and considers range to obtain sequence scoreFormula is such as Under:
Wherein, T0Indicate the timestamp of first answer, H is a hyper parameter.
4, the training of model parameter.
It is all in the enhanced attention mechanism Recognition with Recurrent Neural Network model that the step mainly establishes previous step Parameter matrix or vector are trained, including { Wxi,Whi,Wxf,Whf,Wxc,Whc,Wxo,Who}、{bi,bf,bc,bo, transition matrix W、{W1,W2And { b1,b2}.Specifically, in conjunction with assessment result and preset time-sensitive object function and use problem The pairs of Training strategy relied on is trained enhanced attention mechanism Recognition with Recurrent Neural Network model.
For each problem Q, two answer A are extracted from a series of corresponding answers+With A-, wherein A+Thumb up number More than A-, thus constitute triple (Q, A+, A-);
The object function of time-sensitive is minimized using stochastic gradient descent (SGD) algorithm:
L=max (0, m+S (Q, A-)-S(Q,A+));
Wherein, S (Q, A+) and S (Q, A-) the sequence scores of two answer A+ and A- in corresponding problem of representation Q.
In addition, in the training process, can entire data set be pressed 4:1 ratio cut partition is training set and test set, instruction Practice parameter of the collection for Optimized model, test set is used for weighing the quality of final mask.
5, value forecasting is carried out to a series of answers of new problem
The step carries out value forecasting mainly for a series of answers in new problem, and (sorts according to predictive value Score) height be ranked up.
In the embodiment of the present invention, using a new problem X, the corresponding theme B of new problem X, a series of answers text in Hold A={ A1,A2,...,AGAnd the corresponding time stamp T={ T of each answer1,T2,...,TG, build a series of example (X,B,Ag,Tg),1≤g≤G;These examples are sequentially input to trained enhanced attention mechanism Recognition with Recurrent Neural Network mould In type, to obtain a series of sequence scoreAccording to the size of sequence score, with vertical Mode is ranked up to accordingly answering;That is, sequence score is higher, then it is assumed that the quality accordingly answered is higher, and ranking is also opposite It is forward.
Said program of the embodiment of the present invention captures the depth between problem and answer by using the fusion of a variety of metadata Layer semantic relation, can effectively distinguish the emphasis of question and answer, realize the sequence of answer, help reader to be quickly found out valuable, have The answer of attraction.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment can By software realization, the mode of necessary general hardware platform can also be added to realize by software.Based on this understanding, The technical solution of above-described embodiment can be expressed in the form of software products, the software product can be stored in one it is non-easily In the property lost storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes the method described in each embodiment of the present invention.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto, Any one skilled in the art is in the technical scope of present disclosure, the change or replacement that can be readily occurred in, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claims Subject to enclosing.

Claims (8)

1. a kind of community's answer platform answers sort method, which is characterized in that including:
A certain amount of data are crawled from community answer platform website, the data crawled for a problem include:The text of problem A series of content of text of the corresponding answers of theme, problem belonging to this content, problem, the timestamp each answered and each That answers thumbs up number;
A series of content of text of the corresponding answers of theme, problem belonging to content of text, problem based on each problem crawled Enhanced attention mechanism Recognition with Recurrent Neural Network model is built, the quality of related answers is carried out in conjunction with the timestamp of each answer Sequence score;The pairs of training plan relied in conjunction with the object function of sequence score and preset time-sensitive and using problem Slightly enhanced attention mechanism Recognition with Recurrent Neural Network model is trained;
For a new problem and its a series of answer, using belonging to the content of text of new problem, new problem theme, newly ask The timestamp inscribed a series of content of text of corresponding answers and each answered, to build a series of example and sequentially input Extremely in trained enhanced attention mechanism Recognition with Recurrent Neural Network model, to obtain a series of sequence score, according to row The size of sequence score, is ranked up in a manner of vertical to accordingly answering.
2. a kind of community's answer platform according to claim 1 answers sort method, which is characterized in that build enhanced note Further include that pretreated step is carried out to the data crawled before meaning power mechanism Recognition with Recurrent Neural Network model, which includes:
Remove the problem of word number in content of text is less than setting quantity and answer;
Removal thumb up quantity whithin a period of time wave band be more than preset range the problem of and answer;
Word segmentation processing is carried out to the residue problem after above-mentioned two step and the content of text of answer, then for the data of each problem Become:The word segmentation result of the content of theme, each answer belonging to the word segmentation result of the content of text of problem, problem, each time The timestamp answered and each answer thumb up number;Wherein each answer thumbs up verification of the number for model quality, remaining letter Input of the breath as model, each assessment for answering quality for after.
3. a kind of community's answer platform according to claim 1 or 2 answers sort method, which is characterized in that structure enhancing Type attention mechanism Recognition with Recurrent Neural Network model includes four parts:It input layer, shot and long term memory network layer, attention layer and comments Estimate layer;
Input layer:One is answered, it is believed that the answer is made of multiple sentences, and each sentence is made of multiple words;For right The problem of answering, it is believed that the problem is made of a sentence, which is made of multiple words;For the theme belonging to problem, it is believed that Theme is made of multiple words;Using Word Embedding technologies, by the word occurred in text all with regular length to Amount indicates that then, each word that the content of text of problem, the content of text of answer and theme occur will be replaced by one The vector of K dimensions;Assuming that the sequence vector TQ of the content of text of problem is made of N number of vector, it is denoted as TQ={ x1,x2,...,xN}, xp∈RK, p=1,2 ..., N;Assuming that the sequence vector TA of content of text of an answer is made of M sentence, each sentence by D vector forms, then TA={ s1,s2,...,sM, sm={ ym1,ym2,...,ymD},ymd∈RK, m=1,2..., M, d=1, 2,...,D;Assuming that theme TC is made of C vector, it is denoted as TC={ z1,z2,...,zC},zq∈RK, q=1,2 ..., C;
Shot and long term memory network layer:Sequence vector TA is answered for the sequence vector TQ of problem and one using two shot and long terms to remember Sequence vector in recalling network LSTM_Q and LSTM_A difference modeling problems and answering, and the last one in LSTM_Q is thin Born of the same parents' vector is used for the initialization of cell vector in LSTM_A;Then obtain problem and answer after shot and long term memory network to Each vector contains the semantic information of context in amount sequence, respectively MQ and MA, sequence vector MQ and MA;
Attention layer:The sequence vector MA answered of the sequence vector MQ of problem and one is carried out using the attention mechanism of sentence grade Interaction obtains the vector of one answer of vector sum of problem;Alternatively, using word grade attention mechanism, by theme from sequence vector TC Become a vector FC;Then the sequence vector MA answered of the vectorial FC of theme, the sequence vector MQ of problem and one is carried out Fusion finally obtains the vector of one answer of vector sum of problem;
Assess layer:Answer deep layer language matching score is calculated in conjunction with the vector of one answer of vector sum of problem, in conjunction with answer Timestamp time effect is also included in consider range to obtain sequence score.
4. a kind of community's answer platform according to claim 3 answers sort method, which is characterized in that
For the sequence vector TQ={ x of problem1,x2,...,xN, t=1,2..., N update shot and long term memory network at any time Cell sequence vector c={ c in LSTM_Q1,c2,...,cNAnd hidden sequence vector h={ h1,h2,...,hN, calculation is such as Under:
it=σ (Wxixt+Whiht-1+bi);
ft=σ (Wxfxt+Whfht-1+bf);
ct=ft·ct-1+it·τ(Wxcxt+Whcht-1+bc);
ot=σ (Wxoxt+Whoht-1+bo);
ht=ot·τ(ct);
Wherein, serial number vectorial in the numerical value at moment and the sequence vector TQ of problem corresponds, it,ft,otRespectively input Door forgets door and out gate;Cell vector c0With hidden vector h0It is initialized as null vector;σ (), τ () are respectively sigmoid (), tanh () nonlinear activation function;It is that element multiplies operation;{Wxi,Whi,Wxf,Whf,Wxc,Whc,Wxo,WhoIt is model In parameter matrix to be optimized, { bi,bf,bc,boIt is parameter vector to be optimized in model;
For each sentence sequence vector s in answerm={ ym1,ym2,...,ymD, shot and long term memory network t'=at any time 1,2... D updates the cell sequence vector c'={ c' in LSTM_A1,c'2,...,c'DAnd obtain hidden sequence vector h'm= {h'm1,h'm2,...,h'mD};Enable cell vector c'0=cN, hidden vector h'm0It is initialized as null vector.
5. a kind of community's answer platform according to claim 3 answers sort method, which is characterized in that
The sequence vector MQ of the problem sequence vector MA answered with one are interacted to obtain using the attention mechanism of sentence grade The process of the vector of one answer of vector sum of problem is as follows:
To the sequence vector MQ of problem, the vectorial FQ of K dimensions is denoted as using the operation of average pondization1
Wherein, MQpIndicate the vector of p-th of word in sequence vector MQ;
For the sequence vector MA of answer, grasped first each sentence in the sequence vector MA of answer with one using average pondization The vector of a K dimensions indicates, obtains several semantic expressiveness r'm, m=1,2..., M;Then, them are calculated respectively using distance function From attention score α 'm, m=1,2..., M can be obtained the vector expression FA' of answer using weighted average later:
Wherein, MAmdIndicate that the vector of d-th of word in sequence vector MA in m-th of sentence, f () indicate cosine similarity letter Number;
Using word grade attention mechanism, theme is become into a vector FC from sequence vector TC;Then by the vectorial FC of theme, ask The sequence vector MQ of the topic and sequence vector MA of an answer carry out fusion finally obtain problem the answer of vector sum one to The process of amount is as follows:
To giving problem theme TC={ z1,z2,...,zC, using the operation of average pondization become regular length to Measure FC:
After obtaining vectorial FC, word grade attention mechanism with it come computational problem and answer in each word attention Point;
For the sequence vector MQ of problem, it is made of a series of vector of semantic expressiveness, carrys out computational problem using transition matrix W In each word the distance between the vectorial FC of vector sum theme, later using softmax operations come pth in computational problem The attention score β of a wordp;The vectorial FQ for the problem of finally obtaining2It is expressed as:
Wherein, MQp、MQiThe corresponding pth indicated in sequence vector MQ, i vector, h (a, b)=aTWb is used for calculating different skies Between vectorial distance, (FC, MQ of (a, b) corresponding above formula hereinp)、(FC,MQi);
For the sequence vector MA of answer, the vector for d-th of word in m-th of sentence in answer calculates an attention score βmd, and the vector for obtaining m-th of sentence indicates rm;Then the attention of m-th of sentence in the attention mechanism of word grade is calculated Score αmWith the vectorial FA of answer2
Wherein, MAmd、MAmlThe corresponding vector for indicating d, l words in m-th of sentence in sequence vector MA.
6. a kind of community's answer platform according to claim 3 answers sort method, which is characterized in that
Answer deep layer language matching score is calculated in conjunction with the vector of one answer of vector sum of problemFormula is as follows:
Wherein, σ (), τ () are respectively sigmoid (), tanh () nonlinear activation function;Indicate concatenation; {W1,W2It is parameter matrix to be optimized in model, { b1,b2It is parameter vector to be optimized in model;
In conjunction with the time stamp T of answer, time effect is also included in and considers range to obtain sequence scoreFormula is as follows:
Wherein, T0Indicate the timestamp of first answer, H is a hyper parameter.
7. a kind of community's answer platform according to claim 1,2,4,5 or 6 answers sort method, which is characterized in that knot Close the object function of assessment result and preset time-sensitive and using the pairs of Training strategy of problem dependence to enhanced note It is as follows that meaning power mechanism Recognition with Recurrent Neural Network model is trained process:
For each problem Q, two answer A are extracted from a series of corresponding answers+With A-, wherein A+Thumb up number be more than A-, thus constitute triple (Q, A+, A-);
The object function of time-sensitive is minimized using stochastic gradient descent algorithm:
L=max (0, m+S (Q, A-)-S(Q,A+));
Wherein, S (Q, A+) and S (Q, A-) two answer A in corresponding problem of representation Q+With A-Sequence score.
8. a kind of community's answer platform according to claim 1,2,4,5 or 6 answers sort method, which is characterized in that profit With a new problem X, the corresponding theme B of new problem X, a series of answers text in content A={ A1,A2,…,AGAnd it is each Answer corresponding time stamp T={ T1,T2,…,TG, build a series of example (X, B, Ag,Tg),1≤g≤G;By these examples It sequentially inputs into trained enhanced attention mechanism Recognition with Recurrent Neural Network model, to obtain a series of sequence scoreAccording to the size of sequence score, it is ranked up in a manner of vertical to accordingly answering.
CN201810186972.2A 2018-03-07 2018-03-07 Community question-answering platform answer sorting method Active CN108304587B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810186972.2A CN108304587B (en) 2018-03-07 2018-03-07 Community question-answering platform answer sorting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810186972.2A CN108304587B (en) 2018-03-07 2018-03-07 Community question-answering platform answer sorting method

Publications (2)

Publication Number Publication Date
CN108304587A true CN108304587A (en) 2018-07-20
CN108304587B CN108304587B (en) 2020-10-27

Family

ID=62849405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810186972.2A Active CN108304587B (en) 2018-03-07 2018-03-07 Community question-answering platform answer sorting method

Country Status (1)

Country Link
CN (1) CN108304587B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213847A (en) * 2018-09-14 2019-01-15 广州神马移动信息科技有限公司 Layered approach and its device, electronic equipment, the computer-readable medium of answer
CN109460823A (en) * 2018-09-14 2019-03-12 广州神马移动信息科技有限公司 Construction method and its device, electronic equipment, the computer-readable medium of knowledge base
CN109739958A (en) * 2018-11-22 2019-05-10 普强信息技术(北京)有限公司 A kind of specification handbook answering method and system
CN110085249A (en) * 2019-05-09 2019-08-02 南京工程学院 The single-channel voice Enhancement Method of Recognition with Recurrent Neural Network based on attention gate
CN110597971A (en) * 2019-08-22 2019-12-20 卓尔智联(武汉)研究院有限公司 Automatic question answering device and method based on neural network and readable storage medium
CN112131354A (en) * 2020-11-26 2020-12-25 广州华多网络科技有限公司 Answer screening method and device, terminal equipment and computer readable storage medium
CN113255843A (en) * 2021-07-06 2021-08-13 北京优幕科技有限责任公司 Speech manuscript evaluation method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441660A (en) * 2008-12-16 2009-05-27 腾讯科技(深圳)有限公司 Knowledge evaluating system and method in inquiry and answer community
US20140019447A1 (en) * 2011-12-18 2014-01-16 Yuly Goryavskiy Multi-attribute search system and method for ranking objects according to their attractiveness
CN107590138A (en) * 2017-08-18 2018-01-16 浙江大学 A kind of neural machine translation method based on part of speech notice mechanism

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441660A (en) * 2008-12-16 2009-05-27 腾讯科技(深圳)有限公司 Knowledge evaluating system and method in inquiry and answer community
US20140019447A1 (en) * 2011-12-18 2014-01-16 Yuly Goryavskiy Multi-attribute search system and method for ranking objects according to their attractiveness
CN107590138A (en) * 2017-08-18 2018-01-16 浙江大学 A kind of neural machine translation method based on part of speech notice mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
呼大为等: "即时交互式问答系统的设计与实现", 《小型微型计算机系统》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213847A (en) * 2018-09-14 2019-01-15 广州神马移动信息科技有限公司 Layered approach and its device, electronic equipment, the computer-readable medium of answer
CN109460823A (en) * 2018-09-14 2019-03-12 广州神马移动信息科技有限公司 Construction method and its device, electronic equipment, the computer-readable medium of knowledge base
CN109739958A (en) * 2018-11-22 2019-05-10 普强信息技术(北京)有限公司 A kind of specification handbook answering method and system
CN110085249A (en) * 2019-05-09 2019-08-02 南京工程学院 The single-channel voice Enhancement Method of Recognition with Recurrent Neural Network based on attention gate
CN110597971A (en) * 2019-08-22 2019-12-20 卓尔智联(武汉)研究院有限公司 Automatic question answering device and method based on neural network and readable storage medium
CN112131354A (en) * 2020-11-26 2020-12-25 广州华多网络科技有限公司 Answer screening method and device, terminal equipment and computer readable storage medium
CN112131354B (en) * 2020-11-26 2021-04-16 广州华多网络科技有限公司 Answer screening method and device, terminal equipment and computer readable storage medium
CN113255843A (en) * 2021-07-06 2021-08-13 北京优幕科技有限责任公司 Speech manuscript evaluation method and device
WO2023279631A1 (en) * 2021-07-06 2023-01-12 北京优幕科技有限责任公司 Speech manuscript evaluation method and device

Also Published As

Publication number Publication date
CN108304587B (en) 2020-10-27

Similar Documents

Publication Publication Date Title
CN108304587A (en) A kind of community's answer platform answer sort method
CN109145112B (en) Commodity comment classification method based on global information attention mechanism
CN108021616B (en) Community question-answer expert recommendation method based on recurrent neural network
CN111415740B (en) Method and device for processing inquiry information, storage medium and computer equipment
CN109241255A (en) A kind of intension recognizing method based on deep learning
CN111259127B (en) Long text answer selection method based on transfer learning sentence vector
CN109960800A (en) Weakly supervised file classification method and device based on Active Learning
CN109271506A (en) A kind of construction method of the field of power communication knowledge mapping question answering system based on deep learning
CN108229582A (en) Entity recognition dual training method is named in a kind of multitask towards medical domain
CN104598611B (en) The method and system being ranked up to search entry
CN110148318A (en) A kind of number assiatant system, information interacting method and information processing method
CN109460479A (en) A kind of prediction technique based on reason map, device and system
CN106570708A (en) Management method and management system of intelligent customer service knowledge base
CN108549658A (en) A kind of deep learning video answering method and system based on the upper attention mechanism of syntactic analysis tree
CN107463698A (en) Method and apparatus based on artificial intelligence pushed information
CN107870964A (en) A kind of sentence sort method and system applied to answer emerging system
CN110321563A (en) Text emotion analysis method based on mixing monitor model
CN108491515B (en) Sentence pair matching degree prediction method for campus psychological consultation
CN109635083A (en) It is a kind of for search for TED speech in topic formula inquiry document retrieval method
US20220318317A1 (en) Method for disambiguating between authors with same name on basis of network representation and semantic representation
CN111737427B (en) Method for recommending lesson forum posts by combining forum interaction behaviors and user reading preference
CN107315775A (en) A kind of index calculating platform and method
CN113392209A (en) Text clustering method based on artificial intelligence, related equipment and storage medium
CN109062944A (en) A kind of new word word based on phonetic search consolidates method and electronic equipment
CN110188200A (en) A kind of depth microblog emotional analysis method using social context feature

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