Input method, device and device for input

By detecting the pause events of sentences and using a model trained by sentence corpus, we provide sentence association candidates, which solves the problem of poor sentence-level association integrity in the prior art, and improves input efficiency and user experience.

CN113589950BActive Publication Date: 2025-01-07BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010367753.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-30
Publication Date
2025-01-07
Estimated Expiration
2040-07-05

AI Technical Summary

Technical Problem

The associative function of the existing input method mainly focuses on words, resulting in poor sentence-level association integrity, affecting input efficiency and user experience.

Method used

By detecting the pause event of a sentence, sending a sentence association request to the server, and using the sentence corpus training model to determine the sentence association candidates, improving the correlation between the sentence association candidates and the input content.

Benefits of technology

The correlation between sentence association candidates and input content is improved, input efficiency and user experience is improved, and the continuity and completeness of sentence association is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113589950B_ABST
    Figure CN113589950B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an input method, device and device for input. The method specifically includes: during the input process, detecting a pause event of a sentence; if a pause event of a sentence is detected, sending a sentence association request to a server; the sentence association request includes: input content, so that the server determines the sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and displaying the sentence association candidates returned by the server. The embodiment of the present invention can improve input efficiency and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of input technology, and in particular to an input method, an input device and a device for input. Background Art

[0002] Input method refers to the encoding method used to input various texts into computers or other devices (such as mobile phones, tablets, etc.). If users want to input text into a device, they need to use an input method program. For example, users can enter keywords in a search engine to search the web, enter text in an instant messaging app (application) to communicate with other users, and enter text in a document app to edit a document, etc.

[0003] The associative function of the input method is an extended function of the input method program. Its appearance reduces the number of times the user actively inputs and the number of keystrokes, and increases the intelligence of the input method. At present, the input method program can provide corresponding associative candidates for the words that the user puts on the screen. For example, for the word "all over the sky" that the user puts on the screen, associative candidates such as "heavy snow" and "flying" are provided. For another example, for the word "birthday" that the user puts on the screen, associative candidates such as "happy" are provided.

[0004] The inventors discovered during the implementation of the embodiments of the present invention that the user's expression is expressed in sentences, and association candidates are provided for words, resulting in poor completeness of the association candidates. Summary of the invention

[0005] The embodiments of the present invention provide an input method, an input device and a device for input, which can improve input efficiency and user experience.

[0006] In order to solve the above problem, an embodiment of the present invention discloses an input method, including:

[0007] During the input process, the pause events of the sentence are detected;

[0008] If a pause event of a sentence is detected, a sentence association request is sent to the server; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0009] The sentence association candidates returned by the server are displayed.

[0010] On the other hand, an embodiment of the present invention discloses an input device, comprising:

[0011] A detection module, used to detect pause events of sentences during input;

[0012] A sending module is used to send a sentence association request to a server if a pause event of a sentence is detected; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and

[0013] The sentence association candidate display module is used to display the sentence association candidates returned by the server.

[0014] In another aspect, an embodiment of the present invention discloses a device for input, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:

[0015] During the input process, the pause events of the sentence are detected;

[0016] If a pause event of a sentence is detected, a sentence association request is sent to the server; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0017] The sentence association candidates returned by the server are displayed.

[0018] On the other hand, an embodiment of the present invention discloses a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables a device to perform one or more of the input methods described above.

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

[0020] When a pause event of a sentence is detected in the embodiment of the present invention, it can be considered that the input content corresponds to a language unit with higher integrity. The language unit with higher integrity can be a sentence, a clause, or a sentence component such as a subject, a predicate, or an object.

[0021] The embodiment of the present invention uses sentence corpus training to obtain a sentence association model so that the sentence association model has a sentence-level association function. In this way, the embodiment of the present invention determines corresponding sentence association candidates for input content with high integrity based on the sentence association model, which can improve the correlation between the sentence association candidates and the input content, thereby improving input efficiency and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0023] Figure 1 is a schematic diagram of an application environment of an input method according to an embodiment of the present invention;

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

[0025] Figure 3 is a flow chart of steps of Embodiment 2 of an input method of the present invention;

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

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

[0028] Figure 6 is a block diagram of a device 800 for inputting according to the present invention; and

[0029] Figure 7 It is a schematic diagram of the structure of the server in some embodiments of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] An embodiment of the present invention provides an input scheme, which may include: detecting a pause event of a sentence during the input process; if a pause event of a sentence is detected, sending a sentence association request to a server; the sentence association request may include: input content, so that the server determines the sentence association candidates corresponding to the sentence association request based on a sentence association model; the training data corresponding to the sentence association model may include: sentence corpus; and displaying the sentence association candidates returned by the server.

[0032] When a pause event of a sentence is detected in the embodiment of the present invention, it can be considered that the input content corresponds to a language unit with higher integrity. The language unit with higher integrity can be a sentence, a clause, or a sentence component such as a subject, a predicate, or an object.

[0033] The embodiment of the present invention uses sentence corpus training to obtain a sentence association model so that the sentence association model has a sentence-level association function. In this way, the embodiment of the present invention determines corresponding sentence association candidates for input content with high integrity based on the sentence association model, which can improve the correlation between the sentence association candidates and the input content, thereby improving input efficiency and enhancing user experience.

[0034] The embodiment of the present invention can achieve the continuity of sentence association. For example, the embodiment of the present invention can provide at least one sentence association candidate (such as sentence B1, sentence B2, etc.) for sentence A; if the user selects sentence B2 to be displayed on the screen, at least one sentence association candidate (such as sentence C1, sentence C2, etc.) can also be provided for sentence A and sentence B2; if the user selects sentence C1 to be displayed on the screen, at least one sentence association candidate (such as sentence D1, sentence D2, etc.) can also be provided for sentence A, sentence B2 and sentence C1. It can be understood that in the case where the user continues to select sentence association candidates, the embodiment of the present invention can continue to provide corresponding sentence association candidates.

[0035] The input method provided by the embodiment of the present invention can be applied to Figure 1 In the application environment shown, Figure 1 As shown, the client 100 and the server 200 are located in a wired or wireless network, and the client 100 and the server 200 perform data exchange through the wired or wireless network.

[0036] Optionally, the client 100 can be run on a terminal, which specifically includes but is not limited to: a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a car computer, a desktop computer, a set-top box, a smart TV, a wearable device, etc. The client 100 can correspond to a website or an APP (Application). The client 100 can correspond to an application such as an input method APP and an instant messaging APP.

[0037] The server of the embodiment of the present invention may be a cloud server. A cloud server is a simple, efficient, safe, reliable, and elastically scalable computing service. The resource information of the cloud server is dynamic, so that its processing capacity can be elastically scalable.

[0038] The embodiments of the present invention can be applied to input method programs of various input methods such as keyboard symbols, handwriting, and voice. Taking the keyboard symbol input method as an example, the user can input text through a coded string, and the input string can refer to the coded string input by the user. In the field of input methods, for input method programs such as Chinese, Japanese, Korean, or other languages, the input string input by the user can usually be converted into a candidate of the corresponding language. The following is mainly explained by taking Chinese as an example, and other languages ​​such as Japanese and Korean can be referenced to each other. It can be understood that the above-mentioned Chinese input method can include but is not limited to full spelling, simplified spelling, strokes, Wubi, etc., and the embodiments of the present invention do not limit the specific input method program corresponding to a certain language.

[0039] Taking Chinese input as an example, the types of encoded character strings may include: Pinyin string, character string (such as Wubi string, etc.) Taking English input as an example, the types of encoded character strings may include: letter string, etc.

[0040] In actual applications, for the input method of keyboard symbols, the user can input the above input string through a physical keyboard or a virtual keyboard. For example, for a terminal with a touch screen, a virtual keyboard can be set in the input interface to input the input string by triggering the virtual keys included in the above virtual keyboard. Optionally, examples of the above virtual keyboard may include: a 9-key keyboard and a 26-key keyboard. In addition, it can be understood that in addition to the virtual keys corresponding to letters, the above input interface can also be provided with symbol keys, number keys, function keys such as Chinese-English switching keys, or toolbar keys, etc. It can be understood that the embodiment of the present invention does not limit the specific keys included in the input interface.

[0041] According to some embodiments, the input string may include, but is not limited to, a key symbol or a combination of multiple key symbols input by the user through keys. The key symbol may specifically include pinyin, strokes, kana, and the like.

[0042] In the embodiment of the present invention, the candidate may be used to represent one or more characters provided by the input method program to be selected by the user. The candidate may be characters in languages ​​such as Chinese characters, English characters, and Japanese characters, and the candidate may also be a combination of symbols in the form of emoticons, pictures, and the like. The emoticons include but are not limited to pictures composed of lines, symbols, and words. For example, examples of the emoticons may include: “:P”, “:-o”, “:-)”, and the like.

[0043] Method Example 1

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

[0045] Step 201: During the input process, detecting pause events of the sentence;

[0046] Step 202: If a pause event of a sentence is detected, a sentence association request is sent to the server; the sentence association request may include: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model may include: sentence corpus;

[0047] Step 203: display the sentence association candidates returned by the server.

[0048] Figure 2 The method embodiment shown may be executed by a client and / or a server. It is to be understood that the embodiment of the present invention does not limit the specific execution subject of the method embodiment.

[0049] In step 201, the pause event of the sentence is used to indicate the pause of the sentence, so that the input content corresponds to a language unit with higher integrity.

[0050] In the embodiment of the present invention, the pause event of a sentence may include:

[0051] An input operation for a first preset punctuation mark is detected; and / or

[0052] A send operation was detected for input.

[0053] The first preset punctuation mark can be determined by a person skilled in the art according to actual application requirements. For example, the first preset punctuation mark may include: comma "," , period ".", question mark "?", exclamation mark "!", period ".", space", etc. It can be understood that the embodiment of the present invention does not limit the specific first preset punctuation mark.

[0054] For example, after user A inputs the content "Everyone is busy" on the upper screen, he clicks the comma "," and it can be considered that a pause event of the sentence is detected.

[0055] The operation of sending the input content may indicate that the input content has been sent to the communication peer. In this case, it may be considered that the integrity of the input content is relatively high.

[0056] For example, after user B inputs the content "What are you doing" on the upper screen, he clicks the send button, then it can be considered that a pause event of the sentence is detected.

[0057] It can be understood that the pause time of the above sentence is only an optional embodiment. In fact, those skilled in the art can use other pause events according to actual application requirements. For example, the pause event can also be that the input interval duration exceeds the preset duration. Alternatively, the integrity probability corresponding to the input content can also be determined. When the integrity probability exceeds the probability threshold, it is considered that a pause event is detected.

[0058] In step 202, the sentence association request is used to request sentence association candidates corresponding to the sentence association request.

[0059] The sentence association request may include: input content. Optionally, the sentence association request may also include: context corresponding to the input content, and / or input environment features, and / or user features.

[0060] In the embodiment of the present invention, the context may include: preceding text and / or following text. Optionally, the preceding text is usually the part before the input cursor, and the following text is usually the part after the input cursor.

[0061] According to one embodiment, the above context may include: the most recent or most recent on-screen content. According to another embodiment, the above context may include: the communication content sent by the communication peer in a communication scenario. According to yet another embodiment, the above context may include: the communication content sent to the communication peer in a communication scenario. It is understood that the embodiments of the present invention are not limited to the specific context.

[0062] The input environment features can be used to characterize the environment information of the terminal when the user inputs. The input environment features can reflect the user's input intention to a certain extent. Therefore, by establishing a connection between the input environment features and the user's input intention, the user's input intention can be indirectly identified, thereby improving the user's input efficiency.

[0063] In practical applications, the input environment features may include various types of features. Optionally, the input environment features may include at least one of time environment features, location environment features, climate environment features, application environment features, and page environment features.

[0064] In the case where the application environment feature is a communication environment feature, the above-mentioned input environment feature may further include: a peer user feature.

[0065] In an optional embodiment of the present invention, the above-mentioned counterpart user characteristics may include: registration information of the counterpart user on the communication platform, and / or, setting information of the local user characteristics for the above-mentioned counterpart user, and / or, evaluation information corresponding to the above-mentioned counterpart user.

[0066] In an embodiment of the present invention, when a user registers a user account on a communication platform, the user usually submits corresponding registration information, which may include nickname, age, region, etc. The embodiment of the present invention may obtain user characteristics based on the registration information.

[0067] The setting information of the local user characteristics for the above-mentioned peer user may include: remark information, or group information, etc. The embodiment of the present invention may determine the user relationship based on the above-mentioned setting information. For example, if the group information corresponding to the peer user is "family", then the user relationship is "family". For another example, if the remark information corresponding to the peer user is "wife", then the user relationship is "wife".

[0068] The evaluation information corresponding to the peer user may refer to the evaluation information of other users on the peer user, such as "talented woman", "intellectual beauty", "humorous master", etc. The embodiment of the present invention may determine the preference characteristics of the peer user based on the above evaluation characteristics.

[0069] User characteristics may refer to characteristics possessed by a user. Optionally, user characteristics may include at least one of the following characteristics: preference characteristics and static characteristics.

[0070] Static features may be relatively stable features, such as the user's age, gender, region, education level, business district, occupation, marriage, consumption level, identity (such as father, mother, grandfather, grandmother, grandmother, grandfather, etc.), etc.

[0071] Compared with the relative stability of the above-mentioned static features, preference features are usually dynamic and can change with the ever-changing user behavior. In an optional embodiment of the present application, preference features can refer to user preference features for content. The preference features can change with the user's behavior on the content (at least one of input behavior, browsing behavior, search behavior, collection behavior, saving behavior, attention behavior, purchase behavior, sharing behavior, selection behavior and evaluation behavior).

[0072] The preference characteristics may include: language style characteristics. For example, the language style characteristics of the user may be determined based on the user's historical input data.

[0073] Optionally, the user characteristics may include: content preference characteristics. Content preference characteristics may include: any one or a combination of text content, emoticon content, image content, links, etc. Emoticons are emoticons, which may refer to a new type of art work formed by arranging a combination order of specific characters. Links are used to point to information, for example, links may be links to information such as restaurants and videos.

[0074] For example, user A communicates with user B. Assuming user B likes emoticon content, the types of sentence association candidates may include: emoticon content.

[0075] For another example, user A communicates with user C. Assuming user C likes picture content, the types of sentence association candidates may include: picture content.

[0076] In an optional embodiment of the present invention, the sentence association candidate may be obtained based on a language style feature corresponding to the sentence association request.

[0077] Language style features can be used to characterize the style of the language used by the user. Examples of language style features may include: lively style, serious style, sweet style, etc.

[0078] The embodiment of the present invention can preset the mapping relationship between the opposite user characteristics and the language style characteristics. For example, the opposite user characteristics include: age, then when the age is over 60 years old, the language style characteristics are serious style. For another example, the opposite user characteristics include: user relationship, the user relationship is "wife", then the corresponding language style characteristics are sweet style; or, the user relationship is "colleague", then the corresponding language style characteristics are serious style; or, the user relationship is "child", then the corresponding language style characteristics are lively style, and so on. It can be understood that those skilled in the art can determine the mapping relationship between the opposite user characteristics and the language style characteristics according to the actual application requirements, and the embodiment of the present invention does not limit the mapping relationship between the opposite user characteristics and the language style characteristics.

[0079] The embodiments of the present invention can provide different sentence association candidates according to different language style features, thereby improving the fit between the sentence association candidates and the input environment features, thereby improving the user experience.

[0080] Assuming that the input content is "I went to sleep", when the language style feature is a lively style, the corresponding reply candidate may be "Don't sleep, get up and have fun"; when the language style feature is a serious style, the corresponding reply candidate may be "Good night".

[0081] In addition to determining the language style features based on the mapping relationship between the preset peer user features and the language style features, the embodiments of the present invention can also analyze the input content and its corresponding context to obtain the corresponding language style features. For example, it can be understood that the classification model corresponding to the language style features classifies the input content and its corresponding context to obtain the corresponding language style features, etc.

[0082] When a pause event of a sentence is detected, the embodiment of the present invention can further determine whether the sending condition is met, and if so, send a sentence association request to the server. This can reduce the pressure of massive sentence association requests on the server to a certain extent, and can avoid disturbing the user with sentence association candidates that do not meet the user's intention when the expression scenario cannot obtain accurate sentence association candidates.

[0083] In an optional embodiment of the present invention, before sending the sentence association request to the server, the method may further include: if a pause event of a sentence is detected, judging whether to send the sentence association request to the server according to punctuation marks included in the input content, and / or the number of characters included in the input content, and / or whether the previous sentence association candidate is selected. The previous sentence association candidate may refer to the sentence association candidate provided most recently.

[0084] For example, an embodiment of the present invention may provide at least one sentence association candidate (such as sentence B1, sentence B2, etc.) for sentence A; if the user selects sentence B2 to appear on the screen, in this case, the previous sentence association candidates may include: sentence B1, sentence B2, etc.

[0085] When a sending operation for input content is detected, the embodiment of the present invention may provide the following technical solution for the sending condition:

[0086] Technical Solution A1: If a sending operation for the input content is detected and the beginning of the sentence of the input content includes a preset character, then no sentence association request is sent to the server; and / or

[0087] Technical Solution A2: If a sending operation for the input content is detected and the input content does not include characters of the preset language, then no sentence association request is sent to the server; and / or

[0088] Technical Solution A3: If a sending operation for input content is detected and the input content includes entity words of a preset category, a sentence association request is not sent to the server; and / or

[0089] Technical Solution A4: If a sending operation for the input content is detected, and the end of the input content includes the sentence association candidate on the upper screen, then no sentence association request is sent to the server; and / or

[0090] Technical Solution A5: If a sending operation for input content is detected and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server.

[0091] In technical solution A1, if the beginning of the sentence of the input content includes a preset character, no sentence association request is sent to the server.

[0092] The preset characters may be characters such as "@", "auto reply", etc. Among them, "@" is used to point to a specific user, which makes the input content related to a specific event, increasing the difficulty of association. In this case, in order to avoid disturbing the user by sentence association candidates that do not meet the user's needs, the sentence association request may not be sent to the server.

[0093] The input content corresponding to "auto reply" is the content automatically replied by the communication system, not the content actively input by the user, so it is not suitable for sentence association for the input content in this case. It can be understood that those skilled in the art can set other preset characters according to actual application requirements, for example, other preset characters can be work-related characters, etc. The embodiment of the present invention does not limit the specific preset characters.

[0094] In technical solution A2, if the input content does not include characters of the preset language, no sentence association request is sent to the server, which can be applicable to the case where the sentence association model corresponds to the preset language. Specifically, the embodiment of the present invention can obtain a sentence association model based on sentence corpus training of the preset language, so that the sentence association model has the sentence association function of the preset language. Therefore, in the case where the input content does not include the preset language, sentence association may not be performed for the input content.

[0095] Those skilled in the art may determine the preset language according to actual application requirements. For example, the preset language may be Chinese, English, Japanese, etc.

[0096] In technical solution A3, if the input content includes entity words of a preset category, no sentence association request is sent to the server.

[0097] The preset categories may include: PER (personal name), LOC (place name), ORG (organization name), MISC (proper noun), etc.

[0098] When the input content includes entity words of a preset category, it can be considered that the input content involves specific entities, which increases the difficulty of association, so the sentence association request may not be sent to the server. For example, the input content includes the name of a restaurant. In this case, it is difficult to associate sentences with the input content, so the sentence association request may not be sent to the server to reduce the pressure on the server.

[0099] In technical solution A4, if the end of the input content includes sentence association candidates on the screen, this indicates that the user sends the sentence association candidates after putting them on the screen. In this case, it means that the sentence association candidates provided previously meet the user's needs, and a sentence association request is sent to the server to continuously provide sentence association candidates to the user.

[0100] In technical solution A5, if the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server.

[0101] Those skilled in the art may determine the preset character range according to actual application requirements, and the preset character range may be a static range or a dynamic range.

[0102] In an optional embodiment of the present invention, the preset character range may be obtained based on the cloud resource information of the server. When the cloud resource information of the server is updated, the preset character range may be updated accordingly to achieve the dynamic nature of the preset character range.

[0103] Optionally, the cloud resource information may be represented by the cloud resource level. Referring to Table 1, an example of the mapping relationship between the cloud resource level and the preset character range is shown, wherein the larger the value corresponding to the cloud resource level, the more sufficient the cloud resource information is represented, and the larger the character range represented by the preset character range; conversely, the smaller the value corresponding to the cloud resource level, the less sufficient the cloud resource information is represented, and the smaller the character range represented by the preset character range.

[0104] In Table 1, when the cloud resource level is 0, the cloud resource information has reached the limit of lack, and no matter whether the number of characters included in the input content meets the preset character range, the sentence association request may not be sent to the server. When the cloud resource level is 10, the cloud resource information has reached the limit of abundance, and no matter whether the number of characters included in the input content meets the preset character range, the sentence association request may be sent to the server.

[0105] Table 1

[0106]

[0107]

[0108] In actual applications, the server can send the cloud resource level and the mapping relationship between the cloud resource level and the preset character range to the client. For example, the default cloud resource level sent is 6, and the server can update the real-time cloud resource information, update the cloud resource level, and send the updated cloud resource level to the client.

[0109] The above technical solutions A1 to A5 have introduced in detail the sending conditions when a sending operation for input content is detected. It can be understood that those skilled in the art can adopt any one or a combination of technical solutions A1 to A5. It can be understood that the embodiments of the present invention do not limit the sending conditions when a sending operation for input content is detected.

[0110] When an input operation for a first preset punctuation mark is detected, the embodiment of the present invention may provide the following technical solution for sending the condition:

[0111] If an input operation for a first preset punctuation mark is detected, and if the input content meets the preset conditions, a sentence association request is sent to the server;

[0112] The preset conditions specifically include:

[0113] Preset condition B1: the input content consists of characters and punctuation marks in a preset language, the last character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the last character of the input content does not exceed a first threshold; and / or

[0114] Preset condition B2: the number of characters in the input content does not exceed the second threshold; and / or

[0115] Preset condition B3: the previous sentence association candidate is selected; and / or.

[0116] Preset condition B4: the input content includes entity words of a preset category; and / or

[0117] Preset condition B5: the number of characters before the preset punctuation mark in the input content exceeds a third threshold.

[0118] For the preset condition B1, the input content consists of characters and punctuation marks of a preset language, for example, the input content consists of Chinese characters and punctuation marks. The second preset punctuation marks can be determined by those skilled in the art according to actual application requirements, for example, the second preset punctuation marks include: comma "," period "." question mark "?" exclamation mark "!", etc.

[0119] The first threshold can be determined by those skilled in the art according to actual application requirements, for example, the first threshold is 2. For example, input content A "What are you doing..." does not meet the preset condition B1, while input content B "Hello... What are you doing?" meets the preset condition B1.

[0120] For the preset condition B2, the second threshold is used to restrict the total number of characters included in the input content. For example, the second threshold may be a value such as 20.

[0121] For the preset condition B5, the characters before the preset punctuation mark in the input content may be counted in order from back to front to determine whether the counting result exceeds the third threshold.

[0122] According to the third threshold value, the preset condition B5 specifically includes:

[0123] Preset condition B51: the number of characters before the preset punctuation mark in the input content exceeds 8;

[0124] Preset condition B52: the number of characters before the preset punctuation mark in the input content exceeds 6;

[0125] Preset condition B53: the number of characters before the preset punctuation mark in the input content exceeds 4;

[0126] Preset condition B54: the number of characters before the preset punctuation mark in the input content exceeds 3;

[0127] Preset condition B55: the number of characters before the preset punctuation mark in the input content exceeds 2.

[0128] Those skilled in the art may adopt any one or a combination of the preset conditions B1 to B5 according to actual application requirements.

[0129] In an optional embodiment of the present invention, it can be determined which combinations of preset conditions B1 to B5 to adopt based on cloud resource information.

[0130] Referring to Table 2, an example of a mapping relationship between cloud resource levels and preset conditions according to an embodiment of the present invention is shown.

[0131] Table 2

[0132]

[0133]

[0134] In Table 2, when the cloud resource level is 0, the cloud resource information has reached the limit of lack, and no matter whether the input content meets the preset conditions, the sentence association request can be sent to the server. When the cloud resource level is 10, the cloud resource information has reached the limit of abundance, and no matter whether the input content meets the preset conditions, the sentence association request can be sent to the server.

[0135] In step 203, the sentence association candidates returned by the server may be displayed for the user to select and display. It is understood that there may be one or more sentence association candidates, and optionally, the plurality of sentence association candidates may be displayed in order.

[0136] According to an embodiment, if there is no input string, the presentation position of the sentence association candidate may be the position of the candidate area.

[0137] According to another embodiment, if there is an input string, the display position of the sentence association candidate may be different from the position of the candidate area to avoid display conflict between the sentence association candidate and the first candidate corresponding to the input string.

[0138] If there is an input string, it can be determined whether to display the sentence association candidate based on the priority of the sentence association candidate and the second candidate. The display position of the second candidate is different from the position of the candidate area, so it shares the position with the sentence association candidate. Examples of the second candidate may include: name candidates, error correction candidates, picture candidates, expression optimization candidates, etc.

[0139] Optionally, if the end of the input content includes a sentence association candidate that is put on the screen, it can be considered that the priority of the sentence association candidate is higher than the priority of the second candidate, so the sentence association candidate is displayed. For example, if the sentence association candidate B2 provided last time is put on the screen by the user, the sentence association candidates C1, C2, etc. can be continuously displayed.

[0140] It can be understood that when the priority of the sentence association candidate is lower than the priority of the second candidate, the sentence association candidate may not be displayed, but the second candidate may be displayed.

[0141] Since the process of sending a sentence association request to the server, the server determining the sentence association candidate, and the server returning the sentence association candidate takes a certain amount of time; therefore, in order to alleviate the problem of users waiting for sentence association candidates, the above method may also include: if an input operation for a first preset punctuation mark is detected, before displaying the sentence association candidate returned by the server, displaying the candidate corresponding to the first preset punctuation mark in the candidate area. The processing of the candidate corresponding to the first preset punctuation mark can alleviate the problem of users waiting for sentence association candidates to a certain extent.

[0142] It can be understood that after the user selects the candidate corresponding to the first preset punctuation mark, the sentence association candidates returned by the above server can be displayed for the user to select on the screen.

[0143] In an optional embodiment of the present invention, the sentence association candidates may include: input content and prediction results. For example, the sentence association candidates include: input content "hoeing the field at noon" and prediction result "sweat dripping from the field".

[0144] The display of the sentence association candidates returned by the server includes: displaying the input content in the sentence association candidates using a first display method; and displaying the prediction results in the sentence association candidates using a second display method.

[0145] The embodiment of the present invention distinguishes and displays the input content and the prediction results in the sentence association candidates, which can improve the distinction between the input content and the prediction results.

[0146] The display method of the embodiment of the present invention may include: color display, or superscript display, or text display, etc. For example, the colors of the input content and the predicted result are different, such as the input content is black and the predicted result is red. For another example, the input content does not have a superscript, but the predicted result has a superscript. Or, the font or font size of the input content and the predicted result is different, such as the font size of the predicted result is larger than the font size of the input content, etc.

[0147] In an optional embodiment of the present invention, the above method may further include: caching the returned sentence association candidates; for the user's input string, obtaining the target sentence association candidates matching the input string from the cache; and displaying the target sentence association candidates.

[0148] The return situation may include: a timeout return situation or a non-timeout return situation. The timeout return situation may include: receiving the user's input string before receiving the returned sentence association candidate, in other words, the user's input string precedes the returned sentence association candidate. The embodiment of the present invention caches the returned sentence association candidate for subsequent use.

[0149] Obtain target sentence association candidates that match the input string from the cache, and the corresponding matching condition may be: the code corresponding to the sentence association candidate in the cache includes: the code corresponding to the input string, in other words, the code corresponding to the input string is the full set or subset of the code corresponding to the sentence association candidate in the cache. For example, the sentence association candidate in the cache includes "Thank you for your help during this period of time". If the input string is "guoqu" or "zheduan", it can be considered that the input string matches the sentence association candidate; and if the input string is "zaizheli", it is considered that the input string does not match the sentence association candidate.

[0150] In the embodiment of the present invention, optionally, the number of characters corresponding to the input string may be greater than the fourth threshold, for example, the fourth threshold is 2, etc. That is, the input string and the sentence association candidate in the cache have at least 3 characters in common. Of course, the embodiment of the present invention does not limit the specific fourth threshold.

[0151] In the embodiment of the present invention, the input string can optionally match the beginning characters of the sentence association candidates in the cache. For example, the sentence association candidates in the cache include "Thank you for your help during this time", and the input string is "guoqu". In the embodiment of the present invention, the input string can optionally match the middle characters of the sentence association candidates in the cache.

[0152] In the embodiment of the present invention, optionally, the validity period of the cache may be at least one input cycle or a preset time length. An input cycle may be determined based on an input interval, or a punctuation mark, or a sending operation. For example, when the input interval exceeds an interval threshold, an input cycle may be considered to have ended. For another example, when a third preset punctuation mark (such as a period) is input, an input cycle may be considered to have ended. For another example, after the input content is sent to the communication peer, an input cycle may be considered to have ended.

[0153] In an optional embodiment of the present invention, the above method may also include: caching the returned multiple sentence association candidates; in response to the user's on-screen operation on the first sentence association candidate, obtaining a second sentence association candidate matching the first sentence association candidate from the cache; and displaying the second sentence association candidate.

[0154] There may be multiple association candidates returned, and the multiple sentence association candidates differ in length or content.

[0155] For example, if the input content is "The moon shines brightly in front of the bed", the returned multiple sentence association candidates may include: "I wonder if it is frost on the ground", "I wonder if it is frost on the ground, I look up at the bright moon, I look down and think of my hometown", "Li Bai sleeps soundly", "Li Bai sleeps soundly, he looks up and hugs a beautiful woman, he looks down and dreams", etc. If the user puts the first sentence association candidate "Li Bai sleeps soundly" on the screen, the embodiment of the present invention can find the sentence association candidate "I look up and hug a beautiful woman, he looks down and dreams" that matches the first sentence association candidate from the cache, and provide "I look up and hug a beautiful woman" or "I look up and hug a beautiful woman, he looks down and dreams" as the second sentence association candidate to the user. Since the time and network resources consumed by sending sentence association requests can be saved, resources can be saved and input efficiency can be improved.

[0156] In summary, the input method of the embodiment of the present invention, when a pause event of a sentence is detected, can consider that the input content corresponds to a language unit with higher integrity. The language unit with higher integrity can be a sentence, a clause, or a sentence component such as a subject, a predicate, or an object.

[0157] The embodiment of the present invention uses sentence corpus training to obtain a sentence association model so that the sentence association model has a sentence-level association function. In this way, the embodiment of the present invention determines corresponding sentence association candidates for input content with high integrity based on the sentence association model, which can improve the correlation between the sentence association candidates and the input content, thereby improving input efficiency and enhancing user experience.

[0158] Method Example 2

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

[0160] Step 301, receiving a sentence association request sent by a client; the sentence association request is a request sent by the client when a pause event of a sentence is detected; the sentence association request may include: input content;

[0161] Step 302: Determine sentence association candidates corresponding to the sentence association request based on a sentence association model; the training data corresponding to the sentence association model may include: sentence corpus;

[0162] Step 303: Send the sentence association candidates to the client.

[0163] In an embodiment of the present invention, the server uses sentence corpus training to obtain a sentence association model so that the sentence association model has a sentence-level association function; and, based on the sentence association model, the server determines corresponding sentence association candidates for input content with higher integrity, which can improve the correlation between the sentence association candidates and the input content, thereby improving input efficiency and enhancing user experience.

[0164] In the embodiment of the present invention, the sentence corpus corresponding to the sentence association model may include: input corpus of an input method program, chat corpus of a communication platform, microblog corpus of a social platform, news corpus, or other Internet corpus.

[0165] In the embodiment of the present invention, optionally, the sentence corpus corresponding to the above application environment features can be used for different application environment features to obtain a sentence association model corresponding to the application environment features, so that different application environment features correspond to different sentence association models. The application environment features may include: WeChat, Weibo, Zhihu, etc.

[0166] In the embodiment of the present invention, different language style features can be optionally determined for different application environment features. For example, the language style features corresponding to the chat environment features include: spoken style, and the language style features corresponding to the writing environment features include: written style, etc. For example, under the chat environment features, the sentence association candidate is "there will be strong winds tomorrow", while under the environment features of writing a formal press release, the sentence association candidate is "there will be three to four strong winds today and tomorrow."

[0167] In the embodiment of the present invention, optionally, the sentence association model can describe multi-relation data.

[0168] Multivariate relational data can include binary and multi-gram relational data. A binary relation, also known as a 2-gram, is used to represent the probability of two sentences appearing one after another. A multi-gram relation is used to represent the probability of more than two sentences appearing one after another.

[0169] The embodiment of the present invention can search in the multivariate relational data according to the input content to obtain the hit element corresponding to the input content, and determine the sentence association candidate according to the hit element. For example, if the input content is "What are you doing", the hit element may include: "ignore me", "watch TV", "reply to the message so slowly", etc.

[0170] In an optional embodiment of the present invention, multivariate relational data can be represented by a data model. The types of data models may include, but are not limited to, language models, neural network models, etc. The above data model can provide P (any sentence|input content, ...), that is, the probability of any sentence under certain input content and other conditions. Based on this probability, the hit element corresponding to the input content can be determined. Among them, the corpus used by the data model may include: corpus under conditions such as input content.

[0171] Mathematical model is a scientific or engineering model constructed by mathematical logic methods and mathematical language. Mathematical model is a mathematical structure that is expressed in general or approximate terms using mathematical language with reference to the characteristics or quantitative dependencies of a certain system of things. This mathematical structure is a relational structure depicted with the help of mathematical symbols. Mathematical model can be one or a group of algebraic equations, differential equations, difference equations, integral equations or statistical equations and their combinations, which quantitatively or qualitatively describe the mutual relationship or causal relationship between the variables of the system. In addition to mathematical models described by equations, there are also models described by other mathematical tools, such as algebra, geometry, topology, mathematical logic, etc. Among them, mathematical models describe the behavior and characteristics of the system rather than the actual structure of the system. Among them, machine learning, deep learning methods and other methods can be used to train mathematical models. Machine learning methods may include: linear regression, decision tree, random forest, etc. Deep learning methods may include: convolutional neural networks (CNN), long short-term memory networks (LSTM), gated recurrent units (GRU), etc.

[0172] Optionally, the conditions of the data model may also include: input environment characteristics. In this case, the data model may provide P (any sentence|input content, input environment characteristics, ...).

[0173] Optionally, the conditions of the data model may further include: the context of the input content. In this case, the data model may provide P (any sentence|input content, context of the input content, ...).

[0174] Optionally, the conditions of the data model may further include: user characteristics, and the user characteristics may include: local user characteristics and / or opposite user characteristics.

[0175] Optionally, the data model may provide P(arbitrary sentence|input content, context of input content, user features, ...).

[0176] In an optional embodiment of the present invention, the above-mentioned determination of sentence association candidates corresponding to the above-mentioned sentence association request may specifically include: determining a target language style corresponding to the above-mentioned sentence association request; and determining sentence association candidates corresponding to the above-mentioned sentence association request using a sentence association model corresponding to the above-mentioned target language style.

[0177] The embodiment of the present invention can set different sentence association models for different target language styles. In this way, the target language style corresponding to the sentence association request can be determined based on information such as the characteristics of the opposite end user; then, the sentence association candidate corresponding to the sentence association request can be determined using the sentence association model corresponding to the target language style.

[0178] In another optional embodiment of the present invention, the sentence association model determines the target language style corresponding to the sentence association request, and determines the sentence association candidates corresponding to the sentence association request based on the target language style.

[0179] The embodiment of the present invention may not differentiate the sentence association model according to the target language style, but the sentence association model may first determine the target language style corresponding to the sentence association request during the processing of the sentence association request, and then determine the sentence association candidate corresponding to the sentence association request based on the target language style.

[0180] In one embodiment of the present invention, the sentence association model includes: a mapping relationship between the second vector and the sentence association candidate;

[0181] The above-mentioned determination of the sentence association candidate corresponding to the sentence association request specifically includes: determining the first vector corresponding to the sentence association request; based on the first vector, searching in the mapping relationship between the second vector and the sentence association candidate to obtain the sentence association candidate corresponding to the first vector; the mapping relationship is obtained based on the sentence corpus, and the sentence corpus includes: a previous sample and a sentence association candidate, and the second vector corresponds to the previous sample.

[0182] The embodiment of the present invention obtains sentence association candidates corresponding to a sentence association request based on vector retrieval; the first vector and the second vector can be matched based on the distance between the first vector and the second vector in space, and the sentence association candidate corresponding to the second vector matching the first vector is used as the sentence association candidate corresponding to the sentence association request. In this way, the first vector and the second vector are not required to be strictly consistent in terms of text, so the coverage of the sentence association candidates can be increased.

[0183] For example, the sentence corpus includes: the above sample A "Can I talk to you?" and the sentence association candidate "I want to hear your voice". In the case that the user's above sample a is "Can I talk to you?", the embodiment of the present invention can determine that the first vector matches the second vector based on the spatial distance between the first vector and the second vector, and then provide the corresponding sentence association candidate "I want to hear your voice".

[0184] According to an embodiment, the first vector may be matched with all second vectors corresponding to all sentence corpora. Specifically, the distance between the first vector and all second vectors may be calculated, and the second vector whose distance is less than a first distance threshold may be used as the second vector matching the first vector.

[0185] The measurement method of the distance between vectors may include: Euclidean distance, angle cosine, Hamming distance, or Jaccard similarity coefficient, etc. It can be understood that the embodiment of the present invention does not limit the specific measurement method of the distance between vectors.

[0186] According to another embodiment, the above-mentioned retrieval is performed in the mapping relationship between the second vector and the sentence association candidate, specifically including: determining the target index corresponding to the above-mentioned first vector based on the index of the above-mentioned first vector and the above-mentioned second vector; determining the sentence association candidate corresponding to the above-mentioned first vector based on the above-mentioned first vector and the second vector corresponding to the above-mentioned target index.

[0187] The embodiment of the present invention can pre-establish the index of the second vector; thus, in the vector search process, the target index corresponding to the first vector can be first determined, and then the first vector and the second vector corresponding to the target index can be matched. Since the matching operation of the second vector corresponding to the non-target index can be saved, the vector search efficiency can be improved.

[0188] Here, an example of establishing an index of a second vector is provided, which specifically includes: clustering a plurality of second vectors to obtain a plurality of vector categories; and establishing an index of the second vector within the vector category according to information of the vector category.

[0189] The information of the vector category may include: the center vector of the vector category. Accordingly, the above-mentioned determination of the target index corresponding to the above-mentioned first vector specifically includes: determining the target vector category corresponding to the above-mentioned first vector according to the distance between the above-mentioned first vector and the center vector corresponding to the above-mentioned vector category. Optionally, the vector category with a distance less than the second distance threshold can be used as the target vector category corresponding to the first vector, and the target vector category corresponds to the target index.

[0190] In another optional embodiment of the present invention, the method may further include: sending cloud resource information to the client, so that the client determines whether to send a sentence association request according to the cloud resource information.

[0191] According to one embodiment, when a sending operation for input content is detected, the client can determine a preset character range based on cloud resource information.

[0192] According to another embodiment, when an input operation for a first preset punctuation mark is detected, the client can determine which combinations among preset conditions B1 to B5 to adopt based on cloud resource information.

[0193] In summary, the input method according to the embodiments of the present invention constructs a sentence association model based on big data sentence corpus, can provide sentence association candidates with higher relevance to the user's input content, and can bring a more convenient and intelligent input experience to the user.

[0194] The embodiments of the present invention can provide sentence association candidates for the following scenarios: a. when the user completes the input of a language unit and inputs a preset punctuation mark; b. after the user sends the input content in a communication scenario.

[0195] The embodiments of the present invention can, when receiving the user's input string, screen the candidates corresponding to the input string based on the sentence association candidates. For example, if the user's previous input a is "Can I have a voice chat with you?", and the input string is "xiangtignting", the candidates corresponding to the input string "xiangtignting" specifically include: "想听听 (want to listen)", "像亭亭 (like Tingting)", "向婷婷 (Xiang Tingting)", etc.; since "想听听 (want to listen)" matches the sentence association candidate, the sorting score of "想听听 (want to listen)" can be increased to place "想听听 (want to listen)" in a more prominent position.

[0196] The embodiments of the present invention can, when receiving the user's input string, screen the sentence association candidates based on the input string to obtain the target association candidate corresponding to the input string. For example, if the user's previous input a is "Can I have a voice chat with you?", the sentence association candidate A "I want to hear your voice" and the sentence association candidate B "want to listen to your voice" can be screened based on the input string "xiangtignting", and the obtained sentence association candidate B can be used as the target association candidate.

[0197] The embodiments of the present invention screen the candidates corresponding to the input string based on the sentence association candidates, or screen the sentence association candidates based on the input string, specifically including: matching the input string with the sentence association candidates and performing a screening operation based on the corresponding matching information.

[0198] Optionally, the input string matches the sentence association candidate, and the corresponding matching condition may be: the encoding corresponding to the sentence association candidate includes the encoding corresponding to the input string. In other words, the encoding corresponding to the input string is the complete set or subset of the encoding corresponding to the sentence association candidate. For example, the input string "xiangtignting" matches the sentence association candidate B "want to hear your voice", while the input string "woxiangni" does not match the sentence association candidate B "want to hear your voice".

[0199] In an embodiment of the present invention, optionally, the number of characters corresponding to the input string may be greater than a first threshold. For example, the first threshold is 2, etc. That is, there are at least 3 characters with the same code between the input string and the sentence association candidate. Of course, the specific first threshold in the embodiment of the present invention is not limited.

[0200] In an embodiment of the present invention, optionally, the input string may match the starting character of the sentence association candidate. Of course, the input string may match the middle character of the sentence association candidate.

[0201] It should be noted that for the method embodiments, for simplicity of description, they are all expressed as a series of combinations of movement actions. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the movement actions involved are not necessarily essential for the embodiments of the present invention.

[0202] Device embodiment

[0203] Referring to Figure 4 , a structural block diagram of an input device embodiment of the present invention is shown, which may specifically include:

[0204] A detection module 401, configured to detect a pause event of a sentence during the input process;

[0205] A sending module 402, configured to send a sentence association request to the server if a pause event of the sentence is detected; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to the sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and

[0206] A sentence association candidate display module 403, configured to display the sentence association candidates returned by the server.

[0207] Optionally, the pause event of the sentence may include:

[0208] Detecting an input operation for a first preset punctuation mark; and / or

[0209] A send operation was detected for input.

[0210] Optionally, the device may further include:

[0211] The punctuation candidate display module is used to display the candidate corresponding to the first preset punctuation mark in the candidate area before displaying the sentence association candidates returned by the server if an input operation for the first preset punctuation mark is detected.

[0212] Optionally, the device may further include:

[0213] The judgment module is used to judge whether to send a sentence association request to the server side according to punctuation marks contained in the input content, and / or the number of characters that can be included in the input content, and / or whether the previous sentence association candidate is selected, if a pause event of the sentence is detected before the sentence association request is sent to the server side.

[0214] Optionally, if a sending operation for the input content is detected, and the beginning of the sentence of the input content may include a preset character, then no sentence association request is sent to the server; and / or

[0215] If a sending operation for the input content is detected, and the input content cannot include characters of the preset language, then no sentence association request is sent to the server; and / or

[0216] If a sending operation for the input content is detected, and the input content may include entity words of a preset category, then no sentence association request is sent to the server; and / or

[0217] If a sending operation for the input content is detected and the previous sentence association candidate is selected, a sentence association request is sent to the server; and / or

[0218] If a sending operation for the input content is detected, and the number of characters that can be included in the input content is within a preset character range, a sentence association request is sent to the server.

[0219] Optionally, the preset character range is obtained based on cloud resource information of the server.

[0220] Optionally, the sending module is specifically configured to send a sentence association request to the server when an input operation for a first preset punctuation mark is detected and if the input content meets a preset condition;

[0221] The preset conditions may include:

[0222] The input content consists of characters and punctuation marks in a preset language, the last character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the last character of the input content does not exceed a first threshold; and / or

[0223] The number of characters that the input content may include does not exceed a second threshold; and / or

[0224] The input content may include entity words of a preset category; and / or

[0225] The previous sentence association candidate is selected; and / or.

[0226] The number of characters before the preset punctuation mark in the input content exceeds a third threshold.

[0227] Optionally, the sentence association request may further include: context corresponding to the input content, and / or input environment characteristics, and / or user characteristics.

[0228] Optionally, the sentence association candidate is obtained according to a language style feature corresponding to the sentence association request.

[0229] Optionally, the sentence association candidates may include: input content and prediction results;

[0230] Then the sentence association display module may include:

[0231] The distinguishing display module is used to display the input content in the sentence association candidate using a first display method; and to display the prediction result in the sentence association candidate using a second display method.

[0232] Optionally, the device may further include:

[0233] A first cache module, used for caching the returned sentence association candidates;

[0234] A first matching module is used to obtain, from a cache, target sentence association candidates that match an input string of a user;

[0235] The first display module is used to display the target sentence association candidates.

[0236] Optionally, the device may further include:

[0237] A second cache module is used to cache the returned multiple sentence association candidates;

[0238] A second matching module, configured to obtain, in response to a user's on-screen operation on a first sentence association candidate, a second sentence association candidate matching the first sentence association candidate from a cache;

[0239] The second display module is used to display the second sentence association candidates.

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

[0241] The receiving module 501 is used to receive a sentence association request sent by a client; the sentence association request is a request sent by the client when a pause event of a sentence is detected; the sentence association request includes: input content;

[0242] The sentence association candidate determination module 502 is used to determine the sentence association candidate corresponding to the sentence association request according to the sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and

[0243] The sending module 503 is used to send the sentence association candidates to the client.

[0244] Optionally, determining the sentence association candidate corresponding to the sentence association request may include:

[0245] Determining a target language style corresponding to the sentence association request;

[0246] The sentence association candidate corresponding to the sentence association request is determined by using the sentence association model corresponding to the target language style.

[0247] Optionally, the sentence association model determines a target language style corresponding to the sentence association request, and determines a sentence association candidate corresponding to the sentence association request according to the target language style.

[0248] Optionally, the sentence association model may include: a mapping relationship between the second vector and the sentence association candidate;

[0249] The sentence association candidate determination module may include:

[0250] A vector determination module, used to determine a first vector corresponding to the sentence association request;

[0251] A vector retrieval module is used to search, based on the first vector, in the mapping relationship between the second vector and the sentence association candidate to obtain the sentence association candidate corresponding to the first vector; the mapping relationship is obtained based on a sentence corpus, and the sentence corpus may include: a previous sample and a sentence association candidate, and the second vector corresponds to the previous sample.

[0252] Optionally, the vector retrieval module may include:

[0253] a target index determination module, configured to determine a target index corresponding to the first vector according to the indexes of the first vector and the second vector;

[0254] An association determination module is used to determine a sentence association candidate corresponding to the first vector based on the first vector and a second vector corresponding to the target index.

[0255] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0256] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0257] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0258] An embodiment of the present invention provides a device for input, including 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 include instructions for performing the following operations: during the input process, detecting a pause event of a sentence; if a pause event of a sentence is detected, sending a sentence association request to a server; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request based on a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and displaying the sentence association candidates returned by the server.

[0259] Figure 6 8 is a block diagram of an input device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0260] Reference Figure 6 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0261] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0262] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0263] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0264] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0265] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice input mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0266] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0267] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0268] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 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 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID, Radio Frequency Identification) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0269] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0270] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0271] Figure 7 1 is a schematic diagram of the structure of the server in some embodiments of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 can be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0272] 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 and output interfaces 1958, one or more keyboards 1956, and / or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0273] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to perform Figure 2 or Figure 3 Input method shown.

[0274] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a device (server or terminal), enables the device to execute an input method, the method comprising: detecting a pause event of a sentence during the input process; if a pause event of a sentence is detected, sending a sentence association request to a server; the sentence association request comprises: input content, so that the server determines a sentence association candidate corresponding to the sentence association request based on a sentence association model; the training data corresponding to the sentence association model comprises: sentence corpus; and displaying the sentence association candidates returned by the server.

[0275] The embodiment of the present invention discloses A1, an input method, the method comprising:

[0276] During the input process, the pause events of the sentence are detected;

[0277] If a pause event of a sentence is detected, a sentence association request is sent to the server; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0278] The sentence association candidates returned by the server are displayed.

[0279] A2. According to the method of A1, the pause event of the sentence includes:

[0280] An input operation for a first preset punctuation mark is detected; and / or

[0281] A send operation was detected for input.

[0282] A3. The method according to A1, further comprising:

[0283] If an input operation for a first preset punctuation mark is detected, before displaying the sentence association candidates returned by the server, the candidate corresponding to the first preset punctuation mark is displayed in the candidate area.

[0284] A4. According to the method described in A1, before sending the sentence association request to the server, the method further includes:

[0285] If a sentence pause event is detected, it is determined whether to send a sentence association request to the server based on punctuation marks contained in the input content, and / or the number of characters included in the input content, and / or whether the previous sentence association candidate is selected.

[0286] A5. According to the method described in A1, if a sending operation for the input content is detected and the beginning of the sentence of the input content includes a preset character, then no sentence association request is sent to the server; and / or

[0287] If a sending operation for the input content is detected and the input content does not include characters of the preset language, then no sentence association request is sent to the server; and / or

[0288] If a sending operation for the input content is detected, and the input content includes entity words of a preset category, then no sentence association request is sent to the server; and / or

[0289] If a sending operation for the input content is detected and the previous sentence association candidate is selected, a sentence association request is sent to the server; and / or

[0290] If a sending operation for the input content is detected and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server.

[0291] A6. According to the method described in A5, the preset character range is obtained based on the cloud resource information of the server.

[0292] A7. According to the method described in A1, sending a sentence association request to the server includes:

[0293] When an input operation for a first preset punctuation mark is detected, if the input content meets the preset condition, a sentence association request is sent to the server;

[0294] The preset conditions include:

[0295] The input content consists of characters and punctuation marks in a preset language, the last character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the last character of the input content does not exceed a first threshold; and / or

[0296] The number of characters included in the input content does not exceed a second threshold; and / or

[0297] The input content includes entity words of a preset category; and / or

[0298] The previous sentence association candidate is selected; and / or.

[0299] The number of characters before the preset punctuation mark in the input content exceeds a third threshold.

[0300] A8. According to the method described in A1, the sentence association request also includes: context corresponding to the input content, and / or input environment characteristics, and / or user characteristics.

[0301] A9. According to any one of the methods described in A1 to A8, the sentence association candidate is obtained based on the language style features corresponding to the sentence association request.

[0302] A10. According to any one of the methods described in A1 to A8, the sentence association candidates include: input content and prediction results;

[0303] Then, displaying the sentence association candidates returned by the server includes:

[0304] The input content in the sentence association candidate is displayed using a first display method; and the prediction result in the sentence association candidate is displayed using a second display method.

[0305] A11. The method according to any one of A1 to A8, further comprising:

[0306] Cache the returned sentence association candidates;

[0307] For a user input string, obtaining a target sentence association candidate matching the input string from a cache;

[0308] The target sentence association candidates are displayed.

[0309] A12. The method according to any one of A1 to A8, further comprising:

[0310] Cache the returned multiple sentence association candidates;

[0311] In response to a user's on-screen operation on a first sentence association candidate, obtaining a second sentence association candidate matching the first sentence association candidate from a cache;

[0312] The second sentence association candidates are displayed.

[0313] The embodiment of the present invention discloses B13, an input method, the method comprising:

[0314] receiving a sentence association request sent by a client; the sentence association request is a request sent by the client when a pause event of a sentence is detected; the sentence association request includes: input content;

[0315] Determining sentence association candidates corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0316] The sentence association candidates are sent to the client.

[0317] B14. According to the method of B13, determining the sentence association candidate corresponding to the sentence association request includes:

[0318] Determining a target language style corresponding to the sentence association request;

[0319] The sentence association candidate corresponding to the sentence association request is determined by using the sentence association model corresponding to the target language style.

[0320] B15. According to the method described in B13, the sentence association model determines the target language style corresponding to the sentence association request, and determines the sentence association candidates corresponding to the sentence association request based on the target language style.

[0321] B16. According to any one of the methods described in B13 to B15, the sentence association model comprises: a mapping relationship between the second vector and the sentence association candidate;

[0322] The determining the sentence association candidate corresponding to the sentence association request includes:

[0323] Determining a first vector corresponding to the sentence association request;

[0324] According to the first vector, a search is performed in the mapping relationship between the second vector and the sentence association candidate to obtain the sentence association candidate corresponding to the first vector; the mapping relationship is obtained based on a sentence corpus, and the sentence corpus includes: a previous sample and a sentence association candidate, and the second vector corresponds to the previous sample.

[0325] B17. According to the method of B16, searching in the mapping relationship between the second vector and the sentence association candidate includes:

[0326] Determining a target index corresponding to the first vector according to the indexes of the first vector and the second vector;

[0327] A sentence association candidate corresponding to the first vector is determined according to the first vector and a second vector corresponding to the target index.

[0328] The embodiment of the present invention discloses C18, an input device, comprising:

[0329] A detection module, used to detect pause events of sentences during input;

[0330] A sending module is used to send a sentence association request to a server if a pause event of a sentence is detected; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and

[0331] The sentence association candidate display module is used to display the sentence association candidates returned by the server.

[0332] C19. According to the apparatus of C18, the pause event of the sentence comprises:

[0333] An input operation for a first preset punctuation mark is detected; and / or

[0334] A send operation was detected for input.

[0335] C20. The device according to C18, further comprising:

[0336] The punctuation candidate display module is used to display the candidate corresponding to the first preset punctuation mark in the candidate area before displaying the sentence association candidates returned by the server if an input operation for the first preset punctuation mark is detected.

[0337] C21. The device according to C18, further comprising:

[0338] The judgment module is used to judge whether to send a sentence association request to the server side according to punctuation marks contained in the input content, and / or the number of characters included in the input content, and / or whether the previous sentence association candidate is selected, if a pause event of the sentence is detected before the sentence association request is sent to the server side.

[0339] C22. The apparatus according to C18, if a sending operation for the input content is detected and the beginning of the sentence of the input content includes a preset character, then no sentence association request is sent to the server; and / or

[0340] If a sending operation for the input content is detected and the input content does not include characters of the preset language, then no sentence association request is sent to the server; and / or

[0341] If a sending operation for the input content is detected, and the input content includes entity words of a preset category, then no sentence association request is sent to the server; and / or

[0342] If a sending operation for the input content is detected and the previous sentence association candidate is selected, a sentence association request is sent to the server; and / or

[0343] If a sending operation for the input content is detected and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server.

[0344] C23. According to the device described in C22, the preset character range is obtained based on the cloud resource information of the server.

[0345] C24. According to the device described in C18, the sending module is specifically configured to send a sentence association request to the server when an input operation for a first preset punctuation mark is detected and if the input content meets a preset condition;

[0346] The preset conditions include:

[0347] The input content consists of characters and punctuation marks in a preset language, the last character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the last character of the input content does not exceed a first threshold; and / or

[0348] The number of characters included in the input content does not exceed a second threshold; and / or

[0349] The input content includes entity words of a preset category; and / or

[0350] The previous sentence association candidate is selected; and / or.

[0351] The number of characters before the preset punctuation mark in the input content exceeds a third threshold.

[0352] C25. According to the device described in C18, the sentence association request also includes: the context corresponding to the input content, and / or, input environment characteristics, and / or, user characteristics.

[0353] C26. According to any one of the apparatuses described in C18 to C25, the sentence association candidates are obtained based on language style features corresponding to the sentence association request.

[0354] C27. According to any one of C18 to C25, the sentence association candidates include: input content and prediction results;

[0355] Then the sentence association display module includes:

[0356] The distinguishing display module is used to display the input content in the sentence association candidate using a first display method; and to display the prediction result in the sentence association candidate using a second display method.

[0357] C28. The device according to any one of C18 to C25, further comprising:

[0358] A first cache module, used for caching the returned sentence association candidates;

[0359] A first matching module is used to obtain, from a cache, target sentence association candidates that match an input string of a user;

[0360] The first display module is used to display the target sentence association candidates.

[0361] C29. The device according to any one of C18 to C25, further comprising:

[0362] A second cache module is used to cache the returned multiple sentence association candidates;

[0363] A second matching module, configured to obtain, in response to a user's on-screen operation on a first sentence association candidate, a second sentence association candidate matching the first sentence association candidate from a cache;

[0364] The second display module is used to display the second sentence association candidates.

[0365] The embodiment of the present invention discloses D30, an input device, comprising:

[0366] The receiving module is used to receive a sentence association request sent by a client; the sentence association request is a request sent by the client when a pause event of a sentence is detected; the sentence association request includes: input content;

[0367] A sentence association candidate determination module is used to determine the sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and

[0368] The sending module is used to send the sentence association candidates to the client.

[0369] D31. According to the device described in D30, determining the sentence association candidate corresponding to the sentence association request includes:

[0370] Determining a target language style corresponding to the sentence association request;

[0371] The sentence association candidate corresponding to the sentence association request is determined by using the sentence association model corresponding to the target language style.

[0372] D32. According to the device described in D30, the sentence association model determines the target language style corresponding to the sentence association request, and determines the sentence association candidates corresponding to the sentence association request based on the target language style.

[0373] D33. According to any one of the apparatuses described in D30 to D32, the sentence association model comprises: a mapping relationship between the second vector and the sentence association candidate;

[0374] The sentence association candidate determination module comprises:

[0375] A vector determination module, used to determine a first vector corresponding to the sentence association request;

[0376] A vector retrieval module is used to search, based on the first vector, in the mapping relationship between the second vector and the sentence association candidate to obtain the sentence association candidate corresponding to the first vector; the mapping relationship is obtained based on a sentence corpus, the sentence corpus includes: a previous sample and a sentence association candidate, and the second vector corresponds to the previous sample.

[0377] D34. According to the device described in D33, the vector retrieval module includes:

[0378] a target index determination module, configured to determine a target index corresponding to the first vector according to the indexes of the first vector and the second vector;

[0379] An association determination module is used to determine a sentence association candidate corresponding to the first vector based on the first vector and a second vector corresponding to the target index.

[0380] The embodiment of the present invention discloses E35, a device for input, 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, and the one or more programs include instructions for performing the following operations:

[0381] During the input process, the pause events of the sentence are detected;

[0382] If a pause event of a sentence is detected, a sentence association request is sent to the server; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0383] The sentence association candidates returned by the server are displayed.

[0384] E36. According to the apparatus of E35, the pause event of the sentence comprises:

[0385] An input operation for a first preset punctuation mark is detected; and / or

[0386] A send operation was detected for input.

[0387] E37. The device according to E35, further comprising:

[0388] If an input operation for a first preset punctuation mark is detected, before displaying the sentence association candidates returned by the server, the candidate corresponding to the first preset punctuation mark is displayed in the candidate area.

[0389] E38. According to the device of E35, before sending the sentence association request to the server, the device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0390] If a sentence pause event is detected, it is determined whether to send a sentence association request to the server based on punctuation marks contained in the input content, and / or the number of characters included in the input content, and / or whether the previous sentence association candidate is selected.

[0391] E39. The apparatus according to E35, if a sending operation for the input content is detected and the beginning of the sentence of the input content includes a preset character, then the sentence association request is not sent to the server; and / or

[0392] If a sending operation for the input content is detected and the input content does not include characters of the preset language, then no sentence association request is sent to the server; and / or

[0393] If a sending operation for the input content is detected, and the input content includes entity words of a preset category, then no sentence association request is sent to the server; and / or

[0394] If a sending operation for the input content is detected and the previous sentence association candidate is selected, a sentence association request is sent to the server; and / or

[0395] If a sending operation for the input content is detected and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server.

[0396] E40. According to the device described in E39, the preset character range is obtained based on the cloud resource information of the server.

[0397] E41. According to the apparatus of E35, the sending of the sentence association request to the server comprises:

[0398] When an input operation for a first preset punctuation mark is detected, if the input content meets the preset condition, a sentence association request is sent to the server;

[0399] The preset conditions include:

[0400] The input content consists of characters and punctuation marks in a preset language, the last character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the last character of the input content does not exceed a first threshold; and / or

[0401] The number of characters included in the input content does not exceed a second threshold; and / or

[0402] The input content includes entity words of a preset category; and / or

[0403] The previous sentence association candidate is selected; and / or.

[0404] The number of characters before the preset punctuation mark in the input content exceeds a third threshold.

[0405] E42. According to the device described in E35, the sentence association request also includes: the context corresponding to the input content, and / or, input environment characteristics, and / or, user characteristics.

[0406] E43. According to any one of the devices described in E35 to E42, the sentence association candidates are obtained based on language style features corresponding to the sentence association request.

[0407] E44. According to any one of the apparatuses of E35 to E42, the sentence association candidates include: input content and prediction results;

[0408] Then, displaying the sentence association candidates returned by the server includes:

[0409] The input content in the sentence association candidate is displayed using a first display method; and the prediction result in the sentence association candidate is displayed using a second display method.

[0410] E45. The device according to any one of E35 to E42, wherein the device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0411] Cache the returned sentence association candidates;

[0412] For a user input string, obtaining a target sentence association candidate matching the input string from a cache;

[0413] The target sentence association candidates are displayed.

[0414] E46. The device according to any one of E35 to E42, wherein the device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0415] Cache the returned multiple sentence association candidates;

[0416] In response to a user's on-screen operation on a first sentence association candidate, obtaining a second sentence association candidate matching the first sentence association candidate from a cache;

[0417] The second sentence association candidates are displayed.

[0418] The embodiment of the present invention discloses F47, a device for input, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:

[0419] receiving a sentence association request sent by a client; the sentence association request is a request sent by the client when a pause event of a sentence is detected; the sentence association request includes: input content;

[0420] Determining sentence association candidates corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus;

[0421] The sentence association candidates are sent to the client.

[0422] F48. According to the method described in F47, determining the sentence association candidate corresponding to the sentence association request includes:

[0423] Determining a target language style corresponding to the sentence association request;

[0424] The sentence association candidate corresponding to the sentence association request is determined by using the sentence association model corresponding to the target language style.

[0425] F49. According to the method described in F48, the sentence association model determines the target language style corresponding to the sentence association request, and determines the sentence association candidates corresponding to the sentence association request based on the target language style.

[0426] F50. According to any one of the methods described in F47 to F49, the sentence association model comprises: a mapping relationship between the second vector and the sentence association candidate;

[0427] The determining the sentence association candidate corresponding to the sentence association request includes:

[0428] Determining a first vector corresponding to the sentence association request;

[0429] According to the first vector, a search is performed in the mapping relationship between the second vector and the sentence association candidate to obtain the sentence association candidate corresponding to the first vector; the mapping relationship is obtained based on a sentence corpus, and the sentence corpus includes: a previous sample and a sentence association candidate, and the second vector corresponds to the previous sample.

[0430] F51. According to the method described in F50, searching in the mapping relationship between the second vector and the sentence association candidate includes:

[0431] Determining a target index corresponding to the first vector according to the indexes of the first vector and the second vector;

[0432] A sentence association candidate corresponding to the first vector is determined according to the first vector and a second vector corresponding to the target index.

[0433] An embodiment of the present invention discloses G52, a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes the device to execute the input method as described in one or more of A1 to A12.

[0434] The embodiment of the present invention discloses H53, a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes the device to perform the input method described in one or more of B13 to B17.

[0435] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0436] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

[0437] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0438] The above is a detailed introduction to an input method, an input device and a device for input provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An input method, characterized in that: The method comprises: During the input process, a pause event of the sentence is detected; the pause event of the sentence includes: detecting a sending operation for the input content, and / or detecting an input operation for a first preset punctuation mark; If a pause event of a sentence is detected, a sentence association request is sent to a server according to a sending condition; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; Displaying the sentence association candidates returned by the server; If a pause event of a sentence is detected, a sentence association request is sent to the server according to the sending condition, including: If a sending operation for the input content is detected, and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server; the preset character range is obtained according to the cloud resource information of the server, and the cloud resource information is represented by a cloud resource level. The smaller the value corresponding to the cloud resource level is, the less the cloud resource information is represented, and the smaller the character range represented by the preset character range is; If an input operation for a first preset punctuation mark is detected, and if the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters and punctuation marks of a preset language, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset conditions are determined according to the cloud resource level, and the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined based on the cloud resource information.

2. The method according to claim 1, characterized in that The method further comprises: If an input operation for a first preset punctuation mark is detected, before displaying the sentence association candidates returned by the server, the candidate corresponding to the first preset punctuation mark is displayed in the candidate area.

3. An input method, characterized in that: The method comprises: Receive a sentence association request sent by a client; the sentence association request is a request sent by the client according to a sending condition when a pause event of a sentence is detected; the sentence association request includes: input content; the pause event of the sentence includes: detecting a sending operation for the input content, and / or detecting an input operation for a first preset punctuation mark; the client is specifically used to send a sentence association request to the server according to the sending condition if a pause event of the sentence is detected, including: if a sending operation for the input content is detected, and the number of characters included in the input content is within a preset character range, then a sentence association request is sent to the server; the preset character range is obtained based on the cloud resource information of the server, and the cloud resource information is represented by the cloud resource level. The smaller the value corresponding to the cloud resource level, the more lacking the cloud resource information is, and the preset The smaller the character range represented by the character range; if an input operation for a first preset punctuation mark is detected, if the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters and punctuation marks of a preset language, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset conditions are determined according to the cloud resource level, the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined according to the cloud resource information; Determine sentence association candidates corresponding to the sentence association request according to the sentence association model, and provide different sentence association candidates for different language style features; the training data corresponding to the sentence association model includes: sentence corpus; The sentence association candidates are sent to the client.

4. An input device, characterized in that: include: A detection module, used to detect pause events of sentences during input; The sending module is used to send a sentence association request to the server according to the sending conditions if a pause event of the sentence is detected; The sentence association request includes: input content, so that the server determines the sentence association candidate corresponding to the sentence association request according to the sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; and A sentence association candidate display module, used to display the sentence association candidates returned by the server; The pause event of the sentence includes: detecting a sending operation for input content, and / or detecting an input operation for a first preset punctuation mark; Among them, if a pause event of a sentence is detected, a sentence association request is sent to the server according to the sending conditions, including: if a sending operation for input content is detected, and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server; and / or if a sending operation for input content is detected, and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server; the preset character range is obtained based on the cloud resource information of the server, and the cloud resource information is represented by the cloud resource level. The smaller the numerical value corresponding to the cloud resource level, the more lacking the cloud resource information is, and the smaller the character range represented by the preset character range is; if an input operation for a first preset punctuation mark is detected, if If the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters and punctuation marks in a preset language, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset conditions are determined according to the cloud resource level, and the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined according to the cloud resource information.

5. An input device, characterized in that: include: A receiving module, used for receiving a sentence association request sent by a client; The sentence association request is a request sent by the client according to a sending condition when a pause event of a sentence is detected; The sentence association request includes: input content; the pause event of the sentence includes: detecting a sending operation for the input content, and / or detecting an input operation for a first preset punctuation mark; the client is specifically used to send a sentence association request to the server according to the sending conditions if a sentence pause event is detected, including: if a sending operation for the input content is detected, and the number of characters included in the input content is within a preset character range, then sending a sentence association request to the server; the preset character range is obtained based on the cloud resource information of the server, and the cloud resource information is represented by the cloud resource level. The smaller the value corresponding to the cloud resource level, the more lacking the cloud resource information is, and the smaller the character range represented by the preset character range is; if a first preset punctuation mark is detected, A symbol input operation, if the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters and punctuation marks of a preset language, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset conditions are determined according to the cloud resource level, the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined according to the cloud resource information; A sentence association candidate determination module is used to determine the sentence association candidate corresponding to the sentence association request according to the sentence association model, and provide different sentence association candidates for different language style features; the training data corresponding to the sentence association model includes: sentence corpus; and The sending module is used to send the sentence association candidates to the client.

6. A device for input, characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: During the input process, a pause event of the sentence is detected; the pause event of the sentence includes: detecting a sending operation for the input content, and / or detecting an input operation for a first preset punctuation mark; If a pause event of a sentence is detected, a sentence association request is sent to a server according to a sending condition; the sentence association request includes: input content, so that the server determines a sentence association candidate corresponding to the sentence association request according to a sentence association model; the training data corresponding to the sentence association model includes: sentence corpus; Displaying the sentence association candidates returned by the server; If a pause event of a sentence is detected, a sentence association request is sent to the server according to the sending condition, including: If a sending operation for input content is detected, and the number of characters included in the input content is within a preset character range, a sentence association request is sent to the server; the preset character range is obtained based on the cloud resource information of the server, and the cloud resource information is represented by a cloud resource level. The smaller the value corresponding to the cloud resource level, the less cloud resource information is represented, and the smaller the character range represented by the preset character range is; if an input operation for a first preset punctuation mark is detected, if the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters of a preset language and punctuation marks, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset condition is determined according to the cloud resource level, the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined according to the cloud resource information.

7. A device for input, characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: receiving a sentence association request sent by a client; the sentence association request is a request sent by the client according to a sending condition when a pause event of a sentence is detected; The sentence association request includes: input content; the pause event of the sentence includes: detecting a sending operation for the input content, and / or detecting an input operation for a first preset punctuation mark; the client is specifically used to send a sentence association request to the server according to the sending conditions if a sentence pause event is detected, including: if a sending operation for the input content is detected, and the number of characters included in the input content is within a preset character range, then sending a sentence association request to the server; the preset character range is obtained based on the cloud resource information of the server, and the cloud resource information is represented by the cloud resource level. The smaller the value corresponding to the cloud resource level, the more lacking the cloud resource information is, and the smaller the character range represented by the preset character range is; if a first preset punctuation mark is detected, A symbol input operation, if the input content meets the preset conditions, a sentence association request is sent to the server; the preset conditions include: the input content consists of characters and punctuation marks of a preset language, and the end character of the input content is a second preset punctuation mark, and the number of consecutive punctuation marks contained in the end character of the input content does not exceed a first threshold; and / or the number of characters in the input content does not exceed a second threshold; and / or the previous sentence association candidate is selected; and / or the input content includes entity words of a preset category; and / or the number of characters before the preset punctuation mark in the input content exceeds a third threshold; the preset conditions are determined according to the cloud resource level, the cloud resource level represents the sufficiency of the cloud resource information, and the preset conditions are combined according to the cloud resource information; Determine sentence association candidates corresponding to the sentence association request according to the sentence association model, and provide different sentence association candidates for different language style features; the training data corresponding to the sentence association model includes: sentence corpus; The sentence association candidates are sent to the client.

8. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, cause an apparatus to perform an input method as claimed in one or more of claims 1 to 2.

9. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, cause a device to perform the input method of claim 3.

Citation Information

Patent Citations

  • Input method, input device and device for input

    CN108803890A

  • Association method, device, apparatus and readable storage medium of input method

    CN109634436A

  • Association method and device and electronic device

    CN110096165A