Summary of the invention
The object of the invention is with fast a kind of, command analysis method and system thereof resolve character string also therefrom the extraction command name and then fast execution of command operations given by user flexibly.
One aspect of the present invention provides a kind of method of command analysis, it is characterized in that comprising the following steps: obtain the character string in browser input field; According to described text string generation the corresponding command operation code; According to described command operation code execution of command operations.
Preferably, browser input field comprises address field or the search column of browser.
Preferably, the character string obtained by browser comprises command name, the command operation code of acquisition comprise extract command name after generate corresponding command operation code.
Preferably, character string also comprises command parameter, comprises generate according to command name the command operation code containing command parameter according to the step of text string generation the corresponding command operation code.
Preferably, command name comprises command code and designator, command code is used for coordinating designator to form a complete command name, and described designator is used for there is command code in tab character string, and described command code is used in command list (CLIST), search corresponding command name.
Preferably, comprise a command name coupling of command name and command list (CLIST) character string comprised according to the step of text string generation the corresponding command operation code, and extract command operation code corresponding to this command name.
Preferably, also comprise according to the step of text string generation the corresponding command operation code and carry out participle parsing to character string, the step of character string being carried out to participle parsing comprises: carry out participle operation to character string, extracts one or more word; Extracted one or more word is mated with command name feature database, searches corresponding command name; When then extracting the command parameter in character string according to predetermined parameter search rule after the match is successful; The command name of coupling and the command parameter of extraction is utilized to generate the corresponding command operation code.
Preferably, participle operation is carried out to character string, the one or more word extracted mates with command name feature database, search corresponding command name to comprise: the Feature Words in extracted one or more word and command name feature database is compared, if there is identical Feature Words, then transfer the command name corresponding with this Feature Words.
Preferably, the command parameter extracted in described character string according to predetermined parameter search rule comprises: using word adjacent after the word that mates with command name feature database in character string as command parameter; Using contents all after the word that mates with command name feature database in character string as command parameter; Using the content that is labeled in character string as command parameter.
Preferably, the command name in the character string obtained by browser comprises screenshotss order, and command parameter comprises the coordinate intending screenshotss, and command operation code has been at the instruction code intending completing in screenshotss coordinate screenshotss task.
Preferably, the command name in the character string obtained by browser comprises mailbox service Shang dynasty code, and command parameter comprises mailbox user name and password, and command operation code has been the instruction code utilizing mailbox user name and cryptographic acess respective mailbox.
Preferably, the command name in the character string obtained by browser comprises search engine code, and command parameter comprises search key, and command operation code has been the instruction code searching for described search key at corresponding search engine.
Preferably, the character string obtained by browser comprises multiple command name and/or multiple command parameter, comprises generate access multiple web-page requests corresponding with it respectively according to described multiple command name and/or multiple command parameter according to the step of text string generation the corresponding command operation code commands.
The present invention on the other hand, provides a kind of system of command analysis, it is characterized in that comprising:
Acquisition module, obtains the character string in browser input field; Generation module, according to text string generation the corresponding command operation code that acquisition module obtains; Execution module, performs the command operation code that generation module generates.
Preferably, acquisition module obtains the character string in browser input field, is mated, and extract command operation code corresponding to command name by the command name of generation module by the command name in character string and predetermined command list (CLIST).
Preferably, generation module carries out participle parsing to the character string that acquisition module obtains.
Preferably, generation module to the character string that acquisition module obtains carry out participle resolve comprise: participle operation is carried out to character string, extracts one or more word; The one or more word extracted is mated with command name feature database, searches corresponding command name; When then extracting the command parameter in described character string after the match is successful according to predetermined parameter search rule; The command name of coupling and the command parameter of extraction is utilized to generate the corresponding command operation code.
Preferably, the one or more word extracted mates with command name feature database by generation module, search corresponding command name to comprise: the Feature Words in one or more word and command name feature database is compared, if there is identical Feature Words, then transfer the command name corresponding with this Feature Words.
Preferably, the command parameter that the character string that acquisition module obtains is extracted in character string according to predetermined parameter search rule comprises: using word adjacent after the word that mates with command name feature database in character string as command parameter; Using contents all after the word that mates with command name feature database in character string as command parameter; Using the content that is labeled in character string as command parameter.
Preferably, the character string that acquisition module obtains comprises multiple command name and/or multiple command parameter, and generation module generates access multiple web-page requests corresponding with it respectively according to multiple command name and/or multiple command parameter.
Can be flexible according to method of the present invention and system thereof, accurately resolve user command, the command operation of quick completing user.The present invention is of many uses, can use having in the PC of browser application, mobile phone, palm PC or Digital Television, help user to complete command operation, improve Consumer's Experience in the mode of browser, third party software or browser plug-in.
Embodiment
Fig. 1 is the command analysis method flow diagram of one embodiment of the invention, as shown in Figure 1, and the method comprising the steps of S101-S104:
In step S101, browser obtains the character string information that user inputs in browser address bar.
In an example, browser obtains the character string information " b 360 company " of user's input by address field, and wherein " b " is command code, and space character " " is designator, and " 360 company " is the key word needing search.Designator of the present invention is used for there is command code in tab character string, command code is used in command list (CLIST), search corresponding command name, such as user is search column input of character string " | screenshotss | ", wherein symbol " | " is designator, after recognizing " | " symbol, the content marked by it is tabled look-up, if this content is command name, perform the corresponding command, operation of the present invention is then terminated if not command name, in this example, character string " screenshotss " is command name, searched by command list (CLIST) and the command operation code of fill order name " screenshotss " correspondence.Above-described embodiment only for convenience of description, command name of the present invention can be free of and has designator, such as user is only at search column input of character string " screenshotss ", by with command list (CLIST) comparison after can judge that character string " screenshotss " is command name, and search the command operation code corresponding with character string " screenshotss ", then perform screenshotss command operating.
In step S102, browser is according to the text string generation the corresponding command operation code obtained.
In an example, the command name " b " that the command name of a predefined command list (CLIST) is made up of command code " b " and designator " ", when the character string that user inputs in browser address bar is for " b360 ", " b " in the character string " b 360 " then user inputted mates with the command name " b " of command list (CLIST), wherein command name " b " represents Baidu's search engine, finally generates and performs with the command operation code of Baidu's search engine search key " 360 ".
In another example, the order " screenshotss " by name of a predefined command list (CLIST), when the character string that user inputs in browser address bar is for " screenshotss ", the character string " screenshotss " that user inputs is mated with the command name " screenshotss " in command list (CLIST), and then realizes the Real-time Obtaining of command name.
The match is successful for command name in the character string of user's input and the command name in command list (CLIST), then the character marking extracted in character string after command name is command parameter.
In an example, the match is successful for " b " character string in the character string " b 360 " of user's input and the command name " b " of command list (CLIST), then " 360 " of extracting in character string are labeled as command parameter.Another example, when the character string that user inputs in browser address bar is for " screenshotss 100 200 ", the character string " screenshotss " that user inputs then is mated with the command name " screenshotss " in command list (CLIST) by browser, after success, the screenshotss coordinate " 100 200 " in character string is labeled as command parameter.
In another example, the match is successful for the character string " current location weather hotel " that user is inputted by mobile phone browser and the command name " current " in command list (CLIST), then " position " of extracting in character string is labeled as the first command parameter, " position " of extracting in character string is labeled as the second command parameter, " hotel " of extracting in character string is the 3rd command parameter, by command name " current " respectively with the first command parameter, second command parameter and the 3rd command parameter combine, generate respectively and obtain current location, weather, the instruction of position hotel information also performs, acquisition action can complete by also receiving to search engine transmission searching request the mode returned results.Obviously, the present invention can also allow user only input a command name, and this command name corresponding multiple command parameter in advance, after user only input command name, generate corresponding command operation code respectively according to the command parameter pre-set and perform, such as user's input " current " then utilizes the shortcut preset to start function of the present invention, recognizing after " current " be the command name in command list (CLIST), search mapping table and know that this command name has preset " current weather ", " current location ", multiple command parameters such as " current mail box state ", the multiple command parameter pre-set and command name are generated the corresponding command operation code respectively and perform, thus acquisition current weather, current location, the information such as current mail box state.In addition, between command parameter in correlative situation, also can arrange and generate and the sequencing of execution of command operations code, such as current hotel information needs first to obtain current location, then first can generate and perform the instruction obtaining current location, after acquisition current location using current location as one of command parameter, generate the command operation code of the hotel's information obtained under current location.
In step S103, perform the corresponding command operation code that in step S102, browser generates according to the character string obtained.
In an example, according to S102 step results, after mating with the command name in command list (CLIST) in the character string of user's input, then the operation code in fill order list.Such as, command name in command list (CLIST) is " screenshotss ", then the command operation code of relative set performs one section of instruction code current page being carried out to screenshotss, further, may be also the instruction code carrying out screenshotss according to certain coordinate rule.
Fig. 2 is the key word fast search structural drawing of one embodiment of the invention.In figure, 201 is browser address bar, and 202 is search engine list, and 203 is that search engine A, 204 is for search engine B.
User is input of character string " B weather Beijing " in address field 201, wherein " weather Beijing " is the key word of search, first browser mates with command list (CLIST) (search engine list) 202 according to the text string extracting search engine code " B " in address field 201, after the match is successful, browser is spliced to the key word " weather Beijing " in address field 201 in the corresponding search string of search engine code, forms new search string.Initial search string http://www.baidu.com/baidu? variable " %us " in word=%us & se=360se_8_dg & ie=utf-8 replaces with key word " weather Beijing ", does last browser pass through HTTP request message (GEThttp: //www.baidu.com/baidu new search string URL? word=weather Beijing & se=360se_8_dg & ie=utf-8 " http 1.1) send to www server, www server returns to browser corresponding for search string URL information.
Fig. 3 is that the mailbox of another embodiment of the present invention starts structural drawing fast.In figure, 301 is browser address bar, and 302 is email address list, and 303 is that mailbox server A, 304 is for mailbox server B.
User inputs life character string " TOM chen 123456 " in browser address bar 301, and wherein " chen " is user name, " 123456 " be password.After user have input designator or hot key starts function of the present invention, mate with mailbox code list 302 according to the text string extracting box name " TOM " in address field 301, after the match is successful, browser is spliced to the username and password in address field 301 in the corresponding email address of mailbox code, forms the email address with username and password.Browser sends to www server new email address by HTTP request message.
Fig. 5 is the character string participle flow chart of one embodiment of the invention.
In step S501, by the address field of browser or the character string of search column acquisition input.
In step S502, carry out participle operation according to the character string that step S501 obtains, extract the one or more words in character string.
In step S503, mate with command characteristics storehouse according to one or more word that step S502 extracts.
In step S504, according to the matching result of step S503, after the match is successful, the command parameter extracted in character string generates the corresponding command operation code with the command name that the match is successful.
Utilize such scheme, searching of related content can be completed according to the meaning of one's words assisted user of user, save user time, also more meet user's use habit.
Pre-defined following command characteristics library information, but following content is only for convenience of description, and similar content does not repeat herein one by one:
In an example, using word adjacent after the word that mates with command name feature database in character string as command parameter.
When user in browser address bar input of character string " I wants to listen perturbed, everybody listens ", first to the character string of input, " I wants to listen perturbed browser, everybody listens " carry out participle operation, therefrom extract one or more word such as word " I ", word " is wanted to listen ", word " perturbed ", word " everybody ", word " all ", word " is said ", word " pleasing to the ear ", word according to carrying out participle operation acquisition to character string mates with the Feature Words in word storehouse successively, " wanting to listen " when character string word " to listen " after the match is successful mutually with the Feature Words in word storehouse, word " perturbed " after then " being wanted to listen " by word is labeled as song title, and song title is searched for song " perturbed " by search engine, audio playing software played songs " perturbed " is called finally by browser, if do not search song " perturbed ", terminate function of the present invention.
In another example, using all words after the word that mates with command name feature database in character string as command parameter, as when the character string that user inputs is for " I wants to see allows bullet fly ", by participle operate therefrom be extracted a word " see mutually " with command characteristics library information in Feature Words compare, all words after " being wanted to see " by word in character string after comparison success " allow bullet fly " and are masked as command parameter, and generate the command operation code searching " allowing bullet fly " in order to complete in the video search of " Baidu ".
In another example, using the content that is labeled in character string as command parameter.As when user is in browser address bar time input of character string " I wants to see " the physical culture big world " of central authorities five ", by participle operate therefrom be extracted a word " want to see " with command characteristics library information in Feature Words compare, and the content that " the physical culture big world " in character string is marked by " " " ", therefore " physical culture big world " in character string, as command parameter, has generated the command operation code searching " physical culture big world " in the video search of " google ".
Above-mentioned search address is all strategy predetermined in advance, such as " wants to eat " search of correspondence " popular comment net ", the video search etc. of " wanting to see " corresponding Google.
Fig. 4 is the structural drawing of the present invention's command analysis embodiment.401 represent acquisition module, and 402 represent generation module, and 403 represent execution module.
Acquisition module 401 obtains the character string in browser input field;
Text string generation the corresponding command operation code that generation module 402 obtains according to acquisition module;
Execution module 403 performs the command operation code that matching module extracts.
In an example, acquisition module 401 obtains the character string in browser input field, is mated, and extract command operation code corresponding to command name by the command name of generation module 402 by the command name in character string and predetermined command list (CLIST),
In an example, the character string that generation module 402 pairs of acquisition modules 401 obtain carries out participle parsing.
In an example, the character string that generation module 402 pairs of acquisition modules 401 obtain is carried out participle parsing and is comprised: carry out participle operation to character string, extract one or more word; The one or more word extracted is mated with command name feature database, searches corresponding command name; When then extracting the command parameter in described character string after the match is successful according to predetermined parameter search rule; The command name of coupling and the command parameter of extraction is utilized to generate the corresponding command operation code.
In an example, one or more word that 402 extract mates with command name feature database by generation module, search corresponding command name to comprise: the Feature Words in one or more word and command name feature database is compared, if there is identical Feature Words, then transfer the command name corresponding with this Feature Words.
In an example, the command parameter that the character string that acquisition module 401 obtains is extracted in character string according to predetermined parameter search rule comprises: using word adjacent after the word that mates with command name feature database in character string as command parameter; Using contents all after the word that mates with command name feature database in character string as command parameter; Using the content that is labeled in character string as command parameter.
In another example, the character string that acquisition module 401 obtains comprises multiple command name and/or multiple command parameter, and generation module 402 generates access multiple web-page requests corresponding with it respectively according to multiple command name and/or multiple command parameter.
Obviously, under the prerequisite of the true spirit and scope that do not depart from patent of the present invention, patent of the present invention described here can have many changes.Therefore, all changes that it will be apparent to those skilled in the art that, all should be included within scope that these claims contain.Patent of the present invention scope required for protection is only limited by described claims.