CN109165286A - Automatic question-answering method, device and computer readable storage medium - Google Patents

Automatic question-answering method, device and computer readable storage medium Download PDF

Info

Publication number
CN109165286A
CN109165286A CN201811021993.5A CN201811021993A CN109165286A CN 109165286 A CN109165286 A CN 109165286A CN 201811021993 A CN201811021993 A CN 201811021993A CN 109165286 A CN109165286 A CN 109165286A
Authority
CN
China
Prior art keywords
answer
similarity
scene
answering
automatic question
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.)
Pending
Application number
CN201811021993.5A
Other languages
Chinese (zh)
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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201811021993.5A priority Critical patent/CN109165286A/en
Publication of CN109165286A publication Critical patent/CN109165286A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of automatic question-answering method, device and computer readable storage medium, the automatic question-answering method determines the corresponding target scene of the primal problem, and generate with reference to answer based on the primal problem the following steps are included: acquisition primal problem;Based on the target scene, answer group to be selected is obtained;It is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;Export the corresponding answer to be selected of maximum similarity.Through the invention, it determines the corresponding target scene of primal problem, it is corresponding with reference to answer to generate primal problem, the answer group to be selected and reference for including based on target scene are answered, and are determined final answer, are reduced range of search, match time is saved, the process flow of question answering system has significantly been simplified.

Description

Automatic question-answering method, device and computer readable storage medium
Technical field
The present invention relates to human-computer interaction technique field more particularly to automatic question-answering methods, device and computer-readable storage Medium.
Background technique
Existing question answering system searches answer by the way of based on retrieval, mainly include two modules: rewrite module and With module.
The retrieval flow of existing question answering system is as shown in Figure 1.User proposes that problem, system ask the original of user first Sentence submits to rewriting module, and rewriting module, there are two kinds of rewrite methods, and one is context rewriting, another kind is that parallel corpora changes It writes.Wherein, context rewriting has two major functions: ambiguity judgement and reference resolution;It equally includes two that parallel corpora, which is rewritten, A step is word replacement and sentence replacement respectively.The output for rewriting module is imported into matching module in next step, matching module one is shared Five kinds of modes, respectively knowledge storehouse matching, knowledge mapping matching, intention assessment matching, classification and matching and the row's of falling matching.This five kinds Mode is connected in series, once it fails to match for a kind of mode, is then matched into lower one mode;Any one mode is matched into Function is then focused to find out the highest question sentence of similarity in matching question sentence candidate, and returns to the corresponding answer of the user question sentence;If Five kinds of matching ways all have failed, then the default of custom system setting is returned to as a result, answering safely, such as " you are good, I Do not understand your meaning ", it is such.
In existing searching system, rewrites module and need to rewrite original question sentence, and the matching mould in matching module Formula is excessive, causes retrieval flow relatively complicated.
Summary of the invention
The main purpose of the present invention is to provide a kind of automatic question-answering method, device and computer readable storage medium, purports In the relatively complicated technical problem of the retrieval flow for solving question answering system in the prior art.
To achieve the above object, the present invention provides a kind of automatic question-answering method, and the automatic question-answering method includes following step It is rapid:
Primal problem is obtained, determines the corresponding target scene of the primal problem, and ginseng is generated based on the primal problem Examine answer;
Based on the target scene, answer group to be selected is obtained;
It is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;
Export the corresponding answer to be selected of maximum similarity.
Optionally, the step of determination primal problem corresponding target scene includes:
Calculate the similarity of the primal problem each preset problem corresponding with each preset scene;
It detects in the similarity being calculated with the presence or absence of the target similarity greater than the first preset threshold;
It is if there is the target similarity greater than the first preset threshold in the similarity being calculated, the target is similar Corresponding preset scene is spent as target scene.
Optionally, the automatic question-answering method is further comprising the steps of:
If there is no the target similarity greater than the first preset threshold in the similarity being calculated, output safety is returned It answers.
Optionally, described generated based on the primal problem includes: with reference to the step of answer
The primal problem is inputted to preset generation model, obtains the reference answer for generating model and generating.
Optionally, before described the step of generating reference answer based on the primal problem, further includes:
The dialogue data under real scene is obtained, and using the dialogue data as training data, to preset neural network Model is trained, and obtains generating model.
Optionally, described the step of being based on the target scene, obtaining answer group to be selected, includes:
The corresponding answer to be selected of the target scene is obtained, the answer to be selected based on acquisition obtains answer group to be selected.
Optionally, the step of output maximum similarity corresponding answer to be selected includes:
Whether detection maximum similarity is greater than the second preset threshold;
If maximum similarity is greater than the second preset threshold, the corresponding answer to be selected of maximum similarity is exported.
Optionally, the automatic question-answering method is further comprising the steps of:
If maximum similarity is not more than the second preset threshold, output safety is answered.
In addition, to achieve the above object, the present invention also provides a kind of automatic call answering arrangement, the automatic call answering arrangement packet It includes: memory, processor and being stored in the automatic question answering program that can be run on the memory and on the processor, it is described The step of automatic question answering program realizes automatic question-answering method as described above when being executed by the processor.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium It is stored with automatic question answering program on storage medium, is realized when the automatic question answering program is executed by processor as described above automatic The step of answering method.
In the present invention, primal problem is obtained, determines the corresponding target scene of the primal problem, and original asked based on described Topic is generated with reference to answer;Based on the target scene, answer group to be selected is obtained;It is calculated described with reference to answer and answer to be selected The similarity of each answer to be selected in group;Export the corresponding answer to be selected of maximum similarity.Through the invention, primal problem is determined Corresponding target scene generates the corresponding reference of primal problem and answers, the answer group and ginseng to be selected for including based on target scene Answer is examined, final answer is determined, reduces range of search, save match time, significantly simplified the processing of question answering system Process.
Detailed description of the invention
Fig. 1 is the retrieval flow schematic diagram of question answering system in the prior art;
Fig. 2 is the automatic call answering arrangement structural schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 3 is the flow diagram of automatic question-answering method first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Fig. 2, the automatic call answering arrangement structure that Fig. 2 is the hardware running environment that the embodiment of the present invention is related to is shown It is intended to.
Automatic call answering arrangement of the embodiment of the present invention can be PC, be also possible to smart phone, tablet computer, portable computer Equal terminal devices.
As shown in Fig. 2, the automatic call answering arrangement may include: processor 1001, such as CPU, network interface 1004, user Interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection between these components Communication.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user Interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include having for standard Line interface, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable storage Device (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processing The storage device of device 1001.
It will be understood by those skilled in the art that automatic call answering arrangement structure shown in Figure 2 is not constituted to automatic question answering The restriction of device may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.
As shown in Fig. 2, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe module, Subscriber Interface Module SIM and automatic question answering program.
In automatic call answering arrangement shown in Fig. 2, network interface 1004 is mainly used for connecting background server, takes with backstage Business device carries out data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client; And processor 1001 can be used for calling the automatic question answering program stored in memory 1005, and execute following operation:
Primal problem is obtained, determines the corresponding target scene of the primal problem, and ginseng is generated based on the primal problem Examine answer;
Based on the target scene, answer group to be selected is obtained;
It is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;
Export the corresponding answer to be selected of maximum similarity.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
Calculate the similarity of the primal problem each preset problem corresponding with each preset scene;
It detects in the similarity being calculated with the presence or absence of the target similarity greater than the first preset threshold;
It is if there is the target similarity greater than the first preset threshold in the similarity being calculated, the target is similar Corresponding preset scene is spent as target scene.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
If there is no the target similarity greater than the first preset threshold in the similarity being calculated, output safety is returned It answers.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
The primal problem is inputted to preset generation model, obtains the reference answer for generating model and generating.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
The dialogue data under real scene is obtained, and using the dialogue data as training data, to preset neural network Model is trained, and obtains generating model.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
The corresponding answer to be selected of the target scene is obtained, the answer to be selected based on acquisition obtains answer group to be selected.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
Whether detection maximum similarity is greater than the second preset threshold;
If maximum similarity is greater than the second preset threshold, the corresponding answer to be selected of maximum similarity is exported.
Further, processor 1001 can call the automatic question answering program stored in memory 1005, also execute following Operation:
If maximum similarity is not more than the second preset threshold, output safety is answered.
It is the flow diagram of automatic question-answering method first embodiment of the present invention referring to Fig. 3, Fig. 3.
In one embodiment, automatic question-answering method includes:
Step S10 obtains primal problem, determines the corresponding target scene of the primal problem, and original is asked based on described Topic is generated with reference to answer;
In the present embodiment, user be can be in a manner of keyboard input, primal problem be inputted, so that automatic call answering arrangement obtains Take the primal problem of family input.It can also be that user in a manner of voice input, inputs voice, automatic call answering arrangement is got After the voice of user's input, to the voiced translation at text (voiced translation is the prior art at text, and this will not be repeated here), obtain To primal problem.
In the present embodiment, multiple scenes are preset, and each scene is corresponding with one or more problems.For example, setting in advance It is equipped with scenario A, scenario B, scene C, scene D ..., the scene of any number can be set as needed.Wherein scenario A correspondence is asked Inscribe A1, problem A2, problem A3 ..., scenario B correspondence problem B1, problem B2, problem B3 ..., scene C correspondence problem C1, problem C2, problem C3 ..., scene D correspondence problem D1, problem D2, problem D3 ... can its be right as needed for each scene setting The problem of answering quantity and problem content.
It is just corresponding with preset each scene to primal problem each after getting primal problem in the present embodiment A problem carries out similarity calculation.For example, preset scene includes scenario A, scenario B, scene C and scene D, wherein scenario A 15 problems are corresponding with, scenario B is corresponding with 18 problems, and scene C is corresponding with 20 problems, and scene D is corresponding with 12 problems, then Primal problem is calculated separately with the similarity of this 65 problems, obtains 65 similarities.
The mode of similarity calculation includes: that calculating primal problem is corresponding with preset each scene each in the present embodiment The Euclidean distance of a problem, the similarity as primal problem and corresponding each problem in preset each scene;It calculates former The manhatton distance of beginning problem and corresponding each problem in preset each scene, as primal problem and preset each field The similarity of corresponding each problem in scape;Calculating primal problem can with corresponding the bright of each problem in preset each scene Paderewski distance, the similarity as primal problem and corresponding each problem in preset each scene;Calculate primal problem With the cosine similarity of each problem corresponding in preset each scene, as primal problem with it is right in preset each scene The similarity for each problem answered.In the present embodiment, with no restriction to the mode of similarity calculation, with specific reference to be actually needed into Row selection.
In an alternate embodiment of the present invention, it can be and choose maximum similarity from the similarity being calculated, then will The corresponding scene of maximum similarity is as the corresponding target scene of primal problem.For example, the maximum similarity in 65 similarities, It is to carry out similarity calculation to some problem in primal problem and scene C to obtain, then it is corresponding using scene C as primal problem Target scene.
In another alternative embodiment of the present invention, the first preset threshold (big rootlet of the first preset threshold can be preset It is configured according to actual needs), the target similarity for being greater than the first preset threshold is chosen from the similarity being calculated, then Using the corresponding scene of target similarity as the corresponding target scene of primal problem.For example, in 65 similarities, it is big there are 5 In the target similarity of the first preset threshold, wherein 2 target similarities are to certain 2 problem in primal problem and scenario A Carry out what similarity calculation obtained, wherein 3 target similarities are to carry out phase to primal problem and certain 3 problem in scene C It is calculated like degree, then using scenario A target scene corresponding as primal problem with scene C.In the present embodiment, if calculating To similarity in there is no the target similarities greater than the first preset threshold, i.e., it is corresponding that there is no primal problems in preset scene Scene, then output safety answer.The answer that safety is answered to edit in advance, such as " current problem can not be answered, please again Editor's problem ".
In the present embodiment, after determining the corresponding target scene of primal problem, generated based on primal problem with reference to answer.It is based on Primal problem is generated with reference to the mode answered are as follows: primal problem is input to preset generation model, generation model is obtained and is based on The reference that primal problem generates is answered.In the present embodiment, the dialogue data of user Yu artificial customer service are first passed through in advance, to neural network Language model is trained, and obtains generating model, so that generating model can be automatically generated based on primal problem with reference to answer.Its In, the dialogue data of user and artificial customer service is the session log data of several different users and artificial customer service.
Step S20 is based on the target scene, obtains answer group to be selected;
In the present embodiment, preset multiple scenes, not only each scene is corresponding with one or more problems, and each scene is also It is corresponding with one or more answers.For example, being previously provided with scenario A, scenario B, scene C, scene D ..., can set as needed Set the scene of any number.Wherein scenario A is corresponding answers A1, answers A2, answers A3 ..., and scenario B is corresponding to be answered B1, answers B2, B3 ... is answered, scene C is corresponding to be answered C1, answers C2, answer C3 ..., and scene D is corresponding to be answered D1, answers D2, answer D3 ..., can as needed for each scene setting its corresponding answer quantity and answer content.Wherein, each scene is corresponding Answer be standard, specification answer.If determining that target scene is scenario A and scene C, then according to field according to step S10 The corresponding answer of scape A and the corresponding answer of scene C, combination obtain answer group to be selected.For example, the corresponding answer of scenario A includes A1~answer A15 is answered, this 15 answers, corresponding answer of scene C includes answering C1~answer C10, this 10 answers then will It answers A1~answer A15 and answers C1~answer C10,25 answers are combined altogether, obtain answer group to be selected.
Step S30 is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;
Step S40, the corresponding answer to be selected of output maximum similarity.
In the present embodiment, if in answer group to be selected include N number of answer to be selected, calculate separately with reference to answer with it is N number of to be selected The similarity of answer obtains N number of similarity, and chooses the maximum similarity in N number of similarity, and it is corresponding to export maximum similarity Answer to be selected.
In the present embodiment, calculating with reference to answering with the mode of the similarity of N number of answer to be selected includes: to calculate separately to refer back to The Euclidean distance with N number of answer to be selected is answered, answers the similarity with each answer to be selected as reference;It calculates separately with reference to answer With the manhatton distance of N number of answer to be selected, the similarity with each answer to be selected is answered as reference;It calculates separately with reference to answer With the Minkowski distance of N number of answer to be selected, the similarity with each answer to be selected is answered as reference;Calculate separately reference The cosine similarity with N number of answer to be selected is answered, answers the similarity with each answer to be selected as reference.In the present embodiment, With no restriction to the mode of similarity calculation, it is selected with specific reference to actual needs.
In the present embodiment, the corresponding mode to be selected for answering (i.e. final answer) of output maximum similarity is unlimited, can be with The mode of text importing, the corresponding answer to be selected of output maximum similarity, can also export maximum phase in a manner of voice output Like the corresponding answer to be selected of degree.
In the present embodiment, primal problem is obtained, determines the corresponding target scene of the primal problem, and based on described original Problem is generated with reference to answer;Based on the target scene, answer group to be selected is obtained;It is calculated described with reference to answer and to be selected time Answer the similarity of each answer to be selected in group;Export the corresponding answer to be selected of maximum similarity.Through this embodiment, it determines original The corresponding target scene of problem, it is corresponding with reference to answering to generate primal problem, the answer group to be selected for including based on target scene with And with reference to answering, determines final answer, reduce range of search, save match time, significantly simplified question answering system Process flow.
Further, in one embodiment of automatic question-answering method of the present invention, the corresponding target of the determination primal problem The step of scene includes:
Calculate the similarity of the primal problem each preset problem corresponding with each preset scene;
It detects in the similarity being calculated with the presence or absence of the target similarity greater than the first preset threshold;
It is if there is the target similarity greater than the first preset threshold in the similarity being calculated, the target is similar Corresponding preset scene is spent as target scene.
In the present embodiment, multiple scenes are preset, and each scene is corresponding with one or more problems.For example, setting in advance It is equipped with scenario A, scenario B, scene C, scene D ..., the scene of any number can be set as needed.Wherein scenario A correspondence is asked Inscribe A1, problem A2, problem A3 ..., scenario B correspondence problem B1, problem B2, problem B3 ..., scene C correspondence problem C1, problem C2, problem C3 ..., scene D correspondence problem D1, problem D2, problem D3 ... can its be right as needed for each scene setting The problem of answering quantity and problem content.
It is just corresponding with preset each scene to primal problem each after getting primal problem in the present embodiment A problem carries out similarity calculation.For example, preset scene includes scenario A, scenario B, scene C and scene D, wherein scenario A 15 problems are corresponding with, scenario B is corresponding with 18 problems, and scene C is corresponding with 20 problems, and scene D is corresponding with 12 problems, then Primal problem is calculated separately with the similarity of this 65 problems, obtains 65 similarities.
The mode of similarity calculation includes: that calculating primal problem is corresponding with preset each scene each in the present embodiment The Euclidean distance of a problem, the similarity as primal problem and corresponding each problem in preset each scene;It calculates former The manhatton distance of beginning problem and corresponding each problem in preset each scene, as primal problem and preset each field The similarity of corresponding each problem in scape;Calculating primal problem can with corresponding the bright of each problem in preset each scene Paderewski distance, the similarity as primal problem and corresponding each problem in preset each scene;Calculate primal problem With the cosine similarity of each problem corresponding in preset each scene, as primal problem with it is right in preset each scene The similarity for each problem answered.In the present embodiment, with no restriction to the mode of similarity calculation, with specific reference to be actually needed into Row selection.
In an alternate embodiment of the present invention, it can be and choose maximum similarity from the similarity being calculated, then will The corresponding scene of maximum similarity is as the corresponding target scene of primal problem.For example, the maximum similarity in 65 similarities, It is to carry out similarity calculation to some problem in primal problem and scene C to obtain, then it is corresponding using scene C as primal problem Target scene.
In another alternative embodiment of the present invention, the first preset threshold (big rootlet of the first preset threshold can be preset It is configured according to actual needs), the target similarity for being greater than the first preset threshold is chosen from the similarity being calculated, then Using the corresponding scene of target similarity as the corresponding target scene of primal problem.For example, in 65 similarities, it is big there are 5 In the target similarity of the first preset threshold, wherein 2 target similarities are to certain 2 problem in primal problem and scenario A Carry out what similarity calculation obtained, wherein 3 target similarities are to carry out phase to primal problem and certain 3 problem in scene C It is calculated like degree, then using scenario A target scene corresponding as primal problem with scene C.
In the present embodiment, scene mapping is carried out to the primal problem of user, by customer problem automatic clustering, so that subsequent The range of obtained answer to be selected is smaller, and is more bonded user demand, saves subsequent determination and finally answers the required time, mentions The high accuracy of final answer.
Further, in one embodiment of automatic question-answering method of the present invention, the automatic question-answering method is further comprising the steps of:
If there is no the target similarity greater than the first preset threshold in the similarity being calculated, output safety is returned It answers.
In the present embodiment, if there is no the target similarities greater than the first preset threshold in the similarity being calculated, i.e., The corresponding scene of primal problem is not present in preset scene, then output safety is answered.The answer that safety is answered to edit in advance, Such as " current problem can not be answered, problem please be update ".
Further, described to be referred back to based on primal problem generation in one embodiment of automatic question-answering method of the present invention The step of answering include:
The primal problem is inputted to preset generation model, obtains the reference answer for generating model and generating.
Further, described to be referred back to based on primal problem generation in one embodiment of automatic question-answering method of the present invention Before the step of answering, further includes:
The dialogue data under real scene is obtained, and using the dialogue data as training data, to preset neural network Language model is trained, and obtains generating model.
In the present embodiment, after determining the corresponding target scene of primal problem, generated based on primal problem with reference to answer.It is based on Primal problem is generated with reference to the mode answered are as follows: primal problem is input to preset generation model, generation model is obtained and is based on The reference that primal problem generates is answered.In the present embodiment, the dialogue data of user Yu artificial customer service are first passed through in advance, to neural network Language model is trained, and obtains generating model, so that generating model can be automatically generated based on primal problem with reference to answer.Its In, the dialogue data of user and artificial customer service is session log data (the i.e. real scene of several different users and artificial customer service Under dialogue data).
In the present embodiment, preset neural network language model is trained based on the dialogue data under real scene, It obtains generating model, effectively solves to be too dependent on knowledge base in the prior art, cause to answer update not in time, knowledge point covering Incomplete problem achievees the purpose that optimize single-wheel dialogue.
Further, in one embodiment of automatic question-answering method of the present invention, step S20 includes:
The corresponding answer to be selected of the target scene is obtained, the answer to be selected based on acquisition obtains answer group to be selected.
In the present embodiment, preset multiple scenes, not only each scene is corresponding with one or more problems, and each scene is also It is corresponding with one or more answers.For example, being previously provided with scenario A, scenario B, scene C, scene D ..., can set as needed Set the scene of any number.Wherein scenario A is corresponding answers A1, answers A2, answers A3 ..., and scenario B is corresponding to be answered B1, answers B2, B3 ... is answered, scene C is corresponding to be answered C1, answers C2, answer C3 ..., and scene D is corresponding to be answered D1, answers D2, answer D3 ..., can as needed for each scene setting its corresponding answer quantity and answer content.If according to step S10, really The scene that sets the goal is scenario A and scene C, then is obtained according to the corresponding answer of scenario A and the corresponding answer of scene C, combination Answer group to be selected.For example, corresponding answer of scenario A includes answering A1~answer A15, and this 15 answers, the corresponding answer of scene C Including answering C1~answer C10, this 10 answers will then answer A1~answer A15 and answer C1~answer C10, and altogether 25 A answer is combined, and obtains answer group to be selected.
Further, in one embodiment of automatic question-answering method of the present invention, step S40 includes:
Whether detection maximum similarity is greater than the second preset threshold;
If maximum similarity is greater than the second preset threshold, the corresponding answer to be selected of maximum similarity is exported.
Further, in one embodiment of automatic question-answering method of the present invention, the automatic question-answering method is further comprising the steps of:
If maximum similarity is not more than the second preset threshold, output safety is answered.
In the present embodiment, if in answer group to be selected include N number of answer to be selected, calculate separately with reference to answer with it is N number of to be selected The similarity of answer obtains N number of similarity, and chooses the maximum similarity in N number of similarity, then further calculates maximum phase Whether it is greater than the second preset threshold like degree (in the present embodiment, the setting of the second preset threshold is configured according to the actual situation). In the present embodiment, if maximum similarity is greater than the second preset threshold, illustrates the corresponding answer to be selected of maximum similarity and generate Model generate reference answer consistency it is very high, illustrate current maximum similarity it is corresponding it is to be selected answer be it is reliable, then Export the corresponding answer to be selected of maximum similarity;If illustrating maximum similar if maximum similarity is not more than the second preset threshold It is very low to spend the consistency that corresponding answer to be selected is answered with the reference for generating model generation, illustrates that maximum similarity is corresponding to be selected The Reliability of answer is not high, then output safety is answered.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with automatic question answering program, the automatic question answering program realizes following steps when being executed by processor:
Primal problem is obtained, determines the corresponding target scene of the primal problem, and ginseng is generated based on the primal problem Examine answer;
Based on the target scene, answer group to be selected is obtained;
It is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;
Export the corresponding answer to be selected of maximum similarity.
The automatic question answering program also realizes following steps when being executed by processor:
Calculate the similarity of the primal problem each preset problem corresponding with each preset scene;
It detects in the similarity being calculated with the presence or absence of the target similarity greater than the first preset threshold;
It is if there is the target similarity greater than the first preset threshold in the similarity being calculated, the target is similar Corresponding preset scene is spent as target scene.
The automatic question answering program also realizes following steps when being executed by processor:
If there is no the target similarity greater than the first preset threshold in the similarity being calculated, output safety is returned It answers.
The automatic question answering program also realizes following steps when being executed by processor:
The primal problem is inputted to preset generation model, obtains the reference answer for generating model and generating.
The automatic question answering program also realizes following steps when being executed by processor:
The dialogue data under real scene is obtained, and using the dialogue data as training data, to preset neural network Model is trained, and obtains generating model.
The automatic question answering program also realizes following steps when being executed by processor:
The corresponding answer to be selected of the target scene is obtained, the answer to be selected based on acquisition obtains answer group to be selected.
The automatic question answering program also realizes following steps when being executed by processor:
Whether detection maximum similarity is greater than the second preset threshold;
If maximum similarity is greater than the second preset threshold, the corresponding answer to be selected of maximum similarity is exported.
The automatic question answering program also realizes following steps when being executed by processor:
If maximum similarity is not more than the second preset threshold, output safety is answered.
Each embodiment base of the specific embodiment of computer readable storage medium of the present invention and above-mentioned automatic question-answering method This is identical, and this will not be repeated here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of automatic question-answering method, which is characterized in that the automatic question-answering method the following steps are included:
Primal problem is obtained, determines the corresponding target scene of the primal problem, and refer back to based on primal problem generation It answers;
Based on the target scene, answer group to be selected is obtained;
It is calculated described with reference to the similarity answered with each answer to be selected in answer group to be selected;
Export the corresponding answer to be selected of maximum similarity.
2. automatic question-answering method as described in claim 1, which is characterized in that the corresponding target of the determination primal problem The step of scene includes:
Calculate the similarity of the primal problem each preset problem corresponding with each preset scene;
It detects in the similarity being calculated with the presence or absence of the target similarity greater than the first preset threshold;
If there is the target similarity greater than the first preset threshold in the similarity being calculated, by the target similarity pair The preset scene answered is as target scene.
3. automatic question-answering method as claimed in claim 2, which is characterized in that the automatic question-answering method further includes following step It is rapid:
If there is no the target similarity greater than the first preset threshold in the similarity being calculated, output safety is answered.
4. automatic question-answering method as described in claim 1, which is characterized in that described to be referred back to based on primal problem generation The step of answering include:
The primal problem is inputted to preset generation model, obtains the reference answer for generating model and generating.
5. automatic question-answering method as claimed in claim 4, which is characterized in that described to be referred back to based on primal problem generation Before the step of answering, further includes:
The dialogue data under real scene is obtained, and using the dialogue data as training data, to preset neural network language Model is trained, and obtains generating model.
6. automatic question-answering method as described in claim 1, which is characterized in that it is described to be based on the target scene, it obtains to be selected The step of answer group includes:
The corresponding answer to be selected of the target scene is obtained, the answer to be selected based on acquisition obtains answer group to be selected.
7. such as automatic question-answering method described in any one of claims 1 to 6, which is characterized in that the output maximum similarity The step of corresponding answer to be selected includes:
Whether detection maximum similarity is greater than the second preset threshold;
If maximum similarity is greater than the second preset threshold, the corresponding answer to be selected of maximum similarity is exported.
8. automatic question-answering method as claimed in claim 7, which is characterized in that the automatic question-answering method further includes following step It is rapid:
If maximum similarity is not more than the second preset threshold, output safety is answered.
9. a kind of automatic call answering arrangement, which is characterized in that the automatic call answering arrangement includes: memory, processor and is stored in On the memory and the automatic question answering program that can run on the processor, the automatic question answering program is by the processor It realizes when execution such as the step of automatic question-answering method described in any item of the claim 1 to 8.
10. a kind of computer readable storage medium, which is characterized in that be stored on the computer readable storage medium and ask automatically Program is answered, such as automatic question answering described in any item of the claim 1 to 8 is realized when the automatic question answering program is executed by processor The step of method.
CN201811021993.5A 2018-09-03 2018-09-03 Automatic question-answering method, device and computer readable storage medium Pending CN109165286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811021993.5A CN109165286A (en) 2018-09-03 2018-09-03 Automatic question-answering method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811021993.5A CN109165286A (en) 2018-09-03 2018-09-03 Automatic question-answering method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109165286A true CN109165286A (en) 2019-01-08

Family

ID=64893834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811021993.5A Pending CN109165286A (en) 2018-09-03 2018-09-03 Automatic question-answering method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109165286A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992669A (en) * 2019-04-08 2019-07-09 浙江大学 A kind of keyword answering method based on language model and intensified learning
CN110489533A (en) * 2019-07-09 2019-11-22 深圳追一科技有限公司 Interactive method and relevant device
CN110674268A (en) * 2019-08-23 2020-01-10 深圳追一科技有限公司 Man-machine conversation method and related equipment
CN111831875A (en) * 2019-04-11 2020-10-27 阿里巴巴集团控股有限公司 Data processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853842A (en) * 2014-03-20 2014-06-11 百度在线网络技术(北京)有限公司 Automatic question and answer method and system
CN105912692A (en) * 2016-04-22 2016-08-31 华讯方舟科技有限公司 Intelligent voice dialogue method and apparatus
CN106815311A (en) * 2016-12-21 2017-06-09 杭州朗和科技有限公司 A kind of problem matching process and device
CN108170764A (en) * 2017-12-25 2018-06-15 上海大学 A kind of man-machine more wheel dialog model construction methods based on scene context
CN108399169A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Dialog process methods, devices and systems based on question answering system and mobile device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853842A (en) * 2014-03-20 2014-06-11 百度在线网络技术(北京)有限公司 Automatic question and answer method and system
CN105912692A (en) * 2016-04-22 2016-08-31 华讯方舟科技有限公司 Intelligent voice dialogue method and apparatus
CN106815311A (en) * 2016-12-21 2017-06-09 杭州朗和科技有限公司 A kind of problem matching process and device
CN108399169A (en) * 2017-02-06 2018-08-14 阿里巴巴集团控股有限公司 Dialog process methods, devices and systems based on question answering system and mobile device
CN108170764A (en) * 2017-12-25 2018-06-15 上海大学 A kind of man-machine more wheel dialog model construction methods based on scene context

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992669A (en) * 2019-04-08 2019-07-09 浙江大学 A kind of keyword answering method based on language model and intensified learning
CN111831875A (en) * 2019-04-11 2020-10-27 阿里巴巴集团控股有限公司 Data processing method, device, equipment and storage medium
CN110489533A (en) * 2019-07-09 2019-11-22 深圳追一科技有限公司 Interactive method and relevant device
CN110674268A (en) * 2019-08-23 2020-01-10 深圳追一科技有限公司 Man-machine conversation method and related equipment

Similar Documents

Publication Publication Date Title
CN109165286A (en) Automatic question-answering method, device and computer readable storage medium
CN110164435A (en) Audio recognition method, device, equipment and computer readable storage medium
CN107807960B (en) Intelligent customer service method, electronic device and computer readable storage medium
CN103853703A (en) Information processing method and electronic equipment
CN110442697B (en) Man-machine interaction method, system, computer equipment and storage medium
WO2021218029A1 (en) Artificial intelligence-based interview method and apparatus, computer device, and storage medium
CN107844470B (en) Voice data processing method and equipment thereof
CN116521893A (en) Control method and control device of intelligent dialogue system and electronic equipment
CN116737908A (en) Knowledge question-answering method, device, equipment and storage medium
CN111177307A (en) Test scheme and system based on semantic understanding similarity threshold configuration
CN112686051A (en) Semantic recognition model training method, recognition method, electronic device, and storage medium
CN114268747A (en) Interview service processing method based on virtual digital people and related device
CN102426567A (en) Graphical editing and debugging system of automatic answer system
CN111402864A (en) Voice processing method and electronic equipment
CN111444321B (en) Question answering method, device, electronic equipment and storage medium
CN112286485B (en) Method and device for controlling application through voice, electronic equipment and storage medium
CN109657127A (en) A kind of answer acquisition methods, device, server and storage medium
CN111506717B (en) Question answering method, device, equipment and storage medium
CN115098655A (en) Common question answering method, system, equipment and medium
CN108460077B (en) Index analysis method, system and computer readable storage medium
CN111556096A (en) Information pushing method, device, medium and electronic equipment
CN109325234A (en) Sentence processing method, equipment and computer readable storage medium
CN111881251B (en) AI telephone sales testing method and device, electronic equipment and storage medium
CN109145312A (en) A kind of machine translation method based on L2 cache, device, medium and electronic equipment
CN116821295A (en) Intelligent question-answering method, device, computer equipment and medium

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