Input method dictionary update methods, devices, equipment and servers

By updating the input method dictionary in the input method interface and optimizing the word order of candidate word groups based on user selection and the first candidate word, the problem of poor word output for long sentences in the input method was solved, and a candidate word sorting that better meets user needs was achieved.

CN115729360BActive Publication Date: 2026-11-17VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111007692.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2026-11-17
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

The existing input methods have poor word output performance for long sentences, and the word order of candidate words does not meet the actual needs of users.

Method used

After a long syllable string is entered into the input method interface, the electronic device responds to the user's selection and sends the target candidate word and the first candidate word to the server. The server updates the input method's word library based on the user's selection and the first candidate word, and performs pruning and data augmentation through the first and second lists to optimize the word output order of the candidate words.

Benefits of technology

The input method has improved its ability to generate words for long sentences, making the word order of candidate phrases more in line with users' actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729360B_ABST
    Figure CN115729360B_ABST
Patent Text Reader

Abstract

This application discloses an input method dictionary update method, apparatus, device, and server, belonging to the field of input methods. The input method dictionary update method includes: displaying N candidate words based on a first string input into the input method interface; receiving a first input of a target candidate word from among the N candidate words; in response to the first input, if the number of syllables in the first string is greater than or equal to a preset value, sending the target candidate word and a first candidate word to a server, wherein the first candidate word is the candidate word ranked first among the N candidate words; and upon receiving the target input method dictionary sent by the server, updating the original input method dictionary to the target input method dictionary, wherein the target input method dictionary is determined based on the candidate words selected by the user and the candidate word ranked first.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of input methods, specifically relating to an input method dictionary update method, apparatus, device, and server. Background Technology

[0002] With the widespread use of mobile devices, social applications, shopping applications, and payment applications on these devices all rely on input method support.

[0003] Currently, the word list corresponding to a long Pinyin string may contain multiple candidate word groups, and the order in which these candidate word groups are generated is usually determined by a pre-trained language model. Specifically, the server scores multiple candidate word groups based on the richness and distribution of lexical units in the language model and the actual application scenario, and sorts the candidate word groups with higher scores first and the candidate word groups with lower scores last.

[0004] However, in some cases, the order of candidate words may not meet the user's actual needs, resulting in poor word output for long sentences in the input method. Summary of the Invention

[0005] The purpose of this application is to provide an input method dictionary update method, apparatus, device, and server that can solve the problem of poor word output performance for long sentences in input methods.

[0006] In a first aspect, embodiments of this application provide an input method dictionary update method, applied to an electronic device. The method includes: displaying N candidate words based on a first string input into an input method interface; receiving a first input of a target candidate word from the N candidate words; in response to the first input, if the number of syllables in the first string is greater than or equal to a preset value, sending the target candidate word and a first candidate word to a server, wherein the first candidate word is the candidate word ranked first among the N candidate words; and, upon receiving a target input method dictionary from the server, updating the original input method dictionary to the target input method dictionary, wherein the target input method dictionary is determined based on the candidate words selected by the user and the candidate word ranked first.

[0007] Secondly, embodiments of this application provide an input method dictionary update method applied to a server. The method includes: receiving a target candidate word and a first candidate word sent by an electronic device, wherein the first candidate word is the candidate word ranked first among N candidate words, the target candidate word is the candidate word selected by a user from the N candidate words, the N candidate words being determined based on a first string, the first string including a number of syllables greater than or equal to a preset value; if the target candidate word is not the first candidate word, adding the first candidate word to a first list and adding the target candidate word to a second list, wherein the first list includes at least one candidate word ranked first that was not selected by the user, and the second list includes at least one candidate word not ranked first that was selected by the user; if the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, determining a target input method dictionary based on the first list and / or the second list; and sending the target input method dictionary to the electronic device.

[0008] Thirdly, embodiments of this application provide an input method dictionary update apparatus. The apparatus includes a display module, a receiving module, a communication module, and a processing module. The display module is used to display N candidate words based on a first string input into the input method interface. The receiving module is used to receive a first input to a target candidate word among the N candidate words displayed by the display module. The communication module is used, in response to the first input received by the receiving module, to send the target candidate word and a first candidate word to a server if the number of syllables in the first string is greater than or equal to a preset value. The first candidate word is the candidate word ranked first among the N candidate words. The processing module is used to update the original input method dictionary to the target input method dictionary when the communication module receives the target input method dictionary sent by the server, wherein the target input method dictionary is determined based on the candidate words selected by the user and the candidate word ranked first.

[0009] Fourthly, embodiments of this application provide an input method dictionary update device. The device includes a communication module and a processing module. The communication module is configured to receive a target candidate word and a first candidate word sent by an electronic device, wherein the first candidate word is the candidate word ranked first among N candidate words, and the target candidate word is the candidate word selected by the user from the N candidate words, the N candidate words being determined based on a first string, the first string including a number of syllables greater than or equal to a preset value. The processing module is configured to add the first candidate word to a first list and to a second list when the target candidate word received by the communication module is not the first candidate word, wherein the first list includes at least one candidate word ranked first that was not selected by the user, and the second list includes at least one candidate word not ranked first that was selected by the user. The processing module is further configured to determine a target input method dictionary based on the first list and / or the second list when the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability. The communication module is further configured to send the target input method dictionary to the electronic device.

[0010] Fifthly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method provided in the first aspect.

[0011] In a sixth aspect, embodiments of this application provide a server, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method provided in the second aspect.

[0012] In a seventh aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method provided in the first or second aspect.

[0013] Eighthly, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the methods provided in the first or second aspect.

[0014] In this embodiment, after a user inputs a long syllable string into the input method interface, the electronic device can respond to the input of selecting a target candidate word from N candidate words by sending the target candidate word and the first candidate word ranked first among the N candidate words to the server. Subsequently, if the target candidate word is not the first candidate word, the server can add the first candidate word and the target candidate word to a first list and a second list respectively. If the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, the server determines the target input method dictionary based on the first list and / or the second list, and sends the target input method dictionary to the electronic device. Then, the electronic device can update the original input method dictionary to the target input method dictionary. In this way, the input method dictionary is updated based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual usage needs and improving the word output effect of the input method for long sentences. Attached Figure Description

[0015] Figure 1 This is a block diagram of a wireless communication system applicable to embodiments of this application;

[0016] Figure 2 This is a flowchart of the input method dictionary update method provided in the embodiments of this application;

[0017] Figure 3 This is one of the structural schematic diagrams of the input method dictionary update device provided in the embodiments of this application;

[0018] Figure 4 This is a second schematic diagram of the structure of the input method dictionary update device provided in the embodiments of this application;

[0019] Figure 5 This is a schematic diagram of a communication device provided in an embodiment of this application;

[0020] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0021] Figure 7 This is a schematic diagram of the hardware structure of a server provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0023] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0024] The terminology and implementation methods involved in the embodiments of this application are described below.

[0025] Input method lexicon: also known as a language model, it is obtained by training a pre-trained language lexicon based on the language model. It should be noted that the language model in this application can be an n-gram language model. n-gram is an algorithm based on statistical language models. The basic idea is to perform a sliding window operation of size N on the content of the text according to syllables, forming a sequence of syllable segments of length N. Each syllable segment is called a gram. The frequency of occurrence of all grams is statistically analyzed, and filtered according to a pre-set threshold to form a list of key grams.

[0026] Pruning is a technique that removes some unimportant n-gram relations from a language model, thereby reducing the model's size. During the training of an n-gram language model, n-gram information from the training data is stored. As the amount of training data increases, the model stores more and more n-gram information. If the probability of a certain n-gram is similar to the backoff mechanism, that n-gram can be deleted. Each deletion of n-gram information requires renormalization of the model.

[0027] Long sentence word generation: refers to the process of obtaining complete word candidates by having the user input a long Pinyin string (e.g., more than 4 syllables).

[0028] Confusion level: A metric for evaluating the effectiveness of a language model itself, unrelated to business metrics.

[0029] Negative example: This refers to a situation where the first word displayed by the input method is not the one selected by the user.

[0030] First choice rate: refers to the percentage (0-100%) of the first word provided by the input method that is selected by the user. The higher the first choice rate, the better the word output effect of the input method.

[0031] Corpus: that is, language materials, which are the content of linguistic research. Corpus is the basic unit that constitutes a corpus.

[0032] The following description, in conjunction with the accompanying drawings, details the input method dictionary update method, apparatus, device, and server provided in this application through specific embodiments and application scenarios.

[0033] Figure 1 This diagram illustrates a block diagram of a wireless communication system applicable to embodiments of this application. The wireless communication system includes an electronic device 11 and a server 12. The electronic device 11 can be a mobile phone, tablet personal computer, laptop computer (also called a notebook computer), personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, vehicle-mounted device (VUE), pedestrian terminal (PUE), smart home (home appliances with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), etc. Wearable devices include: smartwatches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, game consoles, etc. It should be noted that this application does not limit the specific type of electronic device 11.

[0034] like Figure 2 As shown in the figure, this application provides an input method dictionary update method. This method can be applied to, for example... Figure 1 The wireless communication system shown. The method includes steps S201 to S208.

[0035] S201. The electronic device displays N candidate words based on the first string entered in the input method interface.

[0036] Where N is an integer greater than or equal to 2.

[0037] When an electronic device is running applications such as social media, shopping, or payment apps, and receives input from a user to activate the input method, the input method interface is overlaid on the first area of ​​the application's screen. The user can then input a first string into the input method interface, allowing the electronic device to display N candidate words associated with that first string.

[0038] Optionally, the N candidate words may be candidate words in the original input method lexicon provided by the server to the electronic device. The original input method lexicon is obtained by pruning the pre-trained language lexicon by the server, and the input method lexicon is pre-stored in the electronic device.

[0039] Optionally, the first character string may be a pinyin string, that is, a character string composed of pinyin. Correspondingly, the N candidate words are candidate words determined according to the syllables in the pinyin string. For example, assuming that the first character string is "tiankongtianbulai", which includes 5 syllables "tian", "kong", "tian", "bu", and "lai", the candidate word ranked first on the input method interface is "tian kong tian bu lai", and the candidate word ranked second is "tian kong tian bu lai". It should be noted that the output order of candidate words such as "tian kong tian bu lai" and "tian kong tian bu lai" is usually obtained by the server scoring multiple candidate word groups in advance according to the richness of tokens, token distribution and actual application scenarios in the language model, for example, the score of "tian kong tian bu lai" is the highest, and the score of "tian kong tian bu lai" is the second highest.

[0040] S202. The electronic device receives a first input for a target candidate word among the N candidate words.

[0041] S203. In response to the first input, the electronic device sends the target candidate word and the first candidate word to the server under the condition that the number of syllables included in the first character string is greater than or equal to a preset value.

[0042] The first candidate word is the candidate word ranked first among the N candidate words.

[0043] Optionally, the target candidate word may be the first candidate word; or, it may also be a candidate word ranked not first among the N candidate words, such as a candidate word ranked second or third.

[0044] It should be noted that if "the number of syllables included in the first character string is greater than or equal to the preset value", the first character string can be considered as a long pinyin string. For example, the preset value is 4, and if the number of syllables included in the first character string is greater than or equal to 4, the first character string is considered as a long pinyin string, so that the following S204 to S208 are executed.

[0045] Optionally, the above-mentioned first input may be a selection input for the target candidate word, and specifically may be a click input on the display area where the target candidate word is located.

[0046] Further, if the target candidate word is composed of multiple levels of candidate participles, the first input includes multiple sub-inputs, and one sub-input is used to select one candidate participle.

[0047] S204. The server receives the first candidate word and the target candidate word sent by the electronic device.

[0048] The first candidate word is the candidate word ranked first among the N candidate words, and the target candidate word is the candidate word selected by the user from the N candidate words. The N candidate words are determined based on a first character string, and the number of syllables included in the first character string is greater than or equal to a preset value.

[0049] S205. In response to the target candidate word not being the first candidate word, the server adds the first candidate word to a first list, and adds the target candidate word to a second list.

[0050] The first list includes at least one first-ranked candidate word that is not selected by the user, and the second list includes at least one non-first-ranked candidate word that is selected by the user.

[0051] The server in the embodiment of the present application is configured with a first list and a second list, where the first list may be referred to as a "bad list", and the second list may be referred to as a "keep list". The "bad list" includes at least one first-ranked candidate word that is not selected by the user, and the "keep list" includes at least one non-first-ranked candidate word that is selected by the user.

[0052] For example, when the first character string "tiankongtianbulai" is a long Pinyin string, and the candidate word selected by the user is the negative example "填空填不来", the server may determine that the word output effect of the input method is poor according to "天空天不来" and "填空填不来" sent by the electronic device. After that, "天空天不来" is added to the "bad list", and "填空填不来" is added to the "keep list".

[0053] Optionally, the above S205 may be specifically implemented through the following S205a and S205b.

[0054] S205a. The server segments the first candidate word to obtain P word element groups, and segments the target candidate word to obtain T word element groups. Each of the P word element groups includes at least two word elements, and each of the T word element groups includes at least two word elements. P and T are positive integers.

[0055] S205b. The server adds a word element group that meets a preset condition among the P word element groups to the first list, and adds a word element group that meets the preset condition among the T word element groups to the second list.

[0056] The preset condition is that all word elements included in the word element group are word elements in the input method lexicon.

[0057] In the embodiments of the present application, an unpruned language model may be used to calculate the n-gram relation combinations constituting the first candidate word a, and these combinations are collected into a bad list; likewise, the n-gram relation combinations constituting the target candidate word b are calculated and collected into a keep list.

[0058] The specific process is as follows:

[0059] (1) Perform word segmentation on the first candidate word a and the target candidate word b according to a custom dictionary. For example, "天空天不来" is segmented into "天空", "天", and "不来". It should be noted that the word segmentation results may be diverse. For instance, "填空填不来" may be segmented into a ternary relation word tuple "填空", "填", "不来", or into a binary relation word tuple "填空", "填不来". Since the language model is trained according to the real word segmentation habits of users, the ternary relation word tuple "填空", "填", "不来" may not exist. In this case, only the binary relation word tuple "填空", "填不来" remains.

[0060] (2) Obtain all word tuples corresponding to the first candidate word and all word tuples corresponding to the target candidate word. For example, "天空天不来" includes one ternary relation word tuple "天空", "天", "不来", one binary relation word tuple "天空", "天", and another binary relation word tuple "天", "不来".

[0061] (3) Input these word tuples into the language model in WFST format, and only retain the word tuples that exist in the language model. The language model can accept any word tuple and determine whether the word tuple exists in the model.

[0062] (4) Collect the retained word tuples of the first candidate word a into the bad list, and collect the retained word tuples of the target candidate word b into the keep list. The bad list and the keep list can be regarded as key-value type dictionaries, where the key is a certain word tuple, and the value is the cumulative count of the word tuple.

[0063] S206: In the case where the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, the server determines the target input method lexicon according to the first list and / or the second list.

[0064] In this embodiment, if the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, it means that the probability of the first candidate word being selected by the user is low, the word order may not meet the user's actual usage needs, and the input method dictionary needs to be updated; while if the probability that the target candidate word is not the first candidate word is less than a preset probability, it means that the probability of the first candidate word being selected by the user is high, the word order may meet the user's actual usage needs, and the input method dictionary does not need to be updated.

[0065] It should be noted that "the server determines the input method dictionary based on the first list and / or the second list" specifically means: based on the first list and / or the second list, reducing the word output rate of candidate words in the first list of the input method dictionary and increasing the word output rate of candidate words in the second list of the input method dictionary, thereby determining the target input method dictionary.

[0066] The specific implementation of "the server determines the target input method dictionary based on the first list and / or the second list" will be described in the following embodiments, and will not be elaborated here.

[0067] S207. The server sends the target input method dictionary to the electronic device.

[0068] S208. Upon receiving the target input method dictionary from the server, the electronic device updates the original input method dictionary to the target input method dictionary.

[0069] In this embodiment, the original input method dictionary is obtained by pruning a pre-trained language dictionary. Methods for obtaining input method dictionaries can be referenced from existing technologies, and this application does not impose specific limitations.

[0070] The target input method vocabulary is determined based on the candidate words selected by the user and the first candidate word in the ranking. Specifically, it is obtained by retraining the original input method vocabulary based on the candidate words selected by the user and the first candidate word in the ranking.

[0071] In this embodiment, the electronic device stores an original input method dictionary. After receiving the target input method dictionary sent by the server, the electronic device can delete the original input method dictionary and store the target input method dictionary.

[0072] This application provides a method for updating an input method dictionary. After a user inputs a long syllable string into the input method interface, the electronic device can respond to the input of selecting a target candidate word from N candidate words, sending the target candidate word and the first candidate word ranked first among the N candidate words to the server. Then, if the target candidate word is not the first candidate word, the server can add the first candidate word and the target candidate word to a first list and a second list respectively. If the probability of a candidate word in the first list being selected is low, the server determines the target input method dictionary based on the first list and / or the second list, and sends the target input method dictionary to the electronic device. The electronic device can then update the original input method dictionary to the target input method dictionary. In this way, the input method dictionary is updated based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual usage needs, and improving the word output effect of the input method for long sentences.

[0073] In traditional methods, a large-scale (G-level) language model is trained, called a pre-trained language lexicon. After pruning the pre-trained language lexicon, an input method lexicon (M-level) can be obtained. This application improves upon the traditional method of obtaining an input method lexicon. To more clearly illustrate the input method lexicon updating method provided in the embodiments of this application, the following examples 1 and 2 will be used to exemplify the method of updating the input method lexicon.

[0074] Example 1

[0075] The above-mentioned S206 can be implemented by the following S206a.

[0076] S206a. If the probability that the target candidate word is not the first candidate word is greater than or equal to the preset probability, the server deletes the first and second candidate words in the pre-trained language lexicon to obtain the target input method lexicon.

[0077] The first category of candidate words consists of candidate words in the first list whose relative entropy is less than or equal to the first threshold; the second category of candidate words consists of candidate words in the second list whose relative entropy is less than or equal to the second threshold. The first threshold is greater than the second threshold.

[0078] Specifically, the server can remove the first, second, and third categories of candidate words from the pre-trained language lexicon to obtain the target input method lexicon. The first category of candidate words consists of those in the first list whose relative entropy is less than or equal to a first threshold. The second category consists of those in the second list whose relative entropy is less than or equal to a second threshold. The third category consists of those in the pre-trained language lexicon, excluding those in the first and second lists, whose relative entropy is less than or equal to a third threshold. The first threshold is greater than the third threshold, and the third threshold is greater than the second threshold.

[0079] The method for updating the input method dictionary provided in this application embodiment is specifically implemented through (1) to (3).

[0080] (1) Training large-scale (G-level) language models using traditional methods. Specifically, this includes:

[0081] Word segmentation is performed on a large corpus.

[0082] Perform word frequency statistics on all n-gram relations. The value of n is related to the actual business; in input method business, n is usually less than or equal to 3.

[0083] The original word frequencies are discounted using a specific smoothing algorithm (such as the Witten-Bell discounting method), so that the estimated probability of each n-gram relation after discounting is less than the maximum likelihood estimation (MLE) using the original word frequencies. The extra probability can then be allocated to n-gram relations that do not appear in the corpus, avoiding the unreasonable situation in practical use where the probability of a certain input n-gram relation is 0.

[0084] Compress the trained ARPA format model into WFST format.

[0085] (2) Select a preset pruning algorithm, such as a pruning algorithm based on relative entropy: traverse all n-gram relations of the language model, calculate the relative entropy before and after deleting each n-gram relation individually, and remove n-gram relations whose relative entropy is less than the threshold λ. Among them, relative entropy is used to measure the degree of influence of a specific n-gram relation on the language model. The larger the relative entropy, the greater the influence of the n-gram relation on the overall model.

[0086] (3) Based on the general pruning strategy based on relative entropy, the following improvement steps are taken:

[0087] Because the larger the threshold λ is, the more n-ary relations are deleted, the goal of retaining more desired n-ary relations and removing unwanted n-ary relations can be achieved by dynamically adjusting the threshold λ.

[0088] For n-gram relations in the keep list, a smaller second threshold λ1 can be used for filtering, thereby retaining more relevant n-gram relations in the final small language model. The specific steps are as follows:

[0089] Multiple alternative values ​​for the second threshold λ1 are set. The value of λ1 ranges from 0.1λ to 0.9λ. The third threshold λ is used to delete candidate words in the language model that are not included in the first and second lists.

[0090] The language model is pruned using one of several alternative values. It should be noted that n-gram relations in the keep list that are less than the second threshold λ1 are deleted, while other n-gram relations remain less than the third threshold λ.

[0091] The test uses the preferred selection rate of the input method on the test set based on the pruned language model.

[0092] Perform the above operation on each candidate value, and use the one with the highest measured first-choice rate as the second threshold λ1.

[0093] For the n-gram relations in the bad list, a larger first threshold λ² can be used for filtering, thereby removing more relevant n-gram relations from the final small language model. The specific steps are as follows:

[0094] Multiple candidate values ​​for the first threshold λ2 are set. The value of the first threshold λ2 ranges from 2λ to 10λ, and the third threshold λ is used to delete candidate words in the language model that are not included in the first and second lists.

[0095] The language model is pruned using one of several alternative values. It should be noted that n-gram relations in the bad list that are less than the first threshold λ² are deleted, while other n-gram relations remain less than the third threshold λ.

[0096] The test uses the preferred selection rate of the input method on the test set based on the pruned language model.

[0097] Perform the above operation on each candidate value, and use the one with the highest measured first-choice rate as the first threshold λ2.

[0098] It should be noted that for candidate words in the language model other than those included in the first and second lists, the third threshold λ is still used for pruning.

[0099] After the server removes the first, second, and third candidate words from the pre-trained language lexicon, it can recalculate the prob and backoff of each n-gram relation using a pre-defined smoothing algorithm based on the n-gram relations retained after pruning, thus obtaining a trained new language model, i.e., the updated input method lexicon.

[0100] The input method lexicon update method provided in this application optimizes traditional pruning schemes that only relate to the language model itself, applying separate pruning strategies to valid and invalid lexical units in negative user feedback examples. This process requires no additional annotation work and is a self-learning process that dynamically adjusts based on the overall word output performance of the input method and user usage. Furthermore, this process optimizes the lexical unit distribution in the language model on electronic devices, improving the word output performance of long sentences in the input method.

[0101] Example 2

[0102] The above-mentioned S206 can be implemented by the following S206b to S206e.

[0103] S206b: The server adds preset tags to the candidate words in the second list.

[0104] Optionally, the server can add negative labels to candidate words in the first list (bad list) and positive labels to candidate words in the second list (keep list).

[0105] S206c: The server performs data augmentation on candidate words that have been labeled with preset tags to generate at least one corpus.

[0106] S206d, The server adds at least one corpus to the pre-trained language lexicon.

[0107] S206e: The server prunes the pre-trained language lexicon with added corpus to obtain the updated input method lexicon.

[0108] The method for updating the input method dictionary provided in this application embodiment is specifically implemented through (1) to (3).

[0109] (1) Using a pre-trained language model, such as the transformer pre-trained language model, artificial corpora similar to the keep list are generated based on negative example corpora. The specific generation method is as follows:

[0110] Positive labels are added to the keep list, and negative labels are added to the bad list to form training data. Table 1 shows a label-text correspondence table provided in an embodiment of this application.

[0111] Table 1

[0112]

[0113]

[0114] Fine-tune on labeled training data to obtain a large pre-trained language model (BERT / GPT2 / BART). For GPT2, the goal is to perform generation tasks; for BERT, the goal is to predict the masked words.

[0115] Using the fine-tuned language model, new data can be generated with class labels and several initial characters as prompts for the model. For example, the first 3 initial characters of each piece of training data in the keep list are used to perform data augmentation on the training data. For BERT, 1 to 2 random positions of each piece of data are masked to perform data augmentation. For instance, for the phrase "cannot fill in the blanks" with a positive label added, the last two syllables can be masked, and data augmentation is performed using the first three syllables as training data to generate the corpus "cannot fill in the blanks well".

[0116] (2) Add the generated corpus to the pre-trained language lexicon for training.

[0117] (3) Train the pre-trained language lexicon using a conventional method and perform pruning to obtain an updated input method lexicon. This input method lexicon has a stronger comprehension of the corpus in the keep list.

[0118] The input method lexicon updating method provided in the embodiments of the present application relies on data augmentation of the pre-trained model under the condition that the storage capacity of the electronic device is limited, and the downstream still uses the conventional language model and pruning scheme. In this way, not only the flexibility and richness brought by neural network generation are utilized, but also the stability and controllability of the language model are retained, making it more adapted to actual services. In addition, the self-learning process that does not require additional manual intervention can optimize the token distribution in the language model with limited storage capacity of the electronic device, and improve the word output effect of long sentences of the input method.

[0119] An embodiment of the present application provides an input method lexicon updating method, which is applied to an electronic device and includes:

[0120] S1. The electronic device displays N candidate words based on a first character string input on an input method interface.

[0121] S2. The electronic device receives a first input for a target candidate word among the N candidate words.

[0122] S3. In response to the first input, if the number of syllables included in the first string is greater than or equal to a preset value, the electronic device sends the target candidate word and the first candidate word to the server. The first candidate word is the candidate word ranked first among the N candidate words.

[0123] S4. Upon receiving the target input method dictionary from the server, the electronic device updates the original input method dictionary to the target input method dictionary, wherein the target input method dictionary is determined based on the candidate words selected by the user and the candidate word ranked first.

[0124] In this embodiment, after a long syllable string is input into the input method interface, in response to the selection of a target candidate word from N candidate words, the target candidate word and the first candidate word ranked first among the N candidate words are sent to the server. This allows the server to determine whether a new input method dictionary is obtained based on the target candidate word and the first candidate word, and, upon determining the new input method dictionary, to notify the device to update the original input method dictionary to the new dictionary. In this way, the input method dictionary is updated based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual needs and improving the input method's ability to output words for long sentences.

[0125] This application provides an input method dictionary update method, applied to a server, including:

[0126] S5. The server receives the target candidate word and the first candidate word sent by the electronic device. The first candidate word is the candidate word that ranks first among N candidate words. The target candidate word is the candidate word selected by the user from the N candidate words. The N candidate words are determined based on the first string. The number of syllables included in the first string is greater than or equal to a preset value.

[0127] S6. If the target candidate word is not the first candidate word, the server adds the first candidate word to the first list and adds the target candidate word to the second list. The first list includes at least one candidate word that has not been selected by the user and is ranked first, and the second list includes at least one candidate word that has been selected by the user and is not ranked first.

[0128] S7. If the probability that the target candidate word is not the first candidate word is greater than or equal to the preset probability, the server determines the target input method word library based on the first list and / or the second list.

[0129] S8, The server provides the target input method dictionary to the electronic device.

[0130] One possible implementation, S7, may specifically include: deleting the first and second category candidate words from the pre-trained language lexicon to obtain the target input method lexicon. Here, the first category candidate words are those whose relative entropy in the first list is less than or equal to a first threshold; the second category candidate words are those whose relative entropy in the second list is less than or equal to a second threshold; and the first threshold is greater than the second threshold.

[0131] Another possible implementation, S7 may specifically include: adding preset labels to candidate words in the second list; performing data augmentation on candidate words with preset labels to generate at least one corpus; adding at least one corpus to a pre-trained language lexicon; and pruning the pre-trained language lexicon with added corpus to obtain the target input method lexicon.

[0132] Optionally, adding the first candidate word to the first list and the target candidate word to the second list may specifically include: segmenting the first candidate word to obtain P word tuples, each of the P word tuples including at least two word elements; segmenting the target candidate word to obtain T word tuples, each of the T word tuples including at least two word elements; adding word tuples from the P word tuples that meet preset conditions to the first list; adding word tuples from the T word tuples that meet preset conditions to the second list; wherein the preset conditions are: all word elements included in the word tuples are word elements in the input method dictionary, and P and T are positive integers.

[0133] In this embodiment, after receiving the target candidate word and the first candidate word sent by the electronic device, the first candidate word and the target candidate word can be added to a first list and a second list respectively. If the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, a target input method dictionary is determined based on the first list and / or the second list, and the target input method dictionary is sent to the electronic device. This allows the electronic device to update its original input method dictionary to the target input method dictionary. Thus, the input method dictionary is updated based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual usage needs and improving the input method's ability to output words for long sentences.

[0134] It should be noted that the input method dictionary update method provided in this application embodiment can be executed by an input method dictionary update device, or a control module in the input method dictionary update device for executing the input method dictionary update method. This application embodiment uses the execution of the input method dictionary update method by an input method dictionary update device as an example to illustrate the input method dictionary update device provided in this application embodiment.

[0135] like Figure 3As shown in the figure, this application embodiment provides an input method dictionary update device 300. The device includes a display module 301, a receiving module 302, a communication module 303, and a processing module 304.

[0136] Display module 301 can be used to display N candidate words based on a first string input into the input method interface. Receiving module 302 can be used to receive a first input to the target candidate word among the N candidate words displayed by the display module. Communication module 303 can be used, in response to the first input received by receiving module 302, to send the target candidate word and a first candidate word to the server if the number of syllables in the first string is greater than or equal to a preset value. The first candidate word is the candidate word ranked first among the N candidate words. Processing module 304 can be used to update the original input method dictionary to the target input method dictionary when communication module 303 receives the target input method dictionary sent by the server. The target input method dictionary is determined based on the candidate words selected by the user and the candidate word ranked first.

[0137] This application provides an input method dictionary update device. After a user inputs a long syllable string into the input method interface, in response to selecting a target candidate word from N candidate words, the user sends the target candidate word and the first candidate word ranked first among the N candidate words to the server. This allows the server to determine whether a new input method dictionary is obtained based on the target candidate word and the first candidate word. If a new input method dictionary is determined, the server notifies the device to update the original input method dictionary to the new dictionary. This achieves updating the input method dictionary based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual needs and improving the input method's ability to output words for long sentences.

[0138] like Figure 4 As shown in the figure, this application embodiment provides an input method dictionary update device 400. The device includes a communication module 401 and a processing module 402.

[0139] The communication module 401 can be used to receive a target candidate word and a first candidate word sent by an electronic device. The first candidate word is the candidate word ranked first among N candidate words. The target candidate word is the candidate word selected by the user among the N candidate words. The N candidate words are determined based on a first string, and the number of syllables included in the first string is greater than or equal to a preset value.

[0140] The processing module 402 can be used to add the first candidate word to a first list and the target candidate word to a second list when the target candidate word received by the communication module 401 is not the first candidate word. The first list includes at least one candidate word that has not been selected by the user and is ranked first, and the second list includes at least one candidate word that has been selected by the user and is not ranked first.

[0141] The processing module 402 can also be used to determine the target input method word library based on the first list and / or the second list when the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability.

[0142] The communication module 401 can also be used to send the target input method dictionary to electronic devices.

[0143] Optionally, the processing module 402 can be specifically used to: delete the first type of candidate words and the second type of candidate words in the pre-trained language lexicon to obtain the target input method lexicon. The first type of candidate words are those whose relative entropy in the first list is less than or equal to a first threshold; the second type of candidate words are those whose relative entropy in the second list is less than or equal to a second threshold; and the first threshold is greater than the second threshold.

[0144] Optionally, the processing module 402 can be specifically used for:

[0145] Add preset tags to the candidate words in the second list;

[0146] Perform data augmentation on candidate words that have been labeled with preset tags to generate at least one corpus;

[0147] Add at least one corpus to the pre-trained language lexicon;

[0148] The pre-trained language lexicon with added corpus is pruned to obtain the target input method lexicon.

[0149] Optionally, the processing module 402 can be specifically used for:

[0150] Segment the first candidate word to obtain P word tuples, each of the P word tuples including at least two word elements;

[0151] Segment the target candidate words to obtain T word tuples, each of the T word tuples including at least two word elements;

[0152] Add the P word tuples that meet the preset conditions to the first list;

[0153] Add the T word tuples that meet the preset conditions to the second list;

[0154] The preset conditions are: all the words included in the word group are words in the input method's dictionary, and P and T are positive integers.

[0155] This application provides an input method dictionary update device. After receiving a target candidate word and a first candidate word sent by an electronic device, the device can add the first candidate word and the target candidate word to a first list and a second list, respectively. If the probability that the target candidate word is not a first candidate word is greater than or equal to a preset probability, the device determines a target input method dictionary based on the first list and / or the second list, and sends the target input method dictionary to the electronic device. This allows the electronic device to update its original input method dictionary to the target dictionary. In this way, the device updates the input method dictionary based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual needs and improving the word output efficiency of the input method for long sentences.

[0156] The input method dictionary update device in this application embodiment can be a device, a device or equipment with an operating system, or a component, integrated circuit, or chip in a terminal. This device or equipment can be a mobile terminal or a non-mobile terminal. For example, a mobile terminal can include, but is not limited to, the types of electronic devices 11 listed above, while a non-mobile terminal can be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the type of device.

[0157] The input method dictionary update device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0158] The input method dictionary update device provided in this application embodiment can achieve... Figure 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0159] Optionally, such as Figure 5As shown, this application embodiment also provides a communication device 500, including a processor 501, a memory 502, and a program or instructions stored in the memory 502 and executable on the processor 501. For example, when the communication device 500 is an electronic device, the program or instructions executed by the processor 501 implement the various processes of the above-described input method dictionary update method embodiment, and achieve the same technical effect. When the communication device 500 is a server, the program or instructions executed by the processor 501 implement the various processes of the above-described input method dictionary update method embodiment, and achieve the same technical effect; to avoid repetition, further details are omitted here.

[0160] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0161] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.

[0162] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0163] Display unit 106 can be used to display N candidate words based on the first string entered in the input method interface.

[0164] User input unit 107 can be used to receive the first input of the target candidate word among the N candidate words displayed by display unit 106.

[0165] The radio frequency unit 101 can be used to respond to the first input received by the user input unit 107, and send the target candidate word and the first candidate word to the server when the number of syllables included in the first string is greater than or equal to a preset value. The first candidate word is the candidate word ranked first among the N candidate words.

[0166] The processor 110 can be used to update the original input method dictionary to the target input method dictionary when the radio frequency unit 101 receives the target input method dictionary sent by the server, wherein the target input method dictionary is determined based on the candidate words selected by the user and the candidate words ranked first.

[0167] This application provides an electronic device whereby, after a user inputs a long syllable string into an input method interface, in response to selecting a target candidate word from N candidate words, the user sends the target candidate word and the first candidate word ranked first among the N candidate words to a server. This allows the server to determine whether a new input method dictionary is obtained based on the target candidate word and the first candidate word. Upon determining a new input method dictionary, the server notifies the device to update the original input method dictionary to the new dictionary. This achieves updating the input method dictionary based on the user's actual input, making the word order of candidate word groups corresponding to long strings more consistent with the user's actual needs and improving the input method's ability to output words for long sentences.

[0168] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here. The memory 109 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understandable that the aforementioned modem processor may not be integrated into the processor 110.

[0169] This application embodiment also provides a server, including a processor and a communication interface. The communication interface is used to receive a target candidate word and a first candidate word sent by an electronic device, wherein the first candidate word is the candidate word ranked first among N candidate words, and the target candidate word is the candidate word selected by the user from the N candidate words, wherein the N candidate words are determined based on a first string, and the number of syllables included in the first string is greater than or equal to a preset value. The processor is used to add the first candidate word to a first list and add the target candidate word to a second list when the target candidate word is not the first candidate word, wherein the first list includes at least one candidate word ranked first that has not been selected by the user, and the second list includes at least one candidate word ranked not first that has been selected by the user. The processor is also used to determine a target input method dictionary based on the first list and / or the second list when the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability. The communication interface is also used to send the target input method dictionary to the electronic device. This server embodiment corresponds to the above-described server method embodiment, and all implementation processes and methods of the above method embodiments can be applied to this server embodiment and can achieve the same technical effect.

[0170] Specifically, embodiments of this application also provide a server. For example... Figure 7 As shown, the server 700 includes an antenna 71, a radio frequency (RF) device 72, and a baseband device 73. The antenna 71 is connected to the RF device 72. In the uplink direction, the RF device 72 receives information through the antenna 71 and sends the received information to the baseband device 73 for processing. In the downlink direction, the baseband device 73 processes the information to be transmitted and sends it to the RF device 72. The RF device 72 processes the received information and then transmits it through the antenna 71.

[0171] The aforementioned frequency band processing device can be located in the baseband device 73. The method executed by the server in the above embodiments can be implemented in the baseband device 73, which includes a processor 74 and a memory 75.

[0172] The baseband device 73 may include, for example, at least one baseband board on which multiple chips are disposed, such as... Figure 7 As shown, one of the chips, for example, is a processor 74, which is connected to a memory 75 to call the program in the memory 75 and execute the server operations shown in the above method embodiment.

[0173] The baseband device 73 may also include a network interface 76 for exchanging information with the radio frequency device 72, such as a common public radio interface (CPRI).

[0174] Specifically, the server in this embodiment of the invention further includes: instructions or programs stored in memory 75 and executable on processor 74, wherein processor 74 invokes the instructions or programs in memory 75 to execute... Figure 4 The methods executed by each module shown achieve the same technical effect, and to avoid repetition, they will not be described in detail here.

[0175] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described input method dictionary update method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0176] The processor is the processor in the electronic device or server described in the embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described input method dictionary update method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0178] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0179] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0180] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0181] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An input method dictionary update method, applied to electronic devices, characterized in that, The method includes: Display N candidate words based on the first string entered in the input method interface; Receive the first input for the target candidate word from the N candidate words; In response to the first input, if the number of syllables in the first string is greater than or equal to a preset value, the target candidate word and the first candidate word are sent to the server, wherein the first candidate word is the candidate word ranked first among the N candidate words; Upon receiving the target input method dictionary sent by the server, the original input method dictionary is updated to the target input method dictionary. The target input method dictionary is determined by the server based on the first list and / or the second list after adding the first candidate word to the first list and adding the target candidate word to the second list when the target candidate word is not the first candidate word. The first list includes at least one candidate word that was not selected by the user and is ranked first, while the second list includes at least one candidate word that was selected by the user and is not ranked first.

2. An input method dictionary update method, applied to a server, characterized in that, The method includes: The system receives a target candidate word and a first candidate word sent by an electronic device. The first candidate word is the candidate word that ranks first among N candidate words. The target candidate word is the candidate word selected by the user from the N candidate words. The N candidate words are determined based on a first string, and the number of syllables in the first string is greater than or equal to a preset value. If the target candidate word is not the first candidate word, the first candidate word is added to the first list and the target candidate word is added to the second list, wherein the first list includes at least one candidate word that has not been selected by the user and is ranked first, and the second list includes at least one candidate word that has been selected by the user and is not ranked first. If the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability, the target input method word library is determined according to the first list and / or the second list. The target input method dictionary is sent to the electronic device.

3. The method according to claim 2, characterized in that, The step of determining the target input method vocabulary based on the first list and / or the second list includes: The first and second candidate words in the pre-trained language lexicon are deleted to obtain the target input method lexicon. Wherein, the first type of candidate words are candidate words whose relative entropy is less than or equal to a first threshold and included in the first list; the second type of candidate words are candidate words whose relative entropy is less than or equal to a second threshold and included in the second list; and the first threshold is greater than the second threshold.

4. The method according to claim 2, characterized in that, The step of determining the target input method vocabulary based on the first list and / or the second list includes: Add preset tags to the candidate words in the second list; Data augmentation processing is performed on candidate words that have been labeled with the preset tags to generate at least one corpus; Add at least one of the corpora to the pre-trained language lexicon; The pre-trained language lexicon with added corpus is pruned to obtain the target input method lexicon.

5. The method according to any one of claims 2 to 4, characterized in that, Adding the first candidate word to the first list and adding the target candidate word to the second list includes: The first candidate word is segmented to obtain P word tuples, each of the P word tuples including at least two word elements; The target candidate word is segmented to obtain T word tuples, and each of the T word tuples includes at least two word elements. Add the P word tuples that meet the preset conditions to the first list; Add the T word tuples that meet the preset conditions to the second list; The preset conditions are as follows: all the lexical units included in the lexical unit group are lexical units in the input method lexicon, and P and T are positive integers.

6. An input method dictionary update device, characterized in that, The device includes a display module, a receiving module, a communication module, and a processing module; The display module is used to display N candidate words based on the first string entered in the input method interface; The receiving module is configured to receive a first input to the target candidate word among the N candidate words displayed by the display module; The communication module is configured to respond to the first input received by the receiving module, and send the target candidate word and the first candidate word to the server when the number of syllables included in the first string is greater than or equal to a preset value. The first candidate word is the candidate word ranked first among the N candidate words. The processing module is configured to update the original input method dictionary to the target input method dictionary when the communication module receives the target input method dictionary sent by the server. The target input method dictionary is determined by the server based on the first list and / or the second list after adding the first candidate word to the first list and adding the target candidate word to the second list when the target candidate word is not the first candidate word. The first list includes at least one candidate word that was not selected by the user and is ranked first, while the second list includes at least one candidate word that was selected by the user and is not ranked first.

7. An input method dictionary update device, characterized in that, The device includes a communication module and a processing module; The communication module is used to receive a target candidate word and a first candidate word sent by an electronic device, wherein the first candidate word is the candidate word ranked first among N candidate words, the target candidate word is the candidate word selected by the user from the N candidate words, and the N candidate words are determined based on a first string, wherein the number of syllables included in the first string is greater than or equal to a preset value. The processing module is configured to add the first candidate word to a first list and add the target candidate word to a second list when the target candidate word received by the communication module is not the first candidate word, wherein the first list includes at least one candidate word that has not been selected by the user and is ranked first, and the second list includes at least one candidate word that has been selected by the user and is not ranked first. The processing module is further configured to determine the target input method word library based on the first list and / or the second list when the probability that the target candidate word is not the first candidate word is greater than or equal to a preset probability. The communication module is also used to send the target input method dictionary to the electronic device.

8. The apparatus according to claim 7, characterized in that, The processing module is specifically used for: The first and second candidate words in the pre-trained language lexicon are deleted to obtain the target input method lexicon. Wherein, the first type of candidate words are candidate words whose relative entropy is less than or equal to a first threshold and included in the first list; the second type of candidate words are candidate words whose relative entropy is less than or equal to a second threshold and included in the second list; and the first threshold is greater than the second threshold.

9. The apparatus according to claim 7, characterized in that, The processing module is specifically used for: Add preset tags to the candidate words in the second list; Data augmentation processing is performed on candidate words that have been labeled with the preset tags to generate at least one corpus; Add at least one of the corpora to the pre-trained language lexicon; The pre-trained language lexicon with added corpus is pruned to obtain the target input method lexicon.

10. The apparatus according to any one of claims 7 to 9, characterized in that, The processing module is specifically used for: The first candidate word is segmented to obtain P word tuples, each of the P word tuples including at least two word elements; The target candidate word is segmented to obtain T word tuples, and each of the T word tuples includes at least two word elements. Add the P word tuples that meet the preset conditions to the first list; Add the T word tuples that meet the preset conditions to the second list; The preset conditions are as follows: all the lexical units included in the lexical unit group are lexical units in the input method lexicon, and P and T are positive integers.

11. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the input method dictionary update method as described in claim 1.

12. A server, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the input method dictionary update method as described in any one of claims 2 to 5.

13. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the input method dictionary update method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Associating inputting method and device and electronic equipment used for realizing associating inputting

    CN107340880A

  • Method and device for predicting input information, and program storage medium

    JP2000348141A