CN104765750B - Input language switching method and device in input method application - Google Patents

Input language switching method and device in input method application Download PDF

Info

Publication number
CN104765750B
CN104765750B CN201410007060.6A CN201410007060A CN104765750B CN 104765750 B CN104765750 B CN 104765750B CN 201410007060 A CN201410007060 A CN 201410007060A CN 104765750 B CN104765750 B CN 104765750B
Authority
CN
China
Prior art keywords
input
language
character string
library
character
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
CN201410007060.6A
Other languages
Chinese (zh)
Other versions
CN104765750A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410007060.6A priority Critical patent/CN104765750B/en
Publication of CN104765750A publication Critical patent/CN104765750A/en
Application granted granted Critical
Publication of CN104765750B publication Critical patent/CN104765750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is suitable for the field of input method application, and provides a method and a device for switching input languages in input method application, wherein the method comprises the following steps: acquiring a current input character string in an input method application; matching the input character string with a preset language library to obtain a language library matched with the input character string; and switching the input language applied by the input method to the language corresponding to the language library matched with the input character string. The method and the device match the current input character string in the input method application with the preset language library to obtain the language library matched with the input character string, and switch the input language of the input method application to the language corresponding to the language library matched with the input character string, so that the automatic switching of the input language in the input method application is realized, the switching operation of the input language in the input method application is simplified, the character input time is saved, and the character input efficiency of the input method application is improved.

Description

Input language switching method and device in input method application
Technical Field
The invention belongs to the field of character input, and particularly relates to an input language switching method and device in input method application.
Background
Along with the development and popularization of the intelligent terminal, the importance of the input method applied to the intelligent terminal is also shown. The existing input method application generally supports multiple languages, for example, Chinese or English and other languages can be used as the input language of the input method application, so that a user can conveniently input Chinese characters and English characters.
After the existing input method application is started, a default language is generally adopted as an input language of the input method application, for example, a language used last when the input method is started last is generally adopted as an input language when the input method application is started next time, and when the input language needs to be switched, a switching instruction needs to be input first. The input switching instruction can be input through a menu or a shortcut key, and the input language in the input method application can be switched, but the input switching instruction needs to be input first, so the operation is complex, the efficiency of character input of the input method application is reduced, and particularly when the input method application needs to be switched frequently among different languages, the input efficiency is obviously reduced.
Disclosure of Invention
The embodiment of the invention provides an input language switching method and device in input method application, aiming at solving the problems of complex input language switching operation and low character input efficiency in the input method application.
In a first aspect, a method for switching input languages in an input method application is provided, where the method includes:
acquiring a current input character string in an input method application;
matching the input character string with a preset language library to obtain a language library matched with the input character string;
and switching the input language applied by the input method to the language corresponding to the language library matched with the input character string.
In a second aspect, an apparatus for switching input languages in an input method application is provided, the apparatus comprising:
the input character string acquisition unit is used for acquiring a current input character string in the input method application;
the language library matching unit is used for matching the input character string with a preset language library to obtain a language library matched with the input character string;
and the input language switching unit is used for switching the input language applied by the input method to the language corresponding to the language library matched with the input character string.
In the embodiment of the invention, the current input character string in the input method application is matched with the preset language library to obtain the language library matched with the input character string, and the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, so that the automatic switching of the input language in the input method application is realized, the switching operation of the input language in the input application method is simplified, the character input time is saved, and the character input efficiency applied by the input method is improved.
Drawings
Fig. 1 is a flowchart of an implementation of a method for switching input languages in an input method application according to an embodiment of the present invention;
fig. 2 is a flowchart of an implementation of a method for switching input languages in an input method application according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating an implementation of a method for switching input languages in an input method application according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating an implementation of dynamically generating a predetermined language library according to a historical input record of a user according to an embodiment of the present invention;
fig. 5 is a block diagram of a switching device for input languages in an input method application according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the embodiment of the invention, the current input character string in the input method application is matched with the preset language library to obtain the language library matched with the input character string, and the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, so that the automatic switching of the input language in the input method application is realized, the switching operation of the input language in the input application method is simplified, the character input time is saved, and the character input efficiency applied by the input method is improved.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation flow of an input language switching method in an input method application provided by an embodiment of the present invention, which is detailed as follows:
s101, acquiring a current input character string in the input method application.
Wherein the current input string contains one or more characters. For ease of understanding, the following are illustrated:
assuming that the user inputs the character "w" after the input method application is started, the current input character string is "w", if the character "w" is continuously input after the character "w" is input, the current input character string is "www", if the character "w" is continuously input after the character "ww" is input, the current input character string is "www", and so on.
Further illustrated by another example is as follows:
assuming that a user inputs a character "a" after the input method application is started, the current input character string is "a", if a character "n" is continuously input after the character "a" is input, the current input character string is "an", if a character "j" is continuously input after the character "an" is input, the current input character string is "anj", if a character "i" is continuously input after the character "anj" is input, the current input character string is "anji", if a character "n" is continuously input after the character "anji" is input, the current input character string is "anjin", if a character "g" is continuously input after the character "anjin" is input, the current input character string is "anjin", and so on.
And S102, matching the current input character string with a preset language library to obtain the language library matched with the current input character string.
Wherein the preset language library comprises a plurality of character strings. The character strings included in the preset language library may be character strings having character input characteristics of a language corresponding to the language library. The character strings included in the preset language libraries are not repeated. The preset language library includes, but is not limited to, a Chinese character library, an English character library, and the like. Other word libraries can be set according to the character input requirement, and the method is not illustrated. The character strings contained in the Chinese character library have character input characteristics of Chinese, for example, the character strings contained in the Chinese character library are character strings of Chinese pinyin, such as character strings "angling", "zhongguo", and the like. The character strings included in the english word stock have english character input features, for example, the character strings included in the english word stock are generally character strings of english words or phrases, such as "we" and "china".
In this embodiment, the preset language library has a corresponding relationship with languages, for example, the language corresponding to the chinese character library is chinese, and the language corresponding to the english character library is english.
In another embodiment of the present invention, the method further comprises:
putting a preset language library into an input method application;
pulling a preset language library from a server to an input method application; and/or the presence of a gas in the gas,
and dynamically generating a preset language library according to the historical input record of the user.
The preset language library is placed in the input method application, namely the preset language library, such as a Chinese character library and/or an English character library, is placed in the input method application before the input method application is released.
The method for extracting the preset language library from the server to the input method application means that the input method application extracts the language library from the server in which the language library is stored and stores the language library to the local of the input method application, or directly receives the language library pushed by the server from the server and stores the language library in the local of the input method application. In this way, the preset language library can be flexibly expanded and updated.
The specific process of dynamically generating the preset language library according to the historical input record of the user is shown in fig. 4, and is not described herein again.
The specific process of matching the input character string with a preset language library to obtain the language library matched with the input character string is as follows:
matching the input character string with a character string contained in a preset language library, wherein if the character string matched with the input character string exists in the preset language library, the preset language library is the obtained language library matched with the input character string, and if the character string matched with the input character string does not exist in the preset language library, the current input language applied by the input method is kept unchanged. Taking an example that the preset language library comprises a Chinese character library and an English character library, further explaining in detail the specific process of matching the input character string with the preset language library to obtain the language library matched with the input character string:
a1, matching the input character string with the character string contained in a Chinese character library, wherein if the character string matched with the input character string exists in the Chinese character library, the obtained language library matched with the input character string is the Chinese character library;
and A2, matching the input character string with the character string contained in the English character library, and if the character string matched with the input character string exists in the English character library, obtaining the language library matched with the input character string as the English character library.
S103, switching the input language applied by the input method to the language corresponding to the language library matched with the input character string.
Specifically, the current input language of the input method application may be obtained first, the current input language of the input method application is compared with the language corresponding to the language library matched with the input character string, if the current input language of the input method application is the same as the language corresponding to the language library matched with the input character string, the input language of the input method application is kept unchanged, and if the current input language of the input method application is different from the language corresponding to the language library matched with the input character string, the input language of the input method application is switched from the current input language to the language corresponding to the language library.
In the embodiment, the language library matched with the input character string is obtained by comparing the input character string with the preset language library, and the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, so that the input language in the input method application can be automatically switched according to the input character string, the switching operation of the input language in the input method application is simplified, the time consumed by character input is saved, and the character input efficiency of the input method application is improved.
Fig. 2 shows an implementation process of a method for switching an input language in an input method application according to another embodiment of the present invention, where steps S201 to S203 are respectively the same as steps S101 to S103 in fig. 1, and are not described herein again, where after S203, the method further includes:
and S204, converting the input character string into an alternative output character string according to the input language applied by the input method, and displaying the alternative output character string.
In this embodiment, after the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, the input character string is converted into the alternative output character string according to the input language applied by the input method, and the alternative output character string is displayed.
The specific process of converting the input character string into the alternative output character string according to the input language applied by the input method and displaying the alternative output character string is as follows:
when the input language applied by the input method is Chinese, matching the input character string with a pinyin Chinese character library applied by the input method to obtain a Chinese character string corresponding to the input character string; wherein, the pinyin Chinese character library stores the corresponding relation between the Chinese pinyin character string and the Chinese character string;
when the input language applied by the input method is English, the input character string is directly used as the alternative output character string, or English words containing the input character string are used as the alternative output character string.
Table 1.1 shows an example of the correspondence between the chinese pinyin character string and the chinese character string stored in the pinyin-chinese character library, but the example is not limited thereto.
Chinese phonetic character string Chinese character string
anjing Quiet, blind well … …
he And, drink, box, core, what, … …
jin Weight of only, advancing, approaching, golden, … …
…… …….
As can be seen from the correspondence relationship between the pinyin character strings and the chinese character string stored in the pinyin-chinese character library shown in table 1.1, by matching the input character string with the chinese pinyin character strings and the chinese character string in the correspondence relationship between the chinese pinyin character strings and the chinese character string stored in the pinyin-chinese character library, the chinese character strings corresponding to the chinese pinyin character strings that are consistent with the input character string are all used as alternative output character strings. Examples are as follows:
assuming that the input character string is "joining", since the input language applied by the input method is chinese, matching the input character string "joining" with the corresponding relationship between the input character string and the pinyin character string and the chinese character string stored in the pinyin chinese character library shown in table 1.1, and obtaining the alternative output character string includes: "quiet", "blind well", etc.
It is to be understood that the specific manner of converting the input character string into the alternative output character string according to the input language applied by the input method and displaying the alternative output character string may also be any one of the manners provided by the prior art, and is not illustrated herein.
In this embodiment, after the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, the input character string is converted into the alternative output character string according to the input language applied by the input method, and the alternative output character string is displayed. Therefore, after the input language applied by the input method is automatically switched to the language corresponding to the language library matched with the input character string according to the input character string, the input character string is converted into the alternative output character string according to the input language applied by the input method, so that a user can select one output character string from the optional output character string as the output character string corresponding to the input character string, and the character output is convenient and quick.
In another embodiment of the present invention, after S204, the method further includes:
and receiving an output character string selection instruction input by a user, and taking the alternative output character string specified by the output character string selection instruction as the output character string corresponding to the input character string.
Fig. 3 shows an implementation flow of an input language switching method in an input method application according to another embodiment of the present invention, which is detailed as follows:
s301, acquiring the input language with the highest frequency of use when the interface performs character input.
The interface is a human-computer interaction interface that can be determined by Uniform Resource Locator (URL), where one URL corresponds to one interface. When one URL can determine a plurality of human-computer interaction interfaces, the plurality of human-computer interaction interfaces determined by the URL are used as one interface. Examples are as follows:
for all documents (including document aa. doc) that can be identified by a URL of file:///d:/photo/aa. doc, the interface refers to all document interfaces (including the interface of document aa. doc) that are identified by the URL, and for all human-computer interaction interfaces that can be identified by a URL of http:// www.baidu.com/the interface refers to all human-computer interaction interfaces that are identified by the URL.
When a user inputs characters in one interface, different languages need to be used as input languages for input method application under different conditions, for example, for an interface needing to input chinese characters and english characters, chinese characters and english characters need to be used as input languages for input method application respectively.
The process of acquiring the input language with the highest frequency of use when inputting characters on the interface is specifically as follows:
and B1, acquiring the use times of each input language in each character input on the interface within a preset time period.
And B2, performing weighted summation processing on the use times of each input language in each character input on the interface within a preset time period, and determining the input language with the highest weighted summation value as the input language with the highest use frequency in the character input on the interface.
Examples are as follows:
if character input is performed on an interface three times within a preset time period, the number of times of use of each input language applied by the input method is acquired each time the character is input on the interface. The number of times of use of each input language of the input method application refers to the number of times that the input method application converts an input character string into an output character string according to the input language, and it is assumed that when character input is performed on the interface for the three times, the number of times of use of each input language of the input method application is obtained each time character input is performed on the interface, and is shown in table 1.2.
Figure BDA0000454201590000081
Then, weighting and summing the use times of each input language when the interface is used for inputting characters three times within a preset time period, and if the weights of the first time, the second time and the third time are respectively 0.3, 0.5 and 0.2, weighting and summing to obtain a Chinese weighting and summing value:
100*0.3+200*0.5+300*0.2=190
the weighted sum in english is:
200*0.3+400*0.5+50*0.2=270
and determining the input language (English) with the highest weighted sum value as the input language with the highest frequency of character input in the interface.
And S302, applying the input language with the highest use frequency as a default input language of the interface by using the input method. The default input language of the input method application on the interface refers to the input language of the input method application when the interface starts the input method application.
In this embodiment, by acquiring the frequency of each language as the input language applied to the input method when the interface performs character input, and applying the language with the highest frequency as the default input language of the interface, the switching frequency of the input language applied to the input method when the interface performs character input is reduced, and the character input efficiency applied to the input method is improved.
Fig. 4 shows a specific implementation flow of dynamically generating a preset language library according to a historical input record of a user according to an embodiment of the present invention, which is detailed as follows:
s401, obtaining a history input record applied by an input method in a preset time period, wherein the history input record comprises an input character string and an output character string corresponding to the input character string.
The preset time period can be set arbitrarily as required, for example, the preset time period can be set to be a time period of a preset time length from the current time to the previous time.
S402, for each input character string in the history input record, determining an input language used when the input character string is converted into corresponding output character strings.
Specifically, each input character string generally corresponds to an output character string, and the output character string can be recognized as an input language used when an input method is applied to convert the input character string into the output character string by recognizing the output character string; when an output character string corresponding to an input character string is an English character string, the input character string is converted into the English character string by adopting English as an input language in the output character string.
S403, counting the use frequency of each input language for each input character string in the history input record. Wherein the frequency of use of each input language refers to the frequency of use of the input method in the input language used when converting the input character string into the output character string.
In this embodiment, for some input character strings, in different cases, the user may select different languages as the input languages for the input method application, and therefore, by counting, for each input character string, the input languages used by the input method application when converting the input character string into the output character string, and counting the frequency of use of each input language, the language library to which the input character string should belong can be determined more accurately.
S404, adding the input character string into a language library corresponding to the input language with the highest use frequency.
In the embodiment, the preset language library is dynamically generated according to the historical input records of the users, so that the preset language library better meets the personalized input requirements of each user, and the input method is higher in accuracy when being applied to each user.
In another embodiment of the present invention, before adding the input character string to the language library corresponding to the input language with the highest frequency of use, the method further includes:
and judging whether the input character string exists in other language libraries, if so, deleting the input character string from the other language libraries, and adding the input character string into the language library corresponding to the input language with the highest use frequency. Wherein the other language libraries refer to language libraries other than the language library corresponding to the input language with the highest frequency of use.
Fig. 5 shows a structure of a switching device for an input language in an input method application according to an embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of description.
The device can be used for mobile terminals, such as smart phones, tablet computers and the like, and can also be used for computers and the like, can be a software unit, a hardware unit or a unit combining software and hardware which run in the devices, and can also be integrated into the devices or run in application systems of the devices as independent pendants. The input language switching device in the input method application comprises:
the input character string obtaining unit 1 is used for obtaining the current input character string in the input method application.
Wherein the current input string contains one or more characters.
The language library matching unit 2 is configured to match the input character string with a preset language library to obtain a language library matched with the input character string.
Wherein the preset language library comprises a plurality of character strings. The character strings included in the preset language library may be character strings having character input characteristics of a language corresponding to the language library. The preset language library includes, but is not limited to, a Chinese character library and an English character library. Wherein, the Chinese character library and the English character library both comprise a plurality of character strings.
In this embodiment, the preset language library has a corresponding relationship with languages, for example, the language corresponding to the chinese character library is chinese, and the language corresponding to the english character library is english.
The preset language library can be built in the input method application, can be pulled from a server, and can be dynamically generated according to the historical input record of the user.
In another embodiment of the present invention, the language library matching unit 2 is specifically configured to match the input character string with a character string included in the chinese character library, and if a character string matching the input character string exists in the chinese character library, the obtained language library matching the input character string is the chinese character library; and matching the input character string with the character string contained in the English character library, wherein if the character string matched with the input character string exists in the English character library, the obtained language library matched with the input character string is the English character library.
In another embodiment of the present invention, the apparatus further comprises a language library generating unit 3. The language library generating unit 3 is used for dynamically generating the preset language library according to the historical input record of the user.
In another embodiment of the present invention, the language library generating unit 3 includes a history input record acquiring module 31, an input language determining module 32, a usage frequency calculating module 33, and a language library adding module 34. Wherein:
the historical input record acquiring module 31 is configured to acquire a historical input record of an input method application in a preset time period, where the historical input record includes an input character string and an output character string corresponding to the input character string;
the input language determining module 32 is configured to determine, for each input character string in the historical input record, an input language used when the input character string is converted into corresponding output character strings;
the usage frequency calculation module 33 is configured to count, for each input character string, a usage frequency of each input language, where the usage frequency of each input language refers to a usage frequency of an input language used by an input method application when converting the input character string into an output character string;
the language library adding module 34 is configured to add the input character string to the language library corresponding to the input language with the highest frequency of use.
The input language switching unit 4 is used for switching the input language of the input method application to the language corresponding to the language library matched with the input character string.
Specifically, the current input language of the input method application may be obtained first, the current input language of the input method application is compared with the language corresponding to the language library matched with the input character string, if the current input language of the input method application is the same as the language corresponding to the language library matched with the input character string, the input language of the input method application is kept unchanged, and if the current input language of the input method application is different from the language corresponding to the language library matched with the input character string, the input language of the input method application is switched from the current input language to the language corresponding to the language library.
In another embodiment of the present invention, the apparatus further comprises an alternative character string output unit 5. The alternative character string output unit 5 is configured to convert the input character string into an alternative output character string according to an input language applied by an input method, and display the alternative output character string.
In another embodiment of the present invention, the apparatus further comprises a character string output unit 6. The character string output unit 6 is configured to receive an output character string selection instruction input by a user, and use an alternative output character string specified by the output character string selection instruction as an output character string corresponding to the input character string.
In another embodiment of the invention the apparatus further comprises a default input language determination unit 7. The default input language determining unit 7 is configured to acquire an input language with the highest frequency of use when characters are input on an interface, and apply the input language with the highest frequency of use as a default input language of an input method applied to the interface, where the default input language of the input method applied to the interface refers to an input language of the input method applied when the interface starts the input method application.
The process of the default input language determining unit 7 obtaining the input language with the highest frequency of use when the interface performs character input is specifically as follows: acquiring the use times of each input language in each character input on the interface within a preset time period; and carrying out weighted summation processing on the use times of each input language in each character input on the interface within a preset time period, and determining the input language with the highest weighted summation value as the input language with the highest use frequency in the character input on the interface.
In order to make the method provided by the embodiment of the present invention easier to understand, a specific character input scenario is taken as an example below to illustrate the method provided by the embodiment of the present invention.
It is assumed that an input method application is adopted for character input on a certain interface, and a preset language library in the input method application comprises a Chinese character library and an English character library. When a user inputs a character "w" through an input device (such as a keyboard, etc.), the input character string is "w", whether the input character string "w" exists is searched from a Chinese character library and an English character library respectively, if yes, a language corresponding to the language library of the input character string "w" is searched and used as an input language applied by an input method, and if not, the input language applied by the input method is kept as the current input language.
Since the input character string "w" only contains one character, it is difficult to predict which language the user wants to use as the input language of the input method application according to the character, so in general, after the character "w" is input, it is difficult to find the character string the same as the input character "w" in the chinese character library and the english character library, and the input language of the input method application is maintained as the current input language.
If the user continues to input o after inputting the character w, the input character string is wo, whether the input character string wo exists is searched in the Chinese character library and the English character library respectively, if yes, the language corresponding to the language library of the input character string wo is searched as the input language of the input method application, and if not, the input language of the input method application is kept as the default language.
Because the input character string "wo" is the same as the pinyin of the Chinese character "i", and "wo" is not an English word, the character string "wo" is generally included in a Chinese character library, so that when the user inputs "wo", if the input character string "wo" is found in the Chinese character library, the input language applied by the input method is switched to Chinese, and the input character string "wo" is converted into an alternative output character string according to Chinese. When the input character string "wo" is converted into an alternative output character string according to the chinese language, all chinese characters pinyin to "wo" can be taken as alternative output character strings (for example, the alternative output character strings include "me", "wo", "handshake", etc.) and displayed, so that a user selects one (for example, "me") from the alternative output characters as an output character string corresponding to the input character string "wo", and thus, the input character "me" can be applied through an input method.
Assuming that the user continues to input "l" after the input method application switches its input language to chinese according to the input string "wo" after the user inputs "wo", the input string is "wol", and it is searched for whether the input string "wol" is included in the chinese character library and the english character library. If the input string "wol" is found from the english word stock, the input language to which the input method applies is switched from chinese to english, and the input string "wol" is converted into an alternative output string in english. When the input character string "wol" is converted into an alternative output character string in english, all english words beginning with "wol" in the english words can be used as the alternative output character string (for example, the alternative output character string includes "wolf", "Wollaston", etc.) and displayed, so that the user can select one (for example, "wolf") from the alternative output characters as the output character string corresponding to the input character string "wol", and thus, the input character "wolf" can be applied by the input method. If the input string "wol" is found in the Chinese library, the input language to which the input method applies is maintained in Chinese, and the input string "wol" is converted to an alternative output string in Chinese. When the input character string "wol" is converted into an alternative output character string in the chinese language, all chinese character strings including "wol" in the pinyin may be displayed as alternative output character strings (e.g., alternative output character strings include "i am", etc.), so that the user selects one (e.g., "i am") from the alternative output characters as an output character string corresponding to the input character string "wol", and thus, the input character "i am" may be applied by the input method.
In addition, when a language library is dynamically generated according to a history input record applied by an input method, taking an input character string of "wol" as an example, if the frequency of converting the input character string into a corresponding output character string according to english is higher than the frequency of converting the input character string into a corresponding output character string according to chinese when the input character string is "wol", firstly, whether the character string of "wol" exists in a chinese character library is searched, if so, the character string of "wol" in the chinese character library is deleted firstly, and then, the input character string of "wol" is added to the english character library, so that for the input character string without a rule, the input character strings can be added to the corresponding language library according to the history input record applied by the input method to provide a basis for automatic switching of the input language applied by a subsequent input method.
In addition, the frequency of use of each input language is counted every time a character is input on the interface, and if the frequency of use of a certain input language is the highest, indicating that a character is input on the interface, generally, an input character string is converted into an output character string according to the language, and the input language with the highest frequency of use is applied as the input method to the default input language of the interface, so that the number of times of switching the input languages in the input method application can be reduced.
It should be noted that, the units included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
In the embodiment of the invention, the input character string is matched with the preset language library to obtain the language library matched with the input character string, and the input language applied by the input method is switched to the language corresponding to the language library matched with the input character string, so that the automatic switching of the input language applied by the input method is realized, the switching operation of the input language applied by the input application method is simplified, the character input time is saved, and the character input efficiency applied by the input method is improved. The preset language library is dynamically generated according to the historical input records in the input method application, so that the input method application can meet the personalized requirements of users. The method comprises the steps of acquiring the frequency of each language as the input language of the input method application when the interface performs character input, and using the language with the highest frequency as the default input language of the input method application on the interface, so that the switching frequency of the input language of the input method application when the interface performs character input is reduced, and the character input efficiency of the input method application is improved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (14)

1. An input language switching method in input method application, characterized in that the method comprises:
acquiring a current input character string in input method application, wherein the current input character string comprises one or more characters;
matching the input character string with a preset language library to obtain a language library matched with the input character string, wherein the preset language library comprises a plurality of character strings, and the character strings contained in the preset language library are character strings with character input characteristics of a language corresponding to the language library;
switching an input language applied by an input method to a language corresponding to a language library matched with the input character string;
dynamically generating the preset language library according to the historical input record of the user;
wherein, dynamically generating the preset language library according to the historical input record of the user comprises:
acquiring a historical input record of input method application in a preset time period, wherein the historical input record comprises an input character string and an output character string corresponding to the input character string;
determining an input language used when each input character string in the historical input record is converted into corresponding output character strings;
counting the use frequency of each input language aiming at each input character string in the historical input record, wherein the use frequency of each input language refers to the use frequency of the input language used when the input method is applied to convert the input character string into the output character string;
and adding the input character string into a language library corresponding to the input language with the highest use frequency.
2. The method of claim 1, wherein the predetermined language library comprises a Chinese language library and an English language library, each of the Chinese language library and the English language library comprises a plurality of character strings, the Chinese language corresponding to the Chinese language library is Chinese, and the English language corresponding to the English language library is English.
3. The method of claim 2, wherein matching the input string to a predetermined language library to obtain a language library matching the input string comprises:
matching the input character string with character strings contained in the Chinese character library, wherein if the character string matched with the input character string exists in the Chinese character library, the obtained language library matched with the input character string is the Chinese character library;
and matching the input character string with the character string contained in the English character library, wherein if the character string matched with the input character string exists in the English character library, the obtained language library matched with the input character string is the English character library.
4. The method of claim 1, wherein after the switching the input language to which the input method applies to the language corresponding to the language library that matches the input string, the method further comprises:
and converting the input character string into an alternative output character string according to an input language applied by an input method, and displaying the alternative output character string.
5. The method of claim 4, wherein after converting the input string to an alternative output string in an input language applied by an input method and displaying the alternative output string, the method further comprises:
receiving an output character string selection instruction input by a user, and taking an alternative output character string specified by the output character string selection instruction as an output character string corresponding to the input character string.
6. The method of claim 1, wherein the method further comprises:
acquiring an input language with the highest use frequency when the interface inputs characters;
and taking the input language with the highest use frequency as a default input language of the input method applied to the interface, wherein the default input language of the input method applied to the interface refers to the input language of the input method applied when the interface starts the input method application.
7. The method of claim 6, wherein obtaining the input language most frequently used in character input at the interface comprises:
acquiring the use times of each input language in each character input on the interface within a preset time period;
and carrying out weighted summation processing on the use times of each input language in each character input on the interface within a preset time period, and determining the input language with the highest weighted summation value as the input language with the highest use frequency in the character input on the interface.
8. An input language switching apparatus in an input method application, the apparatus comprising:
the input character string acquisition unit is used for acquiring a current input character string in input method application, wherein the current input character string comprises one or more characters;
the language library matching unit is used for matching the input character string with a preset language library to obtain a language library matched with the input character string, wherein the preset language library comprises a plurality of character strings, and the character strings contained in the preset language library are character strings with character input characteristics of a language corresponding to the language library;
the input language switching unit is used for switching the input language applied by the input method to the language corresponding to the language library matched with the input character string;
the language library generating unit is used for dynamically generating the preset language library according to the historical input record of the user;
wherein the language library generating unit includes:
the historical input record acquisition module is used for acquiring a historical input record applied by an input method in a preset time period, wherein the historical input record comprises an input character string and an output character string corresponding to the input character string;
an input language determining module, configured to determine, for each input character string in the historical input record, an input language used when the input character string is converted into each corresponding output character string;
the using frequency calculating module is used for counting the using frequency of each input language aiming at each input character string, wherein the using frequency of each input language refers to the using frequency of the input language used when the input method is applied to convert the input character string into the output character string;
and the language library adding module is used for adding the input character string into a language library corresponding to the input language with the highest use frequency.
9. The apparatus of claim 8, wherein the predetermined language library comprises a Chinese language library and an English language library, each of the Chinese language library and the English language library comprises a plurality of character strings, the Chinese language library corresponds to Chinese language, and the English language library corresponds to English language.
10. The apparatus according to claim 9, wherein the language library matching unit is specifically configured to match the input character string with a character string included in the chinese character library, and if a character string matching the input character string exists in the chinese character library, the obtained language library matching the input character string is the chinese character library.
11. The apparatus of claim 8, wherein the apparatus further comprises:
and the alternative character string output unit is used for converting the input character string into an alternative output character string according to the input language applied by the input method and displaying the alternative output character string.
12. The apparatus of claim 11, wherein the apparatus further comprises:
and the character string output unit is used for receiving an output character string selection instruction input by a user and taking the alternative output character string specified by the output character string selection instruction as the output character string corresponding to the input character string.
13. The apparatus of claim 8, wherein the apparatus further comprises:
the default input language determining unit is used for acquiring an input language with the highest use frequency when characters are input on the interface, and applying the input language with the highest use frequency as an input method to the default input language of the interface, wherein the default input language applied to the interface is the input language applied to the input method when the interface starts the input method application.
14. A computer-readable storage medium characterized in that the computer-readable storage medium stores a program for implementing an input language switching method in an input method application according to any one of claims 1 to 7 when the program is executed.
CN201410007060.6A 2014-01-07 2014-01-07 Input language switching method and device in input method application Active CN104765750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410007060.6A CN104765750B (en) 2014-01-07 2014-01-07 Input language switching method and device in input method application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410007060.6A CN104765750B (en) 2014-01-07 2014-01-07 Input language switching method and device in input method application

Publications (2)

Publication Number Publication Date
CN104765750A CN104765750A (en) 2015-07-08
CN104765750B true CN104765750B (en) 2020-12-25

Family

ID=53647583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410007060.6A Active CN104765750B (en) 2014-01-07 2014-01-07 Input language switching method and device in input method application

Country Status (1)

Country Link
CN (1) CN104765750B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373320A (en) * 2015-12-09 2016-03-02 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN106886513A (en) * 2015-12-16 2017-06-23 宏碁股份有限公司 Electronic installation and its operating method
CN105635779B (en) * 2015-12-29 2019-10-01 深圳Tcl数字技术有限公司 The control method and device of smart television input method
CN105511796A (en) * 2015-12-30 2016-04-20 努比亚技术有限公司 Method and device for information inputting of adaptive-switching input method interface
CN105824694A (en) * 2016-03-09 2016-08-03 百度在线网络技术(北京)有限公司 Adjustment method and device for resources of applications
CN105930140A (en) * 2016-04-01 2016-09-07 乐视控股(北京)有限公司 Input mode setting method and apparatus
CN106774976A (en) * 2016-12-01 2017-05-31 北京小米移动软件有限公司 input method switching method and device
CN106598269A (en) * 2016-12-15 2017-04-26 北京小米移动软件有限公司 Input method switching method and apparatus
CN108052212A (en) * 2017-10-18 2018-05-18 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable medium for inputting word
CN109828678A (en) * 2019-01-30 2019-05-31 陕西科技大学 A kind of Chinese and English automatic switchover input method and system based on deep learning
CN110008383B (en) * 2019-04-11 2021-07-27 北京安护环宇科技有限公司 Black and white list retrieval method and device based on multiple indexes
CN111610863B (en) * 2020-05-12 2023-08-22 Oppo广东移动通信有限公司 Information input method, device, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419531A (en) * 2008-12-12 2009-04-29 腾讯科技(深圳)有限公司 Character input method and device in computer
CN101887310A (en) * 2010-06-21 2010-11-17 北京搜狗科技发展有限公司 Method and device for switching input state and keyboard style
CN102063195A (en) * 2010-04-06 2011-05-18 百度在线网络技术(北京)有限公司 Method and equipment allowing user to implement mixed Chinese and English input

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101943952B (en) * 2010-01-27 2014-07-09 北京搜狗科技发展有限公司 Mixed input method of at least two languages and input method system
US9002699B2 (en) * 2011-11-14 2015-04-07 Microsoft Technology Licensing, Llc Adaptive input language switching
CN103049098A (en) * 2012-12-28 2013-04-17 华为技术有限公司 Device and method for input method shifting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419531A (en) * 2008-12-12 2009-04-29 腾讯科技(深圳)有限公司 Character input method and device in computer
CN102063195A (en) * 2010-04-06 2011-05-18 百度在线网络技术(北京)有限公司 Method and equipment allowing user to implement mixed Chinese and English input
CN101887310A (en) * 2010-06-21 2010-11-17 北京搜狗科技发展有限公司 Method and device for switching input state and keyboard style

Also Published As

Publication number Publication date
CN104765750A (en) 2015-07-08

Similar Documents

Publication Publication Date Title
CN104765750B (en) Input language switching method and device in input method application
US10777192B2 (en) Method and apparatus of recognizing field of semantic parsing information, device and readable medium
US10122839B1 (en) Techniques for enhancing content on a mobile device
JP2015532753A (en) Character input method, system and apparatus
CN110069698B (en) Information pushing method and device
JP2013218676A (en) Input method, input device and terminal
US10699712B2 (en) Processing method and electronic device for determining logic boundaries between speech information using information input in a different collection manner
CN102141868B (en) Method for quickly operating information interaction page, input method system and browser plug-in
CN106959976B (en) Search processing method and device
CN107992523B (en) Function option searching method of mobile application and terminal equipment
CN114861889B (en) Deep learning model training method, target object detection method and device
CN113836314B (en) Knowledge graph construction method, device, equipment and storage medium
CN110569370B (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN110874532A (en) Method and device for extracting keywords of feedback information
CN106601256A (en) Voice recognition method and mobile terminal
WO2016034066A1 (en) Chinese character recognition method and device, and terminal
WO2017071190A1 (en) Input data processing method, apparatus and device, and non-volatile computer storage medium
US20150040058A1 (en) Method and System for Inputting Variant Character and Storage Medium
CN114818736B (en) Text processing method, chain finger method and device for short text and storage medium
CN111126034A (en) Medical variable relation processing method and device, computer medium and electronic equipment
CN102999639A (en) Speech recognition character index based method and system for searching
CN103294661A (en) Language ambiguity eliminating system and method
CN102779178A (en) Method for ordering by utilizing voice search on ipad tablet personal computer
CN104268195A (en) Method and device for processing local resources in terminal
CN111581363A (en) Knowledge extraction method, device, equipment and storage medium

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