Input method switching methods, electronic devices, storage media, and software products

By monitoring changes in the input focus object, the input method is automatically switched to adapt to the needs of the focus object, which solves the problem of cumbersome manual switching of input methods in the existing technology, improves input efficiency and accuracy, and is suitable for switching input methods and input modes in a variety of scenarios.

CN119759216BActive Publication Date: 2026-06-30KE COM (BEIJING) TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KE COM (BEIJING) TECHNOLOGY CO LTD
Filing Date
2024-12-26
Publication Date
2026-06-30

Smart Images

  • Figure CN119759216B_ABST
    Figure CN119759216B_ABST
Patent Text Reader

Abstract

This disclosure provides an input mode switching method, an electronic device, a readable storage medium, and a computer program product. The switching method first monitors the object that has obtained input focus. After obtaining input focus, the object becomes the focus object. Then, in response to the change of the focus object satisfying the switching condition, the input mode is switched. The switched input mode is in an enabled state, the input mode before the switch stops providing the corresponding input function, and the input function provided by the switched input mode is adapted to the input needs of the changed focus object. The input function provided by the input mode before the switch and the input function provided by the switched input mode are different.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of computer technology, specifically to methods for switching input methods, electronic devices, readable storage media, and computer program products. Background Technology

[0002] When users interact with electronic devices, they need to input information. There may be multiple ways for users to input information, and they need to use keys or touchscreens to switch between different input methods to use the one most needed. For example, when users input content into a computer using a keyboard, they need to switch between different input methods.

[0003] Currently, the main way to switch input methods is through manual switching by the user, which makes the information input process cumbersome and inefficient. Summary of the Invention

[0004] This disclosure provides methods for switching input modes, electronic devices, readable storage media, and computer program products.

[0005] The first aspect of this disclosure proposes a method for switching input modes, comprising: monitoring an object that has obtained input focus, the object becoming a focus object after obtaining input focus; and triggering a switching of input modes in response to a change in the focus object satisfying a switching condition, wherein the input mode after switching is enabled, the input mode before switching stops providing the corresponding input function, the input function provided by the input mode after switching is adapted to the input needs of the changed focus object, and the input function provided by the input mode before switching and the input function provided by the input mode after switching are different.

[0006] According to some embodiments of this disclosure, the focus object includes one or more of the following types: interactive object, and editable elements in the interactive object.

[0007] According to some embodiments of this disclosure, one or more of the following are satisfied: the interactive object is an application or different interactive windows of the application; the editable element is an editable unit or editable position in the interactive object.

[0008] According to some embodiments of this disclosure, in response to a change in the focus object satisfying a switching condition, a switching of the input mode is triggered, including: in response to the focus object obtaining the input focus changing from a first focus object to a second focus object, determining the input requirements of the first focus object and the second focus object; and if the switching condition is satisfied, determining a target input mode that matches the input requirements of the second focus object, and switching the input mode to the target input mode, wherein the switching condition includes: the input requirements of the first focus object and the second focus object are different.

[0009] According to some embodiments of this disclosure, determining the input requirements of the first focus object and the second focus object includes: determining the feature information of the first focus object and the second focus object; and determining the input requirements of the first focus object and the second focus object based on the feature information of the first focus object and the second focus object and the mapping relationship between the feature information and the input requirements.

[0010] According to some embodiments of this disclosure, when the second focus object is an interactive object, the feature information of the second focus object includes one or more of the following: the type of the interactive object, functional features, the region of the device running the focus object, the system language of the device, the file information of the file running on the focus object, and the input method history records during the period when the focus object obtains input focus.

[0011] According to some embodiments of this disclosure, when the second focus object is an editable element, the feature information of the second focus object includes the language and / or purpose of the editable content at the location of the input focus.

[0012] According to some embodiments of this disclosure, the input requirements of the first focus object and the second focus object are determined by a behavior model, and a target input method adapted to the input requirements of the second focus object is determined.

[0013] According to some embodiments of this disclosure, the method further includes: acquiring received operation information and adjusting the parameters of the behavior model based on the operation information, wherein the operation information includes information input to the device for switching the input mode, the parameters of the behavior model are used to adjust the output of the behavior model, and the output of the behavior model includes the target input mode.

[0014] According to some embodiments of this disclosure, the input requirements of different focus objects include multiple or all of the following: inputting at least one language text, inputting at least one voice, and inputting at least one hand-drawn symbol.

[0015] According to some embodiments of this disclosure, the input functions provided by different input methods include: at least one function suitable for inputting text, at least one function suitable for inputting voice, and at least one function suitable for inputting hand-drawn symbols, or all of these functions.

[0016] According to some embodiments of this disclosure, different functions suitable for inputting text correspond to different languages.

[0017] According to some embodiments of this disclosure, different input methods correspond to different input methods, or to different input modes of the same input method.

[0018] A second aspect of this disclosure provides an electronic device, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, causing the processor to perform the method described in any of the above embodiments.

[0019] A third aspect of this disclosure provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the method described in any of the above embodiments.

[0020] The fourth aspect of this disclosure provides a computer program product comprising a computer program that, when executed by a processor, is used to implement the method described in any of the above embodiments. Attached Figure Description

[0021] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0022] Figure 1 A schematic diagram of the overall flow of an input mode switching method M100 according to some embodiments of the present disclosure is shown.

[0023] Figure 2 A schematic diagram of the input mode switching process according to some embodiments of this disclosure is shown.

[0024] Figures 3-4 A schematic flowchart of the input mode switching method M100 according to other embodiments of this disclosure is shown.

[0025] Figure 5 A flowchart illustrating a method for switching input modes according to some embodiments of this disclosure is shown.

[0026] Figure 6A schematic flowchart of the input mode switching method M100 according to other embodiments of this disclosure is shown.

[0027] Figure 7 This is a schematic block diagram of the input mode switching device according to one embodiment of the present disclosure.

[0028] Figure 8 This is a schematic block diagram of an electronic device 1000 according to one embodiment of the present disclosure. Detailed Implementation

[0029] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.

[0030] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0031] To facilitate description and make the technical solutions of the specific embodiments of this disclosure easier to understand, the technical terms involved in the specific embodiments of this disclosure will be introduced before describing the input mode switching method implemented in this disclosure.

[0032] Programming language input methods: These are input methods used for writing code. They are designed to conform to coding habits, such as supporting the syntax of specific programming languages, recognizing keywords, variable names and function names, automatically completing code snippets, and detecting syntax errors in real time.

[0033] Natural language input methods are input methods used for inputting language used in daily human communication. They are designed to conform to the input habits of daily communication, and may have functions such as word association, word prediction, and spell checking.

[0034] When users input text into a computer using peripherals (keyboard and mouse) or into a mobile phone via a touchscreen, they may switch input methods. For example, when writing program code, users need to write code and comments. They can use a programming language input method when writing code and a natural language input method when writing comments. Therefore, the process of writing program code involves switching between programming language input methods and natural language input methods.

[0035] If you switch input methods manually, you need to press a specific shortcut key or click a specific button with the mouse each time you switch input methods, which will reduce the efficiency of user input.

[0036] Therefore, this disclosure proposes a method for switching input methods. The input method switching method proposed in this disclosure can be implemented independently on a terminal device. In this disclosure, "terminal device" can be different types of electronic devices, such as mobile phones, computers, etc.

[0037] Figure 1 A schematic flowchart of an input mode switching method M100 according to some embodiments of this disclosure is shown. Figure 1 The method shown includes steps S110 and S120. This method can be executed by an electronic device such as a computer.

[0038] S110, Detect the object that receives input focus. The aforementioned object becomes the focus object after receiving input focus.

[0039] Input focus is a representation that allows the object holding it to receive input information from an input device. The focus object is the object that has obtained input focus among the operable objects of an electronic device. Operable objects can be programs, windows, or controls in an interactive interface.

[0040] Taking a computer as an example, the interactive interface can be a computer graphical user interface, and the input device can be a mouse or keyboard. When an application is launched for the first time, the input focus is transferred to that launched application, which is called the focus object. Only the object that has received input focus (i.e., the focus object) can receive input from the input device. When the focus object is an application such as a video player, the visual appearance of the focus object and the non-focus object will be different to distinguish the focus object from the non-focus object for the user. When the focus object is a text editor or other program that allows content editing, a blinking cursor will be displayed in the editing area to indicate the location of the input focus.

[0041] During user interaction with an electronic device, the input focus shifts between different focus objects. For example, under user operation, social chat application A1 is opened and becomes the focus object, allowing the user to type text for remote chat. Subsequently, the user continues to operate, causing document editor A2 to open and become the focus object again, allowing the user to type text for editing. At this point, editor A2 is active, while application A1 is inactive.

[0042] S120: In response to a change in the focus object satisfying the switching condition, a switch in the input mode is triggered. The switched input mode is enabled, while the previous input mode ceases to provide corresponding input functionality. The input functionality provided by the switched input mode is adapted to the input requirements of the changed focus object. The input functionality provided by the previous input mode differs from that provided by the switched input mode.

[0043] When the user moves the input focus from object A1 to object A2 during operation, the focus object changes. The switching condition is used to determine whether a switch in the input method is needed. In step S120, it can be determined whether the switching condition is met when the focus object changes; if the switching condition is met, the input method is switched. If the change in the focus object meets the switching condition, the currently valid input method is switched. The currently valid input method is the input method in the enabled state, that is, the only input method that can currently provide input functionality.

[0044] Assume the device provides multiple different available input methods. When the input focus is acquired by object A1, the currently valid input method is input method R1. At this time, among all input methods, only input method R1 is allowed to provide the input functions configured by R1 itself. When the input focus is transferred to object A2 (A2 acquires the input focus), the currently valid input method becomes input method R2. At this time, among all input methods, only input method R2 is allowed to provide the input functions configured by R2 itself. Input method R1, like other input methods except R2, is not allowed to provide the corresponding input functions.

[0045] Input method R2 is an input method suitable for information input in the context of the focus object A2; that is, input method R2 can meet the input requirements when inputting information in the context of the focus object A2. Input requirements represent the desired input method suitable for inputting information to the focus object. If input method R1, before switching to input method R2, was also enabled through input method switching, then input method R1 is also suitable for information input in the context of the focus object A1. In other words, the input method selected when switching input methods is always chosen according to the new focus object that triggered the input method switch.

[0046] Since the input requirements of the focus object A2 are different from those of the focus object A1, it is necessary to switch to a new input method R2 to meet the requirements that the original input method R1 cannot meet, or to switch to a new input method R2 to improve the compatibility between the current effective input method and the input requirements of A2.

[0047] Different input methods can correspond to different input approaches. For example, a device might offer multiple input methods, such as two programming language input methods suitable for coding and one natural language input method suitable for daily communication, for a total of three input methods. Switching between input methods refers to switching between different input approaches.

[0048] Different input methods can also be different input modes corresponding to the same input method. That is, the device can provide multiple different input methods, such as multiple input methods or only one input method. Some or all of the provided input methods each have multiple different input modes. When switching input methods, it's not necessary to switch input methods; instead, you can switch between multiple input modes of the currently active input method. Specifically, the device provides only one natural language input method, which includes Chinese input mode, English input mode, and French input mode. When the switching conditions are met, the currently active English input mode is switched to Chinese input mode.

[0049] By including both input methods and input modes within the scope of input methods, the applicability of automatic input method switching is expanded. This allows devices to automatically switch between input methods and input modes, saving users time from manually switching input methods in more scenarios.

[0050] Figure 2 A schematic diagram of the input mode switching process according to some embodiments of this disclosure is shown. (See also...) Figure 2 Part (1) is the scenario before the input method is switched. D is the screen area of ​​the device, A1 represents the browser, and A2 represents the text editor. At this time, the browser A1 has the input focus. The solid border of A1 indicates that A1 is the object with the input focus, and the dashed border of A2 indicates that A2 is the object without the input focus. R1 is the English input method before the automatic input method switch.

[0051] Part (2) describes the scenario after the input method is switched. When the user moves the pointer to the area of ​​text editor A2 and clicks, text editor A1 gains input focus (represented by a dashed border). Only one program, window, control, or element can gain input focus at a time, so browser A1 loses input focus (represented by a dashed border). Since the program gaining input focus is the text editor, the pointer becomes a cursor (the "I" shape in the figure), and a "│" shaped cursor (not shown in the figure) flashes at the clicked location. Because text editor A2 is used to input and edit Chinese, the device selects Chinese input method R2 from the two currently available input methods (Chinese and French) based on the attributes and characteristics of text editor A2, making Chinese input method R2 active. Only one input method or input mode can be enabled at a time, so input method R1 stops running. This completes the function of automatically switching input methods based on user operation.

[0052] The input method switching method proposed according to the embodiments of this disclosure can automatically determine whether the input method should be switched based on the user's operation behavior, and switch the input method when necessary, without requiring the user to manually switch the input method, thus ensuring the accuracy of input method switching and improving the user's information input efficiency.

[0053] The focus object can include one or more of the following types: interactive objects, and editable elements within interactive objects. Interactive objects can be applications or different interactive windows of an application. Editable elements can be editable units or editable positions within interactive objects.

[0054] by Figure 2 For example, A1 and A2 can be different applications. The transfer of input focus can be from one application to another, such as from one game to another (games do not allow text editing).

[0055] A1 and A2 can also be different windows of the same application. The transfer of input focus can be from one window in the same application to another. For example, if a user opens an application that supports multiple windows and has two different files open in that application, the interactive interfaces (operation interfaces) of the two files are A1 and A2 respectively.

[0056] A1 and A2 can be editable elements in one application and another application, or different editable elements in the same application. The transfer of input focus can be from one editable unit to another, such as from one cell where text can be entered to another; it can also be from one editable position to another, for example, in a document, the cursor (a blinking vertical line) moves from one character position to another, and the cursor's position is the location of the obtained input focus in the document.

[0057] By automatically switching input methods across multiple different focus objects, the applicability of automatic switching is expanded, saving users time from manually switching input methods in more scenarios.

[0058] Figure 3 A schematic flowchart of an input mode switching method M100 according to other embodiments of this disclosure is shown. (See also...) Figure 3 In step S120, the specific steps for triggering the switching of input mode in response to the change of the focus object satisfying the switching condition may include the following steps S121 and S122.

[0059] S121, in response to the focus object that has obtained input focus changing from the first focus object to the second focus object, determine the input requirements of the first focus object and the second focus object.

[0060] Different focus objects may have different input requirements, or they may have the same input requirements. The input requirements can be determined by the attributes and characteristics of the focus object. Figure 2 For example, when text editor A2 gains input focus, the input requirements of browser A1 and text editor A2 are determined.

[0061] It is understandable that, since the running states of different focus objects may change, the input requirements of the same focus object may be different at different times. Therefore, whenever the input focus is transferred, the input requirements of both the first focus object and the second focus object can be determined. Even if the first focus object was also switched to the foreground and was in an effective state through the input focus transfer at a previous time, that is, the input requirements of the first focus object were determined at a previous time, but since the input requirements may change, the input requirements can be re-determined at the current time.

[0062] S122, if the switching condition is met, then a target input method that matches the input requirements of the second focus object is determined, and the input method is switched to the target input method. The switching condition includes: the input requirements of the first focus object and the second focus object are different.

[0063] Continue with Figure 2 For example, if browser A1 and text editor A2 have different input needs, the switching condition is met, and the input method needs to be switched. Among the available input methods provided by the device, besides the currently active one, there may be multiple remaining options. Therefore, it is necessary to select the most suitable input method for the user to input text onto the second focused object. The selected input method is the target input method, and once the target input method is determined, the input method switching process begins.

[0064] Understandably, if the input requirements of A1 and A2 are the same, the switching condition is not met, and there is no need to switch the input method. The currently valid input method will remain valid and provide the corresponding input function.

[0065] By identifying the input needs of the focus object, the appropriate input method should be determined, ensuring that the switched input method is the one the user expects and avoiding incorrect switching.

[0066] Figure 4 A schematic flowchart of an input mode switching method M100 according to other embodiments of this disclosure is shown. (See also...) Figure 4 Step S121 may specifically include the following steps S1211 and S1212.

[0067] S1211, in response to the focus object that has obtained input focus changing from the first focus object to the second focus object, determine the feature information of the first focus object and the second focus object.

[0068] S1212, Based on the feature information of the first focus object and the second focus object and the mapping relationship between the feature information and the input requirements, determine the input requirements of the first focus object and the second focus object.

[0069] Different feature information corresponds to different input requirements. The input requirements corresponding to the feature information are determined through a mapping relationship. The mapping relationship between feature information and input requirements is pre-configured and stored in a designated location. When it is necessary to determine the input requirements, the mapping information can be read from the designated location to determine the input requirements.

[0070] The following examples illustrate how to determine input requirements.

[0071] Scenario 1: When the second focus object is an interactive object, the feature information of the second focus object may include one or more of the following: the type of the interactive object, its functional characteristics, the region of the device running the focus object, the device system language, the file information of the file running on the focus object, and the input method history records during the period when the focus object obtains input focus.

[0072] The following is based on Figure 2 Let's take scenario one as an example. Assume that both the first and second focus objects are interactive objects. A1 is a browser, and A2 is a code editor. The first focus object is A1, and the second focus object is A2. These are different interactive objects (applications), and the information items contained in the feature information of the first focus object are the same as those contained in the feature information of the second focus object. Furthermore, assume the device provides three input methods: F1, F2, and F3. F1 and F2 are natural language input methods, and F3 is a programming language input method. F1 has two input modes: Chinese and English. F2 and F3 each have only one input mode, with F2 being a French input method.

[0073] Regarding the types and functional characteristics of interactive objects, the type of interactive object refers to the classification of the application, which can include chat tools, office software, browsers, educational learning applications, video media applications, programming development applications, reading and translation applications, etc. The functional characteristics of interactive objects refer to the purpose of the application and the core functions it can provide. Functional characteristics usually reflect the category to which the application belongs; for example, the functional characteristics of a browser are web surfing and internet interaction, while the functional characteristics of the code editor A2 are program development.

[0074] For example, browser A1 is a browser application, and code editor A2 is a programming development application. When A1 gains input focus, input method R1 is the currently valid input method, specifically input method F1 in Chinese input mode. After the user clicks on any area of ​​A2, A2 gains input focus, and A1 loses focus. Because A2 and A1 are different application types, their characteristic information is different, and the input requirements determined through mapping are also different. Since the code editor belongs to the programming development category, input method F2, which is compatible with programming development, can be used as the target input method; that is, input method R2 is input method F2. It can be understood that if the interactive object is the application's interactive window, then the type of the interactive window can be the type of the application it belongs to. If the first and second focus objects are the interactive windows of A1 and A2, then the input method can be switched from F1 to F2 as described above.

[0075] Regarding the device's region and system language for the running focus object, the region can include the country and region, and the system language can be the interaction language currently used by the device.

[0076] For example, if the currently active interactive object with input focus is code editor A2, and the current input method is input method F3, after the user clicks on any area of ​​browser A1, A1 gains input focus while A2 loses it. By judging according to the mapping relationship based on program type, functional characteristics, or other characteristics, it can be determined that A2 and A1 have different input needs. In this case, the input method can be switched based on the device's region and system language. If the device's region is region A, where the primary language is Chinese, and the system language is currently Chinese, then the input method can be switched to the Chinese input mode of input method F1, which allows Chinese input. If the interactive object is an application's interactive window, then similarly, the input method can be switched from F3 to F1's Chinese input mode, as described above.

[0077] This information pertains to the file and its input method history for the file being edited. File information may include file type, historical editing information, and other data. File type may include document types, code types, and other types. Historical editing information indicates the input methods used during the file's previous editing processes.

[0078] Assume A1 is a text editor and A2 is a code editor. The file k1 currently being edited by editor A1 is a document file, and the file k2, newly opened and being edited by editor A2, is a code file. Before this input focus shift, the editing history of k1 edited by the text editor only includes records of editing using the Chinese input mode of input method F1. The running history of text editor A1 describes the input method used as the Chinese input mode of input method F1. Similarly, before this input focus shift, the editing history of k2 edited by the code editor only includes records of editing using input method F3. The running history of code editor A2 describes the input method used as F3. When A1 loses input focus and A2 gains input focus, by judging according to the mapping relationship based on file type, editing history, input method usage history, or other characteristic information, it can be determined that the input requirements of A2 and A1 are different. At this time, the input method can be switched using file information and input method usage history, switching input method F1 to input method F3.

[0079] Scenario 2: When the second focus object is an editable element, the feature information of the second focus object may include the language and / or purpose of the editable content at the input focus location.

[0080] Assuming both the first and second focus objects are editable elements, the feature information of the first focus object can also include the language of the editable content at the input focus location. When a user is editing text in a text editor, the cursor is currently at text position w1. The preceding and following text positions at position w1 are both Chinese characters, and the currently valid input method is the Chinese input mode of input method F1. The user clicks on another position in the text, causing the input focus to shift to position w2. The preceding text position at position w2 is English text, and there is no following text position (position w2 is the end of the current paragraph). Therefore, the language of the editable content at the positions before and after the input focus change has changed. The feature information of the first and second focus objects is different. Therefore, through a mapping relationship, it can be determined that their input requirements are different. At this point, by checking the language of the editable content at the position after the input focus change, the target input method can be determined to be the English input mode of input method F1, and the input method can be switched.

[0081] When a user is editing code in a code editor, the cursor is currently at position w3. The line containing w3 is an English code line, used for code writing, and the currently valid input method is F3. The user clicks on another position, w4, shifting the input focus to w4. The line containing w4 is blank; the line above w4 is a comment start line (containing the comment start symbol), and the line below w4 is a comment end line (containing the comment end symbol). Therefore, the line containing w4 is a comment line, used for comment writing. The purpose of the editable content at the position before and after the input focus change has changed. The first and second focus objects have different characteristic information. Therefore, through the mapping relationship, it can be determined that their input requirements are different. At this point, by determining the purpose of the editable content at the position after the input focus change, the target input method can be determined to be the Chinese input mode of F1, and the input method can be switched.

[0082] Understandably, in Scenario 2, in addition to the user clicking different positions to shift the input focus as described above, the user's line break operation, movement in any direction using the arrow keys, or other operations that cause the input focus position to change between editable positions can all be used to determine and switch the input mode.

[0083] By providing different types of optional feature information in steps S1211 and S1212, the input requirements of the focus object are determined, so that the input method switching can be applied to a variety of different scenarios, and the switched input method can meet the user's expectations and requirements, thereby improving the accuracy of the switching.

[0084] Figure 5A flowchart illustrating an input mode switching method according to some embodiments of this disclosure is shown. (See also...) Figure 5 The behavioral model is used to determine the input requirements of the first and second focus objects, as well as the target input method that is adapted to the input requirements of the second focus object.

[0085] After determining the feature information of the first and second focus objects (corresponding to step S1211), the feature information is input into the behavior model. The behavior model determines the input requirements of the first and second focus objects based on their feature information (corresponding to step S1211). Then, it determines whether the switching condition is met. If the switching condition is met, it determines the target input method that matches the input requirements of the second focus object (corresponding to a part of step S122) and outputs the target input method. The device switches the input method according to the target input method output by the behavior model.

[0086] Figure 6 A schematic flowchart of an input mode switching method M100 according to other embodiments of this disclosure is shown. (See also...) Figure 6 The input mode switching method M100 also includes step S130.

[0087] S130: Acquire the received operation information and adjust the parameters of the behavior model based on the operation information. The operation information includes information input to the device for switching input methods, and the parameters of the behavior model are used to adjust the output of the behavior model. The output of the behavior model includes the target input method.

[0088] The operation information refers to the user's manual actions on the device. After the user's action causes a shift in input focus, the input method is automatically switched via the behavior model. Then, the user manually switches the input method back to a non-target input method. This indicates that the target input method output by the behavior model differs from the user's expected input method. At this point, the user's switching operation information can be recorded, and the parameters of the behavior model can be adjusted based on this information. This refines the logic of the behavior model, ensuring that the target input method determined by the behavior model in subsequent processes matches the user's behavioral habits.

[0089] By analyzing user behavior to adjust the parameters of the behavior model, and by optimizing the user behavior model based on whether the user subsequently manually adjusts the input method and the resulting adjustment information, the behavior model can be updated and improved according to user habits. This enables continuous improvement of model strategies and the prediction accuracy of the target input method.

[0090] For example, the input requirements of different focus objects may include multiple or all of the following: inputting at least one language text, inputting at least one voice, inputting at least one handwritten symbol.

[0091] For applications like text editors and code editors, the input requirement is typically text input in Chinese, English, or other languages. For other types of applications, such as chat applications, the input requirement can be voice input or emoticon input. For example, if the user's chat history shows that they have consistently used voice input when the input focus shifts from a text editor to a chat application, the input method can be switched to voice input, allowing the user to enter voice information into the chat application's input box.

[0092] Hand-drawn symbols can be used as image input or as hand-drawn text input. For example, when the input focus shifts from a text editor to a chat application, if the user's chat application history shows that they have consistently entered hand-drawn information, the input method can be switched to hand-drawn input, allowing the user to input text by handwriting.

[0093] Accordingly, the input functions provided by different input methods may include: at least one function suitable for text input, at least one function suitable for voice input, and multiple or all of the functions suitable for hand-drawn symbols input. The text input function, voice input function, and hand-drawn symbol input function configured through the input method meet the user's text input needs, voice input needs, and hand-drawn symbol input needs when operating the application.

[0094] Different input methods can correspond to different languages, meaning that input methods can provide input functions for multiple languages ​​to meet users' multilingual interaction needs.

[0095] Based on any of the above embodiments, this disclosure also provides an input mode switching device. Figure 7 This is a schematic block diagram of an input mode switching device according to one embodiment of this disclosure. Figure 7 As shown, the input mode switching device includes an input focus monitoring module 110 and an input mode switching module 120.

[0096] The input focus monitoring module 110 is used to monitor the object that receives input focus. The object becomes the focus object after receiving input focus.

[0097] The input mode switching module 120 is used to switch input modes in response to changes in the focused object that meet the switching conditions. The switched input mode is enabled, while the previous input mode stops providing corresponding input functions. The input functions provided by the switched input mode are adapted to the input requirements of the changed focused object. The input functions provided by the previous input mode and the input functions provided by the switched input mode differ.

[0098] The input method switching device described above can be in the form of computer software, and each module of the input method switching device can be implemented through computer software modules. The specific implementation process of the functions and roles of each module in the above device is detailed in the corresponding steps of the above method, and will not be repeated here.

[0099] The entity executing the input mode switching method in the specific embodiments of this disclosure can be an electronic device such as a computer.

[0100] Therefore, based on any of the above embodiments, this disclosure also provides an electronic device that can execute the input mode switching method of any of the embodiments described above.

[0101] Figure 8 This is a schematic block diagram of an electronic device 1000 according to one embodiment of this disclosure. (See also...) Figure 8 The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. Bus 1100 connects various circuits, including one or more processors 1200, memory 1300, and / or hardware modules. Bus 1100 can also connect various other circuits 1400, such as peripheral devices, voltage regulators, power management circuits, external antennas, etc. Bus 1100 can also be connected to a screen 1500, which is used to display an interactive interface, such as a display... Figure 2 The device screen area shown.

[0102] Bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one connection line is used in this diagram, but this does not imply that there is only one bus or only one type of bus.

[0103] The processor 1200 can be a central processing unit (CPU). The processor 1200 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0104] The memory 1300 can serve as a non-transitory computer-readable storage medium, used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions of the computer program in the embodiments of this disclosure. The processor 1200 implements the input mode switching method by running the non-transitory software programs, instructions, and modules stored in the memory 1300.

[0105] The memory 1300 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function. The data storage area may store data created by the processor 1200, such as structural data, model data, sample data, stiffness evaluation results, etc., of the bridge. Furthermore, the memory 1300 may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1300 may optionally include memory remotely located relative to the processor 1200, and these remote memories may be connected to the processor 1200 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0106] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.

[0107] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of this disclosure are performed wholly or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, network equipment, user equipment, core network equipment, OAM, or other programmable device.

[0108] Computer programs or instructions can be stored in a readable storage medium or transferred from one readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The readable storage medium can be any available medium capable of access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or it can include both volatile and non-volatile types of storage media.

[0109] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0112] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0113] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment / mode or example, which are included in at least one embodiment / mode or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.

[0114] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0115] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.

Claims

1. A method for switching input modes, characterized in that, include: Monitor the object that receives input focus; the object becomes the focus object after receiving input focus. as well as In response to the change of the focus object satisfying the switching condition, the input mode is switched. The switched input mode is enabled, and the input mode before the switch stops providing the corresponding input function. The input function provided by the switched input mode is adapted to the input requirements of the changed focus object. The input function provided by the input mode before the switch and the input function provided by the switched input mode are different. Input requirements are used to express the desired input method suitable for inputting information onto the focus object; The step of triggering an input mode switch in response to a change in the focus object satisfying a switching condition includes: in response to the focus object that has obtained the input focus changing from a first focus object to a second focus object, determining the input needs of the first focus object and the second focus object; and if the switching condition is satisfied, determining a target input mode that matches the input needs of the second focus object, and switching the input mode to the target input mode, wherein the switching condition includes: the input needs of the first focus object and the second focus object are different; Determining the input requirements of the first focus object and the second focus object includes: determining the feature information of the first focus object and the second focus object; and determining the input requirements of the first focus object and the second focus object based on the feature information of the first focus object and the second focus object and the mapping relationship between the feature information and the input requirements. Specifically, the input requirements of the first focus object and the second focus object are determined through a behavioral model, as well as the target input method that is adapted to the input requirements of the second focus object. The method further includes: acquiring received operation information and adjusting the parameters of the behavior model based on the operation information, wherein the operation information includes information input to the device for switching the input method, the parameters of the behavior model are used to adjust the output of the behavior model, and the output of the behavior model includes the target input method.

2. The input mode switching method according to claim 1, characterized in that, The focus object includes one or more of the following types: interactive objects, and editable elements within the interactive objects.

3. The input mode switching method according to claim 2, characterized in that, One or more of the following conditions are met: The interactive object is an application or different interactive windows of the application; The editable element is an editable unit or editable position within the interactive object.

4. The input mode switching method according to claim 1, characterized in that, When the second focus object is an interactive object, the feature information of the second focus object includes one or more of the following: the type of the interactive object, functional features, the region of the device running the focus object, the system language of the device, the file information of the file running on the focus object, and the input method history records during the period when the focus object obtains input focus.

5. The input mode switching method according to claim 1, characterized in that, When the second focus object is an editable element, the feature information of the second focus object includes the language and / or purpose of the editable content at the location of the input focus.

6. The input mode switching method according to claim 1, characterized in that, The input requirements of different focus objects include multiple or all of the following: inputting at least one language text, inputting at least one voice, and inputting at least one hand-drawn symbol.

7. The input mode switching method according to claim 1 or 6, characterized in that, The input functions provided by the different input methods include: at least one function suitable for inputting text, at least one function suitable for inputting voice, and at least one function suitable for inputting hand-drawn symbols, or all of these functions.

8. The input mode switching method according to claim 7, characterized in that, Different text input functions correspond to different languages.

9. The input mode switching method according to claim 1, characterized in that, Different input methods correspond to different input methods, or different input modes of the same input method.

10. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes execution instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 9.

11. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, is used to implement the method of any one of claims 1 to 9.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, is used to implement the method of any one of claims 1 to 9.