Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, completeSite preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based onEmbodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment shall fall in the protection scope of this application.
As shown in Figure 1, being a kind of flow chart of human-machine intelligence's processing method embodiment 1 disclosed in the present application, the methodIt may comprise steps of:
S101, the natural language for obtaining user's input;
When needing to carry out human-computer interaction, the natural language of user's input is obtained first.For example, obtaining user's input“my name is XX”。
S102, the natural language is handled based on artificial intelligence process language, exports processing result, wherein peopleWork Intelligent treatment language is write using extensible markup language text formatting, and an artificial intelligence process language file includes multipleTopic, each topic include multiple question-and-answer problems, and each question-and-answer problem has the input match pattern of a support regular expression and returnsIt answers.
Man-machine natural language processing, the design object of new artificial intelligence process language are carried out in order to significantly more efficientIt is as follows:
1, the human-computer dialogue for supporting natural language, supports the natural communicative mode of question answer dialog.
2, input match pattern supports regular expression.Such as:
(I cries | my name is | I be | my name is |) (.*)
' I is xx ', and either ' my name is that either ' I is xx ' or ' my name is xx ' to xx ' for matching.
3, the processing functions such as complete conditional branching/circulation of figure spirit.
4, primary support Chinese and various natural languages, not needing participle can normally be handled.
5, the switching of topic is supported.
6, the dialog process function of having process sequence of supporting expert system to need, can formulate dialog steps, Ke YigengGood design context association and condition judgement processing.
7, expert system is supported to carry out artificial intelligence dialog process in a manner of natural language.
8, the computer language complete with the xml language expression figure spirit of specification is attempted.It has the ability execution of conditional jump (" if "" go to " sentence) and variable data is supported to handle.
Based on above-mentioned target, the application devises a new artificial intelligence process language AIPL (ArtificialIntelligence Process Language).Wherein, the main sentence of AIPL language is illustrated below, as shown in table 1, rightEach label with the remarks of XML <!-- remarks content -- > it is illustrated:
It is handled according to the natural-sounding that AIPL inputs user, finally exports processing result, finishing man-machine interaction.
In conclusion in the above-described embodiments, when needing to carry out human-computer interaction, obtaining the natural language of user's input firstSound is then based on newly-designed artificial intelligence process language and handles natural language, exports processing result, completes man-machine friendshipMutually.Newly-designed artificial intelligence process language is write using extensible markup language text formatting, an artificial intelligence process languageSay that file includes multiple topics, each topic includes multiple question-and-answer problems, and each question-and-answer problem has the defeated of a support regular expressionEnter match pattern and answer, significantly more efficient can carry out man-machine natural language processing, the user experience is improved.
As shown in Fig. 2, being a kind of flow chart of human-machine intelligence's processing method embodiment 2 disclosed in the present application, the methodIt may comprise steps of:
S201, the natural language for obtaining user's input;
When needing to carry out human-computer interaction, the natural language of user's input is obtained first.For example, obtaining user's input“my name is XX”。
S202, based on the input match pattern of the support regular expression of each question-and-answer problem in work Intelligent treatment voice and returnIt answers, natural language is handled, export processing result, wherein artificial intelligence process language is using extensible markup language textThis format is write, and an artificial intelligence process language file includes multiple topics, and each topic includes multiple question-and-answer problems, Mei GewenAnswer has the input match pattern and answer of a support regular expression.
Man-machine natural language processing, the design object of new artificial intelligence process language are carried out in order to significantly more efficientIt is as follows:
1, the human-computer dialogue for supporting natural language, supports the natural communicative mode of question answer dialog.
2, input match pattern supports regular expression.Such as:
(I cries | my name is | I be | my name is |) (.*)
' I is xx ', and either ' my name is that either ' I is xx ' or ' my name is xx ' to xx ' for matching.
3, the processing functions such as complete conditional branching/circulation of figure spirit.
4, primary support Chinese and various natural languages, not needing participle can normally be handled.
5, the switching of topic is supported.
6, the dialog process function of having process sequence of supporting expert system to need, can formulate dialog steps, Ke YigengGood design context association and condition judgement processing.
7, expert system is supported to carry out artificial intelligence dialog process in a manner of natural language.
8, the computer language complete with the xml language expression figure spirit of specification is attempted.It has the ability execution of conditional jump (" if "" go to " sentence) and variable data is supported to handle.
Based on above-mentioned target, the application devises a new artificial intelligence process language AIPL (ArtificialIntelligence Process Language).AIPL is write with xml text formatting.One AIPL file may include multipleTopic, can each there is multiple question-and-answer problems, and each question-and-answer problem has the input match pattern and answer of a support regular expression.The processing such as variable assignments and reading, calculating, condition judgement/circulation, the new corpus file of study is supported in answer.New language withAIML language is incompatible.
Wherein, the main sentence of AIPL language is illustrated below, as shown in table 1, to each label with the remarks of XML <!--Remarks content -- > it is illustrated:
For AIPL language using XML as format, all labels must all have first symbol<symbol>and end mark</symbol>, AIPLMainly there is following label:
<!-- remarks content -->: using xml standard remarks label<!---->
<AIPL version=1.0>: the outermost label of AIPL language, attribute version version number are 1.0, versionNumber do not extend this as current default version 1.0.
<topic name=' weather '>: topic label, name is topic name, supports topic switching, only talks about currentlyInscribe matching problem answer in inventory.Such as weather topic.
<question step=" ask temperature ">: problem can have step attribute, and step is arranged in answer and is ' askTemperature ' this problem can be jumped to.
<pattern>: input matching if being unsatisfactory for matching condition, may require that and re-enter.
<answer>: robot thinks deeply and answers a question to be handled herein.Following a variety of processing labels can be contained:
<set name='step'>ask temperature</set>: the numerical value of aleatory variable can be set, variable name supports Chinese
<set name='age'>20 years old</set>: the numerical value of aleatory variable can be set, variable name and numerical value are supportedChinese.Quite such as assignment statement: the age=' 20 years old '
<get>age</get>: obtain 20 years old variable ' age ' numerical value, such as obtain character string ' '.
<if>: condition judges sentence, is exemplified below shown in table:
It is equivalent to above
If (temperature<30.0or temperature>42)
Step=' asks body temperature ';
Return " please input body temperature, the number between 30.0 to 42.0 "
}else
{ print (" body temperature inputs successfully ") }
Recursive language example is as shown in the table:
In order to which the more detailed technical solution to the application is illustrated, below with a specific example, a useThe example of the tcm internal medicine interrogation expert system dialogue of AIPL language design illustrates:
D:\AIPL\python mybot.py
I learning file coldhot.xml
Hello, What's your name? > > Lee
Robot: > following problems I can answer:
Hi is afraid of to tremble with fear, and To Be Protected from Heat, fear of wind, fever
Lee: > be afraid of to tremble with fear
Robot: > do you have cold feeling? y/n
Lee: > y
Robot: > put on more clothes or lid quilt can be alleviated? y/n
Lee: > y
Robot: > fear of wind? y/n
Lee: > y
Robot: > fever? y/n
Lee: > y
Robot: > body temperature please be input, the number between 30.0 to 42.0 will input 1 as decimal
Lee: > 38.1
Robot: > tcm internal medicine interrogation Clinical symptoms:
Sympotoms caused by cold factors are classified as chilly
Heat symptom-complex is classified as hectic fever, body temperature 38.1
Wind disease is classified as foul wind
Tentative diagnosis is anemofrigid cold
Interrogation is completed.
As shown in figure 3, be a kind of structural schematic diagram of human-machine intelligence's processing system embodiment 1 disclosed in the present application, it is describedSystem may include:
Module 301 is obtained, for obtaining the natural language of user's input;
When needing to carry out human-computer interaction, the natural language of user's input is obtained first.For example, obtaining user's input“my name is XX”。
Processing module 302, for being handled based on artificial intelligence process language the natural language, output processing knotFruit, wherein artificial intelligence process language is write using extensible markup language text formatting, an artificial intelligence process language textPart includes multiple topics, and each topic includes multiple question-and-answer problems, and each question-and-answer problem has the input of a support regular expressionWith mode and answer.
Man-machine natural language processing, the design object of new artificial intelligence process language are carried out in order to significantly more efficientIt is as follows:
1, the human-computer dialogue for supporting natural language, supports the natural communicative mode of question answer dialog.
2, input match pattern supports regular expression.Such as:
(I cries | my name is | I be | my name is |) (.*)
' I is xx ', and either ' my name is that either ' I is xx ' or ' my name is xx ' to xx ' for matching.
3, the processing functions such as complete conditional branching/circulation of figure spirit.
4, primary support Chinese and various natural languages, not needing participle can normally be handled.
5, the switching of topic is supported.
6, the dialog process function of having process sequence of supporting expert system to need, can formulate dialog steps, Ke YigengGood design context association and condition judgement processing.
7, expert system is supported to carry out artificial intelligence dialog process in a manner of natural language.
8, the computer language complete with the xml language expression figure spirit of specification is attempted.It has the ability execution of conditional jump (" if "" go to " sentence) and variable data is supported to handle.
Based on above-mentioned target, the application devises a new artificial intelligence process language AIPL (ArtificialIntelligence Process Language).Wherein, the main sentence of AIPL language is illustrated below, as shown in table 1, rightEach label with the remarks of XML <!-- remarks content -- > it is illustrated:
It is handled according to the natural-sounding that AIPL inputs user, finally exports processing result, finishing man-machine interaction.
In conclusion in the above-described embodiments, when needing to carry out human-computer interaction, obtaining the natural language of user's input firstSound is then based on newly-designed artificial intelligence process language and handles natural language, exports processing result, completes man-machine friendshipMutually.Newly-designed artificial intelligence process language is write using extensible markup language text formatting, an artificial intelligence process languageSay that file includes multiple topics, each topic includes multiple question-and-answer problems, and each question-and-answer problem has the defeated of a support regular expressionEnter match pattern and answer, significantly more efficient can carry out man-machine natural language processing, the user experience is improved.
As shown in figure 4, be a kind of structural schematic diagram of human-machine intelligence's processing system embodiment 2 disclosed in the present application, it is describedSystem may include:
Module 401 is obtained, for obtaining the natural language of user's input;
When needing to carry out human-computer interaction, the natural language of user's input is obtained first.For example, obtaining user's input“my name is XX”。
Processing module 402, for the input based on the support regular expression of each question-and-answer problem in work Intelligent treatment voiceMatch pattern and answer, handle natural language, export processing result, wherein artificial intelligence process language use can expandExhibition marking language text format is write, and an artificial intelligence process language file includes multiple topics, and each topic includes multipleQuestion-and-answer problem, each question-and-answer problem have the input match pattern and answer of a support regular expression.
Man-machine natural language processing, the design object of new artificial intelligence process language are carried out in order to significantly more efficientIt is as follows:
1, the human-computer dialogue for supporting natural language, supports the natural communicative mode of question answer dialog.
2, input match pattern supports regular expression.Such as:
(I cries | my name is | I be | my name is |) (.*)
' I is xx ', and either ' my name is that either ' I is xx ' or ' my name is xx ' to xx ' for matching.
3, the processing functions such as complete conditional branching/circulation of figure spirit.
4, primary support Chinese and various natural languages, not needing participle can normally be handled.
5, the switching of topic is supported.
6, the dialog process function of having process sequence of supporting expert system to need, can formulate dialog steps, Ke YigengGood design context association and condition judgement processing.
7, expert system is supported to carry out artificial intelligence dialog process in a manner of natural language.
8, the computer language complete with the xml language expression figure spirit of specification is attempted.It has the ability execution of conditional jump (" if "" go to " sentence) and variable data is supported to handle.
Based on above-mentioned target, the application devises a new artificial intelligence process language AIPL (ArtificialIntelligence Process Language).AIPL is write with xml text formatting.One AIPL file may include multipleTopic, can each there is multiple question-and-answer problems, and each question-and-answer problem has the input match pattern and answer of a support regular expression.The processing such as variable assignments and reading, calculating, condition judgement/circulation, the new corpus file of study is supported in answer.New language withAIML language is incompatible.
Wherein, the main sentence of AIPL language is illustrated below, as shown in table 1, to each label with the remarks of XML <!--Remarks content -- > it is illustrated:
For AIPL language using XML as format, all labels must all have first symbol<symbol>and end mark</symbol>, AIPLMainly there is following label:
<!-- remarks content -->: using xml standard remarks label<!---->
<AIPL version=1.0>: the outermost label of AIPL language, attribute version version number are 1.0, versionNumber do not extend this as current default version 1.0.
<topic name=' weather '>: topic label, name is topic name, supports topic switching, only talks about currentlyInscribe matching problem answer in inventory.Such as weather topic.
<question step=" ask temperature ">: problem can have step attribute, and step is arranged in answer and is ' askTemperature ' this problem can be jumped to.
<pattern>: input matching if being unsatisfactory for matching condition, may require that and re-enter.
<answer>: robot thinks deeply and answers a question to be handled herein.Following a variety of processing labels can be contained:
<set name='step'>ask temperature</set>: the numerical value of aleatory variable can be set, variable name supports Chinese
<set name='age'>20 years old</set>: the numerical value of aleatory variable can be set, variable name and numerical value are supportedChinese.Quite such as assignment statement: the age=' 20 years old '
<get>age</get>: obtain 20 years old variable ' age ' numerical value, such as obtain character string ' '.
<if>: condition judges sentence, is exemplified below shown in table:
It is equivalent to above
If (temperature<30.0or temperature>42)
Step=' asks body temperature ';
Return " please input body temperature, the number between 30.0 to 42.0 "
}else
{ print (" body temperature inputs successfully ") }
Recursive language example is as shown in the table:
In order to which the more detailed technical solution to the application is illustrated, below with a specific example, a useThe example of the tcm internal medicine interrogation expert system dialogue of AIPL language design illustrates:
D:\AIPL\python mybot.py
I learning file coldhot.xml
Hello, What's your name? > > Lee
Robot: > following problems I can answer:
Hi is afraid of to tremble with fear, and To Be Protected from Heat, fear of wind, fever
Lee: > be afraid of to tremble with fear
Robot: > do you have cold feeling? y/n
Lee: > y
Robot: > put on more clothes or lid quilt can be alleviated? y/n
Lee: > y
Robot: > fear of wind? y/n
Lee: > y
Robot: > fever? y/n
Lee: > y
Robot: > body temperature please be input, the number between 30.0 to 42.0 will input 1 as decimal
Lee: > 38.1
Robot: > tcm internal medicine interrogation Clinical symptoms:
Sympotoms caused by cold factors are classified as chilly
Heat symptom-complex is classified as hectic fever, body temperature 38.1
Wind disease is classified as foul wind
Tentative diagnosis is anemofrigid cold
Interrogation is completed.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with otherThe difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodimentFor, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method partIt is bright.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosureAnd algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware andThe interchangeability of software generally describes each exemplary composition and step according to function in the above description.TheseFunction is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.ProfessionTechnical staff can use different methods to achieve the described function each specific application, but this realization is not answeredThink beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processorThe combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only depositReservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technologyIn any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined hereinGeneral Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the applicationIt is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase oneThe widest scope of cause.