[go: up one dir, main page]

CN112181163B - Input method, device and device for input - Google Patents

Input method, device and device for input Download PDF

Info

Publication number
CN112181163B
CN112181163B CN201910605239.4A CN201910605239A CN112181163B CN 112181163 B CN112181163 B CN 112181163B CN 201910605239 A CN201910605239 A CN 201910605239A CN 112181163 B CN112181163 B CN 112181163B
Authority
CN
China
Prior art keywords
candidate
input string
input
target hit
hit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910605239.4A
Other languages
Chinese (zh)
Other versions
CN112181163A (en
Inventor
余天照
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201910605239.4A priority Critical patent/CN112181163B/en
Publication of CN112181163A publication Critical patent/CN112181163A/en
Application granted granted Critical
Publication of CN112181163B publication Critical patent/CN112181163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements 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/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Machine Translation (AREA)

Abstract

本发明实施例提供了一种输入方法、装置和用于输入的装置。其中的方法具体包括:依据输入串对应的上下文,在多元关系数据中进行查找,以得到所述上下文对应的命中元;从所述命中元中确定出所述输入串对应的目标命中元;依据所述输入串对应的目标命中元,确定所述输入串对应的第一候选。本发明实施例可以在降低设备资源的消耗的情况下,提供输入串对应的长词联想功能,进而可以提高输入效率。

The embodiment of the present invention provides an input method, device and device for input. The method specifically includes: searching in multivariate relational data according to the context corresponding to the input string to obtain a hit element corresponding to the context; determining a target hit element corresponding to the input string from the hit element; and determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string. The embodiment of the present invention can provide a long word association function corresponding to the input string while reducing the consumption of device resources, thereby improving input efficiency.

Description

Input method, device and device for inputting
Technical Field
The present invention relates to the field of input technologies, and in particular, to an input method, an input device, and an input device.
Background
The device is used as a bridge for the communication between the computer system and the user or other devices, is one of main devices for information interaction between the user and the computer system, and can facilitate the user to input information in various scenes. For example, a user may input keywords in a search engine to search for web pages, may input text in an instant messaging APP (Application) to communicate with other users, may input text in a document APP to edit a document, and so on.
The association function of the input method is an expansion function of the input method program, the occurrence of which reduces the number of times of active input by a user and the number of times of key presses, and increases the intelligence of the input method. One implementation process of the long word association function includes: firstly, searching and obtaining corresponding common candidates in a word stock according to an input string of a user; and then, matching the common candidate with the left element in the binary library, and obtaining a first candidate according to the right element successfully matched. For example, the input string is "jinttq", then the first candidate "today's weather is good" can be obtained using the implementation procedure described above, where "good" is the right element of successful matching according to "jinttq".
Along with the growth of the internet corpus, the number of vocabulary entries in the lexicon is gradually increased, which leads to a larger number of common candidates corresponding to the input strings, and further leads to a larger operand corresponding to the matching of the binary lexicon, so that the resource consumption of the equipment is increased. In particular, in the case where the input string is a simple pinyin string and/or the input string is input through a nine-square key, the number of common candidates corresponding to the input string is particularly large. For example, when the nine-square button "9" is pressed, all entries beginning with wxyz satisfy the condition of the normal candidate, which results in a huge amount of computation for matching the binary library. Therefore, in order to reduce the resource consumption of the device, a long word association function is not provided in the case where the input string is short. The word length corresponding to the input string required by the current long word association function is generally 4, that is, the input string is matched to 4 words in the word stock, the long word association function is provided, otherwise, if the word length corresponding to the input string is less than 4, the long word candidate function is not provided, for example, the input string is "w" or "jint", and the corresponding long word candidate cannot be provided by the current input method.
Disclosure of Invention
The embodiment of the invention provides an input method, an input device and an input device, which can provide a long word association function corresponding to an input string under the condition of reducing equipment resource consumption, thereby improving input efficiency.
In order to solve the above problems, an embodiment of the present invention discloses an input method, including:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
And determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
In another aspect, an embodiment of the present invention discloses an input device, including:
The searching module is used for searching in the multivariate relation data according to the context corresponding to the input string so as to obtain a hit element corresponding to the context;
The target hit element determining module is used for determining a target hit element corresponding to the input string from the hit elements; and
And the first candidate determining module is used for determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
In yet another aspect, an embodiment of the present invention discloses an apparatus for input, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
And determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
In yet another aspect, embodiments of the present invention disclose a machine-readable medium having instructions stored thereon that, when executed by one or more processors, cause an apparatus to perform an input method as described in one or more of the preceding.
The embodiment of the invention has the following advantages:
According to the embodiment of the invention, the searching of the multi-element relation data is carried out according to the context, and compared with the searching of the multi-element relation data according to the entry corresponding to the input string, the operation amount corresponding to searching can be reduced, so that the consumption of equipment resources can be reduced.
In addition, the embodiment of the invention obtains the hit element according to the context, and determines the first candidate corresponding to the input string according to the target hit element corresponding to the input string, the obtaining process of the first candidate does not limit the word length corresponding to the input string, and even if the word length corresponding to the input string is shorter (for example, 1), the embodiment of the invention can still obtain the corresponding first candidate; therefore, the embodiment of the invention can provide the long word association function corresponding to the input string under the condition of reducing the consumption of equipment resources, thereby improving the input efficiency; in addition, the embodiment of the invention can provide the user with the available long word association under the condition of shorter input strings, so that the input experience can be improved and the input efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an application environment for an input method of an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a first embodiment of an input method according to the present invention;
FIG. 3 is a flow chart of steps of a second embodiment of an input method of the present invention;
FIG. 4 is a flow chart of the steps of a third embodiment of an input method of the present invention;
FIG. 5 is a block diagram of an embodiment of an input device of the present invention;
FIG. 6 is a block diagram of an apparatus 800 for input of the present invention; and
Fig. 7 is a schematic structural diagram of a server according to some embodiments of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides an input scheme, which can search in multi-element relation data according to a context corresponding to an input string to obtain a hit element corresponding to the context; determining a target hit element corresponding to the input string from the hit elements; and determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
In an embodiment of the present invention, the context may include: the context to which the input string corresponds, and/or the context to which the input string corresponds. Alternatively, the context is typically the portion before the input cursor and the context is typically the portion after the input cursor.
According to one embodiment, the above may include: last or more recent on-screen content. According to another embodiment, the above may include: in the communication scene, the communication content sent by the opposite communication terminal. According to a further embodiment, the above may comprise: in a communication scenario, communication content is sent to a communication peer. It will be appreciated that embodiments of the invention are not limited to a particular context.
The multi-element relationship data may include binary and more relationship data. Binary relationships, also known as 2-grams, are used to represent the probability of two elements appearing in succession, where in the field of input methods, the elements may include: at least one of vocabulary, phrases, letters, numbers, and symbols. In the embodiment of the invention, the binary relation mainly comprises the binary relation of the vocabulary, and other types of binary relation can be referred to each other. The relationship of two or more is used to represent the probability that two or more elements appear in succession.
According to the position of the vocabulary in the multivariate relationship data, the binary relationship data may comprise: the left and right elements, ternary relationship data may include: left element, middle element and right element. Thus, in the embodiment of the present invention, the types of the hit elements may include: left element, or middle element, or right element.
For example, where the input string corresponds to an context and not to a context, the types of hit elements may include: right element. For example, the above corresponding to the input string includes: "you have", "Aiqi", the input string is "h", then the hit element (right element) obtained based on the multivariate relationship data may include: "Member", "video", "mock", wherein the target hit corresponding to the input string "h" may be "Member", whereby the first candidate "Member" may be provided.
As another example, where the input string corresponds to a context and a context, the types of hit elements may include: an intermediate element. For example, given the "weather" above, the "everywhere good wind and light" below, and the "h" input string, hit elements (intermediate elements) obtained based on the multivariate relationship data may include: "good clear", whereby a first candidate "good clear" may be provided.
For another example, where the input string corresponds to a context and not to a context, the types of hit elements may include: left element. For example, the following corresponding to the input string includes: "republic", the input string is "z", the hit element (left element) obtained based on the multivariate relation data may include: "people of the same kind" can thus be provided as the first candidate "people of the same kind".
According to the embodiment of the invention, firstly, searching is carried out in the multivariate relation data according to the context corresponding to the input string, so as to obtain a hit element corresponding to the context, then, a target hit element corresponding to the input string is determined from the hit elements, and further, a first candidate corresponding to the input string is determined according to the target hit element corresponding to the input string.
According to the embodiment of the invention, the searching of the multi-element relation data is carried out according to the context, and compared with the searching of the multi-element relation data according to the entry corresponding to the input string, the operation amount corresponding to searching can be reduced, so that the consumption of equipment resources can be reduced.
In addition, the embodiment of the invention obtains the hit element according to the context, and determines the first candidate corresponding to the input string according to the target hit element corresponding to the input string, the acquiring process of the first candidate does not limit the word length corresponding to the input string, and even if the word length corresponding to the input string is shorter (for example, 1), the embodiment of the invention can still obtain the corresponding first candidate, so the embodiment of the invention can provide the long word association function corresponding to the input string under the condition of reducing the consumption of equipment resources, and further can improve the input efficiency.
The embodiment of the invention can be applied to input method programs of various input modes such as keyboard symbols, handwriting and the like, namely, a user can input characters through the coded character strings, and the input strings can refer to the coded character strings input by the user. In the field of input methods, for input method programs such as chinese, japanese, korean, or other languages, it is common to convert an input string input by a user into candidates of the corresponding language. In the following, the Chinese language will be mainly used as an example, and other languages such as Japanese and Korean may be referred to each other. It will be appreciated that the chinese input method may include, but is not limited to, full spellings, simple spellings, strokes, wubi, etc., and the embodiment of the present invention does not limit the specific input method program corresponding to a certain language.
Taking chinese input as an example, the types of encoded strings may include: pinyin strings, glyph strings (e.g., wubi strings, etc.). Taking english input as an example, the types of the encoded string may include: alphabetic character strings, and the like.
The input method provided by the embodiment of the invention can be applied to the application environment shown in fig. 1, and as shown in fig. 1, the client 100 and the server 200 are located in a wired or wireless network, and the client 100 and the server 200 perform data interaction through the wired or wireless network.
Alternatively, client 100 may operate on terminals including, but not limited to: smart phones, tablet computers, e-book readers, MP3 (moving picture experts compression standard audio layer 3,Moving Picture Experts Group Audio Layer III) players, MP4 (moving picture experts compression standard audio layer 4,Moving Picture Experts Group Audio Layer IV) players, laptop portable computers, car computers, desktop computers, set top boxes, smart televisions, wearable devices, and the like. Client 100 may correspond to a website, or APP.
In practical applications, the user may input the input string through a physical keyboard, a virtual keyboard, or the like, for the input method of the keyboard symbols. For example, for a terminal with a touch screen, a virtual keyboard may be set in an input interface to use input of an input string by triggering virtual keys included in the virtual keyboard. Alternatively, examples of the above virtual keyboard may include: a 9-key keyboard, a 26-key keyboard, etc. In addition, it can be understood that the above-mentioned input interface may be provided with a symbol key, a number key, a function key such as a chinese-english switching key, or a toolbar key, in addition to a virtual key corresponding to a letter, which can be understood that the embodiment of the present invention is not limited to the specific key included in the input interface.
According to some embodiments, the input string may include, but is not limited to: one key symbol or a combination of key symbols entered by the user through the keys. The key symbol may specifically include: pinyin, strokes, kana, etc.
In the embodiment of the invention, the candidates can be used for representing one or more characters provided by the input method program to be selected by a user. The candidates may correspond to the context, or the candidates may correspond to the input string and the context. The candidates may be characters of languages such as chinese characters, english characters, japanese characters, or symbol combinations in the form of characters or pictures. Wherein, the said pigment literal includes but is not limited to the line, symbol, picture that the literal forms, for example, the example of the said pigment literal can include: ": p ",": -o ",": -) ", and the like.
Binary relationship data can be used to reflect the probability of two words being used next to each other. In one aspect, the vocabulary may include language words composed of letters, which may be words, phrases composed of letters printed on a keyboard, and may be particularly applicable to english, french, german, etc.; on the other hand, the vocabulary may further include a character sequence corresponding to a text language composed of pinyin and/or strokes, where the character sequence corresponding to the text language composed of pinyin and/or strokes may include a word corresponding to pinyin, a word corresponding to strokes, and the like, and may be specifically applicable to chinese, japanese, korean, and the like.
In an alternative embodiment of the invention, the multivariate relationship data may be characterized by a data model. Types of data models may include, but are not limited to: language models, neural network models, etc. The data model may provide P (arbitrary element|context, …), i.e., the probability of an arbitrary element under certain context, etc. From this probability, the hit for the context can be determined. The corpus used by the data model may include: corpus in context, etc., including but not limited to: internet corpus, chat corpus of users, input corpus of users, etc.
The mathematical model is a scientific or engineering model constructed by using a mathematical logic method and a mathematical language, and is a mathematical structure which is expressed in a generalized or approximate way by adopting the mathematical language aiming at referring to the characteristic or the quantity dependency relationship of a certain object system, and the mathematical structure is a relationship structure which is expressed by means of mathematical symbols. The mathematical model may be one or a set of algebraic, differential, integral or statistical equations and combinations thereof by which the interrelationship or causal relationship between the variables of the system is described quantitatively or qualitatively. In addition to mathematical models described by equations, there are models described by other mathematical tools, such as algebra, geometry, topology, mathematical logic, etc. Wherein the mathematical model describes the behavior and characteristics of the system rather than the actual structure of the system. The training of the mathematical model may be performed by a machine learning method, a deep learning method, and the like, and the machine learning method may include: linear regression, decision trees, random forests, etc., the deep learning method may include: convolutional neural network (Convolutional Neural Networks, CNN), long Short-Term Memory network (LSTM), gated loop unit (Gated Recurrent Unit, GRU), etc.
Optionally, the conditions of the data model may further include: environmental characteristics are entered. In this case, the data model may provide P (arbitrary element|context, input environmental features, …).
In the embodiment of the invention, the input environment characteristic can be used for representing the environment information of the terminal when the user inputs. The input environment features can reflect the input intention of the user to a certain extent, so that a connection is established between the input environment features and the input intention of the user, the input intention of the user can be indirectly identified, and the input efficiency of the user is further improved.
In practical applications, the input environmental features described above may include various types of features. Optionally, the input environmental features may include: at least one of a temporal context feature, a location context feature, a climate context feature, an application context feature, and a page context feature.
Even the same terminal is likely to change its environmental information, and the time environmental feature is a typical example. Therefore, the input environment characteristics of the embodiment of the invention can be real-time, and the input environment characteristics corresponding to the input strings can be obtained in real time in the input process.
For an input string, its time of receipt may be taken as the corresponding time context feature.
Location information obtained from its IP (protocol for interconnection between networks, internet Protocol) address, the GPS (global positioning system ) of the terminal, or the mobile communication network may be used as the corresponding location context feature.
The input method program can be taken as a hosting program, can be hosted in any host program and can be called up by the host program to realize the input in the host program, for example, a user can type an input string in the host program and select candidate items corresponding to the input string to be displayed on the screen. In the embodiment of the invention, the environmental characteristics of the application program corresponding to the input string can be the information of the host program corresponding to the input method program.
Optionally, the application environment feature corresponding to the input string may be determined according to the identification feature of the current object being served by the input method program, for example, when the input method program is running, call GetModuleFilename to find the program path name "C: programfiles microsoft offeeoffice 11winword.exe", that is, the corresponding application environment feature may be determined to be "Winword.exe", that is, the input string is input in "word", and of course, the embodiment of the present invention does not limit the specific acquisition manner of the application environment feature corresponding to the input string.
In an embodiment of the present invention, the application environment features may include: application identification and/or application category. For example, the "word" is an application identifier, and the application category corresponding to the "word" is an office category, etc. It will be appreciated that those skilled in the art may categorize applications into corresponding application categories according to actual application needs, for example, examples of application categories may include, but are not limited to: instant messaging category, document category, search category, web page category, shopping category, travel category, and the like.
The page environment feature may be used to characterize the page environment provided by an application or website, which may alternatively include, but is not limited to: instant messaging page environment, document page environment, mail page environment, password input page environment, game page environment, search page environment, travel page environment, shopping page environment, social page environment, movie page environment, reading page environment and the like.
Of course, in addition to time environmental features, location environmental features, application environmental features, and page environmental features, input environmental features of embodiments of the present invention may also include other environmental features, such as physical environmental features of barometric pressure, altitude, temperature, humidity, and the like. Among other things, it is to be understood that embodiments of the present invention are not limited to specific input environment features.
Method embodiment one
Referring to fig. 2, a flowchart illustrating steps of a first embodiment of an input method of the present invention may specifically include the following steps:
step 201, searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
step 202, determining a target hit element corresponding to the input string from the hit elements;
Step 203, determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
The method embodiment shown in fig. 2 may be performed by a client and/or a server, and it is to be understood that the embodiment of the present invention is not limited to the specific implementation of the method embodiment.
In step 201, the context may be matched with the structure field of the corresponding position in the multivariate relation data to obtain a hit element corresponding to the context. Hit elements may refer to structure fields of a lookup hit.
For example, the context includes: the above may be matched with the left element in the multivariate relation data, and the hit element obtained may be the right element. As another example, the context includes: then, the right element in the multi-element relation data can be matched with the right element, and the obtained hit element is the left element. Or the context includes: and (3) the context and the context can be respectively matched with a left element and a right element in the multivariate relation data to obtain a hit element as an intermediate element.
In step 202, the hit elements may be filtered to obtain target hit elements corresponding to the input string.
In an alternative embodiment of the present invention, the hit element may be matched with the input string to obtain the target hit element.
According to one embodiment, the determining, from the hit elements, the target hit element corresponding to the input string may specifically include: and matching the code character string corresponding to the hit element with the input string to obtain a target hit element corresponding to the input string.
The embodiment of the invention can adopt a character string matching mode, and particularly can match the code character string corresponding to the hit element with the input string.
Alternatively, the input string may be a portion of the encoded string corresponding to the target hit. For example, the input string is "h", and the code string corresponding to the target hit is "huiyuan".
Alternatively, the input string may be a prefix of the encoded string corresponding to the target hit element. The prefix may refer to a portion located in front. For example, the input string is "hui", and the code string corresponding to the target hit is "huiyuan".
According to another embodiment, the determining, from the hit elements, the target hit element corresponding to the input string may specifically include: and matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string to obtain the target hit element corresponding to the input string.
The matching sequence may be an intermediate structure between the string of code words and the entry that may be used to match the entry in the lexicon. The matching sequence may include: syllable sequences, amble sequences, number sequences, symbol sequences, and the like. It will be appreciated that embodiments of the present invention are not limited to a particular matching sequence.
The embodiment of the invention can adopt a matching mode of the matching sequences, in particular to match the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string.
For example, the input string is "h", the syllable sequence corresponding to "h" is [ h ], the code string corresponding to the target hit is "huiyuan", the syllable sequence corresponding to "huiyuan" is [ hui ] [ yuan ], and [ h ] and [ hui ] are matched, i.e., the simple syllable can be matched with the corresponding full-spelled syllable.
In an alternative embodiment of the present invention, for the structure field in the multiple relational data, a corresponding encoding string or matching sequence may be stored, that is, a mapping relationship between the structure field and the encoding string or matching sequence may be stored, so that the encoding string or matching sequence corresponding to the hit element may be determined according to the mapping relationship.
It will be appreciated that matching the hit element with the input string is merely an example of a determination method of the target hit element, and those skilled in the art may actually determine the target hit element in other determination manners according to actual application requirements.
In one embodiment of the invention, the target hit element can be determined according to the conditional probability corresponding to the hit element, so that the quality of the target hit element can be improved, and the conditional probability is used for representing the occurrence probability of the hit element under the condition of the context. Alternatively, a hit element with a conditional probability exceeding a probability threshold may be used as a target hit element, and accordingly, the conditional probability of the target hit element exceeds the probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
Alternatively, the conditional probability may be derived from a corpus. For example, the corpus may be counted, or the corpus may be trained to obtain the conditional probability. The range of conditional probabilities may be [0,1].
The probability threshold may be determined by those skilled in the art according to practical application requirements, for example, the probability threshold may be a value of 0.6 or the like.
In step 203, the target hit element corresponding to the input string may be directly used as the first candidate corresponding to the input string.
Or the target hit element corresponding to the input string may be further processed to obtain the first candidate corresponding to the input string. For example, further associative processing may be performed on the target hit. For example, the first candidate may be obtained by searching in the multivariate relation data according to the target hit element to obtain a right element corresponding to the target hit element, and according to the target hit element and the right element corresponding to the target hit element.
In summary, according to the input method of the embodiment of the invention, the searching of the multi-element relation data is performed according to the context, and compared with the searching of the multi-element relation data according to the entry corresponding to the input string, the operation amount corresponding to searching can be reduced, so that the consumption of equipment resources can be reduced.
In addition, the embodiment of the invention obtains the hit element according to the context, and determines the first candidate corresponding to the input string according to the target hit element corresponding to the input string, the acquiring process of the first candidate does not limit the word length corresponding to the input string, and even if the word length corresponding to the input string is shorter (for example, 1), the embodiment of the invention can still obtain the corresponding first candidate, so the embodiment of the invention can provide the long word association function corresponding to the input string under the condition of reducing the consumption of equipment resources, and further can improve the input efficiency.
Method embodiment II
Referring to fig. 3, a flowchart illustrating steps of a second embodiment of an input method according to the present invention may specifically include the following steps:
Step 301, searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
step 302, determining a target hit element corresponding to the input string from the hit elements;
Step 303, determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string;
with respect to the first embodiment of the method shown in fig. 2, the method of this embodiment may further include:
Step 304, determining the sorting parameters of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock;
The conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
step 305, determining the position of the first candidate in the candidate list according to the sorting parameter of the first candidate.
The embodiment of the invention can determine the ordering parameter of the first candidate, and determine the position of the first candidate in the candidate list according to the ordering parameter of the first candidate, thereby improving the rationality of the position of the first candidate.
The candidate list corresponds to the input string, and the candidate list typically includes a plurality of candidates, which may include: the first candidate and the second candidate obtained in fig. 2, the second candidate may include: searching the obtained candidate in the word stock according to the input string. The types of word stock may include: system word stock, user word stock or cloud word stock, etc. For example, the following second candidate may be found in the lexicon according to the input string "h": "Conn", "and", "good", "still" and the like.
In an optional embodiment of the present invention, the number of associated words corresponding to the first candidate may be determined according to the number of words of the target hit element and the number of words of the entry corresponding to the input string in the word stock. Alternatively, the number of associated words may be determined based on a difference between the number of words of the target hit element and the number of words of the corresponding entry of the input string in the lexicon. For example, if the first candidate is "member" and the number of words of the entry corresponding to the input string "h" in the word stock is 1, the number of associated words may be 1.
The embodiment of the invention can punish the conditional probability corresponding to the first candidate according to the number of the associated words, and particularly can reduce the conditional probability corresponding to the first candidate according to the number of the associated words.
Optionally, a penalty value corresponding to the number of associated words may be preset, and the reduced value of the conditional probability corresponding to the first candidate may be: the penalty value corresponding to the number of associated words is multiplied by the number of associated words. Further, the product may be subtracted based on the conditional probability corresponding to the first candidate to obtain the ranking parameter of the first candidate.
It will be appreciated that the above-mentioned subtraction of the product on the basis of the conditional probability corresponding to the first candidate is merely an alternative embodiment for reducing the conditional probability corresponding to the first candidate according to the number of associated words, and those skilled in the art may actually use other ways to determine the reduction ratio according to the number of associated words, reduce the conditional probability corresponding to the first candidate according to the reduction ratio, etc. according to the actual application requirement.
The ranking parameter of the first candidate may be used to determine the location of the first candidate in the candidate list. Alternatively, the first candidate and the second candidate in the candidate list may be ranked according to a ranking parameter. Generally, the larger the value corresponding to the ranking parameter, the more forward the candidate is in the candidate list.
The ranking parameters of the second candidate may include: the frequency of the second candidate corresponding term, whether the second candidate corresponding term is from a user lexicon, etc. Typically, if the second candidate corresponding term is from the user lexicon, the value corresponding to the ranking parameter of the second candidate is set to a larger value, so that the second candidate is ranked first in the candidate list.
Method example III
Referring to fig. 4, a flowchart illustrating steps of a third embodiment of an input method according to the present invention may specifically include:
Step 401, searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
step 402, determining a target hit element corresponding to the input string from the hit elements;
step 403, determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string;
with respect to the first embodiment of the method shown in fig. 2, the method of this embodiment may further include:
Step 404, displaying a candidate list corresponding to the input string; the candidate list may include: the first candidate and a second candidate, the second candidate may include: and obtaining candidates according to the word stock.
In practical application, the input method can display the candidate list through an interface so as to be selected by a user.
Optionally, the candidate list may be displayed according to a ranking result of the candidates in the candidate list, and specifically, the candidate list may be displayed according to an order from a higher value to a lower value corresponding to the ranking parameter.
For a better understanding of the embodiments of the present invention, a specific example will be described herein to illustrate an input method of the embodiments of the present invention, and the example may specifically include the following steps:
step S1, determining an input string and a context corresponding to the input string;
the input string is "h", and the input string corresponds to two above: "you have" "Aiqi skill".
Step S2, searching in a word stock according to the input string to obtain a corresponding second candidate;
for example, the second candidates such as "meeting", "good" and "still" are found in the word stock according to "h".
Step S3, searching in the multivariate relation data according to the above to obtain a corresponding hit element;
By querying the multivariate relation data, the right elements corresponding to the two above items of 'you have' and 'Aiqi' are as follows: "Member 0.76", "video 0.13", "mock 0.09", and "Member 0.76" where the term is characterized by the term followed by conditional probability;
Step S4, matching the hit element with the input string to obtain a target hit element 'member 0.76';
s5, determining the sorting parameters of the target hit element 'member 0.76';
By adding some penalties to long words, such as "penalty value of 1 x 0.1 of associative word number", to the conditional probability of 0.76, the modified conditional probability of 0.76-1 x 0.1=0.66 is obtained as the ranking parameter.
Step S6, determining the order of candidate list, such as "Congress", "Member", "Hao" and "Fu", etc
And S7, displaying the candidate list according to the sequence.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of motion acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, it should be understood by those skilled in the art that the embodiments described in the specification are all preferred embodiments and that the movement involved is not necessarily required by the embodiments of the present invention.
Device embodiment
Referring to fig. 5, a block diagram illustrating an embodiment of an input device of the present invention may specifically include:
The searching module 501 is configured to search in the multivariate relation data according to the context corresponding to the input string, so as to obtain a hit element corresponding to the context;
A target hit element determining module 502, configured to determine a target hit element corresponding to the input string from the hit elements; and
The first candidate determining module 503 is configured to determine a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
Optionally, the target hit determination module 502 includes:
the first matching module is used for matching the code character strings corresponding to the hit elements with the input strings to obtain target hit elements corresponding to the input strings; or alternatively
And the second matching module is used for matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string so as to obtain the target hit element corresponding to the input string.
Alternatively, the input string may be a portion of the encoded string corresponding to the target hit.
Alternatively, the input string may be a prefix of the encoded string corresponding to the target hit element.
Optionally, the conditional probability of the target hit may exceed a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
Optionally, the apparatus may further include:
the sorting parameter determining module is used for determining the sorting parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
And the position determining module is used for determining the position of the first candidate in the candidate list according to the sorting parameters of the first candidate.
Optionally, the apparatus may further include:
The display module is used for displaying a candidate list corresponding to the input string; the candidate list may include: the first candidate and a second candidate, the second candidate may include: and obtaining candidates according to the word stock.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
An embodiment of the present invention provides an apparatus for input, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for: searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context; determining a target hit element corresponding to the input string from the hit elements; and determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
Fig. 6 is a block diagram illustrating an apparatus 800 for input according to an example embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing element 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk.
The power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. 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 a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice input mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or one component of the apparatus 800, the presence or absence of user contact with the apparatus 800, an orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on radio frequency identification (RFID, radio Frequency Identification) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 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 elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 7 is a schematic diagram of a server in some embodiments of the invention. The server 1900 may vary considerably in configuration or performance and may include one or more central processing units (central processing units, CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage mediums 1930 (e.g., one or more mass storage devices) that store applications 1942 or data 1944. Wherein the memory 1932 and storage medium 1930 may be transitory or persistent. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, a central processor 1922 may be provided in communication with a storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus (server or terminal) enables the apparatus to perform the input method shown in fig. 2 or 3 or 4.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus (server or terminal), causes the apparatus to perform an input method, the method comprising: searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context; determining a target hit element corresponding to the input string from the hit elements; and determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
The embodiment of the invention discloses A1 and an input method, wherein the method comprises the following steps:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
And determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
A2, the method according to A1, wherein determining the target hit element corresponding to the input string from the hit elements comprises:
matching the code character string corresponding to the hit element with the input string to obtain a target hit element corresponding to the input string; or alternatively
And matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string to obtain the target hit element corresponding to the input string.
A3, the method according to A1, wherein the input string is a part of the code string corresponding to the target hit element.
A4, the method according to A1, wherein the input string is a prefix of the code string corresponding to the target hit element.
A5, the method according to A1, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
The method of any one of A1 to A5, wherein the method further comprises:
Determining an ordering parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
And determining the position of the first candidate in a candidate list according to the ordering parameter of the first candidate.
The method of any one of A1 to A5, wherein the method further comprises:
displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
The embodiment of the invention discloses a B8 input device, which is characterized by comprising:
The searching module is used for searching in the multivariate relation data according to the context corresponding to the input string so as to obtain a hit element corresponding to the context;
The target hit element determining module is used for determining a target hit element corresponding to the input string from the hit elements; and
And the first candidate determining module is used for determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
B9, the apparatus according to B8, wherein the target hit determining module includes:
the first matching module is used for matching the code character strings corresponding to the hit elements with the input strings to obtain target hit elements corresponding to the input strings; or alternatively
And the second matching module is used for matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string so as to obtain the target hit element corresponding to the input string.
B10, the apparatus according to B8, wherein the input string is a part of the code string corresponding to the target hit.
B11, the apparatus according to B8, wherein the input string is a prefix of the encoded string corresponding to the target hit element.
B12, the apparatus according to B8, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
B13, the apparatus according to any one of B8 to B12, characterized in that the apparatus further comprises:
the sorting parameter determining module is used for determining the sorting parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
And the position determining module is used for determining the position of the first candidate in the candidate list according to the sorting parameters of the first candidate.
B14, the apparatus according to any one of B8 to B12, characterized in that the apparatus further comprises:
The display module is used for displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
The embodiment of the invention discloses a C15 and a device for inputting, which is characterized by comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs comprise instructions for:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
And determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string.
C16, the apparatus according to C15, wherein determining, from the hit elements, a target hit element corresponding to the input string includes:
matching the code character string corresponding to the hit element with the input string to obtain a target hit element corresponding to the input string; or alternatively
And matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string to obtain the target hit element corresponding to the input string.
C17, the apparatus of C15, wherein the input string is a portion of a code string corresponding to the target hit.
C18, the apparatus of C15, wherein the input string is a prefix of a coded string corresponding to the target hit.
C19, the apparatus of C15, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
C20, the apparatus of any one of C15-C19, wherein the apparatus is further configured to be executed by one or more processors, the one or more programs comprising instructions for:
Determining an ordering parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
And determining the position of the first candidate in a candidate list according to the ordering parameter of the first candidate.
C21, the apparatus of any one of C15-C19, wherein the apparatus is further configured to be executed by one or more processors, the one or more programs comprising instructions for:
displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
Embodiments of the invention disclose D22, a machine-readable medium having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform an input method as described in one or more of A1 to A7.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
The foregoing has outlined rather broadly the principles and embodiments of the present invention in order that the detailed description of the invention may be better understood, and in order that the present invention may be better understood; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (19)

1. An input method, the method comprising:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
Determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string;
Determining an ordering parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
Determining a position of the first candidate in a candidate list according to the sorting parameter of the first candidate, wherein the method comprises the following steps: and presetting a penalty value corresponding to the number of the associated words, adjusting the conditional probability of the first candidate based on the penalty value, and determining the sorting parameters of the first candidate based on the adjusted conditional probability of the first candidate.
2. The method of claim 1, wherein determining a target hit element corresponding to the input string from the hit elements comprises:
matching the code character string corresponding to the hit element with the input string to obtain a target hit element corresponding to the input string; or alternatively
And matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string to obtain the target hit element corresponding to the input string.
3. The method of claim 1, wherein the input string is part of a coded string corresponding to the target hit.
4. The method of claim 1, wherein the input string is a prefix of a coded string corresponding to the target hit.
5. The method of claim 1, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
6. The method according to any one of claims 1 to 5, further comprising:
displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
7. An input device, comprising:
The searching module is used for searching in the multivariate relation data according to the context corresponding to the input string so as to obtain a hit element corresponding to the context;
The target hit element determining module is used for determining a target hit element corresponding to the input string from the hit elements; and
The first candidate determining module is used for determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string;
the sorting parameter determining module is used for determining the sorting parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
the position determining module is configured to determine a position of the first candidate in a candidate list according to the ranking parameter of the first candidate, where the position determining module includes: and presetting a penalty value corresponding to the number of the associated words, adjusting the conditional probability of the first candidate based on the penalty value, and determining the sorting parameters of the first candidate based on the adjusted conditional probability of the first candidate.
8. The apparatus of claim 7, wherein the target hit determination module comprises:
the first matching module is used for matching the code character strings corresponding to the hit elements with the input strings to obtain target hit elements corresponding to the input strings; or alternatively
And the second matching module is used for matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string so as to obtain the target hit element corresponding to the input string.
9. The apparatus of claim 7, wherein the input string is part of a coded string corresponding to the target hit.
10. The apparatus of claim 7, wherein the input string is a prefix of a coded string corresponding to the target hit.
11. The apparatus of claim 7, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
12. The apparatus according to any one of claims 7 to 11, further comprising:
The display module is used for displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
13. An apparatus for input comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
searching in the multivariate relation data according to the context corresponding to the input string to obtain a hit element corresponding to the context;
Determining a target hit element corresponding to the input string from the hit elements;
Determining a first candidate corresponding to the input string according to the target hit element corresponding to the input string;
Determining an ordering parameter of the first candidate according to the conditional probability of the first candidate, the word number of the target hit element and the word number of the corresponding entry of the input string in the word stock; the conditional probability is used for representing the occurrence probability of the target hit element under the condition of the context;
Determining a position of the first candidate in a candidate list according to the sorting parameter of the first candidate, wherein the method comprises the following steps: and presetting a penalty value corresponding to the number of the associated words, adjusting the conditional probability of the first candidate based on the penalty value, and determining the sorting parameters of the first candidate based on the adjusted conditional probability of the first candidate.
14. The apparatus of claim 13, wherein the determining a target hit element corresponding to the input string from the hit elements comprises:
matching the code character string corresponding to the hit element with the input string to obtain a target hit element corresponding to the input string; or alternatively
And matching the matching sequence corresponding to the hit element with the matching sequence corresponding to the input string to obtain the target hit element corresponding to the input string.
15. The apparatus of claim 13, wherein the input string is part of a coded string corresponding to the target hit.
16. The apparatus of claim 13, wherein the input string is a prefix of a coded string corresponding to the target hit.
17. The apparatus of claim 13, wherein the conditional probability of the target hit exceeds a probability threshold; the conditional probability is used to characterize the probability of occurrence of the target hit under the conditions of the context.
18. The apparatus of any one of claims 13 to 17, wherein the apparatus is further configured to execute the one or more programs by one or more processors comprises instructions for: displaying a candidate list corresponding to the input string; the candidate list includes: the first candidate and a second candidate, the second candidate comprising: and obtaining candidates according to the word stock.
19. A machine readable medium having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the input method of any of claims 1 to 6.
CN201910605239.4A 2019-07-05 2019-07-05 Input method, device and device for input Active CN112181163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910605239.4A CN112181163B (en) 2019-07-05 2019-07-05 Input method, device and device for input

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910605239.4A CN112181163B (en) 2019-07-05 2019-07-05 Input method, device and device for input

Publications (2)

Publication Number Publication Date
CN112181163A CN112181163A (en) 2021-01-05
CN112181163B true CN112181163B (en) 2024-11-15

Family

ID=73915330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910605239.4A Active CN112181163B (en) 2019-07-05 2019-07-05 Input method, device and device for input

Country Status (1)

Country Link
CN (1) CN112181163B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065326B (en) * 2021-03-31 2024-06-21 北京达佳互联信息技术有限公司 Text comparison method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866782A (en) * 2011-07-06 2013-01-09 哈尔滨工业大学 Input method and input method system for improving sentence generating efficiency
CN107608532A (en) * 2016-07-11 2018-01-19 北京搜狗科技发展有限公司 A kind of association-feeding method, device and electronic equipment
CN109471538A (en) * 2017-09-08 2019-03-15 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7385591B2 (en) * 2001-03-31 2008-06-10 Microsoft Corporation Out-of-vocabulary word determination and user interface for text input via reduced keypad keys
CN103677299A (en) * 2012-09-12 2014-03-26 深圳市世纪光速信息技术有限公司 Method and device for achievement of intelligent association in input method and terminal device
CN103440299B (en) * 2013-08-20 2016-12-28 陈喜 A kind of fast input method of information based on focus context associational word
CN109799916B (en) * 2017-11-16 2021-08-13 北京搜狗科技发展有限公司 Candidate item association method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866782A (en) * 2011-07-06 2013-01-09 哈尔滨工业大学 Input method and input method system for improving sentence generating efficiency
CN107608532A (en) * 2016-07-11 2018-01-19 北京搜狗科技发展有限公司 A kind of association-feeding method, device and electronic equipment
CN109471538A (en) * 2017-09-08 2019-03-15 北京搜狗科技发展有限公司 A kind of input method, device and the device for input

Also Published As

Publication number Publication date
CN112181163A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN110633017B (en) Input method, device and device for inputting
CN112000766B (en) Data processing method, device and medium
CN109814730B (en) Input method and device and input device
CN112306252B (en) A data processing method, a data processing device and a data processing device
CN112181163B (en) Input method, device and device for input
CN113157107B (en) A candidate item sorting method and device
CN111103986B (en) User word stock management method and device, and user word stock input method and device
CN115079836B (en) Request processing method, device and medium
CN113589950B (en) Input method, device and device for input
CN113010768B (en) Data processing method and device for data processing
CN114201056B (en) Request processing method, device and device for processing request
CN114115550A (en) Associated candidate processing method, device and device for processing associative candidates
CN112000877B (en) A data processing method, device and medium
CN113515618B (en) Voice processing method, device and medium
CN113703590A (en) Input method, input device and input device
CN112905023B (en) Input error correction method, device and device for input error correction
CN114610163A (en) Recommendation method, apparatus and medium
CN113031787B (en) Input method, device and device for input
CN113534973B (en) Input method, device and device for inputting
CN112000233B (en) Method and device for processing association candidates
CN114089840B (en) Request processing method, device and medium
CN111708443A (en) Input method, device and device for input
CN113589945B (en) Input method, device and device for input
CN109388252B (en) Input method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant