Summary of the invention
The objective of the invention is:, provide a kind of natural language that utilizes simple to operate, easy to use to control the system and method for controlled object at the deficiencies in the prior art.Further in order to realize a kind of human-computer interaction interface of similar natural language dialogue mode.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
A kind of method of utilizing the natural language setting and operating controlled object, adopt a database, store the keyword of the control command of some minimized natural language forms in this database in advance, and all corresponding discernible basic controlling order element of controlled object of each keyword; And comprise the steps:
Steps A, reception user be the control command to described controlled object of the natural language form that meets the ordinary language custom of input arbitrarily;
Step B, based on described database, the control command of described natural language form is translated into the discernible basic controlling instruction of described controlled object;
Step C, the instruction of described basic controlling is acted on described controlled object.
Preferably, described step B can comprise:
The instruction splitting step is compared the control command of described natural language form and the keyword in the described database, and extracts the identical keyword of comparison from the control command of described natural language form;
The instruction translation step, based on described database, extract the keyword that obtains according to described instruction splitting step, obtain its pairing basic controlling order element, and, described basic controlling order element permutation and combination is obtained the discernible basic controlling instruction of described controlled object according to the discernible basic controlling order format of predefined controlled object.
Preferably, described basic controlling order format can be set at: the 1st parameter item+...+the i parameter item+...+the n parameter item, wherein n is a natural number, i=1,2 ..., n; And it is wherein interrelated between each parameter item;
Basic controlling order element in the described database is according to its pairing parameter item packet memory, and set up index according to the incidence relation between each parameter item in the described database, make the basic controlling order element that belongs to i parameter item corresponding with the one or more basic controlling order elements that belong to i+1 parameter item.
Preferably, in the described instruction translation step,, extract the keyword that obtains according to described instruction splitting step based on described database, obtain its pairing basic controlling order element can for:
If extract 1 keyword, then the keyword in this keyword and the database is compared, search its pairing basic controlling order element;
If extract a plurality of keywords, then will extract the previous keyword of acquisition and the keyword in the database and compare, find its pairing previous basic controlling order element, and the pairing previous parameter item of this basic controlling order element; Then according to the sequencing of keyword in the control command of described natural language form, utilize described index, according to the corresponding relation of the basic controlling order element of a previous basic controlling order element in the previous parameter item and a back parameter item, in the basic controlling order element of a back parameter item, search successively and the pairing back basic controlling order element of a back keyword.
Preferably, in the described instruction translation step,, described basic controlling order element permutation and combination is obtained the instruction of the discernible basic controlling of described controlled object according to the discernible basic controlling order format of predefined controlled object, can for:
According to the pairing parameter item of described basic controlling order element, the basic controlling order element that will obtain from database lookup is filled into the described basic controlling order format as the data of this parameter item;
If each parameter item in the described basic controlling order format all is filled with data, then the combination with these data generates the basic controlling instruction;
Belong to same parameter item if search a plurality of basic controlling order elements that obtain, then when basic controlling order element of a keyword correspondence, the sequencing that in the control command of described natural language form, occurs according to keyword, many basic controlling instructions of corresponding generation, when the corresponding a plurality of basic controlling order element of keyword, select one of them basic controlling order element to be used to generate the basic controlling instruction.
Further, if each parameter item in the described basic controlling order format exists not to fill as data with the corresponding basic controlling order element of keyword, then judge whether and to be filled into this parameter item with the data of acquiescence, if do not have, then according to the basic controlling order element of filling in its previous parameter item, utilize described index, from described database, find basic controlling order element corresponding in this parameter item that is not filled, when searching the basic controlling order element that obtains when unique, searching the basic controlling order element that obtains with this is filled in the described parameter item that is not filled as data, otherwise, all basic controlling order element reverse translation in this parameter item that is not filled are become the answer language of the natural language form of prompting user affirmation, and export this answer to the user and speak.
Further, also store the answer language of the natural language form corresponding in the described database in advance with the duty of described controlled object and/or execution result; And described method further can comprise:
Step D obtains the duty and/or the execution result of described controlled object;
Step e according to the duty and/or the execution result of described controlled object, obtains the answer language of corresponding natural language form based on described database lookup, and shows this answer language.
A kind of system that utilizes the natural language setting and operate controlled object comprises natural language receiver module, command interpretation module, command execution module and controlled object,
Described natural language receiver module is used to receive the arbitrarily control command to described controlled object of the natural language form that meets the ordinary language custom of input of user;
Described command interpretation module, wherein be provided with database, described databases contains the keyword of the control command of some minimized natural language forms, and all corresponding discernible basic controlling order element of controlled object of each keyword, described command interpretation module is used for based on described database, to translate into the discernible basic controlling instruction of described controlled object from the control command of the natural language form of described natural language receiver module;
Described command execution module is used for described basic controlling instruction is acted on described controlled object.
Described command interpretation module further can comprise the instruction split cells, be used for the control command of described natural language form and the keyword of described database are compared, and from the control command of described natural language form, extract the identical keyword of comparison;
Described command interpretation module further can comprise the instruction translation unit, be used for based on described database, extract the keyword that obtains according to described instruction split cells, obtain its pairing basic controlling order element, and, described basic controlling order element permutation and combination is obtained the discernible basic controlling instruction of described controlled object according to the discernible basic controlling order format of predefined controlled object.
Described command interpretation module further can comprise the intelligent replying unit;
Also store the answer language of the natural language form corresponding in the described database with the duty of described controlled object and/or execution result;
Described command execution module is further used for obtaining the duty and/or the execution result of described controlled object;
Described intelligent replying unit is used for duty and/or the execution result of basis from the controlled object of command execution module, obtains the answer language of corresponding natural language form based on described database lookup, and exports; And/or be used for based on described database, will become the answer language of the natural language form of prompting user affirmation from the basic controlling order element reverse translation of described instruction translation unit, and output.
In technique scheme, the present invention is owing to can directly receive the arbitrarily steering order of the natural language form of input of user, therefore not only simplified control flow, made the operation interface also can be short and sweet, also reduced requirement, greatly facilitated use user's specialized capability.
Embodiment
Core concept of the present invention is, control command with the random natural language form of importing that meets the ordinary language custom of user, based on database technology, translate into the discernible basic controlling instruction of controlled object, realization utilizes the control command of natural language form to control the function of controlled object.Thereby can simplify control procedure, make operation interface also become more short and sweet.
It is pointed out that described controlled object comprises soft, the hardware cell of computing machine herein, soft, the hardware cell of portable electric appts, the household electrical appliance of robotization control etc.
Below in conjunction with Figure of description and specific embodiment the present invention is described in further detail.
With reference to figure 1, a kind of system that utilizes natural language to control controlled object of the present invention comprises natural language receiver module, command interpretation module, command execution module and controlled object,
Described natural language receiver module is used to receive the arbitrarily control command to described controlled object of the natural language form that meets the ordinary language custom of input of user;
Described command interpretation module is used for the control command from the natural language form of described natural language receiver module, translates into the discernible basic controlling instruction of described controlled object;
Described command execution module is used for described basic controlling instruction is acted on described controlled object.
Wherein, described natural language receiver module can be for offering user's control commands literal inputting interface, input window etc.
Comprise database in the described command interpretation module, described databases contains the keyword of the control mode of some minimized natural language forms, and all corresponding discernible basic controlling order element of controlled object of each keyword; Obvious for some natural language steering order colloquial style features, the people's of different regions the different language difference problems that caused of the custom of speaking, for the fault-tolerance that better improves instruction interpretation, intelligent, also can adopt the magnanimity method of exhaustion simultaneously, make database include phrasal linguistic form as much as possible and vocabulary as keyword, when running into unaccountable instruction, by in high-volume database, searching for, relatively the degree of approximation is found out occurrence, finishes explanation.The notebook data storehouse also can be by network upgrade, or the user form such as adds voluntarily, constantly increases its vocabulary.
Described command interpretation module further comprises the instruction split cells, is used for the control command of described natural language form and the keyword of described database are compared, and extracts the identical keyword of comparison from the control command of described natural language form; Should be pointed out that herein " comparing identical " not only can comprise the on all four situation of comparison result, can also comprise that comparison result is the close the highest situation of the degree of approximation in other words.
Described command interpretation module further comprises the instruction translation unit, be used for based on described database, extract the keyword that obtains according to described instruction split cells, obtain its pairing basic controlling order element, and, described basic controlling order element permutation and combination is obtained the discernible basic controlling instruction of described controlled object according to the discernible basic controlling order format of predefined controlled object.
Described herein " controlled object can be discerned " comprises that controlled object can directly receive and carry out the basic controlling instruction of corresponding operating, perhaps controlled object can be by its existing driver module or application module that can carry out data interaction with system of the present invention, receives and the basic controlling instruction is converted into the steering order that it can carry out corresponding operating.
Described command execution module be specially can with the module of controlled object communication, it can be by the agreement of predefined and controlled object communication, or obtain the activation bit of controlled object and according to this activation bit, communication interface by controlled object will send to controlled object from the basic controlling instruction of order explanation module, or obtain its current working state information from controlled object.The specific implementation of this module is different because of the difference of controlled object.Generally realize in modes such as device driver, hardware vendor's secondary development bag, dynamic link library, com component, device files, such as: the USB interface camera is installed under Windows, is needed to install the device driver that meets Microsoft Kernel Streaming Class standard.
The one of ordinary skilled in the art should learn, the realization of described command execution module can be adopted prior art, as the development kits such as DirectShow SDK that provide by Microsoft, can realize to the USB camera video playback, suspend, record and the setting of various parameters.Repeat no more herein.
In addition, consider that the user can only change by the state of observing controlled object and know whether control is effective or proper in the present control procedure for controlled object after control command is acted on controlled object.Therefore on the one hand, whether the control that judges of many situations is effective or properly all need certain specialized capability, on the other hand, controlled object also not necessarily exists intuitively, and state changes, this makes the user can't judge whether control is effective, and on the one hand, this control procedure can not realize man-machine conversation again, intelligent degree is lower, the operating process dullness.
Given this, as further prioritization scheme, command interpretation module of the present invention further comprises the intelligent replying unit;
Also store the answer language of the natural language form corresponding in the described database with the duty of described controlled object and/or execution result;
Described command execution module is further used for obtaining the duty and/or the execution result of described controlled object;
Described intelligent replying unit is used for duty and/or the execution result of basis from the controlled object of command execution module, obtains the answer language of corresponding natural language form based on described database lookup, and exports; And/or be used for based on described database, will become the answer language of the natural language form of prompting user affirmation from the basic controlling order element reverse translation of described instruction translation unit, and output.
By the intelligent replying unit, the user can carry out man-machine conversation based on the natural language form with controlled object, not only can understand the duty of controlled object at any time, whether the control to controlled object is effective or proper, with timely adjustment or revise control to controlled object, and whole control process is also more lively, popular, directly perceived.
System of the present invention can control effectively to the controlled object in this locality, described system also comprises display module, described natural language receiver module receives the control command of the natural language form of local user's input, and described intelligent replying unit exports the answer language of natural language form to described display module demonstration.
System of the present invention can also realize the Long-distance Control of controlled object, described system also comprises the remote data transmission module, described natural language receiver module is by the control command of described remote data transmission module reception from long-distance user's natural language form, and described intelligent replying unit is exported to the long-distance user with the answer language of natural language form by described remote data transmission module.Described remote data transmission module can be the network data transmission module that is used to insert internet or LAN (Local Area Network), the GPRS that is used for accessing mobile communication network or CDMA 1X control module, perhaps is used for the bluetooth, infrared ray control module of long distance wireless transmission etc.Like this, the user can pass through internet, mobile communications network or other wired or wireless mode long-range, the controlled object of control native system.
Described display module also can be used for showing the steering order of the natural language form that receives from the natural language receiver module, and/or shows the answer language of exporting to described remote data transmission module from described intelligent replying unit.
With reference to figure 2, the present invention also provides a kind of method of utilizing natural language to control controlled object, this method adopts a database, wherein store the keyword of the control command of some minimized natural language forms in advance, and all corresponding discernible basic controlling order element of controlled object of each keyword; In addition, can also store the answer language of the natural language form corresponding in the described database in advance with the duty of described controlled object and/or execution result;
This method of utilizing natural language to control controlled object is specially:
200, receive the arbitrarily control command to described controlled object of the natural language form that meets the ordinary language custom of input of user;
201, the control command of described natural language form is translated into the discernible basic controlling instruction of described controlled object;
Described step 201 specifically comprises:
The instruction splitting step is compared the control command of described natural language form and the keyword in the described database, and extracts the identical keyword of comparison from the control command of described natural language form;
The instruction translation step, based on described database, extract the keyword that obtains according to described instruction splitting step, obtain its pairing basic controlling order element, and, described basic controlling order element permutation and combination is obtained the discernible basic controlling instruction of described controlled object according to the discernible basic controlling order format of predefined controlled object;
202, described basic controlling instruction is acted on described controlled object.
Further, as a kind of scheme of optimization, this method also can have the step of intelligent replying, that is:
203, obtain the duty and/or the execution result of described controlled object;
204, according to the duty and/or the execution result of described controlled object, obtain the answer language of corresponding natural language form, and show this answer language based on described database lookup.
In said method, described basic controlling order format can be set at:
The 1st parameter item+...+the i parameter item+...+the n parameter item,
Wherein n is a natural number, i=1, and 2 ..., n.
Wherein interrelated between each parameter item.
Basic controlling order element in the described database is according to its pairing parameter item packet memory, and set up index according to the incidence relation between each parameter item in the described database, make the basic controlling order element that belongs to i parameter item corresponding with the one or more basic controlling order elements that belong to i+1 parameter item.
In the above-mentioned instruction translation step,, extract the keyword that obtains, obtain its pairing basic controlling order element and be specially according to described instruction splitting step based on described database:
If extract 1 keyword, then the keyword in this keyword and the database is compared, search its pairing basic controlling order element;
If extract a plurality of keywords, then will extract the previous keyword of acquisition and the keyword in the database and compare, find its pairing previous basic controlling order element, and the pairing previous parameter item of this basic controlling order element; Then according to the sequencing of keyword in the control command of described natural language form, utilize described index, according to the corresponding relation of the basic controlling order element of a previous basic controlling order element in the previous parameter item and a back parameter item, in the basic controlling order element of a back parameter item, search successively and the pairing back basic controlling order element of a back keyword.
Certainly, in the described instruction translation step, also each keyword of being extracted and all keywords in the database can be compared, in all parameter items, search pairing basic controlling order element.
In the above-mentioned instruction translation step,, described basic controlling order element permutation and combination is obtained the discernible basic controlling instruction of described controlled object, is specially according to the discernible basic controlling order format of predefined controlled object:
According to the pairing parameter item of described basic controlling order element, the basic controlling order element that will obtain from database lookup is filled into the described basic controlling order format as the data of this parameter item;
If each parameter item in the described basic controlling order format all is filled with data, then the combination with these data generates the basic controlling instruction;
If each parameter item in the described basic controlling order format exists not to fill as data with the corresponding basic controlling order element of keyword, then judge whether and to be filled into this parameter item with the data of acquiescence, if do not have, then according to the basic controlling order element of filling in its previous parameter item, utilize described index, from described database, find basic controlling order element corresponding in this parameter item that is not filled, when searching the basic controlling order element that obtains when unique, searching the basic controlling order element that obtains with this is filled in the described parameter item that is not filled as data, otherwise, start the intelligent replying function, all basic controlling order element reverse translation in this parameter item that is not filled are become the answer language of the natural language form of prompting user affirmation, and export this answer to the user and speak.
Belong to same parameter item if search a plurality of basic controlling order elements that obtain, then when basic controlling order element of a keyword correspondence, the sequencing that in the control command of described natural language form, occurs according to keyword, many basic controlling instructions of corresponding generation, when the corresponding a plurality of basic controlling order element of keyword, select one of them basic controlling order element to be used to generate the basic controlling instruction.
In the method, if receive control command from the natural language form of local user's input, then show described answer language,, then described answer language is sent to remote user end and show if receive control command from long-distance user's natural language form in this locality.
Clearer for the technical scheme that makes method and system of the present invention, understand, will be applied in the example that is controlled to be with the present invention below to the family expenses camera, further describe technical scheme of the present invention.
The system and method that utilizes natural language to control controlled object of following examples is embodied as with computing machine and combines, the system and method for control family expenses camera.Each module of native system all can be embodied as soft, the hardware module that is arranged in the computing machine, and described database also can be stored in the computing machine.Each step of this method can be carried out by soft, hardware module in the computing machine.
Known, can comprise the steering order of embedded The Cloud Terrace camera: the control of in three dimensions, rotate/move the control of change, the control of the length of time shutter, the image light and shade color of (as above down about), focal length, target being discerned, followed the tracks of etc.Therefore, the basic controlling order format of setting camera is:
OBJECT+ACTIONS+PROPERTIES+SCALES; That is,
Target+action+attribute+specification.
Wherein each parameter item is explained as follows:
Target: characterize the object that is applied in control.Has A1, A2, A3 ... B1, B2, numberings such as B3 are as existing a plurality of controlled objects in the system, then in database, add different numberings according to the order correspondence of different models and loading, also can as having only a controlled object camera in the system, then give tacit consent to the B3 that is numbered of this camera by numbering of system default.
Action: characterize the concrete control procedure that object is applied.Such as then having: MV (move rotation), CP (capture seizure), ZM (zoom convergent-divergent), RC (record records), PV actions such as (preview preview video) to camera.
Attribute: characterize the attribute of each action, promptly follow different actions, different attributes is arranged.Attribute such as MV has: UP, and DN, LF, RT (up and down), the attribute of PV has: ON, OFF, (open, close)
Specification: for the quantification of attribute, such as UP, DN, LF, the digital 01-99 that is quantified as of RT represents the angle of rotating; PV ON, the specification of OF has VG, QV, CF, QC (different preview resolution) (VGA, QVGA, CIF, QCIF etc.)
Order is given an example:
B3-MV-LF-03, camera B3 3 step-lengths that turn left
B3-PV-ON-QV, camera B3 opens video preview with the resolution of QVGA (160 * 120).
Wherein, the setting of each keyword and basic controlling order element should be both representative, can comprise the keyword in the natural language as much as possible, represents the implication of natural language, can camera can be discerned with relevant again to the original steering order of camera.
Therefore can set up following list in advance in the database:
Target |
Action |
Attribute |
Specification |
Keyword |
The basic controlling order element |
Keyword |
The basic controlling order element |
Keyword |
The basic controlling order element |
Keyword |
The basic controlling order element |
Camera |
B3 ? ? ? ? ? |
Rotation moves move |
? ? MV ? ? ? |
Human face scanning up and down |
UP DN LF ? RT FC SC |
Xx step xx degree |
? 01~99 ? 1~90 ? ? |
The seizure photograph capture that takes pictures |
? CP ? ? |
The x that delays time immediately divides back x after second |
NW DL ? M1..3 S1..3 |
Xx opens xx and divided xx xx second hour |
Fx Mx ? Sx Hx |
It is bright to expose |
? ? EP ? ? |
Switch |
? ON ? OF ? |
Second divide hour |
? 00~60 ? ? ? |
Flashlamp is bright |
? ? LT ? ? |
Switch |
? ON ? OF ? |
Second divide hour |
? 00~60 ? ? ? |
Preview preview video Video |
? PV ? ? |
Switch |
ON ? OF ? |
VGA QVGA ? CIF QCIF |
VG QV ? CF QC |
If other controlled object is arranged, can in described database, be respectively each controlled object and set up above-mentioned list.
Below in conjunction with concrete examples of applications, illustrate that soft, the hardware of computing machine is realized workflow of the present invention.
1. instruction is obtained;
Soft, the hardware system of described computing machine can provide the interface of user's operation as described natural language receiver module and display module, and this interface can comprise that the user imports the window of the control command of natural language form, shows intelligent replying and the window of control command and the window of display video image.
Described command interpretation module is received the control command of the natural language form that the user imports, and carries out following steps:
2. instruction splits, and promptly extracts keyword from the control command of described natural language form;
As previously mentioned, set up a database in the native system in advance, stored the keyword of the control command of multiple possible minimized natural language form.
This step by with database in deposited keyword and compared, judge and extract keyword in the control command that is received.
The control command of the natural language form that for example receives is:
The flashlamp pass.
Then instruct in the splitting step, at first in retrieval " the flashlamp pass " the words the keyword that exists in how many databases is arranged.
Promptly based on database, look into the keyword in the control command of natural language form, carry out one time relatively complete.Can find that from aforesaid database list " the flashlamp pass " comprises " flashlamp " and " pass " two keywords.
Then can be earlier according to keyword " flashlamp ", find its corresponding basic controlling order element " LT ", and " LT " pairing action parameter item, because the action parameter item is associated with the property parameters item, then further utilize database index, in " LT " corresponding property parameters item (comprising open and close), search the basic controlling order element " OF " of keyword " pass "
3. instruction translation promptly according to keyword, obtains corresponding basic controlling order element, and according to the discernible basic controlling order format of predefined camera, described basic controlling order element permutation and combination is become the basic controlling instruction;
Each keyword correspondence the basic controlling order element of an actual camera control in the database.With the order element of comprehensive all keyword correspondences,, obtain the basic controlling instruction in this step through classification and ordination.
Continuation is an example with aforesaid " the flashlamp pass ":
With " LT " and " OFF " respectively as the described basic controlling order format of being filled into of data correspondence: in target+action+attribute+specification.
Find to also have in this basic controlling order format target component item and specifications parameter Xiang Wei to be filled data then, judge further then whether they all have the data of acquiescence respectively, as previously mentioned, the default data that system can set in advance the target component item is B3, promptly represent camera B3, therefore B3 is filled in the target component item.Because the user does not provide the instruction of closing camera after the delay how long, so system can module specifications parameter item be 00.
Promptly obtain the basic controlling instruction and be B3+LT+OF+00.
4. instruction is carried out, and is about to the basic controlling instruction and acts on camera;
In the present embodiment, this step can adopt existing technical scheme to realize, promptly system is by the driver of camera, basic controlling is instructed after the B3+LT+OF+00 format, and call function CloseLamp (0,0), the control camera is closed flashlamp.
Again for example, the control command of the natural language form of input is:
Bright
From aforementioned database table list, can find the corresponding LT of this " bright " and two action parameter items of EP (exposure), therefore can not determine that flashlamp is bright or the picture shading value is bright?
The situation that a plurality of basic controlling order elements belong to a parameter item appears obtaining this moment, and belong to the corresponding a plurality of basic controlling order elements of a keyword, therefore can be used to generate the basic controlling instruction by optional immediately one of them the basic controlling order element of system.System can choose one wantonly, is because the result can be the same, and picture is brightened.
Certainly, also can according to circumstances judge by system,
Can generate basic controlling instruction B3+LT+ON+00 earlier such as system
Found that flashlamp is bright!
Then system changes B3+EP+UP+01 (time shutter increases a chronomere) into from being about to basic controlling instruction
Again for example, the control command of described natural language form is:
Left-hand rotation 30 degree, track human faces
Then resolve and obtain: find 2 keyword " left side " and " people's faces " that belong in the property parameters item, corresponding basic controlling order element is " LF " and " FC ".Belong to and search the situation that a plurality of basic controlling order elements that obtain belong to same parameter item, and the corresponding basic controlling order element of keyword.Then the sequencing that occurs in the control command of described natural language form according to keyword generates many basic controlling instructions accordingly.Promptly generate two groups of format orders,
Preliminary translation: B3+MV+LF+30
B3+MV+SC+00
Carry out successively sequentially.
5. intelligent replying is promptly realized the man-machine conversation between system and the user;
Intelligent replying function among the present invention generally can be specifically embodied as following several application scenarios.
(1) the general answer:
The answer language of described natural language form is placed in the database in advance, is associated with the duty/execution result of described local camera.
In the general Recovery Process, system obtains the duty and/or the execution result of described controlled object (being camera in the present embodiment), then according to the duty and/or the execution result of described controlled object, obtain the answer language of corresponding natural language form based on described database lookup, and show this answer language
Replying language also can have many, when program need be replied, can find corresponding answer language according to duty/execution result, then one of picked at random therefrom.
Such as:
User command: 5 degree turn left
Local camera is replied: be finished!
(2) ambiguity is replied:
If each parameter item in the described basic controlling order format exists not to fill as data with the corresponding basic controlling order element of keyword, and the data that also do not have the acquiescence that can be used to fill, and work as according to the basic controlling order element of filling in its previous parameter item, utilize described index, in this parameter item that is not filled that finds from described database there being when a plurality of corresponding basic controlling order element, has just caused ambiguity or uncertainty.Need to start the intelligent replying function this moment, described instruction interpretation unit all sends to described intelligent replying unit with all basic controlling order elements in this parameter item that is not filled, described intelligent replying unit becomes the answer language of the natural language form of prompting user affirmation with its reverse translation, and exports this answer to the user and speak.
As:
The control command that the user sends the natural language form is:
Change!
Instruction interpretation obtains: " MV " in " commentaries on classics " respective action parameter item, but with " MV " associated attributes parameter item in have multiple attribute instructions such as LF, RT, UP, DN (about about).
Does therefore the intelligent replying unit forms the answer language: turning left, turn right, go up commentaries on classics still change down?
The user confirms: a left side!
Instruction interpretation unit translation a: left side=LF, and explain: B3+MV+LF+05 (B3 is the camera numbering of current acquiescence, the 05th, and the rotation step-length of current acquiescence, 5 steps.)
(3) error return:
Described intelligent replying unit can be according to the basic controlling instruction of described instruction interpretation unit output, and from the work at present state of the local camera that described command executing unit obtained, judge whether current basic controlling instruction can be carried out, and when instruction can't be carried out, reply miscue.
As:
User command: 5 degree turn left
Camera is replied: turn left to the end, can't turn left.
(4) reply answer:
Described intelligent replying unit can ask a question at the user, inquires about the work at present state of local camera, makes corresponding answer.
User command: position?
Camera is replied: on the left avertence.
Should be noted that, the said method of present embodiment, language expression for complexity, the explanation of instruction may be wrong, but the ambiguity answer by the intelligent replying process can reduce error probability greatly, and system can also be combined into the elementary instruction control element after the translation answer language of being made up of the keyword of correspondence by in the intelligent replying process, and send to user's affirmation, after obtaining affirmation, carry out the control corresponding instruction again.System also can increase the function of self study, automatically store some incoming frequencies than the pairing basic controlling instruction of the control command of higher natural language form, the keyword that perhaps automatically some is obtained the natural language form of user's affirmation adds in the database, so that later use also can be reduced to error probability the acceptable level thus.On the other hand, because, generally be to be confined within the function of particular range for the control of special object.So this has strengthened the understandability of this method to natural language.Such as: camera generally is tens functions such as rotation, image parameter adjustment, target tracking, and language performance is limited in the scope.And as control command, user's input language generally all can be very simple and direct.The discrimination that this has improved this method has strengthened the practicality of this method.
As the above analysis, method and system of the present invention, its operation interface can be very succinct, and using method and step can be very simple, both have been convenient to the popularization of new product, new technology, also provide many facilities for people control controlled object.
Method and system of the present invention can be realized with multiple programming language.Little to system resources consumption, can be integrated in sorts of systems, equipment, the software, or even in the simple single-chip microcomputer (MCU).
The above-mentioned embodiment that utilizes the computer control camera can be specifically embodied as following dual mode:
First kind of embodiment controlled local camera for the system of user by present embodiment.
With reference to figure 3, present embodiment, the described system that utilizes natural language to control controlled object specifically is made of with the camera that is connected with computing machine computing machine.Described computer-internal is installed and operation has special software, integrated described natural language receiver module, command interpretation module and command execution module in the described special software.Described special software also can integrated described display module.
Shown in Figure 4ly be user's operation and the display interface that this special software provides.This interface provides order input field, video display window, and shows interactive record in the video display window.
Need open camera as the user and carry out video capture, then key in " video " at the order input field, video is related with PV, filling basic controlling order format is B3+PV+ON+00, (b3, on, the 00 not designated default value that all adopts), described computing machine further by the driver of camera, according to the usb protocol that camera is followed, sends to corresponding function " openvideo () " on the camera by USB interface of computer.Described camera is carried out the basic controlling instruction of opening video, and the information that instruction is finished is returned to described command execution module.Described intelligent replying unit obtains this information, and based on described database lookup to corresponding answer language " OK! ", be about to " OK! " be presented in the video display window.
What second kind of embodiment was different with first kind of embodiment is, the system that utilizes natural language to control controlled object of embodiment can also realize Long-distance Control in second.
Also integrated remote data transmission module in the described proprietary software, this remote data transmission module is carried out communication by the network communication interface and the long-distance user of described computing machine, thereby realizes the camera Long-distance Control.
As shown in Figure 5, described proprietary software is installed on the computer A, this software also is installed on the B.Two computing machines are separately installed with camera.These two computing machines link by LAN (Local Area Network).The IP address of A is 192.168.1.100, and the IP address of B is 192.168.1.101.Can be communicated with successfully by ping order test mutually.Socket class function family is called in the system function storehouse that the A computer software provides by setting up Microsoft Windows, sets up TCP with B or UDP is connected.After connection was set up successfully, A can send the control command of natural language form character string to B, and B can correctly receive, and to command interpretation and execution, with the control camera.B can send the answer of image or natural language form and speak to A, and A correctly receives and shows.Vice versa.
In addition, for the specific implementation process of system and method for the present invention at different controlled objects is described more fully, also provide an embodiment who system and method for the present invention is applied to mobile phone operation below.
In the present embodiment, controlled object is the various functional modules of mobile phone inside.System and method of the present invention all can adopt soft, the hardware of mobile phone inside to realize.
As, make the operating system of mobile phone be: flush type LINUX has the key board of input characters, LCDs.Realize special software of the present invention one of the inner installation of mobile phone.This special software can provide the chat window of similar chat software interactive interface.When the user uses, enter into this interactive interface.The user can send the control command of natural language form by this interactive interface, just like chatting with mobile phone.
The database of present embodiment can be for being arranged on the database of mobile phone inside separately, also can with the database combination such as address list of mobile phone inside.
As, predefined basic controlling order format is: ACTION+WHO/WHAT+MESSAGE, i.e. and action+who/what+message.
When user input: SMS notification Zhang Sanfeng to the doorway, classroom etc. I
The special software of mobile phone inside is looked into keyword based on database, carries out the explanation of keyword, and the basic controlling order element that obtains is filled in the basic controlling order format.
Then, " note " correspondence " SM " is filled among the ACTION,, " Zhang Sanfeng " is name in the address list, puts into who, message is " to the doorway, classroom etc. I ".
Tentatively obtain " SM+ Zhang Sanfeng+to the doorway, classroom etc. I "
Therefore further, obtain Zhang Sanfeng's cell-phone number, translate the basic controlling instruction and be: SM (note)+13801230123+ " to the doorway, classroom etc. I " according to the address list in the mobile phone
So the mobile phone executable operations is sent short messages to Zhang Sanfeng: to the doorway, classroom etc. I for another example, user's input: meeting
" meeting " is keyword, looks into key word, obtains " meeting " correspondence " MT ", and to have the ACTION of acquiescence be that " MOD " sets, and the message of acquiescence is default, so correspondence obtains basic controlling and instructs:
MOD+MT (set conference model, promptly ringing sound of cell phone is made as vibration)
If generation ambiguity, present embodiment can be carried out the intelligence inquiry equally.
For example:
User's input: Zhang Sanfeng has a meal
Native system is inserted who with " Zhang Sanfeng ":
+ Zhang Sanfeng+?
The option of ACION has SM (note), PH (dialing) ....
Is then native system putd question to: be to make a phone call, still send short messages?
Obtain the user and reply note.
Explain that further obtaining the basic controlling instruction is:
SM+13801230123+ has a meal.
Certainly, the one of ordinary skilled in the art should expect that this step can also be embodied as following form:
Will promptly putd question to by native system: you phone Zhang Sanfeng?
The user selects NO
Will program continues to put question to: you send short messages " to have a meal and " give Zhang Sanfeng?
Selection is,
Obtaining the basic controlling instruction at last is:
SM+13801230123+ has a meal
Utilize natural language to control the detailed description of the system and method for controlled object by above-mentioned to the present invention, the advantage that can clearly obtain the present invention and had is that camera is an example with controlled object still, and the present invention has following superiority:
1, reduced the degree of specialization of device control, easy to use:
In the prior art, people need be to having gained some understanding such as " brightness ", " gray scale ", " contrast ", " tone ", " saturation degree ", " acutance ", " white balance ", " backlight compensation ", " anti-shake " or the like specialized vocabulary and professional performance when the attribute of camera is adjusted.
And among the present invention, people only need send the simple instruction of " brighter ", " more clear ", " a little further " or the like, and native system will be finished the process that these simple instruction translations is become the discernible basic controlling instruction of camera automatically.It is very convenient to use.
2, abbreviate, easy and simple to handle:
Still be adjusted to example with top camera attribute, in the prior art, people also need each attribute is regulated successively, need to adopt select attributes section, or the vernier of mobile property parameters, or multiple attribute regulative mode such as input attributes parameter values.And only need can realize the adjusting of all properties among the present invention by being similar to the mode of chat.
3, the intelligent replying of hommization makes all control effects explicit, and has increased the interest of using.
In the present invention, the function of intelligent replying is feasible no longer stiff as prior art, inflexible and uninteresting to the control of camera.People control the process of camera just as chatting with a people, any operation can obtain the answer of camera, not only make whole control process become lively, flexible, interesting, also be more conducive to the control effect of the explicit understanding of user oneself camera.
The system and method that utilizes natural language to control controlled object of the present invention, be not limited only to listed utilization in instructions and the embodiment, it can be applied to various suitable the present invention's field fully, for those skilled in the art, can easily realize additional advantage and make amendment, therefore under the situation of the spirit and scope of the universal that does not deviate from claim and equivalency range and limited, the examples shown that the present invention is not limited to specific details, representational equipment and illustrates here and describe.