A method for input error correction and related device
By determining multiple error correction characters corresponding to each key coordinate for blind keyboard input method, and using preset models and language models to calculate the probability of each key coordinate to the error correction string, the error correction effect in the prior art is solved. Ideal problems achieve better input error correction effects and improve user experience.
Patent Information
- Application Number
- CN201910913716.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-25
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-06-06
AI Technical Summary
The existing blind keyboard input error correction method only considers the optimal error correction characters corresponding to each key coordinate, and fails to fully consider the relationship between the characters in the entire error correction string, resulting in unsatisfactory error correction effect and affecting the user experience. .
By determining multiple error correction characters corresponding to each key coordinate, the preset model and language model calculate the probability of each key coordinate to the error correction string and the above probability of the characters in the error correction string, and the target error correction character are comprehensively determined. string.
The error correction effect of blindly typing keyboard input is improved, so that the corrected target string is more in line with the optimization requirements of the entire input string, greatly improving the user experience.
Smart Images

Figure CN112558783B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of input methods, and in particular to an input error correction method and related devices. Background Art
[0002] Input method software is a key channel for human-computer interaction. Generally, users use input method software to input symbols into the device. At present, blind keyboard input is more popular, that is, keyboard input is performed without looking at the specific keys on the keyboard. However, in actual applications, blind keyboard input is prone to key click deviation, resulting in incorrect input strings entered by the blind keyboard. Therefore, input error correction is particularly important for blind keyboard input.
[0003] At present, for the input string input by the blind typing keyboard, each key coordinate that forms the input string is input into the traditional key coordinate error correction model, and the optimal error correction key corresponding to each key coordinate is determined to obtain the optimal error correction character, thereby forming an error correction string to correct the input string.
[0004] However, after research, the inventors found that based on the above-mentioned input correction method, only the optimal correction character corresponding to each key coordinate can be obtained, and the correction string formed thereby does not take into account the association between the various correction characters in the entire correction string. For the entire input string, it is not necessarily the optimal correction string, resulting in an unsatisfactory input correction effect, thereby affecting the user experience of blind keyboard input. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide a method and related device for input error correction, so that the input error correction effect is better for the entire input string, thereby greatly improving the user experience of blind keyboard input.
[0006] In a first aspect, an embodiment of the present application provides a method for input error correction, the method comprising:
[0007] Determining multiple error correction strings corresponding to the input string based on multiple error correction characters corresponding to each key coordinate forming the input string;
[0008] Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtaining the first probability of each of the key coordinates to each of the error correction character strings;
[0009] Based on the second probability of each of the error correction characters in the above situation in each of the error correction strings obtained by using the language model, obtaining a second probability corresponding to each of the error correction strings;
[0010] A target error correction string is determined from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0011] Optionally, the multiple error correction characters corresponding to each key coordinate are determined by the corresponding key of each key coordinate and at least one adjacent key.
[0012] Optionally, the preset model is a Gaussian mixture model, and the first probability of each key coordinate to each error correction character obtained by using the preset model is obtained to obtain the first probability of each key coordinate to each error correction character string, including:
[0013] Input each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character;
[0014] Based on the first probabilities corresponding to the respective error correction characters in each error correction string, the first probabilities of the respective key coordinates to each error correction string are obtained.
[0015] Optionally, obtaining the second probability corresponding to each error correction string based on the second probability of each error correction character in the above case in each error correction string obtained by using a language model includes:
[0016] Inputting the context of each error correction character in each error correction string into the language model to obtain a second probability of each error correction character in the context of each error correction string;
[0017] Based on the second probabilities corresponding to the respective error correction characters in each error correction string, the second probability corresponding to each error correction string is obtained.
[0018] Optionally, the determining a target error correction string from a plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings includes:
[0019] Obtaining an error correction score corresponding to each error correction string based on the first probability and the second probability corresponding to each error correction string;
[0020] Based on the error correction scores corresponding to the plurality of error correction strings, error correction strings corresponding to the topN error correction scores are selected as the target error correction strings, where N is a positive integer and is less than or equal to the number of the plurality of error correction strings.
[0021] Optionally, also include:
[0022] The target error correction character string is displayed corresponding to the input character string.
[0023] Optionally, also include:
[0024] Based on the transition probability from the input character in the input character string to the error correction character in each of the error correction character strings, obtaining the transition probability from the input character string to each of the error correction character strings;
[0025] Correspondingly, determining the target error correction string from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings is specifically:
[0026] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the transition probability corresponding to each of the error correction strings.
[0027] Optionally, also include:
[0028] Based on the number of character error corrections from the input string to each of the error correction strings, obtaining an edit distance between the input string and each of the error correction strings;
[0029] Correspondingly, based on the first probability and the second probability corresponding to each of the error correction strings, determining a target error correction string from the plurality of error correction strings is specifically as follows:
[0030] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the edit distance corresponding to each of the error correction strings.
[0031] Optionally, also include:
[0032] Based on the transition probability from the input character in the input character string to the error correction character in each of the error correction character strings, obtaining the transition probability from the input character string to each of the error correction character strings;
[0033] Based on the number of character error corrections from the input string to each of the error correction strings, obtaining an edit distance between the input string and each of the error correction strings;
[0034] Correspondingly, based on the first probability and the second probability corresponding to each of the error correction strings, determining a target error correction string from the plurality of error correction strings is specifically as follows:
[0035] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, the transition probability, and the edit distance corresponding to each of the error correction strings.
[0036] In a second aspect, an embodiment of the present application provides a device for input error correction, the device comprising:
[0037] an error correction character string determination unit, configured to determine a plurality of error correction character strings corresponding to the input character string based on a plurality of error correction characters corresponding to each key coordinate forming the input character string;
[0038] A first probability obtaining unit, configured to obtain a first probability from each of the key coordinates to each of the error correction character strings based on a first probability from each of the key coordinates to the error correction character obtained using a preset model;
[0039] A second probability obtaining unit, configured to obtain a second probability corresponding to each of the error correction strings based on the second probability of each of the error correction characters in the above case in each of the error correction strings obtained by using a language model;
[0040] A target error correction string determining unit is configured to determine a target error correction string from a plurality of the error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0041] Optionally, the multiple error correction characters corresponding to each key coordinate are determined by the corresponding key of each key coordinate and at least one adjacent key.
[0042] Optionally, the preset model is a Gaussian mixture model, and the first probability obtaining unit includes:
[0043] A first obtaining subunit, used for inputting each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character;
[0044] The second obtaining subunit is used to obtain the first probability of each key coordinate to each error correction string based on the first probability corresponding to each error correction character in each error correction string.
[0045] Optionally, the second probability obtaining unit includes:
[0046] A third obtaining subunit is used to input the context of each error correction character in each error correction string into the language model to obtain a second probability of each error correction character in the context of each error correction string;
[0047] The fourth obtaining subunit is used to obtain the second probability corresponding to each of the error correction strings based on the second probability corresponding to each of the error correction characters in each of the error correction strings.
[0048] Optionally, the target error correction character string determination unit includes:
[0049] an error correction score obtaining subunit, configured to obtain an error correction score corresponding to each error correction string based on the first probability and the second probability corresponding to each error correction string;
[0050] The target error correction string determination subunit is used to select error correction strings corresponding to topN error correction scores as the target error correction string based on the error correction scores corresponding to the multiple error correction strings, where N is a positive integer and is less than or equal to the number of the multiple error correction strings.
[0051] Optionally, the device further comprises:
[0052] The target error correction character string display unit is used to display the target error correction character string corresponding to the input character string.
[0053] Optionally, the device further comprises:
[0054] A transition probability obtaining unit, configured to obtain a transition probability from the input string to each of the error correction strings based on a transition probability from an input character in the input string to an error correction character in each of the error correction strings;
[0055] Correspondingly, the target error correction character string determination unit is specifically used to:
[0056] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the transition probability corresponding to each of the error correction strings.
[0057] Optionally, the device further comprises:
[0058] An edit distance obtaining unit, configured to obtain an edit distance between the input string and each of the error correction strings based on the number of character error corrections from the input string to each of the error correction strings;
[0059] Correspondingly, the target error correction character string determination unit is specifically used to:
[0060] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the edit distance corresponding to each of the error correction strings.
[0061] Optionally, the device further comprises:
[0062] A transition probability obtaining unit, configured to obtain a transition probability from the input string to each of the error correction strings based on a transition probability from an input character in the input string to an error correction character in each of the error correction strings;
[0063] An edit distance obtaining unit, configured to obtain an edit distance between the input string and each of the error correction strings based on the number of character error corrections from the input string to each of the error correction strings;
[0064] Correspondingly, the target error correction character string determination unit is specifically used to:
[0065] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, the transition probability, and the edit distance corresponding to each of the error correction strings.
[0066] In a third aspect, an embodiment of the present application provides a device for input error correction, the device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:
[0067] Determining multiple error correction strings corresponding to the input string based on multiple error correction characters corresponding to each key coordinate forming the input string;
[0068] Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtaining the first probability of each of the key coordinates to each of the error correction character strings;
[0069] Based on the second probability of each of the error correction characters in the above situation in each of the error correction strings obtained by using the language model, obtaining a second probability corresponding to each of the error correction strings;
[0070] A target error correction string is determined from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0071] In a fourth aspect, an embodiment of the present application provides a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the device to perform the input error correction method as described in any one of the above-mentioned first aspects.
[0072] Compared with the prior art, this application has at least the following advantages:
[0073] Adopting the technical solution of the embodiment of the present application, first, by determining the multiple error correction characters corresponding to each key coordinate forming the input string, multiple error correction strings corresponding to the input string are determined; then, the first probability of each key coordinate to the error correction character is obtained by using the preset model to obtain the first probability of each key coordinate to each error correction string; and the second probability of each error correction character in the above case in each error correction string is obtained by using the language model to obtain the second probability corresponding to each error correction string; finally, based on the first probability and the second probability corresponding to each error correction string, the target error correction string is determined from multiple error correction strings. It can be seen that each key coordinate corresponds to multiple error correction characters, enriching the number of error correction strings, and fully exploring the situation of each key coordinate to the error correction string and the association between each error correction character in the error correction string based on the preset model and the language model respectively; so that the determined target error correction string has a better input correction effect for the entire input string, thereby greatly improving the user experience of blind keyboard input. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0075] Figure 1 A schematic diagram of a system framework involved in an application scenario in an embodiment of the present application;
[0076] Figure 2 A flowchart of an input error correction method provided in an embodiment of the present application;
[0077] Figure 3 A schematic diagram of a corresponding key and adjacent keys of a key coordinate (x1, y1) provided in an embodiment of the present application;
[0078] Figure 4 A schematic diagram of displaying a target error correction string corresponding to an input string provided in an embodiment of the present application;
[0079] Figure 5 A schematic diagram of the structure of an input error correction device provided in an embodiment of the present application;
[0080] Figure 6 A schematic diagram of the structure of a device for input error correction provided in an embodiment of the present application;
[0081] Figure 7A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0083] In practical applications, the blind keyboard input is likely to have a situation of click button deviation, resulting in the blind keyboard inputting an incorrect input string, and input error correction is required for the input string inputted by the blind keyboard. At present, the traditional key coordinate error correction model is usually used to determine the optimal error correction key corresponding to each key coordinate of the blind keyboard input, so as to obtain the optimal error correction character, thereby forming an error correction string. However, the inventor has found through research that the input error correction method only obtains the optimal error correction character corresponding to each key coordinate, and the error correction string formed by it does not consider the association between the various error correction characters of the entire error correction string. For the entire input string, it is not necessarily the optimal error correction string, resulting in an unsatisfactory input error correction effect, thereby affecting the user experience of the blind keyboard input.
[0084] In order to solve this problem, in an embodiment of the present application, by determining the multiple error correction characters corresponding to each key coordinate forming the input string, the multiple error correction strings corresponding to the input string are determined, and the first probability of each key coordinate to the error correction character is obtained by using the preset model, so as to obtain the first probability of each key coordinate to each error correction string; and the second probability of each error correction character in the above case in each error correction string is obtained by using the language model, so as to obtain the second probability corresponding to each error correction string; based on the first probability and the second probability corresponding to each error correction string, the target error correction string is determined from the multiple error correction strings. It can be seen that each key coordinate corresponds to multiple error correction characters, enriching the number of error correction strings, and fully exploring the situation of each key coordinate to the error correction string and the association between each error correction character in the error correction string based on the preset model and the language model respectively; so that the determined target error correction string has a better input correction effect for the entire input string, thereby greatly improving the user experience of blind keyboard input.
[0085] For example, one of the scenarios of the embodiments of the present application may be applied to Figure 1In the scenario shown, the scenario includes a user terminal 101 and a processor 102. When the user uses the input method to perform blind typing on the user terminal 101 to obtain an input string, the processor 102 determines the target error correction string using the method of the embodiment of the present application, and displays the target error correction string to the user corresponding to the input string through the user terminal 101.
[0086] It is understandable that in the above application scenarios, although the actions of the embodiments of the present application are described as being executed by the processor 102, these actions may also be executed by the user terminal 101, or may also be partially executed by the user terminal 101 and partially executed by the processor 102. The present application is not limited in terms of the execution subject, as long as the actions disclosed in the embodiments of the present application are executed.
[0087] It can be understood that the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
[0088] The specific implementation of the input error correction method and related devices in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0089] Exemplary Methods
[0090] See also Figure 2 , shows a flow chart of a method for input error correction in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0091] Step 201: Based on a plurality of error correction characters corresponding to each key coordinate forming an input character string, a plurality of error correction character strings corresponding to the input character string are determined.
[0092] It is understandable that, since the key coordinate input of the traditional key coordinate error correction model can only obtain the corresponding optimal error correction key, and thus obtain the corresponding optimal error correction character, the error correction string formed based on the optimal error correction character corresponding to each key coordinate forming the input string does not consider the association between the various error correction characters of the entire error correction string, and is not necessarily the optimal error correction string for the entire input string. Therefore, in an embodiment of the present application, first, it is necessary to determine the multiple error correction characters corresponding to each key coordinate forming the input string, and then, based on the various key coordinates forming the input string, and the multiple error correction characters corresponding to each key coordinate, multiple different error correction strings are formed. It can be seen that each key coordinate corresponds to multiple error correction characters. When forming an error correction string based on the various key coordinates forming the input string, there are multiple optional error correction characters corresponding to each key coordinate, and multiple different error correction strings can be formed by arbitrary selection, thereby enriching the number of error correction strings.
[0093] Among them, it should be noted that, since the coordinates of each key on the keyboard correspond to keys divided by area, the corresponding key can be clarified based on a key coordinate. In the case where the blind keyboard input is prone to click key deviation, it is necessary to clarify the adjacent keys of the key coordinates. The adjacent keys of the key coordinates are the keys adjacent to the corresponding keys of the key coordinates. The characters corresponding to the corresponding keys of the key coordinates and the characters corresponding to at least one adjacent key are used as the multiple error correction characters corresponding to the key coordinates. Therefore, in an optional implementation of the embodiment of the present application, the multiple error correction characters corresponding to each key coordinate are determined by the corresponding key and at least one adjacent key of each of the key coordinates.
[0094] As an example, assume that the key corresponding to the key coordinate (x1, y1) is key "w", such as Figure 3 The schematic diagram of the corresponding key and adjacent keys of the key coordinates (x1, y1) shown in the figure; the keys adjacent to the corresponding key "w" of the key coordinates (x1, y1) are: key "q", key "s" and key "e", etc., then the multiple error correction characters corresponding to the key coordinates (x1, y1) can be determined according to the corresponding key "w" of the key coordinates (x1, y1) and one or more of the adjacent keys of the key coordinates (x1, y1) including the keys "q", "s" and "e". For example, the multiple error correction characters corresponding to the key coordinates (x1, y1) are: w, q; or w, s; or w, e; or w, q, s; or w, q, e; or w, s, e; or w, q, s, e.
[0095] For step 201, as an example, the input string is "wrn", and the key coordinates forming the input string "wrn" are (x1, y1), (x2, y2) and (x3, y3), wherein the multiple error correction characters corresponding to the key coordinate (x1, y1) are w and q, the multiple error correction characters corresponding to the key coordinate (x2, y2) are r and e, and the multiple error correction characters corresponding to the key coordinate (x3, y3) are n and m. When the error correction string is formed based on the key coordinates (x1, y1), (x2, y2) and (x3, y3) forming the input string, the multiple error correction characters corresponding to each key coordinate are arbitrarily selected to form multiple error correction strings "wrn", "wrm", "wen", "wem", "qrn", "qrm", "qen" and "qem", that is, the multiple error correction strings corresponding to the input string "wrn" are "wrn", "wrm", "wen", "wem", "qrn", "qrm", "qen" and "qem", a total of 8 error correction strings.
[0096] Step 202: Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtain the first probability of each of the key coordinates to each of the error correction character strings.
[0097] It should be noted that each key coordinate corresponds to multiple error correction characters, and for any key coordinate, the probability from itself to the corresponding different error correction characters is different. Setting a preset model can calculate the probability of the corresponding error correction character under known key coordinates, as the first probability from the key coordinate to the error correction character, also known as the first probability corresponding to the error correction character in the error correction string; then in the embodiment of the present application, when the preset model is used to obtain the first probability from each key coordinate to the error correction character that forms the input string, the probability of each key coordinate that forms the input string to each error correction string can be calculated as the first probability corresponding to each error correction string.
[0098] In practical applications, the preset model can be a Gaussian mixture model. First, for each key coordinate, input it into the Gaussian mixture model to obtain the first probability of itself to each of its error correction characters, that is, the first probability corresponding to each error correction character; then, for each error correction string, when the first probability corresponding to each error correction character is known, the first probability of each key coordinate to the error correction string is calculated. Therefore, in an optional implementation of the embodiment of the present application, the step 202 may include the following steps, for example:
[0099] Step A: Input each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character.
[0100] As an example, based on the above example, the key coordinates (x1, y1) are input into the Gaussian mixture model to obtain the first probability of the key coordinates (x1, y1) to the error correction character "w", recorded as P(w|(x1, y1)); the first probability of the key coordinates (x1, y1) to the error correction character "q" is recorded as P(q|(x1, y1)); the key coordinates (x2, y2) are input into the Gaussian mixture model to obtain the first probability of the key coordinates (x2, y2) to the error correction character "r". , denoted as P(r|(x2, y2)), and the first probability of the key coordinate (x2, y2) to the error correction character "e" is denoted as P(e|(x2, y2)); the key coordinate (x3, y3) is input into the Gaussian mixture model to obtain the first probability of the key coordinate (x3, y3) to the error correction character "n", denoted as P(n|(x3, y3)), and the first probability of the key coordinate (x3, y3) to the error correction character "m", denoted as P(m|(x3, y3)).
[0101] Step B: Based on the first probabilities corresponding to the respective error correction characters in each error correction string, obtain the first probabilities of the respective key coordinates to each error correction string.
[0102] As an example, for example, the error correction string "wen", the first probability corresponding to the error correction character "w" is P(w|(x1, y1)), the first probability corresponding to the error correction character "e" is P(e|(x2, y2)), and the first probability corresponding to the error correction character "n" is P(n|(x3, y3)). Then the first probability of each key coordinate (x1, y1), (x2, y2) and (x3, y3) to the error correction string "wen" is P GMM =P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3)). Referring to this embodiment, the first probability of each key coordinate (x1, y1), (x2, y2) and (x3, y3) to other error correction strings "wrn", "wrm", "wem", "qrn", "qrm", "qen" or "qem" can be calculated in the same way, which will not be repeated here.
[0103] Step 203: Based on the second probability of each of the error correction characters in each of the error correction strings obtained by using the language model in the above case, obtain the second probability corresponding to each of the error correction strings.
[0104] It should be noted that there is a certain correlation between the various error correction characters in the error correction string, and this correlation affects the input error correction effect of the error correction string, especially the contextual relationship between the following error correction characters and the previous error correction characters in the error correction string. Since the language model can calculate the probability of the error correction characters in the previous context of the known error correction string as the second probability of the error correction characters in the previous context of each error correction string; then in the embodiment of the present application, when the language model is used to obtain the second probability of each error correction character in the previous context of each error correction string, the effective probability of each error correction string can be calculated as the second probability corresponding to each error correction string.
[0105] In practical applications, first, for each error correction string, the context of each error correction character is input into the language model to obtain the second probability of each error correction character in the error correction string under the context; then, for each error correction string, when the second probability corresponding to each error correction character is known, the second probability of each key coordinate to the error correction string is calculated. Therefore, in an optional implementation of the embodiment of the present application, the step 203 may include the following steps, for example:
[0106] Step C: inputting the context of each error correction character in each error correction string into the language model to obtain a second probability of each error correction character in the context of each error correction character in the error correction string.
[0107] Step D: based on the second probabilities corresponding to the respective error correction characters in each error correction string, obtain the second probability corresponding to each error correction string.
[0108] As an example, for example, the error correction string "wen", the context "" of the error correction character "w" is input into the language model, and the second probability of the error correction character "w" in the context of "" is obtained, which is recorded as P(w|); the context "w" of the error correction character "e" is input into the language model, and the second probability of the error correction character "e" in the context of "w" is obtained, which is recorded as P(e|w); the context "we" of the error correction character "n" is input into the language model, and the second probability of the error correction character "n" in the context of "we" is obtained, which is recorded as P(n|we). Then the second probability corresponding to the error correction string "wen" is P LM =P(w|)*P(e|w)*P(n|we). Referring to the above implementation, the second probability corresponding to other error correction strings "wrn", "wrm", "wem", "qrn", "qrm", "qen" or "qem" can be calculated in the same way, which will not be repeated here.
[0109] Step 204: Determine a target error correction string from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0110] It can be understood that the first probability corresponding to each error correction string obtained in step 202 represents the probability of each key coordinate forming the input string to each error correction string; the second probability corresponding to each error correction string obtained in step 203 represents the effective probability of each error correction string. In the embodiment of the present application, for each error correction string, combined with its corresponding first probability and second probability, the situation of each key coordinate to the error correction string and the association between each error correction character in the error correction string are fully explored, and at least one error correction string can be selected from multiple error correction strings to be determined as the target error correction string.
[0111] It should be noted that, in actual applications, first, a score can be calculated by combining the first probability and the second probability corresponding to each error correction string to serve as the error correction score corresponding to each error correction string; wherein, the higher the error correction score corresponding to the error correction string, the better the error correction effect of the error correction string for the entire input string. Then, when the error correction score corresponding to each error correction string is obtained, the error correction string corresponding to the topN error correction scores has a better error correction effect for the entire input string, and can be determined as the target error correction string for input correction of the input string. Therefore, in an optional implementation of the embodiment of the present application, step 204 may, for example, include the following steps:
[0112] Step E: based on the first probability and the second probability corresponding to each error correction string, obtain an error correction score corresponding to each error correction string.
[0113] As an example, for example, the error correction string "wen", based on the above example, the first probability corresponding to the error correction string "wen" is P GMM =P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3)), the second probability corresponding to the error correction string "wen" is P LM =P(w|)*P(e|w)*P(n|we), then the error correction score corresponding to the error correction string "wen" can be f=P GMM +P LM =P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3))+P(w|)*P(e|w)*P(n|we). Similarly, the error correction scores corresponding to other error correction strings "wrn", "wrm", "wem", "qrn", "qrm", "qen" or "qem" can be calculated and will not be repeated here.
[0114] Step F: Based on the error correction scores corresponding to the plurality of error correction strings, select the error correction strings corresponding to the topN error correction scores as the target error correction strings, where N is a positive integer and is less than or equal to the number of the plurality of error correction strings.
[0115] As an example, when the multiple error correction strings are "wrn", "wrm", "wen", "wem", "qrn", "qrm", "qen" and "qem", a total of 8 error correction strings, the error correction scores corresponding to the multiple error correction strings are sorted from large to small, and N=3 is set, that is, the error correction strings corresponding to the first 3 error correction scores are selected to be determined as the target error correction strings, and the specific value of N is not limited, as long as N≤8. Among them, let N=1, that is, the error correction string corresponding to the maximum error correction score is selected to be determined as the target error correction string. In the implementation of steps 201 to 204 of the embodiment of the present application, the target error correction string has the best error correction effect for the entire input string.
[0116] It should be noted that after the target error correction string is determined in step 204, the target error correction string represents an error correction string with a more accurate input error correction effect for the entire input string. In order to improve the user's blind typing experience and enable the user to more intuitively identify the target error correction string, the target error correction string can also be displayed corresponding to the input string, so that the user can select the target error correction string for on-screen operation, and the target error correction string replaces the input string to achieve blind keyboard input error correction. Therefore, in an optional implementation of the embodiment of the present application, for example, after step 204, step G can also be included: displaying the target error correction string corresponding to the input string.
[0117] For example, Figure 4 The schematic diagram of the corresponding input string displaying the target error correction string is shown, wherein the input string is "wrn", and the target error correction string determined by the implementation method of the embodiment of the present application is "wen", then the corresponding input string "wrn" displays the target error correction string "wen", so that the user can select the target error correction string "wen" for on-screen operation, and the target error correction string "wen" replaces the input string "wrn" to implement blind keyboard input correction, that is, in the case where the blind keyboard input obtains an erroneous input string "wrn", the implementation method of the embodiment of the present application can be adopted, and the input correction is the correct target error correction string "wen".
[0118] It should also be noted that, on the basis of obtaining the probability of each key coordinate representing the input string to each error correction string, and the effective probability of each error correction string, that is, on the basis of obtaining the first probability and the second probability corresponding to each error correction string, the association between the input string and each error correction string can also be fully mined. In the embodiment of the present application, for example, the association between the input string and each error correction string can be mined through the following two implementations:
[0119] The first implementation method calculates the transition probability from the input string to each error correction string. In the specific implementation, for each error correction string, it is necessary to correspond each input character in the input string to each error correction character in the error correction string. By using the transition probability model to clarify the transition probability from the input character to the corresponding error correction character, the transition probability from the input string to the error correction string is calculated as the transition probability corresponding to the error correction string.
[0120] After obtaining the transition probability corresponding to each error correction string, when determining the target error correction string, it is necessary not only to combine the first probability and the second probability corresponding to each error correction string, but also to combine the transition probability corresponding to each error correction string. Therefore, in an optional implementation of the embodiment of the present application, before step 204, for example, step H may also be included: based on the transition probability of the input character in the input string to the error correction character in each error correction string, the transition probability of the input string to each error correction string is obtained; correspondingly, step 204 may specifically be: based on the first probability, the second probability and the transition probability corresponding to each error correction string, the target error correction string is determined from multiple error correction strings.
[0121] As an example, the input string is "wrn" and the error correction string is "wen", where the input string "wrn" to the error correction string "wen" is actually r transferred to e when the previous context is "w", where the transition probability of r transferring to e when the previous context is "w" is P(r→e|w), then the transition probability of the input string "wrn" to the error correction string "wen" is P EM =P(r→e|w). Correspondingly, after obtaining the transition probability P corresponding to the error correction string “wen” EM In this case, based on the above example, the error correction score corresponding to the error correction string "wen" can be f=P GMM +P LM +P EM =P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3))+P(w|)*P(e|w)*P(n|we)+P(r→e|w).
[0122] As another example, the input string is "wrn" and the error correction string is "wem", where the input string "wrn" to the error correction string "wen" is actually r transferred to e when the previous context is "w", and n transferred to m when the previous context is "we"; where the transition probability of r transferring to e when the previous context is "w" is P(r→e|w), and the transition probability of n transferring to m when the previous context is "we" is P(n→m|we); then the transition probability of the input string "wrn" to the error correction string "wen" is P EM =P(r→e|w)*P(n→m|we). Correspondingly, after obtaining the transition probability P corresponding to the error correction string “wem” EM In this case, based on the above example, the error correction score corresponding to the error correction string "wem" can be f=P GMM +P LM +P EM =P(w|(x1, y1))*P(e|(x2, y2))*P(m|(x3, y3))+P(w|)*P(e|w)*P(m|we)+P(r→e|w)*P(n→m|we).
[0123] The second implementation method calculates the edit distance between the input string and each error correction string. In the specific implementation, for each error correction string, it is necessary to count the number of character corrections relative to the input string, and then use the edit distance function based on the number of character corrections to calculate the edit distance between the input string and the error correction string as the transition probability corresponding to the error correction string.
[0124] After obtaining the edit distance corresponding to each error correction string, when determining the target error correction string, it is necessary not only to combine the first probability and the second probability corresponding to each error correction string, but also to combine the edit distance corresponding to each error correction string. Therefore, in an optional implementation of the embodiment of the present application, before step 204, for example, step I may also be included: based on the number of character corrections from the input string to each error correction string, obtain the edit distance between the input string and each error correction string; correspondingly, step 204 may specifically be: based on the first probability, the second probability and the edit distance corresponding to each error correction string, determine the target error correction string from multiple error correction strings.
[0125] As an example, the input string is "wrn" and the error correction string is "wen", where the actual error correction from the input string "wrn" to the error correction string "wen" is e, that is, the number of character error corrections is 1, then the edit distance between the input string "wrn" and the error correction string "wen" is ED=f ED(1) Correspondingly, when the edit distance ED corresponding to the error correction string “wen” is obtained, based on the above example, the error correction score corresponding to the error correction string “wen” can be f=P GMM +P LM +ED=P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3))+P(w|)*P(e|w)*P(n|we)+f ED (1).
[0126] As another example, the input string is "wrn" and the error correction string is "wem", where the input string "wrn" to the error correction string "wem" is actually r error correction to e and n error correction to m, that is, the number of character error corrections is 2, then the edit distance between the input string "wrn" and the error correction string "wem" is ED = f ED (2) Correspondingly, when the edit distance ED corresponding to the error correction string “wen” is obtained, based on the above example, the error correction score corresponding to the error correction string “wen” can be f=P GMM +P LM +ED=P(w|(x1, y1))*P(e|(x2, y2))*P(m|(x3, y3))+P(w|)*P(e|w)*P(m|we)+f ED (2).
[0127] It should also be noted that, referring to the above two implementations, it is possible to obtain both the transition probability corresponding to each error correction string and the edit distance corresponding to each error correction string. In this case, it is necessary to simultaneously combine the first probability, the second probability, the transition probability and the edit distance corresponding to each error correction string, and select at least one error correction string from multiple error correction strings to determine it as the target error correction string. Therefore, in an optional implementation of the embodiment of the present application, before step 204, for example, the following steps H and I may also be included: based on the transition probability of the input character in the input string to the error correction character in each error correction string, the transition probability of the input string to each error correction string is obtained; based on the number of character corrections from the input string to each error correction string, the edit distance between the input string and each error correction string is obtained; correspondingly, the step 204 may be specifically, for example, as follows: based on the first probability, the second probability, the transition probability and the edit distance corresponding to each error correction string, the target error correction string is determined from multiple error correction strings.
[0128] As an example, the input string is "wrn" and the error correction string is "wen". Based on the above example, the first probability P corresponding to the error correction string "wen" is obtained.GMM and the second probability P LM On the basis of EM , and the edit distance ED corresponding to the error correction string "wen", then the error correction score corresponding to the error correction string "wen" can be f = P GMM +P LM +P EM +ED=P(w|(x1, y1))*P(e|(x2, y2))*P(n|(x3, y3))+P(w|)*P(e|w)*P(n|we)+P(r→e|w)+f ED (1).
[0129] Through the various implementation methods provided in this embodiment, first, by determining the multiple error correction characters corresponding to each key coordinate forming the input string, multiple error correction strings corresponding to the input string are determined; then, the first probability of each key coordinate to the error correction character is obtained by using the preset model to obtain the first probability of each key coordinate to each error correction string; and the second probability of each error correction character in the above case in each error correction string is obtained by using the language model to obtain the second probability corresponding to each error correction string; finally, based on the first probability and the second probability corresponding to each error correction string, the target error correction string is determined from multiple error correction strings. It can be seen that each key coordinate corresponds to multiple error correction characters, enriching the number of error correction strings, and fully exploring the situation of each key coordinate to the error correction string and the association between each error correction character in the error correction string based on the preset model and the language model respectively; so that the determined target error correction string has a better input correction effect for the entire input string, thereby greatly improving the user experience of blind keyboard input.
[0130] Exemplary Devices
[0131] See also Figure 5 , shows a schematic diagram of the structure of an input error correction device in an embodiment of the present application. In this embodiment, the device may specifically include:
[0132] The error correction character string determining unit 501 is used to determine multiple error correction character strings corresponding to the input character string based on multiple error correction characters corresponding to each key coordinate forming the input character string;
[0133] A first probability obtaining unit 502 is used to obtain a first probability from each of the key coordinates to each of the error correction character strings based on a first probability from each of the key coordinates to the error correction character obtained using a preset model;
[0134] A second probability obtaining unit 503 is used to obtain a second probability corresponding to each of the error correction strings based on the second probability of each of the error correction characters in the above case in each of the error correction strings obtained by using a language model;
[0135] The target error correction string determining unit 504 is configured to determine a target error correction string from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0136] In an optional implementation of the embodiment of the present application, the multiple error correction characters corresponding to each key coordinate are determined by the corresponding key of each key coordinate and at least one adjacent key.
[0137] In an optional implementation of the embodiment of the present application, the preset model is a Gaussian mixture model, and the first probability obtaining unit 502 includes:
[0138] A first obtaining subunit, used for inputting each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character;
[0139] The second obtaining subunit is used to obtain the first probability of each key coordinate to each error correction string based on the first probability corresponding to each error correction character in each error correction string.
[0140] In an optional implementation of the embodiment of the present application, the second probability obtaining unit 503 includes:
[0141] A third obtaining subunit is used to input the context of each error correction character in each error correction string into the language model to obtain a second probability of each error correction character in the context of each error correction string;
[0142] The fourth obtaining subunit is used to obtain the second probability corresponding to each of the error correction strings based on the second probability corresponding to each of the error correction characters in each of the error correction strings.
[0143] In an optional implementation of the embodiment of the present application, the target error correction string determination unit 504 includes:
[0144] an error correction score obtaining subunit, configured to obtain an error correction score corresponding to each error correction string based on the first probability and the second probability corresponding to each error correction string;
[0145] The target error correction string determination subunit is used to select error correction strings corresponding to topN error correction scores as the target error correction string based on the error correction scores corresponding to the multiple error correction strings, where N is a positive integer and is less than or equal to the number of the multiple error correction strings.
[0146] In an optional implementation of the embodiment of the present application, it also includes:
[0147] The target error correction character string display unit is used to display the target error correction character string corresponding to the input character string.
[0148] In an optional implementation of the embodiment of the present application, it also includes:
[0149] A transition probability obtaining unit, configured to obtain a transition probability from the input string to each of the error correction strings based on a transition probability from an input character in the input string to an error correction character in each of the error correction strings;
[0150] Correspondingly, the target error correction string determination unit 504 is specifically configured to:
[0151] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the transition probability corresponding to each of the error correction strings.
[0152] In an optional implementation of the embodiment of the present application, it also includes:
[0153] An edit distance obtaining unit, configured to obtain an edit distance between the input string and each of the error correction strings based on the number of character error corrections from the input string to each of the error correction strings;
[0154] Correspondingly, the target error correction string determination unit 504 is specifically configured to:
[0155] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, and the edit distance corresponding to each of the error correction strings.
[0156] In an optional implementation of the embodiment of the present application, it also includes:
[0157] A transition probability obtaining unit, configured to obtain a transition probability from the input string to each of the error correction strings based on a transition probability from an input character in the input string to an error correction character in each of the error correction strings;
[0158] An edit distance obtaining unit, configured to obtain an edit distance between the input string and each of the error correction strings based on the number of character error corrections from the input string to each of the error correction strings;
[0159] Correspondingly, the target error correction string determination unit 504 is specifically configured to:
[0160] The target error correction string is determined from the plurality of error correction strings based on the first probability, the second probability, the transition probability, and the edit distance corresponding to each of the error correction strings.
[0161] Through the various implementation methods provided in this embodiment, first, by determining the multiple error correction characters corresponding to each key coordinate forming the input string, multiple error correction strings corresponding to the input string are determined; then, the first probability of each key coordinate to the error correction character is obtained by using the preset model to obtain the first probability of each key coordinate to each error correction string; and the second probability of each error correction character in the above case in each error correction string is obtained by using the language model to obtain the second probability corresponding to each error correction string; finally, based on the first probability and the second probability corresponding to each error correction string, the target error correction string is determined from multiple error correction strings. It can be seen that each key coordinate corresponds to multiple error correction characters, enriching the number of error correction strings, and fully exploring the situation of each key coordinate to the error correction string and the association between each error correction character in the error correction string based on the preset model and the language model respectively; so that the determined target error correction string has a better input correction effect for the entire input string, thereby greatly improving the user experience of blind keyboard input.
[0162] Figure 6 6 is a block diagram of a device 600 for input error correction according to an exemplary embodiment. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0163] Reference Figure 6 , the device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0164] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0165] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0166] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0167] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0168] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0169] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0170] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0171] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0172] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0173] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0174] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform an input error correction method, the method comprising:
[0175] Determining multiple error correction strings corresponding to the input string based on multiple error correction characters corresponding to each key coordinate forming the input string;
[0176] Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtaining the first probability of each of the key coordinates to each of the error correction character strings;
[0177] Based on the second probability of each of the error correction characters in the above situation in each of the error correction strings obtained by using the language model, obtaining a second probability corresponding to each of the error correction strings;
[0178] A target error correction string is determined from the plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings.
[0179] Figure 7 7 is a schematic diagram of the structure of the server in the embodiment of the present application. The server 700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 722 (for example, one or more processors) and a memory 732, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 742 or data 744. Among them, the memory 732 and the storage medium 730 can be temporary storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 722 can be configured to communicate with the storage medium 730 and execute a series of instruction operations in the storage medium 730 on the server 700.
[0180] The server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input and output interfaces 758, one or more keyboards 756, and / or one or more operating systems 741, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0181] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0182] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0183] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0184] The above is only a preferred embodiment of the present application and does not constitute any formal limitation to the present application. Although the present application has been disclosed as above with a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present application using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still fall within the scope of protection of the technical solution of the present application.
Claims
1. A method for input error correction, characterized in that: include: Determining multiple error correction strings corresponding to the input string based on multiple error correction characters corresponding to each key coordinate forming the input string; Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtaining the first probability of each of the key coordinates to each of the error correction character strings; Based on the second probability of each of the error correction characters in the context of each of the error correction characters obtained by using the language model, obtaining the second probability corresponding to each of the error correction characters, which includes: inputting the context of each of the error correction characters in each of the error correction characters into the language model to obtain the second probability of each of the error correction characters in the context of each of the error correction characters; based on the second probability corresponding to each of the error correction characters in each of the error correction characters, obtaining the second probability corresponding to each of the error correction characters; Based on the transition probability from the input character in the input character string to the error correction character in each error correction character string, obtaining the transition probability from the input character string to each error correction character string; Based on the number of character error corrections from the input string to each of the error correction strings, obtaining an edit distance between the input string and each of the error correction strings; Based on the first probability and the second probability corresponding to each of the error correction strings, a target error correction string is determined from the multiple error correction strings, including: based on the first probability, the second probability, the transition probability and the edit distance corresponding to each of the error correction strings, the target error correction string is determined from the multiple error correction strings.
2. The method according to claim 1, characterized in that The multiple error correction characters corresponding to each key coordinate are determined by the corresponding key of each key coordinate and at least one adjacent key.
3. The method according to claim 1, characterized in that The preset model is a Gaussian mixture model, and the first probability of each key coordinate to each error correction character obtained by using the preset model is obtained to obtain the first probability of each key coordinate to each error correction character string, including: Input each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character; Based on the first probabilities corresponding to the respective error correction characters in each error correction string, the first probabilities of the respective key coordinates to each error correction string are obtained.
4. The method according to claim 1, characterized in that: The determining a target error correction string from a plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings comprises: Obtaining an error correction score corresponding to each error correction string based on the first probability and the second probability corresponding to each error correction string; Based on the error correction scores corresponding to the plurality of error correction strings, error correction strings corresponding to the topN error correction scores are selected as the target error correction strings, where N is a positive integer and is less than or equal to the number of the plurality of error correction strings.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: The target error correction character string is displayed corresponding to the input character string.
6. An input error correction device, characterized in that: include: an error correction character string determination unit, configured to determine a plurality of error correction character strings corresponding to the input character string based on a plurality of error correction characters corresponding to each key coordinate forming the input character string; A first probability obtaining unit, configured to obtain a first probability from each of the key coordinates to each of the error correction character strings based on a first probability from each of the key coordinates to the error correction character obtained using a preset model; The second probability obtaining unit is used to obtain the second probability corresponding to each of the error-correcting strings based on the second probability of each of the error-correcting characters in the context of each of the error-correcting strings obtained by using the language model, which includes: inputting the context of each of the error-correcting characters in each of the error-correcting strings into the language model to obtain the second probability of each of the error-correcting characters in the context of each of the error-correcting strings; and obtaining the second probability corresponding to each of the error-correcting characters in each of the error-correcting strings based on the second probability corresponding to each of the error-correcting characters in the error-correcting strings. A transition probability obtaining unit, configured to obtain a transition probability from the input string to each of the error correction strings based on a transition probability from an input character in the input string to an error correction character in each of the error correction strings; An edit distance obtaining unit, configured to obtain an edit distance between the input string and each of the error correction strings based on the number of character error corrections from the input string to each of the error correction strings; A target error correction string determination unit is used to determine a target error correction string from a plurality of error correction strings based on the first probability and the second probability corresponding to each of the error correction strings, including: determining the target error correction string from a plurality of the error correction strings based on the first probability, the second probability, the transition probability, and the edit distance corresponding to each of the error correction strings.
7. The device according to claim 6, characterized in that The multiple error correction characters corresponding to each key coordinate are determined by the corresponding key of each key coordinate and at least one adjacent key.
8. The device according to claim 6, characterized in that The preset model is a Gaussian mixture model, and the first probability obtaining unit includes: A first obtaining subunit, used for inputting each of the key coordinates into the Gaussian mixture model to obtain a first probability of each of the key coordinates to the error correction character; The second obtaining subunit is used to obtain the first probability of each key coordinate to each error correction string based on the first probability corresponding to each error correction character in each error correction string.
9. The device according to claim 6, characterized in that The target error correction character string determination unit comprises: an error correction score obtaining subunit, configured to obtain an error correction score corresponding to each error correction string based on the first probability and the second probability corresponding to each error correction string; The target error correction string determination subunit is used to select error correction strings corresponding to topN error correction scores as the target error correction string based on the error correction scores corresponding to the multiple error correction strings, where N is a positive integer and is less than or equal to the number of the multiple error correction strings.
10. The device according to any one of claims 6 to 9, characterized in that: The device also includes: The target error correction character string display unit is used to display the target error correction character string corresponding to the input character string.
11. A device for input error correction, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Determining multiple error correction strings corresponding to the input string based on multiple error correction characters corresponding to each key coordinate forming the input string; Based on the first probability of each of the key coordinates to the error correction character obtained by using a preset model, obtaining the first probability of each of the key coordinates to each of the error correction character strings; Based on the second probability of each of the error correction characters in the context of each of the error correction characters obtained by using the language model, obtaining the second probability corresponding to each of the error correction characters, which includes: inputting the context of each of the error correction characters in each of the error correction characters into the language model to obtain the second probability of each of the error correction characters in the context of each of the error correction characters; based on the second probability corresponding to each of the error correction characters in each of the error correction characters, obtaining the second probability corresponding to each of the error correction characters; Based on the transition probability from the input character in the input character string to the error correction character in each error correction character string, obtaining the transition probability from the input character string to each error correction character string; Based on the number of character error corrections from the input string to each of the error correction strings, obtaining an edit distance between the input string and each of the error correction strings; Based on the first probability and the second probability corresponding to each of the error correction strings, a target error correction string is determined from the multiple error correction strings, including: based on the first probability, the second probability, the transition probability and the edit distance corresponding to each of the error correction strings, the target error correction string is determined from the multiple error correction strings.
12. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to perform the input error correction method according to any one of claims 1 to 5.
