WO2020082766A1 - 输入法的联想方法、装置、设备及可读存储介质 - Google Patents
输入法的联想方法、装置、设备及可读存储介质 Download PDFInfo
- Publication number
- WO2020082766A1 WO2020082766A1 PCT/CN2019/092464 CN2019092464W WO2020082766A1 WO 2020082766 A1 WO2020082766 A1 WO 2020082766A1 CN 2019092464 W CN2019092464 W CN 2019092464W WO 2020082766 A1 WO2020082766 A1 WO 2020082766A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- input method
- input
- associative
- content
- association
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
- G06F3/0237—Character input methods using prediction or retrieval techniques
Definitions
- This application relates to the field of information technology, and in particular, to an association method, device, device, and readable storage medium for an input method.
- the main purpose of the present application is to provide an associative method, device, device and readable storage medium for an input method, aiming to solve the technical problem that the existing associative function will generate a lot of meaningless associations and cause high processor pressure.
- the present application provides an association method for an input method, and the association method for the input method includes the following steps:
- the step of acquiring the character content corresponding to the input instruction includes:
- the character content corresponding to the input instruction is obtained.
- the step of searching for the association word corresponding to the character content in the association library corresponding to the input method type and sending the association word to the input method interface includes:
- search for the classification label corresponding to the keyword and determine the semantic environment of the semantic content according to the classification label, and search in the Lenovo library corresponding to the input method type according to the semantic environment Associate words corresponding to the character content, and send the associate words to the input method interface.
- the associative method of the input method also includes:
- the associative library includes multiple lexicons
- the step of searching for the target lexicon corresponding to the keyword in the associative library corresponding to the input method type includes:
- the lexicon corresponding to the largest weight in the weights is used as the target lexicon.
- the step of searching for the association word corresponding to the character content in the association library corresponding to the input method type includes:
- the step of obtaining the number of characters entered by the user and determining whether the number of characters is greater than a preset threshold includes:
- the present application also provides an input method associative device.
- the input method associative device includes:
- a receiving module configured to receive a user's input instruction and determine the input method type corresponding to the input instruction
- the first obtaining module is used to obtain the number of characters input by the user and determine whether the number of characters is greater than a preset threshold
- a second obtaining module configured to obtain the character content corresponding to the input instruction if the number of characters is greater than a preset threshold
- the association module is configured to search for association words corresponding to the character content in the association library corresponding to the input method type, and send the association words to the input method interface.
- the present application also provides an input method associative device.
- the input method associative device includes a processor, a memory, and a computer that is stored on the memory and can be executed by the processor. Read instructions, wherein when the computer-readable instructions are executed by the processor, the steps of the associative method of the input method described above are implemented.
- the present application also provides a readable storage medium that stores computer readable instructions, where the computer readable instructions are executed by a processor to implement the input as described above The steps of the associative method of law.
- This application provides a associative method, device, device and readable storage medium for an input method.
- This application determines the input method type corresponding to the input instruction by receiving a user's input instruction, and then obtains the number of characters input by the user, and Determine whether the number of characters is greater than a preset threshold, then if the number of characters is greater than the preset threshold, then obtain the character content corresponding to the input instruction, and finally search the character content in the Lenovo library corresponding to the input method type
- Corresponding associative words and sending the associative words to the input method interface; associating is performed only when the number of characters of the input characters is greater than a preset threshold, thereby avoiding meaningless associating and reducing the pressure on the processor.
- FIG. 1 is a schematic diagram of a hardware structure of a Lenovo device for an input method according to embodiments of the application;
- FIG. 2 is a schematic flowchart of a first embodiment of the Lenovo device method of the input method of the present application
- FIG. 3 is a schematic flowchart of a second embodiment of the Lenovo device method of the input method of the present application.
- FIG. 4 is a schematic flowchart of a third embodiment of the Lenovo device method of the input method of the present application.
- FIG. 5 is a schematic flowchart of a fourth embodiment of the Lenovo device method of the input method of the present application.
- FIG. 6 is a schematic flowchart of a fifth embodiment of the Lenovo device method of the input method of the present application.
- FIG. 7 is a schematic flowchart of a sixth embodiment of the Lenovo device method of the input method of the present application.
- FIG. 8 is a schematic diagram of functional modules of a first embodiment of a Lenovo device device of the input method of the present application.
- the associative method of the input method involved in the embodiments of the present application is mainly applied to the associative device of the input method, and the associative device of the input method may be a PC (personal computer personal computer), portable computers, mobile terminals and other devices with display and processing functions.
- PC personal computer personal computer
- FIG. 1 is a schematic diagram of a hardware structure of a Lenovo device for an input method involved in an embodiment of the present application.
- the Lenovo device of the input method may include a processor 1001 (for example, a central processor Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.
- processor 1001 for example, a central processor Central Processing Unit, CPU
- communication bus 1002 for example, a central processor Central Processing Unit, CPU
- user interface 1003 for example, a central processor Central Processing Unit, CPU
- network interface 1004 for example, a network interface 1005
- the communication bus 1002 is used to realize the connection communication between these components;
- the user interface 1003 may include a display (Display), an input unit such as a keyboard (Keyboard);
- the network interface 1004 may optionally include a standard wired interface, a wireless interface (Such as WI-FI interface);
- the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a magnetic disk memory, and the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
- the hardware structure shown in FIG. 1 does not constitute a limitation on the present application, and may include more or less components than those illustrated, or combine certain components, or arrange different components.
- the memory 1005 in FIG. 1 as a readable storage medium may include an operating system, a network communication module, and computer-readable instructions.
- the network communication module is mainly used to connect to a server and perform data communication with the server; and the processor 1001 can call computer-readable instructions stored in the memory 1005 and execute the associative method of the input method provided by the embodiment of the present application.
- the embodiments of the present application provide an associative method for an input method.
- FIG. 2 is a schematic flowchart of a first embodiment of the association method of the input method of the present application.
- the main body of the associative method of the input method is the associative device of the input method
- the associative device of the input method may be a PC (personal computer personal computer), portable computers, mobile terminals and other devices with display and processing functions.
- the associative method of the input method includes the following steps:
- Step S10 Receive a user's input instruction and determine the input method type corresponding to the input instruction
- the user can set the input method. After the user sets the input method, the user begins to input the content that needs to be input, so first, whether the user's input instruction is received is detected, and if the user's input is received Command, it determines the type of input method currently used by the user,
- the input method types include English input, Chinese input, etc., where when the user presses the keyboard, an input command is triggered, the Lenovo device of the input method will listen to the keydown event and receive the input command.
- Step S20 Obtain the number of characters entered by the user, and determine whether the number of characters is greater than a preset threshold
- the preset threshold is set by a technician, when receiving the user's input instruction, the keydown event received in the input box is monitored, the number of characters input by the user is calculated, and the characters input by the user are detected in real time Whether it is greater than the preset threshold.
- different character number restriction rules can be set according to different input method types, that is, the preset threshold corresponding to different input method types may be different, so, when receiving a user's input instruction, it is determined that the input instruction corresponds to the input method Input method type, obtain the preset threshold corresponding to the current input method type, and detect whether the number of characters input by the user is greater than the preset threshold value, for example, if the current input method type is Chinese input, the preset threshold value of the character is 4. If it is detected that the current input method type is English input, the preset threshold of characters is 5.
- Step S30 If the number of characters is greater than a preset threshold, obtain the character content corresponding to the input instruction;
- the character content corresponding to the input instruction is obtained.
- the character may be a character string or a single character, and the character content includes Pinyin and English. Associate only when the number of characters entered by the user is greater than the preset threshold. When the number of characters entered by the user is less than or equal to the preset threshold, do not associate and detect the next character entered by the user.
- the Chinese input method can The limit rule for setting the number of characters is 4 characters.
- the limit rule for setting the character rule in the English input method is 5 characters. If the input method type is Chinese input and the Chinese characters reach four characters, the association starts.
- the input method type is The English input method and the English characters reach 5 characters before starting association. For example, when the user pre-enters the word " ⁇ ", the input method type is monitored as Chinese input, and the character detected in the input box is detected as "wang ", And the number of characters in the character content reaches 4 characters, you can send a model query request to the background according to the content entered by the user for fuzzy query.
- Step S40 Search for the association word corresponding to the character content in the association library corresponding to the input method type, and send the association word to the input method interface.
- different input methods correspond to different Lenovo libraries.
- the Chinese input method corresponds to a Chinese Lenovo library
- the English input method corresponds to an English Lenovo library.
- a fuzzy query request is sent to the background to query the association words that match the character content from the association word library, and the matched association words are sent to the input method interface for the user Selection, specifically, when it is detected that the number of characters input by the user is greater than a preset threshold, semantic analysis can be performed on the input content that the user has entered in the text editor, which includes an input box, notepad, and document editing Interface etc.
- the semantic content after semantic analysis is obtained, and the semantic environment corresponding to the semantic content is determined according to the semantic content.
- the input content that the user has entered in the text editor is the user's focus.
- the characters entered by the user through the input method are closest to the semantic environment corresponding to the semantic content. Therefore, the user's input requirements can be estimated according to the semantic environment of the input method.
- the semantic environment refers to the context in which the character content entered by the user is located. For example, if the input content entered by the user is introducing a literary article, the semantic environment in which the character content entered by the user is located can be considered as literary related content .
- the corresponding association words are searched in the association library, and the association words are sent to the input method interface.
- the associative method of the input method proposed in this embodiment determines the type of input method corresponding to the input instruction by receiving the user's input instruction, and then obtains the number of characters input by the user, and determines whether the number of characters is greater than a preset threshold, Then, if the number of characters is greater than the preset threshold, the character content corresponding to the input instruction is obtained, and finally, the association word corresponding to the character content is searched in the association library corresponding to the input method type, and the association word Send to the input method interface; realize the association only when the number of input characters is greater than the preset threshold, thereby avoiding meaningless association and reducing the pressure on the processor.
- step S30 includes:
- Step S31 if the number of characters is greater than a preset threshold, it is detected whether the user presses the preset key;
- the association word when it is detected that the number of characters entered by the user is greater than the preset threshold, the association word may be searched for in the association library according to the character content entered by the user, but sometimes, when the number of characters is greater than the preset threshold
- the Lenovo command can be triggered in the form of a preset key. The user can trigger the Lenovo command by pressing the preset key to detect the user Whether to press the preset key.
- Step S32 if it is detected that the user presses the preset key, the character content corresponding to the input instruction is obtained.
- the preset key may be a space bar, an enter key, etc.
- the preset key may be set by the user according to his own habits. First, detect whether the number of characters entered by the user is greater than the preset threshold. If the number of characters entered by the user is greater than the preset threshold, detect whether the user presses the preset key. If it is detected that the user presses the preset key, obtain the character input by the user.
- the preset threshold is 2 characters
- the characters entered by the user When the content is "wan”, the number of characters detected is greater than the preset threshold, it is detected whether the user presses the preset key, if it is detected that the user presses the preset key, it will be "play, end, night, pill, king, Wang” Wait for the association words to be sent to the input interface for the user to choose.
- the front desk will not send a fuzzy request to the background to query the association words.
- the associative method of the input method proposed in this embodiment detects whether the user presses the preset key if the number of characters is greater than a preset threshold, and then obtains the character corresponding to the input instruction if the user presses the preset key is detected Content; realizes the association by detecting whether the user presses the preset key, so as to more accurately find the association words that meet the user's wishes, improve the user experience, and at the same time avoid meaningless associations, improve the efficiency of association , Reducing the pressure on the processor.
- step S40 includes:
- Step S41 Obtain input content that the user has input in the text editor, and perform semantic analysis on the input content to obtain semantic content after semantic analysis;
- different input methods correspond to different Lenovo libraries.
- the Chinese input method corresponds to a Chinese Lenovo library
- the English input method corresponds to an English Lenovo library.
- a fuzzy query request is sent to the background to query the association words that match the character content from the association vocabulary, wherein, when the number of characters input by the user is detected to be greater than the preset At the threshold, you can perform semantic analysis on the input content that the user has entered in the text editor, which includes input boxes, notepads, document editing interfaces, and so on. After performing semantic analysis on the input content that has been input, the semantic content after semantic analysis is obtained.
- Step S42 Perform word segmentation processing and part-of-speech tagging processing on the semantic content to extract keywords in the semantic content and determine whether there is only one keyword;
- the semantic environment corresponding to the semantic content is determined according to the semantic content.
- the input content that the user has entered in the text editor is the user's focus.
- the characters entered by the user through the input method are closest to the semantic environment corresponding to the semantic content. Therefore, the user's input requirements can be estimated according to the semantic environment of the input method.
- the semantic environment refers to the context environment in which the character content input by the user is located. Specifically, in a Chinese sentence, all words are continuous, and the minimum unit granularity of data analysis is words, so word segmentation processing is required, including the need to mark the part of speech, such as nouns, subordinate words, adjectives, quantifiers, etc.
- part-of-speech tagging is to allow the sentence to incorporate more useful linguistic information in the subsequent processing.
- Step S43 if there is only one keyword, search for the classification label corresponding to the keyword, and determine the semantic environment of the semantic content according to the classification label, and according to the association of the semantic environment in the input method type
- the library searches for the associated words corresponding to the character content, and sends the associated words to the input method interface.
- the classification label corresponding to the keyword is directly searched in the thesaurus, where the classification label refers to the category corresponding to each word, and the semantic can be determined according to the category corresponding to each word
- the semantic environment corresponding to the content for example, for example, the input content that the user has entered is to introduce a literary article, the input content is "The Dream of the Red Mansion written by Cao Xueqin", after removing stop words and unimportant parts of speech through part of speech analysis , Get the keyword “Dream of Red Mansions” ", Then directly search the lexicon for the classification label corresponding to" Hong Lou Meng "as” books ", which can be further classified as” literary books ", and then determine the semantic environment in which the character content entered by the user is considered to be related to literary books.
- association library includes multiple thesauruses
- find the corresponding association words in the thesaurus corresponding to the semantic environment For example, look up the corresponding associative words in the lexicon of literature.
- the association method of the input method proposed in this embodiment performs word segmentation processing and part-of-speech tagging processing on the semantic content to extract keywords in the semantic content and determine whether there is only one of the keywords, and then if There is only one keyword, search for the classification label corresponding to the keyword, and determine the semantic environment of the semantic content according to the classification label, and search for the character in the associative library corresponding to the input method type according to the semantic environment Associative words corresponding to the content and send the associated words to the input method interface; when one keyword is used, the semantic environment is determined according to the classification label, and the associated words are searched in the association library according to the semantic environment, so as to be more accurate Finding semantically-associated association words improves the accuracy of association.
- step S42 the method further includes:
- Step S44 if there are multiple keywords, search for the target lexicon corresponding to the keyword in the associative library corresponding to the input method type;
- each lexicon corresponding to the multiple keywords is determined and calculated according to the number of keywords appearing in each lexicon
- the weight of the lyric library, wherein the lexicon containing more keywords corresponds to a greater weight, and the largest weight among the weights is taken as the target lexicon.
- Step S45 Search for the associated words corresponding to the character content in the target lexicon.
- the association word corresponding to the character content is searched in the target lexicon.
- the weight of the lexicon is obtained by calculating the weight, and then the lexicon is used as the target lexicon. To find the corresponding associative words.
- the step of searching the target lexicon corresponding to the keyword in the associative library corresponding to the input method type includes:
- Step S441 Determine each lexicon corresponding to each keyword, and calculate the weight of each lexicon according to the number of occurrences of the keyword in each lexicon. Among them, the weight corresponding to the lexicon with more keywords The greater the value;
- the keyword can be a single word or a word composed of multiple words.
- the associative library includes multiple lexicons.
- a word in Chinese may express multiple meanings, and a certain keyword can exist Among the multiple thesauruses in the associative library, when there are more keywords in a certain thesaurus, the higher priority of the thesaurus is considered.
- the thesaurus where each keyword is located, and determine each The number of keywords in the thesaurus, where the weight of the thesaurus can be determined according to the number of keywords in the thesaurus, for example, the keywords have a, b, c, d, a, b two keywords exist In the A vocabulary, the two keywords a and c exist in the B vocabulary, and the three keywords a, c, d exist in the C vocabulary, then the weight of the A vocabulary is 2, and the B lexicon has a weight of 2. The weight value is 2, and the weight value of the C thesaurus is 3.
- step S442 the lexicon corresponding to the largest weight value in the weight values is used as the target lexicon.
- the weight of the thesaurus is greater, and the priority of the thesaurus is higher, and the thesaurus corresponding to the largest weight of the weights is targeted
- the vocabulary, the target vocabulary is the vocabulary with the highest priority, and the association words are searched from the vocabulary with the highest priority.
- the associative method of the input method proposed in this embodiment, by searching for the target lexicon corresponding to the keyword in the associative library corresponding to the input method type if there are multiple keywords, and then searching for the target word Look up the association words corresponding to the character content in the library; achieve more accurate and improve the accuracy of finding association words, thereby improving the efficiency of association.
- step S40 includes:
- Step S46 Obtain the browsing content on the browsing interface within a preset time period of the user, perform semantic analysis on the browsing content, determine the browsing type of the browsing content according to the analysis result, and search for the location in the Lenovo library corresponding to the input method Thesaurus corresponding to the browsing type;
- the user may enter content related to the browsing content within a preset time period after browsing the browsing interface. For example, some users may immediately write after reading a book, or they may feel after reading a book.
- the search site When there is a news item, immediately go to the search site to search for related news information, so you can classify the Lenovo library, for example, into general-purpose, chemical, computer, literature and other lexicons, according to the user ’s browsing content in the browsing interface
- Select a thesaurus with high priority perform semantic analysis on the content browsed by the user, and determine the browse type of the browsed content according to the analysis result. For example, when the user browses a military news website, the user's browsed content is obtained and the browsed content is analyzed. Semantic analysis, if the browsing content is military-related news, then search the lexicon corresponding to the military category in the Lenovo database.
- Step S47 Search for the associative words corresponding to the character content in the thesaurus corresponding to the browsing type.
- a fuzzy query is performed in the high-priority lexicon based on the content browsed by the user on the browsing interface to make associative word recommendations. For example, if it is detected that the user is browsing a web page about a computer, a crawler is used Grab webpage data, and perform semantic analysis on the captured data. According to the analysis results, determine that the browsing type corresponding to the browsed content is computer type, and then first obtain the associative words from the computer lexicon, and then find the associative words from other lexicons. And display the found associative words on the input method interface for users to choose.
- the association method of the input method proposed in this embodiment obtains the browsing content of the browsing interface within a preset time period by the user, performs semantic analysis on the browsing content, determines the browsing type of the browsing content according to the analysis result, and Search the lexicon corresponding to the browsing type in the associative library corresponding to the input method, and then search for the associative words corresponding to the character content in the lexicon corresponding to the browsing type; Search for associative words, thus improving the efficiency of searching.
- step S20 includes:
- Step S21 Obtain the preset threshold corresponding to the input method type and the number of characters entered by the user;
- different character number restriction rules may be set according to different input method types, that is, the preset thresholds corresponding to different input method types may be different, so, when the user's input instruction is received, the input instruction is determined Corresponding to the input method type of the input method, obtain the preset threshold corresponding to the current input method type, and obtain the number of characters entered by the user, for example, if the current input method type is Chinese input, the preset threshold of characters is 4, If it is detected that the current input method type is English input, the preset threshold of characters is 5.
- Step S22 Compare the number of characters with the preset threshold to determine whether the number of characters is greater than the preset threshold.
- the number of characters input by the user is detected in real time, and it is determined whether the number of characters is greater than a preset threshold. If the number of characters is greater than the preset threshold, the corresponding association word is searched in the association library according to the content of the input character, and the Associative words are sent to the input method interface for users to choose.
- the associative method of the input method proposed in this embodiment determines the character by obtaining the preset threshold corresponding to the input method type and the number of characters of the user input character, and then comparing the number of characters with the preset threshold Whether the number is greater than the preset threshold; different preset thresholds are determined according to different input method types, which can be applied to associations of different input method types, which further improves the efficiency of association.
- the embodiments of the present application also provide an input method association device.
- FIG. 8 is a schematic diagram of function modules of the first embodiment of the Lenovo method of the input method of the present application.
- the associative device of the input method of the present application is a virtual device, and is stored in the memory 1005 of the associative device of the input method shown in FIG. 1 to implement all functions of computer-readable instructions: receiving user input instructions, and determining that the output instructions correspond to Input method type; obtain the number of characters entered by the user and determine whether the number of characters is greater than a preset threshold; if the number of characters is greater than the preset threshold, obtain the character content corresponding to the input instruction; in the input method
- the association library corresponding to the type searches for the association words corresponding to the character content, and sends the association words to the input method interface.
- the associative device of the input method includes:
- the receiving module 101 is configured to receive a user's input instruction and determine the input method type corresponding to the input instruction;
- the first obtaining module 102 obtains the number of characters entered by the user, and determines whether the number of characters is greater than a preset threshold;
- the second obtaining module 103 if the number of characters is greater than a preset threshold, obtain the character content corresponding to the input instruction;
- the association module 104 searches for association words corresponding to the character content in the association library corresponding to the input method type, and sends the association words to the input method interface.
- the second obtaining module 103 is also used to:
- the character content corresponding to the input instruction is obtained.
- Lenovo module 104 is also used to:
- search for the classification label corresponding to the keyword and determine the semantic environment of the semantic content according to the classification label, and search in the Lenovo library corresponding to the input method type according to the semantic environment Associate words corresponding to the character content, and send the associate words to the input method interface.
- Lenovo module 104 is also used to:
- Lenovo module 104 is also used to:
- the lexicon corresponding to the largest weight in the weights is used as the target lexicon.
- Lenovo module 104 is also used to:
- the first obtaining module 102 is also used to:
- each module in the above-mentioned associative device of the input method corresponds to the steps in the above-mentioned associative method embodiment of the input method, and the functions and implementation processes thereof will not be described here one by one.
- an embodiment of the present application further provides a readable storage medium, and the computer-readable storage medium may be a non-volatile readable storage medium.
- Computer readable instructions are stored on the readable storage medium of the present application, wherein when the computer readable instructions are executed by the processor, the steps of the associative method of the input method described above are implemented.
- the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM / RAM) as described above , Magnetic disks, optical disks), including several instructions to enable a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to perform the method described in each embodiment of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种输入法的联想方法,装置、设备及可读存储介质,所述方法包括:接收用户的输入指令,确定所述输入指令对应的输入法类型(S10);获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值(S20);若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容(S30);在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面(S40)。上述方法实现了在输入字符的字符数量大于预设阈值才进行联想,从而避免了无意义的联想,减小了处理器的压力。
Description
本申请要求于2018年10月25日提交中国专利局、申请号为201811249709.X、发明名称为“输入法的联想方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及信息技术领域,尤其涉及一种输入法的联想方法、装置、设备及可读存储介质。
背景技术
随着移动互联网的不断发展,便携式电子设备得到了快速的发展和普及,
人机交互也变得越来越频繁,人机交互可以通过物理键盘、虚拟键盘、手写板、声音采集设备进行输入,然后通过输入法进行转换以提供候选项上屏,其中,最基础、最频繁的方式之一便是通过键盘输入进行人机交互,然而目前联想功能是根据监听输入框中值的实时变化,不断从前台向后台发起请求,但是,这种联想功能将产生很多无意义的联想,造成处理器压力大。
发明内容
本申请的主要目的在于提供一种输入法的联想方法、装置、设备及可读存储介质,旨在解决现有的联想功能会产生很多无意义的联想,造成处理器压力大的技术问题。
为实现上述目的,本申请提供一种输入法的联想方法,所述输入法的联想方法包括以下步骤:
接收用户的输入指令,确定所述输入指令对应的输入法类型;
获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;
若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;
在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
可选地,所述若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容的步骤包括:
若所述字符数量大于预设阈值,则检测用户是否按压预设键;
若检测到用户按压预设键,则获取所述输入指令对应的字符内容。
可选地,所述在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面的步骤包括:
获取用户在文本编辑器中已输入的输入内容,并对所述输入内容进行语义分析,以得到语义分析后的语义内容;
对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个;
若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
可选地,所述对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个的步骤之后,所述输入法的联想方法还包括:
若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库;
在所述目标词库中查找所述字符内容对应的联想词语。
可选地,所述联想库中包括多个词库,其特征在于,所述在所述输入法类型对应的联想库中查找所述关键词对应的目标词库的步骤的步骤包括:
确定各所述关键词对应的各词库,并根据所述关键词在各词库出现的个数计算各词库的权值,其中,包含关键词越多的词库对应的权值越大;
将所述权值中最大权值对应的词库作为所述目标词库。
可选地,所述在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语的步骤包括:
获取用户预设时间段内在浏览界面的浏览内容,对所述浏览内容进行语义分析,根据分析结果确定所述浏览内容的浏览类型,并在所述输入法对应的联想库中查找所述浏览类型对应的词库;
在所述浏览类型对应的词库中查找所述字符内容对应的联想词语。
可选地,所述获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值的步骤包括:
获取所述输入法类型对应的预设阈值及用户输入字符的字符数量;
将所述字符数量与所述预设阈值进行比较,确定所述字符数量是否大于预设阈值。
此外,为实现上述目的,本申请还提供一种输入法的联想装置,所述输入法的联想装置包括:
接收模块,用于接收用户的输入指令,确定所述输入指令对应的输入法类型;
第一获取模块,用于获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;
第二获取模块,用于若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;
联想模块,用于在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
此外,为实现上述目的,本申请还提供一种输入法的联想设备,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如上述的输入法的联想方法的步骤。
此外,为实现上述目的,本申请还提供一种可读存储介质,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的输入法的联想方法的步骤。
本申请提供一种输入法的联想方法、装置、设备及可读存储介质,本申请通过接收用户的输入指令,确定所述输入指令对应的输入法类型,然后获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值,接着若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容,最后在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面;实现了在输入字符的字符数量大于预设阈值才进行联想,从而避免了无意义的联想,减小了处理器的压力。
附图说明
图1为本申请各实施例涉及的输入法的联想设备的硬件结构示意图;
图2为本申请输入法的联想设备方法第一实施例的流程示意图;
图3为本申请输入法的联想设备方法第二实施例的流程示意图;
图4为本申请输入法的联想设备方法第三实施例的流程示意图;
图5为本申请输入法的联想设备方法第四实施例的流程示意图;
图6为本申请输入法的联想设备方法第五实施例的流程示意图;
图7为本申请输入法的联想设备方法第六实施例的流程示意图;
图8为本申请输入法的联想设备装置第一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例涉及的输入法的联想方法主要应用于输入法的联想设备,该输入法的联想设备可以是PC(个人计算机personal
computer)、便携计算机、移动终端等具有显示和处理功能的设备。
参照图1,图1为本申请实施例方案中涉及的输入法的联想设备的硬件结构示意图。本申请实施例中,输入法的联想设备可以包括处理器1001(例如中央处理器Central
Processing
Unit、CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile
memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的硬件结构并不构成对本申请的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种可读存储介质的存储器1005可以包括操作系统、网络通信模块以及计算机可读指令。在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的计算机可读指令,并执行本申请实施例提供的输入法的联想方法。
本申请实施例提供了一种输入法的联想方法。
参照图2,图2为本申请输入法的联想方法第一实施例的流程示意图。
在本实施例中,该输入法的联想方法的执行主体为输入法的联想设备,该输入法的联想设备可以是PC(个人计算机personal
computer)、便携计算机、移动终端等具有显示和处理功能的设备。该输入法的联想方法包括以下步骤:
步骤S10,接收用户的输入指令,确定所述输入指令对应的输入法类型;
在本实施例中,一般来说,用户可以设置输入法,在用户设置完输入法后,用户开始输入需要输入的内容,所以,首先检测是否接收到用户的输入指令,若接收到用户的输入指令,则确定当前用户使用输入法的输入法类型,
该输入法类型包括英文输入、中文输入等,其中,当用户按下键盘时,触发输入指令,则输入法的联想设备将监听到keydown事件,接收该输入指令。
步骤S20,获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;
在本实施例中,该预设阈值由技术人员进行设置,在接收到用户的输入指令时,监听输入框中接收到的keydown事件,对用户输入的字符数量进行计算,实时检测用户输入的字符是否大于预设阈值。
进一步地,可以根据不同的输入法类型设置不同的字符数量限制规则,即不同输入法类型对应的预设阈值可以不一样,所以,在接收到用户的输入指令时,确定该输入指令对应输入法的输入法类型,获取当前输入法类型对应的预设阈值,并检测到用户输入的字符数量是否大于预设阈值时,例如,若当前输入法类型为中文输入时,则字符的预设阈值为4个,若检测到当前输入法类型为英文输入时,则字符的预设阈值为5个。
步骤S30,若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;
在本实施例中,若检测用户输入的字符数量大于预设阈值,则获取输入指令对应的字符内容,字符可以是字符串,也可以是单个字符,该字符内容包括拼音、英文。当用户输入的字符数量大于预设阈值时,才进行联想,当用户输入的字符数量小于或等于预设阈值时,不进行联想,检测用户下次输入的字符,例如,例如,中文输入法可以设置字符数量的限制规则为4个字符,英文输入法中设置字符规则的限制规则为5个字符,若输入法类型为中文输入且中文字符达到四个字符时才开始联想,若输入法类型为英文输入法且英文字符达到5个字符,才开始进行联想,譬如,当用户预输入“王”字时,则监听到输入法类型为中文输入,检测到输入框中识别到的字符为“wang”,且字符内容的字符数量达到了4个字符,则可以根据用户输入的内容向后台发送模型查询请求,进行模糊查询。
步骤S40,在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
在本实施例中,不同输入法对应的联想库不同,例如,中文输入法对应的为中文联想库,英文输入法对应的为英文联想库。当检测到用户输入的字符数量大于预设阈值时,则向后台发送模糊查询请求,从联想词库中查询与字符内容匹配的联想词语,并将匹配的联想词语发送至输入法界面,供用户选择,具体地,在当检测到用户输入的字符数量大于预设阈值时,可以对用户在文本编辑器中已输入的输入内容进行语义分析,该文本编辑器包括输入框、记事本、文档编辑界面等。经过对已输入的输入内容进行语义分析,得到语义分析后的语义内容,根据语义内容确定该语义内容对应的语义环境。用户在文本编辑器已输入的输入内容为用户的关注对象,用户通过输入法输入的字符与该语义内容对应的语义环境最为密切,因此可根据输入法的语义环境预估用户输入时的需求,该语义环境是指用户输入的字符内容所处的上下文环境,例如,用户已输入的输入内容是在介绍一篇文学文章,则用户输入的字符内容所处的语义环境可以认为是文学相关的内容。根据该语义环境跟字符内容在联想库中查找对应的联想词语,并将联想词语发送至输入法界面。
本实施例提出的输入法的联想方法,通过接收用户的输入指令,确定所述输入指令对应的输入法类型,然后获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值,接着若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容,最后在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面;实现了在输入字符的字符数量大于预设阈值才进行联想,从而避免了无意义的联想,减小了处理器的压力。
基于第一实施例,提出本申请输入法的联想方法的第二实施例,参照图3,本实施例中,步骤S30包括:
步骤S31,若所述字符数量大于预设阈值,则检测用户是否按压预设键;
在本实施例中,当检测到用户输入字符的字符数量大于预设阈值时,则可以根据用户输入的字符内容在联想库中查找联想词语进行联想,但是,有时候当字符数量大于预设阈值时,联想的词语并不是用户所需要的,即根据预设数量的字符内容无法准确联想时,可以通过预设键的形式来触发联想指令,用户可以通过按压预设键触发联想指令,检测用户是否按压预设键。
步骤S32,若检测到用户按压预设键,则获取所述输入指令对应的字符内容。
在本实施例中,该预设键可以是空格键、回车键等,该预设键可以由用户根据自身习惯进行设置。首先检测用户输入字符的字符数量是否大于预设阈值,若用户输入字符的字符数量大于预设阈值,则检测用户是否按压预设键,若检测到用户按压预设键,则获取用户输入字符的字符内容,并根据字符内容在联想库中查询对应的联想词语,并将联想词语发送至输入法界面,例如,用户想要得到“王”子,预设阈值为2个字符,用户输入的字符内容为“wan”时,检测到字符数量大于预设阈值,则检测用户是否按压预设键,若检测到用户按压预设键,则会将“玩、完、晚、丸、王、汪”等联想词语发送至输入界面,供用户选择,当然,若用户在输入三个字符的字符内容时并没有按压预设键,则前台不会发送模糊请求至后台查询联想词语,检测用户在输入第四个字符时是否按压预设键,若检测到用户在输入四个字符“wang”时按压了预设键,则自动触发查询指令,在联想库中查找“wang”对应的联想词语,将“汪、王、网、忘”等联想词语发送至输入界面,以供用户选择。
在其它实施例中,也可以不需要检测用输入字符的字符数量是否大于预设阈值,直接检测用户是否按压预设键,即只要检测到用户按压预设键时,则根据输入的字符内容在联想库中查找联想词语进行联想。
本实施例提出的输入法的联想方法,通过若所述字符数量大于预设阈值,则检测用户是否按压预设键,然后若检测到用户按压预设键,则获取所述输入指令对应的字符内容;实现了通过检测用户是否按压预设键的方式来进行联想,从而更能准确查找出符合用户心意的联想词语,提高了用户体验,也同时避免了无意义的联想,提高了联想的效率,减小了处理器的压力。
基于第二实施例,提出本申请输入法的联想方法的第三实施例,参照图4,本实施例中,步骤S40包括:
步骤S41,获取用户在文本编辑器中已输入的输入内容,并对所述输入内容进行语义分析,以得到语义分析后的语义内容;
在本实施例中,不同输入法对应的联想库不同,例如,中文输入法对应的为中文联想库,英文输入法对应的为英文联想库。当检测到用户输入的字符数量大于预设阈值时,则向后台发送模糊查询请求,从联想词库中查询与字符内容匹配的联想词语,其中,在当检测到用户输入的字符数量大于预设阈值时,可以对用户在文本编辑器中已输入的输入内容进行语义分析,该文本编辑器包括输入框、记事本、文档编辑界面等。经过对已输入的输入内容进行语义分析,得到语义分析后的语义内容。
步骤S42,对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个;
在本实施例中,根据语义内容确定该语义内容对应的语义环境。用户在文本编辑器已输入的输入内容为用户的关注对象,用户通过输入法输入的字符与该语义内容对应的语义环境最为密切,因此可根据输入法的语义环境预估用户输入时的需求,该语义环境是指用户输入的字符内容所处的上下文环境。具体地,一条中文句子,词语之间都是连续的,而数据分析的最小单位粒度是词语,所以需要进行分词处理,包括需要对词性进行标注,例如,名词、从词、形容词、数量词等,词性标注的目的是为了让句子在后面的处理中融入更多的有用的语言信息,当然,对于有些文本处理任务,可以不用词性标注,然后去除停用词,停用词就是对文本特征没有任贡献作用的词语,比如,啊、的、标点符号等,在进行文本分析时需要对这些停用词去除掉,然后获取去除无用词之后的目标词语,然后根据词性分析,可以将形容词、数量词等不重要词性的词语去掉,得到关键词,并确定关键词是否是有一个。
步骤S43,若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
在本实施例中,若关键词只有一个,则在直接在词库中查找所述关键词对应的分类标签,其中,分类标签是指各个词语对应的类别,根据各个词语对应的类别可以确定语义内容对应的语义环境,例如,例如,用户已输入的输入内容是在介绍一篇文学文章,输入内容为“曹雪芹写的红楼梦中是”,通过词性分析去除停用词及不重要词性的词语后,获取关键词“红楼梦
”,则直接在词库中查找红楼梦对应的分类标签为“书籍”,还可以进一步分类为“文学书籍”,则判断用户输入的字符内容所处的语义环境可以认为是文学书籍相关的内容。根据该语义环境跟字符内容在联想库中查找对应的联想词语,并将联想词语发送至输入法界面,其中,联想库包括多个词库,在语义环境对应的词库中查找对应的联想词语,例如,在文学类的词库中查找对应的联想词语。
本实施例提出的输入法的联想方法,通过对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个,然后若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面;实现了在关键词为一个时,根据分类标签确定语义环境,并根据语义环境在联想库中查找联想词语,从而更能准确查找符合语义的联想词语,进而提高了联想的准确性。
基于第三实施例,提出本申请输入法的联想方法的第四实施例,参照图5,本实施例中,步骤S42之后,还包括:
步骤S44,若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库;
在本实施例中,当对语义内容进行分词处理即词性标注处理时,得到多个关键词,则确定多个关键词对应的各词库,并根据关键词在各词库出现的个数计算歌词库的权重,其中,包含关键词越多的词库对应的权重越大,将权值中最大权值作为目标词库。
步骤S45,在所述目标词库中查找所述字符内容对应的联想词语。
在本实施例中,在目标词库中查找字符内容对应的联想词语,例如,计算权值得到文学类的词库权值最大,则将文学类词库作为目标词库,在文学类词库中查找对应的联想词语。
其中,所述在所述输入法类型对应的联想库中查找所述关键词对应的目标词库的步骤包括:
步骤S441,确定各所述关键词对应的各词库,并根据所述关键词在各词库出现的个数计算各词库的权值,其中,包含关键词越多的词库对应的权值越大;
在本实施例中,关键词可以是单个的字,也可以是多个字组成的词,该联想库中包括多个词库,汉语的一个词可能表达多种意思,某个关键词能够存在于联想库中的多个词库中,当某个词库中包含的关键词越多时,则认为该词库优先级越高,具体地,首先确定各个关键词所在的词库,并确定各个词库中包含关键词的个数,其中,可以按照词库中包含关键词的个数确定词库的权重,例如,关键词有a、b、c、d,a、b两个关键词存在与A词库中,a、c两个关键词存在于B词库中,a、c、d三个关键词存在与C词库中,则A词库的权值为2,B词库的权值为2,C词库的权值为3。
步骤S442,将所述权值中最大权值对应的词库作为所述目标词库。
在本实施例中,某个词库中包含的关键词越多时,则认为该词库的权值越大,该词库优先级越高,将权值中最大权值对应的词库作为目标词库,该目标字库为优先级最高的词库,从优先级最高的词库中查找联想词。
本实施例提出的输入法的联想方法,通过若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库,然后在所述目标词库中查找所述字符内容对应的联想词语;实现了更准确的提高了查找联想词语的准确性,从而提高了联想的效率。
基于以上实施例,提出本申请输入法的联想方法的第五实施例,参照图6,本实施例中,步骤S40包括:
步骤S46,获取用户预设时间段内在浏览界面的浏览内容,对所述浏览内容进行语义分析,根据分析结果确定所述浏览内容的浏览类型,并在所述输入法对应的联想库中查找所述浏览类型对应的词库;
在本实施例中,用户在浏览界面浏览后在预设时间段内可能会输入浏览内容相关的内容,例如,有些用户存在读完一本书后会立即写读后感想,或者,用户在读完某个新闻消息时,立即到搜索网站搜索相关新闻信息,所以,可以将联想库进行分类,例如,分为通用类、化学类、计算机类、文学类等词库,根据用户在浏览界面的浏览内容的选择优先级高的词库,对用户浏览的内容进行语义分析,并根据分析结果确定浏览内容的浏览类型,例如,用户在浏览某军事新闻网站时,获取用户的浏览内容,对浏览内容进行语义分析,分析得到该浏览内容为军事相关的新闻,则在联想库中查找军事类对应的词库。
步骤S47,在所述浏览类型对应的词库中查找所述字符内容对应的联想词语。
在本实施例中,根据用户在浏览界面浏览的内容在该优先级高的词库中进行模糊查询,以进行联想词语推荐,例如,若检测到用户在浏览关于计算机方面的网页时,通过爬虫抓取网页数据,并对抓取到的数据进行语义分析,根据分析结果确定浏览内容对应的浏览类型为计算机类,则优先从计算机词库中获取联想词语,再从其它词库中查找联想词语,并将查找到的联想词语显示在输入法界面,供用户选择。
本实施例提出的输入法的联想方法,通过获取用户预设时间段内在浏览界面的浏览内容,对所述浏览内容进行语义分析,根据分析结果确定所述浏览内容的浏览类型,并在所述输入法对应的联想库中查找所述浏览类型对应的词库,然后在所述浏览类型对应的词库中查找所述字符内容对应的联想词语;实现了根据用户的浏览内容在相关词库中查找联想词语,从而提高了查找的效率。
基于第一实施例,提出本申请输入法的联想方法的第六实施例,参照图7,本实施例中,步骤S20包括:
步骤S21,获取所述输入法类型对应的预设阈值及用户输入字符的字符数量;
在本实施例中,可以根据不同的输入法类型设置不同的字符数量限制规则,即不同输入法类型对应的预设阈值可以不一样,所以,在接收到用户的输入指令时,确定该输入指令对应输入法的输入法类型,获取当前输入法类型对应的预设阈值,并获取用户输入字符的字符数量,例如,若当前输入法类型为中文输入时,则字符的预设阈值为4个,若检测到当前输入法类型为英文输入时,则字符的预设阈值为5个。
步骤S22,将所述字符数量与所述预设阈值进行比较,确定所述字符数量是否大于预设阈值。
在本实施例中,实时检测到用户输入的字符数量,确定字符数量是否大于预设阈值,若字符数量大于预设阈值,则根据输入的字符内容在联想库中查找对应的联想词语,并将联想词语发送至输入法界面,供用户选择。
本实施例提出的输入法的联想方法,通过获取所述输入法类型对应的预设阈值及用户输入字符的字符数量,然后将所述字符数量与所述预设阈值进行比较,确定所述字符数量是否大于预设阈值;实现了根据不同输入法类型确定不同的预设阈值,从而能够是应用于不同输入法类型的联想,进一步地提高了联想的效率。
此外,本申请实施例还提供一种输入法的联想装置。
参照图8,图8为本申请输入法的联想装置第一实施例的功能模块示意图。
本申请输入法的联想装置为虚拟装置,存储于图1所示输入法的联想设备的存储器1005中,用于实现计算机可读指令的所有功能:接收用户的输入指令,确定所述输出指令对应输入法类型;获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
具体的,本实施例中,所述输入法的联想装置包括:
接收模块101,用于接收用户的输入指令,确定所述输入指令对应的输入法类型;
第一获取模块102,获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;
第二获取模块103,若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;
联想模块104,在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
进一步地,所述第二获取模块103还用于:
若所述字符数量大于预设阈值,则检测用户是否按压预设键;
若检测到用户按压预设键,则获取所述输入指令对应的字符内容。
进一步地,所述联想模块104还用于:
获取用户在文本编辑器中已输入的输入内容,并对所述输入内容进行语义分析,以得到语义分析后的语义内容;
对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个;
若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
进一步地,所述联想模块104还用于:
若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库;
在所述目标词库中查找所述字符内容对应的联想词语。
进一步地,所述联想模块104还用于:
确定各所述关键词对应的各词库,并根据所述关键词在各词库出现的个数计算各词库的权值,其中,包含关键词越多的词库对应的权值越大;
将所述权值中最大权值对应的词库作为所述目标词库。
进一步地,所述联想模块104还用于:
获取用户预设时间段内在浏览界面的浏览内容,对所述浏览内容进行语义分析,根据分析结果确定所述浏览内容的浏览类型,并在所述输入法对应的联想库中查找所述浏览类型对应的词库;
在所述浏览类型对应的词库中查找所述字符内容对应的联想词语。
进一步地,所述第一获取模块102还用于:
获取所述输入法类型对应的预设阈值及用户输入字符的字符数量;
将所述字符数量与所述预设阈值进行比较,确定所述字符数量是否大于预设阈值。
其中,上述输入法的联想装置中各个模块的功能实现与上述输入法的联想方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
此外,本申请实施例还提供一种可读存储介质,所述计算机可读存储介质可以为非易失性可读存储介质。
本申请可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的输入法的联想方法的步骤。
其中,计算机可读指令被执行时所实现的方法可参照本申请输入法的联想方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种输入法的联想方法,其特征在于,所述输入法的联想方法包括以下步骤:接收用户的输入指令,确定所述输入指令对应的输入法类型;获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
- 如权利要求1所述的输入法的联想方法,其特征在于,所述若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容的步骤包括:若所述字符数量大于预设阈值,则检测用户是否按压预设键;若检测到用户按压预设键,则获取所述输入指令对应的字符内容。
- 如权利要求2所述的输入法的联想方法,其特征在于,所述在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面的步骤包括:获取用户在文本编辑器中已输入的输入内容,并对所述输入内容进行语义分析,以得到语义分析后的语义内容;对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个;若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
- 如权利要求3所述的输入法的联想方法,其特征在于,所述对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个的步骤之后,所述输入法的联想方法还包括:若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库;在所述目标词库中查找所述字符内容对应的联想词语。
- 如权利要求4所述的输入法的联想方法,其特征在于,所述联想库中包括多个词库,所述在所述输入法类型对应的联想库中查找所述关键词对应的目标词库的步骤包括:确定各所述关键词对应的各词库,并根据所述关键词在各词库出现的个数计算各词库的权值,其中,包含关键词越多的词库对应的权值越大;将所述权值中最大权值对应的词库作为所述目标词库。
- 如权利要求1所述的输入法的联想方法,其特征在于,所述在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语的步骤包括:获取用户预设时间段内在浏览界面的浏览内容,对所述浏览内容进行语义分析,根据分析结果确定所述浏览内容的浏览类型,并在所述输入法对应的联想库中查找所述浏览类型对应的词库;在所述浏览类型对应的词库中查找所述字符内容对应的联想词语。
- 如权利要求1所述的输入法的联想方法,其特征在于,所述获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值的步骤包括:获取所述输入法类型对应的预设阈值及用户输入字符的字符数量;将所述字符数量与所述预设阈值进行比较,确定所述字符数量是否大于预设阈值。
- 一种输入法的联想装置,其特征在于,所述输入法的联想装置包括:接收模块,用于接收用户的输入指令,确定所述输入指令对应的输入法类型;第一获取模块,用于获取用户输入字符的字符数量,并确定所述字符数量是否大于预设阈值;第二获取模块,用于若所述字符数量大于预设阈值,则获取所述输入指令对应的字符内容;联想模块,用于在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
- 如权利要求8所述的输入法的联想方法,其特征在于,所述第二获取模块还用于:若所述字符数量大于预设阈值,则检测用户是否按压预设键;若检测到用户按压预设键,则获取所述输入指令对应的字符内容。
- 如权利要求9所述的输入法的联想方法,其特征在于,所述联想模块还用于:获取用户在文本编辑器中已输入的输入内容,并对所述输入内容进行语义分析,以得到语义分析后的语义内容;对所述语义内容进行分词处理及词性标注处理,以提取所述语义内容中的关键词,并确定所述关键词是否只有一个;若所述关键词只有一个,查找所述关键词对应的分类标签,并根据所述分类标签确定所述语义内容的语义环境,根据所述语义环境在所述输入法类型对应的联想库中查找所述字符内容对应的联想词语,并将所述联想词语发送至输入法界面。
- 如权利要求10所述的输入法的联想方法,其特征在于,所述联想模块还用于:若所述关键词为多个,则在所述输入法类型对应的联想库中查找所述关键词对应的目标词库;在所述目标词库中查找所述字符内容对应的联想词语。
- 如权利要求11所述的输入法的联想方法,其特征在于,所述联想模块还用于:确定各所述关键词对应的各词库,并根据所述关键词在各词库出现的个数计算各词库的权值,其中,包含关键词越多的词库对应的权值越大;将所述权值中最大权值对应的词库作为所述目标词库。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求1所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求2所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求3所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求4所述的输入法的联想方法的步骤。
- 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如权利要求1所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求2所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求3所述的输入法的联想方法的步骤。
- 一种输入法的联想设备,其特征在于,所述输入法的联想设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现如权利要求4所述的输入法的联想方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811249709.X | 2018-10-25 | ||
CN201811249709.XA CN109634436B (zh) | 2018-10-25 | 2018-10-25 | 输入法的联想方法、装置、设备及可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020082766A1 true WO2020082766A1 (zh) | 2020-04-30 |
Family
ID=66066666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/092464 WO2020082766A1 (zh) | 2018-10-25 | 2019-06-24 | 输入法的联想方法、装置、设备及可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109634436B (zh) |
WO (1) | WO2020082766A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641254A (zh) * | 2021-08-16 | 2021-11-12 | 未鲲(上海)科技服务有限公司 | 输入法的智能切换方法、装置、设备及存储介质 |
CN113703591A (zh) * | 2021-08-26 | 2021-11-26 | 京东方科技集团股份有限公司 | 输入控制方法及其装置、电子白板及可读存储介质 |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109634436B (zh) * | 2018-10-25 | 2023-11-10 | 平安科技(深圳)有限公司 | 输入法的联想方法、装置、设备及可读存储介质 |
CN112015281A (zh) * | 2019-05-29 | 2020-12-01 | 北京搜狗科技发展有限公司 | 一种云端联想方法和相关装置 |
CN110262911A (zh) * | 2019-06-24 | 2019-09-20 | 北京向上一心科技有限公司 | 输入框的优化方法、优化装置、控制器及存储介质 |
CN113589950A (zh) * | 2020-04-30 | 2021-11-02 | 北京搜狗科技发展有限公司 | 输入方法、装置和用于输入的装置 |
CN114330305B (zh) * | 2020-09-29 | 2024-10-29 | 北京搜狗科技发展有限公司 | 一种词条召回方法、装置和用于召回词条的装置 |
CN112199215B (zh) * | 2020-10-13 | 2024-01-19 | 恒生电子股份有限公司 | 消息处理方法、装置、设备及存储介质 |
CN114442816B (zh) * | 2020-11-04 | 2024-08-30 | 北京搜狗科技发展有限公司 | 一种联想预取方法、装置和用于联想预取的装置 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060265668A1 (en) * | 2005-05-23 | 2006-11-23 | Roope Rainisto | Electronic text input involving a virtual keyboard and word completion functionality on a touch-sensitive display screen |
CN101246396A (zh) * | 2008-03-10 | 2008-08-20 | 宇龙计算机通信科技(深圳)有限公司 | 一种输入控制装置及其识别联想输入方法 |
CN101546228A (zh) * | 2009-05-07 | 2009-09-30 | 腾讯科技(深圳)有限公司 | 一种实现英文提示的输入方法和装置 |
US20130091455A1 (en) * | 2011-10-06 | 2013-04-11 | Samsung Electronics Co., Ltd. | Electronic device having touchscreen and character input method therefor |
CN105302332A (zh) * | 2014-07-25 | 2016-02-03 | 中国移动通信集团公司 | 一种拼音输入法及其实现装置 |
CN109634436A (zh) * | 2018-10-25 | 2019-04-16 | 平安科技(深圳)有限公司 | 输入法的联想方法、装置、设备及可读存储介质 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7630980B2 (en) * | 2005-01-21 | 2009-12-08 | Prashant Parikh | Automatic dynamic contextual data entry completion system |
CN103076892B (zh) * | 2012-12-31 | 2016-09-28 | 百度在线网络技术(北京)有限公司 | 一种用于提供输入字符串所对应的输入候选项的方法与设备 |
CN104133855B (zh) * | 2014-07-11 | 2017-12-19 | 中安消技术有限公司 | 一种输入法智能联想的方法及装置 |
CN104298429B (zh) * | 2014-09-25 | 2018-05-04 | 北京搜狗科技发展有限公司 | 一种基于输入的信息展示方法和输入法系统 |
CN104391588B (zh) * | 2014-11-07 | 2016-06-29 | 腾讯科技(深圳)有限公司 | 一种输入提示的方法及装置 |
CN107608532B (zh) * | 2016-07-11 | 2021-11-02 | 北京搜狗科技发展有限公司 | 一种联想输入方法、装置及电子设备 |
CN106446186A (zh) * | 2016-09-28 | 2017-02-22 | 北京金山安全软件有限公司 | 联想词检索方法以及装置、终端 |
-
2018
- 2018-10-25 CN CN201811249709.XA patent/CN109634436B/zh active Active
-
2019
- 2019-06-24 WO PCT/CN2019/092464 patent/WO2020082766A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060265668A1 (en) * | 2005-05-23 | 2006-11-23 | Roope Rainisto | Electronic text input involving a virtual keyboard and word completion functionality on a touch-sensitive display screen |
CN101246396A (zh) * | 2008-03-10 | 2008-08-20 | 宇龙计算机通信科技(深圳)有限公司 | 一种输入控制装置及其识别联想输入方法 |
CN101546228A (zh) * | 2009-05-07 | 2009-09-30 | 腾讯科技(深圳)有限公司 | 一种实现英文提示的输入方法和装置 |
US20130091455A1 (en) * | 2011-10-06 | 2013-04-11 | Samsung Electronics Co., Ltd. | Electronic device having touchscreen and character input method therefor |
CN105302332A (zh) * | 2014-07-25 | 2016-02-03 | 中国移动通信集团公司 | 一种拼音输入法及其实现装置 |
CN109634436A (zh) * | 2018-10-25 | 2019-04-16 | 平安科技(深圳)有限公司 | 输入法的联想方法、装置、设备及可读存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641254A (zh) * | 2021-08-16 | 2021-11-12 | 未鲲(上海)科技服务有限公司 | 输入法的智能切换方法、装置、设备及存储介质 |
CN113703591A (zh) * | 2021-08-26 | 2021-11-26 | 京东方科技集团股份有限公司 | 输入控制方法及其装置、电子白板及可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN109634436A (zh) | 2019-04-16 |
CN109634436B (zh) | 2023-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020082766A1 (zh) | 输入法的联想方法、装置、设备及可读存储介质 | |
WO2021132927A1 (en) | Computing device and method of classifying category of data | |
WO2020215681A1 (zh) | 指示信息生成方法、装置、终端及存储介质 | |
WO2010036013A2 (ko) | 웹 문서에서의 의견 추출 및 분석 장치 및 그 방법 | |
WO2020034526A1 (zh) | 保险录音的质检方法、装置、设备和计算机存储介质 | |
WO2013105826A1 (en) | Method and apparatus for executing a user function using voice recognition | |
WO2019037197A1 (zh) | 主题分类器的训练方法、装置及计算机可读存储介质 | |
WO2013122269A1 (ko) | 단말기의 사용자 인터페이스 제공 방법 | |
WO2015020354A1 (en) | Apparatus, server, and method for providing conversation topic | |
WO2021051558A1 (zh) | 基于知识图谱的问答方法、装置和存储介质 | |
WO2019112342A1 (en) | Voice recognition apparatus and operation method thereof cross-reference to related application | |
WO2020107761A1 (zh) | 广告文案处理方法、装置、设备及计算机可读存储介质 | |
WO2022060066A1 (ko) | 전자 장치, 컨텐츠 검색 시스템 및 검색 방법 | |
EP3164847A1 (en) | Electronic device and method for providing content on electronic device | |
WO2019177182A1 (ko) | 속성 정보 분석을 통한 멀티미디어 컨텐츠 검색장치 및 검색방법 | |
WO2020233078A1 (zh) | 用户信息表单的构建方法、装置、设备及存储介质 | |
WO2021003956A1 (zh) | 产品信息的管理方法、装置、设备及存储介质 | |
WO2017115994A1 (ko) | 인공 지능 기반 연관도 계산을 이용한 노트 제공 방법 및 장치 | |
WO2020177376A1 (zh) | 数据的提取方法、装置、终端及计算机可读存储介质 | |
WO2019112117A1 (ko) | 텍스트 콘텐츠 작성자의 메타정보를 추론하는 방법 및 컴퓨터 프로그램 | |
WO2021051557A1 (zh) | 基于语义识别的关键词确定方法、装置和存储介质 | |
WO2015037815A1 (ko) | 스마트 기기 내 시맨틱 검색 시스템 및 검색방법 | |
WO2023101377A1 (en) | Method and apparatus for performing speaker diarization based on language identification | |
WO2020149655A1 (ko) | 장치 속성에 기반한 공유 데이터의 제공 방법 및 그 전자 장치 | |
WO2024019226A1 (ko) | 유해 url 탐지 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19876045 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31/08/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19876045 Country of ref document: EP Kind code of ref document: A1 |