CN104239043A - Instruction execution method and device - Google Patents

Instruction execution method and device Download PDF

Info

Publication number
CN104239043A
CN104239043A CN201410450079.8A CN201410450079A CN104239043A CN 104239043 A CN104239043 A CN 104239043A CN 201410450079 A CN201410450079 A CN 201410450079A CN 104239043 A CN104239043 A CN 104239043A
Authority
CN
China
Prior art keywords
instruction
keyword
data
operational order
action
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.)
Granted
Application number
CN201410450079.8A
Other languages
Chinese (zh)
Other versions
CN104239043B (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 invention provides an instruction execution method and device. The execution method comprises the following steps: obtaining an instruction keyword; according to the identified instruction keyword, matching instruction action from instruction configuration data; executing the instruction action. A user instruction is matched to the instruction action which can be executed by a program by using the instruction configuration data, and the user instruction and the corresponding instruction action can be dynamically configured to revise an application program instead of upgrading the application program all the time.

Description

The manner of execution of instruction and device
Technical field
The present invention relates to Computer Applied Technology field, particularly relate to a kind of manner of execution and device of application instruction.
Background technology
In computer utility, often need to modify to application and function interpolation.Usually, need to revise source code, recompilate and generate run time version, regeneration AKU, and use the user of this application to need download AKU and install.Like this, small code revision and frequently code revision all can cause user frequently to upgrade, and affect Consumer's Experience.
Summary of the invention
The object of the present invention is to provide a kind of manner of execution and device of instruction, controlled by the funcall of instruction configuration data application programs, to realize the amendment of applying, and do not need user frequently to carry out application upgrade.
According to an aspect of the present invention, provide a kind of manner of execution of instruction, described manner of execution comprises: obtain instruction keyword; Instruction keyword according to identifying matches instruction action from instruction configuration data; Perform described instruction action.
According to a further aspect in the invention, provide a kind of actuating unit of instruction, described actuating unit comprises: keyword acquiring unit, for obtaining instruction keyword; Instruction action matching unit, for matching instruction action according to the instruction keyword identified from instruction configuration data; Instruction execution unit, for performing described instruction action.
User instruction is matched the executable instruction action of program by using instruction configuration data by the manner of execution of the instruction that the embodiment of the present invention provides and device, dynamically configure user instruction and corresponding instruction action, realize the amendment of application program, and do not need always application programs to upgrade.
On this basis, also by instruction regular data, calling of operational order is verified, guarantee the rationality of operational order.In addition, OO programming mode is also supported.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the manner of execution of instruction according to the embodiment of the present invention;
Fig. 2 is the process flow diagram of the manner of execution of instruction according to the preferred embodiment of the invention;
Fig. 3 is the example of the instruction configuration data according to the embodiment of the present invention;
Fig. 4 is the logic diagram of the actuating unit of instruction according to the embodiment of the present invention.
Embodiment
General plotting of the present invention is, by instruction configuration data, user instruction is associated with needing the operation performed in application program, user instruction in the application by receiving is searched and is operated and perform described operation accordingly, thus the relation between dynamically configure user instruction and the operation of execution.
Usually, beyond the clouds server can be safeguarded the instruction configuration file comprising described instruction configuration data, when needing to change the operation of user instruction and execution, described instruction configuration file can be revised, and described instruction configuration file is handed down to client, the amendment of application program can be realized thus, and do not need application programs to upgrade.
Described instruction configuration data includes, but not limited to keyword contrasting data and instruction performs data.Described keyword contrasting data comprises instruction keyword and corresponding operational order, and described instruction performs data and comprises operational order and corresponding instruction action.That is, described keyword contrasting data comprises multiple instruction keyword and operational order corresponding to each instruction keyword; Described instruction performs data and comprises multiple operational order and instruction action corresponding to each operational order.Like this, the instruction action corresponding to described instruction keyword can be found by instruction keyword.
According to a preferred embodiment of the invention, described instruction configuration data can also comprise instruction regular data, and described instruction regular data comprises the set that instruction performs the operational order of scene and support thereof.Described instruction regular data can play verification effect, retrains the operational order that can call in application scenarios.Such as, if in instruction regular data, perform in the set of operational order corresponding to scene with specific instruction and do not comprise certain operational order, so will not perform described operational order.
The manner of execution of instruction of the present invention is described in detail hereinafter with reference to Fig. 1 ~ Fig. 3.
Fig. 1 is the process flow diagram of the manner of execution of instruction according to the embodiment of the present invention.
With reference to Fig. 1, in step S110, obtain instruction keyword.Described instruction keyword can be the user instruction that user sends with the form of natural language.Such as, in map, navigation application, described instruction keyword can be " enlarged map ".
In step S120, the instruction keyword according to identifying matches instruction action from instruction configuration data.Described instruction configuration data can read from instruction configuration file.Here, described instruction action can be interpreted as the actual function that calls of application program or method.
Described instruction configuration data includes, but not limited to keyword contrasting data and instruction performs data.Described keyword contrasting data comprises instruction keyword and corresponding operational order, and described instruction performs data and comprises operational order and corresponding instruction action.
Such as, keyword contrasting data comprises data item (" enlarged map ", 002), and instruction performs data and comprises data item (002, " zoom_out "), wherein, and the mark that " 002 " is operational order.Instruction keyword " enlarged map " can be matched instruction action function " zoom_out " by instruction configuration data.
In step S130, perform described instruction action.Such as, instruction action function zoom_out () matched is performed.
Thus, by using described instruction configuration data that user instruction is matched the executable instruction action of program, dynamically configure user instruction and corresponding instruction action, realize the amendment of application program, and do not need always application programs to upgrade.
The manner of execution of instruction is according to the preferred embodiment of the invention described in detail hereinafter with reference to Fig. 2 and Fig. 3.
Fig. 2 is the process flow diagram of the manner of execution of instruction according to the preferred embodiment of the invention.Fig. 3 is the example of the instruction configuration data according to the embodiment of the present invention.
With reference to Fig. 2, in step S110, obtain instruction keyword.Described instruction keyword is obtained by various ways.
On portable terminal, usually provide the function of speech recognition, therefore obtain described instruction keyword by speech engine.According to a preferred embodiment of the invention, step S110 can comprise: receive phonetic order, and from instruction keyword described in described phonetic order identification.
In step S120, the instruction keyword according to identifying matches instruction action from instruction configuration data.
With reference to Fig. 3, according to described preferred embodiment, described instruction configuration data includes, but not limited to keyword contrasting data 310, instruction performs data 320 and instruction regular data 330.Described keyword contrasting data 310 comprises instruction keyword and corresponding operational order, described instruction performs data 320 and comprises operational order and corresponding instruction action, and described instruction regular data 330 comprises the set that instruction performs the operational order of scene and support thereof.
In keyword contrasting data 310, instruction keyword " I will go " is corresponding to the operational order that " 00001 " indicates; Perform in data 320 in instruction, the operational order that " 00001 " indicates is corresponding to searchCenter:searchByName; In instruction regular data 330, the operational order that " 00001 " indicates is applicable to " GLOBAL " scene, i.e. any application page.
Step S120 can comprise the following steps:
Step S121, matches the operational order corresponding to the instruction keyword obtained from described keyword contrasting data.Such as, the corresponding operational order (being designated " 00001 ") of and instruction keyword " I will go " is matched from described keyword contrasting data 310.
In step S122, search from described instruction regular data the instruction comprising the operational order matched and perform scene.Such as, the application scenarios " GLOBAL " comprising operational order " 00001 " is searched from instruction regular data 330.
In step S123, determine whether that look-up command performs scene.Perform scene if searched less than described instruction, then stop described manner of execution.Alternatively, the mistake that instruction scene does not support instruction can also be returned.
If in step S123, find described instruction and perform scene, then perform step S124.In step S124, perform data from described instruction and match the instruction action corresponding to described operational order.
After this, in step S130, perform described instruction action.
According to described preferred embodiment, the described instruction action matched in step S124 comprises the information of the method/function in class for performing described operational order and described class, in step S130, performs described method/function by the object created for described class.Such as, by operational order " 00001 ", can from instruction perform data 320 match perform described operational order " 00001 " class searchCenter and searchCenter class method searchByName; In step S130, the example by class searchCenter calls its method searchByName ().
A lot of user instruction also can comprise the parameter of instruction, as user may say " my Yao Qu Shenzhen University ".Therefore, according to a preferred embodiment of the invention, step S110 also comprises acquisition operating parameter.So in step S130, need the operating parameter that obtains as call parameters (as " Shenzhen University ") perform aforementioned for as described in the correlation method/function (as " searchByName ") of object that creates of class (as " searchCenter ").
The embodiment described by referring to Fig. 2 and Fig. 3 can be found out, user instruction is matched the executable instruction action of program by using instruction configuration data by the manner of execution of instruction of the present invention, dynamically configure user instruction and corresponding instruction action, realize the amendment of application program, and do not need always application programs to upgrade.In addition, also by instruction regular data, calling of operational order is verified, guarantee the rationality of operational order.In addition, OO programming mode is also supported.
Fig. 4 is the logic diagram of the actuating unit of instruction according to the embodiment of the present invention.
With reference to Fig. 4, comprise keyword acquiring unit 410, instruction action matching unit 420 and instruction execution unit 430 according to the actuating unit of the instruction of the embodiment of the present invention.
Keyword acquiring unit 410 is for obtaining instruction keyword.
Instruction action matching unit 420 is for matching instruction action according to the instruction keyword identified from instruction configuration data.Described instruction configuration data can comprise keyword contrasting data and instruction performs data, and described keyword contrasting data comprises instruction keyword and corresponding operational order, and described instruction performs data and comprises operational order and corresponding instruction action.According to a preferred embodiment of the invention, described instruction configuration data can also comprise instruction regular data, and described instruction regular data comprises the set that instruction performs the operational order of scene and support thereof.Described instruction configuration data can read from instruction configuration file.
The instruction action that instruction execution unit 430 matches for performing instruction action matching unit 420.
According to exemplary embodiment of the present invention, instruction action matching unit 420 comprises: operational order matching unit (not shown), for matching the operational order corresponding to the instruction keyword identified from described keyword contrasting data; Instruction action coupling subelement (not shown), matches the instruction action corresponding to described operational order for performing data from described instruction; Rule verification unit (not shown), performs scene for searching the instruction comprising the operational order matched from described instruction regular data.If find described instruction to perform scene, then instruction action coupling subelement performs data from described instruction and matches the instruction action corresponding to described operational order.
According to an alternative embodiment of the invention, described instruction action comprises the information of the method/function in class for performing described operational order and described class.Instruction execution unit 430 performs described method/function by the object created for described class.
According to an alternative embodiment of the invention, keyword acquiring unit 410 also obtains operating parameter; Instruction execution unit 430 performs the described method/function of described object using the operating parameter obtained as call parameters.
In order to support voice instruction, according to an alternative embodiment of the invention, keyword acquiring unit 410 comprises: phonetic order receiving element (not shown), for receiving phonetic order; Keyword recognition unit (not shown), for from instruction keyword described in described phonetic order identification.
User instruction is matched the executable instruction action of program by using instruction configuration data by the manner of execution of instruction of the present invention and device, dynamically configure user instruction and corresponding instruction action, realize the amendment of application program, and do not need always application programs to upgrade.
On this basis, also by instruction regular data, calling of operational order is verified, guarantee the rationality of operational order.In addition, OO programming mode is also supported.
It may be noted that the needs according to implementing, each step described can be split as more multi-step, also the part operation of two or more step or step can be combined into new step, to realize object of the present invention in the application.In like manner, the modules/unit described more module/unit can be split as in the application, also two or more module/unit or its partial function new module/unit can be combined into.
Above-mentioned can at hardware according to method of the present invention, realize in firmware, or be implemented as and can be stored in recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optic disk) in software or computer code, or be implemented and will be stored in the computer code in local recording medium by the original storage of web download in remote logging medium or nonvolatile machine readable media, thus method described here can be stored in use multi-purpose computer, such software process on the recording medium of application specific processor or able to programme or specialized hardware (such as ASIC or FPGA).Be appreciated that, computing machine, processor, microprocessor controller or programmable hardware comprise and can store or receive the memory module of software or computer code (such as, RAM, ROM, flash memory etc.), when described software or computer code by computing machine, processor or hardware access and perform time, realize disposal route described here.In addition, when the code for realizing the process shown in this accessed by multi-purpose computer, multi-purpose computer is converted to the special purpose computer for performing the process shown in this by the execution of code.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (20)

1. a manner of execution for instruction, is characterized in that, described manner of execution comprises:
Obtain instruction keyword;
Instruction keyword according to identifying matches instruction action from instruction configuration data;
Perform described instruction action.
2. manner of execution according to claim 1, it is characterized in that, described instruction configuration data comprises keyword contrasting data and instruction performs data, described keyword contrasting data comprises instruction keyword and corresponding operational order, and described instruction performs data and comprises operational order and corresponding instruction action.
3. manner of execution according to claim 2, is characterized in that, described instruction configuration data also comprises instruction regular data, and described instruction regular data comprises the set that instruction performs the operational order of scene and support thereof.
4. manner of execution according to claim 3, is characterized in that, the described step matching instruction action from instruction configuration data according to the instruction keyword identified comprises:
The operational order corresponding to the instruction keyword obtained is matched from described keyword contrasting data,
Search from described instruction regular data the instruction comprising the operational order matched and perform scene,
Perform scene if searched less than described instruction, then return the mistake that instruction scene does not support instruction, and stop described manner of execution,
If find described instruction to perform scene, then perform data from described instruction and match the instruction action corresponding to described operational order.
5. manner of execution according to claim 4, is characterized in that, described instruction action comprises the information of the method/function in class for performing described operational order and described class.
6. manner of execution according to claim 5, is characterized in that, the step of the described instruction action of described execution comprises: perform described method/function by the object created for described class.
7. manner of execution according to claim 6, is characterized in that, the step of described acquisition instruction keyword also comprises: obtain operating parameter.
8. manner of execution according to claim 7, is characterized in that, the process that the described object by creating for described class performs described method/function comprises: the described method/function performing described object using described operating parameter as call parameters.
9. the manner of execution according to any one of claim 1 ~ 8, is characterized in that, the step of described acquisition instruction keyword comprises:
Receive phonetic order;
From instruction keyword described in described phonetic order identification.
10. manner of execution according to claim 9, is characterized in that, described instruction configuration data reads from instruction configuration file.
The actuating unit of 11. 1 kinds of instructions, is characterized in that, described actuating unit comprises:
Keyword acquiring unit, for obtaining instruction keyword;
Instruction action matching unit, for matching instruction action according to the instruction keyword identified from instruction configuration data;
Instruction execution unit, for performing described instruction action.
12. actuating units according to claim 11, it is characterized in that, described instruction configuration data comprises keyword contrasting data and instruction performs data, described keyword contrasting data comprises instruction keyword and corresponding operational order, and described instruction performs data and comprises operational order and corresponding instruction action.
13. actuating units according to claim 12, is characterized in that, described instruction configuration data also comprises instruction regular data, and described instruction regular data comprises the set that instruction performs the operational order of scene and support thereof.
14. actuating units according to claim 13, is characterized in that, described instruction action matching unit comprises:
Operational order matching unit, for matching the operational order corresponding to the instruction keyword identified from described keyword contrasting data,
Instruction action coupling subelement, matches the instruction action corresponding to described operational order for performing data from described instruction,
Rule verification unit, performs scene for searching the instruction comprising the operational order matched from described instruction regular data,
Wherein, if regular verification unit finds described instruction perform scene, then instruction action coupling subelement performs data from described instruction and matches the instruction action corresponding to described operational order.
15. actuating units according to claim 14, is characterized in that, described instruction action comprises the information of the method/function in class for performing described operational order and described class.
16. actuating units according to claim 15, is characterized in that, described instruction execution unit performs described method/function by the object created for described class.
17. actuating units according to claim 16, is characterized in that, described keyword acquiring unit also obtains operating parameter.
18. actuating units according to claim 17, is characterized in that, described instruction execution unit performs the described method/function of described object using described operating parameter as call parameters.
19. actuating units according to any one of claim 11 ~ 18, it is characterized in that, described keyword acquiring unit comprises:
Phonetic order receiving element, for receiving phonetic order;
Keyword recognition unit, for from instruction keyword described in described phonetic order identification.
20. actuating units according to claim 19, is characterized in that, described instruction configuration data reads from instruction configuration file.
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 true CN104239043A (en) 2014-12-24
CN104239043B 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)

Cited By (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
CN107909998A (en) * 2017-10-18 2018-04-13 成都市共维科技有限公司 Phonetic order processing method, device, computer equipment and storage medium
CN108597510A (en) * 2018-04-11 2018-09-28 上海思依暄机器人科技股份有限公司 a kind of data processing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010011028A1 (en) * 2000-02-01 2001-08-02 Telefonaktiebolaget Lm Ericsson Electronic devices
US20030040339A1 (en) * 2001-08-21 2003-02-27 Allen Chang Method and system for accessing functions of a portable information appliance
US20040037397A1 (en) * 2002-08-20 2004-02-26 Roby Paul Vinton Method and apparatus for human -assisted adaptive outbound telephone call classification based on pattern recognition
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010011028A1 (en) * 2000-02-01 2001-08-02 Telefonaktiebolaget Lm Ericsson Electronic devices
US20030040339A1 (en) * 2001-08-21 2003-02-27 Allen Chang Method and system for accessing functions of a portable information appliance
US20040037397A1 (en) * 2002-08-20 2004-02-26 Roby Paul Vinton Method and apparatus for human -assisted adaptive outbound telephone call classification based on pattern recognition
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

Cited By (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
CN107909998A (en) * 2017-10-18 2018-04-13 成都市共维科技有限公司 Phonetic order processing method, device, computer equipment and storage medium
CN108597510A (en) * 2018-04-11 2018-09-28 上海思依暄机器人科技股份有限公司 a kind of data processing method and device

Also Published As

Publication number Publication date
CN104239043B (en) 2017-10-31

Similar Documents

Publication Publication Date Title
KR102281178B1 (en) Method and apparatus for recognizing multi-level speech
CN106528201B (en) Method and device for loading animation in game
CN107293294B (en) A kind of voice recognition processing method and device
US20190130895A1 (en) System And Method For Natural Language Processing
CN104239043A (en) Instruction execution method and device
RU2014104582A (en) RUNNING SYSTEM
US9715874B2 (en) Techniques for updating an automatic speech recognition system using finite-state transducers
CN110442371B (en) Method, device and medium for releasing codes and computer equipment
US20140068517A1 (en) User interface apparatus in a user terminal and method for supporting the same
JP2021501356A (en) Creating modular conversations with implicit routing
US20180025162A1 (en) Application program analysis apparatus and method
CN112346697A (en) Method, device and storage medium for controlling equipment
CN104239045A (en) Method and device for opening unknown file
CN105354071A (en) Method for realizing compatibility between embedded software and hardware
US8732655B2 (en) Systems and methods for metamodel transformation
US8196093B2 (en) Apparatus and method for componentizing legacy system
US9514256B1 (en) Method and system for modelling turbulent flows in an advection-diffusion process
CN103984621A (en) Method and system for separating log
US20190073198A1 (en) Multi-flavored software execution from a singular code base
US20090248741A1 (en) Method and system for integrating an external service
RU2020111212A (en) METHOD, DEVICE AND MACHINE-READABLE DATA MEDIA FOR IMPLEMENTATION OF UNIVERSAL HARDWARE AND SOFTWARE INTERFACE
US9880813B2 (en) RTE code generating method and apparatus performing the same
CN109509467B (en) Code generation method and device
CN109561121B (en) Method and device for monitoring deployment
JP6579095B2 (en) Program writing method, apparatus control method, program writing program, and apparatus control program

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