Error correction data pair construction method, input recommendation method and related devices and equipment
By detecting deletion and word selection operations during the user's input process, error correction data pairs are constructed, which solves the problem of inaccurate recommendation of incorrectly entered characters in existing input methods, improves the accuracy and security of input recommendations, and improves user experience. experience.
Patent Information
- Application Number
- CN202410779824.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-18
AI Technical Summary
When users input characters incorrectly with existing input methods, the versatility of the recommended text results in poor practicality of input recommendations, making it difficult to meet the word selection expectations of different users.
By detecting deletion operations and word selection operations during user input, we build error correction data pairs, generate target input text, and improve the accuracy and security of input recommendations based on personalized input habits.
It improves the accuracy and practicality of input recommendations, realizes localized storage of error correction data pairs, and improves security and user experience.
Smart Images

Figure CN118798174A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of input methods, and in particular to a method for constructing error correction data pairs and an input recommendation method and related devices and equipment. Background Art
[0002] Currently, users can implement text input based on related software such as input methods in electronic devices. The basic function of input methods is to convert keyboard input codes into text or symbols to facilitate user interaction with electronic terminal devices.
[0003] In the prior art, when users input text using electronic terminal devices, various errors often occur, such as wrong input or missing characters. In order to solve the above problems, a text recommendation model is usually trained based on a large amount of sample data, built into the input method or deployed in the cloud, so that the text recommendation model can provide users with several entries with syllables similar to the current character as recommended texts. However, due to the universality of text recommendation, the recommended text generated in the scenario where the user inputs the wrong character is difficult to meet the word selection expectations of different users, resulting in poor practicality of input recommendation. In view of this, how to improve the practicality of input recommendation for the target object has become an urgent problem to be solved. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a method for constructing error correction data pairs and an input recommendation method and related devices and equipment, which can improve the practicality of input recommendation for target objects.
[0005] In order to solve the above-mentioned technical problems, the first aspect of the present application provides a method for constructing an error correction data pair, including detecting a first key operation representing back deletion during the input process of a target object, detecting subsequent key operations of the first key operation, until a second key operation representing word selection is detected; wherein the previous key operation of the second key operation is a character typing operation; based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, a target character string representing the error to be corrected is obtained, and based on the second key operation, a target input text of the target character string is obtained; at least based on the target character string and its target input text, an error correction data pair for input recommendation for the target object is constructed.
[0006] In order to solve the above technical problems, the second aspect of the present application provides an input recommendation method, including obtaining a character string to be matched based on a character typing operation continuously triggered by a target object, and obtaining an error correction database of the target object; wherein the error correction database stores a number of error correction data pairs, the error correction data pairs at least include a target character string to be corrected and its target input text, and the error correction data pairs are obtained by the error correction data pair construction method described in the first aspect above; based on the error correction database, a target recommended text for the character string to be matched is generated.
[0007] In order to solve the above-mentioned technical problems, the third aspect of the present application provides a device for constructing an error correction data pair, including a detection module, an acquisition module and a construction module. The detection module is used to detect subsequent key operations of the first key operation based on a first key operation representing back deletion detected during the input process of a target object, until a second key operation representing word selection is detected; wherein the previous key operation of the second key operation is a character typing operation; the acquisition module is used to obtain a target character string representing a target error correction based on a character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, and obtain a target input text of the target character string based on the second key operation; the construction module is used to construct an error correction data pair for input recommendation for the target object based at least on the target character string and its target input text.
[0008] In order to solve the above-mentioned technical problems, the fourth aspect of the present application provides an input recommendation device, including a trigger module and a generation module, wherein the trigger module is used to obtain a character string to be matched based on the character typing operation continuously triggered by the target object, and obtain an error correction database of the target object; wherein the error correction database stores a number of error correction data pairs, the error correction data pairs at least include the target character string to be corrected and its target input text, and the error correction data pairs are obtained by the error correction data pair construction method described in the first aspect above; the generation module is used to generate a target recommended text for the character string to be matched based on the error correction database.
[0009] In order to solve the above-mentioned technical problems, the fifth aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, the memory storing program instructions, and the processor being used to execute the program instructions to implement the error correction data pair construction method described in the first aspect above, or to implement the input recommendation method described in the second aspect above.
[0010] In order to solve the above technical problems, the sixth aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the error correction data pair construction method described in the first aspect above, or to implement the input recommendation method described in the second aspect above.
[0011] The above scheme continuously detects the key operations of the target object during the target object input process, and based on the first key operation representing back deletion detected during the target object input process, detects the subsequent key operations of the first key operation until the second key operation representing word selection is detected, and the previous key operation of the second key operation is a character typing operation, based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, obtains the target character string representing the error correction, and based on the second key operation, obtains the target input text of the target character string, and at least based on the target character string and its target input text, constructs a correction data pair for input recommendation for the target object. Therefore, the first key operation and the second key operation are used as trigger conditions to continuously detect the input process of the target object. When the first key operation is detected, the representation object deletes the typed characters or selected text, that is, the target object inputs incorrect character data before the first key operation. Based on the character typing operations that are continuously triggered before the first key operation and are closest to the first key operation, a target character string to be corrected is obtained, and the text selected in the second key operation is used as the target input text of the target character string, that is, when the target object enters the target character string, what is expected to be obtained is the target input text. Therefore, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object in the input process. Different target objects construct corresponding error correction data pairs based on corresponding input habits, so the accuracy of input recommendations for target objects based on error correction data pairs can be improved. Moreover, since the construction of error correction data pairs is independent, error correction data pairs can realize localization of data storage and improve security, so the practicality of input recommendations for target objects can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flowchart of an embodiment of a method for constructing error correction data pairs of the present application;
[0013] Figure 2 It is a flowchart of an embodiment of a method for inputting recommendations of the present application;
[0014] Figure 3 It is a schematic diagram of the framework of an embodiment of an error correction data pair construction device of the present application;
[0015] Figure 4 It is a schematic diagram of a framework of an embodiment of an input recommendation device of the present application;
[0016] Figure 5 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0017] Figure 6 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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.
[0019] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0020] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0021] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the error correction data pair construction method of the present application. Specifically, it may include the following steps:
[0022] Step S10: Based on the first key operation representing back-deletion detected during the target object input process, the subsequent key operations of the first key operation are detected until the second key operation representing word selection is detected.
[0023] In the embodiments of the present disclosure, the input process of the target object at least includes a character typing operation and a key control operation. The key control operation at least includes a first key operation representing backspace and a second key operation representing word selection. For example, the operation data during the input process of the target object is "nihoa--ao(choose)", where "-" represents the backspace operation, "(choose)" represents the word selection operation, and there is corresponding selected text, such as "你好", "nihoa", and "ao" are all character typing operations.
[0024] It should be noted that the corresponding language of the character typing operation is not limited in this application, such as Chinese, English, etc. Specifically, when the corresponding language of the character typing operation is Chinese, it can be understood that the character data typed represents Chinese pinyin; the control key triggering the key control operation is not limited in this application. For example, in a specific mode, the triggering of the "enter key" and the "space key" can both be considered as triggering the second key operation.
[0025] In an implementation scenario, the previous key operation of the second key operation is a character typing operation. For example, the operation data during the input process of the target object is "nihoa-(choose1)-hao(choose2)". Specifically, "-" represents the backspace operation, "(choose1)" represents the first word selection operation, and the selected text corresponding to the first word selection operation is "你后", "(choose2)" represents the second word selection operation, and the selected text corresponding to the second word selection operation is "好". It can be understood that in the above specific embodiment, the second word selection operation is the second key operation.
[0026] In an implementation scenario, taking the first key operation and the second key operation as trigger conditions, the input process of the target object is continuously detected. When the first key operation is detected, it represents that the object deletes the typed characters or the selected text, that is, the target object entered incorrect character data before the first key operation. Thus, error correction data pairs for input recommendation for the target object are constructed, referring to the personalized input habits during the input process of the target object. Each different target object constructs corresponding error correction data pairs based on the corresponding input habits. Therefore, the accuracy of input recommendation for the target object based on the error correction data pairs can be improved. And because the construction of the error correction data pairs is independent, the error correction data pairs can achieve local data storage, improving security. Therefore, the practicality of input recommendation for the target object can be improved.
[0027] In one implementation scenario, based on the first key operation representing back deletion detected during the input process of the target object, before detecting the subsequent key operations of the first key operation, the keyboard mode used by the target object is detected. For example, the target object types Chinese pinyin characters, and the typing of Chinese pinyin characters can be implemented based on the common "9-key input method" and "26-key input method". It can be understood that the character input operation of the "26-key input method" can directly obtain the corresponding character data, such as "nihoa", while the character typing operation of the "9-key input method" is based on the triggered numeric keys, such as "64462". Under different keyboard modes, the target character string is recorded differently. Taking into account that the same target object has different input habits for different keyboard modes, based on the results of different keyboard mode detections, character typing operations corresponding to the data recording method are generated to construct different error correction data pairs, which can further construct personalized error correction data pairs based on the input habits of the target object, thereby improving the practicality of input recommendations for the target object.
[0028] In a specific implementation scenario, before detecting the keyboard mode used by the target object, the character input method can also be detected, such as voice input, Wubi input, handwriting input, etc. When it is detected that the current input method is not character input, the construction method flow of the error correction data pair is not enabled. Therefore, the practicality of input recommendation for the target object can be further improved.
[0029] In one implementation scenario, the character typing operations and key operations generated during the target object input process can be temporarily cached locally. For example, temporary caching can be achieved using several data storage blocks, and the number of data storage blocks is not less than 4. Each data storage block can be used to store continuously triggered character typing operations or continuously triggered key operations, and the storage order is consistent with the operation triggering order, satisfying the first-in-first-out execution principle.
[0030] In a specific implementation scenario, the operation types of the target object operating on data include character typing operations and key operations. Four data storage blocks are set, including data storage block A, data storage block B, data storage block C, and data storage block D that are sequentially connected. The latest generated operation data is stored in data storage block D. When the operation type of the latest generated operation data is inconsistent with that of the operation data previously stored in data storage block D, the continuous character typing operations or continuous key operations already stored in data storage block D are stored in data storage block C, and the latest generated operation data is stored in data storage block D. Correspondingly, the operation data stored in other data storage blocks follows the principle of first in, first out, reducing the storage pressure of local data temporary caching. It can be understood that when the operation data of the target object meets the scenario of constructing an error correction data pair, data storage block A stores continuous character typing operations, data storage block B stores continuous key operations, and at least includes a first key operation representing backspacing, data storage block C stores continuous character typing operations, and data storage block D stores continuous key operations, and is a second key operation representing word selection. In the above solution, the stored content in the data storage block is updated in a sliding window form, and the data is cleared as it is used, reducing the storage pressure of local data temporary caching.
[0031] Step S20: Based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, obtain the target string representing the error to be corrected, and based on the second key operation, obtain the target input text of the target string.
[0032] In an implementation scenario, based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, obtain the target string representing the error to be corrected, and use the selected text in the second key operation as the target input text of the target string. That is, when the target object is inputting the target string, what is expected to be obtained is the target input text. Therefore, the error correction data pair constructed based on the target string and its target input text refers to the personalized input habits during the input process of the target object. Each different target object constructs a corresponding error correction data pair based on the corresponding input habits. Therefore, the accuracy of input recommendation for the target object based on the error correction data pair can be improved. And because the construction of the error correction data pair is independent, the error correction data pair can achieve local data storage, improving security. Therefore, the practicality of input recommendation for the target object can be improved.
[0033] In a specific implementation scenario, as in the previous embodiment, the operation data during the input process of the target object is "nihoa--ao(choose)", the selected text corresponding to "(choose)" is "你好" (Hello in Chinese), that is, the target string representing the error to be corrected is "nihoa", and the target input text of the target string is "你好" (Hello in Chinese).
[0034] Step S30: constructing an error correction data pair for input recommendation for the target object based at least on the target character string and its target input text.
[0035] In an implementation scenario, the error correction data pairs constructed based on the target character string and its target input text refer to the personalized input habits of the target object during the input process. Each different target object constructs a corresponding error correction data pair based on the corresponding input habits, thereby improving the accuracy of input recommendations for the target object based on the error correction data pairs. Moreover, since the construction of the error correction data pairs is independent, the error correction data pairs can realize localized data storage and improve security, thereby improving the practicality of input recommendations for the target object.
[0036] In an implementation scenario, before constructing an error correction data pair for input recommendation for a target object based on a target character string and its target input text, first character data is obtained based on a character typing operation that is continuously triggered before a first key operation and is closest to the first key operation, and second character data is obtained based on a character typing operation that is continuously triggered before a second key operation and is closest to the second key operation. For example, the operation data in the input process of the target object is "nihoa--ao (choose)", "nihoa" is the first character data, and "ao" is the second character data. The first character length of the first character data is obtained, and the second character length of the second character data is obtained, that is, the first character length is 5 and the second character length is 2. Detection is performed based on the first character length and the second character length respectively. When the first character length and the second character length both meet the preset requirements, an error correction data pair for the target object is constructed based on the target character string and the target input text. The above scheme can reduce the probability of sporadic occurrence of the first character string data and the second character data, so it can improve the practicality of input recommendation for the target object.
[0037] In a specific implementation scenario, it is detected whether the length of the first character meets the first length preset condition, and it is detected whether the length of the second character meets the second length preset condition. The first length preset condition is that the first character length is not less than the first minimum length threshold and the first character length is not greater than the first maximum length threshold, and the second length preset condition is that the second character length is not less than the second minimum length threshold and the second character length is not greater than the second maximum length threshold. It should be noted that the first length preset condition and the second length preset condition are not limited in the present application. In some implementation scenarios, the first length preset condition is the same as the second length preset condition, and in other implementation scenarios, the first length preset condition is different from the second length preset condition. The above scheme filters the first character data and the second character data based on the upper limit of the character length and the lower limit of the character length, and avoids the probability of sporadic occurrence of the first character string data and the second character data as much as possible, so it can improve the practicality of input recommendation for the target object.
[0038] In a specific implementation scenario, when the length of the first character does not meet the first length preset condition, and / or the length of the second character does not meet the second length preset condition, the steps of detecting the subsequent key operations of the first key operation and the subsequent steps based on detecting the first key operation representing the back deletion during the target object input process are re-executed, that is, the step of constructing the error correction data pair is not executed for the currently detected operation data, thereby reducing the data storage pressure of the error correction data pair.
[0039] In an implementation scenario, before constructing error correction data pairs for input recommendation for a target object based at least on a target string and its target input text, first syllable information is obtained based on the target string to be corrected, and second syllable information is obtained based at least on the target input text of the target string. For example, the operation data during the input process of the target object is "nihoa--ao(choose)", the selected text corresponding to "(choose)" is "你好", the first syllable information is "nihoa", and the second syllable information is "nihao". Another example, the operation data during the input process of the target object is "64462--26(choose)", the selected text corresponding to "(choose)" is "你好", the first syllable information is "64462", and the second syllable information is "64426". That is to say, in different keyboard input modes, the formats of syllable information are different. Another example, the operation data during the input process of the target object is "nihoa(choose1)-hao(choose2)". Specifically, the selected text corresponding to "(choose1)" is "你后", and the selected text corresponding to "(choose2)" is "好". Therefore, the target input text of the target string is "你" "好", the first syllable information is "nihoa", and the second syllable information is "nihao". Please refer to Table 1 below for reference:
[0040]
[0041] Table 1
[0042] Based on the first syllable information and the second syllable information, an edit distance representing the syllable difference degree between the target string and the target input text is obtained. The edit distance measures this difference by calculating the minimum number of edit operations required to convert one string into another. For example, between "nihoa" and "nihao", the character exchange operation can be used, so the edit distance is 1. Based on the size relationship between the edit distance and the edit threshold, it is determined whether to construct error correction data pairs based on the current operation data. The above solution can尽可能 avoid the accidental probability of the first string data and the second character data, so it can improve the practicality of input recommendation for the target object.
[0043] In a specific implementation scenario, when the edit distance is greater than the edit threshold, the steps of detecting the first key operation representing backspace during the input process of the target object and detecting the subsequent key operations of the first key operation are re-executed, as well as the subsequent steps.
[0044] In another specific implementation scenario, when the edit distance is not greater than the edit threshold, error correction data pairs for input recommendation for the target object are constructed based on the target string and its target input text.
[0045] In a specific implementation scenario, the edit distance is related to the editing operation required to convert the first syllable information into the second syllable information. The editing operations include insertion, deletion, and exchange. After obtaining the first syllable information and the second syllable information, the required editing operation is obtained, and the editing threshold is determined based on the editing operation. When the edit distance is greater than the editing threshold, it indicates that the difference between the first syllable information and the second syllable information is too large, that is, the probability of the same operation data appearing again is small, and it cannot reflect the input habits of the target object. Therefore, the probability of the first character string data and the second character data appearing occasionally can be reduced, thereby improving the practicality of input recommendations for the target object.
[0046] In one implementation scenario, after constructing an error correction data pair for input recommendation for the target object based on the target character string and its target input text, the constructed error correction data pair is stored in an error correction database. Since the construction of the error correction data pair is independent, the error correction data pair can realize localization of data storage, that is, the error correction database is stored locally, and then the whole process of detecting the error correction data pair, storing the error correction data pair, and subsequently using the error correction data pair for input recommendation is realized on the local device of the target object, which helps to improve security and thus improve the practicality of input recommendation for the target object. Of course, if the target object authorizes and allows, the error correction data pair can also be shared between different devices of the target object, such as cloud sharing, etc., which is not limited here.
[0047] In a specific implementation scenario, the error correction data pairs in the error correction database are annotated with attribute information, and the attribute information includes at least one of storage frequency, storage sequence, and display position. The display position represents the position of the target input text recommended for input to the target object based on the error correction data pairs on the display page.
[0048] In a specific implementation scenario, when the attribute information is the storage frequency, based on the historical error correction data pairs that are consistent with the error correction data pairs in the error correction database, the statistical frequency of the historical error correction data pairs is obtained, and based on the statistical frequency, the storage frequency of the error correction data pairs is updated. For example, the historical error correction data pair of "(nihoa)(hello)" is constructed three times, and the currently stored error correction data pair is also "(nihoa)(hello)", then the storage frequency in the attribute information of the error correction data pair "(nihoa)(hello)" stored this time is 4. In order to save storage space, consistent error correction data pairs can be merged to reduce storage pressure.
[0049] In a specific implementation scenario, when the attribute information is a storage timing, the storage timing of the error correction data pair is updated based on the storage timing of the historical error correction data pair stored in the error correction database at the most recent moment before the error correction data pair. For example, the storage timing of the first error correction data pair stored in the error correction database is 1, that is, the initial storage timing is 1, and each time a new error correction data pair is added, the storage timing in the attribute information of the latest error correction data pair is increased by one.
[0050] In another specific implementation scenario, in order to characterize the storage order of the error correction data pair, a timestamp may be used instead of the storage sequence in the attribute information, that is, the storage time of the error correction data pair is used as the storage sequence in the attribute information.
[0051] In a specific implementation scenario, when the attribute information is storage frequency and display position, the display position is directly proportional to the storage frequency. For example, the error correction database stores "(nihoa)(Hello)" and "(nihoa)(Hello)". The storage frequency in the "(nihoa)(Hello)" attribute information is 5, and the storage frequency in the "(nihoa)(Hello)" attribute information is 1. Then the display position in the "(nihoa)(Hello)" attribute information is 3, and the display position in the "(nihoa)(Hello)" attribute information is 5. That is, when the object enters "nihoa", "Hello" is displayed at position 3, which is relatively front of the display page, and "Hello" is displayed at position 5, which is relatively back of the display page.
[0052] In a specific implementation scenario, when the attribute information is a storage sequence and a display position, the display position is proportional to the storage sequence, that is, the closer the error correction data pair stored at the current moment is to the front of the display position. For example, in the aforementioned embodiment, the storage sequence in the "(nihoa)(Hello)" attribute information is 99, and the storage frequency in the "(nihoa)(Hello)" attribute information is 15, then the display position in the "(nihoa)(Hello)" attribute information is 3, and the display position in the "(nihoa)(Hello)" attribute information is 5, that is, when the object enters "nihoa", "Hello" is displayed at position 3, which is relatively forward on the display page, and "Hello" is displayed at position 5, which is relatively backward on the display page.
[0053] In a specific implementation scenario, when the attribute information includes storage frequency, storage sequence and display position, a first weight and a second weight are obtained, the first weight represents the importance of the storage frequency to the display position, the second weight represents the importance of the storage sequence to the display position, a first score is obtained based on the first weight and the storage frequency of the error correction data pair, and a second score is obtained based on the second weight and the storage sequence of the error correction data pair, and the display position is determined based on the sum of the first score and the second score, and the sum is proportional to the display position. The above scheme determines the display position in the attribute information based on the storage frequency and storage sequence in the attribute information, so it can improve the practicality of input recommendation for the target object. Please refer to the following Table 2:
[0054]
[0055] Table 2
[0056] In one implementation scenario, when the storage frequency of a certain error correction data pair in the attribute information reaches an upper threshold, for example, the upper threshold is 50, the storage frequency of all error correction data pairs in the attribute information in the error correction database is compressed in a unified character format to reduce the storage pressure of the error correction database.
[0057] In one implementation scenario, when the storage timing in the attribute information of a certain error correction data pair reaches an upper limit threshold, for example, the upper limit threshold is 999, the storage timing in the attribute information of all error correction data pairs in the error correction database is compressed in a unified character format to reduce the storage pressure of the error correction database.
[0058] The above scheme continuously detects the key operations of the target object during the target object input process, and based on the first key operation representing back deletion detected during the target object input process, detects the subsequent key operations of the first key operation until the second key operation representing word selection is detected, and the previous key operation of the second key operation is a character typing operation, based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, obtains the target character string representing the error correction, and based on the second key operation, obtains the target input text of the target character string, and at least based on the target character string and its target input text, constructs a correction data pair for input recommendation for the target object. Therefore, the first key operation and the second key operation are used as trigger conditions to continuously detect the input process of the target object. When the first key operation is detected, the representation object deletes the typed characters or selected text, that is, the target object inputs incorrect character data before the first key operation. Based on the character typing operations that are continuously triggered before the first key operation and are closest to the first key operation, a target character string to be corrected is obtained, and the text selected in the second key operation is used as the target input text of the target character string, that is, when the target object enters the target character string, what is expected to be obtained is the target input text. Therefore, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object in the input process. Different target objects construct corresponding error correction data pairs based on corresponding input habits, so the accuracy of input recommendations for target objects based on error correction data pairs can be improved. Moreover, since the construction of error correction data pairs is independent, error correction data pairs can realize localization of data storage and improve security, so the practicality of input recommendations for target objects can be improved.
[0059] See also Figure 2 , Figure 2 It is a flowchart of an embodiment of the input recommendation method of the present application.
[0060] Specifically, the following steps may be included:
[0061] Step S11: based on the character input operation continuously triggered by the target object, a character string to be matched is obtained, and an error correction database of the target object is acquired.
[0062] In the embodiments of the present disclosure, the error correction database stores a number of error correction data pairs. The error correction data pair at least includes a target string to be error corrected and its target input text. The error correction data pairs in the error correction database are based on the first key operation indicating backspace detected during the input process of the target object, detecting subsequent key operations after the first key operation until the second key operation indicating word selection is detected, and the previous key operation of the second key operation is a character input operation. Based on the character input operation that was continuously triggered and closest to the first key operation before the first key operation, the target string to be error corrected is obtained, and based on the second key operation, the target input text of the target string is obtained. At least based on the target string and its target input text, the error correction data pair for input recommendation for the target object is constructed. Therefore, on the one hand, the error correction data pair constructed based on the target string and its target input text refers to the personalized input habits during the input process of the target object. Each different target object constructs a corresponding error correction data pair based on the corresponding input habits, realizing the independence of the construction of the error correction database and the localization of the storage of the error correction database, improving the security of input recommendation for the target object. On the other hand, generating the target recommendation text of the string to be matched based on the error correction database can improve the accuracy of input recommendation for the target object based on the error correction data pair, so the practicality of input recommendation for the target object can be improved.
[0063] It should be noted that the error correction data pair is constructed by the construction method embodiments of any of the foregoing error correction data pairs. The specific construction steps can refer to the relevant descriptions in the foregoing embodiments. For the sake of brevity, they will not be elaborated here.
[0064] Step S21: Generate the target recommendation text of the string to be matched based on the error correction database.
[0065] In an implementation scenario, traverse the target strings in the error correction data based on the string to be matched to obtain a matching result. When the matching result indicates that the error correction database stores a target string that is the same as the string to be matched, the error correction data pair in the error correction database that contains the target string that is the same as the string to be matched is used as the candidate data pair, and based on the attribute information of the candidate data pair, the target recommendation text of the string to be matched is determined.
[0066] In a specific implementation scenario, after determining the target recommendation text of the string to be matched based on the attribute information of the candidate data pair, on the display page, based on the display position in the attribute information of the error correction data pair, the target recommendation text is displayed in the corresponding area of the display page. For example, the display position in the attribute information of "(nihoa)(你好)" is 3. When the character input operations continuously triggered by the target object are "nihoa", "你好" is displayed at the 3rd position on the display page.
[0067] In a specific implementation scenario, when there are multiple error correction data pairs corresponding to the string to be matched, a preset number of target input texts are selected as the target recommended texts for the string to be matched. The preset number is related to the attribute information of the error correction data pairs containing the string to be matched. For example, the display position in the attribute information of "(nihoa)(你好)" is 3, and the display position in the attribute information of "(nihoa)(您好)" is 5. When the string to be matched is "nihoa", the preset number can be 2. Considering the number of characters of the target recommended texts and the number of answer characters that can be displayed on the display page, for example, if the current display page can only display 4 recommended texts with the number of characters not greater than 3, then the preset number is dynamically adjusted to 1, that is, only "你好" is displayed as the target recommended text on the display page for the target object to select.
[0068] In a specific implementation scenario, after obtaining the attribute information of the error correction data pairs containing the character to be matched and before displaying the target recommended texts, the general recommended texts generated by the input method based on the character to be matched are obtained, and the syllable full consumption results and syllable non-full consumption results in the general recommended texts are detected. For example, when the string to be matched is "nizia", the generated general recommended texts "你自啊" and "你子啊" are syllable full consumption results, and the generated general recommended texts "你自" and "你子" are syllable non-full consumption results. The error correction data pair containing the string to be matched in the error correction database is "(nizia)(你在)", and the display position in the corresponding attribute information is 4. The number of syllable full consumption results and the number of syllable non-full consumption results are obtained. That is, in the foregoing embodiment, the number of syllable full consumption results is 2, and the number of syllable non-full consumption results is 2. When the general recommended text with syllable non-full consumption result is before the display position of the target recommended text, the display position of the target recommended text is adjusted, and the target recommended text is displayed after the general recommended text with syllable full consumption result and before the general recommended text with syllable non-full consumption result.
[0069] In a specific implementation scenario, after the character typing operations continuously triggered by the target object, when the first key operation indicating backspace is detected, the steps of detecting the subsequent key operations of the first key operation based on the first key operation indicating backspace detected during the input process of the target object until the second key operation indicating word selection is detected are returned to construct error correction data pairs for the target object.
[0070] It should be noted that before the first key operation representing the back deletion is detected during the input process of the target object, and before the character input operation is continuously triggered by the target object, a prompt message is generated for the target object to be selected to indicate the consent to the collected operation data. The error correction database is stored and used in the local resource in an encrypted manner, and the user can actively view the error correction database, manually close the method in any of the aforementioned embodiments, and destroy the stored error correction database.
[0071] The above scheme obtains the character string to be matched based on the character typing operation continuously triggered by the target object, and obtains the error correction data pair of the target object. The error correction data pair in the error correction database is based on the first key operation representing back deletion detected during the input process of the target object, and detects the subsequent key operations of the first key operation until the second key operation representing word selection is detected, and the previous key operation of the second key operation is a character typing operation. Based on the character typing operation continuously triggered before the first key operation and closest to the first key operation, the target character string representing the error correction is obtained, and based on the second key operation, the target input text of the target character string is obtained. At least based on the target character string and its target input text, an error correction data pair for input recommendation for the target object is constructed. Therefore, on the one hand, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object during the input process. Different target objects construct corresponding error correction data pairs based on the corresponding input habits, thereby realizing the independence of error correction database construction and the localization of error correction database storage, thereby improving the security of input recommendations for target objects. On the other hand, generating target recommendation texts for the character string to be matched based on the error correction database can improve the accuracy of input recommendations for target objects based on error correction data pairs, thereby improving the practicality of input recommendations for target objects.
[0072] See also Figure 3 , Figure 3 1 is a schematic diagram of a framework of an embodiment of the error correction data pair construction device 30 of the present application. Figure 3As shown, the error correction data pair construction device 30 includes a detection module 31, an acquisition module 32 and a construction module 33. The detection module 31 is used to detect the subsequent key operations of the first key operation based on the first key operation representing back deletion detected during the target object input process, until the second key operation representing word selection is detected; wherein the previous key operation of the second key operation is a character typing operation; the acquisition module 32 is used to obtain the target character string representing the error to be corrected based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, and obtain the target input text of the target character string based on the second key operation; the construction module 33 is used to construct an error correction data pair for input recommendation for the target object based on at least the target character string and its target input text.
[0073] Therefore, the error correction data pair construction device 30 continuously detects the key operations of the target object during the target object input process, and based on the first key operation representing the back deletion detected during the target object input process, detects the subsequent key operations of the first key operation until the second key operation representing the word selection is detected, and the previous key operation of the second key operation is a character typing operation, based on the character typing operation that is continuously triggered before the first key operation and is closest to the first key operation, the target character string representing the error to be corrected is obtained, and based on the second key operation, the target input text of the target character string is obtained, and at least based on the target character string and its target input text, an error correction data pair for input recommendation for the target object is constructed. Therefore, the first key operation and the second key operation are used as trigger conditions to continuously detect the input process of the target object. When the first key operation is detected, the representation object deletes the typed characters or selected text, that is, the target object inputs incorrect character data before the first key operation. Based on the character typing operations that are continuously triggered before the first key operation and are closest to the first key operation, a target character string to be corrected is obtained, and the text selected in the second key operation is used as the target input text of the target character string, that is, when the target object enters the target character string, what is expected to be obtained is the target input text. Therefore, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object in the input process. Different target objects construct corresponding error correction data pairs based on corresponding input habits, so the accuracy of input recommendations for target objects based on error correction data pairs can be improved. Moreover, since the construction of error correction data pairs is independent, error correction data pairs can realize localization of data storage and improve security, so the practicality of input recommendations for target objects can be improved.
[0074] In some disclosed embodiments, the error correction data pair construction device 30 also includes a first screening module (not shown), which is used to obtain first character data based on a character typing operation that is continuously triggered before a first key operation and is closest to the first key operation, and to obtain second character data based on a character typing operation that is continuously triggered before a second key operation and is closest to the second key operation, before constructing an error correction data pair for input recommendation for a target object based at least on a target character string and its target input text; obtain a first character length of the first character data, and obtain a second character length of the second character data; in response to the first character length not meeting a first length preset condition, and / or the second character length not meeting a second length preset condition, re-execute the steps of detecting a subsequent key operation of the first key operation based on detecting a first key operation representing backdeletion during the target object input process, and subsequent steps; wherein the first length preset condition is that the first character length is not less than a first minimum length threshold and the first character length is not greater than a first maximum length threshold, and the second length preset condition is that the second character length is not less than a second minimum length threshold and the second character length is not greater than a second maximum length threshold.
[0075] In some disclosed embodiments, the error correction data pair construction device 30 also includes a second screening module (not shown) for obtaining first syllable information based on a target character string to be corrected and second syllable information based on the target input text of the target character string before constructing an error correction data pair for input recommendation for the target object based at least on the target character string and its target input text; obtaining an edit distance representing the degree of syllable difference between the target character string and the target input text based on the first syllable information and the second syllable information; and re-executing the steps of detecting subsequent key operations of the first key operation based on detecting a first key operation representing backdeletion during the input process of the target object and subsequent steps in response to the edit distance being greater than an edit threshold.
[0076] In some disclosed embodiments, the error correction data pair construction device 30 also includes a data pair analysis module (not shown), which is used to store the error correction data pairs in an error correction database after constructing error correction data pairs for input recommendation for the target object based on at least the target character string and its target input text; wherein the error correction data pairs in the error correction database are marked with attribute information; wherein the attribute information includes at least one of storage frequency, storage timing, and display position, and the display position represents the position of the target input text recommended for input for the target object based on the error correction data pair on the display page.
[0077] In some disclosed embodiments, the data pair analysis module (not shown) also includes a frequency update module (not shown), which is used to obtain the statistical frequency of historical error correction data pairs based on historical error correction data pairs in the error correction database that are consistent with the error correction data pairs; based on the statistical frequency, update the storage frequency of the error correction data pairs.
[0078] In some disclosed embodiments, the data pair analysis module (not shown) also includes a timing update module (not shown) for updating the storage timing of the error correction data pair based on the storage timing of the historical error correction data pairs stored in the error correction database at the most recent moment before the error correction data pair.
[0079] In some disclosed embodiments, the data pair analysis module (not shown) also includes a display position analysis module (not shown), which is used to obtain a first score based on a first weight and the storage frequency of the error-correcting data pair, and to obtain a second score based on a second weight and the storage timing of the error-correcting data pair; wherein the first weight represents the importance of the storage frequency to the display position, and the second weight represents the importance of the storage timing to the display position; the display position is determined based on the sum of the first score and the second score; wherein the sum is directly proportional to the display position.
[0080] See also Figure 4 , Figure 4 Schematic diagram of the framework of an embodiment of the input recommendation device 40 of the present application. Figure 4 As shown, the input recommendation device 40 includes a trigger module 41 and a generation module 42. The trigger module 41 is used to obtain a character string to be matched based on the character input operation continuously triggered by the target object, and obtain an error correction database of the target object; wherein the error correction database stores a plurality of error correction data pairs, the error correction data pairs at least include the target character string to be corrected and its target input text, and the error correction data pairs are obtained by the error correction data pair construction method described in the first aspect above; the generation module 42 is used to generate a target recommended text for the character string to be matched based on the error correction database.
[0081] Therefore, the input recommendation device 40 obtains the character string to be matched based on the character typing operation continuously triggered by the target object, and obtains the error correction data pair of the target object. The error correction data pair in the error correction database is based on the first key operation representing back deletion detected during the input process of the target object, and detects the subsequent key operations of the first key operation until the second key operation representing word selection is detected, and the previous key operation of the second key operation is a character typing operation. Based on the character typing operation continuously triggered before the first key operation and closest to the first key operation, the target character string representing the error correction is obtained, and based on the second key operation, the target input text of the target character string is obtained. At least based on the target character string and its target input text, an error correction data pair for input recommendation for the target object is constructed. Therefore, on the one hand, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object during the input process. Different target objects construct corresponding error correction data pairs based on the corresponding input habits, thereby realizing the independence of error correction database construction and the localization of error correction database storage, thereby improving the security of input recommendations for target objects. On the other hand, generating target recommendation texts for the character string to be matched based on the error correction database can improve the accuracy of input recommendations for target objects based on error correction data pairs, thereby improving the practicality of input recommendations for target objects.
[0082] In some disclosed embodiments, the generation module 42 also includes a target recommended text determination module (not shown), which is used to traverse the target string in the error correction data based on the string to be matched to obtain a matching result; in response to the matching result indicating that the error correction database stores a target string consistent with the string to be matched, the error correction data pair containing the target string consistent with the string to be matched in the error correction database is used as a candidate data pair; based on the attribute information of the candidate data pair, the target recommended text of the string to be matched is determined.
[0083] In some disclosed embodiments, the input recommendation device 40 also includes a loop detection module (not shown) for responding to detecting a first key operation representing back-deletion after a character typing operation continuously triggered by a target object, returning to the steps of detecting subsequent key operations of the first key operation based on the first key operation representing back-deletion detected during the input of the target object, until a second key operation representing word selection is detected, so as to construct an error correction data pair for the target object.
[0084] See also Figure 5 , Figure 5 1 is a schematic diagram of a framework of an embodiment of an electronic device 50 of the present application. Figure 5As shown, the electronic device 50 includes a memory 51 and a processor 52 coupled to each other, the memory 51 stores program instructions, and the processor 52 is used to execute the program instructions to implement the steps in any of the above-mentioned error correction data pair construction method embodiments, or the steps in any of the above-mentioned input recommendation method embodiments. Specifically, the electronic device 50 may include but is not limited to: a server, a desktop computer, a laptop computer, a tablet computer, a smart phone, etc., which are not limited here. Specifically, the processor 52 is used to control itself and the memory 51 to implement the steps in any of the above-mentioned error correction data pair construction method embodiments, or the steps in any of the input recommendation method embodiments. The processor 52 can also be called a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 52 may be implemented by an integrated circuit chip.
[0085] Therefore, the electronic device 50 continuously detects the key operations of the target object during the target object input process, and based on the first key operation representing back deletion detected during the target object input process, detects the subsequent key operations of the first key operation until the second key operation representing word selection is detected, and the previous key operation of the second key operation is a character typing operation, based on the character typing operations that are continuously triggered before the first key operation and are closest to the first key operation, the target character string representing the error correction is obtained, and based on the second key operation, the target input text of the target character string is obtained, and at least based on the target character string and its target input text, a correction data pair for input recommendation for the target object is constructed. Therefore, the first key operation and the second key operation are used as trigger conditions to continuously detect the input process of the target object. When the first key operation is detected, the representation object deletes the typed characters or selected text, that is, the target object inputs incorrect character data before the first key operation. Based on the character typing operations that are continuously triggered before the first key operation and are closest to the first key operation, a target character string to be corrected is obtained, and the text selected in the second key operation is used as the target input text of the target character string, that is, when the target object enters the target character string, what is expected to be obtained is the target input text. Therefore, the error correction data pair constructed based on the target character string and its target input text refers to the personalized input habits of the target object in the input process. Different target objects construct corresponding error correction data pairs based on corresponding input habits, so the accuracy of input recommendations for target objects based on error correction data pairs can be improved. Moreover, since the construction of error correction data pairs is independent, error correction data pairs can realize localization of data storage and improve security, so the practicality of input recommendations for target objects can be improved.
[0086] See also Figure 6 , Figure 6 1 is a schematic diagram of a computer-readable storage medium 60 of the present application. The computer-readable storage medium 60 stores program instructions 61 that can be executed by a processor, and the program instructions 61 are used to implement the steps in any of the above-mentioned error correction data pair construction method embodiments, or the steps in any of the input recommendation method embodiments.
[0087] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0088] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0089] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. A method for constructing an error correction data pair, characterized in that: include: Based on detecting a first key operation representing back-deletion during the target object input process, detecting a subsequent key operation of the first key operation until a second key operation representing word selection is detected; wherein the previous key operation of the second key operation is a character input operation; Based on the character input operation that is continuously triggered before the first key operation and is closest to the first key operation, a target character string representing the to-be-corrected error is obtained, and based on the second key operation, a target input text of the target character string is obtained; Based at least on the target character string and the target input text thereof, an error correction data pair for input recommendation for the target object is constructed.
2. The method according to claim 1, characterized in that Before constructing an error correction data pair for input recommendation for the target object based at least on the target character string and the target input text, the method further includes: Based on the character input operation that is continuously triggered before the first key operation and is closest to the first key operation, the first character data is obtained, and based on the character input operation that is continuously triggered before the second key operation and is closest to the second key operation, the second character data is obtained; Obtaining a first character length of the first character data, and obtaining a second character length of the second character data; In response to the first character length not meeting the first length preset condition, and / or the second character length not meeting the second length preset condition, the steps of detecting subsequent key operations of the first key operation based on detecting the first key operation representing backdeletion during the target object input process and subsequent steps are re-executed; wherein, the first length preset condition is that the first character length is not less than a first minimum length threshold and the first character length is not greater than a first maximum length threshold, and the second length preset condition is that the two character lengths are not less than a second minimum length threshold and the second character length is not greater than a second maximum length threshold.
3. The method according to claim 1, characterized in that Before constructing an error correction data pair for input recommendation for the target object based at least on the target character string and the target input text, the method further includes: Based on the target character string representing the to-be-corrected error, first syllable information is obtained, and based on at least the target input text of the target character string, second syllable information is obtained; Based on the first syllable information and the second syllable information, obtaining an edit distance representing a degree of syllable difference between the target character string and the target input text; In response to the edit distance being greater than the edit threshold, the steps of detecting a first key operation representing back-deletion during target object input, detecting a subsequent key operation of the first key operation, and subsequent steps are re-executed.
4. The method according to claim 1, characterized in that After constructing an error correction data pair for input recommendation for the target object based at least on the target character string and the target input text, the method further includes: The error correction data pairs are stored in an error correction database; wherein the error correction data pairs in the error correction database are marked with attribute information; wherein the attribute information includes at least one of storage frequency, storage sequence, and display position, and the display position represents the position of a target input text recommended for input to the target object based on the error correction data pair on a display page.
5. The method according to claim 4, characterized in that The attribute information is the storage frequency. After storing the error correction data pair in the error correction database, the method further includes: Based on the historical error correction data pairs in the error correction database that are consistent with the error correction data pairs, obtaining the statistical frequency of the historical error correction data pairs; Based on the statistical frequency, the storage frequency of the error correction data pair is updated.
6. The method according to claim 4, characterized in that The attribute information is the storage time sequence. After storing the error correction data pair in the error correction database, the method further includes: The storage sequence of the error correction data pair is updated based on the storage sequence of the historical error correction data pair stored in the error correction database at the most recent time before the error correction data pair.
7. The method according to claim 4, characterized in that The attribute information includes the storage frequency, the storage sequence and the display position. After storing the error correction data pair in the error correction database, the method further includes: A first score is obtained based on a first weight and the storage frequency of the error correction data pair, and a second score is obtained based on a second weight and the storage timing of the error correction data pair; wherein the first weight represents the importance of the storage frequency to the display position, and the second weight represents the importance of the storage timing to the display position; The display position is determined based on the sum of the first score and the second score; wherein the sum is directly proportional to the display position.
8. An input recommendation method, characterized in that: include: Based on the character input operation continuously triggered by the target object, a character string to be matched is obtained, and an error correction database of the target object is obtained; wherein the error correction database stores a plurality of error correction data pairs, the error correction data pairs at least include the target character string to be corrected and its target input text, and the error correction data pairs are obtained by the method according to any one of claims 1 to 7; Based on the error correction database, a target recommended text of the to-be-matched character string is generated.
9. The method according to claim 8, characterized in that The step of generating a target recommended text for the to-be-matched character string based on the error correction database includes: Traversing the target string in the error correction database based on the string to be matched to obtain a matching result; In response to the matching result indicating that the error correction database stores the target string that is consistent with the string to be matched, taking the error correction data pair in the error correction database that contains the target string that is consistent with the string to be matched as a candidate data pair; Based on the attribute information of the candidate data pair, a target recommended text of the to-be-matched character string is determined.
10. The method according to claim 8, characterized in that The method further comprises: In response to detecting a first key operation representing back deletion after the character typing operation continuously triggered by the target object, return to the step of detecting subsequent key operations of the first key operation based on detecting the first key operation representing back deletion during the target object input process until detecting the second key operation representing word selection, so as to construct the error correction data pair for the target object.
11. A device for constructing an error correction data pair, characterized in that: include: A detection module is used to detect a first key operation representing back deletion based on the first key operation detected during the target object input process, and then detect a subsequent key operation of the first key operation until a second key operation representing word selection is detected; wherein the previous key operation of the second key operation is a character input operation; an acquisition module, configured to obtain a target character string representing a to-be-corrected error based on a character input operation that is continuously triggered before the first key operation and is closest to the first key operation, and to obtain a target input text of the target character string based on the second key operation; A construction module is used to construct an error correction data pair for input recommendation for the target object based at least on the target character string and its target input text.
12. An input recommendation device, characterized in that: include: A trigger module, used for obtaining a character string to be matched based on a character input operation continuously triggered by a target object, and obtaining an error correction database of the target object; wherein the error correction database stores a plurality of error correction data pairs, the error correction data pairs at least including a target character string to be corrected and a target input text, and the error correction data pairs are obtained by the method according to any one of claims 1 to 7; A generating module is used to generate a target recommended text of the to-be-matched character string based on the error correction database.
13. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the error correction data pair construction method described in any one of claims 1 to 7, or to implement the input recommendation method described in any one of claims 8 to 10.
14. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the error correction data pair construction method described in any one of claims 1 to 7 is implemented, or the input recommendation method described in any one of claims 8 to 10 is implemented.
