Input methods, devices, and storage media
Patent Information
- Application Number
- CN202510231275.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]目前的输入法通常是根据用户输入的输入字符,显示与输入字符匹配的中文字符和/或英文字符作为候选词选项供用户进行选择和输入到页面中,输入便利性有待提升
[0032] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the input method of the first aspect.
Smart Images

Figure CN122653449A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to input methods, devices and storage media. Background Technology
[0002] Input methods are core tools for human-computer interaction with digital devices such as computers and mobile phones. Their function is to convert user input actions (such as keyboard typing, handwriting, and voice) into characters or text that the device can recognize. Input methods can be categorized into Pinyin input methods, Wubi input methods, stroke input methods, and handwriting input methods, among others.
[0003] Current input methods typically display Chinese and / or English characters that match the user's input as candidate words for the user to choose from and input into the page, which means that input convenience needs to be improved. Summary of the Invention
[0004] This application provides input methods, devices, and storage media designed to improve input convenience.
[0005] Firstly, an input method is provided, including:
[0006] The input interface displays an input method window, which includes a preset trigger character and a candidate word list entered by the user. The preset trigger character is a character that matches a formula or chemical element. At least one of the candidate word options corresponding to the preset trigger character has an option expansion control displayed. The option expansion control is used to control the display status of the associated options in the associated option list corresponding to the candidate word option in the interface. The associated option list includes multiple associated options.
[0007] Receive an expansion operation on the option expansion control corresponding to the target candidate word option, wherein the target candidate word option is any candidate word option that is displayed in the candidate word list and corresponds to a formula or chemical element;
[0008] The input interface displays a list of target associated options; the list of target associated options is a list of associated options corresponding to the target candidate word options; the multiple associated options in the list of target associated options are multiple formula expressions corresponding to the target formula, or multiple chemical formulas corresponding to the target chemical element, the target formula is a formula that matches the preset trigger character, and the target chemical element is a chemical element that matches the preset trigger character;
[0009] Receive a selection operation for a first associated option, wherein the first associated option is any associated option in the target associated option list;
[0010] In the application page of the target application in the input interface, the first associated option is displayed, and the target application is the application corresponding to the input focus.
[0011] In this technical solution, an input interface is displayed, which includes an input method window. The input method window includes a preset trigger character and a candidate word list. The preset trigger character is a character that matches a formula or chemical element. The candidate word list includes multiple candidate word options corresponding to the preset trigger character, and at least one of these candidate word options displays an option expansion control. Then, an operation to expand the option expansion control corresponding to the target candidate word option is received, and a target associated option list corresponding to the target candidate word option is displayed in the input interface. Finally, a selection operation on the associated options in the target associated option list is received, and the associated option corresponding to the selection operation is displayed on the application page of the target application corresponding to the input focus in the input interface. Upon receiving the operation to expand the option expansion control corresponding to the target candidate word option, a selection operation on the associated options in the target associated option list is received, and the selection operation is displayed on the application page of the target application corresponding to the input focus in the input interface. When the option expansion control corresponding to a formula or chemical element is expanded, a target associated option list is displayed. Multiple associated options in the target associated option list are multiple formula expressions corresponding to formulas matching preset trigger characters, or multiple chemical formulas corresponding to chemical elements corresponding to preset trigger characters. Thus, the candidate word list serves as a first-level candidate word menu for user selection, while the associated option list serves as a second-level candidate word menu, providing different forms of formula expressions or different chemical forms of chemical formulas to suit the user's input intent. Users can complete the input of various forms of formula expressions or chemical formulas based on the associated option list, eliminating the need for a dedicated editor or individual editing of each character in the chemical formula, thereby improving input efficiency.
[0012] In conjunction with the first aspect, in one possible implementation, each of the plurality of candidate word options is associated with an option extension control, wherein each candidate word option is an option type, and the option type is used to indicate the type of the associated option in the associated option list.
[0013] Displaying different option types as candidate word options in the primary candidate word menu is equivalent to categorizing the candidate word options, making it easier for users to input different types of candidate words.
[0014] In conjunction with the first aspect, in one possible implementation, the candidate word option in the candidate word list that corresponds to the option extension control is an associated option in the associated option list; the associated option list is stored in an associated option database, the associated option database is used to store multiple associated option lists and character indices corresponding to the multiple associated option lists, the character index is used to identify the associated option list in the associated option database; before displaying the target associated option list in the input interface, the method further includes: determining a first character index matching the preset trigger character in the associated option database; using the associated option list corresponding to the first character index and containing the target candidate word option as a candidate associated option list; and determining the target associated option list based on the candidate associated option list.
[0015] By pre-constructing an associated option database to store the associated option list, and determining the character index that matches the preset trigger character in the associated option database, a target associated option list that matches the preset trigger character can be obtained based on the candidate word options included by the user.
[0016] In conjunction with the first aspect, in one possible implementation, before determining the target association option list based on the candidate association option list, the method further includes: sorting multiple association options in the candidate association option list according to the first character index; determining the target association option list based on the candidate association option list includes: determining the target association option list based on the sorted candidate association option list.
[0017] Sort multiple associated options in the candidate associated option list according to the character index that matches the preset trigger character. This can ensure the matching degree between the associated options in the target associated option list and the preset trigger character, and increase the probability that the associated options in the target associated option list match the content that the user wants to input.
[0018] In conjunction with the first aspect, in one possible implementation, determining the target association option list based on the candidate association option list includes: determining whether the number of association options contained in the candidate association option list is greater than a preset number; if the number of association options contained in the candidate association option list is greater than the preset number, selecting the first N association options from the candidate association option list to form the target association option list, where N is the preset number; if the number of association options contained in the candidate association option list is less than or equal to the preset number, determining the candidate association option list as the target association option list.
[0019] The target associated option list is determined based on the number of associated options contained in the candidate associated option list, which can limit the number of associated options in the target associated option list.
[0020] In conjunction with the first aspect, in one possible implementation, the display of the input interface includes: displaying a current interface, the current interface including the application page of the target application; receiving a character input operation applied to the current interface; and, if the input character corresponding to the character input operation is the preset trigger character, displaying the input method window in the current interface to obtain the input interface.
[0021] When the input character corresponding to the character input operation is a preset trigger character, an input method window containing option extension controls is displayed, which makes it convenient for users to directly select associated options from the input method window for input, thus improving input convenience.
[0022] In conjunction with the first aspect, in one possible implementation, the associated option list is stored in an associated option database, which stores multiple associated option lists and character indices corresponding to the multiple associated option lists. The character indexes are used to identify the associated option lists in the associated option database. After receiving the character input operation applied to the current interface, the method further includes: matching the input character corresponding to the character input operation with a second character index in the associated option database, where the second character index is the character index corresponding to the associated option list of the formula or chemical element; if the input character matches any second character index in the associated option database, the input character is determined to be the preset trigger character.
[0023] By matching the input character corresponding to the character input operation with the character index used to identify the associated option list, it is possible to determine whether the input character is a preset trigger character, which is simple and convenient.
[0024] In conjunction with the first aspect, in one possible implementation, the candidate word option in the candidate word list that corresponds to the option extension control is the associated option in the associated option list; after determining that the input character is the preset trigger character, the method further includes: determining a first character index that matches the preset trigger character in the associated option database; and taking the first associated option in the associated option list corresponding to the first character index as the candidate word option corresponding to the preset trigger character.
[0025] Secondly, an input device is provided, comprising:
[0026] The display module is used to display an input interface, which includes an input method window. The input method window includes a preset trigger character input by the user and a candidate word list. The preset trigger character is a character that matches a formula or chemical element. The candidate word list includes multiple candidate word options corresponding to the preset trigger character. At least one of the multiple candidate word options corresponding to the preset trigger character has an option extension control displayed. The option extension control is used to control the display status of associated options in the associated option list corresponding to the candidate word option in the interface. The associated option list includes multiple associated options.
[0027] An operation receiving module is used to receive an expansion operation of the option expansion control corresponding to the target candidate word option, wherein the target candidate word option is a candidate word option in the candidate word list that has an option expansion control and corresponds to a formula or chemical element;
[0028] The display module is further configured to display a target associated option list in the input interface; the target associated option list is an associated option list corresponding to the target candidate word option; the multiple associated options in the target associated option list are multiple formula expressions corresponding to the target formula, or multiple chemical formulas corresponding to the target chemical element, the target formula is a formula matching the preset trigger character, and the target chemical element is a chemical element matching the preset trigger character;
[0029] The operation receiving module is further configured to receive a selection operation for a first associated option, wherein the first associated option is any associated option in the target associated option list;
[0030] The display module is further configured to display the first associated option on the application page of the target application in the input interface, wherein the target application is the application corresponding to the input focus.
[0031] Thirdly, a computer device is provided, including a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the computer device to implement the input method of the first aspect described above when executing the one or more computer programs.
[0032] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the input method of the first aspect.
[0033] This application achieves the following technical effects: Upon receiving an expansion operation of the option expansion control corresponding to a formula or chemical element, a target associated option list is displayed. Multiple associated options in the target associated option list are multiple formula expressions corresponding to formulas matching preset trigger characters, or multiple chemical formulas corresponding to chemical elements corresponding to preset trigger characters. Thus, the candidate word list serves as a first-level candidate word menu for user selection, while the associated option list serves as a second-level candidate word menu, providing different forms of formula expressions or different chemical formulas that match the user's input intent. Users can complete the input of various forms of formula expressions or chemical formulas based on the associated option list, eliminating the need for users to input formulas through a dedicated editor or edit each character in a chemical formula individually, thereby improving input efficiency. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a schematic diagram of a standard input method window;
[0036] Figure 2 A flowchart illustrating an input method provided in an embodiment of this application;
[0037] Figure 3 and Figure 4 A schematic diagram of the display interface provided in an embodiment of this application;
[0038] Figure 5 A flowchart illustrating another input method provided in an embodiment of this application;
[0039] Figure 6 A schematic diagram of the display interface provided in an embodiment of this application;
[0040] Figure 7 This is a schematic diagram of the structure of an input device provided in an embodiment of this application;
[0041] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with 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 this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0043] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0044] The technical solution of this application is applicable to scenarios where input is performed using an input method.
[0045] Input methods typically display Chinese and / or English characters that match the user's input as candidate words for the user to choose from and input into the page, but the ease of input needs to be improved.
[0046] For example, when a user enters the character "tie", the input method window displays as follows: Figure 1 As shown in P1, the input method window only contains the usual candidate word options: "iron", "tie", "stick", "increase credit", and "post". If the user wants to input the symbol for ferrous ions, "Fe",... 2+ The symbol for ferric ion is "Fe". 3+ Or, for chemical formulas such as the iron oxide symbol "FeO", each character in the chemical formula needs to be entered one by one, which results in low input efficiency.
[0047] For example, when a user enters the characters "weidadingli", the input method window displays the following: Figure 1 As shown in P2, the input method window only contains the standard candidate word options: "Vieta's formulas", "great", "not reached", "Vieta", and "Weida". If a user wants to input the Vieta's formulas, they need to use a dedicated formula editing tool, which results in low input efficiency.
[0048] To improve input convenience, this application proposes an input scheme. For special input content such as formulas and chemical elements, multiple formula expressions representing different forms of the same formula or multiple chemical formulas representing different chemical forms of the same chemical element are pre-constructed as multiple associated options in an associated option list. When a user's input character is detected as a preset trigger character that matches a formula or chemical element, an option expansion control is displayed in the input method window. This option expansion control controls the display status of associated options in the associated option list corresponding to the candidate word option on the interface. When an expansion operation is received for the option expansion control corresponding to a formula or chemical element, the corresponding target associated option list is displayed in the input interface. The target associated option list includes multiple associated options. The system provides multiple formula expressions corresponding to formulas that match preset trigger characters or multiple chemical formulas corresponding to chemical elements that match preset trigger characters. It then receives the user's selection of associated options from the target associated option list and displays the selected options on the input application's page. The candidate word list and associated option list form a two-level candidate word menu. The candidate word list serves as the first-level menu for user selection, while the associated option list serves as the second-level menu, providing different forms of formula expressions or chemical formulas that match the user's input intent. Users can input the desired formula expression or chemical formula simply by referring to the associated option list, eliminating the need for a dedicated editor or individual character editing, thus improving input efficiency.
[0049] The technical solution of this application can be applied to any computer device, including but not limited to desktop computers, laptops, tablets, or electronic whiteboards. The technical solution of this application is described in detail below.
[0050] See Figure 2 , Figure 2 This is a flowchart illustrating an input method provided in an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0051] S101, Display input interface.
[0052] Here, the input interface is a screen provided for users to input information. The input interface displays an input method window, which includes the preset trigger characters entered by the user and a list of candidate words.
[0053] The preset trigger character entered by the user is a character that matches a formula or chemical element.
[0054] Characters matching a formula include, but are not limited to, the full pinyin spelling of the formula name, the initials of the pinyin spelling of the formula name, the full English name of the formula name, or the English abbreviation of the formula name, or handwritten characters of the formula name. For example, characters matching Vieta's formulas could be "weidadingli", "wddl", "vietatheorem", "VT", etc., or they could be handwritten characters representing "Vieta's formulas".
[0055] Characters matching chemical elements include, but are not limited to, the full pinyin spelling of the chemical element, the element symbol of the chemical element, the full pinyin spelling of the compound corresponding to the chemical element, the pinyin abbreviation of the compound corresponding to the chemical element, the full English spelling of the compound corresponding to the chemical element, the initial letter abbreviation of the compound corresponding to the chemical element, or handwritten characters of chemical elements, chemical ions corresponding to chemical elements, or compounds corresponding to chemical elements.
[0056] The candidate word list includes multiple candidate word options corresponding to the preset trigger character entered by the user. These multiple candidate word options are available for the user to select.
[0057] At least one of the multiple candidate word options corresponding to the user-input preset trigger character has an option expansion control displayed. The option expansion control controls the display status of related options in the associated option list corresponding to the candidate word option on the interface. The associated option list for a candidate word option includes multiple related options. The option expansion control is displayed near the candidate word option to indicate that the candidate word option is expandable.
[0058] The option extension control has two states: triggered and untriggered. When the option extension control is in the untriggered state, multiple related options in the associated option list corresponding to the candidate word option are not displayed on the interface. When the option extension control is in the triggered state, multiple related options in the associated option list corresponding to the candidate word option are displayed on the interface.
[0059] Multiple associated options in the associated options list can occur in the following ways:
[0060] In the first case, the multiple associated options in the associated options list are multiple formula expressions used to express the same formula in different ways.
[0061] Taking Vieta's formulas as an example, Vieta's formulas can be expressed in the following ways:
[0062] (1)x1 2 +x2 2 = (x1 + x2) 2-2x1x2
[0063] (2)
[0064] (3)x1 3 +x2 3 = (x1 + x2) 3 -3x1x2(x1+x2)
[0065] (4)
[0066] (5) (x1-x2) 2 = (x1 + x2) 2 +4x1x2
[0067] (6)(x1+k)*(x2+k)=x1x2+k(x1+x2)+k 2
[0068] (7)
[0069] The above formulas (1)-(7) can be used as multiple associated options in the associated option list corresponding to Vieta's formulas.
[0070] In the second scenario, the associated options in the list are multiple chemical formulas representing different chemical forms of the same element. Taking iron as an example, iron exists in various chemical forms, including metallic iron, iron ions, and iron compounds. The formulas or chemical formulas in the associated options list for iron could include Fe, Fe2+, Fe3+, etc. 2+ Fe 3+ , FeO, etc.
[0071] Optionally, the multiple related options in the list can also be multiple words derived from the same word. Taking the word "iron" as an example, words such as "iron element" and "iron oxide" can be derived from it.
[0072] Optionally, the multiple associated options in the associated options list can also be multiple emoticons used to express the same meaning.
[0073] The associated option list is stored in the associated option database. The associated option database stores multiple associated option lists, each of which includes multiple associated options. For example, the associated option database can be as shown in Table 1.
[0074]
[0075] Table 1
[0076] In some embodiments, the candidate word option correspondingly displayed with the option expansion control is a chemical formula corresponding to a chemical element matched according to a preset trigger character input by a user or a formula expression corresponding to a formula; in this case, the plurality of candidate word options corresponding to the preset trigger character input by the user further include other conventional candidate word options matched with the preset trigger character input by the user, and the conventional candidate word options do not have a corresponding option expansion control, that is, the conventional candidate word options do not have expansion options. The input method window is displayed above the application page where input is being performed. For example, the displayed input interface can be as Figure 3 shown in Q1, where w1 in Q1 is the input method window, the input method window w1 includes the preset trigger character "tie" input by the user and a candidate word list, the plurality of candidate word options included in the candidate word list are sequentially "tie (iron)", "tie (paste)", "Fe", "tie (post)", "ti'e (credit limit)", since the candidate word option "Fe" represents an iron element, and the iron element has a plurality of chemical forms, an option expansion control k1 is correspondingly displayed on the right side of the candidate word option "Fe", indicating that the candidate word option "Fe" has expansion options and can be expanded into a plurality of forms.
[0077] In some other embodiments, each candidate word option among the plurality of candidate word options corresponds to an option expansion control, each candidate word option is an option type, the option type is used to indicate the type of a plurality of associated options in an associated option list, and the option types can be specifically divided into formula expressions, chemical formulas, word groups, expressions, etc. For example, the displayed input interface can be as Figure 4 shown in T1, where w2 in T1 is the input method window, the input method window w2 includes the preset trigger character "tie" input by the user and a candidate word list, each candidate word option in the candidate word list corresponds to an option expansion control, one candidate word option represents one option type, and the candidate word list respectively includes four option types: formula expression, chemical formula, word and expression.
[0078] S102, receiving an expansion operation performed on the option expansion control corresponding to the target candidate word option.
[0079] Here, the target candidate word option is a candidate word option that is correspondingly displayed with an option expansion control in the candidate word list and corresponds to a formula or a chemical element. The option expansion control corresponding to the candidate word option corresponding to the formula is used to control the display state of a plurality of formula expressions of different presentation forms corresponding to the same formula on the interface, and the option expansion control corresponding to the candidate word option corresponding to the chemical element is used to control the display state of a plurality of chemical formulas corresponding to the same chemical element on the interface. For example, the target candidate word option is Figure 3 the candidate word option "Fe" in Q1 in Figure 4 or the candidate word option "formula expression" or "chemical formula" in T1 in .
[0080] Expanding the option extension control corresponding to the target candidate word option triggers the expansion function of the option extension control, that is, it opens the associated option list controlled by the option extension control, so that multiple associated options in the associated option list controlled by the option extension control can be displayed. It is understandable that when multiple candidate word options in the candidate word list have corresponding option extension controls, the associated option lists controlled by different option extension controls will be different.
[0081] When a preset trigger operation is received, indicating that the option expansion control has been activated, an expansion operation for the option expansion control is received. The preset trigger operation for activating the option expansion control can be, for example, clicking the option expansion control (including mouse click, touch click, etc.), or selecting the candidate word option corresponding to the option expansion control by pressing a preset key (such as the Tab key), and so on. These are not the only examples.
[0082] Input interface such as Figure 3 Taking Q1 as an example, when the user clicks the option expansion control k1 with the mouse, the system receives an expansion operation for the option expansion control corresponding to the candidate word option "Fe".
[0083] S103, Display the target association option list in the input interface.
[0084] Here, the target associated option list is the list of associated options corresponding to the target candidate word options. The target associated option list will vary depending on the target candidate word options.
[0085] If the target candidate word is a candidate word corresponding to a formula, then the multiple associated options in the target associated option list are multiple formula expressions corresponding to the target formula, and the target formula is the formula that matches the preset trigger character. For example, if the preset trigger character is "weidadingli", then the multiple associated options in the target associated option list can be multiple formula expressions corresponding to Vieta's formulas.
[0086] If the target candidate word is a candidate word corresponding to a chemical element, then the multiple associated options in the target associated option list are multiple chemical formulas corresponding to the target chemical element, and the target chemical element is a chemical formula that matches the preset trigger character. For example, if the preset trigger character is "tie", then the multiple associated options in the target associated option list can be multiple chemical formulas corresponding to the element iron.
[0087] The target list of related options is stored in the related options database. Besides storing multiple lists of related options, the database also stores the character indices corresponding to these lists. These character indices identify the related options lists within the database. A list of related options can have one or more character indices, which may include the full pinyin name, the initials of the full pinyin name, the full English name, or the abbreviation of the full English name of one or more related options in the list.
[0088] Taking the third column of Table 1 as an example, the third column of Table 1 represents the list of associated options corresponding to the element iron. The character indices of this list can include "tie", "Fe", "yanghuatie", "yht", "iron oxide", "liuhuatie", "lst", "iron sulfide", and so on. Assuming the list of associated options corresponding to the element iron is the j-th list in the associated option database, the data stored in the database regarding the j-th list can be shown in Table 2.
[0089] Associated Option List ID IDj Character Index 1 tie Character Index 2 yanghuatie … … Character Index M iron sulfide Related Option 1 Fe Related Option 2 <![CDATA[Fe 2+ ]]> … … Related option m <![CDATA[Fe2S3]]>
[0090] Table 2
[0091] In some embodiments, when the candidate word option displayed in the candidate word list corresponding to the option expansion control is an associated option in the associated option list, the input interface is as follows: Figure 3 As shown in Q1, before displaying the target associated option list in the input interface, the following steps A1-A3 are also included:
[0092] A1. In the associated options database, determine the first character index that matches the preset trigger character.
[0093] The steps for obtaining the index of the first character through matching will be described later in the text; please refer to the relevant descriptions below.
[0094] A2. The list of associated options corresponding to the first character index and containing the target candidate word option is taken as the candidate associated option list.
[0095] Specifically, at least one list of associated options corresponding to the first character index can be determined in the associated option database; among the at least one list of associated options corresponding to the first character index, the list of associated options containing the target candidate word option is taken as the candidate associated list.
[0096] For example, if the first character index is "tie", assume that at least one associated option list corresponding to the first character index includes Table 2 above and Table 3 below:
[0097]
[0098]
[0099] Table 3
[0100] Assuming the target candidate word is "Fe", then the list of associated options shown in Table 2 will be used as the candidate associated option list.
[0101] A3. Determine the target association option list based on the candidate association option list.
[0102] In one feasible implementation, it can be determined whether the number of associated options contained in the candidate associated option list is greater than a preset number, where the preset number is the maximum number of associated options displayed in the interface; if the number of associated options contained in the candidate associated option list is greater than the preset number, the first N associated options in the candidate associated option list are selected to form the target associated option list, where N is the preset number; if the number of associated options contained in the candidate associated option list is less than or equal to the preset number, the candidate associated option list is determined as the target associated option list.
[0103] Taking a preset quantity of 4 as an example, assuming the candidate related option list is the 3rd column of Table 1, and all related options in the 3rd column are "Fe", "Fe", etc. 2+ "Fe" 3+ "FeO", "Fe2O3", "Fe(OH)2", ..., "FeS", "Fe2S3"; Since the number of associated options in the candidate associated option list is greater than 4, the first 4 associated options "Fe", "Fe", "Fe2O3", ..., "FeS", "Fe2S3" will be selected. 2+ "Fe" 3+ The "FeO" option is part of the target association list.
[0104] The target associated option list is determined based on the number of associated options contained in the candidate associated option list, which can limit the number of associated options in the target associated option list.
[0105] In another feasible implementation, if each list of associated options in the associated option database contains the same number of associated options, and the number of associated options in each list is less than or equal to a preset number, then the candidate list of associated options can be directly determined as the target list of associated options. This application does not limit the specific method by which the target list of associated options is determined based on the candidate list of associated options.
[0106] In steps A1-A3 above, an associated option database for storing the associated option list is pre-built, and the target character index that matches the preset trigger character is determined in the associated option database. Based on the candidate word options determined by the user, the target associated option list that matches the preset trigger character can be obtained.
[0107] Optionally, before determining the target associated option list based on the candidate associated option list, the multiple associated options in the candidate associated option list can be sorted according to the first character index; during the process of determining the target associated option list based on the candidate associated option list, the target associated option list is determined based on the sorted candidate associated option list.
[0108] This involves calculating the matching degree between multiple related options in the candidate related option list and the target character index, arranging related options with high matching degree first and related options with low matching degree last, thus obtaining a sorted candidate related option list.
[0109] For example, multiple related options in the candidate related option list are "Fe", "Fe", etc. 2+ "Fe" 3+ "FeO", "Fe2O3", "Fe(OH)2", ..., "FeS", Fe2S3; when the target character index is character index 1 "tie" in Table 2, "Fe", "Fe 2+ "and "Fe 3+ "Arranged first, and other related options arranged last, the resulting sorted list of candidate related options is "Fe" 2+ "Fe" 3+ The list of candidate related options is as follows: "FeO", "Fe2O3", "Fe(OH)2", ..., "FeS", Fe2S3; when the target character index is "yanghuatie" in Table 2, "FeO", "Fe2O3", and "Fe(OH)2" are listed first, and the other related options are listed last, resulting in a sorted list of candidate related options: "FeO", "Fe2O3", "Fe(OH)2", "Fe", "Fe 2+ "Fe" 3+ ",..., "FeS", Fe2S3.
[0110] Sort the formula expressions or chemical formulas in the candidate associated option list according to the character index that matches the preset trigger character. This can ensure the matching degree between the associated options in the target associated option list and the preset trigger character, and increase the probability that the associated options in the target associated option list match the content that the user wants to input.
[0111] For example, after determining the target associated option list, displaying the target associated option list in the input interface can be as follows: Figure 3 As shown in Q2.
[0112] In other embodiments, where each candidate word option in the candidate word list is an option type, the input interface is, for example, as shown below. Figure 4 As shown in T1, before displaying the target associated option list in the input interface, a first character index matching the preset trigger character can be determined in the associated option database. Then, lists of associated options for different option types corresponding to the first character index can be determined. Among these lists, the associated option list matching the option type of the target candidate word option is selected as the candidate associated option list. Then, referring to the method described in step A3 above, the target associated option list is determined based on the candidate associated option list. For example, if the first character index is "tie", and assuming the lists of associated options for different option types corresponding to the first character index include Tables 2 and 3 above, and the target candidate word option is... Figure 4 For the "chemical formula" in the table, the list of associated options shown in Table 2 will be used as the candidate associated option list.
[0113] For example, after determining the target associated option list, displaying the target associated option list in the input interface can also be as follows: Figure 4 As shown in T2.
[0114] In some cases, the target association options list may also include an association options toggle button, which is used to switch the displayed association options in the target association options list.
[0115] S104, receive the selection operation for the first associated option.
[0116] Here, the first associated option is any associated option in the target associated option list. The selection operation of the first associated option is used to indicate that the user has selected the first associated option, that is, to indicate that the user's input purpose is to input the first associated option.
[0117] When a user clicks (including mouse clicks, touch clicks, etc.) or selects a key on the first associated option, a selection operation for the first associated option is received.
[0118] For reference Figure 3 Q2 and Figure 4 In T2, when the user clicks the first associated option "Fe2O3" with the mouse, the system receives a selection operation for the first associated option.
[0119] S105, the first associated option is displayed on the application page of the target application in the input interface.
[0120] Here, the target application is the application corresponding to the input focus. The input focus refers to the element or area in the input interface that is currently receiving user input, and the application corresponding to the input focus is the application that currently needs to respond to user input.
[0121] Before displaying the first associated option on the target application's application page in the input interface, the name of the foreground application in the input interface can be obtained. The foreground application name is the application name of the application corresponding to the input focus. The application corresponding to the foreground application name is then identified as the target application corresponding to the input focus. The foreground application name refers to the name of the application in the input interface that interacts with the user. The foreground application name can be obtained by retrieving the process name of the process in which the foreground application window resides, or by determining the foreground application name based on attribute values such as the title bar text and class name of the foreground application window. The foreground application window is the topmost application window in the input interface.
[0122] After the target application is identified, it is notified to obtain the first associated option. Once the target application obtains the first associated option, it inserts the first associated option into the target application's application page, thereby displaying the first associated option in the target application's application page in the input interface.
[0123] For example, in the application page of the target application in the input interface, displaying the first association option can be as follows: Figure 3 Q3 or Figure 4 As shown in T3.
[0124] Specifically, the system can select, from a preset option representation database, representation data pre-built for the target application and used to express the first associated option, as the target representation data (i.e., select, from the application format database, representation data corresponding to the target application and used to express the first associated option, as the target representation data), and store the target representation data in the shared storage area; the target application retrieves the target representation data from the shared storage area and pastes the target representation data into the application page of the target application, thereby completing the insertion of the first associated option into the application page of the target application.
[0125] Data representation refers to the data used to represent formulas or chemical formulas. Taking the chemical formula Fe₂S₃ as an example, it can be represented in text and image formats, thus corresponding to two data formats. For example, the formula x₁... 2 +x2 2 = (x1 + x2) 2 For example, -2x1x2 can be represented in LaTeX format, image format, etc.
[0126] The preset options indicate that the database is used to store the representation data corresponding to each formula expression and each chemical formula. Each formula expression and each chemical formula can correspond to representation data in multiple data formats, and different data formats correspond to different applications. The shared storage area is a temporary storage area in the computer system that allows users to share and transfer text, images, file paths, and other types of clipboard content between different applications. The shared storage area allows users to copy and paste data or information, enabling data or information to be used across applications. In one embodiment, the shared storage area is the operating system's system clipboard. All applications can directly read data from the operating system's system clipboard, paste it into the application, and display it in the application's format. Taking the WPS application as an example, when performing a copy operation in the WPS application, it caches data in the system clipboard, with a general format as follows:
[0127] - Flag: WPS_XXX
[0128] -Data: 01010101011010....
[0129] Then, when the paste command is executed in the WPS application, it will look for the Data under the Flag it recognizes in the system clipboard, and then read and display the Data.
[0130] In the above Figure 2In the corresponding technical solution, an input interface is displayed, which includes an input method window. The input method window includes a preset trigger character and a candidate word list. The preset trigger character is a character that matches a formula or chemical element. The candidate word list includes multiple candidate word options corresponding to the preset trigger character, and at least one of these candidate word options displays an option expansion control. Then, an expansion operation is received on the option expansion control corresponding to the target candidate word option, displaying a target associated option list corresponding to the target candidate word option in the input interface. Finally, a selection operation is received on the associated options in the target associated option list, displaying the associated option corresponding to the selection operation on the application page of the target application corresponding to the input focus in the input interface. Upon receiving the selection operation... When the option expansion control corresponding to a formula or chemical element is expanded, a target associated option list is displayed. Multiple associated options in this list are either multiple formula expressions corresponding to formulas matching preset trigger characters, or multiple chemical formulas corresponding to chemical elements matching preset trigger characters. Thus, the candidate word list serves as a first-level candidate word menu for user selection, while the associated option list serves as a second-level candidate word menu, providing different forms of formula expressions or chemical formulas that match the user's input intent. Users can complete the input of various forms of formula expressions or chemical formulas based on the associated option list, eliminating the need for a dedicated editor or individual character editing in chemical formulas, thereby improving input efficiency.
[0131] See Figure 5 , Figure 5 A flowchart illustrating another input method provided in an embodiment of this application is shown below. Figure 5 As shown, the method includes the following steps:
[0132] S201, Display the current interface.
[0133] Here, the current interface is the interface currently displayed on the computer device. The current interface can be any display interface. The current interface includes the application page of the target application. For an introduction to the target application, please refer to the relevant description of step S105 above, which will not be repeated here.
[0134] For example, displaying the current interface can be as follows: Figure 5 As shown in Q0.
[0135] S202, Receives character input operations applied to the current interface.
[0136] Here, the character input operation applied to the current interface refers to the operation used to input characters in the current interface.
[0137] When a user inputs characters on the current interface using keyboard keys or by using a touch object (such as a finger or stylus), the input operation is received and applied to the current interface.
[0138] S203, determine whether the input character corresponding to the character input operation is a preset trigger character input by the user.
[0139] In one feasible implementation, it can be determined whether the input character corresponding to the character input operation is a preset trigger character through the following steps C1-C3:
[0140] C1. Match the input character corresponding to the character input operation with the second character index in the associated option database.
[0141] Here, the second character index is the character index corresponding to the list of associated options for the formula or chemical element.
[0142] In one feasible implementation, it can be determined whether the input character corresponding to the character input operation is the same as the second character index in the associated option database; if the input character corresponding to the character input operation is the same as any second character index in the associated option database, then it is determined that the input character corresponding to the character input operation matches any second character index in the associated option database, and all character indices in the associated option database that are the same as the input character are determined as the first character index; if the input character corresponding to the character input operation is not the same as any of the second character indices in the associated option database, then it is determined that the input character corresponding to the character input operation does not match any of the second character indices in the associated option database.
[0143] C2. If the input character corresponding to the character input operation matches any second character index in the associated option database, determine that the input character corresponding to the character input operation is the preset trigger character input by the user.
[0144] C3. If the input character corresponding to the character input operation does not match any of the second character indices in the associated option database, determine that the input character corresponding to the character input operation is not the preset trigger character entered by the user.
[0145] In steps C1-C3 above, by matching the input character corresponding to the character input operation with the character index of the associated option list, it is possible to determine whether the input character is a preset trigger character, which is simple and convenient.
[0146] If the input character corresponding to the character input operation is a preset trigger character input by the user, proceed to step S204; if the input character corresponding to the character input operation is not a preset trigger character input by the user, proceed to step S211.
[0147] S204: Display the first input method window in the current interface to obtain the input interface.
[0148] The first input method window includes a preset trigger character entered by the user and a first candidate word list. The first candidate word list includes multiple candidate word options corresponding to the preset trigger character entered by the user, and contains option extension controls. For an introduction to the first candidate word list and option extension controls, please refer to the description of the candidate word list and option extension controls in the aforementioned step S101, which will not be repeated here.
[0149] After determining that the input character corresponding to the character input operation is the preset trigger character input by the user, if the candidate word option with the corresponding option extension control in the candidate word list is an associated option in the associated option list, at least one associated option list corresponding to the target character index can be determined by referring to the aforementioned steps A1-A2. The first associated option in each associated option list corresponding to the target character index is taken as a candidate word option in the first candidate word list. Option extension controls are added to each candidate word option belonging to the associated options. Together with other candidate word options that match the input character corresponding to the character input operation, they are displayed in the first candidate word list, thereby displaying the first input method window in the current interface and obtaining the input interface.
[0150] For example, displaying the first input method window in the current interface to obtain the input interface can be done as follows: Figure 3 As shown in Q1.
[0151] When the input character corresponding to the character input operation is a preset trigger character, an input method window containing option extension controls is displayed, which makes it convenient for users to directly select associated options from the input method window for input, thus improving input convenience.
[0152] Optionally, after determining that the input character corresponding to the character input operation is a preset trigger character input by the user, each candidate word option in the candidate word list corresponds to an option extension control. When each candidate word option is an option type, different option types can be displayed in the first candidate word list, thereby displaying the first input method window on the current interface and obtaining the input interface. Displaying the first input method window on the current interface and obtaining the input interface can be done as follows: Figure 4 As shown in T1.
[0153] S205, receive the expansion operation of the option expansion control corresponding to the target candidate word option.
[0154] Here, the target candidate word options are the candidate word options in the first candidate word list that have corresponding option expansion controls and correspond to the formula or chemical element.
[0155] S206, Display the target association option list in the input interface.
[0156] S207, Receive the selection operation for the first associated option.
[0157] S208, in the application page of the target application in the input interface, the first associated option is displayed.
[0158] The specific implementation of steps S205 to S208 can be found in the description of steps S102 to S105 above, and will not be repeated here.
[0159] S209, Display the second input method window in the current interface.
[0160] Here, the second input method window includes the input characters corresponding to the character input operation and a second candidate word list. The second candidate word list does not contain an option extension control.
[0161] The second input method window can be displayed above the application page where input is currently being performed. For example, displaying the second input method window in the current interface can be done as follows: Figure 6 As shown in Q4.
[0162] S210, receive the selection operation for the target option.
[0163] Here, the target option is any candidate word option in the second candidate word list, and the selection operation of the target option is used to indicate that the target option is selected.
[0164] When a user clicks, touches, or presses a key on any candidate word in the second candidate word list, the user selects the target option.
[0165] To display a second input method window in the current interface, such as Figure 6 For example, see Q4 in the example. Figure 6 When a user clicks on the candidate word "innocent" with their mouse, they receive a selection action for the target option.
[0166] S211, In the application page of the target application in the input interface, display the target options.
[0167] For example, in the application page of the target application in the input interface, the target options can be displayed as follows: Figure 6 As shown in Q5.
[0168] In steps S209 to S211 above, if the character entered by the user is not a preset trigger character, candidate word options matching the character entered by the user are displayed in the input method window, and then the candidate word option selected by the user in the input method window is directly displayed in the application page, so as to realize the direct input of candidate word options.
[0169] The method of this application has been described above; the apparatus of this application will be described below.
[0170] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a formula input device provided in an embodiment of this application, as shown below. Figure 7 As shown, the input device 30 includes:
[0171] Display module 301 is used to display an input interface, which displays an input method window. The input method window includes a preset trigger character input by the user and a candidate word list. The preset trigger character is a character that matches a formula or chemical element. The candidate word list includes multiple candidate word options corresponding to the preset trigger character. At least one of the multiple candidate word options corresponding to the preset trigger character has an option extension control displayed. The option extension control is used to control the display state of the associated options in the associated option list corresponding to the candidate word option in the interface. The associated option list includes multiple associated options.
[0172] The operation receiving module 302 is used to receive the expansion operation of the option expansion control corresponding to the target candidate word option, wherein the target candidate word option is the candidate word option in the candidate word list that has the corresponding option expansion control and corresponds to the formula or chemical element;
[0173] The display module 301 is further configured to display a target associated option list in the input interface; the target associated option list is an associated option list corresponding to the target candidate word option, and the multiple associated options in the target associated option list are multiple formula expressions corresponding to the target formula, or multiple chemical formulas corresponding to the target chemical element, the target formula is a formula that matches the preset trigger character, and the target chemical element is a chemical element that matches the preset trigger character;
[0174] The operation receiving module 302 is further configured to receive a selection operation for a first associated option, wherein the first associated option is any associated option in the target associated option list;
[0175] The display module 301 is also used to display the first associated option on the application page of the target application in the input interface, wherein the target application is the application corresponding to the input focus.
[0176] It should be noted that the input device 30 described above can execute the input method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of input device 30 can be found in the input method provided in the embodiments of this application.
[0177] See Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device 40 provided in an embodiment of this application. The computer device 40 includes a processor 401 and a memory 402. The memory 402 is connected to the processor 401, for example, via a bus.
[0178] Processor 401 is configured to support the computer device 40 in performing the corresponding functions in the methods described in the above method embodiments. Processor 401 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0179] Memory 402 is used to store program code, etc. Memory 402 may include volatile memory (VM), such as random access memory (RAM); memory 402 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 402 may also include combinations of the above types of memory.
[0180] The memory 402 is used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the input method in the embodiments of this application. The processor executes various functional applications and data processing of the input method by running the non-volatile software programs, instructions, and modules stored in the memory, thereby realizing the function of the input method provided in the above method embodiments.
[0181] Memory 402 may include a program storage area and a data storage area, wherein 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 based on the use of the input device. In some embodiments, the memory may include memory remotely located relative to the processor, and this remote memory may be connected to the input device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0182] The one or more modules are stored in the memory. When executed by the one or more processors, they perform the input method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the function of the modules described in the above device embodiments.
[0183] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.
[0184] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0185] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. An input method, characterized in that, include: The input interface is displayed, and the input interface displays an input method window, which includes the preset trigger characters and candidate word list entered by the user. The preset trigger character is a character that matches a formula or chemical element; the candidate word list includes multiple candidate word options corresponding to the preset trigger character; At least one of the multiple candidate word options corresponding to the preset trigger character has an option expansion control displayed; The option extension control is used to control the display status of the associated options in the associated option list corresponding to the candidate word option on the interface. The associated option list includes multiple associated options. Receive an operation to expand the option expansion control corresponding to the target candidate word option, wherein the target candidate word option is a candidate word option in the candidate word list that has a corresponding option expansion control and corresponds to a formula or chemical element; The input interface displays a list of target association options; The target associated option list is a list of associated options corresponding to the target candidate word options; The multiple associated options in the target associated option list are multiple formula expressions corresponding to the target formula, or multiple chemical formulas corresponding to the target chemical element. The target formula is a formula that matches the preset trigger character, and the target chemical element is a chemical element that matches the preset trigger character. Receive a selection operation for a first associated option, wherein the first associated option is any associated option in the target associated option list; In the application page of the target application in the input interface, the first associated option is displayed, and the target application is the application corresponding to the input focus.
2. The method according to claim 1, characterized in that, Each of the multiple candidate word options has a corresponding option expansion control. Each candidate word option is an option type, which is used to indicate the type of multiple associated options in the associated option list.
3. The method according to claim 1, characterized in that, The candidate word options in the candidate word list that display the option expansion control are the associated options in the associated option list; the associated option list is stored in the associated option database, which is used to store multiple associated option lists and the character indexes corresponding to the multiple associated option lists, and the character indexes are used to identify the associated option lists in the associated option database; Before displaying the target association option list in the input interface, the method further includes: In the associated option database, determine the first character index that matches the preset trigger character; The list of associated options corresponding to the first character index and containing the target candidate word option is taken as the candidate associated option list; Based on the candidate association option list, the target association option list is determined.
4. The method according to claim 3, characterized in that, Before determining the target association option list based on the candidate association option list, the method further includes: Based on the first character index, sort the multiple associated options in the candidate associated option list; Determining the target association option list based on the candidate association option list includes: The target association option list is determined based on the sorted candidate association option list.
5. The method according to claim 3, characterized in that, Determining the target association option list based on the candidate association option list includes: Determine whether the number of associated options contained in the candidate associated option list is greater than a preset number; If the number of associated options in the candidate associated option list is greater than a preset number, the first N associated options in the candidate associated option list are selected to form the target associated option list, where N is the preset number. If the number of associated options contained in the candidate associated option list is less than or equal to a preset number, the candidate associated option list is determined as the target associated option list.
6. The method according to any one of claims 1-5, characterized in that, The display input interface includes: The current interface is displayed, which includes the application page of the target application; Receive character input operations applied to the current interface; When the input character corresponding to the character input operation is the preset trigger character, the input method window is displayed in the current interface to obtain the input interface.
7. The method according to claim 6, characterized in that, The list of associated options is stored in an associated option database. The associated option database is used to store multiple lists of associated options and character indexes corresponding to the multiple lists of associated options. The character indexes are used to identify the list of associated options in the associated option database. After receiving the character input operation applied to the current interface, the method further includes: The input character corresponding to the character input operation is matched with the second character index in the associated option database, where the second character index is the character index corresponding to the associated option list of the formula or chemical element; If the input character matches any second character index in the associated option database, the input character is determined to be the preset trigger character.
8. The method according to claim 7, characterized in that, The candidate word options in the candidate word list that display the option expansion control are the associated options in the associated option list; after determining that the input character is the preset trigger character, the process further includes: In the associated option database, determine the first character index that matches the preset trigger character; The first associated option in the associated option list corresponding to the first character index is taken as the candidate word option corresponding to the preset trigger character.
9. A computer device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the computer device to perform the method as described in any one of claims 1-8 when executing the one or more computer programs.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.