Embodiment
In the detailed description of this part, only pass through example to the desired best mode of inventor of embodiment of the present invention, illustrate and described preferred embodiment of the present invention.It will be appreciated that and not deviate under the prerequisite of the present invention, it is made amendment with regard to each conspicuous aspect.Correspondingly, it is exemplary in itself that drawing and description should be regarded as, rather than restrictive.
Referring to Fig. 1, Fig. 1 is the exemplary process diagram of the inventive method, comprising: in step 101, for each application program is provided with its special-purpose input method parameter configuration rule; In step 102, when application program loads input method, obtain the corresponding input method parameter configuration rule of this application program; In step 103, the configuration parameter of confirming based on this input method parameter configuration rule replaces corresponding parameters loading input method in the input method global parameter.
The example of input method parameter configuration rule can be as follows:
[app1] expression rule 1
Exe=qq.exe representes should the corresponding qq.exe application program of rule
Celldictid=257, the special-purpose classified lexicon sign of 598 expressions
Skinid=23 representes the skin sign
Syncinterval=1 representes dictionary lock in time
[app2] expression rule 2
Exe=youdao.exe representes should the corresponding youdao.exe application program of rule
Celldictid=45 representes special-purpose classified lexicon sign
English=1 representes default language
Candnum=9 representes the candidate word number
Candfont=Times New Roman representes the candidate word font
For application program qq.exe; When application program loads input method; Obtain the corresponding input parameter configuration rule of this application program earlier, promptly app1 loads input method with the corresponding parameter in this configuration rule corresponding configuration parameter substitution input method global parameter then; Promptly use celldictid=257,598, skinid=23, syncinterval=1 replace the corresponding parameter in the input method global parameter to load input method.
Be not difficult to find from above-mentioned example, the corresponding input method parameter configuration rule reality of application program be exactly according to this application program characteristics, in the demand of use, be provided with its distinctive configuration parameter.Input method parameter configuration rule has only defined the configuration parameter of this application-specific, for other parameters in the undefined input method global parameter, still adopts the definition in the input method global parameter to load.This shows that technical scheme of the present invention can provide different inputs to experience in different application programs.
Wherein, The corresponding input method parameter configuration rule of this application program of said acquisition comprises: judge the input method parameter configuration rule that whether exists current application program corresponding in the local rules repository; If exist, then from local rules repository, obtain corresponding input method parameter configuration rule; Otherwise, the access rule server, regular from said rule server from obtaining corresponding input method parameter configuration.
Wherein, Corresponding parameters loading input method comprises in the configuration parameter replacement input method global parameter in this input method parameter configuration rule of said usefulness: when the configuration parameter in the said input method parameter configuration rule comprises special-purpose classified lexicon and/or skin; Judge in local classified lexicon and/or the skin catalogue whether have corresponding special classified lexicon and/or skin to this configuration parameter; If exist; Then from local classified lexicon and/or skin catalogue, extract corresponding special classified lexicon and/or skin, replace corresponding parameters loading input method in the input method global parameter; Otherwise visit classified lexicon server and/or skin server obtain corresponding special classified lexicon and/or skin, replace corresponding parameters loading input method in the input method global parameter.
In addition, this method further comprises: set up the corresponding relation between program process name and the corresponding input method parameter configuration rule; Accordingly, the corresponding input method parameter configuration rule of this application program of said acquisition comprises: the process name based on this application program obtains the input method parameter configuration rule corresponding with this application program.
Application program described in the technical scheme of the present invention loads input method and comprises: load in input method or the application program operational process when starting application program and switch input method.
The all or part of step of realization said method embodiment can be accomplished through the relevant hardware of programmed instruction, and aforesaid program can be stored in the computer read/write memory medium, and this program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
In addition, the present invention also provides a kind of device of input method self-adaptation application program.Referring to Fig. 2, Fig. 2 is the exemplary block diagram of this device.
This device comprises processing unit and loading unit; Said processing unit is used for when application program loads input method, obtains the special input method parameter configuration rule that is provided with into this application program; Said loading unit is used for the input method parameter configuration rule according to said processing unit acquisition, and the configuration parameter of confirming according to this input method parameter configuration rule replaces corresponding parameters loading input method in the input method global parameter.The cited device of the present invention can be built in user terminal.
This device further comprises Database Unit; Said Database Unit is used for the local rules repository that keeping records has the corresponding special input method parameter configuration rule of each application program; Said processing unit; When obtaining application program corresponding special input method parameter configuration rule; Judge the input method parameter configuration rule that whether exists current application program corresponding in the said Database Unit; If exist, then from said Database Unit, obtain corresponding input method parameter configuration rule; Otherwise the access rule server obtains corresponding input method parameter configuration rule from said rule server, and is stored in the said Database Unit.
Said Database Unit is further used for local classified lexicon and the skin catalogue that records skin that keeping records has special-purpose classified lexicon; Accordingly; Said loading unit; When the configuration parameter in the said input method parameter configuration rule comprises special-purpose classified lexicon and/or skin, judge in local classified lexicon and/or the skin catalogue in the said Database Unit whether have corresponding special classified lexicon and/or skin to this configuration parameter, if exist; Then from said Database Unit, extract corresponding special classified lexicon and/or skin, replace corresponding parameters loading input method in the input method global parameter; Otherwise; Visit classified lexicon server and/or skin server obtain corresponding special classified lexicon and/or skin; Replace that corresponding parameters loads input method in the input method global parameter, and the special-purpose classified lexicon that will obtain and/or skin are stored in local classified lexicon and/or skin catalogue in the said Database Unit.
Wherein, said processing unit is used for based on the corresponding relation that is provided with between program process name and the input method parameter configuration rule, obtains the input method parameter configuration rule corresponding with current application program.
Said processing unit when in starting application program or application program operational process, switching input method, obtains the special input method parameter configuration rule that is provided with into this application program.
Technical scheme is for a better understanding of the present invention enumerated embodiment at present technical scheme of the present invention is carried out detailed explanation.
At first need its special-purpose input method parameter configuration rule be set for each application program; This configuration rule can be positioned at the local rules repository of subscription client; Also can be stored in the rule server of far-end; Can help expansion of the present invention constantly for new application program is provided with input method parameter configuration rule like this.When application program loads input method, when in local rules repository, can not find input method parameter configuration rule, then can visit the rule server of far-end and obtain corresponding configuration rule.Can identify different application programs with the process name of application program in the present embodiment.Certainly, also can adopt additive method to identify different application programs, as different application programs being numbered etc.
In the input method configuration parameter, some parameter is just can realize through configuration, like candidate word number, candidate word font etc., if it is 10 that the candidate word number is set, directly loads and just can come into force.But some configuration parameter just needs download relevant information, like special-purpose classified lexicon and skin.Therefore; In the corresponding input method configuration parameter of application program, comprise special-purpose classified lexicon and this type of skin configuration parameter; Need to search in the classified lexicon and the skin catalogue of this locality earlier; When can not find, the classified lexicon server and/or the skin server that visit again far-end obtain corresponding special classified lexicon and/or skin, after the relevant information of acquisition, load again.At present, provide the technology of special-purpose classified lexicon and skin very ripe, just no longer detailed here.
Referring to Fig. 3, Fig. 3 is the process flow diagram of embodiment of the invention method, and is specific as follows:
In step 301, when application program loads input method, obtain the process name of current application program.
The application program of indication loading input method can comprise two kinds of situation in the present embodiment: load in input method or the application program operational process when promptly starting application program and switch input method.
In step 302, according to the current process name that obtains, in the local rules repository of local client, search the input method parameter configuration rule that whether exists the current process name corresponding, if, execution in step 303; Otherwise, execution in step 304.
In step 303, from local rules repository, obtain the corresponding input method parameter configuration rule of program process, execution in step 305.
In step 304, the access rule server obtains corresponding input method parameter configuration rule from rule server; And it is stored in the local rules repository.
In step 305, judge in the input method parameter configuration rule of being obtained whether comprise special-purpose classified lexicon or skin, if then execution in step 306; Otherwise, execution in step 309.
In input method parameter configuration rule, comprise special-purpose classified lexicon or this category information of skin, then need find this category information to load again earlier.
In step 306, judge in local classified lexicon and/or the skin catalogue whether have corresponding special classified lexicon and/or skin, if, execution in step 307; Otherwise, execution in step 308.
In step 307, from local classified lexicon and/or skin catalogue, extract corresponding special classified lexicon and/or skin, execution in step 309.
In step 308, visit classified lexicon server and/or skin server obtain corresponding special classified lexicon and/or skin, and the special-purpose classified lexicon that will obtain and/or skin are stored in the local classified lexicon and the skin catalogue of correspondence, execution in step 309.
In step 309, the configuration parameter of confirming based on this input method parameter configuration rule replaces corresponding parameters loading input method in the input method global parameter.
Here,, promptly represent the configuration parameter that is provided with in the input method parameter configuration rule, also represent the special-purpose classified lexicon and/or the dictionary that obtain based on the configuration parameter that is provided with based on the configuration parameter that this input method parameter configuration rule is confirmed.
Here, the input method global parameter can load before carrying out this flow process, in the process of carrying out this flow process, corresponding parameter is wherein replaced.Also can carry out this flow process earlier, the corresponding parameter with in the predetermined parameter replacement input method global parameter in the input method parameter configuration rule directly loads then.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.