A dynamic error correction method, device and device for dynamic error correction
By performing error correction processing on the input string and selecting the error correction result during the backspace operation, the problem that existing input method applications cannot automatically correct errors is solved and the user's input efficiency is improved.
Patent Information
- Application Number
- CN201911245128.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-06
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-04-27
AI Technical Summary
Existing input method applications cannot automatically correct errors when performing backspace operations, resulting in low user input efficiency.
Dynamic error correction methods and devices are used to perform error correction processing on the input string. When a backspace command is received, the characters in the input string are backspaced, and the target error correction result is selected for display based on the error correction result set.
It provides users with dynamic error correction results during backspace operations, improving user input efficiency.
Smart Images

Figure CN112925423B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a dynamic error correction method, apparatus, and apparatus for dynamic error correction. Background Art
[0002] With the development of computer technology, the functions of input method applications have become increasingly rich. Input method applications can usually correct the incorrect content input by users to obtain correct candidate items and provide them to users, thereby improving input efficiency.
[0003] During the input process, when the user triggers a backspace instruction, it usually means that the user has input an incorrect character. However, in existing input method applications, when performing a backspace operation, error correction cannot be automatically performed. For example, when the user wants to input "game" on the screen, but mistakenly inputs "youzu", the user needs to first delete "zu" and then input "xi" again to present the candidate item of "game". Therefore, the existing method cannot provide the desired error correction result when performing a backspace operation, resulting in low input efficiency of the user. Summary of the Invention
[0004] The embodiments of the present application propose a dynamic error correction method, apparatus, and apparatus for dynamic error correction to provide the desired error correction result for the user when performing a backspace operation, thereby improving the input efficiency of the user.
[0005] In a first aspect, the embodiments of the present application provide a dynamic error correction method, which includes: performing error correction processing on an input string during the input process to obtain an error correction result set; when a backspace instruction is received, deleting characters in the input string; selecting a target error correction result from the error correction result set based on the input string and the deleted characters; presenting one or more of the target error correction results.
[0006] In a second aspect, the embodiments of the present application provide a dynamic error correction apparatus, which includes: an error correction unit configured to perform error correction processing on an input string during the input process to obtain an error correction result set; a backspace unit configured to delete characters in the input string when a backspace instruction is received; a selection unit configured to select a target error correction result from the error correction result set based on the input string and the deleted characters; a presentation unit configured to present one or more of the target error correction results.
[0007] In a third aspect, an embodiment of the present application provides a device for dynamic error correction, 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. The one or more programs include instructions for performing the following operations: performing error correction processing on an input string during an input process to obtain an error correction result set; when a backspace instruction is received, backspacing the characters in the input string; selecting a target error correction result from the error correction result set based on the input string and the backspaced characters; and displaying one or more of the target error correction results.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0009] The dynamic error correction method, device and device for dynamic error correction provided by the embodiments of the present application perform error correction processing on the input string during the input process to obtain an error correction result set, so that when a backspace instruction is received, the characters in the input string are backspaced; then based on the input string and the backspaced characters, a target error correction result is selected from the error correction result set; and finally, one or more of the target error correction results are displayed. Since when a user triggers a backspace instruction, it usually means that the user has entered an incorrect character, therefore, when the user triggers a backspace instruction, a backspace operation is performed and a target error correction result is selected and displayed for the backspaced characters, which can actively provide the user with the required error correction result, realize dynamic error correction during the input process, and improve the user's input efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0011] Figure 1 is a flow chart of an embodiment of a dynamic error correction method according to the present application;
[0012] Figure 2 is a flow chart of another embodiment of the dynamic error correction method according to the present application;
[0013] Figure 3 is a structural schematic diagram of an embodiment of a dynamic error correction device according to the present application;
[0014] Figure 4 is a structural schematic diagram of a device for dynamic error correction according to the present application;
[0015] Figure 5 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION
[0016] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0017] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0018] Please refer to Figure 1 , which shows a process 100 of an embodiment of the dynamic error correction method according to the present application. The above dynamic error correction method can be run on various electronic devices, including but not limited to: servers, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, car computers, desktop computers, set-top boxes, smart TVs, wearable devices, etc.
[0019] The above-mentioned electronic device may be installed with an input method application. The input method application mentioned in the embodiment of the present application can support multiple input methods. The input method application mentioned in the embodiment of the present application can support multiple input methods. Among them, the input method can be a coding method used to input various symbols into electronic devices such as computers and mobile phones, and the user can use the input method application to conveniently input the required characters or strings into the electronic device. It should be noted that in the embodiment of the present application, in addition to supporting common Chinese input methods (such as pinyin input method, Wubi input method, Zhuyin input method, voice input method, handwriting input method, etc.), the input method can also support input methods of other languages (such as Japanese Hiragana input method, Korean input method, etc.), and no limitation is made on the input method and the language type of the input method.
[0020] The dynamic error correction method in this embodiment may include the following steps:
[0021] Step 101, performing error correction processing on the input string during the input process to obtain an error correction result set.
[0022] In this embodiment, the execution subject of the dynamic error correction method (such as the above-mentioned electronic device) can perform error correction processing on the input string formed during the user input process to obtain an error correction result set. Among them, the input string can be an encoded string input by the user. For example, if the user wants to input "game", they can input the encoded string "youxi" using the pinyin input method.
[0023] In this embodiment, the above-mentioned error correction result set can include multiple error correction results corresponding to the input string. For example, if the user wants to input "wandering" but mistakenly inputs "youzu", the error correction result set can include multiple error correction results such as "wandering", "grapefruit", "oil stain", "game", etc.
[0024] It should be noted that in the embodiments of the present application, the error correction algorithm used for error correction processing of the input string can adopt any existing input method error correction algorithm, and the error correction algorithm used here is not limited.
[0025] In some alternative implementation manners of this embodiment, the above-mentioned execution subject can, during the input process, detect in real time whether the input string meets a preset error correction condition. Whenever it is detected that the input string meets the error correction condition, error correction processing can be performed on the input string, and the error correction results are summarized into an error correction result set. As the user inputs, when it is detected again that the input string meets the error correction condition, error correction processing can be performed on the input string again, and the error correction results in the error correction result set are replaced with the error correction results obtained from the re-error correction processing, so as to update the error correction result set. Thus, during the input process, each time an error correction is performed, the error correction result set can be updated once. Therefore, the error correction result set when a backspace instruction is received is the latest error correction result set.
[0026] In some alternative implementation manners of this embodiment, when the input string during the input process meets at least one of the following conditions, error correction processing can be performed on the above-mentioned input string, and one or more error correction results can be presented: the input pause duration is greater than a preset pause duration threshold, there is no entry corresponding to the above-mentioned input string in the thesaurus, the above-mentioned input string has a syntax error, the above-mentioned input string is the same as any historical error input string in the historical error input string set.
[0027] In some alternative implementation manners of this embodiment, whenever error correction processing is performed on the input string, one or more of the current error correction results can be displayed. For example, the optimal error correction result among them can be displayed.
[0028] Step 102, when a backspace instruction is received, delete the characters in the input string.
[0029] In this embodiment, the execution subject can receive a backspace instruction triggered by the user. In practice, when the user triggers the backspace key (such as the "Backspace" key) in the keyboard or virtual keyboard, the backspace instruction can be triggered. When the user moves the cursor in the input string (for example, triggering the arrow key to move to the left, or directly dragging the cursor to the left of the input string, etc.), it can also be considered that the backspace instruction is triggered.
[0030] In one scenario, when a backspace instruction is received, the characters in the input string can be backspaced. For example, for the input string "youzu", the user triggers a backspace instruction by triggering the backspace key, and then the character "u" in the input string "youzu" can be backspaced to obtain the input string "youz" after the backspace. At this time, the character "u" is the backspace character.
[0031] It should be noted that each time a backspace instruction is received, a backspace character can be obtained. Each time a backspace instruction is received, the following steps 103-104 can be performed based on the current backspace character. For example, when the user triggers the backspace instruction again, continuing with the above example, the character "z" in the current input string "youz" can be backspaced to obtain the input string "you" after backspace. At this time, the character "z" is the backspace character. Therefore, the following steps 103-104 can be performed again based on the character "z".
[0032] In another scenario, when it is detected that the user moves the cursor in the input string (used to indicate the input position), the characters in the input string can be backspaced. It should be noted that the character backspace operation here may refer to the operation of moving the cursor. For example, for the input string "youzu", the cursor is to the right of the rightmost character "u". When the user triggers the backspace command by triggering the arrow key, the cursor can be moved to between the second to last character "z" and the last character "u". At this time, the character "u" can be regarded as a backspace character.
[0033] As in the previous scenario, each time a backspace instruction is received, a backspace character can be obtained. Each time a backspace instruction is received, the following operations of step 103-step 104 can be performed based on the current backspace character.
[0034] Step 103: Select a target error correction result from the error correction result set based on the input string and the backspace character.
[0035] In this embodiment, the above-mentioned execution entity may select a target error correction result from the error correction result set based on the input string (here, the original input string, that is, the input string before backspacing) and the character to be backspaced. In practice, the character to be backspaced can be regarded as the character input by the user in error, and the original input string can be corrected by replacing the incorrect character or inserting other characters. Thus, the error correction result obtained after correcting the character can be selected from the error correction result set as the target error correction result.
[0036] In some alternative implementation manners of this embodiment, the above-mentioned execution entity may select the target error correction result according to the following steps:
[0037] First step, based on the character to be backspaced, obtain at least one error correction string corresponding to the above input string. Here, the error correction string may be a string obtained by correcting the character to be backspaced in the input string or.
[0038] Optionally, the character to be backspaced can be regarded as an incorrect character, and the incorrect character in the above input string can be replaced with other characters to obtain the first error correction string corresponding to the above input string. For example, for the input string "youzu", when the character to be backspaced is "u", the character to be backspaced can be replaced, for example, it can be replaced with "i" to obtain the error correction string "youzi".
[0039] Optionally, other characters can also be inserted before the incorrect character to obtain the second error correction string corresponding to the above input string. For example, for the input string "youzu", when the character to be backspaced is "u", the character "o" is inserted before the character to be backspaced "u" to obtain the error correction string "youzou".
[0040] It should be noted that the embodiments of the present application can also perform error correction in other ways based on the character to be backspaced, which will not be elaborated here.
[0041] Second step, select the error correction results corresponding to each error correction string from the above error correction result set as the target error correction results.
[0042] Here, for each error correction string, the error correction result corresponding to the error correction string can be the result of looking up the entry after looking up the entry with the error correction string. For example, the error correction results corresponding to the error correction string "youzi" may include but are not limited to "pomelo", "oil stain", etc. The error correction results corresponding to the error correction string "youzou" may include but are not limited to "walk around", "go again", etc.
[0043] Step 104, display one or more of the target error correction results.
[0044] In this embodiment, after the above-mentioned execution entity selects the target error correction result from the error correction result set, one or more of the target error correction results can be displayed.
[0045] As an example, the target error correction result with the highest score can be selected for display by calculating the score of the target error correction result, or a preset number (such as 3 or 5, etc.) of target error correction results can be selected for display in descending order of scores.
[0046] As another example, one or more items may be randomly selected from the target error correction results for display.
[0047] In some optional implementations of this embodiment, the execution subject may select one or more of the target error correction results for display according to the following steps: first, the input string after backspacing is used as the target input string, and the input candidate corresponding to the target input string is obtained. Then, one or more of the target error correction results may be used as error correction candidates; finally, the error correction candidates and the input candidates are displayed. Thus, the candidates obtained after backspacing may include error correction candidates and normal input candidates, thereby providing users with more candidates, which helps to further improve input efficiency.
[0048] In some optional implementations of this embodiment, the execution subject may select one or more of the target error correction results for display according to the following steps:
[0049] The first step is to determine the score of each target error correction result based on the word frequency of each target error correction result.
[0050] Here, the correspondence between word frequency and score can be preset. After the word frequency of each target error correction result is obtained, the score corresponding to the word frequency of each target error correction result can be queried through the correspondence. Thus, the queried score can be used as the score of the target error correction result.
[0051] It should be noted that the word frequency of each target error correction result can be queried by sending a request to the server, or by collecting statistics on the user's historical input data, which is not limited here.
[0052] The second step is to obtain the score of the error correction string corresponding to each target error correction result.
[0053] Here, each target error correction result has a corresponding error correction string. The error correction string corresponding to each target error correction result can be a coded string corresponding to the target error correction result. For example, the error correction string corresponding to "youzi" and "oil stains" is "youzi"; the error correction string corresponding to "wandering" and "walking again" is "youzou".
[0054] Here, the score of the error correction string can be determined in a variety of ways. As an example, it can be pre-set according to the error correction method. For example, if the error correction method is to insert a certain character before the backspace character, the score of the error correction string can be 0.8; if the error correction method is to replace the backspace character, the score of the error correction string can be 0.6. As another example, the score of the error correction string can also be determined based on the historical frequency of the error correction string. For example, a correspondence table between historical frequency and score is set, and based on the correspondence table, the score of each error correction string is determined.
[0055] The third step is to determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result.
[0056] In practice, for each target error correction result, the score of the target error correction result and the score of the error correction string corresponding to the target error correction result may be summed or averaged to calculate the final score of the target error correction result.
[0057] Optionally, the final score can also be determined by weighting. Specifically, the weight of the score of the target error correction result (such as 0.3) and the weight of the score of the error correction string (such as 0.7) can be first obtained; then, based on the obtained weights, the scores of each target error correction result and the scores of the error correction strings corresponding to each target error correction result are weighted, and the weighted result is used as the final score.
[0058] Step 4: Select one or more target error correction results for display according to the final score. For example, select one or more target error correction results for display in descending order of scores.
[0059] The method provided by the above-mentioned embodiment of the present application performs error correction processing on the input string during the input process to obtain an error correction result set, so that when a backspace instruction is received, the characters in the above-mentioned input string are backspaced; then, based on the input string and the backspaced characters, a target error correction result is selected from the above-mentioned error correction result set; and finally, one or more of the above-mentioned target error correction results are displayed. Since when a user triggers a backspace instruction, it usually means that the user has entered an incorrect character, therefore, when the user triggers a backspace instruction, a backspace operation is performed and a target error correction result is selected and displayed for the backspaced characters, so that the required error correction result can be actively provided to the user, thereby realizing dynamic error correction during the input process and improving the user's input efficiency.
[0060] Further references Figure 2 , which shows a process 200 of another embodiment of a dynamic error correction method. The process 200 of the dynamic error correction method includes the following steps:
[0061] Step 201, performing error correction processing on the input string during the input process to obtain an error correction result set.
[0062] Step 202: When a backspace instruction is received, backspace the characters in the input string.
[0063] In this embodiment, steps 201 to 202 can be seen in Figure 1 Steps 101 and 102 in the corresponding embodiment will not be described in detail here.
[0064] Step 203: Based on the input string and the backspace character, obtain at least one error correction string corresponding to the input string.
[0065] In this embodiment, the execution subject may obtain at least one error correction string corresponding to the input string based on the input string and the backspace character. Here, the error correction string may be a string obtained after error correction of the backspace character in the input string.
[0066] Optionally, the backspace character can be regarded as an error character, and the error character in the input string can be replaced with other characters to obtain a first error correction string corresponding to the input string. For example, for the input string "youzu", when the backspace character is "u", the backspace character can be replaced, such as "i", to obtain the error correction string "youzi".
[0067] Optionally, other characters may be inserted before the above erroneous character to obtain a second error correction string corresponding to the above input string. For example, for the input string "youzu", when the backspace character is "u", the character "o" is inserted before the backspace character "u" to obtain the error correction string "youzou".
[0068] It should be noted that the embodiments of the present application can also perform other methods of error correction based on the backspace characters, which will not be described in detail here.
[0069] Step 204: Select the error correction result corresponding to each error correction string from the error correction result set as the target error correction result.
[0070] In this embodiment, the above-mentioned execution subject can select the error correction results corresponding to each error correction string from the error correction result set as the target error correction result. Here, for each error correction string, the error correction result corresponding to the error correction string can be the entry search result obtained after the error correction string is used to search for the entry. For example, the error correction result corresponding to the error correction string "youzi" can include but is not limited to "youzi", "oil stains", etc. The error correction result corresponding to the error correction string "youzou" can include but is not limited to "wandering", "walking again", etc.
[0071] Step 205: Determine the score of each target error correction result based on the word frequency of each target error correction result.
[0072] In this embodiment, the correspondence between word frequency and score can be preset. After the word frequency of each target error correction result is obtained, the score corresponding to the word frequency of each target error correction result can be queried through the correspondence. Thus, the queried score can be used as the score of the target error correction result.
[0073] It should be noted that the word frequency of each target error correction result can be queried by sending a request to the server, or by collecting statistics on the user's historical input data, which is not limited here.
[0074] Step 206, obtaining the score of the error correction string corresponding to each target error correction result.
[0075] In this embodiment, the execution subject can obtain the score of the error correction string corresponding to each target error correction result. Here, each target error correction result has a corresponding error correction string. The error correction string corresponding to each target error correction result can be an encoded string corresponding to the target error correction result. For example, the error correction string corresponding to "youzi" and "oil stains" is "youzi"; the error correction string corresponding to "wandering" and "walking again" is "youzou".
[0076] Here, the score of the error correction string can be determined in a variety of ways. As an example, it can be pre-set according to the error correction method. For example, if the error correction method is to insert a certain character before the backspace character, the score of the error correction string can be 0.8; if the error correction method is to replace the backspace character, the score of the error correction string can be 0.6. As another example, the score of the error correction string can also be determined based on the historical frequency of the error correction string. For example, a correspondence table between historical frequency and score is set, and based on the correspondence table, the score of each error correction string is determined.
[0077] Step 207: Determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result.
[0078] In this embodiment, the execution subject may determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result. In practice, for each target error correction result, the score of the target error correction result and the score of the error correction string corresponding to the target error correction result may be summed, averaged, etc. to calculate the final score of the target error correction result.
[0079] Optionally, the final score can also be determined by weighting. Specifically, the weight of the score of the target error correction result (such as 0.3) and the weight of the score of the error correction string (such as 0.7) can be first obtained; then, based on the obtained weights, the scores of each target error correction result and the scores of the error correction strings corresponding to each target error correction result are weighted, and the weighted result is used as the final score.
[0080] Step 208, according to the final score, select one or more target error correction results for display.
[0081] In this embodiment, the execution subject may select one or more target error correction results for display according to the final score. For example, one or more target error correction results may be selected for display in descending order of scores. In practice, the higher the final score of the target error correction result, the greater the probability of the target error correction result being displayed on the screen.
[0082] from Figure 2 It can be seen that Figure 1 Compared with the corresponding embodiment, the process 200 of the dynamic error correction method in this embodiment involves the step of selecting one or more of the target error correction results for display based on the scores of each target error correction result and the scores of the error correction strings corresponding to each target error correction result. Therefore, when the user triggers the backspace instruction, the backspace operation is performed and the target error correction result with a higher probability of being on the screen is selected and displayed for the backspace-based character, further improving the user's input efficiency.
[0083] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a dynamic error correction device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0084] like Figure 3 As shown, the dynamic error correction device 300 described in this embodiment includes: an error correction unit 301, configured to perform error correction processing on the input string in the input process to obtain an error correction result set; a backspace unit 302, configured to backspace the characters in the above input string when a backspace instruction is received; a selection unit 303, configured to select a target error correction result from the above error correction result set based on the input string and the backspaced characters; and a display unit 304, configured to display one or more of the above target error correction results.
[0085] In some optional implementations of this embodiment, the selection unit 303 is further configured to: obtain at least one error correction string corresponding to the input string based on the backspace character; and select the error correction result corresponding to each error correction string from the error correction result set as the target error correction result.
[0086] In some optional implementations of this embodiment, the selection unit 303 is further configured to: treat the backspace character as an error character, replace the error character in the input string with other characters, and obtain a first error correction string corresponding to the input string; insert other characters before the error character to obtain a second error correction string corresponding to the input string.
[0087] In some optional implementations of the present embodiment, the display unit 304 is further configured to: determine the score of each target error correction result based on the word frequency of each target error correction result; obtain the score of the error correction string corresponding to each target error correction result; determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result; and select one or more target error correction results for display according to the final score.
[0088] In some optional implementations of this embodiment, the above-mentioned display unit 304 is further configured to: obtain the weight of the score of the target error correction result and the weight of the score of the error correction string; based on the obtained weight, weight the score of each target error correction result and the score of the error correction string corresponding to each target error correction result, and use the weighted result as the final score.
[0089] In some optional implementations of this embodiment, the above-mentioned display unit 304 is further configured to: take the input string after backspace as the target input string, and obtain input candidate items corresponding to the above-mentioned target input string; take one or more of the above-mentioned target error correction results as error correction candidate items; and display the above-mentioned error correction candidate items and the above-mentioned input candidate items.
[0090] In some optional implementations of the present embodiment, the error correction unit 301 is further configured to: during the input process, when the input string meets the preset error correction condition for the first time, the error correction result obtained after the first error correction processing on the input string is summarized into an error correction result set; when the input string meets the above error correction condition again, the input string is error corrected again, and the error correction result in the above error correction result set is replaced by the error correction result obtained after the second error correction processing.
[0091] The device provided by the above-mentioned embodiment of the present application performs error correction processing on the input string during the input process to obtain an error correction result set, so that when a backspace instruction is received, the characters in the above-mentioned input string are backspaced; then based on the input string and the backspaced characters, a target error correction result is selected from the above-mentioned error correction result set; and finally, one or more of the above-mentioned target error correction results are displayed. Since when a user triggers a backspace instruction, it usually means that the user has entered an incorrect character, therefore, when the user triggers a backspace instruction, a backspace operation is performed and a target error correction result is selected and displayed for the backspaced characters, which can actively provide the user with the required error correction result, realize dynamic error correction during the input process, and improve the user's input efficiency.
[0092] Figure 44 is a block diagram of an input device 400 according to an exemplary embodiment, and the device 400 may be a smart terminal or a server. For example, the device 400 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.
[0093] Reference Figure 4 , the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0094] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-described method. In addition, the processing component 402 may include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
[0095] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 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.
[0096] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.
[0097] The multimedia component 408 includes a screen that provides an output interface between the above-mentioned device 400 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 can 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 above-mentioned touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the above-mentioned touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0098] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 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 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0099] I / O interface 412 provides an interface between processing component 402 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.
[0100] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of the components, such as the display and keypad of the device 400, the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400 and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 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 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0101] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 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 416 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 416 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.
[0102] In an exemplary embodiment, the apparatus 400 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 method.
[0103] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 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.
[0104] Figure 5 5 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the server 500.
[0105] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0106] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (smart terminal or server), enables the device to execute a dynamic error correction method, the method comprising: performing error correction processing on an input string during an input process to obtain an error correction result set; when a backspace instruction is received, backspacing the characters in the input string; based on the input string and the backspaced characters, selecting a target error correction result from the error correction result set; and displaying one or more of the target error correction results.
[0107] Optionally, selecting a target error correction result from the error correction result set based on the input string and the backspace character includes: obtaining at least one error correction string corresponding to the input string based on the backspace character; and selecting the error correction result corresponding to each error correction string from the error correction result set as the target error correction result.
[0108] Optionally, obtaining at least one error correction string corresponding to the input string based on the backspace character includes: taking the backspace character as an error character, replacing the error character in the input string with other characters, and obtaining a first error correction string corresponding to the input string; inserting other characters before the error character to obtain a second error correction string corresponding to the input string.
[0109] Optionally, displaying one or more of the target error correction results includes: determining the score of each target error correction result based on the word frequency of each target error correction result; obtaining the score of the error correction string corresponding to each target error correction result; determining the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result; and selecting one or more target error correction results for display according to the final score.
[0110] Optionally, determining the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result includes: obtaining the weight of the score of the target error correction result and the weight of the score of the error correction string; based on the obtained weight, weighting the score of each target error correction result and the score of the error correction string corresponding to each target error correction result, and using the weighted result as the final score.
[0111] Optionally, displaying one or more of the target error correction results includes: taking the input string after backspace as the target input string, and obtaining input candidate items corresponding to the target input string; taking one or more of the target error correction results as error correction candidate items; and displaying the error correction candidate items and the input candidate items.
[0112] Optionally, the error correction processing is performed on the input string during the input process to obtain an error correction result set, including: during the input process, when the input string meets a preset error correction condition for the first time, the error correction result obtained after the first error correction processing on the input string is summarized into the error correction result set; when the input string meets the error correction condition again, the error correction processing is performed on the input string again, and the error correction result in the error correction result set is replaced by the error correction result obtained after the second error correction processing.
[0113] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0114] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0115] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0116] The above is a detailed introduction to a dynamic error correction method, device and a device for dynamic error correction provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A dynamic error correction method, characterized in that: The method comprises: Perform error correction processing on the input string during the input process to obtain an error correction result set; When a backspace instruction is received, backspace the characters in the input string; Selecting a target error correction result from the error correction result set based on the input string and the backspace character; Display one or more of the target error correction results; The display of one or more of the target error correction results includes: Determine the score of each target error correction result based on the word frequency of each target error correction result; Obtain the score of the error correction string corresponding to each target error correction result; Determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result; According to the final score, select one or more target error correction results for display; The error correction process is performed on the input string in the input process to obtain an error correction result set, including: During the input process, when the input string meets the preset error correction condition for the first time, the error correction result obtained after the first error correction processing of the input string is summarized into the error correction result set; When the input string meets the error correction condition again, error correction processing is performed on the input string again, and the error correction result in the error correction result set is replaced by the error correction result obtained after the second error correction processing.
2. The method according to claim 1, characterized in that The step of selecting a target error correction result from the error correction result set based on the input string and the backspace character includes: Based on the backspace character, obtaining at least one error correction string corresponding to the input string; From the error correction result set, the error correction result corresponding to each error correction string is selected as the target error correction result.
3. The method according to claim 2, characterized in that The step of obtaining at least one error correction string corresponding to the input string based on the backspace character includes: Taking the backspace character as an error character, replacing the error character in the input string with other characters, and obtaining a first error correction string corresponding to the input string; Other characters are inserted before the erroneous character to obtain a second error correction string corresponding to the input string.
4. The method according to claim 1, characterized in that: The step of determining a final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result includes: Obtaining the weight of the score of the target error correction result and the weight of the score of the error correction string; Based on the obtained weights, the scores of each target error correction result and the scores of the error correction strings corresponding to each target error correction result are weighted, and the weighted result is used as the final score.
5. The method according to claim 1, characterized in that The presenting of one or more of the target error correction results includes: Taking the input string after backspacing as the target input string, obtaining the input candidate items corresponding to the target input string; Taking one or more of the target error correction results as error correction candidates; The error correction candidates and the input candidates are presented.
6. A dynamic error correction device, characterized in that: The device comprises: An error correction unit is configured to perform error correction processing on an input string during an input process to obtain an error correction result set; A backspace unit, configured to backspace characters in the input string when a backspace instruction is received; A selection unit configured to select a target error correction result from the error correction result set based on the input string and the backspace character; A display unit, configured to display one or more of the target error correction results; Wherein, the display unit is further configured to: Determine the score of each target error correction result based on the word frequency of each target error correction result; Obtain the score of the error correction string corresponding to each target error correction result; Determine the final score of each target error correction result based on the score of each target error correction result and the score of the error correction string corresponding to each target error correction result; According to the final score, select one or more target error correction results for display; The error correction unit is further configured to: During the input process, when the input string meets the preset error correction condition for the first time, the error correction result obtained after the first error correction processing of the input string is summarized into the error correction result set; When the input string meets the error correction condition again, error correction processing is performed on the input string again, and the error correction result in the error correction result set is replaced by the error correction result obtained after the second error correction processing.
7. The device according to claim 6, characterized in that The selection unit is further configured to: Based on the backspace character, obtaining at least one error correction string corresponding to the input string; From the error correction result set, the error correction result corresponding to each error correction string is selected as the target error correction result.
8. The device according to claim 7, characterized in that The selection unit is further configured to: Taking the backspace character as an error character, replacing the error character in the input string with other characters, and obtaining a first error correction string corresponding to the input string; Other characters are inserted before the erroneous character to obtain a second error correction string corresponding to the input string.
9. The device according to claim 6, characterized in that The presentation unit is further configured to: Obtaining the weight of the score of the target error correction result and the weight of the score of the error correction string; Based on the obtained weights, the scores of each target error correction result and the scores of the error correction strings corresponding to each target error correction result are weighted, and the weighted result is used as the final score.
10. The device according to claim 6, characterized in that The presentation unit is further configured to: Taking the input string after backspacing as the target input string, obtaining the input candidate items corresponding to the target input string; Taking one or more of the target error correction results as error correction candidates; The error correction candidates and the input candidates are presented.
11. A device for dynamic error correction, characterized in that: The device 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 to perform the method according to any one of claims 1 to 5.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Inputting method, device and device for inputting
CN107688399A
