Summary of the invention
In view of this, main purpose of the present invention is a kind of chat robots of proposition system, with the satisfying magnanimity user, improves extensibility.
Another object of the present invention is the implementation method of a kind of chat robots of proposition system, with the satisfying magnanimity user, improves extensibility.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of chat robots system, this system comprises Distributor and at least two robot servers, wherein:
Distributor is used to receive user's statement, and according to the load balancing principle user's statement is distributed to corresponding robot server;
Robot server is used for feeding back answer in response to user's statement automatically to the user.
The number of described Distributor is at least two, and this system further comprises Redirect Server;
Redirect Server is used to receive user conversation, and according to this attribute of user information, user conversation is redirected to the Distributor that is complementary with described attribute information;
The Distributor that described and attribute information are complementary is used to receive user's statement of this user conversation, and according to the load balancing principle user's statement is distributed to corresponding robot server.
Described attribute of user information comprises user's IP address and/or client account number.
The number of described Distributor is at least two, and this system further comprises Redirect Server;
Redirect Server is used to receive user conversation, and according to the load balancing principle user's statement is distributed to corresponding Distributor;
Distributor is used to receive user's statement of this user conversation, and according to the load balancing principle user's statement is distributed to corresponding robot server.
Described robot server comprises:
Statement purpose recognition unit, being used to discern user's statement still is the unformatted statement for the format statement;
The formatted language performance element is used for while statement purpose recognition unit and identifies user's statement and be format during statement, carries out described format statement;
The natural language understanding unit when being used for while statement purpose recognition unit and identifying user's statement and be the unformatted statement, carries out natural language understanding to determine statement attribute to user's statement;
The user property administrative unit is used for the attribute information of leading subscriber;
The inference engine unit is used to load knowledge base, and carries out pattern matching according to described statement attribute and customer attribute information in knowledge base, determines that the feedback of coupling is answered.
Described attribute of user information comprises: any in user's name, user's sex, city, user place, the consumer taste or more than one combination in any.
Described natural language understanding unit, be used for to user's statement carry out any of following operation or more than one combination in any to determine statement attribute:
Participle;
The question sentence trunk extracts;
The question sentence type is judged;
Topic is judged.
Described robot server further comprises standby inference engine unit, is used for when knowledge base update loading the knowledge base of upgrading, and after the knowledge base that has loaded renewal with described inference engine cell translation function.
This system further comprises learning server, and described knowledge base is arranged in learning server;
Learning server is used for recording user dialogue, and is kept in the knowledge base after user session is converted into the knowledge Base article form.
This system further comprises the audit server,
The audit server is used for according to the knowledge auditing rule that sets in advance user session being examined, and only will send to learning server by the user session of audit.
Described knowledge Base article form comprises problem part and response part,
The problem part is preserved in the mode of question sentence trunk, and response part is preserved in the mode of complete reservation.
Described formatted language performance element comprises: any in information inquiry module, dialogue education module and the game module or more than one combination in any, wherein:
The information inquiry module, the feedback that is used for the format statement of definite information inquiry class is answered;
Dialogue education module is used for determining to talk with the feedback answer of educational format statement;
Game module, the feedback that is used for the format statement of definite game class is answered.
Distributor, be used for by following communication modes any or receive user's statement more than a kind of combination in any:
Receive user's statement by the instant messaging mode;
Receive user's statement by E-mail mode;
Receive user's statement by short message way.
Distributor, be used for by following communication modes any or feed back answer more than a kind of combination in any automatically to the user:
Receive user's statement by the instant messaging mode;
Receive user's statement by E-mail mode;
Receive user's statement by short message way.
This system further comprises Control Server,
Described Control Server is used for sending the knowledge base update switching command to robot server and learning server;
Learning server is used for after receiving the knowledge base update switching command, and the user session of saving bit by bit is converted into the knowledge Base article form with the storehouse of refreshing one's knowledge;
Standby inference engine unit in the robot server is used for after receiving the knowledge base update switching command, the knowledge base of load upgrading, and after the knowledge base that has loaded renewal with described inference engine cell translation function.
Control Server regularly sends the knowledge base update switching command to robot server and learning server; Or
Control Server sends the knowledge base update switching command to robot server and learning server when user session is saved bit by bit predetermined extent.
A kind of automatic chatting method, this method comprises:
A, Distributor receive user's statement, and according to the load balancing principle user's statement are distributed to corresponding robot server;
B, robot server feed back answer in response to user's statement automatically to the user.
This method further comprises:
Receive the user conversation request, and, user conversation is redirected to the Distributor that is complementary with described attribute information according to attribute of user information;
Distributor receives user's statement of this user conversation, and according to the load balancing principle user's statement is distributed to corresponding robot server.
This method further comprises:
Receive user conversation, and user's statement is distributed to corresponding Distributor according to the load balancing principle;
Distributor receives user's statement of this user conversation, and according to the load balancing principle user's statement is distributed to corresponding robot server.
Described user's statement is chat statement, information inquiry question sentence, dialogue education statement or formatting command.
As can be seen, the system that the present invention proposes comprises Distributor and at least two robot servers from technique scheme, and wherein Distributor receives user's statement, and according to the load balancing principle user's statement is distributed to corresponding robot server; Robot server feeds back in the answer to the user automatically in response to user's statement.This shows, use after the present invention, Distributor is according to the distribution of load balancing principle control user statement, the number of Distributor can be for a plurality of, each Distributor can connect a plurality of robot servers, each robot server function is independent, and therefore extensibility of the present invention is very high, especially is fit to mass users.
In addition, the present invention also preferably includes Redirect Server, Redirect Server determines a session by which Distributor is entered the mouth as handling, adopt main entrance and the distributor of Distributor subsequently as all user's statements of session, make robot server load basis equalization, further improve the extensibility of system, made the chat robots system be more suitable for supporting mass users.
Also have, the present invention adopts knowledge Base article rather than the database carrier as the knowledge point.This knowledge Base article adopts the form of particular design to be more suitable for reasoning and generates personalization and replys, and it is intelligent to make chat robots have more.Not only therewith, the present invention generates personalization according to information such as topic, question sentence type, user properties and replys, and makes robot more true to nature aspect the imitation human language.In addition, the present invention can also inquire about (comprising natural language querying) and human-computer interaction recreation by support information, makes the user obtain more services by chat robots.
Embodiment
For making the purpose, technical solutions and advantages of the present invention express clearlyer, the present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Main thought of the present invention is: Distributor receives user's statement, according to the load balancing principle user's statement is distributed to corresponding robot server then, robot server feeds back answer in response to user's statement to the user more automatically, thereby make the load balancing of robot server, satisfying magnanimity user's demand, and improve extensibility.Further, the present invention adopts knowledge Base article rather than the database carrier as the knowledge point, and this knowledge Base article adopts the form of particular design to be more suitable for reasoning and generates personalization and replys, and it is intelligent to make chat robots have more.
Fig. 1 is the demonstrative structure schematic diagram according to chat robots of the present invention system.
As shown in Figure 1, this system comprisesDistributor 101 and at least tworobot servers 102, wherein:
Distributor 101 is used to receive user's statement, and according to the load balancing principle user's statement is distributed tocorresponding robot server 102;
Robot server 102 is used for feeding back answer in response to user's statement automatically to the user.
Preferably, the number of described Distributor is at least two, thereby supports more chat robots, and this moment, preferred this system further comprisedRedirect Server 103;
Redirect Server 103 is used to receive user conversation, and according to this attribute of user information, user conversation is redirected to theDistributor 101 that is complementary with described attribute information;
Wherein, attribute of user information can comprise user's IP address and/or client account number.Like this,Redirect Server 103 considers that user's IP address and/or client account number distribute Distributor.Such as, user conversation can be redirected to and the more approaching Distributor in described IP address, perhaps user conversation is redirected to and the corresponding Distributor of client account number.At this moment, theDistributor 101 that described and attribute information are complementary is used to receive user's statement of this user conversation, and according to the load balancing principle user's statement is distributed tocorresponding robot server 102.
At the another kind of optional function of above-mentioned Redirect Server, the number ofDistributor 101 is at least two, and this system further comprisesRedirect Server 103;
Redirect Server 103 herein is used to receive user conversation, and according to the load balancing principle user's statement is distributed tocorresponding Distributor 101;
Distributor 101 is used to receive user's statement of this user conversation, and according to the load balancing principle user's statement is distributed tocorresponding robot server 102.
Wherein,Distributor 101, can by in the following communication modes any or receive user's statement more than a kind of combination in any: receive user's statement by the instant messaging mode; Receive user's statement by E-mail mode; Receive user's statement by short message way.
Similarly,Distributor 102, can by in the following communication modes any or feed back answer more than a kind of combination in any automatically to the user: receive user's statement by the instant messaging mode; Receive user's statement by E-mail mode; Receive user's statement by short message way.
Fig. 2 is a kind of exemplary concrete structure of the robot server among Fig. 1.As shown in Figure 2,robot server 102 comprises:
Statement purpose recognition unit 201, being used to discern user's statement still is the unformatted statement for the format statement;
Formatted language performance element 202 is used for while statement purpose recognition unit 201 and identifies user's statement and be format during statement, carries out described format statement;
In Fig. 1, formatted language performance element 202 is not shown clearly.In fact, described formatted language performance element can comprise: any in information inquiry module, dialogue education module and the game module or more than one combination in any, wherein:
The information inquiry module, the feedback that is used for the format statement of definite information inquiry class is answered;
Dialogue education module is used for determining to talk with the feedback answer of educational format statement;
Game module, the feedback that is used for the format statement of definite game class is answered.
For simple view, information inquiry module 2021 and game module 2022 only are shown among Fig. 2.Wherein information inquiry module 2021 is connected with practical information database 209, and retrieval practical information database 209 is answered with the feedback of the format statement of determining the information inquiry class.
Natural language understanding unit 203 when being used for while statement purpose recognition unit and identifying user's statement and be the unformatted statement, carries out natural language understanding to determine statement attribute to user's statement;
User property administrative unit 204 is used for the attribute information of leading subscriber;
Inference engine unit 205 is used to load knowledge base 206, and carries out pattern matching according to described statement attribute and customer attribute information in knowledge base 206, determines that the feedback of coupling is answered.Wherein attribute of user information can comprise: any in user's name, user's sex, city, user place, the consumer taste or more than one combination in any.
Described natural language understanding unit 203, can to user's statement carry out in the following operation any or more than one combination in any to determine statement attribute: participle, question sentence trunk extract, the question sentence type is judged and topic is judged.
Described robot server can further include standby inference engine unit 207, is used for loading when knowledge base update the knowledge base of upgrading 208, and is loading knowledge base 208 backs of upgrading and described inference engine unit 205 translation functions.
Chat robots system among Fig. 1 can further include learning server, and the described knowledge base 206 among Fig. 2 can be arranged in this learning server;
This learning server is used for recording user dialogue, and is kept in the knowledge base 206 after user session is converted into the knowledge Base article form.
The chat robots system can further include the audit server.The audit server is used for according to the knowledge auditing rule that pre-unit is provided with user session being examined, and only will send to learning server by the user session of audit.Such as, in order to prevent in knowledge base 206, to write unhealthy information such as yellow information, can in the audit server, set in advance some filtration keywords, when user session comprises the filtration keyword, then examine server and judge that this knowledge does not meet the knowledge auditing rule, does not send to learning server with this user session; Otherwise the audit server judges that this knowledge meets the knowledge auditing rule, sends to learning server with this user session.
Described knowledge Base article form can comprise problem part and response part, and the problem part is preserved in the mode of question sentence trunk, and response part is preserved in the mode of complete reservation.
Knowledge base 206 is important component parts of chat robots system, adopt specific suitable reasoning form, stored a large amount of knowledge with the right form of question and answer statement.When the natural language sentences of user input and the some sentences in the knowledge base when the match is successful, replying of its correspondence will be returned to the user.
For the ease of reasoning, a lot of attributes have been comprised in the knowledge base 206.Below respectively to ["] problem " part and " replying " part attribute simply introduce.
" problem " part of preserving in the knowledge base 206 through natural language processing, is preserved in the mode of question sentence trunk.The question sentence trunk extracts can multiple rule, for example synonym has been done replacement, and as " Email " and " Email ", " capital " and " Beijing " etc. is replaced by unified method for expressing.For another example, only keep the word that to express the question sentence semanteme.As a question sentence " railway station, Beijing somewhere? ", the sentence trunk that obtains is " railway station, Beijing ".
" problem " part of preserving in the knowledge base 206 in addition, also comprises the type of question sentence.For example " railway station, Beijing somewhere? " this question sentence, the question sentence type that obtains through natural language processing is " inquiry place ".Comprehensively two attributes of " the question sentence trunk " of " problem " and " question sentence type " can be represented the multiple different expression methods of a problem." railway station, Beijing somewhere? " other form of presentation " railway station, capital where? " " railway station, Beijing how to get to? " the question sentence trunk all be " railway station, Beijing ", the question sentence type all is that " question sentence type " all is " inquiry place ".Therefore these question sentences can return identical replying.
The task of extracting question sentence type and question sentence trunk when generating knowledge base is finished by learning server, the natural language understanding unit 203 of robot server adopts identical rule process online user to import question sentence, same " the question sentence trunk " and " question sentence type " that generates online user's question sentence is used for mating in knowledge base.In addition, " the question sentence trunk " of some problems can comprise asterisk wildcard, is used for expansion " question sentence trunk " adaptive scope.Also having question sentence theme (as amusement, military affairs etc.) also is an attribute of " problem ".
" replying " part of preserving in the knowledge base 206, unlike " problem " part, preserve in the mode of trunk, but keep complete replying, and one " problem " corresponding multiple " replying " in the knowledge base, " the replying " from user's education can comprise " education user ID " attribute.The inference engine unit of robot server is mating " problem " afterwards, select one from corresponding a plurality of the replying of this " problem " and return to the user, and what preferential this user oneself of selection educated during selection replys.Reply for one and also may comprise some and replace symbol, the inference engine unit that this replacements symbol needs robot server is replaced before finally replying returning, and these replacements Fu Keneng represents some user properties or out of Memory.For example: reply that " I know that you are from XX for one." this reply in " XX " partly (" XX " need to adopt different-format represent different meanings; concrete form omits herein) need replace with the information in the user property; user attribute inquiry is to be finished by the user property administrative unit of robot server; for example city, user place attribute be " Shenzhen "; then the inference engine unit of robot server partly replaces to " Shenzhen " with " XX " in that finally replying of generating is middle, and finally " I know that you are from Shenzhen to the robot echo reply.”
This chat robots system can further include Control Server,
Described Control Server is used for sending the knowledge base update switching command torobot server 102 and learning server; Learning server is used for after receiving the knowledge base update switching command, and the user session of saving bit by bit is converted into the knowledge Base article form with the storehouse of refreshing one's knowledge;
Standby inference engine unit in the robot server is used for after receiving the knowledge base update switching command, the knowledge base of load upgrading, and after the knowledge base that has loaded renewal with described inference engine cell translation function.
Control Server regularly sends the knowledge base update switching command to robot server and learning server; Or
Control Server sends the knowledge base update switching command to robot server and learning server when user session is saved bit by bit predetermined extent.
The invention also discloses a kind of automatic chatting method.Fig. 3 is the demonstrative structure schematic diagram according to robot server of the present invention.
As shown in Figure 3, this method comprises:
Step 301: Distributor receives user's statement, and according to the load balancing principle user's statement is distributed to corresponding robot server;
Step 302: robot server feeds back answer in response to user's statement automatically to the user.
In the above flow process, can before step 301, receive the user conversation request, and, user conversation is redirected to the Distributor that is complementary with described attribute information according to attribute of user information; This Distributor receives user's statement of this user conversation then, and according to the load balancing principle user's statement is distributed to corresponding robot server.
Alternatively, can also beforestep 301, receive user conversation, and user's statement is distributed to corresponding Distributor according to the load balancing principle; Distributor receives user's statement of this user conversation, according to the load balancing principle user's statement is distributed to corresponding robot server again.
Fig. 4 is the demonstrative structure schematic diagram according to the chat robots system of the embodiment of the invention.
In the embodiment shown in fig. 4, the chat robots system that the present invention proposes also comprises 5 class servers except essential front end communication system (immediate communication platform, SMS platform etc.): be redirected (Redirect) server, distribution (Dispatch) server, robot (Robot) server, learning server (Learning) and control (Control) server.
When the beginning of a new session that transmits in the front end communication system, Redirect Server is at first informed by the front end communication system, the account number that Redirect Server uses according to the IP address or the client of client in the front end communication system determines this session by the inlet of which Distributor as processing.
Determine that again Redirect Server is no longer passed through in all communications of this session by after the inlet of which Distributor as processing, all data that transmit from the front end communication system directly are sent to Distributor in this session, until this conversation end.Therefore Redirect Server is finished the redirected task of session in whole chat robots, has considered the load balancing of each Distributor in redirection process.
Distributor is the main entrance that a session of chat robots system is handled, be used to receive all user's statements of this session of sending from front end communication systems such as immediate communication platform, SMS platforms, and user's statement is distributed to each robot server according to certain mechanism, this mechanism makes that the load of each robot server is an approximate equalization.For the ease of expansion, Distributor can have a plurality of, and each Distributor can corresponding a plurality of robot servers.
Robot server is process user statement and the server that responds in the chat robots system, and the robot server in chat robots system can be one or more.User's statement may be chat statement, information inquiry question sentence, dialogue education, formatting command etc.Robot server is resolved user's statement, judges its purpose classification, and makes different disposal, will reply leading portion communication systems such as directly returning to immediate communication platform or SMS platform then.
As the exemplary analysis among Fig. 2, robot server can comprise statement purpose recognition unit, natural language understanding unit, inference engine unit, user property administrative unit, formatted language performance element etc., and wherein the formatted language performance element can comprise game module and information inquiry module etc.
The statement purpose recognition unit of robot server carries out identification to the purpose classification of user's statement, judge that statement is format statement or unformatted language statement, if the format statement, continuing to differentiate is dialogue education format statement, information inquiry format statement, game format order, or extended formatting order (as user property is set).
Natural language processing is done to unformatted user sentence in the natural language understanding unit of robot server, finishes processing such as comprising participle, the extraction of question sentence trunk, the judgement of question sentence type, topic judgement.
The inference engine unit of robot server, the knowledge Base article that loading is generated by learning server, based on user's sentence attribute of natural language understanding unit output, and the user property of user property administrative unit extraction, the generation natural language is replied, and finishes the chat processing of statement to the user.
For the storehouse of refreshing one's knowledge, a robot server can comprise two inference engine unit, and processing, a generation natural language that is used for online in real time is replied, and another is backup inference engine unit, is used to load the knowledge base of recent renewal.
The user property administrative unit of robot server is finished the storage and the inquiry of user property and is read.These attributes comprise name, sex, city, place of user etc.The inference engine unit can return personalized replying based on these attributes.These attributes are that the user submits to voluntarily, and the method for submission has a lot, comprises by submit to certain formatting command to be provided with to chat robots.
The game module of robot server is handled the game format order, according to game logic, advances the carrying out of interactive game.
The information inquiry module of robot server realizes the practical information inquiry, comprises value-added service functions such as weather inquiry, map inquiry, postcode inquiry, the inquiry of mobile phone ownership place, life information inquiry, dictionary enquiry, calculator.
Learning server is responsible for the dialogue of recording user education, be kept in user's educational database, wait until editor and come manual examination and verification, treat that manual examination and verification are passed through after, these dialogues will be converted into knowledge Base article by learning server, and this knowledge Base article form is the reasoning from logic particular design.Knowledge in the knowledge base also comprises from editing other sources such as knowledge that knowledge and Knowledge Community precipitate except educating from the user.The knowledge of these separate sources is gathered in conversion process to be incorporated in the knowledge base.
Comprise in the knowledge base question and answer topic attribute, context property, educate the user's of these question and answer ID attribute (if leading portion is an immediate communication platform, this ID is the account number ID that the user uses JICQ so) etc. be used for the attribute of reasoning, wherein the user ID attribute is used to realize the personalization in the chat process.Also comprise some semantic asterisk wildcards in addition in the knowledge base, be used to expand the scope of replying question sentence applicatory.Last this knowledge Base article sends to each robot server under the instruction of Control Server.
Control Server is responsible for sending the knowledge base update switching command to robot server and learning server, and upgrading the opportunity that switching command sends can be regularly, also can be when new user that learning server receives educate talk with run up to a certain degree after.After instruction is sent, learning server is converted into knowledge Base article with the question answer dialog in user's educational database, and send to each robot server, Control Server sends instruction to robot server subsequently, backup inference engine unit in the robot server loads the up-to-date knowledge storehouse, then, the role of backup inference engine and online inference engine is exchanged, and finishes the replacement of knowledge base.
Before a new session begins, which at first determine by the main entrance (considered the load balancing of each Distributor) of Distributor as this session by Redirect Server, after this user's transmitted from the leading portion communication system of all of this session statement at first imports Distributor into, Distributor is passed to one of them robot server with user's statement, and (which robot server Distributor when selecting to be transmitted to, considered each robot server load balancing equally), robot server is finished will reply after the processing to user's statement and is directly returned to the front end communication system.
When being system's operation, the main operating process of chat robots, below this process is described in detail the handling process of user's sentence.
At first session is established when a user begins to chat with chat robots, the front end communication system has kept the Redirect Server address of chat robots system, when new session begins, Redirect Server is at first informed by the front end communication system, Redirect Server determines this session to transfer to which Distributor as handling inlet, and inform the front end communication system, all user's statements that transmit from the front end communication system of this session are after this all transferred to this Redirect Server and are handled.
When which Distributor Redirect Server is handled by in decision, considered information such as the load balancing of each Distributor or service feature, the number segment of the account number ID (as the account number of JICQ) that uses when holding means of communication before use according to the user is realized distribution.
After introducing a session below and setting up, chat robots is handled the flow process of user's question sentence in this session.
At first the Distributor of chat robots at first obtains user's sentence from the front end communication system, Distributor is passed to one of them robot server (Distributor has been considered each robot server load balancing when selecting to be transmitted to which robot server) with user's statement.
Robot server call statement purpose recognition unit is judged the intention of user's statement, makes different disposal according to the purpose classification then, and robot server is finished will reply after the processing to user's statement and directly returned to the front end communication system.
Fig. 5 is the exemplary flow schematic diagram according to the automatic chatting method of the embodiment of the invention.
As shown in Figure 5, this method comprises:
Step 501~step 503: Distributor is received user's statement from the front end communication system, and Distributor adopts the mechanism of load balancing that user's statement is transmitted to certain robot server, and robot server is judged the intention of user's statement;
Step 504: judge that user's statement yes-no format language statement still formats statement, if unformatted language statement execution in step 505 then, if formatted language statement execution in step 509 then;
Step 505~step 506: user's sentence is done processing such as participle, the extraction of question sentence trunk, the judgement of question sentence type, topic judgement, and judge according to question sentence type and topic judged result whether user's intention is to carry out certain information inquiry by natural language, if execution in step 510 then, otherwise execution in step 507;
Step 507~step 508: the user property administrative unit of robot server reads user property and gives the inference engine unit, the inference engine unit is according to user's statement, from knowledge base, search the knowledge point of coupling, and generate personalization according to information such as topic attribute, question sentence type attribute, user properties and reply, execution in step 514 and process ends then;
Step 509: judge that the format statement is information inquiry, dialogue education or recreation order, if information inquiry, then execution in step 510; If dialogue education, then execution in step 512; If the recreation order, then execution in step 511;
Step 510: the information inquiry module parses user inquiring of robot server intention, and from the practical information database, searching, with lookup result as replying, execution in step 514 process ends also then;
Step 511: the game module of robot server is resolved user's recreation order, advance recreation to carry out according to game logic, and the current result of carrying out that will play is as replying.
Step 512~step 513: robot server is transmitted to learning server with the dialogue of user's education; Learning server is recorded in it in user's educational database; Robot server with words of thanking user's education as replying, execution in step 514 process ends also then;
Step 514: robot server will be replied and directly be turned back to the front end communication system, and the user receives that finally chat robots replys
As shown in Figure 5, in step 502, Distributor adopts the distribution mechanisms of having considered load balancing or service feature, for example adopt to be similar to the principle that Redirect Server is redirected, the number segment of the account number ID that uses when holding means of communication before use according to the user (as the account number of JICQ) is realized distribution.
At step 504 place, for the ease of identification, can be in advance and the user arrange form and format statement.For example Shenzhen weather is inquired about in " tq Shenzhen " expression, " are Q: you robot? A: yes, I am very clever." represent that the user educates dialogue.The statement order classification recognition unit of robot server is according to these format identification of arranging in advance format statements.
At step 505 place, the natural language understanding unit of robot server adopts natural language processing technique, and the natural language statement that the user is imported carries out processing such as morphological analysis, syntactic analysis, semantic analysis.
The reason of do judging at step 506 place is: some user is accustomed to adopting natural language and the mode of unformatted statement is come Query Information, for example user's statement " Shenzhen weather how tomorrow? " in this case, chat robots identifies the user after by natural language processing and really is intended to, processing procedure changes the information inquiry module over to, carries out the processing of information inquiry.
At step 508 place, in order to make chat robots have personalization, identical user's question sentence can produce different replying, the inference engine unit of robot server is according to user's statement, from knowledge base, search the knowledge point of semantic matches, and reply according to information such as topic attribute, question sentence type attribute, user property generation personalization.
At step 512 place,, and directly return one and thank to the replying of user's education and so on to the user if dialogue education format statement then is transmitted to learning server to the dialogue of user's education.Learning server together is recorded in the dialogue of the user education ID together with the user in user's educational database.
Add knowledge base owing to constantly there is new user to educate dialogue, the knowledge that constantly has knowledge class community to precipitate simultaneously adds knowledge base, so learning server constantly generates new knowledge base, and the robot server storehouse of constantly refreshing one's knowledge.Above process is finished by sending instruction scheduling by Control Server.
In sum, in the present invention, the beneficial effect that the chat robots system that the present invention proposes can bring comprises:
(1) chat robots of the present invention's proposition can comprise a plurality of Distributors, and each Distributor can connect a plurality of robot servers, and each robot server function is independent.The present invention also preferably includes Redirect Server, which Distributor the Redirect Server decision is entered the mouth as handling by by a session, adopt main entrance and the distributor of Distributor subsequently as all user's statements of session of chat robots, make robot server load basis equalization, and improved the extensibility of system, made the chat robots system be more suitable for supporting mass users.
(2) the present invention adopts knowledge Base article rather than the database carrier as the knowledge point, and this knowledge Base article adopts the form of particular design to be more suitable for reasoning and generates personalization and replys, and it is intelligent to make chat robots have more.
(3) the present invention replys according to information such as topic, question sentence type, user property generation personalization, makes robot more true to nature aspect the imitation human language.
(4) support information inquiry of the present invention (comprising natural language querying) and human-computer interaction recreation makes the user obtain more services by chat robots.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.