CN109814730B - Input method and device and input device - Google Patents

Input method and device and input device Download PDF

Info

Publication number
CN109814730B
CN109814730B CN201711158727.2A CN201711158727A CN109814730B CN 109814730 B CN109814730 B CN 109814730B CN 201711158727 A CN201711158727 A CN 201711158727A CN 109814730 B CN109814730 B CN 109814730B
Authority
CN
China
Prior art keywords
reply
expression
information
replied
candidate
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
CN201711158727.2A
Other languages
Chinese (zh)
Other versions
CN109814730A (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 CN201711158727.2A priority Critical patent/CN109814730B/en
Publication of CN109814730A publication Critical patent/CN109814730A/en
Application granted granted Critical
Publication of CN109814730B publication Critical patent/CN109814730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The embodiment of the invention provides an input method and device and a device for inputting, wherein the method specifically comprises the following steps: determining information to be replied; determining expression reply candidates corresponding to the information to be replied; the expression reply candidates are displayed for selection by a user; or displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate. The embodiment of the invention can simplify the operation flow when the user inputs the expression, reduce the input cost of the user and improve the input experience of the user.

Description

Input method and device and input device
Technical Field
The present invention relates to the field of information input technologies, and in particular, to an input method and apparatus, and an input device.
Background
The input method is used as a bridge for the communication between the computer system and the user or other devices, is one of the main tools for information interaction between the user and the computer system, and can facilitate the user to input information in various occasions. For example, a user may enter content in an instant messaging application to communicate with other users, and so on. In addition, in order to increase the interest of the input content, some expressions are often required to be input in the application, so that not only special meanings can be expressed, but also the input content can be enriched.
The existing expression input process can be that an expression interface is provided for a user, and after the expression selected by the user from the expression interface is received, the expression is displayed on a screen.
However, in practical applications, the expression interface generally contains more expressions, which occupy more candidate positions, resulting in an increase in the cost of the user to find the desired expression from the expression interface.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are provided to provide an input method, an input device, and an input device for overcoming or at least partially solving the above problems.
In order to solve the above problems, an embodiment of the present invention discloses an input method, including:
determining information to be replied;
determining expression reply candidates corresponding to the information to be replied;
the expression reply candidates are displayed for selection by a user; or displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate.
Optionally, the expression reply candidate is obtained according to question-answer pair data, and/or the expression reply candidate is obtained according to question-answer sentence mode.
Optionally, the question-answer data includes: information and its corresponding reply, the reply comprising: reply text and/or reply expressions.
Optionally, the sentence rules corresponding to the question-answer sentence mode include: syntax rules and/or semantic rules.
Optionally, the determining the expression reply candidate corresponding to the information to be replied includes:
determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the replies; and the mapping relation between the information to be replied and the reply is obtained according to the question-answer data.
Optionally, the determining the expression reply candidate corresponding to the information to be replied according to the mapping relationship between the information to be replied and the reply includes:
the reply comprises a reply text, and searching is carried out in the mapping relation between the information to be replied and the reply text according to the information to be replied so as to obtain a candidate reply text corresponding to the information to be replied; searching according to the candidate reply text and the mapping relation between the expression keywords and the expressions to obtain expressions corresponding to the candidate reply text, wherein the expressions are used as expression reply candidates corresponding to the information to be replied; and/or
The reply comprises a reply expression, and according to the information to be replied, the reply expression corresponding to the information to be replied is searched in a mapping relation between the information to be replied and the reply expression, so that the reply expression corresponding to the information to be replied is obtained and is used as an expression reply candidate corresponding to the information to be replied.
Optionally, the question-answer sentence pattern includes: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
determining an information statement mode corresponding to the information to be replied;
determining candidate replies corresponding to the information to be replied according to the reply sentence mode corresponding to the information sentence mode;
and obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
Optionally, the expression reply candidate includes: a first expression reply candidate obtained according to question-answer pair data and a second expression reply candidate obtained according to question-answer sentence mode, the method further comprising:
and sequencing the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
Optionally, the weight corresponding to the first expression reply candidate is obtained according to the attention feature of the user to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is obtained according to the attention feature of the user to the second expression reply candidate.
In another aspect, an embodiment of the present invention discloses an input device, including:
the information to be replied determining module is used for determining the information to be replied;
the expression reply candidate determining module is used for determining expression reply candidates corresponding to the information to be replied; and
the display module is used for displaying the expression reply candidates for selection by a user; or displaying the entry corresponding to the expression reply candidate, so that the user triggers the display of the expression reply candidate through the entry.
Optionally, the expression reply candidate is obtained according to question-answer pair data, and/or the expression reply candidate is obtained according to question-answer sentence mode.
Optionally, the question-answer data includes: information and its corresponding reply, the reply comprising: reply text and/or reply expressions.
Optionally, the sentence rules corresponding to the question-answer sentence mode include: syntax rules and/or semantic rules.
Optionally, the expression reply candidate determining module includes:
the mapping determination submodule is used for determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the replies; and the mapping relation between the information to be replied and the reply is obtained according to the question-answer data.
Optionally, the mapping determination submodule includes:
the first searching unit is used for searching in the mapping relation between the information to be replied and the reply text according to the information to be replied under the condition that the reply comprises the reply text so as to obtain a candidate reply text corresponding to the information to be replied;
and the second searching unit is used for searching according to the candidate reply text and the mapping relation between the expression key words and the expressions so as to obtain the expressions corresponding to the candidate reply text and serve as expression reply candidates corresponding to the information to be replied.
Optionally, the mapping determination submodule includes:
and the third searching unit is used for searching in the mapping relation between the information to be replied and the reply expression according to the information to be replied under the condition that the reply comprises the reply expression so as to obtain the reply expression corresponding to the information to be replied, and the reply expression is used as an expression reply candidate corresponding to the information to be replied.
Optionally, the question-answer sentence pattern includes: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the expression reply candidate determining module includes:
the mode determining submodule is used for determining an information statement mode corresponding to the information to be replied;
a candidate reply determination submodule, configured to determine a candidate reply corresponding to the information to be replied according to a reply sentence pattern corresponding to the information sentence pattern; and
and the candidate determination submodule is used for obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
Optionally, the expression reply candidate includes: a first expression reply candidate obtained according to question-answer pair data and a second expression reply candidate obtained according to question-answer sentence mode, the device further comprising:
and the ordering module is used for ordering the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
Optionally, the weight corresponding to the first expression reply candidate is obtained according to the attention feature of the user to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is obtained according to the attention feature of the user to the second expression reply candidate.
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:
determining information to be replied;
determining expression reply candidates corresponding to the information to be replied;
the expression reply candidates are displayed for selection by a user; or displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause an apparatus to perform one or more of the input methods described previously.
The embodiment of the invention has the following advantages:
aiming at the information to be replied, the embodiment of the invention displays the expression reply candidate corresponding to the information to be replied for the user to select, or displays the entry corresponding to the expression reply candidate, so that the user triggers the display of the expression reply candidate through the entry; because the expression reply candidates of the embodiment of the invention correspond to the information to be replied, the embodiment of the invention can reduce the interference of the expression irrelevant to the information to be replied to the user, thereby simplifying the operation flow when the user inputs the expression, reducing the input cost of the user and improving the input experience of the user.
Drawings
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 flow chart of the steps of an embodiment of an input method of the present invention;
FIGS. 3, 4 and 5 are schematic illustrations of changes in the input interface during input according to embodiments of the present invention;
FIG. 6 is a flow chart of steps of another embodiment of an input method of the present invention;
FIG. 7 is a block diagram of an embodiment of an input device of the present invention;
FIG. 8 is a block diagram of an apparatus 900 for input in accordance with the present invention; a kind of electronic device with high-pressure air-conditioning system
Fig. 9 is a schematic diagram of a server in some embodiments of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
The embodiment of the invention provides an input scheme, which can determine information to be replied, determine expression reply candidates corresponding to the information to be replied, and display the expression reply candidates for selection by a user; or displaying the entry corresponding to the expression reply candidate, so that the user triggers the display of the expression reply candidate through the entry.
In the embodiment of the present invention, the information to be replied may refer to information to be replied. Optionally, the information to be replied may be information sent by the opposite communication end, such as short message, instant messaging information, and the like. Optionally, the information to be replied may be information published by an information platform (such as a question and answer platform, a social platform (BBS (bulletin board system, bulletin Board System) platform, microblog platform, etc.), such as information of questions, posts, etc. It can be appreciated that the embodiment of the present invention is not limited to specific information to be replied.
According to the embodiment of the invention, aiming at the information to be replied, the expression reply candidate corresponding to the information to be replied is displayed for the user to select, or the entry corresponding to the expression reply candidate is displayed, so that the user triggers the display of the expression reply candidate through the entry; because the expression reply candidates of the embodiment of the invention correspond to the information to be replied, the embodiment of the invention can reduce the interference of the expression irrelevant to the information to be replied to the user, thereby simplifying the operation flow when the user inputs the expression, reducing the input cost of the user and improving the input experience of the user.
The embodiment of the invention can be applied to any expression input scene, and examples of the expression input scene can include: the information reply scene in the instant messaging process, or the information reply scene in the information platform, etc., it can be understood that the embodiment of the invention does not limit the specific expression input scene.
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 interact data through the wired or wireless network.
Alternatively, client 100 may operate on terminals specifically including, but not limited to: smart phones, tablet computers, e-book readers, MP3 (dynamic video expert compression standard audio plane 3,Moving Picture Experts Group Audio Layer III) players, MP4 (dynamic video expert compression standard audio plane 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.
The client refers to a program corresponding to the server for providing local services to the user. The client 100 in the embodiment of the present invention may be a program for providing a local input service, such as an input method program, and the embodiment of the present invention is not limited to a specific client.
The embodiment of the invention can be applied to input method programs of input modes such as keyboard symbol input, handwriting input, voice input, scanning input, expression input and the like. Wherein, the keyboard symbol input mode refers to input through keys on the keyboard; handwriting input mode means handwriting on a screen through a built-in touch pen, and voice input mode means converting voice signals input by a user into texts; the scan-in mode refers to inputting text information by scanning a picture, and specifically, OCR (optical character recognition ) technology can be adopted to convert characters in the picture into text format; the expression input mode can provide an expression interface so that a user can select an expression in the expression interface.
Under the condition that an input method program is in any input mode, the embodiment of the invention can display the expression reply candidate corresponding to the information to be replied for the user to select or display the entry corresponding to the expression reply candidate so that the user triggers the display of the expression reply candidate through the entry; it can be appreciated that the embodiment of the present invention does not limit the specific input method in which the input method program is located.
In an application example of the present invention, it is assumed that a user is inputting through a keyboard symbol input mode, that is, an input method program is in a keyboard symbol input mode, in this case, if information sent by a communication opposite terminal, such as "you are in the dry prayer, is received, the embodiment of the present invention may take" you are in the dry prayer "as information to be replied, and determine expression reply candidates corresponding to" you are in the dry prayer "; for example, the expression reply candidates corresponding to "you are in the dry mani" may include: expression reply candidates corresponding to 'no-dry yarn', expression reply candidates corresponding to 'watching TV', and and any one or combination of expression reply candidates corresponding to the game play.
It should be noted that, the embodiment of the present invention does not limit the expression types corresponding to the expression reply candidates. Examples of the expression type corresponding to the expression reply candidate may include: character expression, picture expression, etc.; examples of character expressions include Emoji (pictographic) expression, which is a special character that an operating system can automatically convert into an expression picture for display; examples of pictorial expressions may include: the fight diagram refers to communication by using pictures or expression packages, is a chat mode for chatting by using pictures, is a humorous communication mode, is commonly used in instant messaging applications such as QQ, weChat and the like, can relieve the tense communication atmosphere among people, uses pictures for communication, and saves the trouble of typing.
Method embodiment
Referring to fig. 2, a flowchart illustrating steps of an embodiment of an input method of the present invention may specifically include the following steps:
step 201, determining information to be replied;
step 202, determining expression reply candidates corresponding to the information to be replied;
step 203, displaying the expression reply candidates for selection by a user; or, displaying an entry corresponding to the expression reply candidate, wherein the entry can be used for triggering the display of the expression reply candidate.
In the embodiment of the present invention, the information to be replied may refer to information to be replied. For example, the information to be replied can be information sent by the opposite communication end, such as short message, instant messaging information, etc.; for another example, the information to be replied may be information published by an information platform, such as information of a question, a post, etc. Alternatively, operations of the interface may be monitored through an accessible service (accessibility service), such as: clicking, dragging, updating the interface and the like, so that information sent by a communication opposite terminal or information issued by an information platform can be obtained. It can be appreciated that the embodiment of the present invention is not limited to a specific determination manner of the information to be replied.
The expression reply candidates corresponding to the information to be replied can be used for replying the information to be replied, and the types of the expression reply candidates corresponding to the information to be replied are expression types; the expression reply candidates can increase the interest and richness of the input content relative to the reply candidates of the text type.
The embodiment of the invention can provide the following technical scheme for determining the expression reply candidates corresponding to the information to be replied:
technical solution 1
In the technical scheme 1, the expression reply candidates corresponding to the information to be replied can be obtained from the data according to question and answer. Wherein, the question-answer pair data may include: the information and the answer corresponding to the information can be questioning type information or non-questioning type information. The question-answer pair data may include: question-answer pair data in an instant messaging scene, and/or question-answer pair data in an information platform scene, and the like.
In the embodiment of the present invention, the reply may include: reply text and/or reply expressions. Assuming that the information in the question-answer pair is "you are in the trunk", the corresponding answer text thereof may be "no-trunk instant", or the corresponding answer expression thereof may be an expression corresponding to "boring", or the like.
In the embodiment of the invention, the question-answer pair data can be data generated by at least one user, which can reflect the reply skills (such as the reply skills in the chat process) and the reply habits of at least one user, so that the expression reply candidates obtained according to the question-answer pair data can reflect the reply skills and the reply habits of at least one user, thereby improving the rationality of the expression reply candidates and the matching degree with the user intention. In particular, the at least one user may include a large number of users, so that the question-answer pair data may reflect answer skills and answer habits of the large number of users.
The embodiment of the invention does not limit the data acquisition mode of the questions and answers. Optionally, the client of the input method program may acquire question-answer pair data and upload the acquired question-answer pair data to the server. For example, the input method program can monitor the historical expression input by the user in the instant messaging scene, acquire the context corresponding to the historical expression, and store the context and the historical expression as the information of the question-answer pair data and the answer expression respectively. Similarly, the input method program can monitor the history text input by the user in the instant messaging scene, acquire the corresponding context of the history text, and store the context and the history text as the information and the reply text of the data respectively.
It will be appreciated that the manner of obtaining the question-answer pair data by the client of the input method program is merely an example, and in fact, a person skilled in the art may use any manner of obtaining the question-answer pair data according to actual application requirements, for example, since the server typically records the user data by using a log, the question-answer pair data generated by the user through the instant messaging application may be obtained from the server of the instant messaging application, and for example, the question-answer pair data generated by the user through the information platform may be obtained from the server of the information platform.
In an optional embodiment of the present invention, the determining, in the step 202, the expression reply candidate corresponding to the information to be replied may include: determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the replies; the mapping relationship between the information to be replied and the replies may be obtained according to question and answer data, and the replies in the mapping relationship between the information to be replied and the replies may be replies with reply skills and reply habits for one information to be replied, and one information to be replied may correspond to one or more replies, for example, the "on the fly" information to be replied may correspond to replies such as "do not dry", "watch television", "play game", etc.
In an alternative embodiment of the present invention, the process of determining the mapping relationship between the information to be replied and the reply may include: and extracting target question-answer pair data with the frequency meeting preset conditions from question-answer pair data, and establishing a mapping relation between information to be replied and replies according to the target question-answer pair data.
According to one embodiment, the frequency of the question-answer pair data may be counted, and the preset condition may include: the frequency is higher than the frequency threshold, or the ordering of the frequency in all questions and answers accords with preset conditions (the ordering is performed according to the order of the frequency from high to low, M is a natural number) and the like, so that a person skilled in the art can determine the required preset conditions according to the actual application requirements, and the embodiment of the invention does not limit specific preset conditions.
According to another embodiment, the information in the target question-answer pair data can be directly used as the information in the mapping relation between the information to be replied and the answer, and the answer in the target question-answer pair data can be directly used as the answer in the mapping relation between the information to be replied and the answer. Or, the first semantic unit and the second semantic unit may be extracted from the information in the target question-answer pair data and the answer, and the first semantic unit and the second semantic unit are used as the information to be replied and the answer in the mapping relation between the information to be replied and the answer, respectively. The first semantic unit and the second semantic unit may include: vocabulary, phrases or phrases, and the like. For example, the first semantic unit corresponding to the information "you are in the stem" in the target question-answer pair data may be "stem", the second semantic unit corresponding to the answer "no stem" in the target question-answer pair data may be "no stem", the second semantic unit corresponding to the answer "watch television" in the target question-answer pair data may be "watch television", and so on.
In practical application, the first semantic unit and the second semantic unit can be extracted from the information in the target question-answer pair data and the answer by a natural language processing mode such as syntactic analysis and/or semantic analysis. The syntax analysis refers to analyzing a word grammar function in a sentence, and the dependency syntax analysis is a common syntax analysis manner, and in practical application, the dependency syntax analysis result may include: the dependency tree can be used for characterizing dependency relations among various vocabularies included in a question or a reply, analyzing the dependency tree, and extracting semantic units from the dependency tree according to analysis results.
In an embodiment of the present invention, the reply may include a reply text, and the determining the expression reply candidate corresponding to the information to be replied according to a mapping relationship between the information to be replied and the reply may include: searching in a mapping relation between the information to be replied and the reply text according to the information to be replied to obtain a candidate reply text corresponding to the information to be replied; searching according to the candidate reply text and the mapping relation between the expression keywords and the expressions to obtain the expressions corresponding to the candidate reply text, wherein the expressions are used as expression reply candidates corresponding to the information to be replied.
According to the embodiment of the invention, the candidate reply text corresponding to the information to be replied can be obtained through the mapping relation between the information to be replied and the reply text, and the candidate reply text is of a text type; and then, obtaining the expression corresponding to the candidate reply text through the mapping relation between the expression key words and the expression.
Referring to table 1, an example of a mapping relationship between information to be replied and reply text according to an embodiment of the present invention is shown. It can be understood that, a person skilled in the art can determine the mapping relationship between the information to be replied and the reply text according to the question-answer pair data, and the embodiment of the invention does not limit the mapping relationship between the information to be replied and the reply text.
TABLE 1
The determining of the mapping relationship between the expression keyword and the expression may include: collecting expressions, and determining expression keywords corresponding to the collected expressions; and establishing a mapping relation between the expression keywords and the expressions. The expression can be collected through an interface corresponding to the data source of the expression; alternatively, the expressions may be captured through the internet, and the embodiment of the present invention does not limit a specific process of collecting the expressions. The expression keywords corresponding to the expressions can be collected together with the expressions, for example, the expressions and the expression keywords can be simultaneously captured in the process of capturing the webpage; or, the expression keywords corresponding to the expressions can be obtained through manual labeling, and the method for determining the expression keywords corresponding to the expressions is not limited in the embodiment of the invention.
In another embodiment of the present invention, the reply may include a reply expression, and the process of determining an expression reply candidate corresponding to the information to be replied according to a mapping relationship between the information to be replied and the reply may specifically include: searching in a mapping relation between the information to be replied and the response expression according to the information to be replied, so as to obtain the response expression corresponding to the information to be replied, and taking the response expression as an expression reply candidate corresponding to the information to be replied.
For the process of determining the mapping relationship between the information to be replied and the reply expression, the process of determining the mapping relationship between the information to be replied and the reply is similar to that of determining the mapping relationship between the information to be replied and the reply, so that the description is omitted herein and the description is omitted. For example, the reply expression corresponding to the "no language" to be replied to may include:the expression can also comprise a fighting expression with the expression keyword of 'Kaney'.
Technical solution 2
In the technical solution 2, the expression reply candidates corresponding to the information to be replied can be obtained according to a question-answer sentence mode.
In embodiments of the invention, a sentence may refer to a grammatically self-organizing unit consisting of a word or a syntactically related group of words that expresses a claim, question, command, wish, or exclamation.
The question-answer sentence pattern may be used to constrain sentences to which the questions and answers correspond to the data. Alternatively, the sentence rules corresponding to the question-answer sentence patterns may include: syntax rules and/or semantic rules. In practical application, the questions and answers can be analyzed according to the syntax rules and/or the semantic rules to obtain the question and answer sentence modes.
Alternatively, the question-answer sentence pattern may include: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply. Examples of the information sentence pattern may include: "v is? "," v is not? ", v? "," V is also not V "," in dry yarn ", etc.; examples of reply sentence patterns may include: "v has passed", "has v", "is v", etc., where "v" is used to denote a verb, and it will be understood that those skilled in the art may determine a desired question-answer sentence pattern according to a syntactic rule and/or a semantic rule, for example, the question-answer sentence pattern may include nouns in addition to verbs, or may include a main-predicate component, a guest component, etc., and embodiments of the present invention do not limit a specific question-answer sentence pattern.
In an optional embodiment of the present invention, the determining the expression reply candidate corresponding to the information to be replied may include: determining an information statement mode corresponding to the information to be replied; determining candidate replies corresponding to the information to be replied according to the reply sentence mode corresponding to the information sentence mode; and obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
Wherein the information sentence pattern may have a corresponding reply sentence pattern, and the candidate reply corresponding to the information to be replied may be determined according to the reply sentence pattern corresponding to the information sentence pattern, for example, the information sentence pattern "v is? The "corresponding reply sentence pattern" may include: "v passed", "no v", "v", etc. Optionally, the candidate answer corresponding to the information to be replied may be determined according to the answer sentence pattern and the information to be replied, for example, "v" in the answer sentence pattern may be replaced by a verb (such as "eat") included in the information to be replied to obtain the candidate answer corresponding to the information to be replied, and it is understood that the process of determining the candidate answer corresponding to the information to be replied according to the answer sentence pattern corresponding to the information sentence pattern is not limited in the embodiment of the present invention.
In practical applications, the candidate answers corresponding to the information to be replied may be answer texts, and in this case, the expression reply candidates corresponding to the information to be replied may be obtained according to the mapping relationship between the expression keywords and the expressions. Alternatively, the candidate answer corresponding to the information to be replied may be a reply expression, and the reply expression may be directly used as the candidate answer corresponding to the information to be replied and may be a reply text.
The above process of determining the expression reply candidate corresponding to the information to be replied is described in detail through the technical solutions 1 and 2, it may be understood that, according to actual application needs, a person skilled in the art may adopt any one or a combination of the technical solutions 1 and 2, or may also adopt other technical solutions, and the embodiment of the present invention does not limit the specific process of determining the expression reply candidate corresponding to the information to be replied.
Step 203 may display the expression reply candidate obtained in step 202 for the user to select; or, an entry corresponding to the expression reply candidate obtained in step 202 may be displayed, so that the user triggers the display of the expression reply candidate through the entry. The user may actually apply the requirement, and determine whether to trigger the entry, for example, when the user has a requirement for an expression reply, the entry may be triggered.
Referring to fig. 3, 4 and 5, a schematic representation of a change in the input interface during an input process according to an embodiment of the present invention is shown. As shown in fig. 3, in an instant communication scenario, when receiving information "XX" sent by a communication peer, the information "XX" may be used as information to be replied, an expression reply candidate corresponding to the information to be replied "XX" is determined, and an entry corresponding to the expression reply candidate is displayed at a corresponding position of an input frame, where text information corresponding to the entry is specifically "fight reply" XX ".
If a triggering operation (such as clicking operation) of the user on the portal is received, the user may jump to the input interface shown in fig. 4, and fig. 4 specifically may show, under a toolbar of the input method program, an expression reply candidate corresponding to the information to be replied "XX" for the user to select, and if the information to be replied "XX" is "no language", the corresponding expression reply candidate may include: the corresponding fighting expression of "anese", the corresponding fighting expression of "hehe", or the corresponding fighting expression of "strange me" and the like.
If a triggering operation of the user on the expression reply candidate corresponding to XX is received, the user can jump to an input interface shown in fig. 5, and fig. 5 can specifically screen the expression reply candidate triggered by the user so as to realize quick input of the expression reply candidate.
It should be noted that, the display position and the display form of the portal shown in fig. 3 are only optional embodiments, in fact, the embodiment of the present invention is not limited to the specific display position and the display form of the portal, for example, the display position of the portal may also be located outside the input box, and the display form of the portal may be other text "expression reply" XX ", or icon form, etc. In addition, the presentation of the entry shown in fig. 3 is only an alternative embodiment, and in fact, the expression reply candidate shown in fig. 4 may be presented directly for the information to be replied, and the entry of the embodiment of the present invention may avoid the disturbance of the expression reply candidate to the user, which is not understood as the limitation of the embodiment of the present invention.
In an optional embodiment of the present invention, whether to display the expression reply candidate or display the entry corresponding to the expression reply candidate may be determined based on the reply habit of the user and/or the historical chat content between the communication identifiers corresponding to the information to be replied.
The reply habit of the user may refer to a reply habit of the user for the information to be replied, where the reply habit may include: the habit of replying by adopting the expression or the text under the condition of receiving the information to be replied, and optionally, the reply habit of the user can be represented by the expression reply probability of replying by adopting the expression and the text reply probability of replying by adopting the text. Further, the expression reply probability and the text reply probability can be compared, and whether the expression reply candidate is displayed or the entry corresponding to the expression reply candidate is displayed is judged according to the comparison result. For example, if the expression reply probability exceeds the text reply probability, the expression reply candidate may be presented; otherwise, if the expression reply probability does not exceed the text reply probability, the entry corresponding to the expression reply candidate can be displayed. The text reply probability can be determined according to the occurrence times of the reply text in the question and answer pair data of the user, and the expression reply probability can be determined according to the occurrence times of the reply expressions in the question and answer pair data of the user.
The communication identifier may refer to an identifier with communication authority, such as a phone number, a user identifier of instant messaging (such as a QQ number, a micro-signal number, etc.), equipment information of a terminal (such as an IMEI (international mobile equipment identity (IMEI) code, international Mobile Equipment Identity)), etc., which can be understood that the embodiment of the present invention does not limit a specific communication identifier.
The historical chat content between the user and the communication identifier corresponding to the information to be replied can reflect reply information between the user and one communication identifier, and particularly, when the information to be replied of one communication identifier is received, the user is used to reply by adopting the expression or the text. For example, for a communication identifier (such as a communication identifier of a leader, a colleague or a client) in a working scene, the communication identifier belongs to a formal occasion, so that a text is used to reply; and for communication identifications (such as communication identifications of friends and family) in life scenes, the communication identifications belong to informal occasions, so that the habit of replying by adopting expressions is adopted. Therefore, the historical chat content between the user and the communication identifier corresponding to the information to be replied can be used as a basis for judging whether to display the expression reply candidate or display the entry corresponding to the expression reply candidate.
For the process of historical chat content between the user and the communication identifier corresponding to the information to be replied, judging whether to display the expression reply candidate or the entry corresponding to the expression reply candidate, which is similar to the process of judging whether to display the expression reply candidate or the entry corresponding to the expression reply candidate based on the reply habit of the user, the comparison can be performed on the expression reply probability and the text reply probability, and whether to display the expression reply candidate or the entry corresponding to the expression reply candidate is judged according to the comparison result, so that details are omitted herein and the comparison is made with reference to each other.
In summary, according to the input method of the embodiment of the invention, aiming at the information to be replied, the expression reply candidate corresponding to the information to be replied is displayed for the user to select, or the entry corresponding to the expression reply candidate is displayed, so that the user triggers the display of the expression reply candidate through the entry; because the expression reply candidates of the embodiment of the invention correspond to the information to be replied, the embodiment of the invention can reduce the interference of the expression irrelevant to the information to be replied to the user, thereby simplifying the operation flow when the user inputs the expression, reducing the input cost of the user and improving the input experience of the user.
Referring to fig. 6, a flowchart illustrating steps of an embodiment of an input method of the present invention may specifically include the following steps:
step 601, determining information to be replied;
step 602, determining expression reply candidates corresponding to the information to be replied; the expression reply candidates may include: a first expression reply candidate obtained according to the question-answer pair data and a second expression reply candidate obtained according to a question-answer sentence mode;
step 603, sorting the first expression reply candidate and the second expression reply candidate;
step 604, displaying the expression reply candidates for selection by a user according to the sorting result; or, displaying an entry corresponding to the expression reply candidate, wherein the entry can be used for triggering the display of the expression reply candidate.
Compared with the method embodiment shown in fig. 2, the first expression reply candidate obtained according to question-answer pair data and the second expression reply candidate obtained according to question-answer sentence mode in this embodiment can improve diversity and richness of the expression reply candidates for the user to select.
According to one embodiment, the process of ordering the first expression reply candidate and the second expression reply candidate may include: the first expression reply candidate and the second expression reply candidate are subjected to alternate sorting, and a sorting result of the alternate sorting can comprise: first expression reply candidate 1, second expression reply candidate 1, first expression reply candidate 2, second expression reply candidate 2 … first expression reply candidate n, second expression reply candidate n, wherein n is a natural number, so that a plurality of first expression reply candidates or the second expression reply candidates can appear discontinuously, and the diversity, richness and interestingness of the expression reply candidates can be further improved.
According to another embodiment, the process of ordering the first expression reply candidate and the second expression reply candidate may include: sorting the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate; the weights corresponding to the first expression reply candidates may be obtained according to the attention features of the user to the first expression reply candidates, and the weights corresponding to the second expression reply candidates may be obtained according to the attention features of the user to the second expression reply candidates.
The attention feature may be obtained according to an attention behavior of the user to the expression reply candidate, and the attention behavior may include: in practical application, the above noted feature can be represented by the frequency of the noted behavior in the preset time period, generally, the higher the frequency of the noted behavior in the preset time period, the larger the corresponding weight is, so that the more popular expression reply candidates are ranked in front, the probability of being clicked is improved,
in an optional embodiment of the present invention, the weight corresponding to the first expression reply candidate and the weight corresponding to the second expression reply candidate may be obtained according to a user setting, so that the user sets a higher weight for the favorite expression reply candidate.
In another alternative embodiment of the present invention, before sorting the first expression reply candidate and the second expression reply candidate, the first expression reply candidate and the second expression reply candidate may be further de-duplicated to remove duplicate expression reply candidates.
In an application example of the present invention, it is assumed that, according to the above-mentioned technical scheme 1, searching is performed in a mapping relationship between the information to be replied and the reply text to obtain candidate reply texts corresponding to the information to be replied, and if the number of candidate reply texts is i (i is a natural number), searching can be performed on a mapping relationship between expression keywords and expressions for each candidate reply text, for example, k (k is a natural number) expression corresponding to k (k is a natural number) expression keywords identical, similar or related to each candidate reply text can be selected, and k×i expression reply candidates can be finally obtained; similarly, the information sentence pattern corresponding to the information to be replied can be determined through the technical scheme 2; and determining candidate answers corresponding to the information to be replied according to the answer sentence mode corresponding to the information sentence mode, and assuming that the candidate answers are candidate answer texts and the number of the candidate answer texts is j (j is a natural number), searching a mapping relation between the expression keywords and the expressions for each candidate answer text, for example, selecting expressions corresponding to k expression keywords which are the same as, similar to or related to each candidate answer text, and finally obtaining k×j expression reply candidates. Finally, after the (k+k+j) expression reply candidates are de-duplicated and ordered, a part or all of the expression reply candidates can be selected and displayed to the user for the user to select.
In summary, according to the input method of the embodiment of the invention, the first expression reply candidate obtained according to the question-answer data and the second expression reply candidate obtained according to the question-answer sentence mode can improve the diversity and the richness of the expression reply candidates for the user to select.
It should be noted that, for simplicity of description, the method embodiments are described as a series of combinations of motion actions, but those skilled in the art should appreciate that the embodiments of the present invention are not limited by the order of motion actions described, as some steps may be performed in other order or simultaneously in accordance with the embodiments of the present invention. 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. 7, a block diagram illustrating an embodiment of a device for searching for a terminal according to the present invention may specifically include:
the information to be replied determining module 701 is configured to determine information to be replied;
an expression reply candidate determining module 702, configured to determine an expression reply candidate corresponding to the information to be replied; and
A display module 703, configured to display the expression reply candidate for selection by a user; or, displaying an entry corresponding to the expression reply candidate, wherein the entry can be used for triggering the display of the expression reply candidate.
Alternatively, the expression reply candidates may be obtained from question-answer data, and/or the expression reply candidates may be obtained from question-answer sentence patterns.
Optionally, the question-answer data may include: information and its corresponding reply, which may include: reply text and/or reply expressions.
Alternatively, the sentence rules corresponding to the question-answer sentence patterns may include: syntax rules and/or semantic rules.
Alternatively, the expression reply candidate determining module 702 may include:
the mapping determination submodule is used for determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the replies; and the mapping relation between the information to be replied and the reply is obtained according to the question-answer data.
Optionally, the mapping determination submodule may include:
the first searching unit is used for searching in the mapping relation between the information to be replied and the reply text according to the information to be replied under the condition that the reply comprises the reply text so as to obtain a candidate reply text corresponding to the information to be replied;
And the second searching unit is used for searching according to the candidate reply text and the mapping relation between the expression key words and the expressions so as to obtain the expressions corresponding to the candidate reply text and serve as expression reply candidates corresponding to the information to be replied.
Optionally, the mapping determination submodule may include:
and the third searching unit is used for searching in the mapping relation between the information to be replied and the reply expression according to the information to be replied under the condition that the reply comprises the reply expression so as to obtain the reply expression corresponding to the information to be replied, and the reply expression is used as an expression reply candidate corresponding to the information to be replied.
Optionally, the question-answer sentence pattern may include: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the expression reply candidate determination module 702 may include:
the mode determining submodule is used for determining an information statement mode corresponding to the information to be replied;
a candidate reply determination submodule, configured to determine a candidate reply corresponding to the information to be replied according to a reply sentence pattern corresponding to the information sentence pattern; and
and the candidate determination submodule is used for obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
Alternatively, the expression reply candidate may include: the device may further include a first expression reply candidate obtained according to the question-answer pair data, and a second expression reply candidate obtained according to a question-answer sentence mode:
and the ordering module is used for ordering the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
Optionally, the weight corresponding to the first expression reply candidate is obtained according to the attention feature of the user to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is obtained according to the attention feature of the user to the second expression reply candidate.
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.
The embodiment of the invention also provides a device for inputting, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and are configured to be executed by one or more processors, the one or more programs comprise instructions for: determining information to be replied; determining expression reply candidates corresponding to the information to be replied; the expression reply candidates are displayed for selection by a user; or, displaying an entry corresponding to the expression reply candidate, wherein the entry can be used for triggering the display of the expression reply candidate.
Optionally, the expression reply candidate is obtained according to question-answer pair data, and/or the expression reply candidate is obtained according to question-answer sentence mode.
Optionally, the question-answer data includes: information and its corresponding reply, the reply comprising: reply text and/or reply expressions.
Optionally, the sentence rules corresponding to the question-answer sentence mode include: syntax rules and/or semantic rules.
Optionally, the determining the expression reply candidate corresponding to the information to be replied includes:
Determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the replies; and the mapping relation between the information to be replied and the reply is obtained according to the question-answer data.
Optionally, the determining the expression reply candidate corresponding to the information to be replied according to the mapping relationship between the information to be replied and the reply includes:
the reply comprises a reply text, and searching is carried out in the mapping relation between the information to be replied and the reply text according to the information to be replied so as to obtain a candidate reply text corresponding to the information to be replied; searching according to the candidate reply text and the mapping relation between the expression keywords and the expressions to obtain expressions corresponding to the candidate reply text, wherein the expressions are used as expression reply candidates corresponding to the information to be replied; and/or
The reply comprises a reply expression, and according to the information to be replied, the reply expression corresponding to the information to be replied is searched in a mapping relation between the information to be replied and the reply expression, so that the reply expression corresponding to the information to be replied is obtained and is used as an expression reply candidate corresponding to the information to be replied.
Optionally, the question-answer sentence pattern includes: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
The determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
determining an information statement mode corresponding to the information to be replied;
determining candidate replies corresponding to the information to be replied according to the reply sentence mode corresponding to the information sentence mode;
and obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
Optionally, the expression reply candidate includes: a first expression reply candidate derived from question-answer pair data, and a second expression reply candidate derived from question-answer sentence pattern, the device further configured to execute the one or more programs by one or more processors, including instructions for:
and sequencing the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
Optionally, the weight corresponding to the first expression reply candidate is obtained according to the attention feature of the user to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is obtained according to the attention feature of the user to the second expression reply candidate.
Fig. 8 is a block diagram illustrating an apparatus 900 for input according to an example embodiment. For example, apparatus 900 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. 8, apparatus 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communication component 916.
The processing component 902 generally controls overall operations of the apparatus 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 902 can include one or more modules that facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operations at the apparatus 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 906 provides power to the various components of the device 900. Power supply components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 900.
The multimedia component 908 comprises a screen between the device 900 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 a sliding motion action, but also the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 908 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 900 is in an operational mode, such as a photographing 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 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, the sensor assembly 914 may detect the on/off state of the device 900, the relative positioning of the components, such as the display and keypad of the device 900, the sensor assembly 914 may also detect the change in position of the device 900 or one component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration/deceleration of the device 900, and the change in temperature of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 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 914 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communication between the apparatus 900 and other devices in a wired or wireless manner. The device 900 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 part 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, apparatus 900 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 a memory 904 including instructions executable by the processor 920 of the apparatus 900 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. 9 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, CPU) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 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 (terminal or server) causes the apparatus to perform an input method, the method comprising: determining information to be replied; determining expression reply candidates corresponding to the information to be replied; the expression reply candidates are displayed for selection by a user; or displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate.
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 (22)

1. An input method, comprising:
determining information to be replied;
determining expression reply candidates corresponding to the information to be replied;
the expression reply candidates are displayed for selection by a user; or, displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate; judging whether to display the expression reply candidates or the entry according to reply habits of the user and/or historical chat content between the user and communication identifiers corresponding to the information to be replied; determining expression reply probability and text reply probability according to the reply habit of the user and/or the historical chat content, comparing the expression reply probability and the text reply probability, and judging whether to display the expression reply candidates or the entry according to a comparison result;
The determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
extracting target question-answer pair data with the frequency meeting preset conditions from question-answer pair data, establishing a mapping relation between information to be replied and answers according to the target question-answer pair data, and determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the answers; the question-answer pair data is data generated by at least one user, and comprises: information and a reply corresponding to the information; the reply includes: reply text or reply expression.
2. The method of claim 1, wherein the expression reply candidates are further derived from a question-answer sentence pattern.
3. The method according to claim 2, wherein the sentence rules corresponding to the question-answer sentence patterns include: syntax rules and/or semantic rules.
4. The method of claim 1, wherein the determining the expression reply candidate corresponding to the information to be replied according to the mapping relationship between the information to be replied and the reply comprises:
the reply comprises a reply text, and searching is carried out in the mapping relation between the information to be replied and the reply text according to the information to be replied so as to obtain a candidate reply text corresponding to the information to be replied; searching according to the candidate reply text and the mapping relation between the expression keywords and the expressions to obtain expressions corresponding to the candidate reply text, wherein the expressions are used as expression reply candidates corresponding to the information to be replied; and/or
The reply comprises a reply expression, and according to the information to be replied, the reply expression corresponding to the information to be replied is searched in a mapping relation between the information to be replied and the reply expression, so that the reply expression corresponding to the information to be replied is obtained and is used as an expression reply candidate corresponding to the information to be replied.
5. A method according to claim 2 or 3, wherein the question-answer sentence pattern comprises: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
determining an information statement mode corresponding to the information to be replied;
determining candidate replies corresponding to the information to be replied according to the reply sentence mode corresponding to the information sentence mode;
and obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
6. The method of any one of claims 1 to 3, wherein the expression-reply candidates include: a first expression reply candidate obtained according to question-answer pair data and a second expression reply candidate obtained according to question-answer sentence mode, the method further comprising:
and sequencing the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
7. The method of claim 6, wherein the weight corresponding to the first expression reply candidate is obtained based on a user's attention to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is obtained based on a user's attention to the second expression reply candidate.
8. An input device, comprising:
the information to be replied determining module is used for determining the information to be replied;
the expression reply candidate determining module is used for determining expression reply candidates corresponding to the information to be replied; and
the display module is used for displaying the expression reply candidates for selection by a user; or, displaying an entry corresponding to the expression reply candidate, so that a user triggers the display of the expression reply candidate through the entry; judging whether to display the expression reply candidates or the entry according to reply habits of the user and/or historical chat content between the user and communication identifiers corresponding to the information to be replied; determining expression reply probability and text reply probability according to the reply habit of the user and/or the historical chat content, comparing the expression reply probability and the text reply probability, and judging whether to display the expression reply candidates or the entry according to a comparison result;
The expression reply candidate determining module includes:
the mapping determination submodule is used for extracting target question-answer pair data with the frequency meeting preset conditions from question-answer pair data, establishing a mapping relation between information to be replied and answers according to the target question-answer pair data, and determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the answers; the question-answer pair data is data generated by at least one user, and comprises: information and a reply corresponding to the information; the reply includes: reply text or reply expression.
9. The apparatus of claim 8, wherein the expression reply candidates are further derived from a question-answer sentence pattern.
10. The apparatus of claim 9, wherein the sentence rules corresponding to the question-answer sentence patterns include: syntax rules and/or semantic rules.
11. The apparatus of claim 8, wherein the map determination submodule comprises:
the first searching unit is used for searching in the mapping relation between the information to be replied and the reply text according to the information to be replied under the condition that the reply comprises the reply text so as to obtain a candidate reply text corresponding to the information to be replied;
And the second searching unit is used for searching according to the candidate reply text and the mapping relation between the expression key words and the expressions so as to obtain the expressions corresponding to the candidate reply text and serve as expression reply candidates corresponding to the information to be replied.
12. The apparatus of claim 9, wherein the question-answer sentence pattern comprises: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the expression reply candidate determining module includes:
the mode determining submodule is used for determining an information statement mode corresponding to the information to be replied;
a candidate reply determination submodule, configured to determine a candidate reply corresponding to the information to be replied according to a reply sentence pattern corresponding to the information sentence pattern; and
and the candidate determination submodule is used for obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
13. The apparatus of any one of claims 8 to 11, wherein the expression-reply candidates include: a first expression reply candidate obtained according to question-answer pair data and a second expression reply candidate obtained according to question-answer sentence mode, the device further comprising:
And the ordering module is used for ordering the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
14. The apparatus of claim 13, wherein the weight corresponding to the first expression reply candidate is derived from a user's attention to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is derived from a user's attention to the second expression reply candidate.
15. 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:
determining information to be replied;
determining expression reply candidates corresponding to the information to be replied;
the expression reply candidates are displayed for selection by a user; or, displaying an entry corresponding to the expression reply candidate, wherein the entry is used for triggering the display of the expression reply candidate; judging whether to display the expression reply candidates or the entry according to reply habits of the user and/or historical chat content between the user and communication identifiers corresponding to the information to be replied; determining expression reply probability and text reply probability according to the reply habit of the user and/or the historical chat content, comparing the expression reply probability and the text reply probability, and judging whether to display the expression reply candidates or the entry according to a comparison result;
The determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
extracting target question-answer pair data with the frequency meeting preset conditions from question-answer pair data, establishing a mapping relation between information to be replied and answers according to the target question-answer pair data, and determining expression reply candidates corresponding to the information to be replied according to the mapping relation between the information to be replied and the answers; the question-answer pair data is data generated by at least one user, and comprises: information and a reply corresponding to the information; the reply includes: reply text or reply expression.
16. The apparatus of claim 15, wherein the expression reply candidates are derived from a question-answer sentence pattern.
17. The apparatus of claim 16, wherein the sentence rules corresponding to the question-answer sentence patterns include: syntax rules and/or semantic rules.
18. The apparatus of claim 15, wherein the determining the expression reply candidate corresponding to the information to be replied according to the mapping relationship between the information to be replied and the reply comprises:
the reply comprises a reply text, and searching is carried out in the mapping relation between the information to be replied and the reply text according to the information to be replied so as to obtain a candidate reply text corresponding to the information to be replied; searching according to the candidate reply text and the mapping relation between the expression keywords and the expressions to obtain expressions corresponding to the candidate reply text, wherein the expressions are used as expression reply candidates corresponding to the information to be replied; and/or
The reply comprises a reply expression, and according to the information to be replied, the reply expression corresponding to the information to be replied is searched in a mapping relation between the information to be replied and the reply expression, so that the reply expression corresponding to the information to be replied is obtained and is used as an expression reply candidate corresponding to the information to be replied.
19. The apparatus of claim 16 or 17, wherein the question-answer sentence pattern comprises: an information sentence pattern corresponding to the information, and a reply sentence pattern corresponding to the reply;
the determining the expression reply candidate corresponding to the information to be replied comprises the following steps:
determining an information statement mode corresponding to the information to be replied;
determining candidate replies corresponding to the information to be replied according to the reply sentence mode corresponding to the information sentence mode;
and obtaining expression reply candidates corresponding to the information to be replied according to the candidate replies.
20. The apparatus of any one of claims 15 to 17, wherein the expression-reply candidates include: a first expression reply candidate derived from question-answer pair data, and a second expression reply candidate derived from question-answer sentence pattern, the device further configured to execute the one or more programs by one or more processors, including instructions for:
And sequencing the first expression reply candidate and the second expression reply candidate according to weights respectively corresponding to the first expression reply candidate and the second expression reply candidate.
21. The apparatus of claim 20, wherein the weight corresponding to the first expression reply candidate is derived from a user's attention to the first expression reply candidate, and the weight corresponding to the second expression reply candidate is derived from a user's attention to the second expression reply candidate.
22. One or more machine readable media having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the input method of one or more of claims 1-7.
CN201711158727.2A 2017-11-20 2017-11-20 Input method and device and input device Active CN109814730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711158727.2A CN109814730B (en) 2017-11-20 2017-11-20 Input method and device and input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711158727.2A CN109814730B (en) 2017-11-20 2017-11-20 Input method and device and input device

Publications (2)

Publication Number Publication Date
CN109814730A CN109814730A (en) 2019-05-28
CN109814730B true CN109814730B (en) 2023-09-12

Family

ID=66598618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711158727.2A Active CN109814730B (en) 2017-11-20 2017-11-20 Input method and device and input device

Country Status (1)

Country Link
CN (1) CN109814730B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385188A (en) * 2019-11-22 2020-07-07 百度在线网络技术(北京)有限公司 Recommendation method and device for dialog elements, electronic equipment and medium
CN110971424B (en) * 2019-11-29 2021-10-29 广州市百果园信息技术有限公司 Message processing method, device and system, computer equipment and storage medium
CN111506717B (en) * 2020-04-15 2024-02-09 网易(杭州)网络有限公司 Question answering method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063427A (en) * 2014-06-06 2014-09-24 北京搜狗科技发展有限公司 Expression input method and device based on semantic understanding
CN104076944A (en) * 2014-06-06 2014-10-01 北京搜狗科技发展有限公司 Chat emoticon input method and device
US9043196B1 (en) * 2014-07-07 2015-05-26 Machine Zone, Inc. Systems and methods for identifying and suggesting emoticons
WO2016045465A1 (en) * 2014-09-25 2016-03-31 北京搜狗科技发展有限公司 Information presentation method based on input and input method system
CN105515957A (en) * 2016-01-06 2016-04-20 北京百度网讯科技有限公司 Chatting reply method and device
WO2016197767A2 (en) * 2016-02-16 2016-12-15 中兴通讯股份有限公司 Method and device for inputting expression, terminal, and computer readable storage medium
WO2016203805A1 (en) * 2015-06-15 2016-12-22 ソニー株式会社 Information processing device, information processing system, information processing method, and program
CN106372059A (en) * 2016-08-30 2017-02-01 北京百度网讯科技有限公司 Information input method and information input device
CN106446054A (en) * 2016-08-31 2017-02-22 北京搜狗科技发展有限公司 Information recommendation method and apparatus, and electronic device
CN107070779A (en) * 2015-05-29 2017-08-18 北京搜狗科技发展有限公司 A kind of information processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3009758A1 (en) * 2015-12-29 2017-07-06 Mz Ip Holdings, Llc Systems and methods for suggesting emoji

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063427A (en) * 2014-06-06 2014-09-24 北京搜狗科技发展有限公司 Expression input method and device based on semantic understanding
CN104076944A (en) * 2014-06-06 2014-10-01 北京搜狗科技发展有限公司 Chat emoticon input method and device
CN104933113A (en) * 2014-06-06 2015-09-23 北京搜狗科技发展有限公司 Expression input method and device based on semantic understanding
WO2015185019A1 (en) * 2014-06-06 2015-12-10 北京搜狗科技发展有限公司 Semantic comprehension-based expression input method and apparatus
US9043196B1 (en) * 2014-07-07 2015-05-26 Machine Zone, Inc. Systems and methods for identifying and suggesting emoticons
WO2016045465A1 (en) * 2014-09-25 2016-03-31 北京搜狗科技发展有限公司 Information presentation method based on input and input method system
CN107070779A (en) * 2015-05-29 2017-08-18 北京搜狗科技发展有限公司 A kind of information processing method and device
WO2016203805A1 (en) * 2015-06-15 2016-12-22 ソニー株式会社 Information processing device, information processing system, information processing method, and program
CN105515957A (en) * 2016-01-06 2016-04-20 北京百度网讯科技有限公司 Chatting reply method and device
WO2016197767A2 (en) * 2016-02-16 2016-12-15 中兴通讯股份有限公司 Method and device for inputting expression, terminal, and computer readable storage medium
CN106372059A (en) * 2016-08-30 2017-02-01 北京百度网讯科技有限公司 Information input method and information input device
CN106446054A (en) * 2016-08-31 2017-02-22 北京搜狗科技发展有限公司 Information recommendation method and apparatus, and electronic device

Also Published As

Publication number Publication date
CN109814730A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
EP3173948A1 (en) Method and apparatus for recommendation of reference documents
CN108073606B (en) News recommendation method and device for news recommendation
CN108345625B (en) Information mining method and device for information mining
CN110391966B (en) Message processing method and device and message processing device
CN110069624B (en) Text processing method and device
CN109814730B (en) Input method and device and input device
CN110781813A (en) Image recognition method and device, electronic equipment and storage medium
CN112631435A (en) Input method, device, equipment and storage medium
CN110232181B (en) Comment analysis method and device
CN113411246B (en) Reply processing method and device and reply processing device
CN110633017A (en) Input method, input device and input device
CN112000766A (en) Data processing method, device and medium
CN111666498A (en) Friend recommendation method based on interactive information, related device and storage medium
CN110895558B (en) Dialogue reply method and related device
CN110110078B (en) Data processing method and device for data processing
CN107291259B (en) Information display method and device for information display
CN113127613B (en) Chat information processing method and device
CN110929122B (en) Data processing method and device for data processing
CN114610163A (en) Recommendation method, apparatus and medium
CN114115550A (en) Method and device for processing association candidate
CN109753205B (en) Display method and device
CN112181163A (en) Input method, input device and input device
CN112306252A (en) Data processing method and device and data processing device
CN111611030A (en) Data processing method and device and data processing device
CN112446366A (en) Image translation evaluating method and device for image translation evaluating

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