Input method, device and electronic device

By obtaining the input scene of the candidate word in the input method and adding a deletion mark, the problem of misrepresentation of gray words is solved and the user experience and input accuracy are improved.

CN114675748BActive Publication Date: 2024-09-27BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202111645546.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-06-03
Filing Date
2021-12-29
Publication Date
2024-09-27
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

During the user input process, existing input methods will mistakenly display gray words with special meanings, resulting in poor user experience, and it is difficult to completely block these words without affecting the user's normal expression.

Method used

By obtaining the candidate words and their input scenes, it is determined whether to add deletion marks for gray words, and the target candidate words are determined from the candidate words based on the input scenes and deletion marks and displayed to avoid the display of gray words.

Benefits of technology

It improves the user experience, avoids the incorrect display of gray words, and ensures that users can express content normally without affecting the convenience of input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114675748B_ABST
    Figure CN114675748B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide an input method, device and electronic device, wherein the method comprises: obtaining candidate words and input scenarios of the candidate words; when the candidate words contain gray words, determining whether to add a deletion mark for the candidate words according to the input scenario; the gray words are words with specific meanings included in the vocabulary; determining a target candidate word from the candidate words according to the deletion mark; and displaying the target candidate word. The gray words in the embodiments of the present invention are words with specific meanings included in the vocabulary. By adding deletion marks to candidate words containing gray words, and then determining the target candidate words to be displayed to the user according to the deletion marks, it is possible to avoid displaying the candidate words containing gray words to the user when they are not what the user actually wants to input, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 3, 2021, with application number 2021106210766 and invention name “An input method, device and electronic device”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The embodiments of the present invention relate to the technical field of input methods, and in particular to an input method, device and electronic device. Background Art

[0003] 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.

[0004] In practice, with the development of input methods, the words included in the vocabulary of input methods are constantly expanding. Among them, some words in the vocabulary are collected by operators, and some are collected by extracting content input by users. As the scale of users using input methods continues to expand, and the users of input methods include a variety of people, some words with special meanings are extracted and included in the vocabulary, and mistakenly displayed to users during the user input process, resulting in poor user experience. Summary of the invention

[0005] An embodiment of the present invention provides an input method to improve user experience.

[0006] Correspondingly, an embodiment of the present invention further provides an input 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 an input method, which specifically includes: obtaining candidate words and the input scenarios of the candidate words; when the candidate words contain gray words, determining whether to add a deletion mark for the candidate words based on the input scenario; the gray words are words with specific meanings included in the vocabulary; determining a target candidate word from the candidate words based on the deletion mark; and displaying the target candidate word.

[0008] Optionally, the obtaining of candidate words and the input scenarios of the candidate words include: obtaining user input information and candidate words corresponding to the input information; if the candidate word is a word combination composed of at least two words, determining the input scenario as a word combination scenario; if error correction is performed on the input information, determining the input scenario as an error correction scenario; if the input information is a simplified spelling, determining the input scenario as a simplified spelling scenario.

[0009] Optionally, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The method further includes: obtaining the gray vocabulary list corresponding to the input scenario; when the candidate word contains a word included in the gray vocabulary list, determining that the candidate word contains a gray word.

[0010] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is a word combination scenario, if the input information is input using a first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using a second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0011] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction contains a gray word, adding a deletion mark to the candidate word.

[0012] Optionally, determining whether to add a deletion mark for the candidate word according to the input scenario includes: when the input scenario is a simplified spelling scenario, determining a simplified spelling type corresponding to the simplified spelling scenario; and determining whether to add a deletion mark for the candidate word according to the simplified spelling type.

[0013] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is a specified abbreviation type, if the input information is input using the first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using the second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys in the first input method is less than the number of keys in the second input method.

[0014] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is not a specified abbreviation type, if the candidate word corresponding to the input information includes a gray word, adding a deletion mark to the candidate word.

[0015] Optionally, determining the target candidate word from the candidate words based on the deletion mark includes: obtaining the score and word grouping path corresponding to the candidate word; adjusting the score of the candidate word based on the number of links in the word grouping path; and determining the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0016] Optionally, the method further includes: if the candidate word includes a gray word, obtaining a preset penalty score; and adjusting the score of the candidate word according to the preset penalty score.

[0017] Optionally, determining a target candidate word from the candidate words based on the adjusted score and the deletion mark includes: if there is a candidate word without a deletion mark, determining the target candidate word from the candidate words without a deletion mark based on the adjusted score; if there is no candidate word without a deletion mark, determining the target candidate word from the candidate words with a deletion mark based on the adjusted score.

[0018] Optionally, it also includes: acquiring context information of the candidate word; analyzing the context information to determine semantics, and further determining whether the candidate word with the deletion mark added is a gray word based on the semantics, so as to determine whether to retain the deletion mark of the candidate word.

[0019] Optionally, the first input method includes a 9-key input method, and the second input method includes a 26-key input method.

[0020] Optionally, the abbreviation type includes at least one of a last-character abbreviation, a partial abbreviation and a complete abbreviation, and the last-character abbreviation is a designated abbreviation type.

[0021] The embodiment of the present invention further discloses an input device, comprising:

[0022] An acquisition module, used to acquire candidate words and input scenarios of the candidate words;

[0023] An adding module, used for determining whether to add a deletion mark to the candidate word according to the input scenario when the candidate word includes a gray word; the gray word is a word with a specific meaning included in the word library;

[0024] A determination module, used for determining a target candidate word from the candidate words according to the deletion mark;

[0025] A display module is used to display the target candidate words.

[0026] Optionally, the acquisition module is used to obtain the user's input information and the candidate words corresponding to the input information; if the candidate word is a word group composed of at least two words, the input scene is determined as a word group scene; if the input information is corrected, the input scene is determined as an error correction scene; if the input information is a simplified spelling, the input scene is determined as a simplified spelling scene.

[0027] Optionally, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The device also includes: a gray word determination module, used to obtain the gray vocabulary list corresponding to the input scenario; when there is a word included in the gray vocabulary list in the candidate word, it is determined that the candidate word contains a gray word.

[0028] Optionally, the adding module is used to, when the input scenario is a word formation scenario, add a deletion mark to the candidate words containing the gray word if the input information is input using the first input method; if the input information is input using the second input method, add a deletion mark to the candidate words containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0029] Optionally, the adding module is used to add a deletion mark to the candidate word when the input scenario is an error correction scenario and if the candidate word corresponding to the input information after error correction contains a gray word.

[0030] Optionally, the adding module is used to determine the abbreviation type corresponding to the abbreviation scene when the input scene is the abbreviation scene; and determine whether to add a deletion mark for the candidate word according to the abbreviation type.

[0031] Optionally, the adding module is used to, when the abbreviation type is a specified abbreviation type, add a deletion mark to the candidate word containing the gray word if the input information is input using the first input method; if the input information is input using the second input method, add a deletion mark to the candidate word containing the gray word and the gray word is a repeated code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0032] Optionally, the adding module is used to add a deletion mark to the candidate word if the candidate word corresponding to the input information contains a gray word when the abbreviation type is not a specified abbreviation type.

[0033] Optionally, the determination module is used to obtain the score and word grouping path corresponding to the candidate word; adjust the score of the candidate word according to the number of links in the word grouping path; and determine the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0034] Optionally, the determination module is used to obtain a preset penalty score if the candidate word includes a gray word; and adjust the score of the candidate word according to the preset penalty score.

[0035] Optionally, the determination module is used to determine the target candidate word from the candidate words without deletion marks based on the adjusted scores if there are candidate words without deletion marks; if there are no candidate words without deletion marks, determine the target candidate word from the candidate words with deletion marks based on the adjusted scores.

[0036] Optionally, the retention module is used to obtain context information of the candidate word; analyze the context information to determine semantics, and further determine whether the candidate word with the deletion mark added is a gray word based on the semantics to determine whether to retain the deletion mark of the candidate word.

[0037] Optionally, the first input mode includes a 9-key input mode, and the second input mode includes a 26-key input mode; the abbreviation type includes at least one of the last character abbreviation, partial abbreviation and full abbreviation, and the last character abbreviation is a specified abbreviation type.

[0038] 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 the input method as described in any one of the embodiments of the present invention.

[0039] 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 candidate words and input scenarios of the candidate words; when the candidate words include gray words, determining whether to add a deletion mark for the candidate words based on the input scenario; the gray words are words with specific meanings included in a vocabulary; determining a target candidate word from the candidate words based on the deletion mark; and displaying the target candidate word.

[0040] Optionally, the obtaining of candidate words and the input scenarios of the candidate words include: obtaining user input information and candidate words corresponding to the input information; if the candidate word is a word combination composed of at least two words, determining the input scenario as a word combination scenario; if error correction is performed on the input information, determining the input scenario as an error correction scenario; if the input information is a simplified spelling, determining the input scenario as a simplified spelling scenario.

[0041] Optionally, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The method further includes: obtaining the gray vocabulary list corresponding to the input scenario; when the candidate word contains a word included in the gray vocabulary list, determining that the candidate word contains a gray word.

[0042] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is a word combination scenario, if the input information is input using a first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using a second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0043] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction contains a gray word, adding a deletion mark to the candidate word.

[0044] Optionally, determining whether to add a deletion mark for the candidate word according to the input scenario includes: when the input scenario is a simplified spelling scenario, determining a simplified spelling type corresponding to the simplified spelling scenario; and determining whether to add a deletion mark for the candidate word according to the simplified spelling type.

[0045] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is a specified abbreviation type, if the input information is input using the first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using the second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys in the first input method is less than the number of keys in the second input method.

[0046] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is not a specified abbreviation type, if the candidate word corresponding to the input information includes a gray word, adding a deletion mark to the candidate word.

[0047] Optionally, determining the target candidate word from the candidate words based on the deletion mark includes: obtaining the score and word grouping path corresponding to the candidate word; adjusting the score of the candidate word based on the number of links in the word grouping path; and determining the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0048] Optionally, the method further includes: if the candidate word includes a gray word, obtaining a preset penalty score; and adjusting the score of the candidate word according to the preset penalty score.

[0049] Optionally, determining a target candidate word from the candidate words based on the adjusted score and the deletion mark includes: if there is a candidate word without a deletion mark, determining the target candidate word from the candidate words without a deletion mark based on the adjusted score; if there is no candidate word without a deletion mark, determining the target candidate word from the candidate words with a deletion mark based on the adjusted score.

[0050] Optionally, context information of the candidate word is obtained; the context information is analyzed to determine semantics, and based on the semantics, it is further determined whether the candidate word with the deletion mark added is a gray word, so as to determine whether to retain the deletion mark of the candidate word.

[0051] Optionally, the first input method includes a 9-key input method, and the second input method includes a 26-key input method.

[0052] Optionally, the abbreviation type includes at least one of a last-character abbreviation, a partial abbreviation and a complete abbreviation, and the last-character abbreviation is a designated abbreviation type.

[0053] The embodiments of the present invention include the following advantages:

[0054] In an embodiment of the present invention, candidate words and input scenarios of the candidate words are obtained. When the candidate words contain gray words, it is determined whether to add a deletion mark to the candidate words based on the input scenario, and then the target candidate words are determined from the candidate words based on the deletion mark and displayed. The gray words in the embodiment of the present invention are words with specific meanings included in the vocabulary. By adding deletion marks to the candidate words containing gray words, and then determining the target candidate words displayed to the user based on the deletion marks, it is possible to avoid displaying the candidate words containing gray words to the user when they are not what the user actually wants to input, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a flow chart of steps of an input method embodiment of the present invention;

[0056] Figure 2 is a flowchart of steps of an optional embodiment of an input method of the present invention;

[0057] Figure 3 It is a flow chart of the steps of adding a deletion mark to a candidate word in a simplified spelling scenario of the present invention;

[0058] Figure 4 This is a flow chart of input in a word grouping scenario of the present invention;

[0059] Figure 5 is a structural block diagram of an input device embodiment of the present invention;

[0060] Figure 6 A structural block diagram of an electronic device for input according to an exemplary embodiment;

[0061] Figure 7 It is a structural schematic diagram of an electronic device for input according to another exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0062] 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.

[0063] With the continuous development of the Internet, some sensitive words with specific meanings have appeared on the Internet, such as words with uncivilized meanings. These words are generally called gray words.

[0064] The processing of gray words is a current difficulty. Although users can recognize gray words when using the input method, they cannot completely block these recognized gray words because this will cause users to be unable to input content containing gray words, affecting their normal expression.

[0065] In response to the above problems, an embodiment of the present invention proposes an input method, which determines the input scenario during the user input process, and then judges the candidate words corresponding to the input information input by the user based on the input scenario, and judges whether the candidate words have gray words and whether the candidate words need to be blocked, thereby blocking the candidate words in accordance with their input scenarios, ensuring that the user will not be affected by the displayed gray words, and at the same time will not affect the user's normal expression.

[0066] The embodiments of the present invention may be implemented through a client, a server, or a combination of a client and a server. The server may be an independent server or a server cluster composed of multiple servers, and the embodiments of the present invention are not limited to this.

[0067] Reference Figure 1 , shows a flow chart of steps of an input method embodiment of the present invention, which may specifically include the following steps:

[0068] Step 102: Obtain candidate words and input scenarios of the candidate words.

[0069] The candidate words are candidate items generated by the input method for the user to select based on the input information, which may be one or more. For example, the candidate word corresponding to the pinyin string "wszgr" may be "I am Chinese". Specifically, the input information is all information related to the user input in the process of the user calling the input method to input text in other applications, such as the pinyin string "wszgr" input by the user. Other applications may refer to applications other than the input method, such as chat applications, game applications, etc., which are not limited in the embodiments of the present invention.

[0070] The input scenario is the input method of the candidate words, which may include a word formation scenario, an error correction scenario, and a simplified spelling scenario, etc. Of course, in addition to the above input scenarios, other input scenarios may also be set according to actual needs, and the embodiment of the present invention need not be limited thereto.

[0071] Step 104: When the candidate word includes a gray word, determine whether to add a deletion mark for the candidate word according to the input scenario.

[0072] Among them, gray words are words with specific meanings included in the word library, such as words with specific meanings such as violence. For candidate words containing gray words, the embodiment of the present invention can add a deletion mark to it, and the deletion mark is used to indicate that the candidate word contains gray words, so it is ignored first or directly ignored when determining the target candidate word to be displayed to the user.

[0073] It should be noted that different input scenarios have different definitions of gray words. For example, a certain word may be considered a gray word in an error correction scenario, but may not be considered a gray word in a word formation scenario or abbreviation scenario.

[0074] Step 106: Determine a target candidate word from the candidate words according to the deletion mark.

[0075] Step 108: Display the target candidate words.

[0076] In a specific implementation, there are usually many candidate words corresponding to the input information. Since the space in the candidate column on the input method is limited, there are only N target candidate words displayed to the user, where N is a positive integer, such as 5 or 1.

[0077] In an embodiment of the present invention, after adding a deletion mark to a candidate word, N target candidate words can be determined from the candidate words based on the deletion mark, wherein, since the candidate words with the deletion mark have gray words, and gray words are displayed to users, sensitive users may feel uncomfortable. Therefore, when selecting target candidate words, priority is given to selecting from candidate words without deletion marks, and then selecting from candidate words with deletion marks. As a specific example, each candidate word has a corresponding score, and the higher the score, the higher the possibility that it is the content that the user wants to input. Assuming N is 1, if all candidate words are marked for deletion, the candidate word with the highest score is selected from the marked candidate words as the target candidate word. If only some of the candidate words are marked for deletion, the candidate word with the highest score is selected from the unmarked candidate words as the target candidate word.

[0078] In the above input method, candidate words and input scenarios of the candidate words are obtained. When the candidate words contain gray words, it is determined whether to add a deletion mark to the candidate words according to the input scenario, and then the target candidate words are determined from the candidate words according to the deletion mark and displayed. The gray words in the embodiment of the present invention are words with specific meanings included in the vocabulary. By adding deletion marks to the candidate words containing gray words, and then determining the target candidate words to be displayed to the user according to the deletion mark, it is possible to avoid displaying the candidate words containing gray words to the user when they are not what the user actually wants to input, thereby improving the user experience.

[0079] Reference Figure 2 , shows a flow chart of steps of an optional embodiment of an input method of the present invention, which may specifically include the following steps:

[0080] Step 202: Obtain candidate words and input scenarios of the candidate words.

[0081] In a specific implementation, when a user inputs using an input method, corresponding candidate words can be obtained based on the user's input information, and the candidate words have corresponding input scenarios.

[0082] In an exemplary embodiment, the step 202 of obtaining candidate words and input scenarios of the candidate words may include:

[0083] Obtaining user input information and candidate words corresponding to the input information;

[0084] If the candidate word is a word group consisting of at least two words, the input scene is determined as a word group scene;

[0085] If error correction is performed on the input information, the input scene is determined as an error correction scene;

[0086] If the input information is a simplified spelling, the input scene is determined to be a simplified spelling scene.

[0087] In an embodiment of the present invention, during the input process of a user using an input method, the user's input information and candidate words corresponding to the input information may be obtained, and then the corresponding input scenario may be determined based on the input information or the candidate words.

[0088] Among them, the word combination scenario refers to the input scenario where the candidate words are the word combination. The word combination means that there is no corresponding word in the vocabulary, but it is composed of two or more words. For example, "Chinese" is included in the vocabulary as a word, but "Chinese are very hardworking" is not included in the vocabulary as a word, but is composed of "Chinese" and "very hardworking", or "Chinese", "very" and "hardworking". Therefore, "Chinese are very hardworking" is a word combination.

[0089] Among them, the error correction scenario refers to an input scenario in which errors in the user's input information are detected and corrected. In the error correction scenario, the input method will return the candidate words corresponding to the corrected input information to the user after judgment based on the error correction model. For example, if the pinyin string "hujian" is input, the error correction model will judge that the user may want to input the pinyin string "fujian" and provide the candidate word "Fujian" corresponding to the corrected input information.

[0090] Among them, the simplified pinyin scenario refers to the user not entering complete input information, for example, the input information is an incomplete pinyin string. For example, the user wants to enter "not delicious", if the input pinyin string is "buhaoc", it is an incomplete pinyin string.

[0091] Step 204: Obtain a gray word list corresponding to the input scene.

[0092] In the embodiment of the present invention, grey words are classified into different levels, and some grey words are very rude, so the grey words can be included in a grey word list corresponding to the word library, and the grey word list corresponds to the input scene.

[0093] In an embodiment of the present invention, different input scenarios are provided with corresponding gray word lists in the word library, and each gray word list includes gray words in the corresponding input scenario. For example, assuming that the input scenario includes a word formation scenario, an error correction scenario, and a simplified spelling scenario, there are gray word lists A corresponding to the word formation scenario, gray word lists B corresponding to the error correction scenario, and gray word lists C corresponding to the simplified spelling scenario in the word library.

[0094] Step 206: When there are words included in the gray word list in the candidate words, determine that the candidate words include gray words.

[0095] In an embodiment of the present invention, if a candidate word in a certain input scenario includes a gray word in the gray word list corresponding to the input scenario, it can be determined that the candidate word includes a gray word. For example, assuming that in a word formation scenario, a candidate word a includes a gray word in the gray word list corresponding to the word formation scenario, it can be determined that the candidate word a includes a gray word.

[0096] Step 208: When the candidate word includes a gray word, determine whether to add a deletion mark for the candidate word according to the input scenario.

[0097] In the embodiment of the present invention, even if it is determined that a candidate word contains a gray word, a deletion mark is not necessarily added to the candidate word. When it is determined that a candidate word contains a gray word, whether to add a deletion mark to the candidate word will be further determined based on the input scenario.

[0098] In an exemplary embodiment, the step 208 of determining whether to add a deletion mark to the candidate word according to the input scenario may include:

[0099] When the input scenario is a word formation scenario, if the input information is input using the first input method, a deletion mark is added to the candidate word containing the gray word; if the input information is input using the second input method, a deletion mark is added to the candidate word containing the gray word and the gray word is a duplicate code.

[0100] The number of keys of the first input method is smaller than the number of keys of the second input method. For example, the first input method may be a 9-key input method, and the second input method may be a 26-key input method.

[0101] Among them, the word formation path refers to the word formation method of forming words (candidate words). In addition to pinyin input, the user's input information can also be input through Wubi input, handwriting input and other methods. Specifically, after obtaining the user's input information, the input method segments the input information, and then queries the vocabulary to build a word formation network to obtain a word formation path. The word formation path can be one or more, and one word formation path corresponds to one candidate word. Taking Chinese pinyin input as an example, assuming that the pinyin string input by the user is "quchifanb", it can be segmented into "qu", "chifan" and "b", then the word formation network {qu (go), chifan eat, b (bar, no)} can be obtained, then the word formation paths can be "go-eat-bar" and "go-eat-no", and the number of links corresponding to these two word formation paths is 3.

[0102] It can be understood that since the number of keys in the keyboard of the first input method is smaller than the number of keys in the keyboard of the second input method, in the word formation scenario, the first input method has more words with duplicate codes (i.e., words with the same encoding) and more word formation paths for candidate words, so the probability of hitting gray words is also relatively high. Therefore, the embodiment of the present invention adds a deletion mark to the candidate words containing gray words input based on the first input method, while the second input method has fewer words with duplicate codes and fewer word formation paths for candidate words, so the probability of hitting gray words is also relatively low. Therefore, the embodiment of the present invention adds a deletion mark to the candidate words containing gray words and are duplicate codes input based on the second input method. This is because the second input method has fewer word formation paths than the first input method. Even if a gray word is hit, it is most likely the user's original intention of input. Therefore, a deletion mark is added to the candidate words containing gray words and are duplicate codes.

[0103] In an exemplary embodiment, the step 208 of determining whether to add a deletion mark to the candidate word according to the input scenario may include:

[0104] When the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction includes a gray word, a deletion mark is added to the candidate word.

[0105] In an embodiment of the present invention, considering that the input information after error correction may not be the original input intention of the user, therefore, when the input scenario is an error correction scenario, if the candidate word obtained based on the input information after error correction is a gray word, or the candidate word is a group of words including a gray word, a deletion mark can be added to the candidate word.

[0106] Furthermore, in order to ensure that the candidate words in the error correction scenario are not seen by the user, you can also choose to directly filter out the candidate words, that is, when determining the target candidate words to be displayed, the candidate words in the error correction scenario are not considered at all.

[0107] In an exemplary embodiment, referring to Figure 3 The step 208 of determining whether to add a deletion mark to the candidate word according to the input scenario may include:

[0108] Step 302: when the input scenario is a simplified spelling scenario, determine the simplified spelling type corresponding to the simplified spelling scenario;

[0109] Step 304: Determine whether to add a deletion mark to the candidate word according to the abbreviation type.

[0110] The abbreviation type may include at least one of the last abbreviation, partial abbreviation and complete abbreviation. Specifically, the last abbreviation means that the last input information is not complete input information, the partial abbreviation means that part of the input information is complete input information, and the complete abbreviation means that all the input information is not complete input information. For example, assuming that the user wants to input "we eat", if the input information is the pinyin string "womenchif", it belongs to the last abbreviation, if the input information is the pinyin string "womencf", it belongs to the partial abbreviation, and if the input information is the pinyin string "wmcf", it belongs to the complete abbreviation.

[0111] In an embodiment of the present invention, after the input scene is a simplified spelling scene, it will be further determined whether to add a deletion mark for the candidate word according to the simplified spelling type corresponding to the simplified spelling scene. In an exemplary embodiment, the step 304, determining whether to add a deletion mark for the candidate word according to the simplified spelling type, may include:

[0112] When the abbreviation type is a specified abbreviation type, if the input information is input using the first input method, a deletion mark is added to the candidate word containing the gray word; if the input information is input using the second input method, a deletion mark is added to the candidate word containing the gray word and the gray word is a repeated code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0113] When the abbreviation type is not a designated abbreviation type, if the candidate word corresponding to the input information includes a gray word, a deletion mark is added to the candidate word.

[0114] As a specific example, the designated abbreviation type may be the last character abbreviation.

[0115] In an embodiment of the present invention, if the abbreviation type of the abbreviation scenario is a specified abbreviation type, such as the last character abbreviation, there will be fewer words with repeated codes, and it can be further determined whether to add a deletion mark to the candidate word based on the input method of the input information. Specifically, since the number of keys in the keyboard of the first input method is smaller than the number of keys in the keyboard of the second input method, when the input scenario is a simplified spelling scenario and the simplified spelling scenario is a specified simplified spelling type, the first input method has more words that are repeated and more word-grouping paths for the candidate words, so the probability of hitting a gray word is relatively high. Therefore, the embodiment of the present invention adds a deletion mark to the candidate words containing gray words input based on the first input method, while the second input method has fewer words that are repeated and fewer word-grouping paths for the candidate words, so the probability of hitting a gray word is relatively low. Therefore, the embodiment of the present invention adds a deletion mark to the candidate words that are repeated and are input based on the second input method. This is because the second input method has fewer word-grouping paths than the first input method. Even if a gray word is hit, it is likely to be the user's original intention of the input. Therefore, a deletion mark is added to the candidate words that contain gray words and are repeated.

[0116] In an embodiment of the present invention, if the abbreviation type of the abbreviation scenario is not a specified abbreviation type, such as partial abbreviation or full abbreviation, there will be more words with repeated codes. When a gray word is included in the candidate word, a deletion mark is added to the candidate word.

[0117] Step 210: Determine a target candidate word from the candidate words according to the deletion mark.

[0118] In an embodiment of the present invention, a candidate word with a deletion mark added indicates that the candidate word contains gray words in the input scenario. Therefore, the target candidate word can be determined from the candidate words based on the deletion mark to avoid directly displaying the candidate word containing gray words to the user, so as to avoid discomfort to sensitive users.

[0119] In an exemplary embodiment, the step 210 of determining a target candidate word from the candidate words according to the deletion mark may include:

[0120] Obtaining the score and word group path corresponding to the candidate word;

[0121] adjusting the score of the candidate word according to the number of links in the word grouping path;

[0122] A target candidate word is determined from the candidate words according to the adjusted score and the deletion mark.

[0123] The score is used to represent the probability of the candidate word being determined as the target candidate word. The higher the score, the earlier the candidate word is determined as the target candidate word, and vice versa, the lower the score, the later the candidate word is determined as the target candidate word.

[0124] Among them, the word - formation path has a corresponding number of links. For example, "ambitious" can be formed by "ambition - great", so the number of links in the word - formation path is 2. In the embodiments of the present invention, the more links a candidate word has, it means that the candidate word is composed of more vocabulary combinations. For example, if the number of links in the word - formation path of a candidate word is 3, exceeding the number of links of other candidate words, then the score of this candidate word will be lowered. For example, if the number of links is 1 more than that of other candidate words, the score will be deducted by 50.

[0125] In the embodiments of the present invention, for the score of a candidate word, it will be adjusted according to the number of links in its word - formation path. For example, assume there are candidate word a, candidate word b, and candidate word c, with initial scores of 100, 120, and 130 respectively, and the number of links in the word - formation path are 2, 1, and 3 respectively. If one more link will deduct 50, then the adjusted scores of candidate word a, candidate word b, and candidate word c are 50, 120, and 30 respectively. Then, according to the adjusted scores and the deletion marks, the target candidate word can be determined from the candidate words.

[0126] In an exemplary embodiment, the method may further include: if the candidate word contains a gray word, obtain a preset penalty score; adjust the score of the candidate word according to the preset penalty score.

[0127] Specifically, since the candidate word may also contain a gray word, if it is determined that the candidate word contains a gray word, obtain the preset penalty score set for the gray word. For example, deduct 50. Then, after determining that the candidate word contains a gray word, combine the number of links of the candidate word and the preset penalty score to adjust the score of the candidate word. Optionally, the candidate word may contain two or more gray words. Therefore, in the embodiments of the present invention, the score can also be adjusted according to the number of gray words in the candidate word. For example, deduct 50 for one gray word and 100 for two gray words.

[0128] In an exemplary embodiment, the determining the target candidate word from the candidate words according to the adjusted score and the deletion mark may include:

[0129] If there is a candidate word without a deletion mark, determine the target candidate word from the candidate words without a deletion mark according to the adjusted score;

[0130] If there is no candidate word without a deletion mark, determine the target candidate word from the candidate words with a deletion mark according to the adjusted score.

[0131] In the embodiment of the present invention, the purpose is to reduce the interference of gray words on users. Therefore, when determining the target candidate words to be displayed to the user, the target candidate words are determined based on the adjusted scores from the candidate words without deletion marks, that is, the candidate words that are considered not to contain gray words in the input scenario. If all candidate words have deletion marks, the target candidate words are determined from the candidate words containing gray words based on the adjusted scores, thereby avoiding the situation where no candidate words are displayed to the user. For example, assuming that there are candidate words a, candidate words b, candidate words c and candidate words d, the scores increase from candidate words a to candidate words d in sequence, among which only candidate word a does not have a deletion mark, assuming that there is 1 target candidate word to be displayed, then candidate word a without a deletion mark is used as the target candidate word. If there are 3 target candidate words to be displayed, in addition to candidate word a without a deletion mark as the target candidate word, candidate words d and candidate word c with deletion marks can also be used as target candidate words.

[0132] In an exemplary embodiment, the method may further include: obtaining context information of the candidate word; analyzing the context information to determine semantics, and further determining whether the candidate word with a deletion mark added is a gray word based on the semantics to determine whether to retain the deletion mark of the candidate word.

[0133] In an embodiment of the present invention, semantic analysis can also be performed based on the context information of the candidate word, and based on the semantics determined by the analysis, it can be further determined whether the candidate word to which the deletion mark has been added is a gray word, and then it can be determined whether the revision mark of the candidate word needs to be retained. For example, assuming that it is determined based on the context information that it is not very relevant to the insulting meaning, then the score of the candidate word related to the insulting meaning can be lowered. In the above manner, when the candidate word is determined to be a gray word, but combined with the context information of the candidate word to determine that it is actually a reasonable expression rather than a true gray word, the deletion mark can be removed to prevent the candidate word from being treated as a gray word.

[0134] For example, assuming that "fuck" is included in the vocabulary as a gray word, and the candidate words include "fuck", then a deletion mark will be added to the candidate word. At this time, after obtaining the context information of the candidate word for semantic analysis, it is determined that the candidate word is not a gray word, but a reasonable expression, such as "fuck's clothes are very beautiful", then the deletion mark of the candidate word can be removed.

[0135] In specific applications, in addition to determining whether to retain the deletion mark of the candidate word, the context information can also be used to determine the adjustment of the score of the candidate word. For example, if a candidate word has a gray word, the score of the candidate word will be lowered accordingly. The embodiments of the present invention are not limited to this.

[0136] Step 212: Display the target candidate words.

[0137] In the embodiment of the present invention, after the target candidate word is determined from the target candidate words, the candidate word can be displayed to the user for the user to click on to display it on the screen.

[0138] In order to enable those skilled in the art to better understand the embodiments of the present invention, specific examples are used below for illustration. Figure 4 , which is a flow chart of inputting in a word grouping scenario of the present invention, and displays one target candidate word, and the specific process is:

[0139] Step 402: Obtain N candidate words corresponding to the input information, where N≤16;

[0140] Step 404, traverse the candidate words in sequence;

[0141] Step 406, determine whether the candidate word is input using 26 keys; if not, only step 408 is required; if yes, step 410 is executed;

[0142] Step 408, determine whether there is a gray word among the candidate words, if not, execute step 420, if yes, execute step 412;

[0143] Step 410, determine whether there is a gray word with a duplicate code among the candidate words; if not, execute step 420; if yes, execute step 412;

[0144] Step 412: Analyze the context information of the candidate word to determine the semantics, so as to further determine whether the candidate word is a gray word; if so, execute step 414; if not, execute step 420;

[0145] Step 414: Add a deletion mark to the candidate word;

[0146] Step 416, determine whether all candidate words have been traversed, if not, return to step 404, if yes, execute step 418;

[0147] Step 418: Display the first candidate word with a deletion mark as the target candidate word;

[0148] Step 420: Display candidate words without deletion marks as target candidate words.

[0149] In the above example, word grouping restrictions are imposed on candidate words that contain gray words. When gray words participate in constructing candidate words, the appearance of the candidate words is restricted to avoid excessive influence of gray words on sensitive users.

[0150] 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.

[0151] Reference Figure 5 , shows a structural block diagram of an input device embodiment of the present invention, which may specifically include the following modules:

[0152] An acquisition module 502 is used to acquire candidate words and input scenarios of the candidate words;

[0153] An adding module 504 is used to determine whether to add a deletion mark to the candidate word according to the input scenario when the candidate word includes a gray word; the gray word is a word with a specific meaning included in the word library;

[0154] A determination module 506, configured to determine a target candidate word from the candidate words according to the deletion mark;

[0155] The display module 508 is used to display the target candidate words.

[0156] In an exemplary embodiment, the acquisition module 502 is used to obtain the user's input information and the candidate words corresponding to the input information; if the candidate word is a word group composed of at least two words, the input scene is determined as a word group scene; if the input information is corrected, the input scene is determined as an error correction scene; if the input information is a simplified spelling, the input scene is determined as a simplified spelling scene.

[0157] In an exemplary embodiment, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The device also includes: a gray word determination module, which is used to obtain the gray vocabulary list corresponding to the input scenario; when there is a word included in the gray vocabulary list in the candidate word, it is determined that the candidate word contains a gray word.

[0158] In an exemplary embodiment, the adding module 504 is used to, when the input scenario is a word formation scenario, add a deletion mark to the candidate word containing the gray word if the input information is input using the first input method; if the input information is input using the second input method, add a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0159] In an exemplary embodiment, the adding module 504 is configured to add a deletion mark to the candidate word if the candidate word corresponding to the input information after error correction includes a gray word when the input scenario is an error correction scenario.

[0160] In an exemplary embodiment, the adding module 504 is used to determine the abbreviation type corresponding to the abbreviation scene when the input scene is the abbreviation scene; and determine whether to add a deletion mark for the candidate word according to the abbreviation type.

[0161] In an exemplary embodiment, the adding module 504 is used to, when the abbreviation type is a specified abbreviation type, add a deletion mark to the candidate word containing the gray word if the input information is input using the first input method; if the input information is input using the second input method, add a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0162] In an exemplary embodiment, the adding module 504 is used to add a deletion mark to the candidate word if the candidate word corresponding to the input information includes a gray word when the abbreviation type is not a specified abbreviation type.

[0163] In an exemplary embodiment, the determination module 506 is used to obtain the score and word grouping path corresponding to the candidate word; adjust the score of the candidate word according to the number of links in the word grouping path; and determine the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0164] In an exemplary embodiment, the determination module 506 is configured to obtain a preset penalty score if the candidate word includes a gray word; and adjust the score of the candidate word according to the preset penalty score.

[0165] In an exemplary embodiment, the determination module 506 is used to determine the target candidate word from the candidate words without deletion marks based on the adjusted scores if there are candidate words without deletion marks; if there are no candidate words without deletion marks, determine the target candidate word from the candidate words with deletion marks based on the adjusted scores.

[0166] In an exemplary embodiment, the device also includes a retention module for obtaining context information of the candidate word; analyzing the context information to determine semantics, and further determining whether the candidate word with a deletion mark added is a gray word based on the semantics to determine whether to retain the deletion mark of the candidate word.

[0167] In an exemplary embodiment, the first input method includes a 9-key input method, and the second input method includes a 26-key input method; the abbreviation type includes at least one of the last character abbreviation, partial abbreviation and full abbreviation, and the last character abbreviation is a specified abbreviation type.

[0168] 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.

[0169] Figure 6 1 is a block diagram of an electronic device 600 for input according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a smart wearable device, etc.

[0170] 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 .

[0171] 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.

[0172] 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 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.

[0173] 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.

[0174] 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.

[0175] 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.

[0176] 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.

[0177] 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 device 600, the relative positioning of 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 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0178] 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 614 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 614 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.

[0179] 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.

[0180] 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.

[0181] 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 execute an input method, the method comprising: obtaining candidate words and input scenarios of the candidate words; when the candidate words contain gray words, determining whether to add a deletion mark for the candidate words based on the input scenario; the gray words are words with specific meanings included in a vocabulary; determining a target candidate word from the candidate words based on the deletion mark; and displaying the target candidate word.

[0182] Optionally, the obtaining of candidate words and the input scenarios of the candidate words include: obtaining user input information and candidate words corresponding to the input information; if the candidate word is a word combination composed of at least two words, determining the input scenario as a word combination scenario; if error correction is performed on the input information, determining the input scenario as an error correction scenario; if the input information is a simplified spelling, determining the input scenario as a simplified spelling scenario.

[0183] Optionally, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The method further includes: obtaining the gray vocabulary list corresponding to the input scenario; when the candidate word contains a word included in the gray vocabulary list, determining that the candidate word contains a gray word.

[0184] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is a word combination scenario, if the input information is input using a first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using a second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0185] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction contains a gray word, adding a deletion mark to the candidate word.

[0186] Optionally, determining whether to add a deletion mark for the candidate word according to the input scenario includes: when the input scenario is a simplified spelling scenario, determining a simplified spelling type corresponding to the simplified spelling scenario; and determining whether to add a deletion mark for the candidate word according to the simplified spelling type.

[0187] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is a specified abbreviation type, if the input information is input using the first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using the second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys in the first input method is less than the number of keys in the second input method.

[0188] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is not a specified abbreviation type, if the candidate word corresponding to the input information includes a gray word, adding a deletion mark to the candidate word.

[0189] Optionally, determining the target candidate word from the candidate words based on the deletion mark includes: obtaining the score and word grouping path corresponding to the candidate word; adjusting the score of the candidate word based on the number of links in the word grouping path; and determining the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0190] Optionally, the method further includes: if the candidate word includes a gray word, obtaining a preset penalty score; and adjusting the score of the candidate word according to the preset penalty score.

[0191] Optionally, determining a target candidate word from the candidate words based on the adjusted score and the deletion mark includes: if there is a candidate word without a deletion mark, determining the target candidate word from the candidate words without a deletion mark based on the adjusted score; if there is no candidate word without a deletion mark, determining the target candidate word from the candidate words with a deletion mark based on the adjusted score.

[0192] Optionally, context information of the candidate word is obtained; the context information is analyzed to determine semantics, and based on the semantics, it is further determined whether the candidate word with the deletion mark added is a gray word, so as to determine whether to retain the deletion mark of the candidate word.

[0193] Optionally, the first input method includes a 9-key input method, and the second input method includes a 26-key input method.

[0194] Optionally, the abbreviation type includes at least one of a last-character abbreviation, a partial abbreviation and a complete abbreviation, and the last-character abbreviation is a designated abbreviation type.

[0195] Figure 7: is a structural diagram of an electronic device 700 for input 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 processing unit 722 may be configured to communicate with the storage medium 730 and execute a series of instruction operations in the storage medium 730 on the server.

[0196] 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.

[0197] 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 candidate words and the input scenarios of the candidate words; when the candidate words include gray words, determining whether to add a deletion mark for the candidate words based on the input scenario; the gray words are words with specific meanings included in the vocabulary; determining a target candidate word from the candidate words based on the deletion mark; and displaying the target candidate word.

[0198] Optionally, the obtaining of candidate words and the input scenarios of the candidate words include: obtaining user input information and candidate words corresponding to the input information; if the candidate word is a word combination composed of at least two words, determining the input scenario as a word combination scenario; if error correction is performed on the input information, determining the input scenario as an error correction scenario; if the input information is a simplified spelling, determining the input scenario as a simplified spelling scenario.

[0199] Optionally, the vocabulary includes a gray vocabulary list, and the gray vocabulary list has a corresponding input scenario. The method further includes: obtaining the gray vocabulary list corresponding to the input scenario; when the candidate word contains a word included in the gray vocabulary list, determining that the candidate word contains a gray word.

[0200] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is a word combination scenario, if the input information is input using a first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using a second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys of the first input method is less than the number of keys of the second input method.

[0201] Optionally, determining whether to add a deletion mark for the candidate word based on the input scenario includes: when the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction contains a gray word, adding a deletion mark to the candidate word.

[0202] Optionally, determining whether to add a deletion mark for the candidate word according to the input scenario includes: when the input scenario is a simplified spelling scenario, determining a simplified spelling type corresponding to the simplified spelling scenario; and determining whether to add a deletion mark for the candidate word according to the simplified spelling type.

[0203] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is a specified abbreviation type, if the input information is input using the first input method, adding a deletion mark to the candidate word containing the gray word; if the input information is input using the second input method, adding a deletion mark to the candidate word containing the gray word and the gray word is a duplicate code; wherein the number of keys in the first input method is less than the number of keys in the second input method.

[0204] Optionally, determining whether to add a deletion mark for the candidate word based on the abbreviation type includes: when the abbreviation type is not a specified abbreviation type, if the candidate word corresponding to the input information includes a gray word, adding a deletion mark to the candidate word.

[0205] Optionally, determining the target candidate word from the candidate words based on the deletion mark includes: obtaining the score and word grouping path corresponding to the candidate word; adjusting the score of the candidate word based on the number of links in the word grouping path; and determining the target candidate word from the candidate words based on the adjusted score and the deletion mark.

[0206] Optionally, the method further includes: if the candidate word includes a gray word, obtaining a preset penalty score; and adjusting the score of the candidate word according to the preset penalty score.

[0207] Optionally, determining a target candidate word from the candidate words based on the adjusted score and the deletion mark includes: if there is a candidate word without a deletion mark, determining the target candidate word from the candidate words without a deletion mark based on the adjusted score; if there is no candidate word without a deletion mark, determining the target candidate word from the candidate words with a deletion mark based on the adjusted score.

[0208] Optionally, context information of the candidate word is obtained; the context information is analyzed to determine semantics, and based on the semantics, it is further determined whether the candidate word with the deletion mark added is a gray word, so as to determine whether to retain the deletion mark of the candidate word.

[0209] Optionally, the first input method includes a 9-key input method, and the second input method includes a 26-key input method.

[0210] Optionally, the abbreviation type includes at least one of a last-character abbreviation, a partial abbreviation and a complete abbreviation, and the last-character abbreviation is a designated abbreviation type.

[0211] 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.

[0212] 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.

[0213] 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.

[0214] 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 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0215] 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.

[0216] 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.

[0217] The above is a detailed introduction to an input method, an input device and an electronic device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods 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 method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An input method, characterized in that: include: Obtaining candidate words and input scenarios of the candidate words; When the candidate word includes a gray word, determining whether to add a deletion mark to the candidate word according to the input scenario; The grey words are words with specific meanings included in the vocabulary; Determining a target candidate word from the candidate words according to the deletion mark; displaying the target candidate word; The obtaining of candidate words and the input scenario of the candidate words includes: Obtaining user input information and candidate words corresponding to the input information; If the candidate word is a word group consisting of at least two words, the input scene is determined as a word group scene; If error correction is performed on the input information, the input scene is determined as an error correction scene; If the input information is a simplified spelling, determining the input scene as a simplified spelling scene; The step of determining whether to add a deletion mark to the candidate word according to the input scenario includes: When the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction includes a gray word, a deletion mark is added to the candidate word.

2. The method according to claim 1, characterized in that The word library includes a grey word list, and the grey word list has a corresponding input scenario. The method further includes: Obtaining a gray word list corresponding to the input scene; When there are words included in the gray word list in the candidate words, it is determined that the candidate words include gray words.

3. The method according to claim 2, characterized in that The determining whether to add a deletion mark to the candidate word according to the input scenario includes: When the input scenario is a word combination scenario, If the input information is input in the first input mode, adding a deletion mark to the candidate word containing the gray word; If the input information is inputted in the second input mode, a deletion mark is added to the candidate words that contain the gray word and the gray word is a duplicate code; The number of keys of the first input method is smaller than the number of keys of the second input method.

4. The method according to claim 1, characterized in that: The determining whether to add a deletion mark to the candidate word according to the input scenario includes: When the input scenario is a simplified spelling scenario, determining a simplified spelling type corresponding to the simplified spelling scenario; Determine whether to add a deletion mark for the candidate word according to the abbreviation type.

5. The method according to claim 4, characterized in that The step of determining whether to add a deletion mark to the candidate word according to the abbreviation type includes: When the abbreviation type is a specified abbreviation type, If the input information is input in the first input mode, adding a deletion mark to the candidate word containing the gray word; If the input information is inputted in the second input mode, a deletion mark is added to the candidate words that contain the gray word and the gray word is a duplicate code; The number of keys of the first input method is smaller than the number of keys of the second input method.

6. The method according to claim 4, characterized in that The step of determining whether to add a deletion mark to the candidate word according to the abbreviation type includes: When the abbreviation type is not a designated abbreviation type, if the candidate word corresponding to the input information includes a gray word, a deletion mark is added to the candidate word.

7. The method according to any one of claims 1 to 6, characterized in that: The step of determining a target candidate word from the candidate words according to the deletion mark includes: Obtaining the score and word group path corresponding to the candidate word; adjusting the score of the candidate word according to the number of links in the word grouping path; A target candidate word is determined from the candidate words according to the adjusted score and the deletion mark.

8. The method according to claim 7, characterized in that Also includes: If the candidate word contains a gray word, a preset penalty score is obtained; The score of the candidate word is adjusted according to the preset penalty score.

9. The method according to any one of claims 7-8, characterized in that: Determining a target candidate word from the candidate words according to the adjusted score and the deletion mark includes: If there are candidate words without deletion marks, determine the target candidate word from the candidate words without deletion marks according to the adjusted scores; If there is no candidate word without a deletion mark, a target candidate word is determined from the candidate words with deletion marks according to the adjusted score.

10. The method according to claim 1, characterized in that Also includes: Obtaining context information of the candidate word; The context information is analyzed to determine semantics, and based on the semantics, it is further determined whether the candidate word with the deletion mark added is a gray word, so as to determine whether to retain the deletion mark of the candidate word.

11. An input device, characterized in that: include: An acquisition module, used to acquire candidate words and input scenarios of the candidate words; An adding module, used for determining whether to add a deletion mark to the candidate word according to the input scenario when the candidate word contains a gray word; The grey words are words with specific meanings included in the vocabulary; A determination module, used for determining a target candidate word from the candidate words according to the deletion mark; A display module, used for displaying the target candidate words; The acquisition module is used to acquire the user's input information and the candidate word corresponding to the input information; if the candidate word is a word group composed of at least two words, the input scene is determined as the word group scene; if the input information is corrected, the input scene is determined as the error correction scene; if the input information is a simplified spelling, the input scene is determined as the simplified spelling scene; The adding module is used to add a deletion mark to the candidate word if the candidate word corresponding to the input information after error correction contains a gray word when the input scenario is an error correction scenario.

12. An electronic device, 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 words and input scenarios of the candidate words; When the candidate word includes a gray word, determining whether to add a deletion mark to the candidate word according to the input scenario; The grey words are words with specific meanings included in the vocabulary; Determining a target candidate word from the candidate words according to the deletion mark; displaying the target candidate word; The obtaining of candidate words and the input scenario of the candidate words includes: Obtaining user input information and candidate words corresponding to the input information; If the candidate word is a word group consisting of at least two words, the input scene is determined as a word group scene; If error correction is performed on the input information, the input scene is determined as an error correction scene; If the input information is a simplified spelling, determining the input scene as a simplified spelling scene; The step of determining whether to add a deletion mark to the candidate word according to the input scenario includes: When the input scenario is an error correction scenario, if the candidate word corresponding to the input information after error correction includes a gray word, a deletion mark is added to the candidate word.

13. A readable storage medium, 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 input method as described in any one of method claims 1-10.

Citation Information

Patent Citations

  • Input method and system of same

    CN101694608A

  • Method and device for deleting lexical items in input method as well as character input tool

    CN102346559A

  • Method and device for filtering banned words in input method

    CN105204661A

  • Input method word bank management method and device

    CN107390896A

  • Input method and device and device used for input

    CN107870677A