CN109522395A - Automatic question-answering method and device - Google Patents

Automatic question-answering method and device Download PDF

Info

Publication number
CN109522395A
CN109522395A CN201811192199.7A CN201811192199A CN109522395A CN 109522395 A CN109522395 A CN 109522395A CN 201811192199 A CN201811192199 A CN 201811192199A CN 109522395 A CN109522395 A CN 109522395A
Authority
CN
China
Prior art keywords
semantic
input problem
phrase
input
vector
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.)
Withdrawn
Application number
CN201811192199.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811192199.7A priority Critical patent/CN109522395A/en
Priority to PCT/CN2018/125252 priority patent/WO2020073533A1/en
Publication of CN109522395A publication Critical patent/CN109522395A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Machine Translation (AREA)

Abstract

This disclosure relates to field of artificial intelligence, a kind of automatic question-answering method and device are specifically disclosed, comprising: the semantic vector of building input problem;Semantic integrity judgement is carried out to the input problem according to the semantic vector;If the semanteme of the input problem is imperfect, predict to obtain the omission phrase in the input problem from the corresponding corpus above of the input problem by semantic supplement model;According to the semantic incomplete input problem and the return information for omitting phrase and obtaining the input problem from Q & A database obtained.Using the method for deep learning, it carries out omitting phrase prediction for semantic incomplete input problem, user experience is improved according to the return information for omitting the problem of phrase combines input and obtaining input problem that prediction obtains so as to improve the flexibility of automatic question answering.

Description

Automatic question-answering method and device
Technical field
This disclosure relates to field of artificial intelligence, in particular to a kind of automatic question-answering method and device.
Background technique
Currently, the semantic complete problem that customer service robot can only be proposed for user is answered, and for some The problem of being omitted according to content above, customer service robot can not then be handled.Such as following dialogue:
Client (user): car owner blocks what material needed
Seat (customer service robot): car owner's card needs xxx material
Client (user): how much is annual fee?
Customer service robot can not according to " how much is annual fee " this be based on above omitted the problem of get corresponding answer It is multiple.
A kind of settling mode for such issues that be directed in the prior art is: go out the theme of current session by template extraction, Then default and this theme is transmitted to next section of dialogue.Such as following dialogue:
Does what material Client (user): car owner block need? (template can extract " car owner's card " as theme, and under transmitting It goes.)
Seat (customer service robot): car owner's card needs xxx material.
Client (user): that tourism card? it (inherits theme above " car owner's card ", customer issue becomes that " car owner blocks that Tourism card? " become the obstructed problem of syntax)
So this kind of method is based on template and rule, still compare very clumsy, covered scene is fewer, it is difficult to expand Exhibition.
Therefore, how allowing customer service robot to answer the problem of being omitted based on content above, there are also to be solved.
Summary of the invention
In order to solve the problems, such as present in the relevant technologies, present disclose provides a kind of automatic question-answering method and devices.
A kind of automatic question-answering method, which comprises
Construct the semantic vector of input problem;
Semantic integrity judgement is carried out to the input problem according to the semantic vector;
It is corresponding above from the input problem by semantic supplement model if the semanteme of the input problem is imperfect Prediction obtains the omission phrase in the input problem in corpus;
It is obtained from Q & A database according to the semantic incomplete input problem and the omission phrase obtained The return information of the input problem.
A kind of automatic call answering arrangement, comprising:
Semantic vector constructs module, is configured as executing: the semantic vector of building input problem;
Semantic integrity judgment module is configured as executing: carrying out language to the input problem according to the semantic vector Adopted integrality judgement;
Phrase prediction module is omitted, is configured as executing: if the semanteme of the input problem is imperfect, being mended by semanteme Mold filling type is predicted to obtain the omission phrase in the input problem from the corresponding corpus above of the input problem;
Return information obtains module, is configured as executing: according to the semantic incomplete input problem and obtained The return information for omitting phrase and obtaining the input problem from Q & A database.
In one embodiment, the semantic vector building module includes:
Participle unit is configured as executing: segmenting to the input problem;
Part-of-speech tagging unit is configured as executing: carrying out part of speech mark to the word in the input problem according to word segmentation result Note, with weight corresponding to each word in the determination input problem;
Semantic vector construction unit is configured as executing: according to coding corresponding to the word in the input problem and The corresponding weight constructs to obtain the semantic vector of the input problem.
In one embodiment, the semantic integrity judgment module includes:
Semantic integrity label prediction unit is configured as executing: using Semantic judgement model according to the semantic vector Prediction obtains the semantic integrity label of the input problem;
Semantic integrity judging unit is configured as executing: judging the input problem according to the semantic complete tag Semanteme it is whether complete.
In one embodiment, described device further include:
Building of corpus module above, is configured as executing: corpus and reply the problem of according to before the input problem Corpus constructs the corresponding corpus above of the input problem.
In one embodiment, the omission phrase prediction module includes:
Vector construction unit is configured as executing: the vector of the building corpus above indicates;
The vector prediction unit for omitting phrase, is configured as executing: using the semantic supplement model according to the semanteme Vector prediction from the expression of the vector of the corpus above obtains vector corresponding to the omission phrase in the input problem;
Phrase determination unit is omitted, is configured as executing: the omission is determined according to vector corresponding to the omission phrase Phrase.
In one embodiment, described device further include:
Sample acquisition module is configured as executing: obtaining several incomplete sample problems of semanteme and the sample problem Sample corpus above, and the province that corresponding sample problem is supplemented according to the sample corpus above of the sample problem Slightly phrase;
Model training module is configured as executing: by the imperfect sample problem of several semantemes and corresponding Sample corpus above, the omission phrase supplemented carry out the training of the semantic supplement model;
Module is completed in training, is configured as executing: when the semantic supplement model in semantic incomplete problem to omitting The prediction of phrase reaches designated precision, completes the training of the semantic supplement model.
In one embodiment, the return information acquisition module includes:
Complete semantic vector construction unit, is configured as executing: according to the semantic incomplete input problem and being obtained The omission phrase obtained constructs the complete semantic vector of the input problem;
Return information matching unit is configured as executing: being matched from Q & A database by the complete semantic vector Obtain the return information of the input problem.
A kind of automatic call answering arrangement, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing above-described automatic question-answering method.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Above-described automatic question-answering method is realized when row.
The technical scheme provided by this disclosed embodiment can include the following benefits: using the method for deep learning, For the problem that semantic incomplete input problem carries out omitting phrase prediction, input is combined according to the omission phrase that prediction obtains The return information for obtaining input problem improves user experience, especially manually so as to improve the flexibility of automatic question answering Customer service robot in technical field of intelligence.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and in specification together principle for explaining the present invention.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure;
Fig. 2 is a kind of block diagram of server for answering question shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of automatic question-answering method shown according to an exemplary embodiment;
Fig. 4 is the flow chart of step S110 in embodiment illustrated in fig. 3;
Fig. 5 is the flow chart of step S130 in embodiment illustrated in fig. 3;
Fig. 6 is the flow chart of step S150 in embodiment illustrated in fig. 3;
Fig. 7 is a kind of flow chart of the automatic question-answering method shown according to another exemplary embodiment;
Fig. 8 is the flow chart of step S170 in Fig. 3 corresponding embodiment;
Fig. 9 is a kind of block diagram of automatic call answering arrangement shown according to an exemplary embodiment;
Figure 10 is a kind of block diagram of the automatic call answering arrangement shown according to another exemplary embodiment.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure.The implementation environment includes: server for answering question 200 With at least one terminal 100.
Wherein terminal 100 can be smart phone, tablet computer, laptop, desktop computer etc. and can take with question and answer Business device establishes network connection and can run the electronic equipment of client, herein without specifically limiting.Terminal 100 and question and answer take Wireless or wired network connection has been pre-established between business device 200, thus, pass through the client run on the terminal 100 Realize that terminal 100 is interacted with server for answering question 200.
Based on the interaction between server for answering question 200 and terminal 100, server for answering question 200 can get user and exist Then the problem of inputting in terminal 100 carries out semantic vector building for this problem, semantic integrity judges, it is pre- to omit phrase Survey and match return information etc..Terminal 100 can receive the matched return information of server for answering question institute, and be in by return information User is now given, to realize that the problem of inputting automatically to user is answered.
Fig. 2 is a kind of block diagram of server for answering question shown according to an exemplary embodiment.Clothes with this hardware configuration Business device can be used for carrying out automatic question answering and being deployed in implementation environment shown in FIG. 1.
It should be noted that the server for answering question is the example for adapting to the disclosure, must not believe that there is provided To any restrictions of disclosure use scope.The server for answering question can not be construed to the Fig. 2 that needs to rely on or must have Shown in one or more component in illustrative server for answering question 200.
The hardware configuration of the server for answering question can generate biggish difference due to the difference of configuration or performance, such as Fig. 2 institute Show, server for answering question 200 includes: power supply 210, interface 230, at least a memory 250 and an at least central processing unit (CPU,Central Processing Units)270。
Wherein, power supply 210 is used to provide operating voltage for each hardware device on server for answering question 200.
Interface 230 includes an at least wired or wireless network interface 231, at least a string and translation interface 233, at least one defeated Enter output interface 235 and at least USB interface 237 etc., is used for and external device communication.
The carrier that memory 250 is stored as resource, can be read-only memory, random access memory, disk or CD Deng the resource stored thereon includes operating system 251, application program 253 and data 255 etc., and storage mode can be of short duration It stores or permanently stores.Wherein, operating system 251 be used to manage and control each hardware device on server for answering question 200 with And application program 253 can be Windows to realize calculating and processing of the central processing unit 270 to mass data 255 ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..Application program 253 be based on operating system 251 it The upper computer program for completing at least one particular job, may include an at least module (being not shown in Fig. 2), each module The series of computation machine readable instruction to server for answering question 200 can be separately included.Data 255 can be stored in disk In Q & A database etc..
Central processing unit 270 may include the processor of one or more or more, and be set as through bus and memory 250 communications, for the mass data 255 in operation and processing memory 250.
As described in detail above, the server for answering question 200 for being applicable in the disclosure will be read by central processing unit 270 to be deposited The form of the series of computation machine readable instruction stored in reservoir 250 completes automatic question-answering method.
In the exemplary embodiment, server for answering question 200 can be by one or more application specific integrated circuit At (Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor, digital signal Manage equipment, programmable logic device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components It realizes, for executing following methods.Therefore, realize that the present invention is not limited to any specific hardware circuit, software and the two Combination.
Fig. 3 is a kind of flow chart of automatic question-answering method shown according to an exemplary embodiment.The automatic question-answering method It can be adapted in the server for answering question 200 of implementation environment shown in Fig. 1, executed by server for answering question 200, may include following step It is rapid:
Step S110 constructs the semantic vector of input problem.
User inputs problem on the terminal 100, and the input that then server for answering question 200 obtains user from terminal 100 is asked Topic, and for the semantic vector of acquired input problem building input problem.
Wherein input problem is the problem of user is inputted on the terminal 100, for different application scenarios, inputs problem Can be aiming at the problem that different field, such as in the application scenarios of bank, input problem can be about bank card, storage, The problem of the correlation such as loan, interest;In the application scenarios of insurance, input problem, which can be, the phases such as handles about insurance, settles a claim The problem of pass, naturally it is also possible to be the comprehensive problem of multiple fields, be student such as user, input problem can be pass In the comprehensive encyclopaedic knowledge the problem of.Herein without specifically limiting.
Wherein, it is worth noting that, scene of the automatic question-answering method of the disclosure especially suitable for more taking turns question and answer.
Semantic vector refers to by constructed by the corresponding coding of word each in input problem and the corresponding weight of each word Vector, which is used to indicate the semanteme of input problem.In a sentence, each word is to the semantic of sentence in sentence Percentage contribution is different.Such as in " handle safety car owner and block which material needed " this problem, " handling " " car owner's card " " material Material " is bigger to the semantic percentage contribution of entire problem, so weight corresponding to three words is bigger, and " safety ", " needs " " which " these words are slightly smaller to the semantic percentage contribution of entire problem, so the corresponding weight of those words is smaller.
For a text processing system, a text database can be constructed.Such as it can be constructed in disclosed method The return information (answer) of one Q & A database, the problem of may being asked which includes several users and problem.Certainly, should Q & A database is for constructed by scene applied by automatic question answering, such as the application scenarios of insurance, the question and answer number According to library the problem of included and the return information of problem is for insurance related information.So for different application scenarios, The problem of including in question and answer data has differences.
It include a dictionary in Q & A database for these problems and return information, which is used for these problems With the word in return information encoded and problem or return information in each word configure corresponding weight.To connect , can be according to the dictionary of Q & A database after the input problem for having received user, the coding of word and input are asked in input problem The semantic vector of the weight building input problem of each word in topic.
In a particular embodiment, each word is corresponding is encoded to real number, i.e., indicates the word in sentence, word institute with number Corresponding weight is also real number, thus, it is finally a real vector for semantic vector constructed by input problem.
In one exemplary embodiment, as shown in figure 4, step S110 includes:
Step S111 segments input problem.
Wherein, participle refers to the word for being divided into several to be arranged in order input problem, such as " handles safety car owner Which material card needs " it can segment as " handle ^ safety ^ car owner and block ^ needs which ^ material of ^ ".
Participle can using segmentation methods carry out, such as can using based on string matching segmenting method, based on reason The segmenting method of solution or segmenting method scheduling algorithm based on statistics, herein without limiting.
Step S112 carries out part-of-speech tagging to the word in input problem according to word segmentation result, to determine in input problem Weight corresponding to each word.
Part-of-speech tagging refers to the syntactic position according to each word in input problem and the mark of attribute progress, such as locates Subject position word, be in the word of predicate position, be in the word of object position;Such as noun (refer to name word, refer to name word, Time noun, place noun etc.), verb, the parts of speech such as negative word, it is certainly above be only it is exemplary enumerate, be not construed as pair The limitation of disclosure use scope.
Dictionary in Q & A database mentioned above, to the word weight in each problem or answer in the dictionary Configuration be according to this problem or in answer in syntactic position and the part of speech of the word configured.To basis Part-of-speech tagging as a result, weight corresponding to each word in input problem can be determined.
Step S113 is constructed to obtain to input and be asked according to coding corresponding to the word in input problem and corresponding weight The semantic vector of topic.
Obtaining word segmentation result, so as to according to word segmentation result from the dictionary of Q & A database the corresponding coding of middle word And the semantic vector of the corresponding weight building input problem of word.
Step S130 carries out semantic integrity judgement to input problem according to semantic vector.
Semantic integrity judgement judges whether the semanteme of the input problem is complete by semantic vector.It is wherein semantic endless Whole input problem include for the input problem omitted above, such as subject omissions, object deletion, attribute omission and Other sentence elements omission etc. is answering " vehicle for example, if having asked " car owner blocks what material needed " before the input problem Main card needs ××× material " after, user is also possible to ask " that tourism card? " certainly, with regard to this simple problem " that tourism Card ", the semanteme of the problem is incomplete, if corpus information not above, server for answering question is can not to be asked according to this What topic was replied.
In one exemplary embodiment, can be sentenced by the semantic integrity that the method for deep learning carries out input problem It is disconnected, i.e., Semantic judgement model is constructed using neural network, and the training of Semantic judgement model is carried out using several sample problems, from And Semantic judgement model can be for the semantic whether complete of an input Problem judgment input problem after the completion of training.Tool Body, it may include steps of as shown in figure 5, Semantic judgement model carries out semantic integrity judgement:
Step S131 predicts to obtain the semantic integrity mark of input problem according to semantic vector using Semantic judgement model Label.
Step S132 judges whether the semanteme of input problem is complete according to semantic complete tag.
Wherein semantic integrity label includes for semantic complete label " complete " and for semantic incomplete label " imperfect ".In a specific embodiment, semantic integrity label can be is embodied by encoding, such as is indicated with number 0 Semantic incomplete label " complete " indicates semantic complete label " imperfect " with number 1.So as to according to Semantic judgement The semantic integrity label of model output judge whether the semanteme of input problem is complete.
In one embodiment, it before carrying out semantic integrity judgement using Semantic judgement model, needs to semanteme Judgment models are trained, and are specifically included:
It obtains several sample problems and the semantic integrity of sample problem is marked.Wherein sample problem includes semantic complete Whole sample problem and semantic incomplete sample problem, such as the complete semantic sample problem that do not omit, are saved based on above The semantic sample problem of slightly imperfect.Corresponding, the semantic integrity mark to sample problem includes for semantic endless The mark of whole sample problem and mark for semantic full sample problem.
The training of Semantic judgement model is carried out according to acquired sample problem and corresponding mark.I.e. by sample problem and Corresponding mark is input in Semantic judgement model, and Semantic judgement model can export a semanteme for each sample input problem Integrality label, if semantic integrity corresponding to sample problem indicated by the semantic integrity label exported and mark institute The semantic integrity of instruction is different, then adjusts the parameter of Semantic judgement model, until semantic integrity indicated by the two is identical.
Semantic judgement model after the completion of training can be used in the disclosure inputting the semantic integrity judgement of problem.Having In body embodiment, whether Semantic judgement model trains completion, can be determined by testing, i.e., is different from used in training with several Sample problem tested, if Semantic judgement model is after training directed to semanteme corresponding to test sample problem used The accuracy rate of integrality judgement reaches permissible accuracy, then can stop the training of Semantic judgement model, i.e. Semantic judgement model Training is completed.If accuracy rate does not reach permissible accuracy, continue the training of Semantic judgement model.Certainly, it arranges In addition to the influence of the model structure of Semantic judgement model, the sample problem of training is more, then the standard of Semantic judgement model prediction True rate is higher.
The semantic integrity judgement that input problem is carried out by constructed Semantic judgement model, improves automatic question answering Efficiency, moreover, semantic integrity judgement can be carried out aiming at the problem that different type after Semantic judgement model training, Improve treatment effeciency.
In one exemplary embodiment, if judging that the semanteme of input problem is complete according to Semantic judgement model, root The return information of input problem is matched from Q & A database according to the semantic vector of input problem.
Step S150, if input problem semanteme it is imperfect, by semantic supplement model from input problem it is corresponding on Prediction obtains the omission phrase in input problem in literary corpus.
Wherein semantic supplement model is carried out that is, by the way of deep learning defeated by model constructed by neural network Enter to omit the prediction of phrase in problem, so as to avoid carrying out the automatic question answering mode of theme transmitting, Ke Yiti according to template The flexibility of high automatic question answering.
In one exemplary embodiment, before executing step S150, further includes:
The problem of according to before input problem corpus with reply the corresponding corpus above of corpus building input problem.
As indicated above, the automatic question-answering method of the disclosure is suitable for carrying out the scenes for taking turns question and answer more, is taking turns more In question and answer scene, if there is omitting in input problem, generally be directed to being omitted above, so being directed to an input problem has pair The corpus above answered.The corpus above is the problem of proposition by user before input problem and server for answering question is according to user The problem of before the problem of return information that institute's proposition problem is made is constituted, and user proposes before input problem, that is, input problem language Material, the reply corpus before the return information i.e. input problem that server for answering question is made according to the proposed problem of user.
In one embodiment, under conditions of guaranteeing the precision of prediction to the omission phrase in input problem, in order to Reduce the operand of semantic supplement model, general upper two problems and the corresponding reply of upper two problems for utilizing input problem Construct the corresponding corpus above of input problem.Thus after the return information for being matched to input problem in Q & A database, Corpus above is updated, i.e., will reply the input problem completed and corresponding return information adds in corpus above, and The problem of distance input problem proposes earliest in corpus above and corresponding return information, are removed from corpus above, Using updated corpus above as the corpus above of next input problem.
In one embodiment, use deep learning model carry out omit phrase prediction can be as shown in fig. 6, step S150 Include:
Step S151, the vector for constructing corpus above indicate.
As described above, the problem of corpus is by before input problem above corpus and reply corpus are constituted.Such as follows Dialogue in:
Client (user): car owner blocks what material needed
Seat (customer service robot): car owner's card needs ××× material
Client (user): how much is annual fee
It is so directed to " how much is annual fee " of user this problem, the corpus above of the problem can be by " it is assorted that car owner blocks needs Material " and " car owner's card needs ××× material " this basket corpus and reply corpus are constituted.Certainly in more wheels In question and answer, the corpus above for inputting problem can be by multiple groups question and answer corpus (problem corpus and the reply language before input problem Material) it constitutes.
Using mode identical with the building semantic vector of input problem, the vector for constructing corpus above is indicated i.e. to upper The problems in literary corpus corpus and reply corpus construct complete semantic vector.
Step S152, using semantic supplement model according to semantic vector from the vector of corpus above expression in predict to obtain Vector corresponding to omission phrase in input problem.
Semantic vector of the semantic supplement model according to input problem, the thinking understood using reading, by the language for the problem that inputs Adopted vector combines with the expression of the vector of corpus above, related to the word in input problem from being matched in corpus above The part of connection, so that prediction obtains omitting vector corresponding to phrase in input problem.
In one exemplary embodiment, semantic supplement model can use R-net model.Wherein R-net is mentioned by Microsoft The neural network model that understanding is read for machine out.In the disclosure, R-net model is creatively used for automatic question answering The prediction of omission phrase in the process, so that the flexibility and efficiency of automatic question answering are improved, so that customer service robot can be to base It is replied in the input problem omitted above.
R-net model includes four layers, and wherein tier I is used to construct the semantic vector of input problem and corpus above, i.e., The semantic vector of input problem mentioned above and the vector of corpus above indicate;Tier ii is used to input the semanteme of problem Vector is compared with the expression of the vector of corpus above, to find out or phase associated with input problem in corpus above As phrase;The associated or similar phrase that layer III compares tier ii is placed on above by attention mechanism It is compared in corpus, so that navigating to may be several phrases for omitting phrase;If Section IV layer is according to being navigated to Vector corresponding to dry phrase carries out classification prediction, i.e. classification prediction obtains vector corresponding to each phrase in several phrases For the probability for omitting vector corresponding to phrase, then the probability of vector corresponding to each phrase in several phrases is compared Compared with using vector corresponding to the phrase of maximum probability as vector corresponding to omission phrase.
Step S153 determines omission phrase according to vector corresponding to phrase is omitted.
Certainly, semantic supplement model also needs to be trained semantic supplement model before being used to omit the prediction of phrase, So in one exemplary embodiment, as shown in fig. 7, before step S150, further includes:
Step S011 obtains the sample corpus above of the incomplete sample problem of several semantemes and sample problem, and The omission phrase that corresponding sample problem is supplemented according to the sample of sample problem corpus above.
Step S012 by the imperfect sample problem of several semantemes and corresponding sample corpus above, is supplemented Omit phrase carry out semantic supplement model training.
Wherein the training process in step S012 includes:
Each sample problem and corresponding sample corpus above are input in semantic supplement model, prediction obtains sample Omission phrase in this problem.
According to the omission phrase supplemented sample problem, the model parameter of semantic supplement model is adjusted, until measuring in advance To omission phrase it is identical as the omission phrase supplemented.
Step S013, when semantic supplement model reaches specified essence to the prediction for omitting phrase in semantic incomplete problem Degree completes the training of semantic supplement model.
Step S170 is obtained from Q & A database according to semantic incomplete input problem and omission phrase obtained The return information of input problem.
Some problem corpus is stored in Q & A database and replies corpus, according to input problem and omission obtained Phrase can correspond to the complete semanteme for the problem of determining user is inputted, and then according to complete and match from Q & A database Corpus is replied as the return information to input problem.In a particular embodiment, if what the creation of Q & A database can collect Dry problem and corresponding answer to create, or collection problem on the basis of, problem is converted to obtain multiple open up Exhibition problem, because user is different, the mode putd question to for same problem is also different.Certainly, for disclosure automatic question answering The problem of field of system application is different, collected and corresponding answer be not also identical, for example, in the application scenarios of insurance In, the problems in Q & A database corpus and reply corpus for insuring related service, such as the classification of insurance, risk, Claims Resolution, expense of insurance of insurance etc..
In one exemplary embodiment, as shown in figure 8, step S170 includes:
Step S171 constructs the complete of input problem according to semantic incomplete input problem and the phrase obtained that omits Semantic vector.
Step S172 is matched from Q & A database by complete semantic vector and is obtained the return information of input problem.
By the technical solution of the disclosure, by the way of deep learning, the omission phrase in input problem is divided Class prediction, so as to understand the complete semanteme of input problem according to the omission phrase that prediction obtains during automatic question answering, It is replied, the flexibility and efficiency of automatic question answering is improved, so as to improve user experience.
Following is embodiment of the present disclosure, can be used for executing the automatic of the above-mentioned execution of server for answering question 200 of the disclosure Answering method embodiment.For those undisclosed details in the apparatus embodiments, it is real to please refer to disclosure automatic question-answering method Apply example.
A kind of automatic call answering arrangement, as shown in Figure 9, comprising:
Semantic vector constructs module 110, is configured as executing: the semantic vector of building input problem.
Semantic integrity judgment module 130, the module connect with semantic vector building module 110, are configured as executing: root Semantic integrity judgement is carried out to input problem according to semantic vector.
Phrase prediction module 150 is omitted, which connect with semantic integrity judgment module 130, be configured as executing: such as The semanteme that fruit inputs problem is imperfect, predicts to obtain from the corresponding corpus above of input problem by semantic supplement model defeated Enter the omission phrase in problem.
Return information obtains module 170, which connect with phrase prediction module 150 is omitted, be configured as executing: according to Semantic incomplete input problem and the return information obtained for omitting phrase and obtaining input problem from Q & A database.
The automatic call answering arrangement of the disclosure can be applied to the customer service robot of different application scene, ask automatically user Topic is replied, and so as to improve the flexibility of customer service robot, improves user experience.
In one embodiment, semantic vector building module 110 includes:
Participle unit is configured as executing: segmenting to input problem.
Part-of-speech tagging unit is configured as executing: part-of-speech tagging is carried out to the word in input problem according to word segmentation result, with Determine weight corresponding to each word in input problem.
Semantic vector construction unit is configured as executing: right according to coding corresponding to the word in input problem and institute The weight answered constructs to obtain the semantic vector of input problem.
In one embodiment, semantic integrity judgment module 130 includes:
Semantic integrity label prediction unit is configured as executing: being predicted using Semantic judgement model according to semantic vector Obtain the semantic integrity label of input problem.
Semantic integrity judging unit is configured as executing: the semanteme for judging input problem according to semantic complete tag is It is no complete.
In one embodiment, automatic call answering arrangement further include:
Building of corpus module above, is configured as executing: corpus and replying corpus the problem of according to before input problem Construct the corresponding corpus above of input problem.
In one embodiment, omitting phrase prediction module 150 includes:
Vector construction unit is configured as executing: the vector for constructing corpus above indicates.
The vector prediction unit for omitting phrase, is configured as executing: using semantic supplement model according to semantic vector from upper Prediction obtains vector corresponding to the omission phrase in input problem in the vector expression of literary corpus.
Phrase determination unit is omitted, is configured as executing: determining omission phrase according to vector corresponding to phrase is omitted.
In one embodiment, automatic call answering arrangement further include:
Sample acquisition module is configured as executing: obtaining the sample of the incomplete sample problem of several semantemes and sample problem This corpus above, and the omission phrase that corresponding sample problem is supplemented according to the sample corpus above of sample problem.
Model training module is configured as executing: passing through the imperfect sample problem of several semantemes and corresponding sample The training of corpus, the omission phrase progress semantic supplement model supplemented above.
Module is completed in training, is configured as executing: when semantic supplement model is to omitting phrase in semantic incomplete problem Prediction reach designated precision, complete the training of semantic supplement model.
In one embodiment, return information acquisition module 170 includes:
Complete semantic vector construction unit, is configured as executing: according to semantic incomplete input problem and obtained Omit the complete semantic vector of phrase building input problem.
Return information matching unit is configured as executing: being matched and is obtained from Q & A database by complete semantic vector The return information of input problem.
Modules/unit function and the realization process of effect are specifically detailed in above-mentioned automatic question-answering method in above-mentioned apparatus The realization process of middle corresponding step, details are not described herein.
It is appreciated that these modules can by hardware, software, or a combination of both realize.When realizing in hardware When, these modules may be embodied as one or more hardware modules, such as one or more specific integrated circuits.When with software side When formula is realized, these modules may be embodied as the one or more computer programs executed on the one or more processors, example The program being stored in as performed by the central processing unit 270 of Fig. 2 in memory 250.
Optionally, the disclosure also provides a kind of automatic call answering arrangement, which can be used for implementing shown in Fig. 1 In the server for answering question 200 of environment, for executing all or part of step of any of the above automatic question-answering method embodiment.Such as Shown in Figure 10, which includes:
Processor 1001, and
Memory 1002 for 1001 executable instruction of storage processor.
Wherein, processor 1001 is configured as executing the method in the above automatic question-answering method embodiment.Executable instruction It can be computer-readable instruction, processor 1001 is read from memory 1002 at work, by bus/data line 1003 Computer-readable instruction executes all or part of step in any of the above automatic question-answering method embodiment.
Modules/unit function and the realization process of effect are specifically detailed in above-mentioned automatic question-answering method in above-mentioned apparatus The realization process of middle corresponding step, details are not described herein.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, computer program is stored thereon with, The automatic question-answering method in any of the above embodiment is realized when computer program is executed by processor.The computer-readable storage medium Memory 250 of the matter for example including instruction, above-metioned instruction can be executed by the central processing unit 270 of server for answering question 200 to complete Above-mentioned automatic question-answering method.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of automatic question-answering method, which is characterized in that the described method includes:
Construct the semantic vector of input problem;
Semantic integrity judgement is carried out to the input problem according to the semantic vector;
If the semanteme of the input problem is imperfect, by semantic supplement model from the corresponding corpus above of the input problem Prediction obtains the omission phrase in the input problem in library;
Described in being obtained from Q & A database according to the semantic incomplete input problem and the omission phrase obtained The return information of input problem.
2. the method according to claim 1, wherein the semantic vector of the building input problem, comprising:
The input problem is segmented;
Part-of-speech tagging is carried out to the word in the input problem according to word segmentation result, with each word in the determination input problem Corresponding weight;
It constructs to obtain the input according to coding corresponding to the word in the input problem and the corresponding weight to ask The semantic vector of topic.
3. the method according to claim 1, wherein it is described according to the semantic vector to the input problem into The judgement of row semantic integrity, comprising:
It is predicted to obtain the semantic integrity label of the input problem according to the semantic vector using Semantic judgement model;
Judge whether the semanteme of the input problem is complete according to the semantic complete tag.
4. the method according to claim 1, wherein it is described by semantic supplement model from the input problem pair Before prediction obtains the omission phrase in the input problem in the corpus above answered, further includes:
The problem of according to before the input problem, corpus with corpus is replied constructed the corresponding corpus above of the input problem.
5. the method according to claim 1, wherein it is described by semantic supplement model from the input problem pair Prediction obtains the omission phrase in the input problem in the corpus above answered, comprising:
The vector for constructing the corpus above indicates;
Using the semantic supplement model according to the semantic vector from the vector of the corpus above expression in predict to obtain Vector corresponding to omission phrase in the input problem;
The omission phrase is determined according to vector corresponding to the omission phrase.
6. the method according to claim 1, wherein it is described by semantic supplement model from the input problem pair Before prediction obtains the omission phrase in the input problem in the corpus above answered, further includes:
The sample corpus above of the incomplete sample problem of several semantemes and the sample problem is obtained, and according to the sample The omission phrase that the sample of this problem corpus above supplements corresponding sample problem;
Pass through several imperfect sample problems of semanteme and corresponding sample corpus above, the omission phrase supplemented Carry out the training of the semantic supplement model;
When the semantic supplement model reaches designated precision to the prediction for omitting phrase in semantic incomplete problem, described in completion The training of semantic supplement model.
7. the method according to claim 1, wherein described according to the semantic incomplete input problem and institute The omission phrase obtained obtains the return information of the input problem from Q & A database, comprising:
The complete of the input problem is constructed according to the semantic incomplete input problem and the omission phrase obtained Semantic vector;
It is matched from Q & A database by the complete semantic vector and obtains the return information of the input problem.
8. a kind of automatic call answering arrangement characterized by comprising
Semantic vector constructs module, is configured as executing: the semantic vector of building input problem;
Semantic integrity judgment module is configured as executing: being carried out according to the semantic vector to the input problem semantic complete Whole property judgement;
Phrase prediction module is omitted, is configured as executing: if the semanteme of the input problem is imperfect, passing through semantic supplement mould Type is predicted to obtain the omission phrase in the input problem from the corresponding corpus above of the input problem;
Return information obtains module, is configured as executing: according to the semantic incomplete input problem and obtained described Omit the return information that phrase obtains the input problem from Q & A database.
9. a kind of automatic call answering arrangement characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to method described in any one of perform claim requirement 1 to 7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The method as described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811192199.7A 2018-10-12 2018-10-12 Automatic question-answering method and device Withdrawn CN109522395A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811192199.7A CN109522395A (en) 2018-10-12 2018-10-12 Automatic question-answering method and device
PCT/CN2018/125252 WO2020073533A1 (en) 2018-10-12 2018-12-29 Automatic question answering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811192199.7A CN109522395A (en) 2018-10-12 2018-10-12 Automatic question-answering method and device

Publications (1)

Publication Number Publication Date
CN109522395A true CN109522395A (en) 2019-03-26

Family

ID=65772381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811192199.7A Withdrawn CN109522395A (en) 2018-10-12 2018-10-12 Automatic question-answering method and device

Country Status (2)

Country Link
CN (1) CN109522395A (en)
WO (1) WO2020073533A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457450A (en) * 2019-07-05 2019-11-15 平安科技(深圳)有限公司 Answer generation method and relevant device based on neural network model
CN110717023A (en) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 Method and device for classifying interview answer texts, electronic equipment and storage medium
CN110956962A (en) * 2019-10-17 2020-04-03 中国第一汽车股份有限公司 Reply information determination method, device and equipment for vehicle-mounted robot
CN111078853A (en) * 2019-12-13 2020-04-28 上海智臻智能网络科技股份有限公司 Question-answer model optimization method and device, computer equipment and storage medium
CN111104503A (en) * 2019-12-24 2020-05-05 华中科技大学 Construction engineering quality acceptance standard question-answering system and construction method thereof
WO2020242383A1 (en) * 2019-05-28 2020-12-03 Active Intelligence Pte Ltd Conversational diaglogue system and method
CN112035636A (en) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 Question-answer management method, device, equipment and storage medium of medical inquiry system
CN112183114A (en) * 2020-08-10 2021-01-05 招联消费金融有限公司 Model training and semantic integrity recognition method and device
CN113282733A (en) * 2021-06-11 2021-08-20 上海寻梦信息技术有限公司 Customer service problem matching method, system, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589844A (en) * 2015-12-18 2016-05-18 北京中科汇联科技股份有限公司 Missing semantic supplementing method for multi-round question-answering system
CN107632979A (en) * 2017-10-13 2018-01-26 华中科技大学 The problem of one kind is used for interactive question and answer analytic method and system
CN107798140A (en) * 2017-11-23 2018-03-13 北京神州泰岳软件股份有限公司 A kind of conversational system construction method, semantic controlled answer method and device
CN108334487A (en) * 2017-07-14 2018-07-27 腾讯科技(深圳)有限公司 Lack semantics information complementing method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589844A (en) * 2015-12-18 2016-05-18 北京中科汇联科技股份有限公司 Missing semantic supplementing method for multi-round question-answering system
CN108334487A (en) * 2017-07-14 2018-07-27 腾讯科技(深圳)有限公司 Lack semantics information complementing method, device, computer equipment and storage medium
CN107632979A (en) * 2017-10-13 2018-01-26 华中科技大学 The problem of one kind is used for interactive question and answer analytic method and system
CN107798140A (en) * 2017-11-23 2018-03-13 北京神州泰岳软件股份有限公司 A kind of conversational system construction method, semantic controlled answer method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020242383A1 (en) * 2019-05-28 2020-12-03 Active Intelligence Pte Ltd Conversational diaglogue system and method
CN110457450A (en) * 2019-07-05 2019-11-15 平安科技(深圳)有限公司 Answer generation method and relevant device based on neural network model
CN110457450B (en) * 2019-07-05 2023-12-22 平安科技(深圳)有限公司 Answer generation method based on neural network model and related equipment
CN110717023A (en) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 Method and device for classifying interview answer texts, electronic equipment and storage medium
CN110717023B (en) * 2019-09-18 2023-11-07 平安科技(深圳)有限公司 Method and device for classifying interview answer text, electronic equipment and storage medium
CN110956962A (en) * 2019-10-17 2020-04-03 中国第一汽车股份有限公司 Reply information determination method, device and equipment for vehicle-mounted robot
CN111078853B (en) * 2019-12-13 2023-05-02 上海智臻智能网络科技股份有限公司 Question-answering model optimization method, device, computer equipment and storage medium
CN111078853A (en) * 2019-12-13 2020-04-28 上海智臻智能网络科技股份有限公司 Question-answer model optimization method and device, computer equipment and storage medium
CN111104503A (en) * 2019-12-24 2020-05-05 华中科技大学 Construction engineering quality acceptance standard question-answering system and construction method thereof
CN112183114A (en) * 2020-08-10 2021-01-05 招联消费金融有限公司 Model training and semantic integrity recognition method and device
CN112183114B (en) * 2020-08-10 2024-05-14 招联消费金融股份有限公司 Model training and semantic integrity recognition method and device
CN112035636A (en) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 Question-answer management method, device, equipment and storage medium of medical inquiry system
CN113282733A (en) * 2021-06-11 2021-08-20 上海寻梦信息技术有限公司 Customer service problem matching method, system, device and storage medium
CN113282733B (en) * 2021-06-11 2024-04-09 上海寻梦信息技术有限公司 Customer service problem matching method, system, equipment and storage medium

Also Published As

Publication number Publication date
WO2020073533A1 (en) 2020-04-16

Similar Documents

Publication Publication Date Title
CN109522395A (en) Automatic question-answering method and device
WO2022007823A1 (en) Text data processing method and device
CN107273503B (en) Method and device for generating parallel text in same language
CN111291570B (en) Method and device for realizing element identification in judicial documents
CN110033022A (en) Processing method, device and the storage medium of text
CN110287489A (en) Document creation method, device, storage medium and electronic equipment
CN109815487A (en) Text quality detecting method, electronic device, computer equipment and storage medium
CN107220220A (en) Electronic equipment and method for text-processing
CN108090218B (en) Dialog system generation method and device based on deep reinforcement learning
CN112988963B (en) User intention prediction method, device, equipment and medium based on multi-flow nodes
CN112800203B (en) Question-answer matching method and system fusing text representation and knowledge representation
CN111695354A (en) Text question-answering method and device based on named entity and readable storage medium
CN113821622B (en) Answer retrieval method and device based on artificial intelligence, electronic equipment and medium
CN110969023B (en) Text similarity determination method and device
CN110245232A (en) File classification method, device, medium and calculating equipment
CN112463989A (en) Knowledge graph-based information acquisition method and system
CN113723077B (en) Sentence vector generation method and device based on bidirectional characterization model and computer equipment
CN110399547A (en) For updating the method, apparatus, equipment and storage medium of model parameter
CN110532562A (en) Neural network training method, Chinese idiom misuse detection method, device and electronic equipment
CN111931503B (en) Information extraction method and device, equipment and computer readable storage medium
CN112749556B (en) Multi-language model training method and device, storage medium and electronic equipment
CN113705207A (en) Grammar error recognition method and device
CN111241843A (en) Semantic relation inference system and method based on composite neural network
CN111723186A (en) Knowledge graph generation method based on artificial intelligence for dialog system and electronic equipment
JP2017538226A (en) Scalable web data extraction

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20190326

WW01 Invention patent application withdrawn after publication