Summary of the invention
The problems referred to above existed for the existing method being trained robot, now provide one to be intended to
Realize supporting system and the side that robot is trained by the user not having programming development basis by voice
Method.
Concrete technical scheme is as follows:
A kind of system robot being trained by voice, including:
One receives unit, is used for receiving voice signal;
One resolution unit, connects described reception unit, for resolving described voice signal, by institute
Predicate tone signal is mated with default statement, obtain with described default statement matching and with described voice
The conditional statement that signal is corresponding, and the execution statement corresponding with described voice signal;
One processing unit, connects described resolution unit, for by described conditional statement and described execution statement
In conjunction with generating a target entry;
One memory element, connects described processing unit, in order to store default entry, according to described default bar
Robot is trained by mesh;
Described processing unit carries out weight calculation according to described target entry, and ties according to described weight calculation
Fruit processes accordingly.
Preferably, described resolution unit includes:
One first modular converter, for being converted to Word message by described voice signal;
One semantic module, connects described first modular converter, for solving described Word message
Analysis, mates described Word message with described default statement, obtains and described default statement matching
And the conditional statement corresponding with described Word message, and identify that described conditional statement is normal formula conditional statement
Or reaction type conditional statement;
If described conditional statement is normal formula conditional statement, then obtain the execution corresponding with described fileinfo
Statement;
If described conditional statement is reaction type conditional statement, then carry out weight computing, make described robot hold
The operation of the last task of row.
Preferably, described resolution unit also includes:
One second modular converter, connects described semantic module, for being converted to by described execution statement
Corresponding audio signal, and export.
Preferably, each described default entry includes pre-conditioned statement and presets execution statement.
Preferably, described processing unit is according to the described conditional statement in described target entry, and traversal is described
The described pre-conditioned statement in all described default entry in memory element, to obtain described condition language
Whether sentence repeats with described pre-conditioned statement, if not repeating, then carries out described weight computing, and by institute
State target entry to be stored in described memory element to form new described default entry, preset according to described
Robot is trained by entry;If repeating, carry out described weight computing, and according to described weight calculation
Result processes accordingly.
A kind of method being trained robot by voice, is comprised the steps:
S1. voice signal is gathered;
S2. described voice signal is resolved, described voice signal is mated with default statement,
Obtain and described default statement matching and corresponding with described voice signal conditional statement, and with institute's predicate
The execution statement that tone signal is corresponding;
S3. described conditional statement is combined with described execution statement generation one target entry;
S4. carry out weight calculation according to described target entry, and carry out phase according to described weight calculation result
The process answered.
Preferably, described step S2 specifically includes:
S21. described voice signal is converted to Word message;
S22. described Word message is resolved, described Word message and described default statement are carried out
Join, obtain and described default statement matching and corresponding with described Word message conditional statement, and identify
Described conditional statement is normal formula conditional statement or reaction type conditional statement;
If described conditional statement is normal formula conditional statement, then obtain the execution corresponding with described fileinfo
Statement;
If described conditional statement is reaction type conditional statement, then carry out weight computing, make described robot hold
The operation of the last task of row.
Preferably, described step S2 also includes:
S23. described execution statement is converted to corresponding audio signal, and exports.
Preferably, each described default entry includes pre-conditioned statement and presets execution statement.
Preferably, described step S3 specifically includes:
S31. according to the described conditional statement in described target entry, owning in described memory element is traveled through
Described pre-conditioned statement in described default entry;
S32. traversing result is obtained, it is judged that whether described conditional statement repeats with described pre-conditioned statement,
If described conditional statement does not repeats with described pre-conditioned statement, then perform step S33;
If described conditional statement repeats with described pre-conditioned statement, then perform step S34;
S33. carry out described weight computing, and described target entry is stored in described memory element with shape
The described default entry of Cheng Xin, is trained robot according to described default entry;
S34. carry out described weight computing, and process accordingly according to described weight calculation result.
The beneficial effect of technique scheme:
In the technical program, in system robot being trained by voice, pass through resolution unit
Carry out voice signal resolving and obtain corresponding conditional statement and perform statement, by processing unit by condition
Statement and execution statement combine and generate entry, make robot train accordingly according to entry, and efficiency is high
And error rate is low.In method robot being trained by voice, user input voice is only needed to believe
Number robot can be trained, simple to operate, applied widely and efficiency is high.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out
Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and
It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not making
The every other embodiment obtained on the premise of going out creative work, broadly falls into the scope of protection of the invention.
It should be noted that in the case of not conflicting, the embodiment in the present invention and the spy in embodiment
Levy and can be mutually combined.
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings, but not as the present invention's
Limit.
As it is shown in figure 1, a kind of system robot being trained by voice, including:
One receives unit 1, is used for receiving voice signal;
One resolution unit 2, connects and receives unit 1, for resolving voice signal, by voice signal
Mate with default statement, obtain and that preset statement matching and corresponding with voice signal conditional statement,
And the execution statement corresponding with voice signal;
One processing unit 3, connects resolution unit 2, for conditional statement is combined generation one with execution statement
Target entry;
One memory element 4, connects processing unit 3, in order to store default entry, according to default entry to machine
Device people be trained;
Processing unit 3 carries out weight calculation according to target entry, and carries out accordingly according to weight calculation result
Process.
In the present embodiment, the system using voice to be trained robot can be applicable to child's type toy
In, although child does not possess the programming development technical ability of specialty, but child can pass through natural language and machine
People exchanges, and image training robot performs corresponding action.
In the present embodiment, for the optimization process of robot behavior logic development, have selected and be suitable for commonly
The mode that user and robot interact, makes user be absorbed in instruction in the process being trained robot
White silk logic itself, rather than development language, improve work efficiency and reduce error rate.Single by resolving
Voice signal is carried out resolving the corresponding conditional statement of acquisition and performing statement, by processing unit 3 by unit 2
Conditional statement and execution statement are combined and generate entry, makes robot train accordingly according to entry,
Efficiency is high and error rate is low.
In a preferred embodiment, resolution unit 2 includes:
One first modular converter 21, is used for converting voice signals into Word message;
One semantic module 22, connects the first modular converter 21, for Word message is resolved,
Word message is mated with default statement, obtains with that preset statement matching and corresponding with Word message
Conditional statement, and identify that conditional statement is normal formula conditional statement or reaction type conditional statement;
If conditional statement is normal formula conditional statement, then obtain the execution statement corresponding with fileinfo;
If conditional statement is reaction type conditional statement, then carries out weight computing, make robot perform the last time
The operation of task.
In the present embodiment, the clause that target entry is corresponding may is that
As A, with regard to B;
If during A, then B;
Not again when A, it is B;
This time should be B;
This is wrong;
Do so not to.
Wherein, " as A ", " if during A ", " the most again when A ", and " this
Time " it is normal formula conditional statement;" this is wrong " and " do so be not to " is anti-
Feedback formula conditional statement.
The whole training process of the system that robot is trained by employing voice is: close when recognizing training
During key clause, robot enters training mode, and user can use clause similar to above to talk with robot
Time, by the semantic module 22 of resolution unit 2, user's word is divided into part A and part
B, through semantic conversion, is converted to part A condition exploitation statement, is converted to part B perform to move
Make exploitation statement, the incidence relation of part A and part B is appended to the training knowledge base (storage of this locality
Unit 4), and part A and part B are combined the entry that formation is new, such as fruit part A and training knowledge
Condition exploitation statement in storehouse is identical, part B and corresponding execution action exploitation statement in training knowledge base
Difference, then part A is that two conditions are the same but perform the knowledge entry of different action, need to carry out weight fortune
Calculating, weight computing comprises the positive and negative feedback of user, and the additional time considers, and new knowledge entry is chased after
It is added to local knowledge base, and updates training knowledge base.When recognizing the exchange of common natural language, training
Pattern terminates, and robot terminates training and revert to poll judgment model, goes through owning in training knowledge base
Entry, when hitting a certain bar knowledge entry, then performs the execution action exploitation included in knowledge entry
Statement.
In the present embodiment, the first modular converter 21 can use automatic speech recognition (Automatic Speech
Recognition, ASR) technology, ASR technology can be by the vocabulary Content Transformation in human speech for calculating
Content that machine is readable also inputs computer, and interact with computer.
Semantic module 22 uses natural language processing (the Natural Language of artificial intelligence
Processing, NLP) technology, by the conditional statement in NLP technical limit spacing Word message and execution language
Sentence.
In a preferred embodiment, resolution unit 2 also includes:
One second modular converter 23, connects semantic module 22, for being converted to accordingly by execution statement
Audio signal, and export.
In the present embodiment, the second modular converter 23 uses the TTS (Text To Speech) will text
Being converted to voice technology, this technology is an interactive part, allows the robot to speak by TTS.
In a preferred embodiment, each default entry includes pre-conditioned statement and presets execution statement.
In a preferred embodiment, processing unit 3 is according to the conditional statement in target entry, traversal storage
Whether the pre-conditioned statement in all default entry in unit, obtain conditional statement with pre-conditioned
Statement repeats, if not repeating, then carries out weight computing, and target entry is stored in memory element 4
To form new default entry, according to default entry, robot is trained;If repeating, carry out weight
Computing, and process accordingly according to weight calculation result.
In the present embodiment, can be after additional new knowledge entry or original knowledge entry, when receiving user's
During positive and negative feedback, carry out weight computing, arrange whole training knowledge base, be compressed waiting work, to protect
The card robot efficiency when condition poll judges.
As in figure 2 it is shown, a kind of method robot being trained by voice, comprise the steps:
S1. voice signal is gathered;
S2. voice signal is resolved, voice signal is mated with default statement, obtain with pre-
If statement matching and corresponding with voice signal conditional statement, and the execution statement corresponding with voice signal;
S3. conditional statement is combined generation one target entry with execution statement;
S4. carry out weight calculation according to target entry, and process accordingly according to weight calculation result.
In the present embodiment, user input voice signal is only needed can robot to be trained, operation letter
Single, applied widely and efficiency is high.
As it is shown on figure 3, in a preferred embodiment, step S2 specifically includes:
S21. Word message is converted voice signals into;
S22. Word message is resolved, Word message is mated with default statement, obtain with pre-
If statement matching and corresponding with Word message conditional statement, and identify that conditional statement is normal formula condition
Statement or reaction type conditional statement;
If conditional statement is normal formula conditional statement, then obtain the execution statement corresponding with fileinfo;
If conditional statement is reaction type conditional statement, then carries out weight computing, make robot perform the last time
The operation of task.
In the present embodiment, convert voice signals into Word message and can use automatic speech recognition
(Automatic Speech Recognition, ASR) technology, ASR technology can be by human speech
Vocabulary Content Transformation is computer-readable input, and interacts with computer.
Carry out Word message resolving natural language processing (the Natural Language that can use artificial intelligence
Processing, NLP) technology, by the conditional statement in NLP technical limit spacing Word message and execution language
Sentence.
In a preferred embodiment, step S2 also includes:
S23. execution statement is converted to corresponding audio signal, and exports.
In the present embodiment, employing TTS (Text To Speech, convert text to voice) technology will
Performing statement and be converted to corresponding audio signal, this technology is an interactive part, is made by TTS
Robot can speak.
In a preferred embodiment, each default entry includes pre-conditioned statement and presets execution statement.
As shown in Figure 4, in a preferred embodiment, step S3 specifically includes:
S31. according to the conditional statement in target entry, in all default entry in traversal memory element
Pre-conditioned statement;
S32. obtain traversing result, and carry out weight calculation
Whether Rule of judgment statement repeats with pre-conditioned statement,
If conditional statement does not repeats with pre-conditioned statement, then perform step S33;
If conditional statement repeats with pre-conditioned statement, then perform step S34;
S33. carry out weight computing, and be stored in target entry in memory element to form new default bar
Mesh, is trained robot according to default entry;
S34. carry out weight computing, and process accordingly according to weight calculation result.
In the present embodiment, when robot in the afternoon when hear that user says " hello " time, Yong Huxun
The training step practicing robot reply " XXX (name), good afternoon " is as follows:
A1. robot is said " hello " by user, " this time should be said, XXX, and good afternoon "
A2. the content said user carries out semantic parsing, isolates the execution statement spoken in content and i.e. " says
XXX, good afternoon ", " saying " is the TTS service of corresponding robot, and " XXX " hit is current interactive
The name of user, " afternoon " hits the current time, " XXX, good afternoon " corresponding TTS service
Content;
A3. new knowledge base entry is generated according to semantic analysis result, it is judged that be appended to this locality after weight and know
Know storehouse;
A4. robot performs new knowledge base, terminates;
After completing current interactive training, when robot is said " hello " by user, robot will return
Answer " XXX, good afternoon ", thus reach expection training objectives.
The present invention can make user liberate both hands when image training robot, need not write the situation of any code
Under, it is achieved the correction to robot behavior, make user focus more on training content itself in the training process,
Rather than how to write on the underlying issues such as code.
The foregoing is only preferred embodiment of the present invention, not thereby limit embodiments of the present invention and
Protection domain, to those skilled in the art, it should can appreciate that all utilization description of the invention
And the equivalent done by diagramatic content and the scheme obtained by obvious change, all should comprise
Within the scope of the present invention.