CN110019732A - A kind of intelligent answer method and relevant apparatus - Google Patents

A kind of intelligent answer method and relevant apparatus Download PDF

Info

Publication number
CN110019732A
CN110019732A CN201711453223.3A CN201711453223A CN110019732A CN 110019732 A CN110019732 A CN 110019732A CN 201711453223 A CN201711453223 A CN 201711453223A CN 110019732 A CN110019732 A CN 110019732A
Authority
CN
China
Prior art keywords
generation
target
arbiter
generator
user
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
CN201711453223.3A
Other languages
Chinese (zh)
Other versions
CN110019732B (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.)
Huawei Technologies Co Ltd
Original Assignee
Hangzhou Huawei Digital Technologies Co Ltd
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 Hangzhou Huawei Digital Technologies Co Ltd filed Critical Hangzhou Huawei Digital Technologies Co Ltd
Priority to CN201711453223.3A priority Critical patent/CN110019732B/en
Publication of CN110019732A publication Critical patent/CN110019732A/en
Application granted granted Critical
Publication of CN110019732B publication Critical patent/CN110019732B/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/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

Abstract

The embodiment of the present application discloses a kind of intelligent answer method and relevant apparatus, for promoting the accuracy of intelligent Answer System.The embodiment of the present application method includes: to obtain target user's problem;Target corresponding with target user's problem is generated according to problem Optimized model and generates problem, and described problem Optimized model is based on production confrontation network training and obtains, and described problem Optimized model includes generator and arbiter;Judge whether the generation quality of the target generation problem is higher than the first preset threshold according to the arbiter, the quality that generates is used to indicate the probability that the target generation problem is criterion problem;If so, generating problem according to the target determines target answer.

Description

A kind of intelligent answer method and relevant apparatus
Technical field
This application involves technical field of information recommendation more particularly to a kind of intelligent answer method and relevant apparatus.
Background technique
In the epoch of this rapid development, saving human resources that can be more, exactly a kind of pair of productivity is greatly liberated. In order to more preferably meet the needs of users and save human resources, FAQs that more and more service industries propose user and The problem of its answer is arranged, i.e., arranges FAQs and its answer for specification library form, and it is based on problem base wound Intelligent Answer System is built.Wherein, intelligent Answer System is a kind of novel information searching system for handling natural language, is asked with one One form answered receives the problem of user proposes, the correlation being precisely located in question and answer library involved by the problem later is known Know, and business migration carried out according to business processing flow preset in system, is interacted between the guidance of realization business and user, User is fed back to using relevant knowledge as the answer to the problem, completes intelligent answer.
In the prior art, what is generallyd use is rule-based (template) matching process, and core concept is for each mark Quasi- problem, its different way to put questions of Manual definition (referred to as template or extension is asked).The template form of different company is also not quite similar.When After user inputs a problem, the step of question answering system based on template includes following 4 step: 1, analyzing customer problem; 2, candidate template is retrieved from template library;3, matching degree scoring is carried out to template;If 4, scoring is greater than some threshold value, defeated The corresponding answer of the template out;Otherwise it is assumed that system can not be answered, it is proposed that turn artificial customer service.
However, user is various to the description of problem and wording in actual question answering system, very colloquial style is even It is irregular, including word is lack of standardization as " how to input thought card code falsity ", word order are reverse as " how there are no to fastly Pass " etc., since the problem of capable of effectively answering in question answering system set is limited only to problem corresponding to template library, for example, if The problem of user, does not match any one template, then can not provide answer.Therefore these statements lack of standardization are to existing question and answer The analysis of the problem of system brings very big difficulty, so that the problem of question answering system based on matching and retrieval is difficult to understand for user, And then accurate answer is found out, reduce the accuracy of question answering system.
Summary of the invention
The embodiment of the present application provides a kind of intelligent answer method and relevant apparatus, for promoting intelligent Answer System Accuracy.
The first aspect of the embodiment of the present application provides a kind of intelligent answer method, comprising: target user's problem is obtained, and Target user's problem is inputted into problem Optimized model, generates problem to generate target corresponding with target user's problem, In the problem Optimized model be based on production confrontation network training and obtain, and problem Optimized model includes generator and arbiter. After obtaining target generation problem, the generation quality for judging target generation problem further according to the arbiter in problem Optimized model is It is no to be higher than the first preset threshold, the probability that problem is criterion problem is generated wherein generating quality and being used to indicate the target, if target When the generation quality of generation problem is higher than the first preset threshold, then problem is generated according to target and determine target answer.The application is real The problem of applying in example, user is inputted is optimized by problem Optimized model, generates problem to obtain the target of statement specification, The more acurrate demand for clearly expressing user of user is helped, the matching degree with typical problem is improved, can more accurately find out mesh Answer is marked, the accuracy of intelligent Answer System is improved.
In a kind of possible design, in the first implementation of the embodiment of the present application first aspect, the acquisition Before target user's problem, the method also includes: training set is obtained, includes that source user problem-source specification is asked in the training set Topic pair, it should be noted that the source user problem-source criterion problem to for indicate source user problem and with the source user The set of the corresponding source criterion problem of problem.In this implementation, illustrate training problem Optimized model need preparation it One: training set is obtained, so that the process of the embodiment of the present application is more perfect.
In a kind of possible design, in second of implementation of the embodiment of the present application first aspect, the acquisition Training set includes: the similarity value for calculating each source user problem in the typical problem and user journal that normal data is concentrated, institute Standard data set is stated for storing the typical problem, the user journal includes the intersection record of user and question answering system.? After obtaining similarity value, the source user problem of the second preset threshold will be greater than with the similarity value of the typical problem as candidate Customer problem, in the determination candidate user problem with the problem of the typical problem semantic congruence and then obtain the source and use Family problem-source criterion problem pair, the typical problem are contained in the source criterion problem.In this implementation, illustrate to obtain A kind of concrete ways of training set, construct training set by standard database and user journal, avoid and manually write process, Training set constructions cost is reduced, is conducive to expand training set scale.
In a kind of possible design, in the third implementation of the embodiment of the present application first aspect, the acquisition After training set, before acquisition target user's problem, the method also includes: by the source user problem in the training set It is input to the generator, so that the generator carries out model training, and generation problem is obtained according to the model after training; The obtained generation problem of the generator is obtained, and the generation problem is stored in and is generated in data set, the generation number According to collection for storing the generation problem.In this implementation, the concrete mode for training generator is illustrated, so that the application is real Applying example more has operability.
In a kind of possible design, in the 4th kind of implementation of the embodiment of the present application first aspect, the acquisition After training set, before acquisition target user's problem, the method also includes: by the source criterion problem in the training set It is input to the arbiter with the generation problem in the generation data set, so that the arbiter is in the training set Source criterion problem carries out model training as negative example sample as positive example sample, using the generation problem in the generation data set; Generator generation problem generated is input to the arbiter so that the arbiter to the generation problem into Row rate of imputation differentiates, wherein the rate of imputation is used to indicate problem and belongs to the standard data set or the generation data set Probability;The arbiter is obtained to the differentiation result of the generation problem;The differentiation result is input to the generator, So that generation problem and the differentiation result that the generator is differentiated according to the arbiter carry out model training, and New generation problem is generated according to the model after training;The generator new generation problem generated is obtained, and will be described New generation problem is stored in the generation data set.In this implementation, the arbiter in problem Optimized model is provided The mode that dual training how is carried out with generator, so that the step of the embodiment of the present application is more perfect.
In a kind of possible design, in the 5th kind of implementation of the embodiment of the present application first aspect, the method Further include: when the arbiter differentiates that the obtained variable quantity for differentiating result of the problem of generator generates is pre- less than third If when threshold value, then stopping inputting the problem of generator generates to the arbiter, and stop inputting institute to the generator The differentiation of arbiter is stated as a result, to terminate the training to described problem Optimized model.In this implementation, ended questions are provided One of the condition that Optimized model need to meet: variable quantity convergence, so that the embodiment of the present application more has feasibility.
In a kind of possible design, in the 6th kind of implementation of the embodiment of the present application first aspect, the method Further include: when the number of iterations reaches four preset thresholds, then stop inputting asking for the generator generation to the arbiter Topic, and stop inputting the differentiation of the arbiter to the generator as a result, to terminate the training to described problem Optimized model, The generator generates a problem and the determining device judges that the problem of primary generator generates indicates an iteration. In this implementation, additionally provide one of the condition that ended questions Optimized model need to meet: the number of iterations meets preset maximum The number of iterations, so that the embodiment of the present application more has feasibility.
In a kind of possible design, in the 7th kind of implementation of the embodiment of the present application first aspect, the basis The target generates problem and determines that target answer includes: to generate problem according to the target to concentrate matching target mark in normal data The similarity value that quasi- problem, the target criteria problem and the target generate problem is greater than the 5th preset threshold;Described in determination It is the target answer that target criteria problem, which concentrates corresponding answer in the normal data, and the standard data set is for storing The typical problem.In this implementation, provides and the concrete operations that problem determines target answer are generated according to target, be included in Normal data concentration finds target criteria problem similar with target generation problem, and the corresponding answer of target criteria problem is made For target answer, the rewriting of target user's problem to criterion problem is realized, substantially reduces artificial cost, promotes extensive use The effect of family problem optimization.
In a kind of possible design, in the 8th kind of implementation of the embodiment of the present application first aspect, the basis After the arbiter judges whether the confidence level of the target generation problem is higher than the first preset threshold, the method also includes: If the arbiter judges that the target generates the confidence level of problem not higher than the first preset threshold, the target user is exported Problem.In this implementation, also illustrate when trained generator generate the problem of quality it is lower when, then export user input The problem of, to avoid after rewriting export the problem of it is unreasonable.
The second aspect of the embodiment of the present application provides a kind of intelligent answer device, comprising: acquiring unit, for obtaining mesh Mark customer problem;Generation unit is generated for generating target corresponding with target user's problem according to problem Optimized model Problem, described problem Optimized model be based on production confrontation network training obtain, described problem Optimized model include generator and Arbiter;Judging unit, for judging whether the generation quality of the target generation problem is higher than first according to the arbiter Preset threshold, the quality that generates are used to indicate the probability that the target generation problem is criterion problem;Determination unit, if described Judging unit determines that the target generates the generation quality of problem higher than first preset threshold, then is generated according to the target Problem determines target answer.In the embodiment of the present application, the problem of user is inputted, is optimized by problem Optimized model, with Target to statement specification generates problem, helps the more acurrate demand for clearly expressing user of user, improves and typical problem Matching degree, can more accurately find out target answer, improve the accuracy of intelligent Answer System.
In a kind of possible design, in the first implementation of the embodiment of the present application second aspect, the acquisition Unit is also used to: obtaining training set, the training set includes source user problem-source criterion problem pair, the source user problem-source Criterion problem is to for indicating the set of source user problem and source criterion problem corresponding with the source user problem.This realization side In formula, illustrates one of the preparation that training problem Optimized model needs: training set is obtained, so that the process of the embodiment of the present application It is more perfect.
In a kind of possible design, in second of implementation of the embodiment of the present application second aspect, the acquisition Unit includes: computing module, each source user problem in typical problem and user journal for calculating normal data concentration Similarity value, for the standard data set for storing the typical problem, the user journal includes user and question answering system Intersection record;First determining module, for the source user of the second preset threshold will to be greater than with the similarity value of the typical problem Problem as candidate user problem, in the determination candidate user problem with the problem of the typical problem semantic congruence in turn Source user problem-source the criterion problem pair is obtained, the typical problem is contained in the source criterion problem.This implementation In, it illustrates a kind of concrete ways for obtaining training set, training set is constructed by standard database and user journal, is avoided Process manually is write, reduces training set constructions cost, is conducive to expand training set scale.
In a kind of possible design, in the third implementation of the embodiment of the present application second aspect, the intelligence Question and answer system further include: input unit, for the source user problem in the training set to be input to the generator, so that The generator carries out model training, and obtains generation problem according to the model after training;Storage unit, for obtaining the life It grows up to be a useful person obtained generation problem, and the generation problem is stored in and is generated in data set, the generations data set is used to deposit Store up the generation problem.In this implementation, the concrete mode for training generator is illustrated, so that the embodiment of the present application more has There is operability.
In a kind of possible design, in the 4th kind of implementation of the embodiment of the present application second aspect, the intelligence Question and answer system further include: the input unit is also used to the source criterion problem and the generation data set in the training set In generation problem be input to the arbiter so that the arbiter is using the source criterion problem in the training set as just Example sample carries out model training as negative example sample using the generation problem in the generation data set;The generator is given birth to At generation problem be input to the arbiter so that the arbiter to the generation problem carry out rate of imputation differentiation, In, the rate of imputation is used to indicate problem and belongs to the standard data set or the probability for generating data set;The acquisition Unit is also used to obtain the arbiter to the differentiation result of the generation problem;The input unit is also used to sentence described Other result is input to the generator, so that generation problem that the generator is differentiated according to the arbiter and described Differentiate that result carries out model training, and generates new generation problem according to the model after training;The acquiring unit is also used to obtain The generator new generation problem generated is taken, and the new generation problem is stored in the generation data set. In this implementation, the mode how arbiter and generator in problem Optimized model carry out dual training is provided, so that The step of the embodiment of the present application, is more perfect.
In a kind of possible design, in the 5th kind of implementation of the embodiment of the present application second aspect, the intelligence Question and answer system further include: unit is terminated, for differentiating the obtained differentiation of the problem of generator generates when the arbiter As a result when variable quantity is less than third predetermined threshold value, then stop inputting the problem of generator generates to the arbiter, and Stop the differentiation that the arbiter is inputted to the generator as a result, to terminate the training to described problem Optimized model.This reality In existing mode, one of the condition that ended questions Optimized model need to meet: variable quantity convergence is provided, so that the embodiment of the present application is more Add with feasibility.
In a kind of possible design, in the 6th kind of implementation of the embodiment of the present application second aspect, the intelligence Question and answer system further include: the termination unit is also used to when the number of iterations reaches four preset thresholds, then stops sentencing to described Other device inputs the problem of generator generates, and stops the differentiation that the arbiter is inputted to the generator as a result, with knot Training of the beam to described problem Optimized model, the generator generates a problem and the determining device judges the primary life The problem of generating of growing up to be a useful person indicates an iteration.In this implementation, the condition that ended questions Optimized model need to meet is additionally provided One of: the number of iterations meets preset maximum number of iterations, so that the embodiment of the present application more has feasibility.
In a kind of possible design, in the 7th kind of implementation of the embodiment of the present application second aspect, the determination Unit includes: matching module, concentrates matching target criteria problem in normal data for generating problem according to the target, described The similarity value that target criteria problem and the target generate problem is greater than the 5th preset threshold;Second determining module, for true It is the target answer that the fixed target criteria problem, which concentrates corresponding answer in the normal data, and the standard data set is used In the storage typical problem.In this implementation, provides and the concrete operations that problem determines target answer is generated according to target, It is included in normal data concentration and finds target criteria problem similar with target generation problem, and target criteria problem is corresponding Answer realizes the rewriting of target user's problem to criterion problem as target answer, substantially reduces artificial cost, is promoted big The effect of scale customer problem optimization.
In a kind of possible design, in the 8th kind of implementation of the embodiment of the present application second aspect, the intelligence Question and answer system further include: output unit, if determining that the confidence level of the target generation problem is not higher than for the judgement unit First preset threshold then exports target user's problem.In this implementation, also illustrate when trained generator generates The problem of quality it is lower when, then export user input the problem of, to avoid after rewriting export the problem of it is unreasonable.
The third aspect of the application provides a kind of computer readable storage medium, in the computer readable storage medium It is stored with instruction, when run on a computer, so that computer executes method described in above-mentioned various aspects.
The fourth aspect of the application provides a kind of computer program product comprising instruction, when it runs on computers When, so that computer executes method described in above-mentioned various aspects.
As can be seen from the above technical solutions, the embodiment of the present application, which has the advantage that, obtains target user's problem;According to Problem Optimized model generates target corresponding with target user's problem and generates problem, and described problem Optimized model is based on generating Formula confrontation network training obtains, and described problem Optimized model includes generator and arbiter;According to arbiter judgement Whether the generation quality that target generates problem is higher than the first preset threshold, and the generation quality is used to indicate the target generation and asks The probability of entitled criterion problem;If so, generating problem according to the target determines target answer.It, will in the embodiment of the present application The problem of user inputs is optimized by problem Optimized model, is generated problem to obtain the target of statement specification, is helped user The more acurrate demand for clearly expressing user, improves the matching degree with typical problem, can more accurately find out target answer, mention The accuracy of intelligent Answer System is risen.
Detailed description of the invention
Figure 1A is system architecture schematic diagram applied by a kind of possible intelligent answer method provided by the embodiments of the present application;
Figure 1B is a kind of possible intelligent customer service component structure figure provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of possible intelligent answer method provided by the embodiments of the present application;
Fig. 3 is the possible trained flow chart of one kind provided by the embodiments of the present application;
Fig. 4 is a kind of possible display interface figure provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of possible intelligent answer device provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of another possible intelligent answer device provided by the embodiments of the present application;
Fig. 7 is a kind of schematic block diagram of possible intelligent answer device provided by the embodiments of the present application;
Fig. 8 is the structural schematic diagram of alternatively possible intelligent answer device provided by the embodiments of the present application.
Specific embodiment
The embodiment of the present application provides a kind of intelligent answer method and relevant apparatus, for improving intelligent Answer System Accuracy.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those skilled in the art's every other implementation obtained without making creative work Example, shall fall in the protection scope of this application.
Intelligent Answer System application artificial intelligence technology, allow computer automatic respondent the problem of, at this stage, can adopt With positioning the relevant answer of customer problem or paragraph based on the method for template matching.In this method, service provider Need to safeguard a FAQ knowledge base, some templates (being normally based on keyword) defined for some common problems, when with When family problem matches some template, the corresponding answer of the template is returned.Varied, the mould generally, due to the way to put questions of user Plate be also required to define accordingly it is a variety of, for example, template may include keyword template or question sentence template, wherein keyword template Including keyword and logical operator, question sentence template includes complete question sentence, as shown in table 1, to be with " mobile phone begins to sell the time " Example, the different templates that may be defined.
Table 1
In recent years, in artificial intelligence field, depth learning technology achieves the development advanced by leaps and bounds, compared to previous machine Device learning algorithm, deep learning algorithm have two significant advantages: 1, deep learning model can be portrayed preferably inside data Deep layer labyrinth;Secondly, deep learning algorithm widely applies feature learning method, can learn all from mass data automatically Feature avoids time-consuming and laborious manual features construction process.Therefore, intelligent answer intelligence is promoted using depth learning technology Energyization is horizontal to become a hot spot direction.
In the prior art, application of the deep learning algorithm in intelligent Answer System is concentrated mainly on answer matches and generates On.In general, the potential hypothesis of these methods one is format specification the problem of being exactly user.However, in actual question answering system In (especially Internet user), user is various to the description of problem and wording, even very irregular. Although, due to long-tail phenomenon, total amount is very more it is understood that the frequency that these problems occur for single is very low. Due to lack of training samples, the matching and generation of answer are directly done using these nonstandard problems, is difficult to obtain accurate effect Fruit seriously constrains intelligent Answer System accuracy and the promotion of user experience.
And in the sufficient situation of training sample, the deep neural network based on deep learning algorithm can capture nature The various change of language improves the accuracy rate of question and answer to better understand the problem of user proposes.In view of this, the application Embodiment application deep neural network proposes a set of by Problem for the lack of standardization and diverse problems of customer problem Automatically it is rewritten into the solution of the criterion problem of semantic congruence, to reduce the difficulty of intelligent Answer System problem analysis, is promoted The question and answer accuracy rate of intelligent Answer System.It should be noted that criterion problem is the problem of wording and statement meet specification, at this There is no the specified wording and statement specifications of display in application, but the typical problem concentrated by existing normal data is come body It is existing, it can it is closer with typical problem in terms of wording and statement to be interpreted as a problem, then it is assumed that the problem more standardizes.
It is one of system architecture applied by a kind of intelligent answer method provided by the embodiments of the present application referring to Fig.1 shown in A A schematic diagram can specifically include with lower module: case study module, problem Optimized model, training set constructing module, question and answer With module and log collection and statistical module.Wherein:
Case study module: key message is extracted from the problem of string representation, including segments, name Entity recognition Deng.
Problem optimization module: based on confrontation network is generated, Lai Xunlian criterion problem generates model, and it is defeated which receives user Enter problem, exports corresponding On The Standardization.One confrontation network has a generator (generator), from stochastic inputs Middle certain class data of generation;An arbiter (discriminator) is also had, it is obtained from generator or one group of truthful data Input is taken, arbiter can distinguish different inputs, that is, differentiate that it comes self-generator or truthful data.Two neural networks are handed over For training optimization, so that generator can generate the input for being more in line with truthful data distribution, and arbiter more accurate can then be sentenced Break its input source.
Training set constructing module: source user problem-source criterion problem pair is excavated from standard question and answer library and user journal, is Model learning provides training set.
Question and answer matching module: be responsible for by source user problem after problem optimization module generation problem and standard generated Typical problem in data set is matched, firstly, can be indexed to standard data set to promote matching efficiency.Later, According to the keyword in the generation problem of generation, candidate problem is retrieved from normal data concentration, candidate is asked by score function Topic and the criterion problem generated carry out the scoring of similarity.
Log collection and statistical module: can be with for recording the intersection record of user and question answering system, in the intersection record It is counted including hot issue, unsolved problem statistics etc..In practical application, business personnel can be remembered with the unsolved problem in log Record is foundation, to constantly update standard data set.
It should be noted that intelligent answer method described herein can be realized by server, it can also be by end To realize, terminal can be the smart machines such as PC, tablet computer, smart phone at end.The function of above-mentioned modules is real It now can individually be completed by server, can also individually be completed, can also be realized jointly by server and terminal, by taking by terminal Business device realizes the function of a part of module, the function of another part module is realized by terminal, specifically without limitation.In the following, with logical Server is crossed to realize that the intelligent answer method is described.
In addition, intelligent answer method provided by the present application may include off-line training and online service two parts, wherein from For the training set training problem Optimized model according to acquisition, online service is used to optimize mould according to trained problem for line training Type provides online service, please refers to Figure 1B, is a kind of possible intelligent customer service component structure provided by the embodiments of the present application Figure, introduces trained problem Optimized model in existing intelligent customer service system, including the front end web/app, takes using Rest Module, problem optimization module and problem retrieval module, their function of being engaged in are as follows:
The front end web/app: the input and result for being responsible for target user's problem are shown;
Using Rest service module: each external service module, including problem completion, question recommending and answer generate etc. with Rest mode is disposed on the server.After service starting, corresponding model is loaded.The front end web/app can pass through Javascript is called, and result is returned to formatted presentation to user.
Problem optimization module: training set can be obtained according to user journal and standard data set, and is carried out based on the training set Model training obtains problem Optimized model, and the implementation steps of problem optimization module are specifically such as the step 201 in the embodiment of the present application Described in 202, details are not described herein again.
Problem retrieval module: including matching primitives and full-text search.It is responsible for during problem completion, executes prefix inspection Rope;Problem is inputted for complete user, then is rewritten by problem optimization module, then full text is carried out to the problem after optimization Search, the result retrieved carry out matching primitives further according to needs are applied.
It is a kind of possible intelligent answer method provided by the embodiments of the present application referring specifically to embodiment shown in Fig. 2 Flow diagram, exemplary description is carried out to off-line training and online service, wherein step 201~202 are off-line training Process, step 203~207 are online service process, are specifically included:
201, training set is obtained;
In general, deep neural network is used in the task of supervised learning, that is, there is a large amount of labeled data to be used to carry out mould The training of type.Therefore, before the model training for problem Optimized model, training data need to be obtained, in the application, for convenient for reason Solution defines the set that training set is training data, including source user problem and source corresponding with source user problem specification are asked Topic set.For each customer problem, manually goes to write and be difficult to carry out compared with the corresponding typical problem of the customer problem, one Aspect, cost are larger;On the other hand, it is difficult to the literary style standard of a specified specification.In the application, existing standard can use Data set and user journal construct training set, and it includes typical problem that wherein normal data, which is concentrated, it is to be understood that the criterion numeral Model answer corresponding with each typical problem is also stored according to concentrating;User journal includes the intersection record of user and question answering system, Including hot issue statistics, unsolved problem statistics etc., therefore can be used an open question in user journal as source Family problem, the typical problem that normal data is concentrated are used as source criterion problem, the specific trained mode set of construction the following steps are included:
The similarity value for each source user problem in typical problem and user journal that step 1, calculating normal data are concentrated;
Calculating for similarity value between typical problem and source user problem, can be using based on vector space model The TF-IDF (term frequency inverted document frequency) of (voctor space model, VSM) Algorithm, the algorithm are accomplished by
(1) go out all word w1, w2, w3 ... wn occurred in corpus according to word frequency statistics;
It (2) is a n-dimensional vector: T=< T each problem representation1, T2..., Ti..., Tn>;
Wherein, Ti=n*log (M/m), 1≤i≤n, n are the number i.e. TF value that word wi occurs in the problem, and m is language Expect the problem of include word wi quantity in library, M is the problems in corpus total quantity, log (M/m) i.e. IDF value.The above TiIt is comprehensive It closes expression formula and reflects resolution capability of the frequency of occurrences of a keyword with this keyword to different sentences, it may be assumed that a word The number that language occurs in some sentence is more, then it is more important to the sentence.
(3) n-dimensional vector for setting any two problem is respectively T ' and T ", then its similarity can use two sentence vectors Cosine angle calcu-lation is as follows:
It is understood that corpus includes in the typical problem and user journal of normal data concentration in the application Source user problem, therefore each source that can be calculated by above-mentioned algorithm in the typical problem and user journal of normal data concentration is used The similarity value of family problem.
It should be noted that in practical application, there are many ways to calculating the similarity value between two problems, such as also Method, dependency tree method or the editing distance method that can be combined using semantic dictionary method, part of speech word order, specific the application are not done It limits.
Step 2 will be greater than the source user problem of the second preset threshold with the similarity value of typical problem as candidate user Problem;
It, will be big with the similarity value of typical problem after the similarity value of typical problem and each source user problem is calculated In the second preset threshold source user problem as candidate user problem, it is to be understood that the number of the candidate user problem It can be 0,1 or multiple.
It should be noted that in practical application, there are many modes that determine candidate user problem, for example, it is also possible to by source Customer problem is ranked up according to the sequence of the similarity value with typical problem from big to small, selects preceding preset number in the sequence A source user problem determines specific the application of mode of candidate user problem without limitation as candidate user problem.
Optionally, in order to guarantee the semantic consistency of candidate user problem and typical problem, in practical application, people can be passed through Work audit removes in candidate user problem semantic inconsistent problem, for example, typical problem is " when sending out express delivery? ", Determining candidate user problem includes " express delivery when hair? ", " what time express delivery being issued? " " what express delivery of hair? ", therefore By audit by inconsistent problem " what express delivery of hair? " semantic in candidate user problem removal.
It is multiple due to may include in candidate user problem after determining the corresponding candidate user problem of Standard User problem Problem, such as typical problem A, corresponding candidate user problem include { customer problem A, customer problem B, customer problem C }, then Obtained source user problem-source criterion problem is to including customer problem A- typical problem A, customer problem B- typical problem A and use Family problem C- typical problem A.
It is understood that different Standard User problems can correspond to identical source user problem, for example, it is assumed that " when Mate10 sells? " " what the shelf life of Mate10 is? " it is typical problem, source user problem is " assorted When can open and rob Mate10? ", then the source user problem and two typical problems are corresponding.
It should be noted that except through the mode of above-mentioned automatic building training set, the acquisition of training set in practical application Mode also there are many, such as by human-edited's source user problem-source criterion problem equity, specifically herein without limitation.
202, according to training set training problem Optimized model;
After obtaining training set, problem Optimized model is trained based on the training set, wherein problem Optimized model includes Generator and arbiter.In the application, using the thought of antagonistic training, to replace training generator and arbiter, and with most Customer problem is rewritten as criterion problem by the generator obtained eventually.Specifically, generator is a generative probabilistic model, target Consistent sample the problem of (i.e. natural language) is distributed with training data (the source criterion problem i.e. in training set) to generate.Differentiate Device is then a classifier, target be accurately differentiate a sample (i.e. a natural language problem) be from training data, Still carry out self-generator.So, generator and arbiter form " confrontation ", and generator is continued to optimize so that arbiter can not The difference for generating sample and training data sample is distinguished, and arbiter is continued to optimize and makes it possible to differentiate this difference.It generates Device and arbiter are alternately trained, and are finally reached balance: generator can generate the sample for complying fully with training data distribution (down to sentencing Other device can not be differentiated), and any sample for not meeting training data distribution of resolution that arbiter then can be sensitive.
Referring to Fig. 3, being the possible trained process of one kind provided by the embodiments of the present application, generator is responsible for according to source user Problem generates the generation problem of same as typical problem vocabulary and Description Style.The recurrence mind an of modified version can be used Generator through network (recurrent neural network, RNN) as natural language problem, input is by training set In source user problem participle after obtain word sequence, for example, it is assumed that source user problem be " mobile phone screen is broken, can guarantee to keep in good repair ? " the problem is segmented, obtain " mobile phone/screen/broken/,/can with/guarantee//? ", then by each word in the problem Or punctuate is replaced with vector, i.e., by a word embeding layer embedding, word is mapped to term vector, wherein institute's predicate to Each of natural language word, i.e., is mapped to the vector of a regular length by amount, and all these vectors are put together shape At a term vector space, and each vector is then a point in the space, introduces " distance " on this space, then may be used To judge (morphology, semantically) similitude between them according to the distance between word.
Again with two-way shot and long term memory network (Bi-directional long short-term memory, Bi-LSTM) To model the sequence dependence between word.Term vector after Bi-LSTM output conversion, as attention layers of one-hot Input.Nothing is repeatedly selected one or more words to attention layers of one-hot from the output of Bi-LSTM every time, in conjunction with Historic state information, Lai Gengxin current state vector.Finally according to current state, the word of output is calculated.
Arbiter is responsible for differentiating the difference between generator generation problem generated and source criterion problem, in the application, The quality of generation problem can be judged in terms of following three: (1) the literal upper difference between the criterion problem of source;(2) raw Problematic and difference of the source criterion problem on term vector space, both principal measures are in difference semantically;(3) problem is generated The entity difference for including with source criterion problem guarantees that generation problem is as consistent as possible with the entity of source criterion problem.Arbiter will Differentiate that result by gradient profile, feeds back to generator, so that generator after receiving gradient, updates network parameter values, from And improve the quality of next generation problem.
It should be noted that can also be obtained using LSTM or other networks substitution Bi-LSTM network in practical application Generator, specific the application is without limitation.It will illustrate by taking LSRM as an example below:
Specifically, recurrent neural network receive an elongated list entries (for example, the sentence of a natural language, can To regard the sequence of word as), successively calculate each hidden state variable (hidden state): i-th of state variable is by working as The state variable of preceding input word and previous step calculates: hi=fh(xi, hi-1), wherein fhIt is a multilayer neural network.It is a kind of The mode simply realized is fh(xi, hi-1)=φh(Uxi+Whi-1), wherein φhIt is a sigmoid function, such as:In practice, more complicated LSTM (Long Short-Term Memory) or GRU can be used (Gated Recurrent Unit) comes to fhIt is modeled.Meanwhile after each state variable determines, recurrent neural network energy It is enough constantly to generate word, and finally constitute a sequence (sentence of i.e. one natural language).The probability that i-th of word generates are as follows: p (yi|y1..., yi-1)=gh(hi, yi-1)=φg(Eyi-1+Wohi), the probability that whole word generates are as follows:As a result, when to recurrent neural network one A random initial input vector can be generated and be obtained in short, and parameter therein, determine the natural language that can be generated Distribution.
Optionally, setting arbiter model and Maker model carry out antagonistic training, do to strengthen generator and generate The ability of problem is disturbed, while strengthening the ability of the probability of arbiter discrimination, training arbiter is specifically as follows:
L generation problem in K source criterion problem and generation data set in training set is input to arbiter, so that Arbiter is obtained using K source criterion problem in training set as positive example sample, with L generation problem in the generation data set Model training is carried out as negative example sample;Generator generation problem generated is input to the arbiter, so that The arbiter carries out rate of imputation differentiation to the generation problem, wherein the rate of imputation is used to indicate problem and belongs to the mark Quasi- data set or the probability for generating data set.Wherein, K and L is the positive integer more than or equal to 1, and K and the specific of L take Value may be the same or different.
In the embodiment of the present application, convolutional neural networks (Convolutional Neural Network, CNN) can be used Arbiter as natural language problem.
Specifically, for the sequence of input, using convolution (convolution)+pond (pooling) calculation. A kind of calculation of convolution are as follows:
WhereinThe value of j-th of feature of i-th of position, k indicate the length of sliding window after expression convolution.The one of pond Kind calculation is maximizing (max-pooling):The mode in this convolution sum pond can With repeated multiple times progress.Finally, by z=[z1, z2..., zl] softmax is taken, obtain discriminant function: DCNN(q)=φ (Wqz+bq).Here DCNN(q) probability whether a problem comes from standard data set (whether being criterion problem) is given.
In Maker model and the training process of arbiter model, antagonistic training can be carried out by the two, thus Increase the ability of two models.Therefore, it in the embodiment of the present application, can also comprise the following steps:
Arbiter is obtained to the differentiation of the problem of generation as a result, will differentiate that result is input to generator, so that generator root The generation problem and differentiation result differentiated according to arbiter carries out model training, and new life is generated according to the model after training It is problematic;Generator new generation problem generated is obtained again, and new generation problem is stored in and is generated in data set.It will L random generation problem is input to arbiter in K source criterion problem and generation data set in training set, so that differentiating Device using K source criterion problem in training set as positive example sample, using it is described generation data set in L generation problem as bear Example sample carries out model training;Wherein, L generation problem set includes new generation problem.
Arbiter carries out model training to the generator according to the positive example sample and the negative example sample, passes through training The rate of imputation of the model of arbiter afterwards each generation problem generated to generator differentiates, and will differentiate that result is sent To the generator, so that new generation problem and differentiation result that the generator is differentiated according to the arbiter Carry out model training.The antagonistic training recycled according to this, to improve the ability that generator generates interference problem, raising is sentenced Other device differentiates the ability of generation problem rate of imputation.
Referring to above-mentioned citing, specifically, the training method of arbiter are as follows:
Step 1, m source criterion problem of stochastical sampling from training setAs positive example sample;
Step 2, from generator1 problem of middle selectionAs negative example sample;
Step 3, for arbiter DCNN(q;θD), θDFor the parameter in function.Optimization object function:
Specifically, solving θ using gradient descent algorithmD:
Specifically, the training method of generator can be with are as follows:
Step 1 generates n random vectorWherein p (z)=N (0, σ2It I) is normal distribution;
Step 2, according to generatorGenerate n problem:
Step 3, for n problem, obtain its with arbiter and differentiate result:
Step 4, for generatorOptimization object function:
Specifically, defining Reward Program:Objective function is i.e.:
θ is solved using gradient descent algorithmG:
It is obtained according to REINFORCE algorithm:
For recurrent neural network (RNN), can be calculated:
Optionally, the rate of imputation of problem is carried out according to acquired all positive example samples and negative example sample when the arbiter The differentiation obtained variable quantity for differentiating result when being less than third predetermined threshold value, then stop inputting to arbiter from the training The problem of choosing in collection and the generation data set is gathered, and stops inputting the differentiation of arbiter to generator as a result, with knot Training of the beam to problem Optimized model.
That is, arbiter and generator can be alternately trained, until reaching balance in antagonistic training.When the ability of generator With the ability training of arbiter to a certain extent after, arbiter differentiates that the rate of imputation of generator problem generated will tend to steady It is fixed.For example, by taking fixed sample as an example, when arbiter is using fixed positive example sample and fixed negative example sample as discrimination When foundation, if the ownership standard data set of the generator generation problem generated differentiated in preset number (such as 20 times) Probability float 0.39~0.41, then it represents that the discriminating power of arbiter tends to stablize, at this point, can then be generated with deconditioning The model of device and arbiter.
Optionally, can also determine whether to stop instruction as Rule of judgment by the number of iterations of generator and arbiter Practice, wherein generator generates a problem and judges that it judges that a problem of generator generates indicates an iteration.For example, 1000 iteration indexes are set, if after generator generated 1000 times, it can be with deconditioning, if arbiter judged 1000 times It afterwards, then can be with deconditioning.
After terminating to the training of problem Optimized model, by trained problem Optimized model export, model clothes are passed to It is engaged on device, service is externally provided with RESTful Web service, or directly as local file, so that online service program adds It carries and calls.
203, it obtains target user's problem and judges whether target user's problem is complete;If it is not, thening follow the steps 204;If It is to then follow the steps 205;
After training great question Optimized model, then carry out online service.Target user's problem is first got, is specifically included: During online service, pass through target user's problem of web/app front end receiver user input, it should be noted that user The problem of input, can be textual form, be also possible to speech form.When target user's problem of user's input is textual form When, while receiving target user's problem of user's input, problem completion interface is called, i.e., when target user's problem does not input When complete, step 204 is executed;After the input of target user's problem is complete, step 205 is executed.
When user input be phonetic problem when, can first to the voice carry out speech recognition, obtain corresponding text information, And shown in input frame, process later will be similar for the process of textual form the problem of input with user, specifically herein not It repeats again.
204, prefix search is carried out;
During user inputs target user's problem, problem completion interface is called to carry out prefix search, is waited to show Problem is selected, to help user to rapidly input problem, for ease of understanding, as shown in figure 4, can for one kind provided by the embodiments of the present application The display interface of energy, user input " express delivery " in input frame, then show that candidate question set closes above input frame and " what is sent out fastly Pass " " you may I ask hair well be what express delivery " " what express delivery sent out ", in addition, candidate question set conjunction is contained in standard data set, After user is received to the clicking operation of any problem in candidate question set conjunction, then the problem of being clicked is returned in standard data set In corresponding model answer.
It is understood that the step is optional step, i.e. the process in input target user's problem in practical application In, carry out completion problem without prefix search, after the completion of the input of target user's problem, if not being matched to normal data concentration Problem thens follow the steps 205.
205, target is generated based on problem Optimized model and generates problem;
After obtaining complete target user's problem, using target user's problem as trained problem Optimized model In generator input, with generate target generate problem.
206, problem is generated according to target and determines target answer;
After generator generates target generation problem, arbiter can generate the generation quality of problem with score function to the target It scores, it is to be understood that it can set that arbiter is higher to the scoring of problem, then the generation quality of the problem is higher, That is the standardized degree of the problem and typical problem is closer.When arbiter is scored above the first default threshold to target generation problem When value, then exports the target and generate problem, and problem is generated according to the target and determines target answer.Wherein, in practical application, really There are many modes of answer that sets the goal, for example, 1, target generates problem → target criteria problem → target answer: can be by mesh Mark generation problem is matched with the typical problem that normal data is concentrated, i.e., calculating target generates problem and normal data concentration is each The similarity value of typical problem, and using generated with target problem similarity value be higher than the 5th preset threshold typical problem as Target criteria problem, it is to be understood that the number of target criteria problem can be for 0,1 or multiple, when target criteria is asked When the number of topic is 0, target user's problem obtained can be exported, then problem is carried out by artificial customer service and is replied to obtain target Answer;When the number of target criteria problem is 1, answer corresponding to the target criteria problem is determined as target answer;When It, will be corresponding to the highest target criteria problem of the similarity value that problem generated with target when the number of target criteria problem is multiple Answer be determined as target answer, or select any one target criteria problem at random, corresponding to answer be target answer, Specifically herein without limitation;2, target generates problem → target answer: target generation problem is converted into query statement such as structure Change query language (structured query language, SQL), then determines that the query statement is corresponding in the database and answer Case is target answer, such as target generates problem is " Huawei MATE9 mobile phone price is how many ", and is stored in the database each The price of kind mobile phone, therefore SQL statement is converted by target generation problem, answer can be directly found in the database.To sum up, Generating problem according to target determines the mode of target answer specifically herein without limitation.
Optionally, when the scoring that arbiter generates problem to target is no more than the first preset threshold, to avoid generation Problem is unreasonable, can still export primal problem target user's problem i.e. obtained, then carry out problem by artificial customer service and answer Again to obtain target answer.
207, target answer is returned.
After determining target answer, target answer is exported and shown by the front end web/app.
It is understood that receiving user when calling problem completion interface to carry out prefix search and being closed to candidate question set In any problem clicking operation after, then returning to the problem of being clicked in normal data concentrates corresponding model answer, the standard Answer is target answer.
It should be noted that intelligent answer method provided by the present application can be applied to several scenes, such as website is objective after sale Answer service scene, the pre-sales customer service answer service scene in website, medical services response scene or navigation Service scene etc. are taken, is had Body the application is without limitation.
In the embodiment of the present application, 1, concentrate using existing normal data existing data as criterion problem set, from Relevant customer problem is excavated in the log of family as source user problem to construct training set, it is only necessary to which editor is to automatic mining result It is audited, avoids and manually write process, thus greatly reduce training set constructions cost, be conducive to expand training set rule Mould;2, it also proposes that a kind of sequence based on RNN generates model to learn the conversion rule that former problem arrives criterion problem, can pass through and draw Enter null character string and non-duplicate attention mechanism to promote the problem of generating to maintain the semantic consistency with source user problem, realizes Automatic rewriting of the former problem to criterion problem substantially reduces artificial cost, promotes the efficiency of large-scale consumer problem optimization; 3, this application provides two Classification Neurals to calculate the probability that a generation problem is criterion problem.The classifier is comprehensive Literal feature, term vector feature and substance feature etc. are closed, generation problem normalization metric form, and artificial ginseng can be effectively measured With;4, the application, using the Policy-Gradient thought in enhancing study, is exported by using dual training mode is generated from arbiter Policy-Gradient is calculated, the parameter in continuous updating generator is carried out, continuous iteration optimization generator is asked as a result, can be obviously improved Inscribe the effect generated.
Intelligent answer method in the embodiment of the present application is described above, below to the intelligence in the embodiment of the present application Question and answer system is described, referring to Fig. 5, one embodiment of intelligent answer device includes: in the embodiment of the present application
Acquiring unit 501, for obtaining target user's problem;
Generation unit 502 is generated for generating target corresponding with target user's problem according to problem Optimized model Problem, described problem Optimized model be based on production confrontation network training obtain, described problem Optimized model include generator and Arbiter;
Judging unit 503, for judging whether the generation quality of the target generation problem is higher than according to the arbiter First preset threshold, the quality that generates are used to indicate the probability that the target generation problem is criterion problem;
Determination unit 504, if the judging unit determines that the target generates the generation quality of problem higher than described first Preset threshold then generates problem according to the target and determines target answer.
In the embodiment of the present application, the problem of user is inputted, is optimized by problem Optimized model, to obtain statement rule The target of model generates problem, helps the more acurrate demand for clearly expressing user of user, improves the matching degree with typical problem, Target answer can be more accurately found out, the accuracy of intelligent Answer System is improved.
For ease of understanding, the intelligent answer device in the embodiment of the present application is described in detail below, in above-mentioned Fig. 5 institute On the basis of showing, referring to Fig. 6, Fig. 6 is another embodiment schematic diagram of intelligent answer device in the embodiment of the present application, intelligence Question and answer system includes: acquiring unit 601, generation unit 602, judging unit 603 and determination unit 604.
Optionally, acquiring unit 601 can also be used in:
Training set is obtained, the training set includes source user problem-source criterion problem pair, the source user problem-source rule Model problem is to for indicating the set of source user problem and source criterion problem corresponding with the source user problem.
Optionally, acquiring unit 601 specifically includes:
Computing module 6011, each source user problem in typical problem and user journal for calculating normal data concentration Similarity value, for the standard data set for storing the typical problem, the user journal includes user and question answering system Intersection record;
First determining module 6012, for using the source for being greater than the second preset threshold with the similarity value of the typical problem Family problem as candidate user problem, in the determination candidate user problem with the problem of the typical problem semantic congruence into And the source user problem-source criterion problem pair is obtained, the typical problem is contained in the source criterion problem.
Optionally, intelligent answer device further include:
Input unit 605, for the source user problem in the training set to be input to the generator, so that described Generator carries out model training, and obtains generation problem according to the model after training;
Storage unit 606 is stored in for obtaining the obtained generation problem of the generator, and by the generation problem It generates in data set, the generation data set is for storing the generation problem.
Optionally, intelligent answer device further include:
Input unit 605 is also used to the generation in the source criterion problem and the generation data set in the training set Problem is input to the arbiter, so that the arbiter is using the source criterion problem in the training set as positive example sample, Model training is carried out as negative example sample using the generation problem in the generation data set;By generator generation generated Problem is input to the arbiter, so that the arbiter carries out rate of imputation differentiation to the generation problem, wherein described to return Category rate is used to indicate problem and belongs to the standard data set or the probability for generating data set;
Acquiring unit 601 is also used to obtain the arbiter to the differentiation result of the generation problem;
Input unit 605 is also used to the differentiation result being input to the generator so that the generator according to The generation problem and the differentiation result that the arbiter is differentiated carry out model training, and are generated according to the model after training New generation problem;
Acquiring unit 601, is also used to obtain the generator new generation problem generated, and by the new generation Problem is stored in the generation data set.
Optionally, intelligent answer device further include:
Unit 607 is terminated, for differentiating the obtained differentiation result of the problem of generator generates when the arbiter Variable quantity when being less than third predetermined threshold value, then stop inputting the problem of generator generates to the arbiter, and stop The differentiation of the arbiter is inputted to the generator as a result, to terminate the training to described problem Optimized model.
Optionally, unit 607 is terminated to be also used to:
When the number of iterations reaches four preset thresholds, then stop inputting asking for the generator generation to the arbiter Topic, and stop inputting the differentiation of the arbiter to the generator as a result, to terminate the training to described problem Optimized model, The generator generates a problem and the determining device judges that the problem of primary generator generates indicates an iteration.
Optionally, determination unit 604 specifically includes:
Matching module 6041 concentrates matching target criteria problem in normal data for generating problem according to the target, The similarity value that the target criteria problem and the target generate problem is greater than the 5th preset threshold;
Second determining module 6042, for determining that the target criteria problem concentrates corresponding answer in the normal data For the target answer, the standard data set is for storing the typical problem.
Optionally, intelligent answer device further include:
Output unit 608, if determining that the target generates the confidence level of problem not higher than for the judging unit 603 One preset threshold then exports target user's problem.
Angle of the above figure 5 to Fig. 6 from modular functionality entity respectively to intelligent answer device in the embodiment of the present application into Row detailed description, is below described in detail intelligent answer device in the embodiment of the present application from the angle of hardware handles.
Fig. 7 is a kind of structural schematic diagram of intelligent answer device provided by the embodiments of the present application, with reference to Fig. 7.Using collection At unit in the case where, a kind of possible structure that Fig. 7 shows intelligent answer device involved in above-described embodiment is shown It is intended to.Intelligent answer device 700 includes: processing unit 702 and communication unit 703.Processing unit 702 is used to fill intelligent answer The movement set carries out control management, for example, processing unit 702 for support intelligent answer device execute the step 202 in Fig. 2 to Step 206, and/or for techniques described herein other processes.Communication unit 703 for support intelligent answer device with The communication of other devices, for example, execute Fig. 2 in step 201 and step 207, and/or for techniques described herein its Its process.Intelligent answer device can also include storage unit 701, for storing the program code sum number of intelligent answer device According to.
Wherein, processing unit 702 can be processor or controller, such as can be central processing unit (central Processing unit, CPU), general processor, digital signal processor (digital signal processor, DSP), Specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array It is (field programmable gate array, FPGA) or other programmable logic device, transistor logic, hard Part component or any combination thereof.It may be implemented or execute to combine and various illustratively patrol described in present disclosure Collect box, module and circuit.Processor is also possible to realize the combination of computing function, such as includes one or more microprocessors Combination, DSP and the combination of microprocessor etc..Communication unit 703 can be communication interface, transceiver, transmission circuit etc., In, it may include one or more interfaces, such as transceiver interface that communication interface, which is to be referred to as,.Storage unit 701 can be storage Device.
When processing unit 702 is processor, communication unit 703 is communication interface, when storage unit 701 is memory, this Apply for that equipment involved in embodiment can be intelligent answer device shown in Fig. 8.
As shown in fig.8, the intelligent answer device 810 includes: processor 812, communication interface 813, memory 811.It can Choosing, intelligent answer device 810 can also include bus 814.Wherein, communication interface 813, processor 812 and memory 811 It can be connected with each other by bus 814;Bus 814 can be Peripheral Component Interconnect standard (peripheral component Interconnect, PCI) bus or expanding the industrial standard structure (extended industry standard Architecture, EISA) bus etc..Bus 814 can be divided into address bus, data/address bus, control bus etc..For convenient for table Show, only indicated with a thick line in Fig. 8, it is not intended that an only bus or a type of bus.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present application.The computer can To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center Such as coaxial cable, optical fiber, Digital Subscriber Line (digital subscriber line, DSL)) or wireless (such as infrared, wireless, Microwave etc.) mode transmitted to another web-site, computer, server or data center.It is described computer-readable to deposit Storage media can be any usable medium that computer can store or include the integrated clothes of one or more usable mediums The data storage devices such as business device, data center.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), Optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk (solid state disk, SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. are various can store program The medium of code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.

Claims (20)

1. a kind of intelligent answer method characterized by comprising
Obtain target user's problem;
Target corresponding with target user's problem, which is generated, according to problem Optimized model generates problem, described problem Optimized model It is obtained based on production confrontation network training, described problem Optimized model includes generator and arbiter;
Judge whether the generation quality of the target generation problem is higher than the first preset threshold, the generation according to the arbiter Quality is used to indicate the target and generates the probability that problem is criterion problem;
If so, generating problem according to the target determines target answer.
2. the method according to claim 1, wherein the method is also before acquisition target user's problem Include:
Training set is obtained, the training set includes source user problem-source criterion problem pair, and the source user problem-source specification is asked Topic is to for indicating the set of source user problem and source criterion problem corresponding with the source user problem.
3. according to the method described in claim 2, it is characterized in that, the acquisition training set includes:
Calculate the similarity value of each source user problem in the typical problem and user journal that normal data is concentrated, the criterion numeral According to collection for storing the typical problem, the user journal includes the intersection record of user and question answering system;
The source user problem of the second preset threshold will be greater than with the similarity value of the typical problem as candidate user problem, with Determine in the candidate user problem with the problem of the typical problem semantic congruence and then obtain the source user problem-source and advise Model problem pair, the typical problem are contained in the source criterion problem.
4. according to the method described in claim 3, it is characterized in that, after the acquisition training set, the acquisition target user Before problem, the method also includes:
Source user problem in the training set is input to the generator, so that the generator carries out model training, And generation problem is obtained according to the model after training;
The obtained generation problem of the generator is obtained, and the generation problem is stored in and is generated in data set, the life At data set for storing the generation problem.
5. according to the method described in claim 4, it is characterized in that, after the acquisition training set, the acquisition target user Before problem, the method also includes:
Generation problem in source criterion problem and the generation data set in the training set is input to the arbiter, with So that the arbiter is using the source criterion problem in the training set as positive example sample, with the generation in the generation data set Problem carries out model training as negative example sample;
Generator generation problem generated is input to the arbiter, so that the arbiter asks the generation Topic carries out rate of imputation differentiation, wherein the rate of imputation is used to indicate problem and belongs to the standard data set or the generation number According to the probability of collection;
The arbiter is obtained to the differentiation result of the generation problem;
The differentiation result is input to the generator, so that the generation that the generator is differentiated according to the arbiter Problem and the differentiation result carry out model training, and new generation problem is generated according to the model after training;
The generator new generation problem generated is obtained, and the new generation problem is stored in the generation data It concentrates.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
When the arbiter differentiates that the obtained variable quantity for differentiating result of the problem of generator generates is default less than third When threshold value, then stop inputting the problem of generator generates to the arbiter, and stops to described in generator input The differentiation of arbiter is as a result, to terminate the training to described problem Optimized model.
7. according to the method described in claim 5, it is characterized in that, the method also includes:
When the number of iterations reaches four preset thresholds, then stop inputting the problem of generator generates to the arbiter, And stop the differentiation that the arbiter is inputted to the generator as a result, to terminate the training to described problem Optimized model, institute It states a generator problem of generation and the determining device judges that the problem of primary generator generates indicates an iteration.
8. method according to any one of claim 1 to 7, which is characterized in that described to generate problem according to the target Determine that target answer includes:
According to the target generate problem normal data concentrate matching target criteria problem, the target criteria problem with it is described The similarity value that target generates problem is greater than the 5th preset threshold;
Determining that the target criteria problem concentrates corresponding answer in the normal data is the target answer, the criterion numeral According to collection for storing the typical problem.
9. the method according to claim 1, wherein described judge that the target generation is asked according to the arbiter After whether the confidence level of topic is higher than the first preset threshold, the method also includes:
If the arbiter judges that the target generates the confidence level of problem not higher than the first preset threshold, the target is exported Customer problem.
10. a kind of intelligent answer device characterized by comprising
Acquiring unit, for obtaining target user's problem;
Generation unit generates problem, institute for generating target corresponding with target user's problem according to problem Optimized model It states problem Optimized model to obtain based on production confrontation network training, described problem Optimized model includes generator and arbiter;
Judging unit, for judging it is default whether the generation quality of the target generation problem is higher than first according to the arbiter Threshold value, the quality that generates are used to indicate the probability that the target generation problem is criterion problem;
Determination unit, if the judging unit determines that the target generates the generation quality of problem higher than the described first default threshold Value then generates problem according to the target and determines target answer.
11. intelligent answer device according to claim 10, which is characterized in that the acquiring unit is also used to:
Training set is obtained, the training set includes source user problem-source criterion problem pair, and the source user problem-source specification is asked Topic is to for indicating the set of source user problem and source criterion problem corresponding with the source user problem.
12. intelligent answer device according to claim 11, which is characterized in that the acquiring unit includes:
Computing module, the similarity of each source user problem in typical problem and user journal for calculating normal data concentration Value, for the standard data set for storing the typical problem, the user journal, which includes user, interacts note with question answering system Record;
First determining module, for making the source user problem for being greater than the second preset threshold with the similarity value of the typical problem For candidate user problem, in the determination candidate user problem with the problem of the typical problem semantic congruence and then obtain institute Source user problem-source criterion problem pair is stated, the typical problem is contained in the source criterion problem.
13. intelligent answer device according to claim 12, which is characterized in that the intelligent answer device further include:
Input unit, for the source user problem in the training set to be input to the generator, so that the generator Model training is carried out, and generation problem is obtained according to the model after training;
Storage unit is stored in generation number for obtaining the obtained generation problem of the generator, and by the generation problem According to concentration, the generation data set is for storing the generation problem.
14. intelligent answer device according to claim 13, which is characterized in that the intelligent answer device further include:
The input unit is also used to the generation problem in the source criterion problem and the generation data set in the training set It is input to the arbiter, so that the arbiter is using the source criterion problem in the training set as positive example sample, with institute It states the generation problem generated in data set and carries out model training as negative example sample;By generator generation problem generated It is input to the arbiter, so that the arbiter carries out rate of imputation differentiation to the generation problem, wherein the rate of imputation The problem of being used to indicate belongs to the standard data set or the probability for generating data set;
The acquiring unit is also used to obtain the arbiter to the differentiation result of the generation problem;
The input unit is also used to the differentiation result being input to the generator, so that the generator is according to institute The generation problem and differentiation result progress model training that arbiter is differentiated are stated, and is generated newly according to the model after training Generation problem;
The acquiring unit is also used to obtain the generator new generation problem generated, and by the new generation problem It is stored in the generation data set.
15. intelligent answer device according to claim 14, which is characterized in that the intelligent answer device further include:
Unit is terminated, for differentiating the obtained variable quantity for differentiating result of the problem of generator generates when the arbiter When less than third predetermined threshold value, then stop inputting the problem of generator generates to the arbiter, and stop to the life It grows up to be a useful person and inputs the differentiation of the arbiter as a result, to terminate the training to described problem Optimized model.
16. intelligent answer device according to claim 14, which is characterized in that the intelligent answer device further include:
The termination unit is also used to when the number of iterations reaches four preset thresholds, then stops inputting institute to the arbiter The problem of generator generates is stated, and stops the differentiation for inputting the arbiter to the generator as a result, to terminate to ask described The training of Optimized model is inscribed, the generator generates a problem and the determining device judges what the primary generator generated Problem representation an iteration.
17. intelligent answer device described in any one of 0 to 16 according to claim 1, which is characterized in that the determination unit packet It includes:
Matching module concentrates matching target criteria problem, the target in normal data for generating problem according to the target The similarity value that typical problem and the target generate problem is greater than the 5th preset threshold;
Second determining module is the mesh for determining that the target criteria problem concentrates corresponding answer in the normal data Answer is marked, the standard data set is for storing the typical problem.
18. intelligent answer device according to claim 10, which is characterized in that the intelligent answer device further include:
Output unit, if determining that the target generates the confidence level of problem not higher than the first default threshold for the judgement unit Value, then export target user's problem.
19. a kind of computer readable storage medium, including instruction, when run on a computer, so that computer executes such as Method described in any one of claim 1-9.
20. a kind of computer program product comprising instruction, when run on a computer, so that computer executes such as right It is required that method described in 1-9 any one.
CN201711453223.3A 2017-12-27 2017-12-27 Intelligent question answering method and related device Active CN110019732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711453223.3A CN110019732B (en) 2017-12-27 2017-12-27 Intelligent question answering method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711453223.3A CN110019732B (en) 2017-12-27 2017-12-27 Intelligent question answering method and related device

Publications (2)

Publication Number Publication Date
CN110019732A true CN110019732A (en) 2019-07-16
CN110019732B CN110019732B (en) 2021-10-15

Family

ID=67187049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711453223.3A Active CN110019732B (en) 2017-12-27 2017-12-27 Intelligent question answering method and related device

Country Status (1)

Country Link
CN (1) CN110019732B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929085A (en) * 2019-11-14 2020-03-27 国家电网有限公司 Power customer service message generation model sample processing system and method based on meta-semantic decomposition
CN111126075A (en) * 2019-12-24 2020-05-08 重庆兆光科技股份有限公司 Semantic understanding method, system, equipment and medium for text antagonism training
CN111125325A (en) * 2019-12-06 2020-05-08 山东浪潮人工智能研究院有限公司 FAQ generation system and method based on GAN network
CN111177336A (en) * 2019-11-30 2020-05-19 西安华为技术有限公司 Method and device for determining response information
CN111209382A (en) * 2020-01-03 2020-05-29 联想(北京)有限公司 Content processing method, device, electronic equipment and medium
CN111737439A (en) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 Question generation method and device
CN112749259A (en) * 2019-10-29 2021-05-04 阿里巴巴集团控股有限公司 Commodity question and answer generation method and device and computer storage medium
CN112837676A (en) * 2019-11-04 2021-05-25 深圳市优必选科技股份有限公司 Statement generation method, statement generation device and intelligent equipment
WO2021174827A1 (en) * 2020-03-02 2021-09-10 平安科技(深圳)有限公司 Text generation method and appartus, computer device and readable storage medium
CN114429141A (en) * 2022-03-31 2022-05-03 北京中科闻歌科技股份有限公司 Answer determination method and device, computing equipment and storage medium
CN114969291A (en) * 2022-05-31 2022-08-30 湖南工商大学 Automatic question answering method and device
CN116523031A (en) * 2023-07-05 2023-08-01 深圳须弥云图空间科技有限公司 Training method of language generation model, language generation method and electronic equipment
CN117234341A (en) * 2023-11-15 2023-12-15 中影年年(北京)文化传媒有限公司 Virtual reality man-machine interaction method and system based on artificial intelligence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677636A (en) * 2015-12-30 2016-06-15 上海智臻智能网络科技股份有限公司 Information processing method and device for intelligent question-answering system
CN106803092A (en) * 2015-11-26 2017-06-06 阿里巴巴集团控股有限公司 A kind of determination method and device of typical problem data
WO2017191463A1 (en) * 2016-05-06 2017-11-09 Magic Pony Technology Limited Encoder pre-analyser
CN107423437A (en) * 2017-08-04 2017-12-01 逸途(北京)科技有限公司 A kind of Question-Answering Model optimization method based on confrontation network intensified learning
CN107423707A (en) * 2017-07-25 2017-12-01 深圳帕罗人工智能科技有限公司 A kind of face Emotion identification method based under complex environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106803092A (en) * 2015-11-26 2017-06-06 阿里巴巴集团控股有限公司 A kind of determination method and device of typical problem data
CN105677636A (en) * 2015-12-30 2016-06-15 上海智臻智能网络科技股份有限公司 Information processing method and device for intelligent question-answering system
WO2017191463A1 (en) * 2016-05-06 2017-11-09 Magic Pony Technology Limited Encoder pre-analyser
CN107423707A (en) * 2017-07-25 2017-12-01 深圳帕罗人工智能科技有限公司 A kind of face Emotion identification method based under complex environment
CN107423437A (en) * 2017-08-04 2017-12-01 逸途(北京)科技有限公司 A kind of Question-Answering Model optimization method based on confrontation network intensified learning

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李建华 等: "情感倾向性分析及应用研究综述", 《信息安全学报》 *
胡青: "社会化问答网站的知识传播研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749259A (en) * 2019-10-29 2021-05-04 阿里巴巴集团控股有限公司 Commodity question and answer generation method and device and computer storage medium
CN112749259B (en) * 2019-10-29 2024-01-02 阿里巴巴集团控股有限公司 Commodity question and answer generation method and device and computer storage medium
CN112837676B (en) * 2019-11-04 2023-12-01 深圳市优必选科技股份有限公司 Statement generation method, statement generation device and intelligent device
CN112837676A (en) * 2019-11-04 2021-05-25 深圳市优必选科技股份有限公司 Statement generation method, statement generation device and intelligent equipment
CN110929085B (en) * 2019-11-14 2023-12-19 国家电网有限公司 System and method for processing electric customer service message generation model sample based on meta-semantic decomposition
CN110929085A (en) * 2019-11-14 2020-03-27 国家电网有限公司 Power customer service message generation model sample processing system and method based on meta-semantic decomposition
CN111177336A (en) * 2019-11-30 2020-05-19 西安华为技术有限公司 Method and device for determining response information
CN111177336B (en) * 2019-11-30 2023-11-10 西安华为技术有限公司 Method and device for determining response information
CN111125325B (en) * 2019-12-06 2024-01-30 山东浪潮科学研究院有限公司 FAQ generation system and method based on GAN network
CN111125325A (en) * 2019-12-06 2020-05-08 山东浪潮人工智能研究院有限公司 FAQ generation system and method based on GAN network
CN111126075B (en) * 2019-12-24 2023-07-25 重庆兆光科技股份有限公司 Semantic understanding method, system, equipment and medium for text resistance training
CN111126075A (en) * 2019-12-24 2020-05-08 重庆兆光科技股份有限公司 Semantic understanding method, system, equipment and medium for text antagonism training
CN111209382A (en) * 2020-01-03 2020-05-29 联想(北京)有限公司 Content processing method, device, electronic equipment and medium
CN111209382B (en) * 2020-01-03 2024-02-27 联想(北京)有限公司 Content processing method, device, electronic equipment and medium
WO2021174827A1 (en) * 2020-03-02 2021-09-10 平安科技(深圳)有限公司 Text generation method and appartus, computer device and readable storage medium
CN111737439A (en) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 Question generation method and device
CN114429141A (en) * 2022-03-31 2022-05-03 北京中科闻歌科技股份有限公司 Answer determination method and device, computing equipment and storage medium
CN114969291B (en) * 2022-05-31 2023-08-08 湖南工商大学 Automatic question and answer method and device
CN114969291A (en) * 2022-05-31 2022-08-30 湖南工商大学 Automatic question answering method and device
CN116523031A (en) * 2023-07-05 2023-08-01 深圳须弥云图空间科技有限公司 Training method of language generation model, language generation method and electronic equipment
CN117234341A (en) * 2023-11-15 2023-12-15 中影年年(北京)文化传媒有限公司 Virtual reality man-machine interaction method and system based on artificial intelligence
CN117234341B (en) * 2023-11-15 2024-03-05 中影年年(北京)科技有限公司 Virtual reality man-machine interaction method and system based on artificial intelligence

Also Published As

Publication number Publication date
CN110019732B (en) 2021-10-15

Similar Documents

Publication Publication Date Title
CN110019732A (en) A kind of intelligent answer method and relevant apparatus
CN111310438B (en) Chinese sentence semantic intelligent matching method and device based on multi-granularity fusion model
US20210232763A1 (en) Graphical systems and methods for human-in-the-loop machine intelligence
CN108573411B (en) Mixed recommendation method based on deep emotion analysis and multi-source recommendation view fusion of user comments
WO2020108608A1 (en) Search result processing method, device, terminal, electronic device, and storage medium
US11295071B2 (en) Graphical systems and methods for human-in-the-loop machine intelligence
CN110298033A (en) Keyword corpus labeling trains extracting tool
CN109543031A (en) A kind of file classification method based on multitask confrontation study
CN109145245A (en) Predict method, apparatus, computer equipment and the storage medium of clicking rate
CN107329995A (en) A kind of controlled answer generation method of semanteme, apparatus and system
CN112069327B (en) Knowledge graph construction method and system for online education classroom teaching resources
CN112966091B (en) Knowledge map recommendation system fusing entity information and heat
CN111309887B (en) Method and system for training text key content extraction model
CN111080055A (en) Hotel scoring method, hotel recommendation method, electronic device and storage medium
CN112182145A (en) Text similarity determination method, device, equipment and storage medium
CN112287656A (en) Text comparison method, device, equipment and storage medium
CN114707516A (en) Long text semantic similarity calculation method based on contrast learning
CN114743029A (en) Image text matching method
CN108509588B (en) Lawyer evaluation method and recommendation method based on big data
Wei et al. Online education recommendation model based on user behavior data analysis
Tian et al. User intention recognition and requirement elicitation method for conversational ai services
CN116049376A (en) Method, device and system for retrieving and replying information and creating knowledge
CN115859963A (en) Similarity judgment method and system for new word and semantic recommendation
CN105095302B (en) Public praise-oriented analysis and inspection system, device and method
CN114626367A (en) Sentiment analysis method, system, equipment and medium based on news article content

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
TA01 Transfer of patent application right

Effective date of registration: 20200420

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 301, A building, room 3, building 301, foreshore Road, No. 310052, Binjiang District, Zhejiang, Hangzhou

Applicant before: Huawei Technologies Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant