Recommendation method, device and electronic device
By calculating the cost information of word group candidates and other candidates in the input sequence, the display order of word group candidates is optimized, which solves the problem of inappropriate display of word group candidates in existing input methods and improves user input efficiency.
Patent Information
- Application Number
- CN202011396354.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-12-03
AI Technical Summary
When the existing input method displays word combination candidates, the conditional probability relies too much on the frequency of clicks by users across the network, resulting in the candidates required by some users not being prioritized and reducing input efficiency.
By obtaining the input sequence, combine and split the word group candidates, calculate the cost information of the word group candidates and other candidates, judge their display position and recommendability, and recommend the word group candidates based on the first cost information and the second cost information. , increasing its display priority.
It improves the recommendation quality of word group candidates, improves user input efficiency, and ensures that users get more suitable input candidates.
Smart Images

Figure CN114594861B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of input methods, and in particular to a recommendation method, device and electronic equipment. Background Art
[0002] With the development of computer technology, electronic devices such as mobile phones and tablet computers are becoming more and more popular, bringing great convenience to people's life, study and work. These electronic devices are usually installed with input method applications (input methods for short), so that users can use the input methods to input information.
[0003] When using the input method, the input method will convert the input sequence into corresponding words. The input method can first convert the input sequence into a unigram term; when the input sequence cannot completely match the unigram term, or the conditional probability of obtaining the unigram term is less than a threshold, the input sequence can be decoded into a word composed of two or more unigram terms to obtain the corresponding word group candidates. The word group candidates with conditional probabilities greater than the threshold are then displayed before the unigram terms.
[0004] However, the conditional probability of a word combination candidate is determined based on the frequency of users across the entire network clicking on the word combination candidate; for some users, the word combination candidate may not be the candidate they need, which will affect the user's screen placement of system words and reduce input efficiency. Summary of the invention
[0005] The embodiment of the present invention provides a recommendation method to improve input efficiency.
[0006] Correspondingly, the embodiment of the present invention further provides a recommendation device and an electronic device to ensure the implementation and application of the above method.
[0007] In order to solve the above problems, an embodiment of the present invention discloses a recommendation method, which specifically includes: obtaining an input sequence; grouping words based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word group candidates and obtaining second cost information for not recommending the word group candidates; and recommending the word group candidates based on the first cost information and the second cost information.
[0008] Optionally, the method also includes: converting the input sequence to determine corresponding other candidates, the other candidates including candidates other than the word group candidate; obtaining the second cost information of not recommending the word group candidate, including: determining the first display position of the other candidates when the word group candidate is not recommended; based on the first display position of the other candidates, obtaining the corresponding on-screen cost information of the other candidates; based on the corresponding on-screen cost information of the other candidates, determining the second cost information of not recommending the word group candidate.
[0009] Optionally, determining the second cost information of not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates includes: obtaining the conditional probabilities corresponding to the other candidates; and determining the second cost information of not recommending the word combination candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
[0010] Optionally, the obtaining of the first cost information for recommending the word combination candidate includes: determining the second display positions of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; obtaining the upper-screen cost information corresponding to the word combination candidate and the other candidates based on the second display positions of the word combination candidate and the other candidates; and determining the first cost information for recommending the word combination candidate based on the upper-screen cost information corresponding to the word combination candidate and the other candidates.
[0011] Optionally, the recommending the word group candidate based on the first cost information and the second cost information includes: judging whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, not displaying the word group candidate; if the second cost information is greater than the first cost information, displaying the word group candidate.
[0012] Optionally, the recommendation of the word combination candidate based on the first cost information and the second cost information includes: when it is determined that the second cost information is greater than the first cost information, judging whether the difference between the second cost information and the first cost information is greater than a preset threshold; if the difference between the second cost information and the first cost information is greater than the preset threshold, displaying the word combination candidate; if the difference between the second cost information and the first cost information is less than the preset threshold, not displaying the word combination candidate.
[0013] An embodiment of the present invention also discloses a recommendation device, which specifically includes: a first acquisition module, used to acquire an input sequence; a second acquisition module, used to group words based on the input sequence to obtain word group candidates; and to acquire first cost information for recommending the word group candidates and to acquire second cost information for not recommending the word group candidates; a recommendation module, used to recommend the word group candidates based on the first cost information and the second cost information.
[0014] Optionally, the device also includes: a conversion module, used to convert the input sequence and determine corresponding other candidates, and the other candidates include candidates other than the word group candidate; the second acquisition module includes: a second cost information acquisition submodule, used to determine the first display position of the other candidates when the word group candidate is not recommended; based on the first display position of the other candidates, obtain the upper screen cost information corresponding to the other candidates; based on the upper screen cost information corresponding to the other candidates, determine the second cost information of not recommending the word group candidate.
[0015] Optionally, the second cost information acquisition submodule is used to obtain the conditional probabilities corresponding to the other candidates; and determine the second cost information for not recommending the word group candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
[0016] Optionally, the second acquisition module includes: a first cost information acquisition submodule, used to determine the second display position of the word group candidate and the other candidates if the word group candidate is displayed before the other candidates; based on the second display position of the word group candidate and the other candidates, obtain the corresponding on-screen cost information of the word group candidate and the other candidates; based on the corresponding on-screen cost information of the word group candidate and the other candidates, determine the first cost information for recommending the word group candidate.
[0017] Optionally, the recommendation module includes: a first candidate recommendation submodule, used to determine whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, the word group candidate is not displayed; if the second cost information is greater than the first cost information, the word group candidate is displayed.
[0018] Optionally, the recommendation module includes: a second candidate recommendation sub-module, used to determine whether the difference between the second cost information and the first cost information is greater than a preset threshold when the second cost information is greater than the first cost information; if the difference between the second cost information and the first cost information is greater than the preset threshold, the word group candidate is displayed; if the difference between the second cost information and the first cost information is less than the preset threshold, the word group candidate is not displayed.
[0019] An embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a recommendation method as described in any one of the embodiments of the present invention.
[0020] An embodiment of the present invention also discloses an electronic device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: obtaining an input sequence; grouping words based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word group candidates and obtaining second cost information for not recommending the word group candidates; and recommending the word group candidates based on the first cost information and the second cost information.
[0021] Optionally, it also includes instructions for performing the following operations: converting the input sequence to determine corresponding other candidates, the other candidates including candidates other than the word combination candidate; obtaining the second cost information of not recommending the word combination candidate, including: when determining that the word combination candidate is not recommended, the first display position of the other candidates; based on the first display position of the other candidates, obtaining the corresponding on-screen cost information of the other candidates; based on the corresponding on-screen cost information of the other candidates, determining the second cost information of not recommending the word combination candidate.
[0022] Optionally, determining the second cost information of not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates includes: obtaining the conditional probabilities corresponding to the other candidates; and determining the second cost information of not recommending the word combination candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
[0023] Optionally, the obtaining of the first cost information for recommending the word combination candidate includes: determining the second display positions of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; obtaining the upper-screen cost information corresponding to the word combination candidate and the other candidates based on the second display positions of the word combination candidate and the other candidates; and determining the first cost information for recommending the word combination candidate based on the upper-screen cost information corresponding to the word combination candidate and the other candidates.
[0024] Optionally, the recommending the word group candidate based on the first cost information and the second cost information includes: judging whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, not displaying the word group candidate; if the second cost information is greater than the first cost information, displaying the word group candidate.
[0025] Optionally, the recommendation of the word combination candidate based on the first cost information and the second cost information includes: when it is determined that the second cost information is greater than the first cost information, judging whether the difference between the second cost information and the first cost information is greater than a preset threshold; if the difference between the second cost information and the first cost information is greater than the preset threshold, displaying the word combination candidate; if the difference between the second cost information and the first cost information is less than the preset threshold, not displaying the word combination candidate.
[0026] The embodiments of the present invention include the following advantages:
[0027] In an embodiment of the present invention, after obtaining an input sequence, word grouping can be performed based on the input sequence to obtain word group candidates; and first cost information for recommending the word group candidates and second cost information for not recommending the word group candidates can be obtained; then, based on the first cost information and the second cost information, it can be determined whether the recommended word group candidates can improve input efficiency, so as to recommend the word group candidates; so as to improve the recommendation quality of the word group candidates, thereby improving user input efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flowchart of steps of a recommended method embodiment of the present invention;
[0029] Figure 2 is a flowchart of steps of an optional embodiment of a recommended method of the present invention;
[0030] Figure 3 is a flowchart of steps of another preferred method optional embodiment of the present invention;
[0031] Figure 4 is a structural block diagram of a recommended device embodiment of the present invention;
[0032] Figure 5 is a structural block diagram of an optional embodiment of a recommended device of the present invention;
[0033] Figure 6 A structural block diagram of an electronic device for recommendation according to an exemplary embodiment;
[0034] Figure 7 FIG. 4 is a schematic structural diagram of an electronic device for recommendation according to another exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0036] One of the core concepts of the embodiments of the present invention is to recommend word combination candidates by considering whether the recommended word combination candidates can improve input efficiency, thereby improving the recommendation quality of word combination candidates and improving user input efficiency.
[0037] Reference Figure 1 , shows a flowchart of a recommended method embodiment of the present invention, which may specifically include the following steps:
[0038] Step 102: Obtain an input sequence.
[0039] In the embodiment of the present invention, when a user uses an input method to input, an input sequence input by the user can be obtained.
[0040] The input sequence is user input content directly received by the input method system. The input method system can convert these input contents into word candidates of the input text according to the input method currently used by the user, and provide them to the user for selection.
[0041] In actual processing, the user can use a variety of input methods, such as pinyin input, stroke input, Wubi input, voice input, and handwriting input. The user can complete the input of the input sequence through any of the above input methods. For input methods such as pinyin input, stroke input, and Wubi input, the input sequence is usually a coded string input by the user through a keyboard, touch screen, etc.; for handwriting input, the input sequence can be a movement trajectory input by the user through a handwriting board, touch screen, etc. The embodiment of the present invention does not limit the user's input method, and the user can use any input method.
[0042] Step 104 , group words based on the input sequence to obtain word group candidates; and obtain first cost information for recommending the word group candidates and obtain second cost information for not recommending the word group candidates.
[0043] Step 106: Recommend the word group candidates based on the first cost information and the second cost information.
[0044] In an embodiment of the present invention, after acquiring the input sequence, the input sequence can be split into two or more subsequences; then each subsequence is converted separately to obtain corresponding word candidates. Then, according to the splitting order of each subsequence, the word candidates corresponding to each subsequence are combined to obtain the word group candidates of the input sequence. Among them, the word group candidate can be one or more, and the embodiment of the present invention does not limit this. Of course, after acquiring the input sequence, in addition to executing step 104, the input method can also generate other candidates based on the input sequence; the other candidates may refer to candidates other than the word group candidates.
[0045] In an embodiment of the present invention, after determining a word combination candidate, the cost information of each candidate (which may include other candidates and word combination candidates) in the candidate area on the user's screen can be obtained if the word combination candidate is recommended; and it is referred to as the first cost information. And the cost information of each candidate (which may include other candidates) in the candidate area on the user's screen can be obtained if the word combination candidate is not recommended; and it is referred to as the second cost information. Then, by comparing the first cost information and the second cost information, it can be determined whether the recommended word combination candidate can improve the input efficiency. If the recommended word combination candidate can improve the input efficiency, the word combination candidate can be recommended; if the recommended word combination candidate cannot improve the input efficiency, the word combination candidate can be not recommended and other candidates can be recommended.
[0046] In summary, in an embodiment of the present invention, after obtaining an input sequence, word grouping can be performed based on the input sequence to obtain word group candidates; and first cost information for recommending the word group candidates and second cost information for not recommending the word group candidates can be obtained; then, based on the first cost information and the second cost information, it can be determined whether the recommended word group candidates can improve input efficiency, so as to recommend the word group candidates; so as to improve the recommendation quality of the word group candidates, thereby improving user input efficiency.
[0047] Reference Figure 2 , shows a flowchart of an optional embodiment of a recommended method of the present invention, which may specifically include the following steps:
[0048] Step 202: Obtain an input sequence.
[0049] In the embodiment of the present invention, the input method may obtain input association information while obtaining the input sequence input by the user, and further determine the candidate items corresponding to the input sequence based on the input association information.
[0050] The input-related information may include information related to the input, such as input information, location information, time information, weather information, application-related information, information in the clipboard, etc., which is not limited in the embodiment of the present invention. When the current scene is a chat scene, the input-related information may also include interaction information, etc., which is not limited in the embodiment of the present invention. Of course, the input-related information may also include other information such as input scenes, which is not limited in the embodiment of the present invention.
[0051] In the embodiment of the present invention, after the input sequence is obtained, step 204 may be executed on the one hand; and step 206 may be executed on the other hand.
[0052] Step 204: group words based on the input sequence to obtain word group candidates.
[0053] In one example of the present invention, the input sequence can be first split into two or more subsequences, and then each subsequence can be converted separately. For example, when the input sequence is a pinyin string, phonetic-character conversion can be performed to obtain corresponding word candidates; and the word candidates corresponding to each subsequence can be combined to obtain word group candidates. The word group candidates are then screened based on the input association information.
[0054] In an example of the present invention, the input sequence can be first split into two or more subsequences, and then each subsequence is converted to obtain corresponding word candidates; and then the word candidates corresponding to each subsequence are combined based on the input association information to obtain word group candidates.
[0055] Step 206: Convert the input sequence to determine other corresponding candidates.
[0056] In one implementation of the present invention, the input sequence can be directly converted to determine other candidates corresponding to the input sequence; for example, when the input sequence is a pinyin string, the input sequence can be directly converted from phonetic characters to obtain corresponding other candidates. In one example, the input sequence can be matched with the input sequence of unigram terms to determine unigram candidates that match the input sequence; then the unigram candidates are used as other candidates. Among them, unigram terms can refer to any one of characters, words and sentences. Among them, the unigram candidates that match the input sequence can include unigram terms whose corresponding input sequence partially matches the input sequence input by the user, and can also include unigram terms whose corresponding input sequence completely matches the input sequence input by the user, and the embodiments of the present invention are not limited to this.
[0057] The other candidates may include one or more, which is not limited in the embodiment of the present invention.
[0058] In the embodiment of the present invention, the second cost information may refer to the cost information of each candidate (including other candidates) in the candidate area on the user screen if the word combination candidate is not recommended. Therefore, after determining the word combination candidate and other candidates, the second cost information of not recommending the word combination candidate can be obtained; refer to the following steps 208 to 212:
[0059] Step 208: When it is determined that the word group candidate is not recommended, the first display position of the other candidates.
[0060] Step 210: Obtain on-screen cost information corresponding to the other candidates according to the first display positions of the other candidates.
[0061] Step 212: Determine the second cost information for not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates.
[0062] While converting the input sequence and determining the corresponding other candidates, the conditional probability corresponding to each other candidate can also be determined; in an embodiment of the present invention, the display position of other candidates in the candidate area when the word group candidate is not recommended can be determined based on the conditional probability of other candidates. After determining the other candidates, the other candidates can be sorted according to the conditional probability of each other candidate; then, according to the sorting results of the other candidates, the display position of the other candidates in the candidate area is determined; that is, when the word group candidate is not recommended, the display position of each other candidate in the candidate area. For the convenience of subsequent explanation, the display position of each other candidate in the candidate area when the word group candidate is not recommended can be referred to as the first display position. Other candidates can be displayed from front to back according to the conditional probability from high to low; that is, the higher the conditional probability, the closer the first display position of the other candidates in the candidate area is.
[0063] In an embodiment of the present invention, the duration of the candidate on each screen and each position in the candidate area of the upper screen for the target user (the target user may include users of the entire network and / or group users and / or users who input the above input sequence) can be counted in advance; then, according to the duration of the candidate on each screen and each position on the upper screen for the target user, the upper screen cost information of the candidate on each screen and each position on the upper screen is determined. Among them, for a candidate displayed at each position on each screen, the duration of the candidate on the upper screen at this screen and this position can be the duration between the input method displaying the candidate in the candidate area and the displaying of the candidate on the upper screen at this screen and this position. Among them, the upper screen cost information of the candidate on the upper screen and this screen and this position can be determined according to the average duration of the candidate on the upper screen and this screen for the target user; the upper screen cost information corresponding to this screen and this position can be proportional to the average duration of the candidate on the upper screen and this screen and this position for the target user. Then, after determining the first display position of other candidates, for one other candidate, the upper screen cost information of the candidate on each screen and each position on the upper screen that is predetermined can be searched based on the first display position of the other candidate to determine the upper screen cost information corresponding to the other candidate.
[0064] Of course, after pre-counting the duration of the target user and the candidates on each screen and at each position in the upper screen candidate area, the upper screen cost information of the candidates on each screen and at each position of the upper screen can be temporarily determined; instead, when executing step 210, the upper screen cost information corresponding to the other candidates is obtained based on the first display position of the other candidates.
[0065] Wherein, the step 212 may include: obtaining the conditional probabilities corresponding to the other candidates; determining the second cost information of not recommending the word group candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates. For one other candidate, the conditional probability corresponding to the other candidate may be obtained, and then the product of the on-screen cost information and the conditional probability of the other candidate may be calculated. When there is one other candidate, the product of the on-screen cost information and the conditional probability of the other candidate may be used to determine the second cost information of the candidate in the user's on-screen candidate area when the word group candidate is not recommended. When there are multiple other candidates, the product of the on-screen cost information and the conditional probability of each other candidate may be added to obtain a sum value; then the sum value may be determined as the second cost information of the candidate in the user's on-screen candidate area when the word group candidate is not recommended.
[0066] In the embodiment of the present invention, the first cost information may refer to the cost information of each candidate (which may include other candidates and word combination candidates) in the candidate area on the user's upper screen if the word combination candidate is recommended. Therefore, after determining the word combination candidate and other candidates, the first cost information of not recommending the word combination candidate can be obtained; the following steps 214 to 218 can be referred to:
[0067] Step 214: if the word group candidate is to be displayed before the other candidates, determine a second display position of the word group candidate and the other candidates.
[0068] Step 216: Obtain the on-screen cost information corresponding to the word combination candidate and other candidates based on the second display positions of the word combination candidate and other candidates.
[0069] Step 218: Determine first cost information for recommending the word combination candidate based on the on-screen cost information corresponding to the word combination candidate and other candidates.
[0070] In the embodiment of the present invention, the first cost information corresponding to the recommended word combination candidate can be determined by displaying the word combination candidate before other candidates.
[0071] There are many ways to put the word group candidate before other candidates, including the following ways:
[0072] In an example, there is one candidate word group and multiple other candidates; this candidate word group can be ranked before all other candidates. For example, the candidate word group is X and the other candidates are A, B, C, and D; this candidate word group can be ranked before all other candidates, and X, A, B, C, and D can be obtained.
[0073] In an example, there is one candidate for word formation and multiple other candidates (e.g., N, where N is a positive integer greater than 1). If the first N1 other candidates among the other candidates completely match the input sequence input by the user, and the last N2 other candidates partially match the input sequence input by the user, where the sum of N1 and N2 is equal to N, and N1 and N2 are positive integers. Then this word formation candidate can be sorted after the first N1 other candidates and before the last N2 other candidates. For example, the word formation candidate is X, and the other candidates are: A, B, C, D; if A and B are other candidates that completely match the input sequence input by the user, and C and D are other candidates that partially match the input sequence input by the user; then this word formation candidate is sorted after the first N1 other candidates and before the last N2 other candidates, and A, B, X, C, D can be obtained.
[0074] In one example, there are multiple word group candidates and multiple other candidates. In an embodiment of the present invention, while grouping words based on the input sequence to obtain word group candidates, the conditional probability corresponding to each word group candidate can also be determined. The word group candidates can be sorted based on the conditional probabilities of each word group candidate. Then, each time a word group candidate with the highest conditional probability is selected from the remaining word group candidates, and the selected word group candidate is arranged after the last selected word group candidate and before all other candidates. For example, the word group candidates are X, Y and Z, and the other candidates are: A, B, C, D; if the conditional probabilities of X, Y and Z decrease in sequence, each time a word group candidate with the highest conditional probability is selected from the remaining word group candidates, and the selected word group candidate is arranged after the last selected word group candidate and before all other candidates, and X, Y, Z, A, B, C, D can be obtained.
[0075] In one example, there are multiple word group candidates and multiple other candidates. In an embodiment of the present invention, while grouping words based on the input sequence to obtain word group candidates, the conditional probability corresponding to each word group candidate can also be determined. The word group candidates can be sorted based on the conditional probability of each word group candidate. If the first N1 other candidates in the other candidates completely match the input sequence input by the user, and the last N2 other candidates partially match the input sequence input by the user, then after selecting the word group candidate with the highest conditional probability from the word group candidates for the first time, the group candidate can be ranked after the first N1 other candidates and before the last N2 other candidates. Each subsequent time, a word group candidate with the highest conditional probability is selected from the remaining word group candidates, and the selected word group candidate is ranked after the word group candidate selected last time and before the N2 other candidates. For example, the word group candidates are X, Y and Z, and the other candidates are: A, B, C, D; if A and B are other candidates that completely match the input sequence input by the user, and C and D are other candidates that partially match the input sequence input by the user; the conditional probabilities of X, Y and Z decrease in sequence. After selecting the candidate with the highest conditional probability from the candidate word group for the first time, the candidate word group can be ranked after the first N1 other candidates and before the last N2 other candidates, and A, B, X, C, and D can be obtained. Each subsequent time, a candidate word group with the highest conditional probability is selected from the remaining candidate word groups, and the selected candidate word group is ranked after the candidate word group selected last time and before the last N2 other candidates, and A, B, X, Y, Z, C, and D can be obtained.
[0076] When there are multiple word group candidates, after arranging each word group candidate before other candidates, the second display position of the word group candidate and other candidates can be determined; then, based on the second display positions of the word group candidate and other candidates, the corresponding on-screen cost information of the word group candidate and other candidates can be obtained; this is similar to the above-mentioned step 214 and will not be repeated here. Then, based on the on-screen cost information corresponding to the word group candidate and other candidates, the first cost information for recommending the word group candidate is determined. Among them, the step 218 may include: based on the on-screen cost information and conditional probability corresponding to the word group candidate and other candidates, determining the second cost information for not recommending the word group candidate. For one other candidate, the conditional probability corresponding to the other candidate can be obtained, and then the product of the on-screen cost information and the conditional probability of the other candidate is calculated. For one word group candidate, the conditional probability corresponding to the word group candidate can be obtained, and then the product of the on-screen cost information and the conditional probability of the word group candidate is calculated. Then, the product of the on-screen cost information and conditional probability of all other candidates can be added to the product of the on-screen cost information and conditional probability of all word combination candidates to obtain the sum value; then the sum value is determined as the first cost information of the candidate in the user's on-screen candidate area when recommending the word combination candidate.
[0077] Step 220: Determine whether the first cost information is greater than the second cost information.
[0078] If the first cost information is greater than the second cost information, step 222 is executed; if the second cost information is greater than the first cost information, step 224 is executed. When the first cost information is equal to the second cost information, either step 222 or step 224 may be executed, and this is not limited in the embodiment of the present invention.
[0079] When there are multiple word combination candidates, the corresponding first cost information may also include multiple ones; for each first cost information, it can be determined whether the first cost information is greater than the second cost information.
[0080] Step 222: Do not display the word group candidates.
[0081] In an embodiment of the present invention, if the first cost information of a word combination candidate is greater than the second cost information, it can be explained that when the word combination candidate is recommended, the cost information of each candidate in the user's upper screen candidate area is greater than the cost information of each candidate in the user's upper screen candidate area when the word combination candidate is not recommended; that is, recommending a word combination candidate cannot improve the efficiency of the candidate in the user's upper screen candidate area, that is, recommending a word combination candidate cannot improve the user input efficiency. At this time, the word combination candidate may not be displayed.
[0082] Step 224: display the word group candidates.
[0083] In an embodiment of the present invention, if the second cost information of a word group candidate is greater than the first cost information, it can be explained that when the word group candidate is not recommended, the cost information of each candidate in the user's upper screen candidate area is greater than the cost information of each candidate in the user's upper screen candidate area when the word group candidate is recommended; that is, recommending a word group candidate can improve the efficiency of the candidate in the user's upper screen candidate area, that is, recommending a word group candidate can improve the user's input efficiency. At this time, the word group candidate can be displayed. Among them, when the word group candidate includes multiple, since each word group candidate is displayed before other candidates, a first cost information can be obtained; therefore, the candidate first cost information less than the second cost information can be first searched from multiple first cost information. Then, the number of word group candidates corresponding to each candidate first cost information before other candidates can be determined; and then from each candidate first cost information, the candidate first cost information corresponding to the largest number of word group candidates before other candidates is determined as the target first cost information. Then, according to the way that the word group candidate corresponding to the target first cost information is arranged before other candidates, the corresponding word group candidate and other candidates are displayed.
[0084] Of course, when there are multiple word group candidates, steps 220 to 224 can be executed after multiple corresponding first cost information are obtained; steps 220 to 224 can also be executed after each first cost information is obtained, and after determining for the first time that the first cost information is greater than the second cost information, stop arranging the subsequent unselected word group candidates before other candidates; and display the corresponding word group candidates and other candidates in a manner such that the last first cost information is less than the second cost information and the corresponding word group candidate is arranged before other candidates.
[0085] In summary, in the embodiments of the present invention, in the process of obtaining the second cost information of not recommending the word combination candidate, the first display position of the other candidates when the word combination candidate is not recommended can be determined; then, based on the first display position of the other candidates, the corresponding on-screen cost information of the other candidates is obtained; then, based on the corresponding on-screen cost information of the other candidates, the second cost information of not recommending the word combination candidate is determined; and further, based on the on-screen cost information of the other candidates, the second cost information of the candidate in the user's on-screen candidate area when the word combination candidate is not recommended can be accurately determined.
[0086] Secondly, in the embodiment of the present invention, in the process of obtaining the first cost information for recommending the word combination candidate, it is determined that if the word combination candidate is displayed before the other candidates, the second display position of the word combination candidate and the other candidates is determined; then, based on the second display position of the word combination candidate and the other candidates, the corresponding on-screen cost information of the word combination candidate and the other candidates is obtained; and then, based on the corresponding on-screen cost information of the word combination candidate and the other candidates, the first cost information for recommending the word combination candidate is determined. Furthermore, by using the on-screen cost information of other candidates and the word combination candidate, the first cost information of the candidate in the user's on-screen candidate area when recommending the word combination candidate can be accurately determined.
[0087] Again, in an embodiment of the present invention, the conditional probabilities corresponding to the other candidates can be obtained; then, based on the on-screen cost information and conditional probabilities corresponding to the other candidates, the second cost information of not recommending the word combination candidate can be determined; and then, combined with the on-screen cost information and the conditional probability of the candidate, the second cost information of the candidate in the user's on-screen candidate area can be more accurately determined when the word combination candidate is not recommended.
[0088] Reference Figure 3 , shows a step flow chart of another optional embodiment of a recommended method of the present invention, which may specifically include the following steps:
[0089] Step 302: Obtain an input sequence.
[0090] Step 304: group words based on the input sequence to obtain word group candidates.
[0091] Step 306: Convert the input sequence to determine other corresponding candidates.
[0092] Step 308: When it is determined that the word group candidate is not recommended, the first display position of the other candidates.
[0093] Step 310: Obtain on-screen cost information corresponding to the other candidates according to the first display positions of the other candidates.
[0094] Step 312: Determine the second cost information for not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates.
[0095] Step 314: if the word group candidate is to be displayed before the other candidates, determine a second display position of the word group candidate and the other candidates.
[0096] Step 316: Obtain the on-screen cost information corresponding to the word combination candidate and other candidates based on the second display positions of the word combination candidate and other candidates.
[0097] Step 318: Determine first cost information for recommending the word combination candidate based on the on-screen cost information corresponding to the word combination candidate and other candidates.
[0098] Step 320: Determine whether the first cost information is greater than the second cost information.
[0099] Steps 302 to 320 are similar to the above-mentioned steps 202 to 220 and will not be described in detail here.
[0100] If the first cost information is greater than the second cost information, step 326 is executed; if the second cost information is greater than the first cost information, step 322 is executed. When the first cost information is equal to the second cost information, step 326 or step 322 may be executed, and the embodiment of the present invention does not limit this.
[0101] Step 322: Determine whether the difference between the second cost information and the first cost information is greater than a preset threshold.
[0102] In an embodiment of the present invention, if the second cost information is greater than the first cost information, it can be explained that when the word group candidate is not recommended, the cost information of each candidate in the user's upper screen candidate area is greater than the cost information of each candidate in the user's upper screen candidate area when the word group candidate is recommended; in order to further improve the user input efficiency, it can be determined whether the difference between the second cost information and the first cost information is greater than the preset threshold. If the difference between the second cost information and the first cost information is greater than the preset threshold, step 324 can be executed; if the difference between the second cost information and the first cost information is less than the preset threshold, step 326 can be executed; if the difference between the second cost information and the first cost information is equal to the preset threshold, step 324 can be executed, or step 326 can be executed, and the embodiment of the present invention does not limit this.
[0103] Step 324: display the word group candidates.
[0104] In an embodiment of the present invention, if the difference between the second cost information and the first cost information is greater than a preset threshold, it means that the recommended word combination candidate greatly improves the user input efficiency, and the word combination candidate can be displayed at this time; this is similar to the above step 222 and will not be repeated here.
[0105] Step 326: Do not display the word group candidates.
[0106] In an embodiment of the present invention, if the difference between the second cost information and the first cost information is greater than a preset threshold, it means that the recommended word combination candidate has little effect on improving the user input efficiency. At this time, it is not meaningful to display the word combination candidate. Therefore, the word combination candidate may not be displayed and only other candidates may be displayed. This is similar to the above-mentioned step 224 and will not be repeated here.
[0107] In summary, in the embodiments of the present invention, when it is determined that the second cost information is greater than the first cost information, it can be determined whether the difference between the second cost information and the first cost information is greater than a preset threshold; if the difference between the second cost information and the first cost information is greater than the preset threshold, the word group candidate is displayed; if the difference between the second cost information and the first cost information is less than the preset threshold, the word group candidate is not displayed; and then, whether to display the word group candidate can be determined based on the degree to which the recommended word group candidate improves the user input efficiency, which can further improve the quality of the recommended word group candidate, thereby further improving the user input efficiency.
[0108] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0109] Reference Figure 4 , shows a structural block diagram of an embodiment of a recommendation device of the present invention, which may specifically include the following modules:
[0110] A first acquisition module 402, used to acquire an input sequence;
[0111] The second acquisition module 404 is used to perform word grouping based on the input sequence to obtain word group candidates; and obtain first cost information for recommending the word group candidates and obtain second cost information for not recommending the word group candidates;
[0112] The recommendation module 406 is configured to recommend the word group candidates based on the first cost information and the second cost information.
[0113] Reference Figure 5 , showing a structural block diagram of an optional embodiment of a recommendation device of the present invention.
[0114] In an optional embodiment of the present invention, the device further comprises:
[0115] A conversion module 408, configured to convert the input sequence to determine corresponding other candidates, wherein the other candidates include candidates other than the word group candidate;
[0116] The second acquisition module 404 includes:
[0117] The second cost information acquisition submodule 4042 is used to determine the first display position of the other candidates when the word combination candidate is not recommended; based on the first display position of the other candidates, obtain the upper screen cost information corresponding to the other candidates; based on the upper screen cost information corresponding to the other candidates, determine the second cost information of not recommending the word combination candidate.
[0118] In an optional embodiment of the present invention, the second cost information acquisition submodule 4042 is used to obtain the conditional probabilities corresponding to the other candidates; based on the on-screen cost information and conditional probabilities corresponding to the other candidates, determine the second cost information for not recommending the word group candidate.
[0119] In an optional embodiment of the present invention, the second acquisition module 404 includes:
[0120] The first cost information acquisition submodule 4044 is used to determine the second display position of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; based on the second display positions of the word combination candidate and the other candidates, obtain the upper screen cost information corresponding to the word combination candidate and the other candidates; based on the upper screen cost information corresponding to the word combination candidate and the other candidates, determine the first cost information for recommending the word combination candidate.
[0121] In an optional embodiment of the present invention, the recommendation module 406 includes:
[0122] The first candidate recommendation submodule 4062 is used to determine whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, the word combination candidate is not displayed; if the second cost information is greater than the first cost information, the word combination candidate is displayed.
[0123] In an optional embodiment of the present invention, the recommendation module 406 includes:
[0124] The second candidate recommendation submodule 4064 is used to determine whether the difference between the second cost information and the first cost information is greater than a preset threshold when the second cost information is greater than the first cost information; if the difference between the second cost information and the first cost information is greater than the preset threshold, the word combination candidate is displayed; if the difference between the second cost information and the first cost information is less than the preset threshold, the word combination candidate is not displayed.
[0125] In an embodiment of the present invention, after obtaining an input sequence, word grouping can be performed based on the input sequence to obtain word group candidates; and first cost information for recommending the word group candidates and second cost information for not recommending the word group candidates can be obtained; then, based on the first cost information and the second cost information, it can be determined whether the recommended word group candidates can improve input efficiency, so as to recommend the word group candidates; so as to improve the recommendation quality of the word group candidates, thereby improving user input efficiency.
[0126] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0127] Figure 6 is a structural block diagram of an electronic device 600 for recommendation according to an exemplary embodiment. For example, the electronic 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.
[0128] Reference Figure 6, the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0129] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0130] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic 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.
[0131] The power component 606 provides power to the various components of the electronic device 600. The power component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0132] The multimedia component 608 includes a screen that provides an output interface between the electronic 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 electronic 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 the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0133] 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 electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice 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.
[0134] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0135] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0136] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic 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.
[0137] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0139] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a recommendation method, the method comprising: obtaining an input sequence; grouping words based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word group candidates and obtaining second cost information for not recommending the word group candidates; and recommending the word group candidates based on the first cost information and the second cost information.
[0140] Optionally, the method also includes: converting the input sequence to determine corresponding other candidates, the other candidates including candidates other than the word group candidate; obtaining the second cost information of not recommending the word group candidate, including: determining the first display position of the other candidates when the word group candidate is not recommended; based on the first display position of the other candidates, obtaining the corresponding on-screen cost information of the other candidates; based on the corresponding on-screen cost information of the other candidates, determining the second cost information of not recommending the word group candidate.
[0141] Optionally, determining the second cost information of not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates includes: obtaining the conditional probabilities corresponding to the other candidates; and determining the second cost information of not recommending the word combination candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
[0142] Optionally, the obtaining of the first cost information for recommending the word combination candidate includes: determining the second display positions of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; obtaining the upper-screen cost information corresponding to the word combination candidate and the other candidates based on the second display positions of the word combination candidate and the other candidates; and determining the first cost information for recommending the word combination candidate based on the upper-screen cost information corresponding to the word combination candidate and the other candidates.
[0143] Optionally, the recommending the word group candidate based on the first cost information and the second cost information includes: judging whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, not displaying the word group candidate; if the second cost information is greater than the first cost information, displaying the word group candidate.
[0144] Optionally, the recommendation of the word combination candidate based on the first cost information and the second cost information includes: when it is determined that the second cost information is greater than the first cost information, judging whether the difference between the second cost information and the first cost information is greater than a preset threshold; if the difference between the second cost information and the first cost information is greater than the preset threshold, displaying the word combination candidate; if the difference between the second cost information and the first cost information is less than the preset threshold, not displaying the word combination candidate.
[0145] Figure 7 : is a structural diagram of an electronic device 700 for recommendation according to another exemplary embodiment of the present invention. The electronic device 700 may be a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 722 (for example, one or more processors) and a memory 732, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 742 or data 744. Among them, the memory 732 and the storage medium 730 may be temporary storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processor 722 may be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the server.
[0146] The server may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input and output interfaces 758, one or more keyboards 756, and / or one or more operating systems 741, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0147] In an exemplary embodiment, the server is configured to execute one or more programs including instructions for performing the following operations by one or more central processors 722: obtaining an input sequence; grouping words based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word group candidates and obtaining second cost information for not recommending the word group candidates; and recommending the word group candidates based on the first cost information and the second cost information.
[0148] Optionally, it also includes instructions for performing the following operations: converting the input sequence to determine corresponding other candidates, the other candidates including candidates other than the word combination candidate; obtaining the second cost information of not recommending the word combination candidate, including: when determining that the word combination candidate is not recommended, the first display position of the other candidates; based on the first display position of the other candidates, obtaining the corresponding on-screen cost information of the other candidates; based on the corresponding on-screen cost information of the other candidates, determining the second cost information of not recommending the word combination candidate.
[0149] Optionally, determining the second cost information of not recommending the word combination candidate based on the on-screen cost information corresponding to the other candidates includes: obtaining the conditional probabilities corresponding to the other candidates; and determining the second cost information of not recommending the word combination candidate based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
[0150] Optionally, the obtaining of the first cost information for recommending the word combination candidate includes: determining the second display positions of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; obtaining the upper-screen cost information corresponding to the word combination candidate and the other candidates based on the second display positions of the word combination candidate and the other candidates; and determining the first cost information for recommending the word combination candidate based on the upper-screen cost information corresponding to the word combination candidate and the other candidates.
[0151] Optionally, the recommending the word group candidate based on the first cost information and the second cost information includes: judging whether the first cost information is greater than the second cost information; if the first cost information is greater than the second cost information, not displaying the word group candidate; if the second cost information is greater than the first cost information, displaying the word group candidate.
[0152] Optionally, the recommendation of the word combination candidate based on the first cost information and the second cost information includes: when it is determined that the second cost information is greater than the first cost information, judging whether the difference between the second cost information and the first cost information is greater than a preset threshold; if the difference between the second cost information and the first cost information is greater than the preset threshold, displaying the word combination candidate; if the difference between the second cost information and the first cost information is less than the preset threshold, not displaying the word combination candidate.
[0153] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0154] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0157] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0158] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0159] A recommended method, a recommended device and an electronic device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A recommendation method, It is characterized in that include: Get the input sequence; Perform word grouping based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word combination candidate and obtaining second cost information for not recommending the word combination candidate; Recommending the word group candidate based on the first cost information and the second cost information; The method further comprises: Converting the input sequence to determine corresponding other candidates, wherein the other candidates include candidates other than the word group candidate; The obtaining of the first cost information for recommending the word combination candidate includes: Determine a second display position of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; According to the second display positions of the word group candidate and other candidates, obtaining the corresponding on-screen cost information of the word group candidate and other candidates; Determining first cost information for recommending the word combination candidate based on the on-screen cost information corresponding to the word combination candidate and other candidates; The obtaining of the second cost information of not recommending the word combination candidate includes: When it is determined that the word combination candidate is not recommended, the first display position of the other candidates; According to the first display position of the other candidate, obtaining the on-screen cost information corresponding to the other candidate; The second cost information for not recommending the word combination candidate is determined according to the on-screen cost information corresponding to the other candidates.
2. The method according to claim 1, It is characterized in that The determining, based on the on-screen cost information corresponding to the other candidates, the second cost information of not recommending the word combination candidate includes: Obtaining conditional probabilities corresponding to the other candidates; The second cost information for not recommending the word group candidate is determined based on the on-screen cost information and conditional probabilities corresponding to the other candidates.
3. The method according to claim 1, It is characterized in that The recommending the word group candidates based on the first cost information and the second cost information includes: Determining whether the first cost information is greater than the second cost information; If the first cost information is greater than the second cost information, the word group candidate is not displayed; If the second cost information is greater than the first cost information, the word group candidate is displayed.
4. The method according to claim 1, It is characterized in that The recommending the word group candidates based on the first cost information and the second cost information includes: When it is determined that the second cost information is greater than the first cost information, determining whether a difference between the second cost information and the first cost information is greater than a preset threshold; If the difference between the second cost information and the first cost information is greater than a preset threshold, displaying the word group candidate; If the difference between the second cost information and the first cost information is smaller than a preset threshold, the word group candidate is not displayed.
5. A recommended device, It is characterized in that include: A first acquisition module, used for acquiring an input sequence; A second acquisition module, used for grouping words based on the input sequence to obtain grouping candidates; and obtaining first cost information for recommending the word combination candidate and obtaining second cost information for not recommending the word combination candidate; A recommendation module, configured to recommend the word group candidate based on the first cost information and the second cost information; The device also includes: A conversion module, used to convert the input sequence to determine corresponding other candidates, wherein the other candidates include candidates other than the word group candidates; The second acquisition module includes: The first cost information acquisition submodule is used to determine the second display position of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; based on the second display position of the word combination candidate and the other candidates, obtain the corresponding on-screen cost information of the word combination candidate and the other candidates; based on the corresponding on-screen cost information of the word combination candidate and the other candidates, determine the first cost information for recommending the word combination candidate; The second cost information acquisition submodule is used to determine the first display position of the other candidates when the word combination candidate is not recommended; based on the first display position of the other candidates, obtain the upper screen cost information corresponding to the other candidates; based on the upper screen cost information corresponding to the other candidates, determine the second cost information of not recommending the word combination candidate.
6. An electronic device, It is 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: Get the input sequence; Perform word grouping based on the input sequence to obtain word group candidates; and obtaining first cost information for recommending the word combination candidate and obtaining second cost information for not recommending the word combination candidate; Recommending the word group candidate based on the first cost information and the second cost information; The operations also include: Converting the input sequence to determine corresponding other candidates, wherein the other candidates include candidates other than the word group candidate; The obtaining of the first cost information for recommending the word combination candidate includes: Determine a second display position of the word combination candidate and the other candidates if the word combination candidate is displayed before the other candidates; According to the second display positions of the word group candidate and other candidates, obtaining the corresponding on-screen cost information of the word group candidate and other candidates; Determining first cost information for recommending the word combination candidate based on the on-screen cost information corresponding to the word combination candidate and other candidates; The obtaining of the second cost information of not recommending the word combination candidate includes: When it is determined that the word combination candidate is not recommended, the first display position of the other candidates; According to the first display position of the other candidate, obtaining the on-screen cost information corresponding to the other candidate; The second cost information for not recommending the word combination candidate is determined according to the on-screen cost information corresponding to the other candidates.
7. A readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the recommendation method as described in any one of method claims 1-4.
Citation Information
Patent Citations
Information recommendation method and device
CN105607756A
Candidate word recommendation method and apparatus
CN106896932A
