Input mode switching method, electronic equipment, storage medium and program product

By monitoring and responding to changes in the input focus object and automatically switching the input method, the inefficiency problem caused by user manual switching is solved, and more efficient information input is achieved.

CN119759216AActive Publication Date: 2025-04-04KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411942629.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In the prior art, users need to manually switch input methods, resulting in cumbersome information input process and inefficient efficiency.

Method used

By monitoring the object that obtains the input focus, in response to the change of the focus object, the switching of the input method is automatically triggered when the switching condition is met, ensuring that the switched input method is adapted to the input requirements of the new focus object.

Benefits of technology

It realizes that the input method is automatically adapted without the need for the user to manually switch the input method, which improves the efficiency and accuracy of information input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759216A_ABST
    Figure CN119759216A_ABST
Patent Text Reader

Abstract

The invention provides an input mode switching method, electronic equipment, a readable storage medium and a computer program product, and the switching method comprises the steps: firstly, monitoring an object which obtains an input focus, enabling the object to become a focus object after obtaining the input focus, and then triggering the switching of the input mode in response to the change of the focus object meeting a switching condition, wherein the switched input mode is in an enabled state, the input mode before switching stops providing the corresponding input function, and the input function provided by the switched input mode is matched with the input requirement of the changed focus object; the input function provided by the input mode before switching is different from the input function provided by the input mode after switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computers, and more particularly to an input mode switching method, an electronic device, a readable storage medium, and a computer program product. Background Art

[0002] When a user interacts with an electronic device, he needs to input information into the electronic device. There may be multiple ways for the user to input information, and the user needs to press keys or touch the screen to switch between different input methods, so as to use the currently required input method to input. For example, when a user inputs content into a computer through a keyboard, he needs to switch between different input methods.

[0003] Currently, the switching of input modes is mainly achieved by users manually performing switching operations, which makes the information input process more complicated and the information input efficiency is low. Summary of the invention

[0004] The present disclosure provides an input mode switching method, an electronic device, a readable storage medium, and a computer program product.

[0005] In a first aspect, the present disclosure proposes a method for switching input modes, comprising: monitoring an object that obtains input focus, the object becoming a focus object after obtaining the input focus; and in response to a change in the focus object satisfying a switching condition, triggering the switching of the input mode, the input mode after switching is in an enabled state, the input mode before switching stops providing a corresponding input function, the input function provided by the input mode after switching is adapted to the input requirement of the focus object after the change, and the input function provided by the input mode before switching is different from the input function provided by the input mode after switching.

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

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

[0008] According to some embodiments of the present disclosure, in response to the change of the focus object satisfying a switching condition, switching of the input mode is triggered, including: in response to the focus object that obtains 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 met, determining a target input mode that is compatible with the input requirements of the second focus object, and switching the input mode to the target input mode, the switching condition including: there are differences in the input requirements of the first focus object and the second focus object.

[0009] According to some embodiments of the present disclosure, determining the input requirements of the first focus object and the second focus object includes: determining 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 a mapping relationship between the feature information and the input requirements.

[0010] According to some embodiments of the present disclosure, when the second focus object is an interactive object, the feature information of the second focus object includes one or more of the type of the interactive object, functional features, the region where the device running the focus object is located, the device system language, file information of the file running on the focus object, and the historical usage record of the input method during the period when the focus object obtains input focus.

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

[0012] According to some embodiments of the present disclosure, the input requirements of the first focus object and the second focus object are determined through a behavior model, and a target input mode that matches the input requirements of the second focus object is determined.

[0013] According to some embodiments of the present disclosure, the method also includes: obtaining received operation information, and adjusting parameters of the behavior model based on the operation information, the operation information including 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.

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

[0015] According to some embodiments of the present disclosure, the input functions provided by the different input methods include: multiple functions or all functions among 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.

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

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

[0018] A second aspect of the present disclosure proposes an electronic device, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method described in any one of the above embodiments.

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

[0020] A fourth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description 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 a method M100 for switching an input mode according to some embodiments of the present disclosure is shown.

[0023] Figure 2 A schematic diagram of an interface showing an input mode switching process in some embodiments of the present disclosure is shown.

[0024] Figure 3-Figure 4 The figure shows an overall flow chart of a method M100 for switching an input mode according to some other embodiments of the present disclosure.

[0025] Figure 5 A flowchart of a method for switching input modes in some embodiments of the present disclosure is shown.

[0026] Figure 6The figure shows an overall flow chart of a method M100 for switching an input mode according to some other embodiments of the present disclosure.

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

[0028] Figure 8 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0030] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the input mode switching method implemented in the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are first introduced.

[0032] Programming language input method: It is an input method used for writing code and is designed to conform to the code writing habits. For example, it can have functions such as supporting the syntax of a specific programming language, recognizing keywords, variable names and function names, automatically completing code snippets, and detecting syntax errors in real time.

[0033] Natural language input method: It is an input method used to input the language used in daily human communication. It is designed to conform to the input habits of daily communication. For example, it can have functions such as word association, word prediction, and spelling check.

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

[0035] If the input method is switched manually, each time the input method is switched, a designated shortcut key needs to be pressed or a designated button needs to be clicked by the mouse to switch, which reduces the efficiency of user input.

[0036] To this end, the present disclosure proposes a method for switching input modes. The method for switching input modes proposed in the present disclosure can be implemented on a terminal device alone. In the present disclosure, a "terminal device" can be different types of electronic devices, for example, a terminal device can be a mobile phone, a computer, or other devices.

[0037] Figure 1 FIG. 1 is a schematic diagram showing the overall flow of a method M100 for switching an input mode according to some embodiments of the present disclosure. Figure 1 The method shown includes step S110 and step S120. The method can be executed by an electronic device such as a computer.

[0038] S110, monitoring the object that obtains the input focus, wherein the object becomes the focus object after obtaining the input focus.

[0039] The input focus is a representation that allows the object holding it to receive input information from the input device. The focus object is the object that has received the input focus among the operable objects of the electronic device. The operable object can be a program, window or control in the 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 a keyboard. When an application is started for the first time, the input focus will be transferred to the started application, which is called the focus object. Only the object that has obtained the 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, which is used to distinguish the focus object from the non-focus object to the user. When the focus object is a text editor or other program that can edit content, a flashing cursor will be displayed in the editing area, and the cursor will indicate the location of the input focus.

[0041] When a user operates an electronic device, the input focus will be transferred between different focus objects. For example, under the user's operation, the social chat program A1 is opened at the first moment and obtains the input focus as the focus object, and then the user enters text in the program A1 for remote chatting; then the user continues to operate, so that the document editor A2 is opened at the second moment and obtains the input focus as another focus object, and then the user enters text in the editor A2 for text editing. At this time, the editor A2 is in an active state, and the program A1 is in an inactive state.

[0042] S120, in response to the change of the focus object satisfying the switching condition, triggering the switching of the input mode. The input mode after switching is in an enabled state, and 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 requirement of the changed focus object. The input function provided by the input mode before switching is different from the input function provided by the input mode after switching.

[0043] When the user transfers the input focus from object A1 to object A2 during the operation, the focus object changes. The switching condition is used to determine whether the input mode needs to be switched. 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 mode is switched. If the change of the focus object meets the switching condition, the currently valid input mode is switched. The currently valid input mode is the input mode in the enabled state, that is, the only input mode that can currently provide input function.

[0044] Assume that the device provides multiple different available input methods. When the input focus is obtained 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 function configured by R1 itself. When the input focus is transferred to object A2 (the input focus is obtained by A2), 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 function configured by R2 itself. Input method R1, like other input methods except R2, is not allowed to provide the corresponding input function.

[0045] Input mode R2 is an input mode suitable for inputting information in the scenario of focus object A2, that is, input mode R2 can meet the input requirements when inputting information in the scenario of focus object A2. Input requirements are used to indicate the desired input mode suitable for inputting information to the focus object. If input mode R1 before switching to input mode R2 is also enabled by input mode switching, then input mode R1 is also an input mode suitable for inputting information in the scenario of focus object A1. That is, the input mode selected after switching when switching the input mode is selected according to the new focus object that obtains the input focus and causes the input mode to switch.

[0046] Since the input requirements of focus object A2 are different from those of focus object A1, it is necessary to switch to a new input method R2 to meet the requirements that cannot be met by the original input method R1, 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 modes may correspond to different input methods, that is, the device provides a plurality of different input methods, for example, providing two programming language input methods suitable for code writing and one natural language input method suitable for daily communication, for a total of three input methods. Switching of input modes may refer to switching between different input methods.

[0048] Different input methods may also be different input modes corresponding to the same input method, that is, the device may provide multiple different input methods, for example, multiple input methods are provided or only one input method is provided, and some or all of the provided input methods each have multiple different input modes. When switching the input method, it is possible not to switch the input method but to switch between multiple input modes of the currently valid input method. Specifically, the device only provides one natural language input method, which includes a Chinese input mode, an English input mode, and a French input mode. When the switching condition is met, the currently valid English input mode is switched to the Chinese input mode.

[0049] By incorporating both input methods and input modes into the scope of input methods, the application scope of automatic switching of input methods is expanded, allowing the device to automatically switch between input methods and input modes, saving users the time of manually switching input methods in more scenarios.

[0050] Figure 2 The following is a schematic diagram showing an interface of the input mode switching process in some embodiments of the present disclosure. Figure 2 , Part (1) is the scene before the input method is switched, D is the screen area of ​​the device, A1 represents the browser, A2 represents the text editor, and the browser A1 is the object that has the input focus at this time. The solid line border of A1 indicates that A1 is the object that has the input focus, and the dotted line border of A2 indicates that A2 is the object that has not received the input focus. R1 is the English input method before the input method is automatically switched.

[0051] Part (2) is the scene after the input mode is switched. When the user moves the pointer to the area of ​​the text editor A2 and clicks, the text editor A1 obtains the input focus (A2 is represented by a dotted border). Only one program, window, control or element can obtain the input focus at the same time, so the browser A1 loses the input focus (A1 is represented by a dotted border). Since the program that obtains the input focus is the text editor, the pointer becomes a cursor (the "I" pattern in the figure), and a "│" type cursor flashes at the click position (not shown in the figure). Since the text editor A2 is used to input and edit Chinese, the device selects the Chinese input method R2 from the currently selectable Chinese input method and French input method based on the properties and characteristics of the text editor A2, and switches the Chinese input method R2 to an effective state. Only one input method or one input mode can be enabled at the same time, so the input method R1 stops running. This completes the function of automatically switching the input method according to the user operation.

[0052] The input mode switching method proposed in the embodiment of the present invention can automatically determine whether the input mode should be switched according to the user's operation behavior, and switch the input mode when necessary. There is no need for the user to manually switch the input mode. The accuracy of input method switching can be ensured and the user's information input efficiency can be improved.

[0053] The focus object may include one or more of the following types: an interactive object, an editable element in an interactive object. The interactive object may be an application or different interactive windows of an application. The editable element may be an editable unit or an editable position in an interactive object.

[0054] by Figure 2 For example, A1 and A2 may be different applications. The transfer of input focus may be from one application to another application, such as from one game program to another game program (text editing is not possible in game programs).

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

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

[0057] By automatically switching input methods among a variety of different focus objects, the application scope of automatic switching is expanded, which can save users the time of manually switching input methods in more scenarios.

[0058] Figure 3 FIG. 1 is a schematic diagram showing the overall flow of a method M100 for switching an input mode according to another embodiment of the present disclosure. Figure 3 In step S120, the specific steps of triggering the switching of the 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 a focus object that obtains input focus changing from a first focus object to a second focus object, determining 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 the text editor A2 obtains the input focus, the input requirements of the browser A1 and the text editor A2 are determined.

[0061] It is understandable that since the operating 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 can be determined for both the first focus object and the second focus object, even if the first focus object was also switched to the foreground and was in a valid state through input focus transfer at a previous moment, that is, the input requirement of the first focus object has been determined at a previous moment, but since the input requirement may change, the input requirement can be re-determined at the current moment.

[0062] S122, if the switching condition is met, determine a target input mode that matches the input requirement of the second focus object, and switch the input mode to the target input mode. 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 the browser A1 and the text editor A2 have different input requirements at this time, the switching condition is met and the input mode needs to be switched. Among the available input modes provided by the device, in addition to the input mode that is currently in a valid state, there may be multiple remaining optional input modes, so it is necessary to select the input mode that is most suitable for the user to input text for the second focus object. The selected input mode is the target input mode, and the input mode switching starts after the target input mode is obtained.

[0064] It is understandable that 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 mode. The currently valid input mode will continue to remain valid and provide corresponding input functions.

[0065] By identifying the input requirements of the focus object, it is determined which input mode should be switched to, thereby ensuring that the input mode after switching is the input mode expected by the user and avoiding incorrect switching.

[0066] Figure 4 FIG. 1 is a schematic diagram showing the overall flow of a method M100 for switching an input mode according to another embodiment of the present disclosure. Figure 4 , step S121 may specifically include the following steps S1211 and S1212.

[0067] S1211: In response to a focus object that obtains input focus changing from a first focus object to a second focus object, determining feature information of the first focus object and the second focus object.

[0068] S1212: Determine input requirements of the first focus object and the second focus object according to feature information of the first focus object and the second focus object and a mapping relationship between the feature information and the input requirements.

[0069] Different characteristic information corresponds to corresponding input requirements, and the input requirements corresponding to the characteristic information are determined through mapping relationships. The mapping relationship between characteristic information and input requirements is pre-configured and stored in a specified location. When the input requirements need to be determined, the mapping information can be read from the specified location and the input requirements can be determined.

[0070] The following uses different scenarios to 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 type of interactive object, functional features, the region where the device running the focus object is located, the device system language, file information of the file running on the focus object, and the historical usage record of the input method during the period when the focus object obtains input focus.

[0072] Below Figure 2 Take scenario 1 as an example to illustrate. Assume that the first focus object is an interactive object like the second focus object, A1 is a browser, A2 is a code editor, the first focus object is A1, and the second focus object is A2, and they are different interactive objects (applications). The information items included in the feature information of the first focus object are the same as the information items included in the feature information of the second focus object. In addition, assume that the device provides three input methods F1, F2, and F3, F1 and F2 are natural language input methods, F3 is a programming language input method, F1 is configured with two modes, Chinese input mode and English input mode, F2 and F3 are only configured with one input mode, and F2 is a French input method.

[0073] Regarding the types and functional features of interactive objects, the types of interactive objects refer to the classification of applications, which can include chat tools, office software, browsers, education and learning, video media, programming and development, reading and translation, etc. The functional features of interactive objects refer to the purpose of the application and the core functions it can provide. Functional features can usually reflect the category to which the application belongs. The functional features of the browser are web surfing and Internet interaction, and the functional features of the code editor A2 are program development.

[0074] For example, browser A1 belongs to the browser application class, and code editor A2 belongs to the programming development application class. When A1 obtains the input focus, input method R1 is the currently valid input method, and R1 is the input method F1 in the Chinese input mode. After the user clicks any area of ​​A2, A2 obtains the input focus and A1 loses the input focus. Since the program types of A2 and A1 are different, the feature information of A1 and A2 is different, and the input requirements determined by the mapping relationship are also different. The code editor belongs to the programming development class, so the input method F2 adapted to the programming development class can be used as the target input method, that is, the input method R2 is the input method F2. It can be understood that if the interactive object is an interactive window of an application, the type of the interactive window can be the type of the application to which it belongs. If the first focus object and the second focus object are the interactive windows of A1 and A2, the input method can be switched from F1 to F2 according to the above description.

[0075] Regarding the region where the device running the focus object is located and the system language of the device, the region may include a country and region, and the system language may be an interactive language currently used by the device.

[0076] For example, the interactive object that currently has input focus is code editor A2, and the input method currently used is input method F3. After the user clicks on any area of ​​browser A1, A1 obtains input focus and A2 loses input focus. By judging according to the mapping relationship based on program type, functional features or other feature information, it can be determined that the input requirements of A2 and A1 are different. At this time, the input method can be switched according to the device's region and system language. If the device is located in region A where the main language is Chinese, and the system language is currently Chinese, the input method can be switched to the Chinese input mode of input method F1 that can input Chinese. If the interactive object is the interactive window of an application, the input method can be switched from F3 to the Chinese input mode of F1 as described above.

[0077] Regarding the file information and input method history record of the file running on the focus object, the file information may include information items such as file type, historical editing information, etc. The file type may include document type, code type and other types, and the historical editing information may indicate the input method used in the previous editing process of the file.

[0078] Assume that A1 is a text editor, A2 is a code editor, the file k1 currently being edited by editor A1 is a document file, and the file k2 currently being newly opened and edited by editor A2 is a code file. Before the current input focus transfer, the historical editing records of editing k1 by the text editor only include the records of editing using the Chinese input mode of input method F1, and the running history records of text editor A1 describe that the input method used is the Chinese input mode of input method F1. In addition, before the current input focus transfer, the historical editing records of editing k2 by the code editor only include the records of editing using input method F3, and the running history records of code editor A2 describe that the input method used is input method F3. When A1 loses the input focus and A2 gains the input focus, it can be determined according to the mapping relationship based on the file type, historical editing information, input method history usage record or other feature information to determine that the input requirements of A2 and A1 are different. At this time, the input method can be switched based on the file information and the input method history usage record, and the input method F1 can be switched to the 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 position where the input focus is located.

[0080] Assuming that the first focus object and the second focus object are both editable elements, the feature information of the first focus object can also include the language of the editable content at the position where the input focus is located. When the user is editing text in a text editor, the cursor is currently located at the text position w1, and the previous text position and the next text position at the position w1 are both Chinese characters, and the current valid input mode is the Chinese input mode of the input method F1. The user clicks on another position in the text to transfer the input focus to the position w2, and the previous text position at the position w2 is English text and there is no next text position (position w2 is the end of the current paragraph). Then, the language of the editable content at the position before and after the input focus changes has changed, and the feature information of the first focus object and the second focus object is different. Therefore, through the mapping relationship, it can be determined that the input requirements of the two are different. At this time, the target input mode can be determined to be the English input mode of the input method F1 through the language of the editable content at the position after the input focus changes, and the input mode is switched.

[0081] When a user is editing code in a code editor, the cursor is currently located at position w3, the line where position w3 is located is an English code line, the purpose is code writing, and the currently valid input method is input method F3. The user clicks another position w4, so that the input focus is transferred to position w4, the line where position w4 is located is a blank line, the previous line of w4 is a comment start line containing a comment start symbol and the next line is a comment end line containing a comment end symbol, then the line where w4 is located is a comment line, the purpose is comment writing, then the purpose of the editable content at the position before and after the input focus changes has changed, the feature information of the first focus object and the second focus object is different, so the mapping relationship can be used to determine that the input requirements of the two are different, at this time, the target input method can be determined to be the Chinese input mode of input method F1 through the purpose of the editable content at the position after the input focus changes, and the input method is switched.

[0082] It is understandable that in addition to the user clicking on different positions to transfer the input focus as described above in scenario two, the user's line break operation, operation of moving in any direction using the arrow keys, or other operations that will cause the position of the input focus to change between editable positions can all be inferred to perform the judgment and switching action of switching the input mode.

[0083] By providing different types of optional feature information in step S1211 and step S1212 to determine the input requirements of the focus object, the input mode switching can be applicable to a variety of different scenarios, and the switched input mode can meet the user's expectations and requirements, thereby improving the accuracy of the switching.

[0084] Figure 5A flowchart of a method for switching input modes according to some embodiments of the present disclosure is shown. Figure 5 , determine the input requirements of the first focus object and the second focus object through the behavior model, and determine the target input method that is compatible with the input requirements of the second focus object.

[0085] After determining the characteristic information of the first focus object and the second focus object (corresponding to step S1211), the characteristic information is input into the behavior model, and the behavior model determines the input requirements of the first focus object and the second focus object based on the characteristic information of the first focus object and the second focus object (corresponding to step S1211). Then, it is determined whether the switching condition is met, and if the switching condition is met, the target input method adapted to the input requirement of the second focus object is determined (corresponding to a part of step S122), and the target input method is output. The device switches the input method according to the target input method output by the behavior model.

[0086] Figure 6 FIG. 1 is a schematic diagram showing the overall flow of a method M100 for switching an input mode according to another embodiment of the present disclosure. Figure 6 The input mode switching method M100 also includes step S130.

[0087] S130, obtaining the received operation information, and adjusting the parameters of the behavior model based on the operation information. The operation information includes information input to the device for switching the input mode, 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 mode.

[0088] Operation information is information about the user's manual operation of the device. After the input focus is shifted under the user's operation, the input mode is automatically switched through the behavior model. Then the user switches the input mode to a non-target input mode through manual operation. This means that the target input mode output by the behavior model is different from the input mode expected by the user. At this time, the user's switching operation information can be recorded, and the parameters of the behavior model can be adjusted based on this, thereby correcting the logic of the behavior model so that the target input mode determined by the behavior model in the subsequent process can meet the user's behavior habits.

[0089] By analyzing user behavior, we can modify the parameters of the behavior model. Based on whether the user manually adjusts the input method and the corresponding adjustment information, we can optimize the user behavior model and provide feedback. This allows us to provide feedback and update the behavior model based on user habits, continuously improve the model strategy, and enhance the prediction accuracy of the target input method.

[0090] Exemplarily, the input requirements of different focus objects may include: at least one requirement for inputting text in at least one language, at least one requirement for inputting voice, at least one requirement for inputting hand-drawn symbols, multiple requirements or all of the requirements.

[0091] For applications such as text editors and code editors, the input requirements are usually text input requirements in Chinese, English or other languages. For other types of applications such as chat software, the input requirements can be voice input or pattern input. For example, when the input focus is transferred from a text editor to a chat software, if the user's historical usage record of the chat software indicates that the user has always input voice information, the input method can be switched to voice input, and then the user can input voice information in the input box of the chat software by speaking.

[0092] The hand-drawn symbol can be input as an image or as text input of hand-drawn text. For example, when the input focus is transferred from a text editor to a chat software, if the user's history of using the chat software indicates that the user has always input hand-drawn information, the input mode can be switched to hand-drawn input, and the user can then input text in the form of handwritten text.

[0093] Accordingly, the input functions provided by different input methods may 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. The text input function, voice input function, and hand-drawn symbol input function configured by the input method can meet the text input needs, voice input needs, and hand-drawn symbol input needs of users when operating applications.

[0094] Different functions suitable for inputting text may correspond to different text languages. That is to say, the input method can provide input functions for texts in multiple different languages, thereby meeting the multi-language interaction needs of users.

[0095] Based on any of the above implementations, the present disclosure also provides a device for switching an input mode. Figure 7 FIG. 1 is a schematic block diagram of a structure of an input mode switching device according to an embodiment of the present 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 obtains the input focus. The object becomes the focus object after obtaining the input focus.

[0097] The input mode switching module 120 is used to trigger the switching of the input mode in response to the change of the focus object satisfying the switching condition. The input mode after switching is in an enabled state, and 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 requirements of the changed focus object. The input function provided by the input mode before switching is different from the input function provided by the input mode after switching.

[0098] The input mode switching device can be in the form of computer software, and each module of the input mode switching device can be implemented by a computer software module. The implementation process of the functions and effects of each module in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.

[0099] The execution subject of the input mode switching method in the specific implementation of the present disclosure may be an electronic device such as a computer.

[0100] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the input mode switching method of any one of the embodiments described above in the present disclosure. Figure 8 FIG. 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure. 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 interconnecting buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc. The bus 1100 can also be connected to a screen 1500, which is used to display an interactive interface, such as displaying Figure 2 The area of ​​the device screen shown.

[0101] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0102] The processor 1200 may be a central processing unit (CPU). The processor 1200 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0103] The memory 1300 can be used as a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions of the computer program in the embodiment of the present 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.

[0104] The memory 1300 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by 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. In addition, the memory 1300 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1300 may optionally include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the processor 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0105] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0106] The present disclosure also provides a computer program product, and the method of the present disclosure can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.

[0107] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0108] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented 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.

[0109] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0112] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

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

[0114] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for switching an input mode, characterized in that: include: Monitoring an object that obtains input focus, the object becoming a focus object after obtaining the input focus; as well as In response to the change of the focus object satisfying the switching condition, the switching of the input mode is triggered, the input mode after switching is in an enabled state, and 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 requirement of the changed focus object, and the input function provided by the input mode before switching is different from the input function provided by the input mode after switching.

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

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

4. The method for switching the input mode according to any one of claims 1 to 3, characterized in that: In response to the change of the focus object satisfying a switching condition, triggering the switching of the input mode includes: In response to the focus object that obtains the input focus changing from the first focus object to the second focus object, determining input requirements of the first focus object and the second focus object; and If the switching condition is met, a target input mode that matches the input requirement of the second focus object is determined, and the input mode is switched to the target input mode. The switching condition includes: the input requirements of the first focus object and the second focus object are different.

5. The input mode switching method according to claim 4, characterized in that: Determining input requirements of the first focus object and the second focus object includes: Determining 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 according to the feature information of the first focus object and the second focus object and a mapping relationship between the feature information and the input requirements; Optionally, when the second focus object is an interactive object, the feature information of the second focus object includes one or more of the type of the interactive object, functional features, the region where the device running the focus object is located, the device system language, file information of the file running on the focus object, and a historical use record of the input method during the period when the focus object obtains the input focus; Optionally, when the second focus object is an editable element, the characteristic information of the second focus object includes the language and / or purpose of the editable content at the position where the input focus is located; Optionally, determining input requirements of the first focus object and the second focus object through a behavior model and determining a target input mode that matches the input requirements of the second focus object; Optionally, the method further comprises: Acquire received operation information, and adjust 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, and 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.

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

7. The input mode switching method according to claim 1 or 6, characterized in that: The input functions provided by the different input modes include: multiple functions or all functions among 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; Optionally, different functions suitable for inputting text correspond to different text languages; Optionally, different input modes correspond to different input methods, or correspond to different input modes of the same input method.

8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 7.

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

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for configuring input mode according to input box of user device

    CN101916158A

  • Input method switching method and system for browser

    CN102436454A

  • Information input method and device, terminal equipment and storage medium

    CN111610863A

  • Intelligent switching method and device of input method, equipment and storage medium

    CN113641254A

  • Input method switching method and device and computer program product

    CN118295541A