CN105159472A - Input method switching method and device - Google Patents

Input method switching method and device Download PDF

Info

Publication number
CN105159472A
CN105159472A CN201510386413.2A CN201510386413A CN105159472A CN 105159472 A CN105159472 A CN 105159472A CN 201510386413 A CN201510386413 A CN 201510386413A CN 105159472 A CN105159472 A CN 105159472A
Authority
CN
China
Prior art keywords
input method
contact
configuration file
contact person
input
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.)
Pending
Application number
CN201510386413.2A
Other languages
Chinese (zh)
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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510386413.2A priority Critical patent/CN105159472A/en
Publication of CN105159472A publication Critical patent/CN105159472A/en
Pending legal-status Critical Current

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an input method switching method and device, and belongs to the technical field of intelligent equipment interaction. The input method switching method comprises the following steps: when a first chatting interfacefor a first contact person is opened, calling a prestored input method configuration file; according to a corresponding relationship between the contact person and the input method in the input method configuration file, inquiring whether the input method configuration file contains the input method corresponding to the first contact person or not; and if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chatting interface. The prestored input method corresponding to the contact person is called when the chatting interface with the contact person is opened to solve the problem that a user needs to continuously switch input methods when the user is in text contact with contact people of various language types, and an effect that the user can quickly switch the input methods when the user is in text contact with the contact people is realized.

Description

Input method switching method and device
Technical Field
The disclosure relates to the technical field of intelligent device interaction, and in particular relates to an input method switching method and device.
Background
The input method is necessary tool software on intelligent equipment and is one of software with the highest use frequency. With the rapid development of economic globalization and network information, the interpersonal relationship network of modern people is continuously expanded and is often in a multi-language environment.
In the current chat application program, a user needs to chat with each friend through a chat interface of the chat application program, and when chat contents need to be input in the chat interface, the chat application program calls a default input method. For example, when a user opens or switches to a chat interface chatting with friends from korea in a chat application, the chat application calls a default input method to facilitate the user to input chat content in the chat interface, and at this time, the user needs to switch the current default input method to a korean input method; if the user opens or switches to the chat interface chatting with the friends from japan, the chat application invokes the default input method to facilitate the user to input the chat content in the chat interface, and at this time, the user needs to switch the current default input method to the japanese input method.
In the course of implementing the present disclosure, the inventors found that the related art has at least the following disadvantages: when a user uses intelligent equipment to establish text contact with contacts using different language types, the user needs to switch the input method for many times.
Disclosure of Invention
In order to solve the problem that a user needs to continuously switch an input method when the user performs text contact with contacts of various language types, the disclosure provides an input method switching method and device. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided an input method switching method, including:
when a first chat interface between the first contact person and the first contact person is opened, calling a pre-stored input method configuration file, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
inquiring whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file;
if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chat interface.
Optionally, the method further includes:
when characters are input on a second chat interface between the second chat interface and a second contact, a second input method switched to after the second chat interface is opened is obtained, and the second input method is used for inputting the characters in the second chat interface; storing the second contact and the second input method as a set of corresponding relations into the input method configuration file; or,
receiving a corresponding relation between a second contact and a second input method set by a user, and storing the corresponding relation into the input method configuration file;
wherein the second contact is the same or different than the first contact.
Optionally, the method further includes:
after a second input method switched to after the second chat interface is opened is obtained, adding 1 to the switching times corresponding to the second contact and the second input method, wherein the switching times are used for indicating the times of switching to the second input method when the second contact chats;
detecting whether the switching times reach a preset time threshold value;
and if the switching times reach the preset times threshold value, executing the step of storing the second contact and the second input method as a group of corresponding relations into the input method configuration file.
Optionally, the storing the second contact and the second input method as a group of corresponding relationships in the input method configuration file includes:
detecting whether the input method configuration file stores the corresponding relation containing the second contact person or not;
if the input method configuration file does not store the corresponding relation containing the second contact person, storing the second contact person and the second input method as a group of corresponding relations into the input method configuration file;
if the input method configuration file stores the corresponding relation containing the second contact person, replacing and storing the second contact person and the second input method as a group of corresponding relation in the input method configuration file to contain the corresponding relation of the second contact person; or adding the second input method to the existing corresponding relation containing the second contact in the input method configuration file.
Optionally, the method further includes:
and if the input method configuration file does not contain the input method corresponding to the first contact person, calling a default input method.
According to a second aspect of the embodiments of the present disclosure, there is provided an input method switching apparatus, the apparatus including:
the device comprises a first calling module, a second calling module and a third calling module, wherein the first calling module is configured to call a pre-stored input method configuration file when a first chat interface between the first calling module and a first contact person is opened, the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
the query module is configured to query whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file called by the first calling module;
the second calling module is configured to call the input method corresponding to the first contact person when the query module queries that the input method configuration file contains the input method corresponding to the first contact person, and the input method is used for inputting characters in the first chat interface.
Optionally, the apparatus further comprises:
the obtaining module is configured to obtain a second input method switched to after a second chat interface is opened when characters are input in the second chat interface between the obtaining module and a second contact person, and the second input method is used for inputting characters in the second chat interface; the first storage module is configured to store the second contact and the second input method acquired by the acquisition module into the input method configuration file as a group of corresponding relations; or,
the second storage module is configured to receive a corresponding relation between a second contact and a second input method, and store the corresponding relation into the input method configuration file;
wherein the second contact is the same or different than the first contact.
Optionally, the apparatus further comprises:
the accumulation module is configured to add 1 to the switching times corresponding to the second contact and the second input method after the acquisition module acquires the second input method switched to after the second chat interface is opened, wherein the switching times are used for indicating the times of switching to the second input method during the chat with the second contact;
a detection module configured to detect whether the number of handovers reaches a predetermined number threshold;
the first storage module is further configured to store the second contact and the second input method acquired by the acquisition module as a set of corresponding relationships in the input method configuration file when the detection module detects that the switching times reaches the predetermined times threshold.
Optionally, the first storage module includes:
the detection submodule is configured to detect whether the input method configuration file stores a corresponding relation containing the second contact;
the first storage submodule is configured to store the second contact and the second input method into the input method configuration file as a group of corresponding relations when the detection submodule detects that the input method configuration file does not store the corresponding relation containing the second contact;
the second storage sub-module is configured to, when the detection sub-module detects that the input method configuration file stores the corresponding relationship containing the second contact, replace the corresponding relationship containing the second contact stored in the input method configuration file with the second contact and the second input method as a group of corresponding relationship; or adding the second input method to the existing corresponding relation containing the second contact in the input method configuration file.
Optionally, the apparatus further comprises:
and the third calling module is configured to call a default input method when the query module queries that the input method configuration file does not contain the input method corresponding to the first contact.
According to a third aspect of the embodiments of the present disclosure, there is provided an input method switching apparatus, the apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
when a first chat interface between the first contact person and the first contact person is opened, calling a pre-stored input method configuration file, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
inquiring whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file;
if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chat interface.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
when a chat interface with a contact person is opened, calling a pre-stored input method corresponding to the contact person, and calling the corresponding input method for chatting in the chat interface; the method has the advantages that the pre-stored input method corresponding to the contact can be directly called for different contacts, and the user does not need to manually switch to the input method, so that the problem that the user needs to continuously switch the input method when the user performs text contact with the contacts of various language types is solved; the method and the device have the advantages that switching operation that the default input method needs to be switched to the input method corresponding to the contact person every time is avoided, and the efficiency of determining the input method corresponding to the contact person is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of input method switching, according to an exemplary embodiment;
FIG. 2A is a flow diagram illustrating a method of input method switching, according to another exemplary embodiment;
FIG. 2B is a diagram illustrating a chat interface, according to an example embodiment;
FIG. 2C is a diagram illustrating configuration of input methods for different contacts through an input method setup portal of an application for chatting with the contacts in accordance with an illustrative embodiment;
FIG. 2D is a diagram illustrating a chat interface for selecting an input method, according to an illustrative embodiment;
FIG. 3A is a flow diagram illustrating an input method switching method according to yet another exemplary embodiment;
FIG. 3B is a flowchart illustrating steps for storing contacts and input methods as a set of correspondences in an input method profile, according to an illustrative embodiment;
FIG. 4 is a block diagram illustrating an input method switching apparatus according to an exemplary embodiment;
fig. 5 is a block diagram illustrating an input method switching apparatus according to another exemplary embodiment;
fig. 6 is a block diagram illustrating an apparatus for switching an input method according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating an input method switching method according to an exemplary embodiment, where the input method switching method is applied to a smart device, as shown in fig. 1, where the smart device may include a smart phone, a tablet computer, a multimedia player, and the like, which have a text input function. The input method switching method comprises the following steps.
In step 101, when a first chat interface between the first contact person and the first contact person is opened, a pre-stored input method configuration file is called, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required when the contact person chats.
In step 102, whether the input method configuration includes the input method corresponding to the first contact person is inquired according to the corresponding relation between the contact person and the input method in the input method configuration file.
In step 103, if the input method configuration file includes an input method corresponding to the first contact, the input method corresponding to the first contact is called, and the input method is used for inputting characters in the first chat interface.
In summary, according to the input method switching method provided in the embodiment of the present disclosure, when a chat interface with a contact is opened, a pre-stored input method corresponding to the contact is called, and the corresponding input method is called for chatting in the chat interface; the method has the advantages that the pre-stored input method corresponding to the contact can be directly called for different contacts, and the user does not need to manually switch to the input method, so that the problem that the user needs to continuously switch the input method when the user performs text contact with the contacts of various language types is solved; the method and the device have the advantages that switching operation that the default input method needs to be switched to the input method corresponding to the contact person every time is avoided, and the efficiency of determining the input method corresponding to the contact person is improved.
Fig. 2A is a flowchart illustrating an input method switching method according to another exemplary embodiment, where the input method switching method is applied to a smart device, as shown in fig. 2A, where the smart device may include a smart phone, a tablet computer, a multimedia player, and the like, which have a text input function. The input method switching method comprises the following steps.
In step 201, a pre-stored input method profile is invoked when a first chat interface with a first contact is opened.
The first chat interface is a chat interface when the first chat interface performs text chat with the first contact, the two chat parties can input the content which the two chat parties want to say in the chat interface, and the chat interface can display the text input by the two chat parties.
Generally, once the chat interface is opened or in the foreground, a text input box is displayed in the chat interface, and the chat interface calls an input method, so that a user inputs text into the text input box in the chat interface according to the input method or by switching the input method desired by the user. After the input characters are sent, the user is displayed in a chat interface as a sender, and the opposite-end user of the chat can check the characters input and sent by the user in a dialog box. By way of example, FIG. 2B is a diagram illustrating a chat interface, as shown in FIG. 2B, according to an example embodiment. When the user 22 opens a chat interface with the korean friend 25, a text input box 23 and a currently called korean input method 24 are displayed in the chat interface, and the contents inputted by the user in the text input box 23 using the korean input method 24 are displayed in the dialog box 21.
The input method configuration file generally includes at least one set of corresponding relations, and each set of corresponding relations may include a contact and an input method required for chatting with the contact. Obviously, the contact in the correspondence described herein is an identifier for uniquely identifying the contact, for example, an account of the contact; the input method in the correspondence described herein is a name for uniquely identifying an input method, such as an english input method, a chinese input method, or the like.
Generally, when a user chats with friends from different countries, different input methods may be required, for example, when chatting with friends from korea, the chat contents may be required to be input through a korean input method; also for example, when chatting with friends from the united states, it may be necessary to input the chat content through an english input method.
Thus, different input methods may be configured for different contacts. Optionally, before using, the user may configure an input method corresponding to the chat with the contact for different contacts. Optionally, the user may configure, through the input method setting entry of the application program, an input method corresponding to a chat with a contact for different contacts, where the application program may be used for an application of chatting with a contact in the address list through a chat interface.
When the input method setting entry is triggered, the application program displays an input method configuration interface, various input methods are displayed in the input method configuration interface, an address list can be displayed or called, and a user selects an input method and selects a friend corresponding to the input method from the address list.
For example, fig. 2C is a schematic diagram illustrating configuring, through an input method setting portal of an application program, corresponding input methods for different contacts when chatting with the contacts according to an exemplary embodiment. The user can enter the input method setting interface from the input method setting entrance of the application program, select the Korean input method, select the friend chatting with the Korean input method, and set the corresponding relation. Obviously, the user can select another part of friends from the address list and set the input method for chatting with the friends to be french, and the user can select another part of friends from the address list and set the input method for chatting with the friends to be german. The number of partial friends mentioned here may be one, two or more.
In step 202, according to the corresponding relationship between the contact and the input method in the input method configuration file, whether the input method corresponding to the first contact is included in the input method configuration file is queried.
Generally, a contact usually corresponds to only one corresponding relationship, that is, the contacts in different corresponding relationships are different.
In step 203, if the input method configuration file includes the input method corresponding to the first contact, the input method corresponding to the first contact is called, and the input method is used for inputting characters in the first chat interface.
When inquiring whether the input method configuration file contains the input method corresponding to the first contact person, if the input method configuration file contains the input method corresponding to the first contact person, the input method configuration file indicates that the input method is very likely to be used for chatting with the first contact person, and at the moment, the input method corresponding to the first contact person can be called, so that characters can be input in a chatting interface with the first contact person by using the input method.
For example, when the intelligent device queries that the input method corresponding to a certain british friend of the user is an english input method, the english input method is called, and the english input method is used for chatting in a chatting interface with the british friend.
In a possible scenario, when a user chats with a friend, the user who may use at least two languages, for example, the native language of chinese, is learning korean to a korean friend, and the korean friend's chinese is very good, and the user may input chinese and korean but not input other languages (e.g., japanese, french, etc.) when chatting with the korean friend, it is also necessary to set at least two input methods corresponding to the korean friend, that is, to store the korean friend and the chinese and korean input methods as a set of correspondence in an input method profile.
That is, when the input method configuration file includes the input method corresponding to the first contact person, the number of the input methods corresponding to the first contact person may be further determined, and if the number of the input methods corresponding to the first contact person is one, the input method corresponding to the first contact person is directly called; if the input methods corresponding to the first contact are two or more, the at least two input methods searched out are displayed in the first chat interface, and the user selects one of the input methods. If the user does not select one of the at least two input methods which are inquired, taking the input method used when the user chats with the first contact last time as the input method of the current time, or taking the input method which has the highest historical use frequency when the user chats with the first contact or the input method which has the highest use frequency in the latest period of time as the input method of the current time.
FIG. 2D is a diagram illustrating a chat interface for selecting an input method, according to an illustrative embodiment. As shown in fig. 2D, when the input method profile includes japanese input methods and korean input methods corresponding to the friend, and when the friend chats, options of the japanese input methods and the korean input methods are respectively displayed on the chat interface for the user to select, and the user can select one of the input methods for chatting with the friend.
In step 204, if the input method configuration file does not include the input method corresponding to the first contact, a default input method is called.
In practical applications, the input method configuration file may not include the input method corresponding to the first contact, for example, the user does not set the input method corresponding to the first contact, or the user does not chat with the first contact, that is, the correspondence between the first contact and the input method corresponding to the first contact is not stored in the input method configuration file in advance, and at this time, the default input method is called.
For example, the default input method of the system in the mobile phone of the user is a chinese input method, when the user chats with a friend for the first time using a chat interface, the intelligent device usually does not query the input method configuration file for the corresponding relationship between the friend and the input method corresponding to the friend, and at this time, the user directly calls the default chinese input method when chatting with the friend.
In summary, according to the input method switching method provided in the embodiment of the present disclosure, when a chat interface with a contact is opened, a pre-stored input method corresponding to the contact is called, and the corresponding input method is called for chatting in the chat interface; the method has the advantages that the pre-stored input method corresponding to the contact can be directly called for different contacts, and the user does not need to manually switch to the input method, so that the problem that the user needs to continuously switch the input method when the user performs text contact with the contacts of various language types is solved; the method and the device have the advantages that switching operation that the default input method needs to be switched to the input method corresponding to the contact person every time is avoided, and the efficiency of determining the input method corresponding to the contact person is improved. Meanwhile, when the input method corresponding to the contact is not inquired, the default input method is directly called, so that the waste of system resources is avoided, and the effect of effectively utilizing the system resources is achieved.
In a possible implementation scenario, the correspondence between the contact and the input method may also be determined according to the input method switched by the user when the user chats with the contact. That is, before step 201, a process of storing the contact and the input method associated with the contact may be further included, which may be specifically described in the description of fig. 3A.
Fig. 3A is a flowchart illustrating an input method switching method according to still another exemplary embodiment, including the following steps.
In step 301, when inputting characters in a second chat interface between the second contact and the second contact, a second input method switched to after the second chat interface is opened is obtained, and the second input method is used for inputting characters in the second chat interface.
The second contact is an object for opening the second chat interface to chat in text, and may be the same as or different from the first contact. The second chat interface is an open chat interface corresponding to the second contact. The second input method is an input method for inputting characters in the second chat interface.
In practical applications, when a user chats with a second contact, the initial input method may not be the input method that the user wants when chatting with the contact, for example, when the user chats with a friend in the united states, the user may need an english input method, and after opening a chat interface for chatting with the friend in the united states, the system may default to the called non-english input method, at this time, the user may switch the default called non-english input method to the english input method, so as to chat with the friend in the united states using the english input method, and at this time, the english input method (i.e., the switched second input method) is obtained.
After the second input method switched to after the second chat interface is opened is obtained, the second contact and the second input method can be stored into the input method configuration file as a group of corresponding relations. However, in practical applications, when the user chats with the contact, the input method may be switched by mistake due to wrong selection or other reasons, so that the input method does not correspond to the contact, or the correspondence between the contact and the input method needs to be changed continuously, and in order to ensure that the correspondence between the input method and the contact can reflect the actual use of the input method as accurately as possible, the following steps 302 to 304 are performed.
In step 302, after the second input method switched to after the second chat interface is opened is obtained, adding 1 to the number of switching times corresponding to the second contact and the second input method, where the number of switching times is used to indicate the number of times of switching to the second input method when chatting with the second contact.
For example, when a user and a friend in japan open a chat interface for chatting, the input method is switched to the japanese input method, and the number of times of switching corresponding to the japanese friend and the japanese input method is increased by 1, and when the user switches to the japanese input method every time in the process of chatting with the friend in japan using the chat interface, the number of times of switching corresponding to the japanese input method is increased by 1.
It should be added that the interfaces where the user chats with the second contact are all referred to as the same second chat interface, and the second chat interface is uniquely corresponding to the second contact, and even if the second chat interface with the second contact is closed, when the chat interface with the second contact is opened next time, the newly opened chat interface is referred to as the second chat interface.
In step 303, it is detected whether the number of handovers reaches a predetermined number threshold.
The predetermined number threshold may be set according to an actual situation, and the specific value of the predetermined number threshold is not limited in each embodiment of the present disclosure. When the switching times are less than the predetermined threshold, the input method may be considered to be mistaken for a click error or other reasons, and the input method is not stored.
In step 304, if the number of times of switching reaches the predetermined number of times threshold, the second contact and the second input method are stored as a set of correspondence in the input method configuration file.
If the number of times of switching reaches the predetermined number threshold, which usually indicates that the user usually uses the second input method when chatting with the second contact, at this time, the second contact and the second input method may be stored as a set of correspondence in the input method configuration file.
FIG. 3B is a flowchart illustrating steps for storing contacts and input methods as a set of correspondences in an input method profile, including the following steps, according to an exemplary embodiment.
In step 304a, it is detected whether the input method configuration file stores a corresponding relationship including a second contact.
In step 304b, if the input method configuration file does not store the corresponding relationship including the second contact, the second contact and the second input method are stored as a set of corresponding relationship in the input method configuration file.
In step 304c, if the input method configuration file stores a corresponding relationship including a second contact, replacing the corresponding relationship including the second contact stored in the input method configuration file with the second contact and the second input method as a group of corresponding relationships; or adding the second input method to the corresponding relation containing the second contact existing in the input method configuration file.
In a practical application scenario, the stored contacts may need to switch an input method different from the pre-stored input method for some reason, for example, the pre-stored input method corresponding to the korean friend is a korean input method, and if the korean friend wants to learn chinese, the user may chat with the korean friend using the chinese input method, which may cause the user to switch the automatically invoked korean input method to the chinese input method each time the user chats with the korean friend. At this time, the Chinese input method can be used to replace the Korean input method in the corresponding relationship corresponding to the contact.
That is to say, the correspondence between the contact and the input method may change with the change of the input method used in the chat between the contact and the input method, so that the input method used when the user communicates with the contact recently can be better fitted.
When the user chats with the same contact person, and when different input methods appear, the switched input method can also be directly added to the existing corresponding relationship containing the contact person, that is, at least two input methods are stored in the corresponding relationship containing the contact person. Therefore, when the user opens the chat interface with the contact person, at least two input methods in the corresponding relation can be called, the at least two input methods are displayed in the chat interface, and the user selects one of the input methods to chat. In this case, since the user only needs to select from the input methods corresponding to the contact, selection from a small number of input methods is relatively easy, and even if the user selects the input method by mistake, the user can still chat with the input method by mistake, and the use of the user is not particularly affected.
For example, when the input method with a korean contact includes a chinese input method and a korean input method, if the user easily selects the input method from the displayed chinese input method and korean input method and only selects the input method from the displayed chinese input method and korean input method by mistake, the user can directly chat with the korean contact using the selected input method, and the korean contact can still understand the characters input by the user. However, if the user selects from all input methods according to the conventional input method selection method, the user may mistakenly select an input method that cannot be recognized by the korean contact, such as french or german, thereby resulting in poor user experience. And the method and the device select from at least two stored input methods, so that the input method which cannot be identified by the contact person can be prevented from being selected, and the user experience is improved.
In summary, according to the input method switching method provided in the embodiment of the present disclosure, when a chat interface with a contact is opened, a pre-stored input method corresponding to the contact is called, and the corresponding input method is called for chatting in the chat interface; the method has the advantages that the pre-stored input method corresponding to the contact can be directly called for different contacts, and the user does not need to manually switch to the input method, so that the problem that the user needs to continuously switch the input method when the user performs text contact with the contacts of various language types is solved; the method and the device have the advantages that switching operation that the default input method needs to be switched to the input method corresponding to the contact person every time is avoided, and the efficiency of determining the input method corresponding to the contact person is improved. In addition, the problem of mistakenly cutting the input method is solved by timely storing and updating the corresponding relation between the contact person and the input method; the effect of accurately switching the input method is achieved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating an input method switching apparatus according to an exemplary embodiment, where the input method switching apparatus is applied to the smart device in the implementation environment shown in fig. 1, as shown in fig. 4, and the input method switching apparatus includes, but is not limited to: a first calling module 401, a query module 402, and a second calling module 403.
The first calling module 401 is configured to call a pre-stored input method configuration file when a first chat interface between the first contact person and the first contact person is opened, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
the query module 402 is configured to query whether the input method configuration file contains the input method corresponding to the first contact person according to the correspondence between the contact person and the input method in the input method configuration file called by the first calling module 401;
and a second calling module 403, configured to call the input method corresponding to the first contact when the query module 402 queries that the input method configuration file includes the input method corresponding to the first contact, where the input method is used for inputting characters in the first chat interface.
In a possible implementation manner, please refer to fig. 5, which is a block diagram of an input method switching apparatus according to another exemplary embodiment, the input method switching apparatus may further include: an acquisition module 404, a first storage module 405, and a second storage module 406.
An obtaining module 404, configured to, when a second chat interface between the second contact and the second contact inputs a text, obtain a second input method switched to after the second chat interface is opened, where the second input method is used for inputting a text in the second chat interface;
a first storage module 405 configured to store the second contact and the second input method acquired by the acquisition module 404 as a set of corresponding relationships in an input method configuration file; or,
a second storage module 406, configured to receive a corresponding relationship between a second contact and a second input method set by a user, and store the corresponding relationship into the input method configuration file;
wherein the second contact is the same as or different from the first contact.
In a possible implementation manner, still referring to fig. 5, the input method switching apparatus may further include an accumulation module 407 and a detection module 408.
An accumulation module 407, configured to add 1 to the number of switching times corresponding to the second contact and the second input method after the second input method switched after the second chat interface is opened is acquired in the acquisition module 404, where the number of switching times is used to indicate the number of times of switching to the second input method when chatting with the second contact;
a detection module 408 configured to detect whether the number of handovers reaches a predetermined number threshold;
the first storage module 405 is further configured to store the second contact and the second input method in the obtaining module as a set of corresponding relationships into the input method configuration file when the detection module 408 detects that the number of times of switching reaches the predetermined number threshold.
In one possible implementation, still referring to fig. 5, the first storage module 405 may further include: a detection submodule 405a, a first storage submodule 405b and a second storage submodule 405 c.
The detection submodule 405a is configured to detect whether the input method configuration file called by the first calling module 401 stores a corresponding relationship including a second contact;
a first storage submodule 405b configured to store the second contact and the second input method as a set of correspondence in the input method configuration file when the detection submodule 405a detects that the input method configuration file does not store the correspondence including the second contact;
the second storage submodule 405c is configured to, when the detection submodule 405a detects that the input method configuration file stores a corresponding relationship including a second contact, replace, as a group of corresponding relationships, the corresponding relationship including the second contact stored in the input method configuration file with the second contact and the second input method; or adding the second input method to the corresponding relation containing the second contact existing in the input method configuration file.
In a possible implementation manner, still referring to fig. 5, the input method switching apparatus may further include a third calling module 409.
And the third calling module 409 is configured to call the default input method when the query module 402 queries that the input method configuration file does not contain the input method corresponding to the first contact.
In summary, the input method switching apparatus provided in the embodiment of the present disclosure invokes a pre-stored input method corresponding to a contact person when a chat interface with the contact person is opened, and invokes the corresponding input method for chatting in the chat interface; the method has the advantages that the pre-stored input method corresponding to the contact can be directly called for different contacts, and the user does not need to manually switch to the input method, so that the problem that the user needs to continuously switch the input method when the user performs text contact with the contacts of various language types is solved; the method and the device have the advantages that switching operation that the default input method needs to be switched to the input method corresponding to the contact person every time is avoided, and the efficiency of determining the input method corresponding to the contact person is improved. In addition, the problem of mistakenly cutting the input method is solved by timely storing and updating the corresponding relation between the contact person and the input method; the effect of accurately switching the input method is achieved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides an input method switching apparatus, which can implement the input method switching method provided by the present disclosure, and the input method switching apparatus includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a first chat interface between the first contact person and the first contact person is opened, calling a pre-stored input method configuration file, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
inquiring whether the input method configuration file contains the input method corresponding to the first contact person or not according to the corresponding relation between the contact person and the input method in the input method configuration file;
and if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chat interface.
Fig. 6 is a block diagram illustrating an apparatus for switching an input method according to an example embodiment. For example, the apparatus 600 may be a mobile phone with text input functionality, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 602 may include one or more processors 618 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of the components, such as a display and keypad of the device 600, the sensor component 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described input method switching method.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 618 of the apparatus 600 to perform the input method switching method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. An input method switching method, characterized in that the method comprises:
when a first chat interface between the first contact person and the first contact person is opened, calling a pre-stored input method configuration file, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
inquiring whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file;
if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chat interface.
2. The method of claim 1, further comprising:
when characters are input on a second chat interface between the second chat interface and a second contact, a second input method switched to after the second chat interface is opened is obtained, and the second input method is used for inputting the characters in the second chat interface; storing the second contact and the second input method as a set of corresponding relations into the input method configuration file; or,
receiving a corresponding relation between a second contact and a second input method set by a user, and storing the corresponding relation into the input method configuration file;
wherein the second contact is the same or different than the first contact.
3. The method of claim 2, further comprising:
after a second input method switched to after the second chat interface is opened is obtained, adding 1 to the switching times corresponding to the second contact and the second input method, wherein the switching times are used for indicating the times of switching to the second input method when the second contact chats;
detecting whether the switching times reach a preset time threshold value;
and if the switching times reach the preset times threshold value, executing the step of storing the second contact and the second input method as a group of corresponding relations into the input method configuration file.
4. The method of claim 2, wherein storing the second contact and the second input method as a set of correspondences in the input method profile comprises:
detecting whether the input method configuration file stores the corresponding relation containing the second contact person or not;
if the input method configuration file does not store the corresponding relation containing the second contact person, storing the second contact person and the second input method as a group of corresponding relations into the input method configuration file;
if the input method configuration file stores the corresponding relation containing the second contact person, replacing and storing the second contact person and the second input method as a group of corresponding relation in the input method configuration file to contain the corresponding relation of the second contact person; or adding the second input method to the existing corresponding relation containing the second contact in the input method configuration file.
5. The method according to any one of claims 1 to 4, further comprising:
and if the input method configuration file does not contain the input method corresponding to the first contact person, calling a default input method.
6. An input method switching apparatus, characterized in that the apparatus comprises:
the device comprises a first calling module, a second calling module and a third calling module, wherein the first calling module is configured to call a pre-stored input method configuration file when a first chat interface between the first calling module and a first contact person is opened, the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
the query module is configured to query whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file called by the first calling module;
the second calling module is configured to call the input method corresponding to the first contact person when the query module queries that the input method configuration file contains the input method corresponding to the first contact person, and the input method is used for inputting characters in the first chat interface.
7. The apparatus of claim 6, further comprising:
the obtaining module is configured to obtain a second input method switched to after a second chat interface is opened when characters are input in the second chat interface between the obtaining module and a second contact person, and the second input method is used for inputting characters in the second chat interface; the first storage module is configured to store the second contact and the second input method acquired by the acquisition module into the input method configuration file as a group of corresponding relations; or,
the second storage module is configured to receive a corresponding relation between a second contact and a second input method, and store the corresponding relation into the input method configuration file;
wherein the second contact is the same or different than the first contact.
8. The apparatus of claim 7, further comprising:
the accumulation module is configured to add 1 to the switching times corresponding to the second contact and the second input method after the acquisition module acquires the second input method switched to after the second chat interface is opened, wherein the switching times are used for indicating the times of switching to the second input method during the chat with the second contact;
a detection module configured to detect whether the number of handovers reaches a predetermined number threshold;
the first storage module is further configured to store the second contact and the second input method acquired by the acquisition module as a set of corresponding relationships in the input method configuration file when the detection module detects that the switching times reaches the predetermined times threshold.
9. The apparatus of claim 7, wherein the first storage module comprises:
the detection submodule is configured to detect whether the input method configuration file stores a corresponding relation containing the second contact;
the first storage submodule is configured to store the second contact and the second input method into the input method configuration file as a group of corresponding relations when the detection submodule detects that the input method configuration file does not store the corresponding relation containing the second contact;
the second storage sub-module is configured to, when the detection sub-module detects that the input method configuration file stores the corresponding relationship containing the second contact, replace the corresponding relationship containing the second contact stored in the input method configuration file with the second contact and the second input method as a group of corresponding relationship; or adding the second input method to the existing corresponding relation containing the second contact in the input method configuration file.
10. The apparatus according to any one of claims 6-9, wherein the apparatus further comprises:
and the third calling module is configured to call a default input method when the query module queries that the input method configuration file does not contain the input method corresponding to the first contact.
11. An input method switching apparatus, characterized in that the apparatus comprises:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
when a first chat interface between the first contact person and the first contact person is opened, calling a pre-stored input method configuration file, wherein the input method configuration file comprises at least one group of corresponding relations, and the corresponding relations comprise the contact person and an input method required by the chat with the contact person;
inquiring whether the input method configuration file contains the input method corresponding to the first contact person according to the corresponding relation between the contact person and the input method in the input method configuration file;
if the input method configuration file contains the input method corresponding to the first contact person, calling the input method corresponding to the first contact person, wherein the input method is used for inputting characters in the first chat interface.
CN201510386413.2A 2015-06-30 2015-06-30 Input method switching method and device Pending CN105159472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510386413.2A CN105159472A (en) 2015-06-30 2015-06-30 Input method switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510386413.2A CN105159472A (en) 2015-06-30 2015-06-30 Input method switching method and device

Publications (1)

Publication Number Publication Date
CN105159472A true CN105159472A (en) 2015-12-16

Family

ID=54800352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510386413.2A Pending CN105159472A (en) 2015-06-30 2015-06-30 Input method switching method and device

Country Status (1)

Country Link
CN (1) CN105159472A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589575A (en) * 2015-12-28 2016-05-18 小米科技有限责任公司 Input method invoking method and device
CN106774983A (en) * 2016-12-29 2017-05-31 努比亚技术有限公司 A kind of input method and equipment
CN107894852A (en) * 2017-11-13 2018-04-10 珠海市魅族科技有限公司 A kind of keyboard shift method and electronic equipment
CN112764552A (en) * 2021-01-26 2021-05-07 北京小米移动软件有限公司 Input method switching method and device, intelligent equipment and storage medium
US11681432B2 (en) 2018-05-10 2023-06-20 Honor Device Co., Ltd. Method and terminal for displaying input method virtual keyboard

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316411B (en) * 2008-05-20 2011-12-07 华为终端有限公司 Method for inputting communication information, method for transmitting communication information, and communication terminal
CN102508554A (en) * 2011-10-02 2012-06-20 上海量明科技发展有限公司 Input method with communication association, personal repertoire and system
CN102830924A (en) * 2012-08-08 2012-12-19 北京小米科技有限责任公司 Method and device for adjusting input method keyboards
CN103037106A (en) * 2012-12-25 2013-04-10 广东欧珀移动通信有限公司 Method and device of mobile phone input keyboard switch
CN103488307A (en) * 2013-09-23 2014-01-01 宇龙计算机通信科技(深圳)有限公司 Input method adjusting method and system and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316411B (en) * 2008-05-20 2011-12-07 华为终端有限公司 Method for inputting communication information, method for transmitting communication information, and communication terminal
CN102508554A (en) * 2011-10-02 2012-06-20 上海量明科技发展有限公司 Input method with communication association, personal repertoire and system
CN102830924A (en) * 2012-08-08 2012-12-19 北京小米科技有限责任公司 Method and device for adjusting input method keyboards
CN103037106A (en) * 2012-12-25 2013-04-10 广东欧珀移动通信有限公司 Method and device of mobile phone input keyboard switch
CN103488307A (en) * 2013-09-23 2014-01-01 宇龙计算机通信科技(深圳)有限公司 Input method adjusting method and system and mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589575A (en) * 2015-12-28 2016-05-18 小米科技有限责任公司 Input method invoking method and device
CN105589575B (en) * 2015-12-28 2019-06-21 小米科技有限责任公司 Input method call method and device
CN106774983A (en) * 2016-12-29 2017-05-31 努比亚技术有限公司 A kind of input method and equipment
CN107894852A (en) * 2017-11-13 2018-04-10 珠海市魅族科技有限公司 A kind of keyboard shift method and electronic equipment
US11681432B2 (en) 2018-05-10 2023-06-20 Honor Device Co., Ltd. Method and terminal for displaying input method virtual keyboard
CN112764552A (en) * 2021-01-26 2021-05-07 北京小米移动软件有限公司 Input method switching method and device, intelligent equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106020784B (en) Application message display method and device and terminal
CN105511857A (en) System language setting method and device
CN106201292A (en) Terminal false-touch prevention method and apparatus
CN106714244B (en) Wireless access method and device of terminal and terminal
CN105159472A (en) Input method switching method and device
CN105511777B (en) Session display method and device on touch display screen
CN107193393B (en) Input method switching method and device
CN105404401A (en) Input processing method, apparatus and device
CN106354504B (en) Message display method and device
CN106603381B (en) Method and device for processing chat information
CN108011990B (en) Contact management method and device
CN108270661B (en) Information reply method, device and equipment
US10263925B2 (en) Method, device and medium for sending message
US20160349947A1 (en) Method and device for sending message
CN105227426B (en) Application interface switching method and device and terminal equipment
CN106506808B (en) Method and device for prompting communication message
CN104780256A (en) Address book management method and device and intelligent terminal
CN112148148A (en) Touch operation identification method and device, mobile terminal and storage medium
CN107104878B (en) User state changing method and device
CN106648392B (en) The method and device of pasting data
CN107087073B (en) Terminal control method and device
CN106708930B (en) Method and device for refreshing application page
US20170289306A1 (en) Method, device and storage medium for synchronizing states
CN104317480B (en) Character keys display methods, device and terminal
CN112764552A (en) Input method switching method and device, intelligent 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20151216

RJ01 Rejection of invention patent application after publication