CN104239043B - The execution method and apparatus of instruction - Google Patents

The execution method and apparatus of instruction Download PDF

Info

Publication number
CN104239043B
CN104239043B CN201410450079.8A CN201410450079A CN104239043B CN 104239043 B CN104239043 B CN 104239043B CN 201410450079 A CN201410450079 A CN 201410450079A CN 104239043 B CN104239043 B CN 104239043B
Authority
CN
China
Prior art keywords
instruction
keyword
data
action
operational order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410450079.8A
Other languages
Chinese (zh)
Other versions
CN104239043A (en
Inventor
钟浩清
谢波
孙浩
杨格
吴泽武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410450079.8A priority Critical patent/CN104239043B/en
Publication of CN104239043A publication Critical patent/CN104239043A/en
Application granted granted Critical
Publication of CN104239043B publication Critical patent/CN104239043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of execution method and apparatus of instruction.The execution method includes:Obtain instruction keyword;Instruction action is matched from instruction configuration data according to the instruction keyword of identification;Perform the instruction action.User instruction is matched by the executable instruction action of program by using instruction configuration data, user instruction and corresponding instruction action is dynamically configured, the modification of application program is realized, without always upgrading to application program.

Description

The execution method and apparatus of instruction
Technical field
The present invention relates to the execution method and apparatus of Computer Applied Technology field, more particularly to a kind of application instruction.
Background technology
In computer application, it is often necessary to application is modified and function is added.It is often necessary to source code is changed, Recompilate and generate execution code, regenerate AKU, and need to download AKU and pacified using the user of the application Dress.So, small code revision and frequently code revision can all cause user frequently to be upgraded, influence user's body Test.
The content of the invention
It is an object of the invention to provide a kind of execution method and apparatus of instruction, by instructing configuration data to applying journey The funcall of sequence is controlled, to realize the modification of application, and application upgrade is frequently carried out without user.
According to an aspect of the present invention there is provided a kind of execution method of instruction, the execution method includes:Instruction is obtained to close Keyword;Instruction action is matched from instruction configuration data according to the instruction keyword of identification;Perform the instruction action.
According to another aspect of the present invention there is provided a kind of performs device of instruction, the performs device includes:Keyword is obtained Unit is taken, for obtaining instruction keyword;Instruction action matching unit, is configured for the instruction keyword according to identification from instruction Data Matching goes out instruction action;Instruction execution unit, for performing the instruction action.
The execution method and apparatus of instruction provided in an embodiment of the present invention are by using instruction configuration data by user instruction The executable instruction action of program is matched, user instruction and corresponding instruction action is dynamically configured, realizes application program Modification, without always upgrading to application program.
On this basis, also by instructing regular data to verify calling for operational order, it is ensured that operational order Reasonability.In addition, also supporting the programming mode of object-oriented.
Brief description of the drawings
Fig. 1 is the flow chart of the execution method of instruction according to embodiments of the present invention;
Fig. 2 is the flow chart of the execution method of instruction according to the preferred embodiment of the invention;
Fig. 3 is the example of instruction configuration data according to embodiments of the present invention;
Fig. 4 is the logic diagram of the performs device of instruction according to embodiments of the present invention.
Embodiment
The present general inventive concept is, by instructing configuration data to need the behaviour of execution in user instruction and application program It is associated, is searched in the application by the user instruction of reception and operate accordingly and perform the operation, so that movably Configure to state the relation between user instruction and the operation of execution.
Generally, can safeguard beyond the clouds on server includes the instruction configuration file of the instruction configuration data, in needs pair When user instruction is changed with the operation performed, the instruction configuration file can be changed, and by under the instruction configuration file Client is issued, the modification of application program thus can be achieved, without upgrading to application program.
The instruction configuration data includes, but not limited to keyword contrasting data and instruction performs data.The keyword Contrasting data includes instruction keyword and corresponding operational order, and the instruction, which performs data, to be included operational order and refer to accordingly Order is acted.That is, the keyword contrasting data includes multiple instruction keyword and each instruction keyword is corresponding Operational order;The instruction, which performs data, includes multiple operational orders and the corresponding instruction action of each operational order.So, By instructing keyword to find instruction action corresponding with the instruction keyword.
According to a preferred embodiment of the invention, the instruction configuration data can also include instruction regular data, the instruction Regular data includes the set that instruction performs the operational order of scene and its support.The instruction regular data can play verification and make With entering row constraint to the operational order that can be called in application scenarios.If for example, instruction regular data in, with specifically finger Order, which is performed in the set of the corresponding operational order of scene, does not include certain operational order, then will not perform the operational order.
The execution method of the instruction of the present invention is described in detail hereinafter with reference to Fig. 1~Fig. 3.
Fig. 1 is the flow chart of the execution method of instruction according to embodiments of the present invention.
Reference picture 1, in step S110, obtains instruction keyword.The instruction keyword can be user with natural language The user instruction that sends of form.For example, in map, navigation application, the instruction keyword can be " enlarged map ".
In step S120, instruction action is matched from instruction configuration data according to the instruction keyword of identification.The instruction Configuration data can be read from instruction configuration file.Here, the instruction action can be interpreted as to what application program can actually be called Function or method.
The instruction configuration data includes, but not limited to keyword contrasting data and instruction performs data.The keyword Contrasting data includes instruction keyword and corresponding operational order, and the instruction, which performs data, to be included operational order and refer to accordingly Order is acted.
For example, keyword contrasting data includes data item (" enlarged map ", 002), instruction, which performs data, includes data item (002, " zoom_out "), wherein, " 002 " is the mark of operational order.By instructing configuration data " can put instruction keyword Big map " matches instruction action function " zoom_out ".
In step S130, the instruction action is performed.For example, performing the instruction action function zoom_out () matched.
Thus, user instruction is matched by the executable instruction action of program by using the instruction configuration data, can Dynamically configuration user instruction and corresponding instruction action, realize the modification of application program, without always to application program Upgraded.
The execution method of instruction according to the preferred embodiment of the invention is described in detail hereinafter with reference to Fig. 2 and Fig. 3.
Fig. 2 is the flow chart of the execution method of instruction according to the preferred embodiment of the invention.Fig. 3 is according to present invention implementation The example of the instruction configuration data of example.
Reference picture 2, in step S110, obtains instruction keyword.The instruction keyword can be obtained in several ways.
On portable terminal, the function of the commonly provided speech recognition, therefore the instruction can be obtained by speech engine Keyword.According to a preferred embodiment of the invention, step S110 may include:Phonetic order is received, and from the phonetic order Recognize the instruction keyword.
In step S120, instruction action is matched from instruction configuration data according to the instruction keyword of identification.
Reference picture 3, according to the preferred embodiment, the instruction configuration data includes, but not limited to keyword control number Data 320 and instruction regular data 330 are performed according to 310, instruction.The keyword contrasting data 310 include instruction keyword and Corresponding operational order, the instruction, which performs data 320, includes operational order and corresponding instruction action, the regular number of the instruction Include the set that instruction performs the operational order of scene and its support according to 330.
In keyword contrasting data 310, instruction keyword " I will go " is corresponding to the operational order that " 00001 " is indicated; In instruction performs data 320, operational order and searchCenter that " 00001 " is indicated:SearchByName is corresponding;Referring to Regular data 330 is made, the operational order that " 00001 " is indicated is applied to " GLOBAL " scene, i.e., any five application page.
Step S120 may include following steps:
Step S121, operational order corresponding with the instruction keyword obtained is matched from the keyword contrasting data. (it is designated for example, matching operational order corresponding with instruction keyword " I will go " from the keyword contrasting data 310 “00001”)。
In step S122, search the instruction comprising the operational order matched from the instruction regular data and perform scene. For example, searching the application scenarios " GLOBAL " for including operational order " 00001 " from instruction regular data 330.
In step S123, it is determined whether look-up command performs scene.Scene is performed less than the instruction if searched, eventually The only execution method.Alternatively, it also can return to the mistake for indicating that scene does not support instruction.
If in step S123, finding the instruction and performing scene, then perform step S124.In step S124, from institute State instruction execution Data Matching and go out instruction action corresponding with the operational order.
Hereafter, in step S130, the instruction action is performed.
According to the preferred embodiment, include being used to perform the operation in the step S124 instruction actions matched The information of method/function in the class of instruction and the class, in step S130, is performed described by the object created for the class Method/function.For example, by operational order " 00001 ", data 320 being performed from instruction and match the execution operational order Method searchByName in class searchCenter and the searchCenter class of " 00001 ";In step S130, it can lead to The example for crossing class searchCenter calls its method searchByName ().
Many user instructions will also include the parameter of instruction, and such as user may say " I will go to Shenzhen University ".Therefore, root According to the preferred embodiments of the present invention, step S110 also includes obtaining operating parameter.So in step S130, it is necessary to the behaviour of acquisition Make parameter as call parameters (such as " Shenzhen University ") and perform the foregoing object created for the class (such as " searchCenter ") Correlation method/function (as " searchByName ").
The execution method of instruction of the present invention is can be seen that by referring to Fig. 2 and Fig. 3 embodiments described by using finger Make configuration data that user instruction is matched into the executable instruction action of program, dynamically configure user instruction and refer to corresponding Order is acted, and the modification of application program is realized, without always upgrading to application program.In addition, also by instructing rule Data are verified to calling for operational order, it is ensured that the reasonability of operational order.In addition, also supporting the programming side of object-oriented Formula.
Fig. 4 is the logic diagram of the performs device of instruction according to embodiments of the present invention.
Reference picture 4, the performs device of instruction according to embodiments of the present invention includes keyword acquiring unit 410, instruction and moved Make matching unit 420 and instruction execution unit 430.
Keyword acquiring unit 410 is used to obtain instruction keyword.
Instruction action matching unit 420 is used to match to instruct from instruction configuration data according to the instruction keyword of identification to move Make.The instruction configuration data may include that keyword contrasting data and instruction perform data, and the keyword contrasting data includes Keyword and corresponding operational order are instructed, the instruction, which performs data, includes operational order and corresponding instruction action.According to The preferred embodiments of the present invention, the instruction configuration data can also include instruction regular data, and the instruction regular data includes Instruction performs the set of the operational order of scene and its support.The instruction configuration data can be read from instruction configuration file.
Instruction execution unit 430 is used for execute instruction and acts the instruction action that matching unit 420 is matched.
According to the exemplary embodiment of the present invention, instruction action matching unit 420 includes:Operational order matching unit is (not Show), for matching operational order corresponding with the instruction keyword identified from the keyword contrasting data;Instruction is dynamic Make coupling subelement (not shown), it is dynamic for going out instruction corresponding with the operational order from the instruction execution Data Matching Make;Regular verification unit (not shown), for searching the instruction for including the operational order matched from the instruction regular data Perform scene.If finding the instruction performs scene, instruction action coupling subelement performs data from the instruction Allot instruction action corresponding with the operational order.
According to an alternative embodiment of the invention, the instruction action includes being used to perform the class of the operational order and described The information of method/function in class.Instruction execution unit 430 performs methods described/function by the object created for the class.
According to an alternative embodiment of the invention, keyword acquiring unit 410 also obtains operating parameter;Instruction execution unit 430 perform methods described/function of the object using the operating parameter of acquisition as call parameters.
In order to support phonetic order, according to an alternative embodiment of the invention, keyword acquiring unit 410 includes:Voice refers to Receiving unit (not shown) is made, for receiving phonetic order;Keyword recognition unit (not shown), for from the phonetic order Recognize the instruction keyword.
User instruction is matched program by the execution method and apparatus of the instruction of the present invention by using instruction configuration data Executable instruction action, dynamically configures user instruction and corresponding instruction action, realizes the modification of application program, without Need always to upgrade to application program.
On this basis, also by instructing regular data to verify calling for operational order, it is ensured that operational order Reasonability.In addition, also supporting the programming mode of object-oriented.
It may be noted that the need for according to implementation, each step described in this application can be split as into more multi-step, also may be used The part operation of two or more steps or step is combined into new step, to realize the purpose of the present invention.Similarly, can be by Modules/unit described in this application is split as more module/units, also can by two or more module/units or Its partial function of person is combined into new module/unit.
Above-mentioned the method according to the invention can be realized in hardware, firmware, or be implemented as being storable in recording medium Software or computer code in (such as CD ROM, RAM, floppy disk, hard disk or magneto-optic disk), or it is implemented through network download Original storage in long-range recording medium or nonvolatile machine readable media and the meter that will be stored in local recording medium Calculation machine code, so that method described here can be stored in using all-purpose computer, application specific processor or programmable or special With such software processing in hardware (such as ASIC or FPGA) recording medium.It is appreciated that computer, processor, micro- Processor controller or programmable hardware include can storing or receive software or computer code storage assembly (for example, RAM, ROM, flash memory etc.), when the software or computer code are by computer, processor or hardware access and when performing, realize herein The processing method of description.In addition, when all-purpose computer accesses the code for realizing the processing being shown in which, the execution of code All-purpose computer is converted into the special-purpose computer for performing the processing being shown in which.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (15)

1. a kind of execution method of instruction, it is characterised in that the execution method includes:
Obtain instruction keyword;
Instruction action is matched from instruction configuration data according to the instruction keyword of identification, wherein, the instruction configuration data bag Include keyword contrasting data, instruction and perform data and instruction regular data, the keyword contrasting data includes instruction keyword With corresponding operational order, the instruction, which performs data, includes operational order and corresponding instruction action, the regular number of the instruction According to the set for the operational order that scene and its support are performed including instruction, the instruction keyword according to identification is configured from instruction The step of Data Matching goes out instruction action includes:Matched from the keyword contrasting data corresponding to the instruction keyword obtained Operational order, searched from the instruction regular data and perform scene comprising the instruction of operational order matched, if searched Scene is performed to the instruction, then performing Data Matching from the instruction goes out instruction action corresponding with the operational order;
Perform the instruction action.
2. execution method according to claim 1, it is characterised in that the instruction keyword according to identification is matched somebody with somebody from instruction Putting the step of Data Matching goes out instruction action also includes:
Scene is performed less than the instruction if searched, the mistake for indicating that scene does not support instruction is returned to, and terminate described Execution method.
3. execution method according to claim 1, it is characterised in that the instruction action includes being used to perform the operation The information of method/function in the class of instruction and the class.
4. execution method according to claim 3, it is characterised in that include the step of the execution instruction action: Methods described/function is performed by the object created for the class.
5. execution method according to claim 4, it is characterised in that the step of acquisition instructs keyword also includes: Obtain operating parameter.
6. execution method according to claim 5, it is characterised in that the object by being created for the class performs institute Stating the processing of method/function includes:Methods described/function of the object is performed using the operating parameter as call parameters.
7. according to execution method according to any one of claims 1 to 6, it is characterised in that the acquisition instruction keyword Step includes:
Receive phonetic order;
The instruction keyword is recognized from the phonetic order.
8. execution method according to claim 7, it is characterised in that the instruction configuration data is read from instruction configuration file Take.
9. a kind of performs device of instruction, it is characterised in that the performs device includes:
Keyword acquiring unit, for obtaining instruction keyword;
Instruction action matching unit, instruction action is matched for the instruction keyword according to identification from instruction configuration data, its In, the instruction configuration data includes keyword contrasting data, instruction and performs data and instruction regular data, the keyword pair Include instruction keyword and corresponding operational order according to data, the instruction, which performs data, includes operational order and corresponding instruction Action, the instruction regular data includes the set that instruction performs the operational order of scene and its support, the instruction action Include with unit:Operational order matching unit, the instruction for matching and identifying from the keyword contrasting data is crucial The corresponding operational order of word, instruction action coupling subelement refers to for going out from the instruction execution Data Matching with the operation Make corresponding instruction action, regular verification unit, for being searched from the instruction regular data comprising the operational order matched Instruction perform scene, wherein, if regular verification unit finds the instruction and performs scene, instruction action matching is single Member performs Data Matching from the instruction and goes out instruction action corresponding with the operational order;
Instruction execution unit, for performing the instruction action.
10. performs device according to claim 9, it is characterised in that the instruction action includes being used to perform the behaviour The information of method/function in class and the class that work is instructed.
11. performs device according to claim 10, it is characterised in that the instruction execution unit for the class by creating The object built performs methods described/function.
12. performs device according to claim 11, it is characterised in that the keyword acquiring unit also obtains operation ginseng Number.
13. performs device according to claim 12, it is characterised in that the instruction execution unit is with the operating parameter Methods described/function of the object is performed as call parameters.
14. the performs device according to any one of claim 9~13, it is characterised in that the keyword acquiring unit Including:
Phonetic order receiving unit, for receiving phonetic order;
Keyword recognition unit, for recognizing the instruction keyword from the phonetic order.
15. performs device according to claim 14, it is characterised in that the instruction configuration data is from instruction configuration file Read.
CN201410450079.8A 2014-09-04 2014-09-04 The execution method and apparatus of instruction Active CN104239043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410450079.8A CN104239043B (en) 2014-09-04 2014-09-04 The execution method and apparatus of instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410450079.8A CN104239043B (en) 2014-09-04 2014-09-04 The execution method and apparatus of instruction

Publications (2)

Publication Number Publication Date
CN104239043A CN104239043A (en) 2014-12-24
CN104239043B true CN104239043B (en) 2017-10-31

Family

ID=52227185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410450079.8A Active CN104239043B (en) 2014-09-04 2014-09-04 The execution method and apparatus of instruction

Country Status (1)

Country Link
CN (1) CN104239043B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105407433A (en) * 2015-12-11 2016-03-16 小米科技有限责任公司 Method and device for controlling sound output equipment
CN107065604A (en) * 2017-01-12 2017-08-18 苏州乐派特机器人有限公司 A kind of programmable object wearing device
CN107909998B (en) * 2017-10-18 2021-06-15 成都市共维科技有限公司 Voice instruction processing method and device, computer equipment and storage medium
CN108597510A (en) * 2018-04-11 2018-09-28 上海思依暄机器人科技股份有限公司 a kind of data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340544A (en) * 2008-08-11 2009-01-07 北京中星微电子有限公司 Remote control method and apparatus
CN101557432A (en) * 2008-04-08 2009-10-14 Lg电子株式会社 Mobile terminal and menu control method thereof
CN102024454A (en) * 2009-09-10 2011-04-20 三菱电机株式会社 System and method for activating plurality of functions based on speech input
CN102867276A (en) * 2012-08-14 2013-01-09 俞琳 Interactive control method based on electric power operational system
CN103839547A (en) * 2012-11-27 2014-06-04 英业达科技有限公司 System for loading corresponding instruction elements by comparing voice operation signals and method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2358987B (en) * 2000-02-01 2003-10-29 Ericsson Telefon Ab L M Electronic devices
US20030040339A1 (en) * 2001-08-21 2003-02-27 Allen Chang Method and system for accessing functions of a portable information appliance
US7190768B2 (en) * 2002-08-20 2007-03-13 Avaya Technology Corp. Method and apparatus for human-assisted adaptive outbound telephone call classification based on pattern recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557432A (en) * 2008-04-08 2009-10-14 Lg电子株式会社 Mobile terminal and menu control method thereof
CN101340544A (en) * 2008-08-11 2009-01-07 北京中星微电子有限公司 Remote control method and apparatus
CN102024454A (en) * 2009-09-10 2011-04-20 三菱电机株式会社 System and method for activating plurality of functions based on speech input
CN102867276A (en) * 2012-08-14 2013-01-09 俞琳 Interactive control method based on electric power operational system
CN103839547A (en) * 2012-11-27 2014-06-04 英业达科技有限公司 System for loading corresponding instruction elements by comparing voice operation signals and method thereof

Also Published As

Publication number Publication date
CN104239043A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
US11282500B2 (en) Generating and training new wake words
JP6744314B2 (en) Updating Language Understanding Classifier Model for Digital Personal Assistant Based on Crowdsourcing
CN109710727B (en) System and method for natural language processing
CN105895103B (en) Voice recognition method and device
CN112970059B (en) Electronic device for processing user utterance and control method thereof
CN107644638B (en) Audio recognition method, device, terminal and computer readable storage medium
US8521511B2 (en) Information extraction in a natural language understanding system
US10134390B2 (en) Electronic device and voice recognition method thereof
US10210003B2 (en) Methods and apparatus for module arbitration
KR20190100334A (en) Contextual Hotwords
CN109637521A (en) A kind of lip reading recognition methods and device based on deep learning
US20120290298A1 (en) System and method for optimizing speech recognition and natural language parameters with user feedback
JP2017016131A (en) Speech recognition apparatus and method, and electronic device
CN104239043B (en) The execution method and apparatus of instruction
US9886947B2 (en) Speech recognition device and method, and semiconductor integrated circuit device
KR20160006464A (en) Method and apparatus for recognizing multi-level speech
CN108564944B (en) Intelligent control method, system, equipment and storage medium
CN109272995A (en) Audio recognition method, device and electronic equipment
US9582498B2 (en) Actions on digital document elements from voice
US20210050003A1 (en) Custom Wake Phrase Training
WO2014187069A1 (en) Systems and methods for adding punctuations
CN109923515A (en) Use the experience of telling a story of network addressable device creation film
US20150278231A1 (en) System and method for customizing archive of a device driver generator tool for a user
CN109637529A (en) Voice-based functional localization method, apparatus, computer equipment and storage medium
KR101989127B1 (en) Method, system and computer program for translation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant