A candidate item sorting method and device

By obtaining the probability values ​​of candidate strings and candidates and fusion, the problem of unreasonable candidate sorting in the existing technology is solved, and more reasonable candidate sorting is achieved, and the user's input experience is improved.

CN113157107BActive Publication Date: 2025-02-14BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010015403.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-07
Publication Date
2025-02-14
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

The existing input method is relatively stiff when sorting candidates, resulting in unreasonable sorting and affecting the user's input experience.

Method used

By obtaining the probability value of the candidate string and the probability value of the candidate, the probability value of the target candidate is fused with the probability value of the corresponding candidate string to obtain the final score, and the candidates are sorted according to the score.

Benefits of technology

This makes candidate sorting more reasonable, fully considers the factors that affect candidate sorting, and improves the user's input experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113157107B_ABST
    Figure CN113157107B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a candidate item sorting method and device. Specifically, first, a candidate string is obtained, and the candidate string may include an original string (a string input by a user) and an associative string corresponding to the original string. For any candidate string, the probability value of each candidate string is obtained; a candidate item corresponding to each candidate string is generated, and the probability value of each candidate item is obtained. For any candidate item, it is used as a target candidate item, and the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item are merged to obtain the final score corresponding to the target candidate item. Finally, the candidate items are sorted according to the final score of each candidate item. That is, when sorting the candidate items, the probability value of the string itself is considered, and the probability value of a candidate item appearing under the string is also considered, so that the candidate item sorting is more reasonable and the user's input experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a candidate item sorting method and device. Background Art

[0002] With the popularization of terminal devices, users will perform a large number of input operations in the terminal devices. Usually, input methods can be used for input, and input methods refer to encoding methods used to input various symbols into computers or other devices.

[0003] Specifically, the input method client can provide matching candidate items according to the string input by the user, so that the user can select the desired content to input the content. However, the existing input method uses a relatively rigid method to sort the candidate items, which makes the sorting unreasonable and thus fails to provide the user with more accurate candidate items, affecting the user experience. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a candidate item sorting method and device to make the candidate item sorting more reasonable and improve the user's input experience.

[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0006] A candidate item ranking method, the method comprising:

[0007] Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string;

[0008] Obtaining a probability value of the candidate character string;

[0009] Generate candidate items corresponding to the candidate character string;

[0010] Obtaining a probability value of the candidate item;

[0011] The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0012] The candidate items are sorted according to their final scores.

[0013] In a possible implementation, the associative character string includes an error correction character string and a prediction character string;

[0014] The obtaining the probability value of the candidate character string includes:

[0015] When the candidate character string is the original character string, calculating the probability value of the original character string;

[0016] When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string;

[0017] When the candidate character string is the predicted character string, a probability value of the predicted character string is obtained.

[0018] In a possible implementation manner, calculating the probability value of the original character string includes:

[0019] Obtaining a probability value of inputting a first character under a condition where a first coordinate is triggered as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate obtained when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string;

[0020] and / or, obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string;

[0021] The probability value of the original character string is determined according to the first probability value of the original character string and / or the second probability value of the original character string.

[0022] In a possible implementation manner, the error correction string is a string generated by replacing the third character in the original string with the fourth character, and obtaining the probability value of the error correction string includes:

[0023] A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

[0024] In a possible implementation manner, obtaining the probability value of the predicted character string includes:

[0025] The probability that the predicted character string is input when the original character string is input is acquired as a probability value of the predicted character string.

[0026] In a possible implementation, generating a candidate item corresponding to the candidate character string includes:

[0027] sorting the probability values ​​of the candidate character strings, and determining a preset number of candidate character strings that are sorted first as target candidate character strings;

[0028] Generate candidate items corresponding to the target candidate character string.

[0029] In a possible implementation manner, obtaining the probability value of the candidate item includes:

[0030] According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0031] In a possible implementation manner, obtaining the probability value of the candidate item includes:

[0032] According to the historical data of the current user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0033] A candidate item sorting device, the device comprising:

[0034] A first acquisition unit is used to acquire a candidate character string, wherein the candidate character string includes an original character string and an associated character string corresponding to the original character string;

[0035] A second acquisition unit, used to acquire the probability value of the candidate character string;

[0036] A generating unit, used to generate candidate items corresponding to the candidate character string;

[0037] A third acquisition unit, used to acquire the probability value of the candidate item;

[0038] a fourth acquisition unit, configured to merge the probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0039] A sorting unit is used to sort each of the candidate items according to the final score of each of the candidate items.

[0040] In a possible implementation, the associative string includes an error correction string and a predicted string; the second acquisition is specifically used to, when the candidate string is the original string, calculate the probability value of the original string; when the candidate string is the error correction string, obtain the probability value of the error correction string; when the candidate string is the predicted string, obtain the probability value of the predicted string.

[0041] In a possible implementation, the second acquiring unit includes:

[0042] A first acquisition subunit is configured to acquire a probability value of inputting a first character under a condition of triggering a first coordinate as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate acquired when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string; and / or;

[0043] A second acquisition subunit is used to acquire a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; and multiply the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string;

[0044] The first determining subunit is configured to determine the probability value of the original character string according to the first probability value of the original character string and / or the second probability value of the original character string.

[0045] In a possible implementation, the error correction string is a string generated by replacing the third character in the original string with a fourth character, and the second acquisition unit is specifically used to obtain a probability value of replacing the third character with the fourth character when a fifth character exists, as the probability value of the error correction string, and the fifth character is one or more characters adjacent to the fourth character in the string and before the fourth character.

[0046] In a possible implementation manner, the second acquisition unit is specifically configured to acquire a probability of inputting the predicted character string when the original character string is input, as a probability value of the predicted character string.

[0047] In a possible implementation, the generating unit includes:

[0048] A sorting subunit, used to sort the probability values ​​of the candidate character strings, and determine a preset number of candidate character strings that are sorted first as target candidate character strings;

[0049] The generating subunit is used to generate candidate items corresponding to the target candidate character string.

[0050] In a possible implementation, the third acquisition unit is specifically configured to acquire, based on the historical data of each user, the probability of selecting the candidate item when the original character string is input, as the probability value of the candidate item.

[0051] In a possible implementation, the third acquisition unit is specifically configured to acquire, based on historical data of the current user, a probability of selecting the candidate item when the original character string is input, as the probability value of the candidate item.

[0052] A device for sorting candidate items includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:

[0053] Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string;

[0054] Obtaining a probability value of the candidate character string;

[0055] Generate candidate items corresponding to the candidate character string;

[0056] Obtaining a probability value of the candidate item;

[0057] The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0058] The candidate items are sorted according to their final scores.

[0059] A computer-readable medium stores instructions which, when executed by one or more processors, enable a device to execute the candidate item sorting method.

[0060] It can be seen that the embodiments of the present application have the following beneficial effects:

[0061] The embodiment of the present application first obtains a candidate string, which may include an original string (a string input by the user) and an associative string corresponding to the original string. Then, for any candidate string, obtain the probability value of each candidate string; generate candidate items corresponding to each candidate string, and obtain the probability value of each candidate item. For any candidate item, use it as the target candidate item, merge the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item, and obtain the final score corresponding to the target candidate item. Finally, sort the candidates according to the final score of each candidate item. That is, the candidate item sorting method provided by the embodiment of the present application, when sorting the candidate items, considers the probability value of the string itself, and also considers the probability value of a candidate item appearing under the string, so that the candidate item sorting is more reasonable and improves the user's input experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0063] Figure 2 A flowchart of a candidate item sorting method provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of keyboard distribution provided in an embodiment of the present application;

[0065] Figure 4 A structural diagram of a candidate item sorting device provided in an embodiment of the present application;

[0066] Figure 5 A structural diagram of another candidate item sorting device provided in an embodiment of the present application;

[0067] Figure 6 A server structure is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0069] To facilitate understanding of the technical solution provided by this application, the background technology involved in this application will be described below.

[0070] The inventors found in the study of traditional candidate sorting methods that there are two main methods for traditional candidate sorting: 1. Fixing the position of special candidates, that is, fixing a special candidate at a certain position of the candidate; 2. Performing a word frequency penalty on special candidates, and then mixing them with ordinary candidates. Among them, ordinary candidates can refer to candidates generated by the original string input by the user, special candidates can refer to candidates generated after association or error correction of the original string input by the user, and word frequency penalty can refer to subtracting a fixed value from the word frequency of the original word. However, these two sorting methods are relatively rigid and unreasonable. For example, the string input by the user is "lnuwen", and "paper" in the candidate is a candidate generated after error correction of the original string. This candidate is more in line with the content that the user actually wants to input and should be ranked in a relatively forward position, but the above two methods will rank the word "paper" in a relatively backward position.

[0071] Based on this, the embodiment of the present application provides a candidate item sorting method, which takes the original string and the associated string corresponding to the original string as candidate strings, obtains the probability value corresponding to each candidate string and the probability value of the candidate item corresponding to the candidate string. Then, the probability value of each candidate string and the probability value of the candidate item corresponding to the string are merged to obtain the final score of the candidate item, and the final score is used for sorting, so that the sorting of the candidate items is more reasonable. That is, when sorting the candidate items, both the probability value of the string and the probability value of a candidate item appearing under the string are considered, so that the factors affecting the sorting of the candidate items are fully considered, so that the final sorting result is more reasonable, and the user experience is improved.

[0072] For ease of understanding of the embodiments of this application, see Figure 1 , which is a schematic diagram of a framework of an exemplary application scenario provided by an embodiment of the present application. The candidate item ranking method provided by an embodiment of the present application can be applied to the server 20 or the client 10.

[0073] Specifically, when applied to the client 10, when the user inputs the original string through the client 10, the client 10 obtains the original string and the associated string corresponding to the original string, and uses it as a candidate string. For each candidate string, the probability value of each candidate string is obtained, and the candidate item corresponding to the candidate string is generated. Then, the probability value of each candidate item is obtained, and the probability value of the candidate string and the probability value of the candidate item corresponding to the candidate string are merged to obtain the final score of the candidate item corresponding to each candidate string. Finally, based on the final score of each candidate item, the candidate items are sorted so that the sorted candidate items are displayed to the user through the terminal device.

[0074] When applied to the server 20, the user inputs the original string through the client 10, obtains the associated string corresponding to the original string, and sends it as a candidate string to the server 20. After obtaining the candidate string, the server 20 obtains the probability value of each candidate string, generates a candidate item corresponding to each candidate string, and obtains the probability value of each candidate item. The server 20 then determines the final score of each candidate item based on the probability value of the candidate item and the probability value of the candidate string corresponding to the candidate item, so as to sort the candidate items according to the final score of each candidate item, and sends the sorting result to the client 10.

[0075] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.

[0076] It should be noted that the client 10 can be any user device that is currently available, under development, or developed in the future, and can interact with each other through any form of wired and / or wireless connection (e.g., Wi-Fi, LAN, cellular, coaxial cable, etc.), including but not limited to: smart wearable devices, smart phones, non-smart phones, tablet computers, laptop personal computers, desktop personal computers, minicomputers, mid-size computers, mainframe computers, etc. that are currently available, under development, or developed in the future. The implementation of the present application is not limited in this regard. It should also be noted that the server 20 in the embodiment of the present application can be an example of a device that is currently available, under development, or developed in the future and can provide input to the user. The implementation of the present application is not limited in this regard.

[0077] To facilitate understanding of the technical solution provided in the embodiment of the present application, the candidate item sorting method provided in the embodiment of the present application will be described below with reference to the accompanying drawings.

[0078] See also Figure 2 , which is a flow chart of a candidate item sorting method provided in an embodiment of the present application. Figure 2 As shown, the method may include:

[0079] S201: Obtain candidate character strings.

[0080] In this embodiment, firstly, a candidate string is obtained, which may include an original string and an associated string corresponding to the original string. That is, the candidate string includes both the original string input by the user and the associated string provided by the input method according to the original string.

[0081] Specifically, the associative string may include an error correction string and a predicted string, wherein the error correction string refers to a string obtained after the original string input by the user is corrected, for example, the original string input by the user is "nihai", and the generated error correction string is "nihao". The predicted string refers to a string including the original string obtained by predicting the original string input by the user, for example, the original string input by the user is "zhongguo", and the generated predicted string may be "zhongguoren" or "zhongguohaoshengyin", etc.

[0082] The implementation method of obtaining the corresponding error correction string and the predicted string according to the original string can refer to the traditional acquisition method, which will not be described in detail in this embodiment.

[0083] S202: Obtain the probability value of the candidate character string.

[0084] S203: Generate candidate items corresponding to the candidate character string.

[0085] S204: Obtain the probability value of the candidate item.

[0086] In this embodiment, after obtaining each candidate string, the probability value of each candidate string is obtained. At the same time, candidate items corresponding to each candidate string are generated, and the probability value of each candidate item is obtained. The specific implementation method for obtaining the probability value of each candidate string will be described in the subsequent embodiments.

[0087] It is understandable that in some application scenarios, a large number of candidate strings may be obtained. When generating candidate items corresponding to the candidate strings, a large number of candidate items will be generated, which increases the amount of calculation for subsequent sorting. In order to reduce the amount of calculation and improve the efficiency of sorting, when generating candidate items corresponding to the candidate strings, the candidate strings can be sorted first according to the probability values ​​of the candidate strings, and the preset number of candidate strings that are sorted first are determined as the target strings; and the candidate items corresponding to the target candidate strings are generated. That is, the candidate strings are first sorted in descending order according to the probability values, and some of the candidate strings that are sorted first are used as the target strings to generate candidate items corresponding to the target strings, thereby reducing the number of generated candidate items and improving the efficiency of subsequent work. Among them, the preset number can be set according to the actual application situation. For example, the 10 candidate strings that are sorted first are used as the target strings, which is not limited in this embodiment.

[0088] It is understandable that, usually, each candidate string can match multiple candidate items, and the user can select a desired candidate item from the multiple candidate items.

[0089] Therefore, in a possible implementation, the probability of selecting the candidate item when the original string is input can be obtained according to the historical data of each user as the probability value of the candidate item. After the user inputs an original string, the first type of candidate items corresponding to the original string and the second type of candidate items corresponding to the associated string of the original string can usually be generated, and these two types of candidate items together constitute the candidate items. In the historical data of each user, the probability of each candidate item being selected after the original string is input can be statistically obtained, and the probability value of each candidate item can be obtained. For example, the original string "daijia" is input, and the original string corresponds to the associated string "dajia", then the candidate items corresponding to the original string and the associated string can include "cost", "driver" and "everyone". Then, according to the historical data of each user, the probability of each candidate item being selected can be obtained, such as the probability value of "cost" being selected, the probability value of "driver" being selected, and the probability value of "everyone" being selected, and the corresponding probability value of being selected is used as the probability value of the candidate item.

[0090] In actual applications, users have obvious differences in individual habits when inputting. For example, some users generally do not select the candidate corresponding to the associated string. When obtaining the probability value of the candidate, the historical data of the current user can be used as a basis for statistics to obtain the probability value of the candidate. That is, based on the historical data of the current user, the probability of selecting the candidate when the original string is input can be obtained as the probability value of the candidate.

[0091] It is understandable that when generating candidate items corresponding to the candidate string, the longer word is actually obtained by combining several basic words corresponding to the string. The longer word is the candidate item, and the probability value corresponding to the candidate item is the probability value of the above-mentioned several basic words existing at the same time. For example, there are three basic words a1, b1 and c1, then the probability value of the candidate item P = P(a1b1c1). In actual calculation, the Bayesian formula can be used to approximately convert it into calculating P(a1)*P(a1b1)*P(b1)*P(b1c1)*P(c1). Among them, P(a1), P(b1), P(c1) are unigram probability models, and P(a1b1), P(b1c1) are binary probability models. It is understandable that when there are multiple basic words, more unigram probability models such as unigram probability model, binary probability model, ternary probability model, etc. will be used when calculating the probability value of the candidate item.

[0092] S205: The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item.

[0093] After obtaining the probability value of each candidate string and the probability value of the candidate item corresponding to the candidate string, any candidate item is taken as the target candidate item, and the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item are fused to obtain the final score corresponding to each target candidate item.

[0094] Specifically, when performing probability value fusion, the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item can be multiplied, and the product can be used as the final score corresponding to the target candidate item. For example, the probability value of target candidate item 1 is p1, and the probability value of candidate string 1 corresponding to target candidate item 1 is p2, then the final score corresponding to the target candidate item is p1*p2. Alternatively, the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item are taken logarithmically, and then the two logarithmic results are added to obtain the final score of the target candidate item. For example, the probability value of target candidate item 1 is p1, and the probability value of candidate string 1 corresponding to target candidate item 1 is p2, and the final score corresponding to the target candidate item is logp1+logp2. In practical applications, the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item can also be weighted according to actual conditions, and the probability value of the target candidate item and the probability value of the candidate string corresponding to the target candidate item are weightedly fused.

[0095] S206: Sort the candidate items according to their final scores.

[0096] After obtaining the final score of each candidate, the candidates are sorted according to the final score of each candidate to achieve a more reasonable candidate sorting.

[0097] It can be seen from the above embodiments that the original character string and the associated character string corresponding to the original character string are used as candidate characters, and the probability value corresponding to each candidate character string and the probability value of the candidate item corresponding to the candidate character string are obtained. Then, the probability value of each candidate character string and the probability value of the candidate item corresponding to the character string are merged to obtain the final score of the candidate item, and the final score is used for sorting, so that the candidate items are more reasonable. That is, when sorting the candidate items, both the probability value of the character string and the probability value of a candidate item appearing under the character string are considered, so that the factors affecting the sorting of the candidate items are fully considered, so that the final sorting result is more reasonable and the user experience is improved.

[0098] It is understandable that the candidate character string includes both the original character string and the corresponding associated character string, wherein the associated character string includes the error correction character string and the predicted character string. As for how to obtain the probability value of the candidate character string, the original character string, the error correction character string and the predicted character string will be described below respectively.

[0099] 1. When the candidate string is the original string, calculate the probability value of the original string, including:

[0100] 1) Obtaining a probability value of inputting a first character under a condition of triggering a first coordinate as a first probability value of the first character, and multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string.

[0101] When the user inputs characters through the keyboard, the probability value of the first character being input when the user taps a certain keyboard coordinate is obtained, and the probability value is used as the first probability value of the first character. Figure 3 As shown, each character corresponds to a certain area on the keyboard, and each point in the area corresponds to a keyboard coordinate. When a certain character is triggered, a specific point on the keyboard will be triggered, and the keyboard coordinates corresponding to the triggered character can be obtained. For example, when the user triggers the character "n", the position marked by "·" on the keyboard in the figure is triggered. When the coordinates of the point are (x, y), the probability value p(n|(x, y)) of inputting the first character "n" can be obtained. Among them, the first coordinate is the keyboard coordinate obtained when the first character is input, and the first character is each character in the original string.

[0102] After obtaining the probability value of each character in the original string, the first probability values ​​of each character are multiplied to obtain the first probability value of the original string. For example, if the original string input by the user is "nihao", which has 5 characters, the first probability value corresponding to each of the 5 characters is multiplied to obtain the first probability value of "nihao".

[0103] The probability value of inputting the first character under the condition of triggering the first coordinate can be obtained by a key coordinate model, and the key coordinate model can be trained by a traditional method.

[0104] 2) Obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, and multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string.

[0105] In this embodiment, for each character in the original string, the character is taken as the first character, and the probability value of inputting the first character after inputting the second character is obtained as the second probability value of the first character, thereby obtaining the second probability value corresponding to each character in the original string. That is, the probability of inputting the first character under the condition of inputting the second character is obtained. For example, if the second character is a and the first character is b, then the second probability value corresponding to the first character b is p(b|a).

[0106] Among them, for the first character in the original string, the second probability value of the character as the first character is obtained. For example, the original string is "nihao", for the character "n", the second probability value of the character as the first character is obtained; for the character "i", the second probability value of entering "i" after entering the character "n" is obtained; for the character "h", the second probability value of entering "h" after entering the character "i" is obtained. It should be noted that in the specific implementation, a big data statistical method can be used to obtain the probability value of entering the first character after entering the second character, or a character-level language model can be used to obtain the probability value of entering the first character after entering the second character. The character-level language model can be obtained by a traditional model training method.

[0107] After obtaining the second probability value corresponding to each character in the original character string, the second probability values ​​of all characters are multiplied to obtain the second probability value of the original character string.

[0108] 3) Determine the probability value of the original character string according to the first probability value of the original character string and / or the second probability value of the original character string.

[0109] After obtaining the first probability value and / or the second probability value of the original string, the probability value of the original string can be determined. Specifically, when only the first probability value of the original string is obtained, the first probability value of the original string is determined as the probability value of the original string; when only the second probability value of the original string is obtained, the second probability value of the original string is determined as the probability value of the original string; when both the first probability value and the second probability value of the original string are obtained, the probability value of the original string is determined based on the above two probability values. In specific implementation, the product of the above two probability values ​​can be determined as the probability value of the original string, or the probability value of the original string can be determined by other calculation methods, which is not limited in this embodiment.

[0110] 2. When the candidate string is an error correction string, wherein the error correction string is a string generated by replacing the third character in the original string with the fourth character, obtaining the probability value of the error correction string may include: obtaining the probability value of replacing the third character with the fourth character in the presence of the fifth character as the probability value of the error correction string. The fifth character is one or more characters adjacent to and before the fourth character. That is, the probability of the current character y1 being corrected to the character z1 in the case of a certain character x1 is calculated, that is, P(y1->z1|x1), wherein x1 is the fifth character, y1 is the third character, and z1 is the fourth character. For example, the string input by the user is "nihai", which is corrected to "nihao", and P(i->o|a) or P(i->o|ha) is calculated. It should be noted that in actual calculation, whether the fifth character is one character or multiple characters can be set according to the actual application situation, and this embodiment does not limit it here.

[0111] In a specific implementation, a probability value of replacing the third character with the fourth character when the fifth character exists can be obtained through a big data statistical method, or the original string is input into an error correction model to obtain a probability value of replacing the third character with the fourth character when the fifth character exists in the original string. The error correction model can be obtained by using a corpus through a traditional model training method.

[0112] 3. When the candidate string is a predicted string, obtaining the probability value of the predicted string includes: obtaining the probability of inputting the predicted string when the original string is input as the probability value of the predicted string. The predicted string may include the original string. That is, the probability value of inputting a longer string B under the condition of a certain string A is calculated, where the string A is a prefix of the string B. For example, if the original string input is "zhongguo" and the predicted string is "zhongguohaoshengyin", the probability value of the predicted string is P(zhongguohaoshengyin|zhongguo).

[0113] In specific implementation, the probability value of a user selecting a longer string including the above string when inputting a string can be obtained through a big data statistical method, and the probability value can be used as the probability value of the longer string, wherein the longer string is the predicted string. Alternatively, the original string is input into a long string prediction model to obtain the probability value of the predicted string, and the long string prediction model can be obtained using a traditional model training method.

[0114] Based on the above method embodiment, the present application also provides a candidate item sorting device, which will be described below in conjunction with the accompanying drawings.

[0115] See also Figure 4 , which is a structural diagram of a candidate item sorting device provided in an embodiment of the present application, such as Figure 4 As shown, the device may include:

[0116] A first acquisition unit 401 is used to acquire a candidate character string, wherein the candidate character string includes an original character string and an associated character string corresponding to the original character string;

[0117] A second acquisition unit 402 is used to acquire the probability value of the candidate character string;

[0118] A generating unit 403 is used to generate candidate items corresponding to the candidate character string;

[0119] The third acquisition unit 404 is used to acquire the probability value of the candidate item;

[0120] A fourth acquisition unit 405 is used to merge the probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0121] The sorting unit 406 is used to sort the candidate items according to their final scores.

[0122] In a possible implementation, the associative string includes an error correction string and a predicted string; the second acquisition is specifically used to, when the candidate string is the original string, calculate the probability value of the original string; when the candidate string is the error correction string, obtain the probability value of the error correction string; when the candidate string is the predicted string, obtain the probability value of the predicted string.

[0123] In a possible implementation, the second acquiring unit includes:

[0124] A first acquisition subunit is configured to acquire a probability value of inputting a first character under a condition of triggering a first coordinate as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate acquired when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string; and / or;

[0125] A second acquisition subunit is used to acquire a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; and multiply the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string;

[0126] The first determining subunit is configured to determine the probability value of the original character string according to the first probability value of the original character string and / or the second probability value of the original character string.

[0127] In a possible implementation, the error correction string is a string generated by replacing the third character in the original string with a fourth character, and the second acquisition unit is specifically used to obtain a probability value of replacing the third character with the fourth character when a fifth character exists, as the probability value of the error correction string, and the fifth character is one or more characters adjacent to the fourth character in the string and before the fourth character.

[0128] In a possible implementation manner, the second acquisition unit is specifically configured to acquire a probability of inputting the predicted character string when the original character string is input, as a probability value of the predicted character string.

[0129] In a possible implementation, the generating unit includes:

[0130] A sorting subunit, used to sort the probability values ​​of the candidate character strings, and determine a preset number of candidate character strings that are sorted first as target candidate character strings;

[0131] The generating subunit is used to generate candidate items corresponding to the target candidate character string.

[0132] In a possible implementation, the third acquisition unit is specifically configured to acquire, based on the historical data of each user, the probability of selecting the candidate item when the original character string is input, as the probability value of the candidate item.

[0133] In a possible implementation, the third acquisition unit is specifically configured to acquire, based on historical data of the current user, a probability of selecting the candidate item when the original character string is input, as the probability value of the candidate item.

[0134] It should be noted that the implementation of each unit in this embodiment can refer to the above method embodiment, and this embodiment will not be repeated here.

[0135] Figure 5 1 shows a block diagram of a candidate item sorting device 600. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0136] Reference Figure 5, the device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 69 , a sensor component 614 , and a communication component 616 .

[0137] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 606 and the processing component 602.

[0138] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0139] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.

[0140] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0141] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0142] The I / O interface provides an interface between the processing component 602 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0143] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0144] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0145] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the following methods:

[0146] Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string;

[0147] Obtaining a probability value of the candidate character string;

[0148] Generate candidate items corresponding to the candidate character string;

[0149] Obtaining a probability value of the candidate item;

[0150] The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0151] The candidate items are sorted according to their final scores.

[0152] Optionally, the associative character string includes an error correction character string and a prediction character string;

[0153] The obtaining the probability value of the candidate character string includes:

[0154] When the candidate character string is the original character string, calculating the probability value of the original character string;

[0155] When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string;

[0156] When the candidate character string is the predicted character string, a probability value of the predicted character string is obtained.

[0157] Optionally, calculating the probability value of the original character string includes:

[0158] Obtaining a probability value of inputting a first character under a condition where a first coordinate is triggered as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate obtained when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string;

[0159] and / or, obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string;

[0160] The probability value of the original character string is determined according to the first probability value of the original character string and / or the second probability value of the original character string.

[0161] Optionally, the error correction string is a string generated by replacing the third character in the original string with the fourth character, and obtaining the probability value of the error correction string includes:

[0162] A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

[0163] Optionally, obtaining the probability value of the predicted character string includes:

[0164] The probability that the predicted character string is input when the original character string is input is acquired as a probability value of the predicted character string.

[0165] Optionally, generating candidate items corresponding to the candidate character string includes:

[0166] sorting the probability values ​​of the candidate character strings, and determining a preset number of candidate character strings that are sorted first as target candidate character strings;

[0167] Generate candidate items corresponding to the target candidate character string.

[0168] Optionally, obtaining the probability value of the candidate item includes:

[0169] According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0170] Optionally, obtaining the probability value of the candidate item includes:

[0171] According to the historical data of the current user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0172] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a candidate item ranking method, the method comprising:

[0173] Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string;

[0174] Obtaining a probability value of the candidate character string;

[0175] Generate candidate items corresponding to the candidate character string;

[0176] Obtaining a probability value of the candidate item;

[0177] The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items;

[0178] The candidate items are sorted according to their final scores.

[0179] Optionally, the associative character string includes an error correction character string and a prediction character string;

[0180] The obtaining the probability value of the candidate character string includes:

[0181] When the candidate character string is the original character string, calculating the probability value of the original character string;

[0182] When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string;

[0183] When the candidate character string is the predicted character string, a probability value of the predicted character string is obtained.

[0184] Optionally, calculating the probability value of the original character string includes:

[0185] Obtaining a probability value of inputting a first character under a condition where a first coordinate is triggered as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate obtained when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string;

[0186] and / or, obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string;

[0187] The probability value of the original character string is determined according to the first probability value of the original character string and / or the second probability value of the original character string.

[0188] Optionally, the error correction string is a string generated by replacing the third character in the original string with the fourth character, and obtaining the probability value of the error correction string includes:

[0189] A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

[0190] Optionally, obtaining the probability value of the predicted character string includes:

[0191] The probability that the predicted character string is input when the original character string is input is acquired as a probability value of the predicted character string.

[0192] Optionally, generating candidate items corresponding to the candidate character string includes:

[0193] sorting the probability values ​​of the candidate character strings, and determining a preset number of candidate character strings that are sorted first as target candidate character strings;

[0194] Generate candidate items corresponding to the target candidate character string.

[0195] Optionally, obtaining the probability value of the candidate item includes:

[0196] According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0197] Optionally, obtaining the probability value of the candidate item includes:

[0198] According to the historical data of the current user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item.

[0199] Figure 67 is a schematic diagram of the structure of the server in the embodiment of the present invention. The server 700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 722 (for example, one or more processors) and memory 732, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 742 or data 744. Among them, the memory 732 and the storage medium 730 can be temporary storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 722 can be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the server 700.

[0200] The terminal 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input and output interfaces 756, one or more keyboards 756, and / or one or more operating systems 741, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0201] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0202] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0203] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0204] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0205] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A candidate item ranking method, characterized in that: The method comprises: Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string; Get the probability value of each candidate string; Generate candidate items corresponding to the candidate character string; Obtaining a probability value of the candidate item; The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items; Sorting each of the candidate items according to the final score of each of the candidate items; Wherein, obtaining the probability value of the candidate item includes: According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item, wherein after an original character string is input, a first category of candidate items corresponding to the original character string and a second category of candidate items corresponding to the associated character string of the original character string are generated, the first category of candidate items and the second category of candidate items together constitute the candidate items, and the probability value of the candidate item is the probability of the candidate item being selected after the original character string is input, which is obtained by statistics in the historical data of the user; Wherein, the associated character string includes an error correction character string and a prediction character string; The obtaining the probability value of the candidate character string includes: When the candidate character string is the original character string, calculating the probability value of the original character string; When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string; When the candidate character string is the predicted character string, obtaining a probability value of the predicted character string, which includes: obtaining a probability of inputting the predicted character string when the original character string is input, as the probability value of the predicted character string; The step of calculating the probability value of the original character string includes: Obtaining a probability value of inputting a first character under a condition where a first coordinate is triggered as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate obtained when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string; and / or, obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string; determining a probability value of the original character string according to the first probability value of the original character string and / or the second probability value of the original character string; The error correction string is a string generated by replacing the third character in the original string with the fourth character, and obtaining the probability value of the error correction string includes: A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

2. The method according to claim 1, characterized in that Generating candidate items corresponding to the candidate character string, including: sorting the probability values ​​of the candidate character strings, and determining a preset number of candidate character strings that are sorted first as target candidate character strings; Generate candidate items corresponding to the target candidate character string.

3. A candidate item ranking device, characterized in that: The device comprises: A first acquisition unit is used to acquire a candidate character string, wherein the candidate character string includes an original character string and an associated character string corresponding to the original character string; A second acquisition unit is used to obtain a probability value of each candidate character string; A generating unit, used to generate candidate items corresponding to the candidate character string; A third acquisition unit, used to acquire the probability value of the candidate item; a fourth acquisition unit, configured to merge the probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items; A sorting unit, used for sorting each of the candidate items according to the final score of each of the candidate items; Wherein, the third acquisition unit is specifically used for: According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item, wherein after an original character string is input, a first category of candidate items corresponding to the original character string and a second category of candidate items corresponding to the associated character string of the original character string are generated, the first category of candidate items and the second category of candidate items together constitute the candidate items, and the probability value of the candidate item is the probability of the candidate item being selected after the original character string is input, which is obtained by statistics in the historical data of the user; Wherein, the associated character string includes an error correction character string and a prediction character string; The second acquisition unit is specifically used for: When the candidate character string is the original character string, calculating the probability value of the original character string; When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string; When the candidate character string is the predicted character string, obtaining a probability value of the predicted character string, which includes: obtaining a probability of inputting the predicted character string when the original character string is input, as the probability value of the predicted character string; Wherein, the second acquisition unit includes: A first acquisition subunit is configured to acquire a probability value of inputting a first character under a condition of triggering a first coordinate as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate acquired when the first character is input, and the first character is each character in the original character string; and multiply the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string; and / or, a second acquisition subunit, configured to acquire a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; and multiply the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string; a first determining subunit, configured to determine a probability value of the original character string according to a first probability value of the original character string and / or a second probability value of the original character string; The error correction character string is a character string generated by replacing the third character in the original character string with the fourth character, and the second acquisition unit is specifically used to: A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

4. The device according to claim 3, characterized in that The generating unit comprises: A sorting subunit, used to sort the probability values ​​of the candidate character strings, and determine a preset number of candidate character strings that are sorted first as target candidate character strings; The generating subunit is used to generate candidate items corresponding to the target candidate character string.

5. A device for sorting candidate items, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Obtaining candidate character strings, the candidate character strings including an original character string and an associated character string corresponding to the original character string; Get the probability value of each candidate string; Generate candidate items corresponding to the candidate character string; Obtaining a probability value of the candidate item; The probability value of the target candidate item and the probability value of the candidate character string corresponding to the target candidate item are merged to obtain a final score corresponding to the target candidate item, wherein the target candidate item is one of the candidate items; Sorting each of the candidate items according to the final score of each of the candidate items; Wherein, obtaining the probability value of the candidate item includes: According to the historical data of each user, the probability of selecting the candidate item when the original character string is input is obtained as the probability value of the candidate item, wherein after an original character string is input, a first category of candidate items corresponding to the original character string and a second category of candidate items corresponding to the associated character string of the original character string are generated, the first category of candidate items and the second category of candidate items together constitute the candidate items, and the probability value of the candidate item is the probability of the candidate item being selected after the original character string is input, which is obtained by statistics in the historical data of the user; Wherein, the associated character string includes an error correction character string and a prediction character string; The obtaining the probability value of the candidate character string includes: When the candidate character string is the original character string, calculating the probability value of the original character string; When the candidate character string is the error correction character string, obtaining a probability value of the error correction character string; When the candidate character string is the predicted character string, obtaining a probability value of the predicted character string, which includes: obtaining a probability of inputting the predicted character string when the original character string is input, as the probability value of the predicted character string; The step of calculating the probability value of the original character string includes: Obtaining a probability value of inputting a first character under a condition where a first coordinate is triggered as a first probability value of the first character, wherein the first coordinate is a keyboard coordinate obtained when the first character is input, and the first character is each character in the original character string; multiplying the first probability values ​​of the characters in the original character string to obtain the first probability value of the original character string; and / or, obtaining a probability value of inputting the first character after inputting the second character as a second probability value of the first character, wherein the first character is each character in the original character string; multiplying the second probability values ​​of the characters in the original character string to obtain the second probability value of the original character string; determining a probability value of the original character string according to the first probability value of the original character string and / or the second probability value of the original character string; The error correction string is a string generated by replacing the third character in the original string with the fourth character, and obtaining the probability value of the error correction string includes: A probability value of replacing the third character with the fourth character when a fifth character exists is obtained as the probability value of the error correction character string, wherein the fifth character is one or more characters adjacent to the fourth character string and before the fourth character.

6. A computer-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to perform the method for ranking candidate items as claimed in claim 1 or 2.

Citation Information

Patent Citations

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

    CN107340880A

  • Input error correction method and device

    CN110488990A