Request processing method, device and medium

By judging the characteristics of the word candidates and local associative candidates of the input string in the input method system, it is determined whether to send a cloud association request, which solves the problem that the client local candidates cannot meet user needs and improves the accuracy of cloud association requests.

CN115437509BActive Publication Date: 2025-03-28BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110609038.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-01
Publication Date
2025-03-28
Estimated Expiration
2041-06-01

AI Technical Summary

Technical Problem

When the quality of the corresponding word candidates for the input string is high, the local candidates provided by the client may not be able to meet user needs, resulting in insufficient accuracy of cloud Lenovo request processing.

Method used

By determining the word candidate corresponding to the input string and the local associative candidate corresponding to the input string above, and determining whether to send a cloud associative request based on the generalization tag type of the word candidate hit, the generalization tag type of the local associative candidate hit, and the probability information of the local associative candidate.

Benefits of technology

This improves the accuracy of cloud Lenovo request processing, ensuring that when local candidates cannot meet user needs, cloud resources can be effectively utilized to provide more accurate association candidates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437509B_ABST
    Figure CN115437509B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a request processing method, device and medium. The method specifically includes: determining the word candidates corresponding to the input string, and / or determining the local association candidates corresponding to the above context and the input string; judging whether to send a cloud association request based on the type of generalized label hit by the word candidate, and / or based on the type of generalized label hit by the local association candidate, and / or based on the probability information of the local association candidate. The embodiments of the present invention can improve the accuracy of cloud association request processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a request processing method, device and medium. Background Art

[0002] The input method program can provide corresponding candidates for the context and input string input by the user. The candidates include not only word candidates converted from the input string, but also association candidates associated with the word candidates; the association candidates may include local association candidates and / or cloud association candidates.

[0003] At present, it is generally believed that when the quality of the word candidates corresponding to the input string is high, the local association candidates provided by the client can meet the user's needs. Therefore, the client usually sends a cloud association request to the cloud only when the quality of the word candidates corresponding to the input string is low.

[0004] The inventors found in the process of implementing the embodiments of the present invention that when the quality of the word candidates corresponding to the input string is high, the local candidates provided by the client may not meet the user's needs. For example, the user inputs "this is + zhoujielun", usually to enter a specific work of a person, but the current client can usually only provide local candidates such as "Jay Chou's song", which cannot meet the user's input needs for specific works. Summary of the invention

[0005] The embodiments of the present invention provide a request processing method, device and medium. How to improve the accuracy of cloud association request processing is a technical problem that technical personnel in this field need to solve.

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

[0007] Determine word candidates corresponding to the input string, and / or determine local association candidates corresponding to the context and the input string;

[0008] Determine whether to send a cloud association request based on the type of generalized label of the word candidate hit and / or the type of generalized label of the local association candidate hit and / or the probability information of the local association candidate.

[0009] On the other hand, an embodiment of the present invention discloses a request processing device, including:

[0010] To be improved after finalization.

[0011] On the other hand, an embodiment of the present invention discloses a device for processing requests, including a memory and one or more programs, wherein the one or more programs are stored in the memory, and when the programs are executed by one or more processors, the steps of the aforementioned method are implemented.

[0012] 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 the device to perform one or more of the request processing methods described above.

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

[0014] The embodiment of the present invention determines whether to send a cloud association request based on the type of generalized tag hit by the word candidate, and can determine whether to send a cloud association request based on whether the word candidate involves a topic, thereby improving the accuracy of cloud association request processing. For example, when the word candidate involves a topic, the server can be used to associate the information of the topic, so in this case, a cloud association request can be sent.

[0015] In addition, the embodiment of the present invention determines whether to send a cloud association request based on the type of generalized tag hit by the local association candidate, and can determine whether to send a cloud association request based on whether the local association candidate involves a topic, which can improve the accuracy of cloud association request processing. For example, when the local association candidate involves a topic, the information of the topic can be associated with the help of the server, so in this case, a cloud association request can be sent.

[0016] In addition, the embodiment of the present invention determines whether to send a cloud association request based on the probability information of the local association candidate. The probability information of the local association candidate can represent the accuracy of the local association candidate. Judging whether to send a cloud association request based on the accuracy of the local association candidate can improve the accuracy of cloud association request processing. For example, when the accuracy of the probability information of the local association candidate is low, the server can be used to associate the information of the topic, so in this case, a cloud association request can be sent. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 It is a schematic diagram of an application environment of a request processing method according to an embodiment of the present invention;

[0019] Figure 2 is a flowchart of steps of an embodiment of a request processing method of the present invention;

[0020] Figure 3 is a structural block diagram of an embodiment of a request processing device of the present invention;

[0021] Figure 4 is a block diagram of an apparatus 800 for processing a request according to the present invention; and

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

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

[0024] The embodiments of the present invention can be applied to the application scenario of input method. Input method refers to the encoding method used to input various characters into a computer or other device (such as a mobile phone or a tablet computer). Input method can specifically include: traditional input method and cloud input method.

[0025] Among them, traditional input methods are limited by the memory capacity and CPU power of local computers, use smaller vocabulary and language models, and have limited input accuracy. Cloud input methods are input methods based on cloud computing technology. With the powerful storage and computing power of server clusters, they have unparalleled advantages over traditional input methods: larger and newer vocabulary, more advanced language models, and these advantages have significantly improved input accuracy.

[0026] The association candidates provided by the input method program may include: local association candidates and / or cloud association candidates; the local association candidates are provided by the client, and the cloud association candidates are provided by the cloud end.

[0027] At present, the client usually does not send cloud association requests by default. It will only send cloud association requests to the cloud when the quality of the word candidates corresponding to the input string is low. However, when the quality of the word candidates corresponding to the input string is high, the local candidates provided by the client may not meet the user's needs. For example, when the user enters "this is + zhoujielun", the client can provide local candidates such as "Jay Chou's song". However, the user may want to enter a specific work of "Jay Chou", and the local candidate cannot meet the user's input needs for specific works.

[0028] In response to the technical problem of how to improve the accuracy of cloud association request processing, an embodiment of the present invention provides a request processing scheme, which may include: determining the word candidates corresponding to the input string, and / or determining the local association candidates corresponding to the above context and the input string; judging whether to send a cloud association request based on the type of generalized label hit by the word candidate, and / or the type of generalized label hit by the local association candidate, and / or based on the probability information of the local association candidate.

[0029] The word candidate may represent the candidate obtained by converting the input string. For example, the word candidate corresponding to the input string "zhoujielun" may include: "Zhou Jielun", "Zhou Jielun", "Zhou Jie", "Zhou Jie", "Zhou Jie", etc.

[0030] The local association candidate may represent a candidate obtained by association based on the previous context and the word candidate. For example, the local association candidate "song" may be obtained based on the previous context "this is" and the word candidate "Jay Chou". For another example, the local association candidate "how to write" may be obtained based on the previous context "this is" and the word candidate "Jay Chou's conclusion". The local candidate may include: a combination of a word candidate and a local association candidate.

[0031] In the embodiment of the present invention, generalization can refer to expanding the specific and individual to the general. Data usually contains detailed information of the original concept layer, so the generalization tag in the embodiment of the present invention can abstract data from a lower concept layer to a higher concept layer, and use the higher concept layer to represent the lower concept layer. For example, "Xi'an" is represented by <place name>, "name" is represented by <person name>, and "name" is represented by <name>. <num4>Or <year> to represent "2018", use "punctuation" to represent "," use "end marker" to represent the end of text input, and so on.

[0032] The generalized label of the embodiment of the present invention can contain deep semantic information. For example, the traditional language model usually understands "2018" as a quantifier, while the embodiment of the present invention can understand a numeric string of length 4 as a generalized label <year>, thereby allowing the generalized label to contain deep semantic information.

[0033] Some types of generalized tags can represent topic information. The embodiment of the present invention determines whether to send a cloud association request based on the type of generalized tag hit by the word candidate, and can determine whether to send a cloud association request based on whether the word candidate involves a topic, which can improve the accuracy of cloud association request processing. For example, when the word candidate involves a topic, the server can be used to associate the topic information, so in this case, a cloud association request can be sent.

[0034] The embodiment of the present invention determines whether to send a cloud association request according to the type of generalized label hit by the local association candidate, and can determine whether to send a cloud association request according to whether the local association candidate involves a topic, which can improve the accuracy of cloud association request processing. For example, when the local association candidate involves a topic, the information of the topic can be associated with the help of the server, so in this case, a cloud association request can be sent.

[0035] The embodiment of the present invention determines whether to send a cloud association request based on the probability information of the local association candidate. The probability information of the local association candidate can represent the accuracy of the local association candidate. Judging whether to send a cloud association request based on the accuracy of the local association candidate can improve the accuracy of cloud association request processing. For example, when the accuracy of the probability information of the local association candidate is low, the server can be used to associate the information of the topic, so in this case, a cloud association request can be sent.

[0036] The request processing 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.

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

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

[0039] 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 characters. For example, examples of the emoticons may include: ":P", ":-o", ":-)", and the like.

[0040] The association candidate may be a candidate obtained based on the above association. The local association candidate may be an association candidate provided by a local language model of the client. The cloud association candidate may be an association candidate provided by a language model in the cloud.

[0041] Method Example 1

[0042] This embodiment explains the language model.

[0043] The language model is an abstract mathematical model of language based on objective language facts, which can establish a certain correspondence between the language model and the objective language facts. Specifically in the embodiment of the present invention, the language model can be used to predict the generalization processing result to obtain the local association candidate information corresponding to the generalization processing result.

[0044] The vocabulary corresponding to the language model can represent the range of characters that the language model can recognize. The capacity of the vocabulary is usually limited. For example, if the capacity of the vocabulary is 10,000, it means that the vocabulary has 10,000 characters. A vocabulary with limited capacity usually cannot cover all characters. Therefore, the language model often cannot recognize characters that do not exist in the vocabulary. Characters that do not exist in the vocabulary can be called unrecorded words.

[0045] In the embodiment of the present invention, the language model may include: an N-gram (N-gram) language model, and / or a neural network language model, etc.

[0046] Among them, the N-gram language model is based on the assumption that the appearance of the Nth word is only related to the previous N-1 words, but not to any other words. The probability of the whole sentence is the product of the probabilities of occurrence of each word.

[0047] Compared with the N-gram language model, one advantage of the neural network language model is that it can fully utilize the variable length of the previous context to predict the next word, so the neural network language model can have the ability to process variable length word sequences. The neural network language model can further include: RNNLM (Recurrent neural network) language model, CNNLM (Convolutional neural network) language model, LSTM (Long short-term memory artificial neural network) language model, etc.

[0048] The language model can provide P(any element|previous context, ...), that is, the probability of any element under the previous context and other conditions. The element can be used as a source of association candidates. In addition to the previous context, the above conditions can also include: input string, input environment characteristics, language style and other information.

[0049] In practical applications, the corpus can be processed by word segmentation to obtain a vocabulary corresponding to the language model. Further, the language model can be trained based on the corpus and the vocabulary. The above corpus can specifically include: oral chat corpus, written corpus, web page corpus, etc. It can be understood that the embodiment of the present invention does not limit the specific corpus.

[0050] The vocabulary of the embodiment of the present invention may include: characters that have been generalized, and the characters that have been generalized may be called generalized tags.

[0051] In a specific implementation, characters can be generalized according to the mapping relationship between characters and generalized labels to obtain the generalized labels corresponding to the characters. Characters and generalized labels are usually in a many-to-one relationship. Therefore, converting characters into generalized labels for storage can reduce the vocabulary space. Of course, in addition to generalized labels, the vocabulary can also include: characters.

[0052] Those skilled in the art can determine the type of generalized label according to actual application requirements.

[0053] For example, types of generalized labels can include:

[0054] Entity type, such as using <singer> to represent the singer's name, <place> to represent the place name, and <song> to represent the song name, etc.

[0055] Punctuation type, for example, <punctuation> represents punctuation marks such as tilde and comma;

[0056] Digital type, using <num4>To represent "2018", use <num5>To represent "10086", use <num11>Indicates an 11-digit mobile phone number;

[0057] End type, using end markers such as <\s> to indicate the end of text input;

[0058] Unrecorded type, use <unki>Represents an unregistered word of length i; and so on.

[0059] In a specific implementation, the corpus can be generalized, and the language model can be trained based on the generalized corpus.

[0060] The corpus is generalized, specifically including: converting at least part of the characters in the corpus into corresponding generalized tags. For example, the "Wudaokou" in the corpus "I+morning+go+Wudaokou+go to work" is converted into <place>, so that the generalized corpus can be: "I+morning+go+<place>+go to work".

[0061] The generalized corpus may include: generalized labels. In the process of training the language model based on the generalized corpus, the word vector of the generalized label and the parameters of the language model can be trained, so that the language model has the ability to recognize and process the generalized label.

[0062] In summary, the embodiment of the present invention trains the language model based on the corpus that has been generalized. On the one hand, the language model can be processed according to the semantic information contained in the generalization processing result; on the other hand, when the above text contains unrecorded words, the generalization processing results corresponding to the unrecorded words can be recognized and processed by the language model, thereby increasing the range of characters that the language model can recognize. The above two aspects can improve the accuracy of the local association candidate information output by the language model.

[0063] Furthermore, the embodiment of the present invention can also convert characters in the vocabulary into generalized tags for storage, thereby reducing the vocabulary space.

[0064] Method Example 2

[0065] Reference Figure 2 , shows a flowchart of a request processing method embodiment of the present invention, which may specifically include the following steps:

[0066] Step 201, determining word candidates corresponding to the input string, and / or determining local association candidates corresponding to the context and the input string;

[0067] Step 202: Determine whether to send a cloud association request based on the type of the generalized tag of the word candidate hit and / or the type of the generalized tag of the local association candidate hit and / or the probability information of the local association candidate.

[0068] Figure 2 The method embodiment shown can be executed by a client. It can be understood that the embodiment of the present invention does not limit the specific execution subject of the method embodiment.

[0069] In step 201, the context may refer to the part before the input cursor. According to one embodiment, the context may include: the most recent or most recent on-screen content. According to another embodiment, the context may include: the communication content sent by the communication counterpart in a communication scenario. For example, in an instant messaging scenario, after user A receives the communication content sent by user B, he clicks on the input box to input, and an input cursor may appear in the input box. Since the communication content is located before the input cursor in the communication window, the communication content can be used as the context. Of course, the context may include: the communication content sent by this end to the communication counterpart in a communication scenario. It can be understood that the embodiments of the present application are not limited to the specific context.

[0070] The input string may be a coded string input by the user through keyboard symbol input, handwriting input, voice input, or other input methods.

[0071] In step 202, the word library may be searched according to the input string to obtain word candidates corresponding to the input string. Optionally, the word library of the embodiment of the present invention may specifically include: a system word library, a user word library, a cell word library, etc. The embodiment of the present invention does not limit the specific word library.

[0072] In practical applications, a language model may be used to determine local association candidates corresponding to the previous context and the input string.

[0073] According to one embodiment, the language model can provide P(any element|previous context, input string, ...), that is, the probability of any element under the conditions of the previous context, input string, etc. The element can be used as a source of local association candidates. In this case, the previous context and the input string can be input into the language model to obtain the local association candidates output by the language model.

[0074] According to another embodiment, the language model can provide P(any element|previous context, ...), that is, the probability of any element under the previous context and other conditions. The element can be used as a source of local association candidates. In this case, the previous context and word candidates can be used as updated context input into the language model to obtain the local association candidates output by the language model.

[0075] It should be noted that the input string may correspond to multiple word candidates. In this case, the above context may be combined with a single one of the multiple word candidates to obtain corresponding multiple updated contexts.

[0076] In a specific implementation, Q target word candidates may be selected from multiple word candidates, and the Q target word candidates may be applied to subsequent processing. The selection may be based on the probability of the word candidates. Multiple word candidates may be sorted in descending order of probability, and the top Q target word candidates may be selected.

[0077] In practical applications, Q may be a positive integer. The value of Q may be determined according to the number of word candidates displayed on the first screen. Specifically, if the number of word candidates displayed on the first screen is 5, the value of Q may be 5. Of course, Q may also be less than the number of word candidates displayed on the first screen.

[0078] The probability factors of a word candidate may include: the term probability P1-1 of the word candidate itself, and the connection probability P1-2 between the previous context and the word candidate.

[0079] The basis of the term probability P1-1 may include: word frequency, vocabulary attributes, and at least one of the matching information between the word candidate and the input string. The connection probability P1-2 may be determined based on the language model. The vocabulary attributes may represent the vocabulary attributes of the word candidate hits, and the vocabulary attributes may include: system vocabulary attributes or user vocabulary attributes, etc. Generally, the probability value corresponding to the user vocabulary attribute is greater than the probability value corresponding to the system vocabulary attribute.

[0080] In practical applications, the term probability P1-1 and the connection probability P1-2 can be fused to obtain the probability of the word candidate. The corresponding fusion method can include: product, logarithm and weighted addition, etc. It can be understood that the embodiment of the present invention does not limit the specific fusion method.

[0081] In an optional embodiment of the present invention, the local association candidates may be obtained according to a language model, and the vocabulary corresponding to the language model may include: characters that have been generalized.

[0082] In the embodiment of the present invention, the vocabulary corresponding to the language model may include: characters that have been generalized, so the language model has the ability to recognize and process the generalized processing results. In this way, the output of the language model may be: the label corresponding to the local association candidate.

[0083] In an optional embodiment of the present invention, the generalized processing result corresponding to the updated context may be provided to the language model, and the language model processes the generalized processing result. On the one hand, the language model can be made to process according to the semantic information contained in the generalized processing result; on the other hand, when the updated context contains unrecorded words, the generalized processing result corresponding to the unrecorded words can be recognized and processed by the language model, thereby increasing the range of characters that the language model can recognize. The above two aspects can improve the accuracy of the local association candidate information output by the language model.

[0084] Accordingly, the determination of the local association candidates corresponding to the above-mentioned previous text and the input string may specifically include: performing generalization processing on the corresponding word candidates of the previous text and the input string to obtain a corresponding generalization result; inputting the generalization result into a language model to obtain the local association candidates output by the language model, and determining the first generalization label corresponding to the local association candidates; or inputting the generalization result into a language model to obtain the second generalization label corresponding to the local association candidates output by the language model, and determining the local association candidates corresponding to the second generalization label.

[0085] In an embodiment of the present invention, the previous text and the word candidates can be used as the updated previous text for generalization processing. The corresponding generalization process specifically includes: converting at least some characters in the updated previous text into corresponding generalization labels. In practical applications, the updated previous text can be segmented, and at least some characters in the updated previous text can be converted according to the mapping relationship between the characters and the generalization labels.

[0086] For example, convert "Jay Chou" in the updated previous text A "This is + Jay Chou" into <singer>. In this way, the updated previous text A after generalization processing can be: "This is + <singer>".

[0087] It should be noted that if the characters in the updated previous text do not match the mapping relationship, the characters in the updated previous text may not be subject to generalization processing. In this case, the generalization result may be the same as the updated previous text. For example, assume that the characters in the updated previous text B "Alright, goodbye" do not match the mapping relationship, then the generalization result corresponding to the updated previous text B may be the same as the updated previous text B.

[0088] In addition, it should be noted that if the characters in the updated previous text do not match the mapping relationship and also do not match the word list corresponding to the language model, the generalization label corresponding to the character can be determined as: unrecorded label. For example, "national lion" does not exist in the word list of the language model, and there is also no corresponding generalization label (such as <goldfish variety>) for "national lion" in the mapping relationship; in this case, the generalization label corresponding to "national lion" can be determined as: unrecorded label.

[0089] The output of the language model may include: the probability of the local association candidates, and / or, the information of the generalization labels corresponding to the local association candidates.

[0090] In one implementation, the above generalization result can be input into the language model to obtain the local association candidates output by the language model, and the first generalization label corresponding to the local association candidates can be determined.

[0091] The local association candidates output by the language model may be local association candidates whose probabilities meet preset probability conditions. The preset probability conditions may be: the first M local association candidates from large to small probability, where M may be a positive integer. Furthermore, based on the local association candidates, a search may be performed in the above mapping relationship, and the generalized label obtained by the search may be used as the first generalized label.

[0092] In another implementation, the generalization processing result may be input into a language model to obtain a second generalization label corresponding to the local association candidate output by the language model, and determine the local association candidate corresponding to the second generalization label.

[0093] The second generalized label output by the language model may be a generalized label whose probability meets a preset probability condition. The preset probability condition may be: the first P generalized labels with probability from large to small, where P may be a positive integer. Further, according to the second generalized label, a search may be performed in the above mapping relationship, and the characters found may be used as local association candidates.

[0094] In yet another implementation, the generalization processing result may be input into a language model to obtain local association candidates output by the language model and their corresponding generalization labels.

[0095] Since the local association candidate information output by the language model can have a high degree of accuracy, on this basis, step 203 determines whether to send a cloud association request based on the above local association candidates, which can improve the accuracy of cloud association request processing.

[0096] In step 203, the following judgment method can be provided to judge whether to send a cloud association request:

[0097] Judgment method 1: if the word candidate hits the generalized tag of the first type, a cloud association request is sent; and / or

[0098] Judgment method 2: if the local association candidate hits the generalized label of the first type, a cloud association request is sent; and / or

[0099] Judgment method 3: if the local association candidate hits the second type of generalized label, no cloud association request is sent; and / or

[0100] Judgment method 4: If the probability fusion values ​​of the local association candidates corresponding to the Q word candidates do not exceed the first threshold, a cloud association request is sent.

[0101] For judgment method 1, the first type of generalized tag can represent topic information. When the word candidate involves a topic, the server can be used to associate the topic information, so in this case, a cloud association request can be sent.

[0102] The first type specifically includes: entity type or unrecorded type. The entity type can correspond to topics that the language model can recognize. The unrecorded type can correspond to topics that the language model cannot recognize.

[0103] For example, the word candidate "Jay Chou" hits the <singer> tag of the entity type, which indicates that the word candidate involves the <singer> topic. Therefore, a cloud association request can be sent to request the association results corresponding to the <singer> topic from the cloud.

[0104] Another example is that the word candidate is "national lion". Since "national lion" does not exist in the vocabulary of the language model and there is no generalization tag corresponding to "national lion" in the mapping relationship (such as <goldfish variety>); in this case, the generalization tag corresponding to "national lion" can be determined as: unrecorded tag. The unrecorded type can correspond to topics that the language model cannot recognize. In this case, the server can be used to associate the topic information, so a cloud association request can be sent.

[0105] In practical applications, the Q target word candidates can be matched with the characters corresponding to the generalization tags of the first generalization type in the above mapping relationship. If the match is successful, it can be determined that the target word candidate hits the generalization tag of the first type.

[0106] For judgment methods 2 to 4, based on the information of the local association candidates, it can be judged whether the local can provide accurate association candidates, and thus it can be judged whether to send a cloud association request. Generally speaking, if the local can provide accurate association candidates, the cloud association request can not be sent. On the contrary, if the local cannot provide accurate association candidates, the cloud association request can be sent.

[0107] For judgment method 2, the probability fusion value of the local association candidates corresponding to the Q word candidates can represent the accuracy of the local association candidates obtained from the first-screen word candidates. Generally, if the probability fusion value exceeds the first threshold, it can be explained that the accuracy of the local association candidates is relatively high. In this case, the cloud association request can not be sent. Otherwise, if the probability fusion value does not exceed the first threshold, it can be explained that the accuracy of the local association candidates is relatively low. In this case, a cloud association request can be sent to request cloud association candidates with higher accuracy from the cloud.

[0108] In practical applications, for a single one of the Q target local association candidates, M local association candidates with the largest probabilities can be obtained. The value of M can be determined according to the number of association candidates displayed on the first screen. Specifically, if the number of association candidates displayed on the first screen is 3, the value of M can be 3.

[0109] In a specific implementation, the probability P2 of the local association candidate can be obtained based on the probability P1 corresponding to the word candidate and the connection probability P2-1 between the word candidate and the local association candidate. The probability P2 of the local association candidate can represent the probability of the local association candidate under the condition of the word candidate.

[0110] In practical applications, the probability P1 and the connection probability P2-1 can be fused to obtain the probability of the word candidate. The fusion method corresponding to the probability P2 of the local association candidate can include: product, logarithm and weighted addition, etc. It can be understood that the embodiment of the present invention does not limit the specific fusion method.

[0111] In an application example of the present invention, the probabilities of the M local association candidates corresponding to the i-th word candidate can be expressed as: P2[i][1], P2[i][2]…P2[i][M], then the probability fusion value P3 of the local association candidates corresponding to the Q word candidates can be expressed as:

[0112] P3=(P2[1][1]+P2[1][2]+…+P2[1][M])+(P2[2][1]+P2[2][2]+…+P2[2][M])+…+(P2[Q][1]+P2[Q][2]+…+P2[Q][M])

[0113] For judgment method 3 and judgment method 4, it can be judged whether the local area is capable of providing accurate local association candidates according to the type of generalized label corresponding to the local association candidate. The local association candidates in judgment method 3 and judgment method 4 can be candidates whose probability exceeds the second threshold. In other words, it can be judged whether the local association candidates whose probability exceeds the second threshold hit the first type or the second type of generalized label.

[0114] For judgment method 3, suppose the local association candidate hits the generalized label of the entity type, such as the <song> label, which means that the local can predict that the next candidate should be a <song> type, but does not know the specific name of <song>. In this case, a cloud association request can be sent to request the specific name of <song> from the cloud.

[0115] For example, after generalization, the updated context A can be: "This is + <singer>", and the association result expected by the user is generally "a certain song" or "a certain variety show". Based on the processing of the generalization result, the local language model can predict: a generalized label that can characterize the type of the association result. For example, based on the updated context A after generalization, the language model can output the generalized label of <song> label.

[0116] The generalized label of the unrecorded type can represent characters that do not exist in the vocabulary of the language model. For example, if the above C is updated to "Speaking of +goldfish+,+he+likes+most", the association result expected by the user will generally be "a certain goldfish variety". However, there is no generalized label corresponding to <goldfish variety> in the vocabulary of the language model, nor is there a specific character corresponding to <goldfish variety>; in this case, the generalized label output by the language model may be: unrecorded label. Then the embodiment of the present invention can send a cloud association request to request more accurate cloud association candidates from the cloud.

[0117] The situation corresponding to judgment method 4 is that the local computer is capable of processing the second type of generalized label. Specifically, the local computer is capable of predicting the specific characters corresponding to the second type of generalized label, or the specific characters corresponding to the second type of generalized label can be input by the user, or the specific characters corresponding to the second type of generalized label may not be predicted.

[0118] The second type may specifically include: a number type, an end type, or a punctuation type.

[0119] For example, if the above A is updated to "OK, bye", there is nothing more to say in the following text. Among the generalized tags output by the language model, the one with the highest probability is: the generalized tag of the ending type. Since the generalized tag of the ending type indicates the end of text input, in this case, no association candidates may be provided to reduce the disturbance to the user caused by association candidates that do not meet the user's needs.

[0120] For example, if the language model outputs a generalized label of a number type, we can use local capabilities to predict the generalized label of the number type. <num11>,because <num11>It represents an 11-digit mobile phone number, so you can search and update the corresponding mobile phone number in the local address book, and present the search result as a local association candidate.

[0121] For example, if the language model outputs a generalized label of punctuation type, the local capabilities can be used to predict the generalized label of the punctuation type. For example, if the generalized label of the punctuation type is <wavy line>, then "wavy line symbol" can be presented as a local association candidate.

[0122] The above describes in detail the process of determining whether to send a cloud association request through determination methods 1 to 4. It can be understood that those skilled in the art can adopt any one or a combination of determination methods 1 to 4 according to actual application requirements.

[0123] For example, you can first use judgment method 1 to determine whether to send a cloud association request. If the word candidate hits the first type of generalized label, then send a cloud association request; otherwise, if the word candidate does not hit the first type of generalized label, then use any one or a combination of judgment methods 2 to 4 to determine whether to send a cloud association request.

[0124] In a specific implementation, the result of determining whether to send a cloud association request specifically includes: sending a cloud association request, or not sending a cloud association request.

[0125] In the case of sending a cloud association request, the cloud association candidates returned by the server can be received and displayed. Optionally, the cloud association candidates and word candidates can also be jointly displayed. The cloud association candidates and word candidates can be located in different candidate areas. For example, the word candidates are located at the Q candidate positions of the first candidate area. As another example, the cloud association candidates are located at the M candidate positions of the second candidate area, and the cloud association candidates carry a preset logo, such as a cloud logo, to prompt that the cloud association candidates are provided by the cloud. For example, when the user inputs "this is +zhoujielun", the cloud association candidates returned by the server may include: "Blue and White Porcelain sung by Jay Chou", "The King's Avatar directed by Jay Chou", etc.

[0126] The server can use the server's language model to determine cloud association candidates. Compared with the client's language model, the server's language model can use a larger capacity, a newer vocabulary, and a more advanced model structure, so it can obtain higher quality cloud association candidates.

[0127] Without sending a cloud association request, word candidates can be displayed. Word candidates and local association candidates can also be displayed. The displayed local association candidates can be provided by a language model, and / or can be determined based on a generalized label output by the language model. Word candidates and local association candidates can be combined into local candidates and displayed. For example, when a user inputs "this is +zhoujielun", local candidates obtained by combining the word candidate "Jay Chou" and the local association candidates can include: "Jay Chou's songs" and the like.

[0128] In summary, the request processing method of the embodiment of the present invention determines whether to send a cloud association request according to the type of generalized label hit by the word candidate, and can determine whether to send a cloud association request according to whether the word candidate involves a topic, which can improve the accuracy of cloud association request processing. For example, when the word candidate involves a topic, the server can be used to associate the information of the topic, so in this case, a cloud association request can be sent.

[0129] In addition, the embodiment of the present invention determines whether to send a cloud association request based on the type of generalized tag hit by the local association candidate, and can determine whether to send a cloud association request based on whether the local association candidate involves a topic, which can improve the accuracy of cloud association request processing. For example, when the local association candidate involves a topic, the information of the topic can be associated with the help of the server, so in this case, a cloud association request can be sent.

[0130] In addition, the embodiment of the present invention determines whether to send a cloud association request based on the probability information of the local association candidate. The probability information of the local association candidate can represent the accuracy of the local association candidate. Judging whether to send a cloud association request based on the accuracy of the local association candidate can improve the accuracy of cloud association request processing. For example, when the accuracy of the probability information of the local association candidate is low, the server can be used to associate the information of the topic, so in this case, a cloud association request can be sent.

[0131] It should be noted that, for the method embodiments, for the sake of simplicity of description, they are all described as a series of motion combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the described sequence of actions, because according to the embodiments of the present invention, certain steps can 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 motions involved are not necessarily required by the embodiments of the present invention.

[0132] Device Embodiment

[0133] Reference Figure 3 , shows a structural block diagram of an embodiment of a request processing device of the present invention, which may specifically include: a determination module 301 and a judgment module 302.

[0134] The determination module 301 is used to determine word candidates corresponding to the input string, and / or determine local association candidates corresponding to the above context and the input string;

[0135] The judgment module 302 is used to judge whether to send a cloud association request based on the type of generalized label of the above-mentioned word candidate hits, and / or the type of generalized label of the above-mentioned local association candidate hits, and / or the probability information of the above-mentioned local association candidates.

[0136] A determination module, used to determine word candidates corresponding to the input string, and / or determine local association candidates corresponding to the context and the input string; and

[0137] A judgment module is used to judge whether to send a cloud association request based on the type of generalized label of the above-mentioned word candidate hits, and / or based on the type of generalized label of the above-mentioned local association candidate hits, and / or based on the probability information of the above-mentioned local association candidates.

[0138] Optionally, the determination module 302 may include:

[0139] A first judgment module, configured to send a cloud association request if the word candidate hits a generalized tag of the first type; and / or

[0140] A second judgment module is used to send a cloud association request if the local association candidate hits the generalized label of the first type; and / or

[0141] A third judgment module is used for not sending a cloud association request if the local association candidate hits the second type of generalized label; and / or

[0142] The fourth judgment module is used to send a cloud association request if the probability fusion values ​​of the local association candidates corresponding to the Q word candidates do not exceed the first threshold.

[0143] Optionally, the first type mentioned above may include: an entity type, or an unrecorded type.

[0144] Optionally, the second type may include: a number type, an end type or a punctuation type.

[0145] Optionally, the probability of the local association candidate may be obtained based on the corresponding probability of the word candidate and the connection probability of the word candidate and the local association candidate.

[0146] Optionally, the local association candidates may be obtained according to a language model, and the vocabulary corresponding to the language model may include: characters that have been generalized.

[0147] Optionally, the determination module 301 may include:

[0148] A generalization processing module, used for performing generalization processing on the above context and the word candidates corresponding to the above input string to obtain a corresponding generalization processing result;

[0149] A model processing module is used to input the above-mentioned generalization processing results into a language model to obtain local association candidates output by the above-mentioned language model, and determine a first generalization label corresponding to the above-mentioned local association candidates; or, input the above-mentioned generalization processing results into a language model to obtain a second generalization label corresponding to the local association candidates output by the above-mentioned language model, and determine the local association candidates corresponding to the second generalization label.

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

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

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

[0153] An embodiment of the present invention provides a device for processing requests, 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, wherein the one or more programs include instructions for performing the following operations: determining word candidates corresponding to an input string, and / or determining local association candidates corresponding to the context and the input string; determining whether to send a cloud association request based on the type of generalized label hit by the word candidate, and / or the type of generalized label hit by the local association candidate, and / or the probability information of the local association candidate.

[0154] Figure 4 8 is a block diagram of an apparatus 800 for processing a request according to an exemplary embodiment. For example, the apparatus 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.

[0155] Reference Figure 4 , 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 .

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

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

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

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

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

[0161] 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: a home button, a volume button, a start button, and a lock button.

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

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

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

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

[0166] Figure 5 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 on 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.

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

[0168] 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 The request processing method shown.

[0169] 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 a request processing method, the method comprising: determining word candidates corresponding to an input string, and / or determining local association candidates corresponding to the above context and the input string; judging whether to send a cloud association request based on the type of generalized label hit by the word candidate, and / or based on the type of generalized label hit by the local association candidate, and / or based on the probability information of the local association candidate.

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

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

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

[0173] The request processing method, the request processing device, the device for processing requests, and the machine-readable medium provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained in detail using specific examples herein. 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 mode and the scope of application. In summary, the content of this specification should not be understood as limiting the present invention. < / unki>

Claims

1. A request processing method, characterized in that: Applied to a client, the method comprises: Determine word candidates corresponding to the input string, and determine local association candidates corresponding to the context and the input string; Determine whether to send a cloud association request according to the type of the generalized label of the word candidate hit, the type of the generalized label of the local association candidate hit, and the probability information of the local association candidate; The determination of whether to send a cloud association request includes: if the word candidate hits a first type of generalized tag, sending a cloud association request; if the local association candidate hits a first type of generalized tag, sending a cloud association request, the first type of generalized tag representing information of a topic; if the local association candidate hits a second type of generalized tag, not sending a cloud association request; if the probability fusion values ​​of the local association candidates corresponding to the Q word candidates do not exceed a first threshold, sending a cloud association request.

2. The method according to claim 1, characterized in that The first type includes: entity type, or unrecorded type.

3. The method according to claim 1, characterized in that The second type includes: a number type, an end type or a punctuation type.

4. The method according to claim 1, characterized in that The probability of the local association candidate is obtained according to the corresponding probability of the word candidate and the connection probability of the word candidate and the local association candidate.

5. The method according to any one of claims 1 to 4, characterized in that: The local association candidates are obtained according to a language model, and the vocabulary corresponding to the language model includes: characters that have been generalized.

6. The method according to any one of claims 1 to 4, characterized in that: The determining of the local association candidates corresponding to the above context and the input string includes: Performing generalization processing on the word candidates corresponding to the above context and the input string to obtain corresponding generalization processing results; The generalized processing result is input into a language model to obtain a local association candidate output by the language model, and a first generalized label corresponding to the local association candidate is determined; or, the generalized processing result is input into a language model to obtain a second generalized label corresponding to the local association candidate output by the language model, and a local association candidate corresponding to the second generalized label is determined.

7. A request processing device, characterized in that: Applied to a client, the device comprises: A determination module, used to determine word candidates corresponding to the input string, and to determine local association candidates corresponding to the context and the input string; and A judgment module is used to judge whether to send a cloud association request according to the type of generalized label hit by the word candidate, the type of generalized label hit by the local association candidate, and the probability information of the local association candidate; the judgment module includes: a first judgment module, which is used to send a cloud association request if the word candidate hits a first type of generalized label, and the first type of generalized label represents the information of the topic; a second judgment module, which is used to send a cloud association request if the local association candidate hits the first type of generalized label; a third judgment module, which is used not to send a cloud association request if the local association candidate hits a second type of generalized label; and a fourth judgment module, which is used to send a cloud association request if the probability fusion values ​​of the local association candidates corresponding to the Q word candidates do not exceed a first threshold.

8. The device according to claim 7, characterized in that The first type includes: entity type, or unrecorded type.

9. The device according to claim 7, characterized in that The second type includes: a number type, an end type or a punctuation type.

10. The device according to claim 7, characterized in that The probability of the local association candidate is obtained according to the corresponding probability of the word candidate and the connection probability of the word candidate and the local association candidate.

11. The device according to any one of claims 7 to 10, characterized in that The local association candidates are obtained according to a language model, and the vocabulary corresponding to the language model includes: characters that have been generalized.

12. An apparatus for processing a request, characterized in that The invention comprises a memory and one or more programs, wherein the one or more programs are stored in the memory, and when the programs are executed by one or more processors, the steps of any method described in claims 1 to 6 are implemented.

13. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to execute the request processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Input method and device and device for input

    CN111708444A

  • Cloud association method and related device

    CN112015281A