Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouchedThe specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order toConvenient for describing, only the parts related to the present invention are shown rather than entire infrastructure in attached drawing.
It also should be noted that only the parts related to the present invention are shown for ease of description, in attached drawing rather thanFull content.It should be mentioned that some exemplary embodiments are described before exemplary embodiment is discussed in greater detailAt the processing or method described as flow chart.Although operations (or step) are described as the processing of sequence by flow chart,It is that many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be weighedIt is new to arrange.The processing can be terminated when its operations are completed, it is also possible to have the extra step being not included in attached drawingSuddenly.The processing can correspond to method, function, regulation, subroutine, subprogram etc..
The content of embodiment to facilitate the understanding of the present invention, first introduce question and answer knowledge point in intelligent answer andThe related notion of semantic formula is simply introduced:
1, question and answer knowledge point
Question and answer knowledge point most original and simplest form in knowledge base are exactly usually common FAQ, general formIt is that " ask-answer " is right.For example, " rate of CRBT " are exactly that clearly standard asks description for expression.Here " asking " should not be by narrowlyIt is interpreted as " inquiring ", and should broadly understand one " input ", being somebody's turn to do " input " has corresponding " output ".For example, for being used forFor the semantics recognition of control system, the instruction of user, such as " opening radio " should also be understood to be one" asking ", corresponding at this time " answering " can be the calling for executing the control program accordingly controlled.
User to machine when inputting, the most ideal situation is that asked using standard, then the intelligent semantic identifying system of machineAt once it will be appreciated that the meaning of user.However, user often not uses standard to ask, but some deformations that standard is askedForm.For example, if being " changing a radio station " for the standard form of asking of the radio station switching of radio, then user may makeOrder is " switching one radio station ", and what machine was also required to can to identify user's expression is the same meaning.
For intelligent semantic identification, the extension that the standard that needs in knowledge base is asked is asked, which, which asks, asks table with standardThere is slight difference up to form, but expresses identical meaning.
It therefore, include multiple question and answer knowledge points in knowledge base, each question and answer knowledge point includes problem and answer, problem packetThe standard of including, which is asked, asks that the problems in question and answer knowledge point shows generally by the form of semantic formula with multiple extensions.
2, semantic formula
Semantic formula is mainly made of word, part of speech and their "or" relationship, and core depends on " part of speech ", wordClass simply understands to be one group of word for having general character, these words can be similar or dissimilar semantically, these words can alsoIt is important or inessential to be noted as.Semantic formula and user's question sentence relationship and traditional template matching have it is very big notTogether, in conventional template matching, template and user's question sentence are only matched and not matched relationship, and semantic formula and userRelationship is to be indicated by the value (similarity) of quantization, while the value of this quantization is asked to similar question sentence and user between question sentenceSimilarity between sentence can mutually compare.Since semantic formula will participate in together similarity calculation with similar question sentence,So the definition of template grammar is unsuitable complicated, but there are enough ability expression semantic again.
In addition, giving the method for modification setting question answering system, wherein the question and answer system in various embodiments of the present inventionSystem specifically includes:
Question and answer process module corresponding with question and answer flow chart includes multiple graphic assemblies in the question and answer flow chart, describedGraphic assembly includes: at least one transaction node, and the transaction node is related to the setting service interface of type of service is executedConnection;
The thematic knowledge point being stored in the knowledge base, the thematic knowledge point include problem of subject and theme answer,The problem of subject is for indicating and the trigger condition of the matched question and answer process module of question answering system, the theme answerFor establishing the triggering relationship of the thematic knowledge point and the question and answer process module.
Further, the question answering system further include:
It is stored in the knowledge point corresponding with transaction node is set in the question and answer process module in the knowledge base;WithThe corresponding knowledge point of the transaction node includes: transaction issues and transaction answer, and the transaction answer includes: connected transaction sectionPoint, the type of at least one incoming parameter, the type of at least one default parameters, and the type with the default parametersThe rhetorical question content matched;
The transaction issues are matched for inputting information with received user;
The type of the incoming parameter, the type for inputting the dynamic variable for including in information with the user carry outMatching;The type of the default parameters and rhetorical question content with the type matching of the default parameters, for it is determining with it is describedUser inputs the corresponding rhetorical question content of type of institute's default parameters in information;The connected transaction node, for determining the useThe incoming transaction node of the dynamic variable for including in family input information.
Further, question and answer process module corresponding with question and answer flow chart, specifically includes:
It is generated matched with the question and answer flow chart according to each graphic assembly for including in the question and answer flow chartStandardized codes frame;And
According to each graphic assembly in the question and answer flow chart is matched custom-configures information, it is generatedIt is corresponding with each graphic assembly, it makes an addition in the standardized codes frame and at the associated position of graphic assemblyCustom code;
Wherein, and the matched information that custom-configures of the transaction node includes: service call corresponding with transaction nodeAddress, the service call address are directed toward and the associated service interface of the transaction node.
In order to make it easy to understand, the generation method of above-mentioned question answering system is simply introduced first.
Fig. 1 a is the flow chart of the generation method of above-mentioned question answering system, and the present embodiment is applicable to according to question and answer flow chartThe case where generating question answering system, the question answering system specifically refer to that the system that question and answer interact, the party can be carried out with interactive userMethod can be executed by question and answer system, and the mode which can be used software and/or hardware is realized, and generally can integrateIn terminal device or server for generating question answering system.As shown in Fig. 1 a, the method for the present embodiment is specifically included:
S110, patterned one or more question and answer flow charts are obtained.
The question and answer flow chart specifically can be selection and combine each graphical set provided in setting process editing interfacePart, obtained patterned flow chart.
Wherein, graphic assembly may include node and connector (typical, the connection for connecting different nodesLine).It include one or more transaction node in the node.
The transaction node, it is associated with the setting service interface of type of service is executed, the transaction is input to for basisThe dynamic variable construction Transaction Information of node is sent to associated service interface, and receives the transaction of the service interface feedbackProcessing result.
The service interface is obtained at corresponding transaction for the Transaction Information according to input by itself processing logicReason as a result, for example, one for completing the scheduled service interface of meeting room, may be implemented according to the predetermined ginseng of the meeting room of inputNumber (such as: XX time and XX meeting room) it is used as Transaction Information, the predetermined behaviour to meeting room is completed by itself processing logicMake, and returns and make a reservation for successfully or make a reservation for unsuccessfully wait meeting rooms predetermined result as trading processing result;Alternatively, one is used forThe service interface for completing meeting room inquiry, may be implemented according to the meeting room query argument of input (such as: XX time, XX peopleCount, with or without the meeting room of projector) it is used as Transaction Information, it is completed by itself processing logic to available conference roomInquiry operation, and the meeting room information for meeting querying condition is returned as trading processing result.
By above-mentioned analysis it is found that if necessary to be had been carried out using one or more in a question answering systemService function, such as: meeting room is predetermined, network orders train or plane ticket or hospital registers, and can be traded by introducingThe mode of node, calling and the matched service interface of the service function, without repeating to write in the question answering system or moveProgram code corresponding in required service function is planted, under the premise of streamlining procedures code significantly, reduces and realizes the question and answerWorkload needed for system.
In addition, it should be noted that, a service interface that can be called by transaction node, is also possible to based on oneIt include that the process codes that automatically generate of service flow diagram of multiple nodes realizes that above-mentioned service flow diagram and the present invention are realThe difference for applying the question and answer flow chart in example essentially consists in, and the question and answer flow chart of the embodiment of the present invention is in process implementation procedure, rootIt is interacted according to question and answer are carried out with user, according to the content that user inputs, the difference of control question and answer flow chart interior joint is moved towards, and rightIt for a service flow diagram, only needs to start in process, receives one or more Transaction Information, be later exactly to pressIt is executed according to the set execution sequence of the service flow diagram, inputs any content again without user.
For the overall structure of question and answer flow chart, a question and answer flow chart may include having a root nodes stand streamThe beginning of journey, one or more terminal nodes represent the end of process.It is, of course, understood that the node is in addition to can be withIt can also include interaction node, casting node, variable setting node or record except one or more transaction nodeIn syllable point one or more etc., the present embodiment is not limited thereto, in general, in a question and answer flow chartRoot node be transaction node or interaction node, terminal node be casting node.
In order to make it easy to understand, showing a kind of patterned question and answer flow chart in Figure 1b.As shown in Figure 1 b, described to askAnswer graphic assembly oval in flow chart be transaction node (such as: the predetermined section of meeting room query node 101 and meeting room105), rectangular graphic assembly is casting node (such as: broadcasting predetermined successful node 106) to point, and the graphic assembly of diamond shape is to hand overMutual node (such as: ask whether to determine destined node 104).Pass through the connecting line (example of node-to-node between each nodeSuch as, connecting line A and connecting line B) it is connected.Wherein, about interaction node and broadcast node related notion will below intoRow is introduced.
S120, according to each graphic assembly for including in each question and answer flow chart, generate and the question and answer flow chartThe standardized codes frame matched, wherein the graphic assembly includes: at least one transaction node, the transaction node and executionThe service interface for setting type of service is associated.
Therein it is proposed that a kind of question and answer process module that can be automatically generated.Correspondingly, being provided previously and different typeThe standard implementation code that graphic assembly matches, such as: it is right respectively with transaction node, casting node and casting node to establishThe standard implementation code wrap answered in different library files, and pre-establish standard implementation code and corresponding graphic assembly itBetween corresponding relationship.Typically, it can be previously written in the process editing interface and the matched standardization of each graphic assemblyIt realizes the storage address (or reference address) of code, is asked correspondingly, can be directed to based on what the process editing interface was drawnEach graphic assembly for including in flow chart is answered, the automatic corresponding matched standardized codes frame of generation.
It should be noted that the embodiment of the present invention is concern is primarily with including the answering method of transaction node, therefore,It include one or more transaction node in question and answer flow chart, still, any class theoretically may be implemented in above-mentioned technical proposalCorresponding standardized codes frame can be obtained as long as drawing corresponding flow chart as needed in the question and answer of type, and in turnTo corresponding process module.
S130, according to each graphic assembly in the question and answer flow chart is matched custom-configures information, generateCustom code corresponding with each graphic assembly makes an addition in the standardized codes frame to be associated with graphic assemblyPosition at, to generate corresponding with question and answer flow chart question and answer process module.
It is understood that only including corresponding graphic assembly with the matched standard implementation code of each graphic assemblyThe general utility functions that can be realized.Such as: it is directed to a transaction node, includes parameter transmitting in corresponding standard time codeLogic for an interaction node include decision logic in corresponding standard implementation code, or for a castingNode includes casting logic etc. in corresponding standard implementation code.In order to enable a graphic assembly can be realized difference and askThe different function for assigning it in flow chart is answered, needs to input and custom-configures parameter accordingly.
It cites a plain example, does not find meeting room node 102 for the casting in Fig. 1 b, need to broadcast and not findMeeting room node 102 in a triggered, can broadcast content " not finding meeting room ", correspondingly, above-mentioned " not finding meeting room "Casting content, exactly to casting do not find meeting room node 102 imparting function, in order to enable casting do not find meeting roomNode 102 can be realized above-mentioned function, need that the standardization generation is added using above-mentioned casting content as information is custom-configuredIt is not found at the corresponding code position of meeting room node 102 in code frame with casting.
Typically, blank generation can be reserved with the setting position in the matched standard implementation code of each graphic assemblyCode section is being obtained for the graphic assembly input in question and answer flow chart when custom-configuring parameter (for example, passing through streamThe parameter configuration interface input that journey editing interface provides), the matched custom code addition pair of parameter is custom-configured by describedIn the blank code segment answered, to realize customized graphic assembly function.
Optionally, information (such as: not finding meeting room) will can be custom-configured directly as the custom codeIt makes an addition in the standardized codes frame, can also be set according to what user selected in custom-configuring information input templateDetermine content (for example, transferring mode for the interface of transaction node selection), what matching was write in advance custom-configures letter with differenceIt ceases matched custom code to make an addition in the standardized codes frame, the present embodiment is to this and is not limited.
Correspondingly, if completing customized setting to the whole graphic assemblies for including in a question and answer flow chart,The realization code that can be realized the question and answer flow chart function can be generated, namely: generate question and answer described in the embodiment of the present inventionProcess module.
It is wherein, associated with the setting service interface of type of service is executed due to transaction node, with the transactionThe information that custom-configures of node matching includes: service call corresponding with transaction node address, and the service call address refers toTo with the associated service interface of the transaction node.
Wherein, when the transaction node in the question and answer process module is triggered, the transaction node is according to inputAt least one dynamic variable construction Transaction Information to own node is sent to corresponding service call address, and by the clothesBusiness call address feedback trading processing result be back to the question and answer process module so that the question and answer process module according toThe trading processing result continues to execute.
It should be noted that when a transaction node is triggered, what which obtained, it is input to own nodeOne or more dynamic variable can be from extracting (for example, the meeting room query node in Fig. 1 b in customer interaction information101), be also possible to pass over from the upstream node in question and answer process module (for example, the predetermined section of meeting room in Fig. 1 bPoint is 105).
It distinguishes, if in question and answer process module transaction node needs extract one from customer interaction informationA or multiple dynamic variables are then needed in the corresponding relationship established between the transaction node and a knowledge point in knowledge base,Wherein, knowledge point (being hereinafter knowledge point of trading) corresponding with transaction node includes transaction issues and transaction answer.
Wherein, it is matched by the way that user is inputted information with transaction issues, it can be in successful match, in conjunction with transactionAnswer is supplied to the transaction node using one or more corresponding dynamic variable as Transaction Information;If question and answer processA transaction node in module needs the upstream node from the question and answer process module to extract one or more dynamic changeAmount is then not necessarily to establish the corresponding relationship of the transaction node and a transaction knowledge point in knowledge base, as long as in the question and answer processIn module, reasonable design cycle code be can be realized.Therefore, can in practical applications, determine according to actual needs whetherNeed to establish the corresponding relationship between the knowledge point in transaction node and knowledge base.
Further, it is contemplated that service interface can received Transaction Information have predetermined format requirement, therefore, canInformation is inputted to require user to input the user including dynamic variable according to the data format that the service interface can identify, andThe dynamic variable of input can and then be sent to service corresponding with service interface directly as Transaction Information and adjusted by transaction nodeUse address;In addition, it is contemplated that question and answer process module needs to reduce as far as possible for the usage experience of further satisfaction userTo the input requirements of user, therefore, the dynamic variable for being unsatisfactory for service interface requirement that can will be received at transaction nodeIt is converted to and meets the Transaction Information of service interface requirement and be sent to service call corresponding with service interface address.
Correspondingly, the information that custom-configures can also include: corresponding with the first transaction node to enter to join defined item;It is described enter to join defined item include that at least one enters to join title, and enters to join the parameter that enters of name-matches with described, it is described enter ginsengThe parameter name that the entitled associated service interface of first transaction node can identify, it is described enter parameter be input toThe dynamic variable of first transaction node matches;Wherein, the Transaction Information includes: described to enter to join title and describedEnter parameter.
Wherein, a kind of schematic diagram for custom-configuring information for inputting transaction node is shown in figure 1 c.Such as Fig. 1 c instituteShow, can be inputted in a meeting room query node (such as: the meeting room query node 101 in Fig. 1 b) call address itemIt is directed toward the service call address with the associated service interface of the transaction node;It can be inputted accordingly entering to join in defined itemEnter to join title (such as: startime and overtime), it is above-mentioned enter to join title be the parameter name that the service interface can identifyClaim, and this enter to join in defined item input accordingly enter parameter (such as: " $ { meeting start time } " and $ { meeting knotThe beam time }).It is above-mentioned enter parameter match with the dynamic variable for being input to the meeting room query node.
More specifically, in conjunction with Fig. 1 b, the user that this transaction node of meeting room query node 101 obtains inputs information are as follows:" the time of meeting be 9:00 to 11:00 ", by by the user input information with it is right with meeting room query node 101 in knowledge baseThe transaction knowledge point answered is matched, and dynamic variable is obtained are as follows: meeting start time=9:00, meeting adjourned time=11:00;Dynamic variable meeting start time=the 9:00, meeting adjourned time=11:00 are configured to transaction letter by transaction nodeBreath, namely: startime=9:00;This service interface for being used to complete meeting room inquiry of overtime=11:00 can be knownOther variable format.Later transaction node by the Transaction Information with being sent to a service call corresponding with the service interfaceBehind location, namely: http://voadev.sh.xaioi.com can receive the meeting room inquiry of service call address returnAs a result.
S140, the addition thematic knowledge point corresponding with each question and answer process module in knowledge base, the theme are knownKnowing point includes problem of subject and theme answer, and the problem of subject is used to indicate the trigger condition of question and answer process module, the masterTopic answer is used to establish the triggering relationship of the thematic knowledge point and the question and answer process module.
Wherein, after generating question and answer process module (code for realizing question and answer flow chart), in order to realize to the question and answerThe normal use of process module needs the further addition theme corresponding with each question and answer process module in knowledge baseKnowledge point.
It should be noted that above scheme, which gives one kind, firstly generates question and answer process module, theme is resettled later and is knownKnow the implementation of point, and it will be appreciated by persons skilled in the art that the establishment process of thematic knowledge point can not limit toIt executes in after generating question and answer process module, here and is not limited thereof.For example, thematic knowledge can be initially set upPoint resettles corresponding question and answer process module etc. later.
In fact, thematic knowledge point and the difference of the question and answer knowledge point in knowledge base are: when user inputs information and asksWhen answering the matching of the problems in knowledge point, the answer of the question and answer knowledge point can be directly exported, or execute and the answer contentThe calling for the control program matched, and when user inputs information and matches with the problem of subject of a thematic knowledge point, then it can correspond toTrigger the question and answer process module (for example, the root node for directly triggering the question and answer process module).
Typically, the theme answer in a thematic knowledge point can be the corresponding question and answer process mould of thematic knowledge pointThe information of the question and answer process module can be accurately positioned in storage address or call address of block etc..
The generation method of above-mentioned question answering system by patterned question and answer flow chart and is directed to the question and answer flow chartIn each graphic assembly setting custom-configure information, can be automatically generated for realizing the question and answer flow chart functionCan question and answer process module, later by adding thematic knowledge corresponding with each question and answer process module in knowledge baseThe mode of point, can flexibly realize the use to the question answering system generated based on the question and answer process module, give a kind of logicalThe answering method that the mode of What You See Is What You Get can be realized is crossed, the implementation of existing question answering system is optimized, in addition, logicalIt crosses and introduces transaction node in graphic assembly, may be implemented to obtain business to functional or service a quick callingRequired service attribute in process avoids and realizes that the repetition of the code of identical function is write or transplanted, ensure that question and answerSystem realizes the terseness of code, reduces the workload and error probability of developer, realizes the fast of question answering systemSpeed building and update, avoid and introduce developer in question answering system generating process, greatly reduce the work of developerIt measures, reduces costs, improve accuracy rate and efficiency.
Further, as previously mentioned, if a transaction node in question and answer process module is needed from customer interaction informationMiddle one or more dynamic variable of extraction, the then answering method further include: established and the transaction node pair in knowledge baseThe transaction knowledge point answered.Wherein, the transaction knowledge point includes: transaction issues and transaction answer.
The transaction issues for being matched with the Transaction Information being input in the transaction node, answer by the transactionCase generates dynamic and becomes for being combined at least one parameter transaction extracted from the successful Transaction Information of fuzzy matchingAmount.Wherein, a kind of data structure of knowledge point of trading has been shown in table 1.
Table 1
As shown in table 1, need to extract the transaction section of one or more dynamic variable from customer interaction information at oneWhen point (for example, meeting room query node 101 in Fig. 1 b) is triggered, user is inputted into information friendship corresponding with the transaction nodeEasy problem is matched (typical, fuzzy matching), if successful match, according to the transaction issues, determine the time, person-timeAnd the particular content (actual content for the dynamic variable for including in transaction issues) of conference type, and by above-mentioned particular contentIt is combined with transaction answer, obtains complete dynamic variable and feed back to corresponding meeting room query node 101 (that is, correspondingMeeting room in transaction answer inquires this nodename).
More specifically, if inputting information for the user that meeting room query node 101 in Fig. 1 b obtains are as follows: " I will look intoAsk 9 points to 12 points of a tomorrow morning, 3 individual demands have the meeting room of projector ", by by above-mentioned user input information withTransaction knowledge point described in table 1 is matched, and determining person-time is 3, and the time is 9 points to 12 points, and conference type is projector, itAfterwards by above- mentioned information with transaction answer match, obtain: " meeting person-time=3 ", " the time of meeting=9 point are to 12 points " andThe complete dynamic variable of " conference type=projector " is input to the meeting room query node 101, by the meeting room query nodeThe Transaction Information that above-mentioned dynamic variable composition service interface can identify is sent to corresponding service interface by 101.
The benefit being arranged in this way is can further to improve the versatility of transaction node, by transaction node and can be showedSome knowledge bases are combined use.But, there is a problem by data structure setting transaction knowledge point as described in Table 1,It exactly requires user to input in information including whole dynamic variables needed for transaction node in other words service interface, can just triggerOnce service interface return to corresponding trading processing as a result, user to input the information dynamic variable that includes imperfect, it is necessary to weightThe new whole dynamic variables of complete input, interactivity and intelligence are slightly worse, and can influence user to a certain extent uses bodyIt tests.Based on this, the data structure of another transaction knowledge point has been set forth below, can include in user's input informationDynamic variable it is imperfect when, the dynamic variable that lacks in information, corresponding adjustment output words art, to use are inputted according to userFamily is convenient, quickly dynamic variable supplement is completed by lacking in subsequent input information, to further increase userExperience and efficiency the problem of question answering system.
Fig. 2 is the flow chart of the generation method of another above-mentioned question answering system, wherein is believed for needs from user's interactionThe transaction node that one or more dynamic variable is extracted in breath gives another data structure of corresponding transaction knowledge point.Correspondingly, the above method includes:
S210, patterned one or more question and answer flow charts are obtained.
S220, according to each graphic assembly for including in each question and answer flow chart, generate matched with question and answer flow chartStandardized codes frame, wherein the graphic assembly includes: at least one transaction node, the transaction node and executes settingThe service interface of type of service is associated.
S230, according to each graphic assembly in the question and answer flow chart is matched custom-configures information, generateCustom code corresponding with each graphic assembly makes an addition in the standardized codes frame to be associated with graphic assemblyPosition at, to generate corresponding with question and answer flow chart question and answer process module.
Wherein, and the matched information that custom-configures of the transaction node includes: service call corresponding with transaction nodeAddress, the service call address are directed toward and the associated service interface of the transaction node;
When the transaction node in the question and answer process module is triggered, the transaction node according to be input to fromAt least one dynamic variable construction Transaction Information of body node is sent to corresponding service call address, and the service is adjustedIt is back to the question and answer process module with the trading processing result that address is fed back, so that the question and answer process module is according toTrading processing result continues to execute.
S240, by setting, transaction node is corresponding with a knowledge point in knowledge base, corresponding with the transaction node to knowKnowing point includes: transaction issues and transaction answer.
As previously mentioned, needing if one or more transaction node in question and answer process module from customer interaction informationMiddle one or more dynamic variable of extraction, then need to establish in above-mentioned transaction node and knowledge base a knowledge point (That is, transaction knowledge point) corresponding relationship.In order to solve the problems of knowledge point of trading in table 1, give in the present embodimentThe data structure of another middle transaction knowledge point is gone out.
Wherein, the transaction answer includes: connected transaction node, and the type of at least one incoming parameter, at least one is lackedLose the type of parameter, and the rhetorical question content with the type matching of the default parameters;
The transaction issues are matched for inputting information with received user;
The type of the incoming parameter, the type for inputting the dynamic variable for including in information with the user carry outMatching;The type of the default parameters and rhetorical question content with the type matching of the default parameters, for it is determining with it is describedUser inputs the corresponding rhetorical question content of type of institute's default parameters in information;The connected transaction node, for determining the useThe incoming transaction node of the dynamic variable for including in family input information.
Wherein, a kind of data structure of specific above-mentioned transaction knowledge point has been shown in table 2.
Table 2
As shown in table 2, in the transaction knowledge point, the transaction issues, for received user input information intoRow matching, obtain user input information in include time, person-time and conference type in one or more it is specific inHold;The type of the incoming parameter of at least one for including in the transaction answer, specifically: the time of meeting, meeting number and meetingType is discussed, the type for inputting the dynamic variable for including in information with the user matches.
If it is determined that it includes the class for being all passed to parameter defined in the transaction answer in information that the user, which inputs,Type then can directly send out the incoming parameter type composite construction dynamic variable for including in above-mentioned particular content and transaction answerIt send in the connected transaction node into the transaction answer, namely: " meeting room inquiry " this transaction node.
In addition, also defining the type of at least one default parameters, and lack with described in the transaction knowledge pointLose the rhetorical question content of the type matching of parameter.Such as: " [@time]=may I ask the meeting room that you want several points to several points ", whereinThe type of " [@time] " corresponding default parameters, " may I ask the meeting room that you want several points to several points " corresponding corresponding rhetorical question content.Namely: if not including the particular content of the time of meeting in user's input information, it can be based on above-mentioned transaction knowledge point, toUser provides corresponding rhetorical question content: " may I ask the meeting room that you want several points to several points ", to request user to re-enter including meetingDiscuss the particular content of time;In another example " [@person-times] [@conference type]=may I ask number of participants and required equipment ", " [@Person-time] [@conference type] " corresponding default parameters type, " number of participants and required equipment that may I ask " is corresponding correspondingAsk in reply content.Namely: if user input do not include in information meeting number and conference type particular content, can be withBased on above-mentioned transaction knowledge point, corresponding rhetorical question content: " number of participants and required equipment that may I ask " is provided a user, withRequest user re-enters the particular content including meeting number and conference type.
By take described in table 2 trade knowledge point data structure, can not strict regulations be input to transaction nodeUser inputs the data format of information, is based on above-mentioned transaction knowledge point, and the dynamic lacked in information can be inputted according to user and is becomeThe type of amount returns to corresponding rhetorical question content to user and only weighs so that user corrects user's input content according to rhetorical question contentIt is new that the dynamic variable of missing is provided, and the dynamic variable provided does not need then to provide again.Guaranteeing that transaction node canTriggered as normal while normal work, greatly reduces the requirement that information is inputted to user, and can significantly improve question answering systemQuestion and answer efficiency and the usage experience of user.
Correspondingly, will setting transaction node it is corresponding with a knowledge point in knowledge base, may include: if it is determined thatInclude in the knowledge base with the matched transaction knowledge point of the transaction node, then can in knowledge base directly establish bothCorresponding relationship, if it is determined that in the knowledge base do not include with the matched transaction knowledge point of the transaction node, then can be withThe transaction knowledge point is initially set up in knowledge base, establishes the corresponding relationship of the two later.
In addition, it is necessary to illustrate again, the transaction node has significantly different with previously mentioned question and answer knowledge point.As previously mentioned, so-called question and answer knowledge point, problematic and corresponding answer (alternatively referred to as " ask-answer " to) is generally comprised,In, the question and answer knowledge point is primarily adapted for use in the scene for carrying out question and answer with interactive user, and the problems in question and answer knowledge point is used forInput information with user to match, if successful match, feed back the answer in the question and answer knowledge point, or execute with it is describedThe calling of the control program of answer content matching.
Namely: question and answer knowledge point can directly determine with user input the corresponding processing result of information (for example, feedbackAnswer content or the calling for executing setting control program), and knowledge point of trading is to be input to corresponding transaction for matching determinationThe dynamic variable of node, the two purposes is different.For the ease of in different application scene to above-mentioned two class knowledge point carry out areaPoint, transaction knowledge point and question and answer knowledge point can be stored at storage location different in the knowledge base, or handing overThe knowledge point label etc. that addition is distinguished with question and answer knowledge point in mutual knowledge point.
Wherein, question and answer knowledge point with interact knowledge point not it is also possible to not distinguish to the two, all at thisWithin the protection scope of invention.
S250, the addition thematic knowledge point corresponding with each question and answer process module in knowledge base, the theme are knownKnowing point includes problem of subject and theme answer, and the problem of subject is used to indicate the trigger condition of question and answer process module, the masterTopic answer is used to establish the triggering relationship of the thematic knowledge point and the question and answer process module.
Above-mentioned technical proposal is by establishing in transaction node and knowledge base the corresponding relationship of knowledge point of trading, and in the friendshipRhetorical question when one or more dynamic variable needed for inputting loss of learning transaction node in user is defined in easy knowledge pointContent can make ultimately constructed question answering system in circulation to transaction node matched with transaction knowledge point, being capable of basisDifferent users inputs information, feeds back different rhetorical question contents, so that user is according in rhetorical question content amendment user's inputHold, the dynamic variable of missing is only provided again, and the dynamic variable provided does not need then to provide again.Guaranteeing to tradeNode can triggered as normal, while normal work, greatly reduce the requirement that information is inputted to user, and can significantly improve and askAnswer the question and answer efficiency of system and the usage experience of user.
Further, the graphic assembly can also include: the connector for connecting different nodes, for example, such as Fig. 1 bIt is shown, for connecting meeting room query node 101 and casting the connector A of meeting room node 102 is not found, for connectingMeeting room query node 101 and ask whether determine destined node 104 connector B and for connect meeting room inquiryNode 101 and casting meeting room list select the connector C of node 103 for user.
Custom-configuring information described in corresponding includes: and the matched dynamic condition configuration information of the first connector;
First connector is for connecting association upper layer node and association lower level node, the association upper layer nodeFor the second transaction node;
Wherein, the dynamic condition configuration information be the question and answer process module from the association upper layer node circulate toThe condition of the association lower level node, the dynamic condition configuration information includes: to join defined item and condition setting value, institute outState out ginseng defined item correspond at least one received trading processing of the transaction node as a result, the condition setting value forIt is described to go out to join the trading processing result progress condition comparison in defined item.
In a specific example, " $ { transaction node title } variable name+relational operator+variate-value " can be passed throughMode, corresponding with the first connector dynamic condition configuration information is set.
Wherein, $ { transaction node title } the variable name namely the ginseng defined item out, represent the transaction node and connectAt least one trading processing received as a result, variate-value respective conditions setting value, for it is described go out ginseng defined item in the friendshipEasy to handle result carries out condition comparison.
More specifically, as shown in Figure 1 b, connector A, connector B and connector C are connection transaction node (meetingsRoom query node 101) with the connectors of other nodes.Assuming that the meeting room query node 101 receives corresponding with service interfaceThe trading processing result of return is the meeting room quantity of the condition that meets (Transaction Information of information structuring is inputted according to user), thenIt can be with relative configurations dynamic condition configuration information corresponding with connector A are as follows: " { transaction node title } .code=0 ";With companyThe corresponding dynamic condition configuration information of fitting B are as follows: " $ { transaction node title } .code=1 ", dynamic corresponding with connector CCondition configuration information are as follows: " $ { transaction node title } .code > 1 "
Wherein, $ { transaction node title } .code represent the received trading processing of transaction node as a result, "=" and" > " is the relational operator indicated between trading processing result and corresponding condition setting value.
Namely: if the trading processing result that the meeting room query node 101 receives the return of corresponding with service interface is1, then the dynamic condition configuration information that above-mentioned trading processing result meets is " $ { transaction node title } .code=1 ", accordingly, the question answering system can from the meeting room query node 101 circulate to ask whether determine destined node 104 continue to holdRow.
Further, the graphic assembly can also include: interaction node;
Correspondingly, the method also includes: establish one or more knowledge points in each interaction node and knowledge baseCorresponding relationship, knowledge point corresponding with the interaction node includes: interaction problems and interaction answer, and the interaction problems are usedIt is matched in the customer interaction information received, the interactive answer is for determining the next of the question and answer process moduleTrend.
Wherein, the interaction node specifically refer to can to have carried out with interactive user question and answer (can be with question-response, can alsoAsk answer with one more) node of interaction, under the interaction node, the customer interaction information that can be inputted according to user determine question and answerNext trend of system.
For example, as shown in Figure 1 b, it is described to ask whether to determine that destined node 104 is an interaction node, if it is determined thatUser asks whether to determine that destined node 104 inputs "No" based on this, it is determined that next trend of question answering system is to terminate streamJourney;If it is determined that user based on this ask whether determine destined node 104 input "Yes", it is determined that question answering system it is next walkTo for meeting room destined node 105.
Further, interaction node needs to be determined under the question and answer process module established according to customer interaction informationOne trend.Namely: interaction node includes at least two branches, and the difference that different branches correspond to the question and answer process module is walkedTo.Therefore, it is necessary to be the different branch condition of different branch establishings in the question and answer process module.
In fact, the expression-form for the customer interaction information that user inputs under an interaction node may be not unique,Customer interaction informations multiple and different in other words can correspond to the same branch condition.It as shown in Figure 1 b, for example, can be pre-When first regulation customer interaction information is "No" or " uncertain ", question answering system can circulate to terminating process, therefore, it is necessary toIt is established in knowledge base and interaction node is matched interacts knowledge point: (no, no) and (not knowing, no).And it establishes respectivelyIt states interactive knowledge point and asks whether the corresponding relationship of determining destined node 104.Similarly, can simultaneously prespecified userWhen interactive information is "Yes" or " determinations ", question answering system can circulate to terminating process, it is also desirable to established in knowledge base andThe matched interactive knowledge point of interaction node: (being yes), and (determining, yes).
Therefore, it asks whether to determine that destined node 104 need to interact knowledge point with four altogether and establish corresponding relationship.It can manageSolution, knowledge point corresponding with interaction node and question and answer knowledge point in the prior art be it is distinguishing, therefore, in order to justIn difference, knowledge point corresponding with interaction node is referred to as interactive knowledge point hereinafter.
Wherein, first half in each bracket represents the interaction problems of interaction knowledge point, for the user that receivesInteractive information is matched, and the latter half in each bracket represents the interaction answer of the interaction knowledge point, described in determiningNext trend of question and answer process module.
Further, the graphic assembly can also include: casting node.The casting node is for broadcasting by certainlyDefine the preset casting content of configuration information.For example, meeting room node 102, casting are not found in casting as shown in Figure 1 bMeeting room list selects node 103, the predetermined successful node 106 of casting and casting failure cause node 107 for user.Such as:When question answering system circulate to casting do not find meeting room node 102 when, the casting node can accordingly broadcast " it is sorry, do not find symbolThe meeting room of conjunction condition ".
Further, other than it can be directed to casting node sets casting content, other kinds of section can also be directed toPoint setting casting content, so that each node in question answering system preferably carries out question and answer with user and interacts.
Correspondingly, the information that custom-configures includes: casting content corresponding with first node;
The first node is connected with third transaction node by connector, and the first node is located at third friendshipThe downstream of easy node, the first node include: interaction node, casting node or other transaction nodes;
The casting content includes: the received trading processing result of the third transaction node, third transactionThe combination of the received trading processing result of node and presupposed information or the third transaction node are received describedThe combination of trading processing result and the dynamic variable for being input to the third transaction node.
Specifically, as shown in Figure 1 b, ask whether determine destined node 104 be one with transaction node (namely: meetingRoom query node 101) pass through a connected interaction node of connector.Therefore, it can be directed to the interaction node, set participantThe matched different types of casting content of the received trading processing result of room query node 101 is discussed, for example, only including at transactionThe casting content for managing result is " meeting room meets condition ", alternatively, including the group of trading processing result and presupposed informationThe casting content of conjunction is " according to the meeting room querying condition that you input, an only meeting room meets condition ", or, packetThe combined casting content for including the trading processing result and the dynamic variable for being input to the transaction node is that " only one fullThe sufficient the time of meeting is XX, and meeting number is XX, and conference type is the meeting room of XX " etc..
It is understood that above-described embodiment simply shows the set-up mode of several casting contents, in fact, abilityField technique personnel can casting content corresponding with node needed for customized setting according to the actual situation, the present embodiment is to thisAnd it is not limited.
Further, the casting content can be list-mode data.Such as: casting meeting room column as shown in Figure 1 bTable selects node 103 for user, by Such analysis it is found that can circulate when determining has more than one meeting room to meet conditionTherefore accordingly the casting curriculum offering of node 103 can be selected for column for user the casting meeting room list to the nodePhenotypic data, so that the node can broadcast multiple meeting rooms for meeting condition, such as: casting: " meeting the time of meeting is XX,Meeting number be XX, conference type be XX meeting room it is as follows: meeting room A1, meeting room B2 ... ".
It typically, can be when user double-clicks or clicks a graphic assembly in question and answer flow chart, in corresponding pop-upState the input template for custom-configuring information, process design personnel can be realized pair by simply selecting and input operationDifferent graphic assemblies, which inputs, different custom-configures information.