Request processing method, device and medium
By determining the ending probability of the current input string based on the user's historical input string, controlling the sending of cloud requests, the resource waste problem caused by frequent sending cloud requests by the client is solved, and more efficient network resource utilization and server processing capabilities are achieved.
Patent Information
- Application Number
- CN202111276256.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The frequent sending of cloud requests by clients leads to a greater consumption of network resources and increases the processing burden of the server.
According to the user's historical input string, the probability that the next character of the current input string is the ending character, and the cloud processing is performed based on this probability to reduce unnecessary cloud requests.
Save the network resources of the client, reduce the processing burden on the server, and improve the utilization rate of cloud candidates.
Smart Images

Figure CN114089840B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of input methods, and in particular to a request processing method, device and medium. Background Art
[0002] 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 advantages that traditional input methods cannot match: larger and newer vocabulary, more advanced language models, and these advantages significantly improve input accuracy. The client can send a cloud request to the cloud, which can include an input string. The cloud determines the cloud candidate corresponding to the cloud request and returns it to the client for the user to choose.
[0003] In order to improve the speed of providing cloud candidates, a current request processing method sends a cloud request once an update of the input string is detected.
[0004] The inventors discovered during the implementation of the embodiments of the present invention that frequent cloud requests sent by the client often consume more network resources and increase the processing burden on the server. Summary of the invention
[0005] How to reduce the network resources consumed by request processing and how to reduce the processing burden on the server are technical problems that need to be solved by those skilled in the art. In view of the above problems, embodiments of the present invention are proposed to provide a request processing method, device and medium that overcome the above problems or at least partially solve the above problems.
[0006] In order to solve the above problem, an embodiment of the present invention discloses a request processing method, which is applied to a client, and the method includes:
[0007] According to the user's historical input string, determine the probability that the next character of the current input string is the end character;
[0008] According to the probability that the next character of the current input string is the end character, cloud processing is performed.
[0009] On the other hand, an embodiment of the present invention discloses a request processing device, which is applied to a client, and the device includes:
[0010] The end probability determination module is used to determine the probability that the next character of the current input string is the end character according to the user's historical input string;
[0011] The cloud processing module is used to perform cloud processing according to the probability that the next character of the current input string is the end character.
[0012] 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.
[0013] 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.
[0014] The embodiments of the present invention include the following advantages:
[0015] The embodiment of the present invention performs cloud processing according to the probability that the next character of the current input string is the end character, and can detect whether the current input string represents the end of the current input process according to the end rule of the input string, and perform cloud processing according to the corresponding detection result. Since the embodiment of the present invention does not need to send a cloud request when the current input string does not represent the end of the current input process, it can save network resources of the client and reduce the processing burden of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] 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.
[0017] Figure 1 It is a schematic diagram of an application environment of a request processing method according to an embodiment of the present invention;
[0018] Figure 2 is a flowchart of a request processing method according to an embodiment of the present invention;
[0019] Figure 3 is a flowchart of a request processing method according to an embodiment of the present invention;
[0020] Figure 4 is a structural block diagram of a request processing device according to an embodiment of the present invention;
[0021] Figure 5 is a block diagram of an apparatus 800 for processing a request according to the present invention;
[0022] Figure 6 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] Currently, in order to improve the quality of candidates, clients usually send cloud requests frequently. For example, once an update to the input string is detected, a cloud request will be sent to the cloud. However, frequent cloud requests from clients often consume more network resources on the client and increase the processing burden on the cloud.
[0027] For example, if a user wants to input "Victoria's" via "weiduoliyade", the traditional solution will send clouds when the input string is in the following states: "weiduo", "weiduol", "weiduoli", "weiduoliyad", "weiduoliyade". However, the user's input behavior is continuous and fast (the time interval between key presses is about 0.23ms). After most cloud requests are sent out, the returned cloud candidates either have no opportunity to be displayed or keep flashing and changing in the cloud position, resulting in a low utilization rate of cloud candidates.
[0028] In order to reduce the network resources consumed by request processing and the processing burden on the server, an embodiment of the present invention provides a request processing scheme, which may include: determining the probability that the next character of the current input string is an end character based on the user's historical input string; and performing cloud processing based on the probability that the next character of the current input string is an end character.
[0029] In the embodiment of the present invention, the historical input string may be an input string corresponding to the content on the screen during the historical input process of the user. The current input string may be an input string during the current input process of the user.
[0030] For example, the historical input string corresponding to the content "Hello" on the upper screen is "nihao", etc. The next character of the last character in the historical input string is the end character. Therefore, based on the analysis of the historical input string, the end rule of the input string can be obtained, and according to the end rule of the input string, the probability that the next character of the current input string is the end character can be determined.
[0031] In the embodiment of the present invention, cloud processing is performed according to the probability that the next character of the current input string is the end character. It is possible to detect whether the current input string represents the end of the current input process according to the end rule of the input string, and perform cloud processing according to the corresponding detection result. Since the embodiment of the present invention can not send a cloud request when the current input string does not represent the end of the current input process, it can save the network resources of the client and reduce the processing burden on the server.
[0032] The request processing method provided by the embodiment of the present invention can be applied to Figure 1 the application environment shown in Figure 1 As shown, the client 100 and the server 200 are located in a wired or wireless network. Through the wired or wireless network, the client 100 and the server 200 perform data interaction.
[0033] Optionally, the client 100 can run on a terminal. The above terminal specifically includes but is not limited to: smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, in-vehicle computers, desktop computers, set-top boxes, smart TVs, wearable devices, and so on. The client 100 can correspond to a website or an APP (Application). The client 100 can correspond to application programs such as an input method APP.
[0034] The server in the embodiment of the present invention can be a cloud server (cloud). The cloud is a simple, efficient, secure, and reliable computing service with elastic scalability of processing power. The resource information of the cloud is dynamic, making its processing power elastically scalable.
[0035] 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 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.
[0036] Local candidates can be candidates provided locally by the client, and cloud candidates can be candidates provided by the server.
[0037] The association candidate may represent 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 based on the above. The cloud association candidate may be an association candidate provided by a language model in the cloud based on the above.
[0038] Method Example 1
[0039] Reference Figure 2 , shows a flowchart of a request processing method according to an embodiment of the present invention, which may specifically include the following steps:
[0040] Step 201: Determine the probability that the next character of the current input string is the end character according to the user's historical input string;
[0041] Step 202: Perform cloud processing based on the probability that the next character of the current input string is the end character.
[0042] 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.
[0043] In step 201, the historical input string may originate from one user or multiple users. It can be understood that the embodiment of the present invention does not limit the specific source of the historical input string.
[0044] The embodiment of the present invention can obtain the ending rule of the input string based on the analysis of the historical input string, and determine the probability that the next character of the current input string is the ending symbol according to the ending rule of the input string.
[0045] The embodiment of the present invention can provide the following technical solution for determining the probability that the next character of the current input string is a terminator:
[0046] Technical Solution 1
[0047] In technical solution 1, the probability that the next character of the current input string is the end character can be determined according to the language model established based on the user's historical input strings.
[0048] The language model is an abstract mathematical model of a language based on the objective facts of the language, which can establish a certain correspondence between the language model and the objective facts of the language. Specifically, in the embodiment of the present invention, the language model can be used for the probability of occurrence of a character sequence. The character types corresponding to the character sequence specifically include: terminal symbols and / or non-terminal symbols. Among them, the non-terminal symbols may include: alphabetic characters, numeric types, symbol types, etc.
[0049] 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.
[0050] Among them, the N-gram language model is based on the assumption that the appearance of the Nth character is only related to the previous N-1 characters, but not to any other characters. The probability of a character sequence is the product of the probabilities of occurrence of each character.
[0051] 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 character, so the neural network language model can have the ability to process variable length character 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.
[0052] The language model can provide P(next character|current input string, ...), that is, the probability of the next character under the current input string, etc. In addition to the above, the above conditions can also include: input environment characteristics, language style and other information.
[0053] For example, when using a full keyboard, you can use the 26 letters, the end symbol <\s>, the separator "'", and other characters. <unk>(numbers and other types of characters) to establish an N-gram language model. Taking the 4-gram language model as an example, a 29*29*29*29 four-dimensional matrix can be established. The elements in the four-dimensional matrix can represent the probability of occurrence of the character sequence corresponding to the four characters. For example, the element "ole<\s>" in the four-dimensional matrix can represent that when the input string ends with "ole", the probability that the next character is the end character is 85%.
[0054] For example, when using a nine-key keyboard, you can use 9 numeric keys (or 8), separators, <\s>, <unk>Create a 11*11*11*11 four-dimensional matrix. For details, please refer to the description of the full keyboard.
[0055] For example, the input layer vocabulary and output layer vocabulary of the neural network language model may specifically include: character characters, separators, <\s>, <unk>, the probability of <\s> in the probability distribution of the output layer represents the probability that the next character is the end character.
[0056] In a specific implementation, multiple users' historical input strings can be first used to train a language model to obtain a first language model, which can conform to the input habits of most users; then, the current user's historical input string is used to train (adjust) the first language model, and the obtained second language model can conform to the personalized habits of the current user. Of course, it is also feasible to directly use the first language model to process the current input string, and the embodiments of the present invention do not limit whether to adjust the first language model.
[0057] In practical applications, the character sequence corresponding to the last (N - 1) characters in the current input string can be input into the N-gram language model to obtain the probability that the next character of the current input string is the end character. Alternatively, the character sequence corresponding to the current input string can be input into the neural network language model to obtain the probability that the next character of the current input string is the end character.
[0058] Technical solution 2
[0059] In technical solution 2, the probability that the next character of the current input string is the end character can be determined according to the classification model established based on the user's historical input string.
[0060] Technical solution 2 can convert the problem of the probability that the next character of the current input string is the end character into a binary classification problem. This binary classification problem can be solved by a data analyzer.
[0061] In an alternative embodiment of the present invention, a mathematical model can be trained based on training data to obtain a data analyzer, and the data analyzer can represent the mapping relationship between the input data (input string) and the output data (classification result). The classification result can include: <end character> <non-end character>.
[0062] In a specific implementation, the historical input string can be annotated to obtain positive samples and negative samples. Among them, the positive sample can be an input string with an end character; the negative sample can be an input string with a non-end character, and the negative sample can be the input string corresponding to the case where it has not been displayed on the screen. For example, if the historical input string corresponding to the displayed content "Hello" is "nihao", then the positive sample obtained based on this displayed content can include "nihao", and the negative samples obtained based on this displayed content can include "n", "ni", "nih", "niha", etc.
[0063] 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.
[0064] In a specific implementation, the current input string may be input into a data analyzer to obtain the probability that the next character of the current input string output by the data analyzer is the end character.
[0065] In step 202, cloud processing can be performed based on the comparison result between the probability and the probability threshold. For example, if the probability exceeds the probability threshold, it can be considered that the next character of the current input string is the end character, and the user is about to end the current input process, so a cloud request can be sent. For another example, if the probability does not exceed the probability threshold, it can be considered that the next character of the current input string is a non-end character, and the current input process has not yet ended and the user will continue to input, so a cloud request may not be sent.
[0066] For example, a user wants to input "Victoria's" via "weiduoliyade". In the current input process, the user's input behavior is usually coherent and fast (the time interval between key presses is about 0.23ms). Therefore, before the current input process ends, the user's focus and attention are usually on the input string, and the cloud candidates are usually not noticed by the user, resulting in a low utilization rate of the cloud candidates. However, in the embodiment of the present invention, when the current input process is predicted to end, a cloud request is sent, and cloud candidates can be obtained and displayed based on the cloud request when the user has a chance to pay attention to the cloud candidates, which can not only save the client's network resources and reduce the processing burden of the server, but also improve the utilization rate of the cloud candidates.
[0067] In summary, the request processing method of the embodiment of the present invention performs cloud processing according to the probability that the next character of the current input string is the end character, and can detect whether the current input string represents the end of the current input process according to the end rule of the input string, and perform cloud processing according to the corresponding detection result. Since the embodiment of the present invention does not need to send a cloud request when the current input string does not represent the end of the current input process, it can save the network resources of the client and reduce the processing burden of the server.
[0068] Method Example 2
[0069] This embodiment may fuse the probability that the next character of the current input string is the end character with other processing features, and perform cloud processing according to the fusion result.
[0070] In one implementation, other processing features may include: the length information of the current input string, and / or the time information corresponding to the current input string. Specifically, cloud processing may be performed based on the probability that the next character of the current input string is the end character, the length information of the current input string, and / or the time information corresponding to the current input string.
[0071] The length information of the current input string can represent the information of the current input string in the length dimension. In practical applications, the first relationship information between the length information of the current input string and the length mean of the historical input string can be determined, the first relationship information can be fused with the probability, and cloud processing can be performed according to the corresponding first fusion result.
[0072] Among them, the mean length of the historical input string can be determined based on the analysis of the user's historical input string. The mean length can represent the length threshold of the corresponding input string when the user sends a cloud request. When the length information of the current input string exceeds the mean length, it can be considered that the conditions or tendency to send a cloud request are met. In practical applications, statistical methods such as Gaussian models can be used to determine the mean length of the historical input string.
[0073] The time information corresponding to the current input string can represent the information of the current input string in the time dimension. In practical applications, the second relationship information between the time information of the current input string and the time mean of the historical input string can be determined, the second relationship information can be fused with the probability, and cloud processing can be performed according to the corresponding second fusion result.
[0074] The time information of the current input string can represent the time interval information after the last character in the current input string is input and before the next character is received. As mentioned above, the user's input behavior during an input process is usually continuous and fast (the time interval between key presses is about 0.23ms). 0.23ms is an example of the time mean.
[0075] In practical applications, the time mean of the historical input string can be determined based on the analysis of the user's historical input string. The time mean can represent the threshold of the corresponding time interval when the user sends a cloud request. When the time information of the current input string exceeds the time mean, it can be considered that the conditions or tendency to send a cloud request are met. In practical applications, the time mean of the historical input string can be determined using statistical methods such as the Gaussian model.
[0076] In a specific implementation, the processing method adopted for performing the cloud processing based on the probability that the next character of the current input string is the terminator, the length information of the current input string, and / or the time information corresponding to the current input string may specifically include:
[0077] Processing method 1: Perform cloud processing based on the probability that the next character of the current input string is the end character and the first relationship information between the length information of the current input string and the average length of the historical input string; for example, if the probability exceeds the probability threshold and the length information exceeds the average length, send a cloud request. Or
[0078] Processing method 2: Perform cloud processing based on the probability that the next character of the current input string is the end character and the second relationship information between the time information corresponding to the current input string and the time interval mean of the historical input string; for example, when the probability exceeds the probability threshold and the time information exceeds the time mean, send a cloud request. Or
[0079] Processing method 3: perform cloud processing based on the probability that the next character of the current input string is the end character, the first relationship information between the length information of the current input string and the mean length of the historical input strings, and the second relationship information between the time information corresponding to the current input string and the mean time interval of the historical input strings; for example, when the probability exceeds the probability threshold, the length information exceeds the mean length, and the time information exceeds the mean time, send a cloud request.
[0080] Method Example 3
[0081] In this embodiment, cloud processing can be performed based on other processing features. The other processing features specifically include: 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. It can be understood that these other processing features can be combined with the probability that the next character of the current input string is the terminator.
[0082] Reference Figure 3 , shows a flowchart of a request processing method according to an embodiment of the present invention, which may specifically include the following steps:
[0083] Step 301, receiving the above text and an input string;
[0084] Step 302: determine word candidates corresponding to the input string, and / or determine local association candidates corresponding to the context and the input string;
[0085] Step 303: perform cloud processing according to the type of the generalized label of the word candidate hit and / or according to the type of the generalized label of the local association candidate hit and / or according to the probability information of the local association candidate.
[0086] Figure 3 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.
[0087] In step 301, the above context may refer to the part before the input cursor. 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. For example, in an instant messaging scenario, after user A receives the communication content "Africans come to Xi'an to escape the summer heat" 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 above context. It can be understood that the embodiments of the present application are not limited to the specific above context.
[0088] The input string may be a coded string input by the user through keyboard symbol input, handwriting input, voice input, or other input methods.
[0089] In step 302, 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.
[0090] In practical applications, a language model may be used to determine local association candidates corresponding to the previous context and the input string.
[0091] 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.
[0092] 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.
[0093] It should be noted that the input string may correspond to multiple word candidates. In this case, the context may be combined with a single one of the multiple word candidates to obtain corresponding multiple updated contexts.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] In an alternative embodiment of the present invention, the generalization processing result corresponding to the updated context can be provided to the language model, and the language model processes the above generalization processing result. On the one hand, the language model can be made to process according to the semantic information contained in the generalization processing result; on the other hand, in the case where the updated context contains unrecorded words, the generalization processing results corresponding to the unrecorded words can be recognized and processed by the language model, so that the range of characters that the language model can recognize can be increased. The above two aspects can improve the accuracy of the local association candidate information output by the language model.
[0102] Correspondingly, the determination of the local association candidate corresponding to the above context and the input string may specifically include: performing generalization processing on the context and the corresponding word candidates of the input string to obtain a corresponding generalization processing result; inputting the generalization processing result into the language model to obtain the local association candidate output by the language model, and determining the first generalization label corresponding to the local association candidate; or inputting the generalization processing result into the language model to obtain the second generalization label corresponding to the local association candidate output by the language model, and determining the local association candidate corresponding to the second generalization label.
[0103] In the embodiment of the present invention, the context and the word candidates can be used as the updated context for generalization processing, and the corresponding generalization processing process specifically includes: converting at least some characters in the updated context into corresponding generalization labels. In practical applications, the updated context can be segmented, and at least some characters in the updated context can be converted according to the mapping relationship between the characters and the generalization labels.
[0104] For example, converting "Jay Chou" in the updated context A "This is + Jay Chou" to <singer>, so that the updated context A after generalization processing can be: "This is + <singer>".
[0105] It should be noted that if the characters in the updated context do not hit the mapping relationship, the characters in the updated context may not be subjected to generalization processing. In this case, the generalization processing result may be the same as the updated context. For example, assuming that the characters in the updated context B "Alright, goodbye" do not hit the mapping relationship, the generalization processing result corresponding to the updated context B may be the same as the updated context B.
[0106] In addition, it should be noted that if the characters in the updated context do not hit the mapping relationship and do not hit the word list corresponding to the language model, the generalization label corresponding to the character can be determined as: unrecorded label. For example, "Guoshi" does not exist in the word list of the language model, and there is no corresponding generalization label (such as <goldfish variety>) for "Guoshi" in the mapping relationship; in this case, the generalization label corresponding to "Guoshi" can be determined as: unrecorded label.
[0107] The output of the language model may include: the probability of local association candidates, and / or information about the generalized labels corresponding to the local association candidates.
[0108] In one implementation, the above generalization processing result can be input into a language model to obtain local association candidates output by the language model, and determine the first generalization label corresponding to the local association candidate.
[0109] 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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] Since the local association candidate information output by the language model can have a high degree of accuracy, on this basis, step 303 performs cloud processing based on the above local association candidates, which can improve the accuracy of cloud request processing.
[0114] In step 303, the following processing methods for performing cloud processing may be provided:
[0115] Processing method A: if the word candidate hits the generalized tag of the first type, a cloud request is sent; and / or
[0116] Processing method B: if the local association candidate hits the generalized label of the first type, a cloud request is sent; and / or
[0117] Processing method C: if the local association candidate hits the second type of generalized label, no cloud request is sent; and / or
[0118] Processing method D: If the probability fusion value of the local association candidates corresponding to multiple word candidates does not exceed the first threshold, a cloud request is sent.
[0119] For processing method A, the generalization labels of the first type can characterize the information of the topic. When the word candidate involves a topic, the information of the topic can be associated with the help of the server. Therefore, in this case, a cloud request can be sent.
[0120] The first type specifically includes: entity type or unrecorded type. The entity type can correspond to the topics that the language model can recognize. The unrecorded type can correspond to the topics that the language model cannot recognize.
[0121] For example, the word candidate "Jay Chou" hits the <singer> label of the entity type, which indicates that the word candidate involves the <singer> topic. Therefore, a cloud request can be sent to request the association result corresponding to the <singer> topic from the cloud.
[0122] 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 corresponding generalization label (such as <goldfish variety>) in the mapping relationship. In this case, the generalization label corresponding to "national lion" can be determined as: unrecorded label. The unrecorded type can correspond to the topics that the language model cannot recognize. In this case, the information of the topic can be associated with the help of the server. Therefore, a cloud request can be sent.
[0123] In practical applications, Q target word candidates can be matched with the characters corresponding to the generalization labels 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 label of the first type.
[0124] For processing methods B to D, based on the information of the local association candidates, it can be judged whether the local can provide accurate association candidates, and thus cloud processing can be performed. Generally speaking, if the local can provide accurate association candidates, a cloud request may not be sent. On the contrary, if the local cannot provide accurate association candidates, a cloud request can be sent.
[0125] For processing method D, the probability fusion value of the local association candidates corresponding to multiple word candidates can characterize 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 indicate that the accuracy of the local association candidates is relatively high. In this case, a cloud request may not be sent. Otherwise, if the probability fusion value does not exceed the first threshold, it can indicate that the accuracy of the local association candidates is relatively low. In this case, a cloud request can be sent to request cloud association candidates with higher accuracy from the cloud.
[0126] In practical applications, M local association candidates with the highest probability may be obtained for a single one of the Q local association candidates. The value of M may 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 may be 3.
[0127] 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.
[0128] 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.
[0129] 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:
[0130] P3=(P2[1][1]+P2[1][2]+P2[1][M])+
[0131] (P2[2][1]+P2[2][2]+P2[2][M])+
[0132] …+
[0133] (P2[Q][1]+P2[Q][2]+P2[Q][M])
[0134] For processing method C and processing method D, it can be determined 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 processing method C and processing method D can be candidates whose probability exceeds the second threshold. In other words, it can be determined whether the local association candidates whose probability exceeds the second threshold hit the first type or the second type of generalized label.
[0135] For processing method C, 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 request can be sent to request the specific name of <song> from the cloud.
[0136] 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.
[0137] Unrecorded generalized labels 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 request to request more accurate cloud association candidates from the cloud.
[0138] Processing method D corresponds to the situation 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.
[0139] The second type may specifically include: a number type, an end type, or a punctuation type.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] The above describes in detail the process of cloud processing through processing methods A to D. It can be understood that those skilled in the art can adopt any one or a combination of processing methods 1 to 4 according to actual application requirements.
[0144] For example, you can first use processing method A to perform cloud processing. If the word candidate hits the first type of generalized label, send a cloud request; otherwise, if the word candidate does not hit the first type of generalized label, use any one or a combination of processing methods B to D to perform cloud processing.
[0145] In a specific implementation, the judgment result of performing cloud processing specifically includes: sending a cloud request, or not sending a cloud request.
[0146] In the case of sending a cloud request, the cloud association candidates returned by the server can be received and displayed. Optionally, the cloud association candidates and word candidates can be jointly displayed. The cloud association candidates and word candidates can be located in different candidate areas. For example, the word candidates are located in the Q candidate positions of the first candidate area. In another example, the cloud association candidates are located in the M candidate positions of the second candidate area, and the cloud association candidates are marked with a preset logo, such as a cloud logo, to indicate that the cloud association candidates are provided by the cloud.
[0147] Without sending a cloud 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.
[0148] In summary, the request processing method of the embodiment of the present invention performs cloud processing according to the type of generalized label hit by the word candidate, and can perform cloud processing according to whether the word candidate involves a topic, which can improve the accuracy of cloud 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 request can be sent.
[0149] In addition, the embodiment of the present invention performs cloud processing according to the type of generalized label hit by the local association candidate, and can perform cloud processing according to whether the local association candidate involves a topic, which can improve the accuracy of cloud request processing. For example, when the local association candidate involves a topic, the server can be used to associate the information of the topic, so in this case, a cloud request can be sent.
[0150] In addition, the embodiment of the present invention performs cloud processing 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. Performing cloud processing based on the accuracy of the local association candidate can improve the accuracy of cloud 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 request can be sent.
[0151] 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.
[0152] Device Embodiment
[0153] Reference Figure 4 , shows a structural block diagram of an embodiment of a request processing device of the present invention, which is applied to a client and may specifically include: an end probability determination module 401 and a cloud processing module 402.
[0154] The end probability determination module 401 is used to determine the probability that the next character of the current input string is the end character according to the user's historical input string;
[0155] The cloud processing module 402 is used to perform cloud processing according to the probability that the next character of the current input string is the end character.
[0156] Optionally, the end probability determination module may include:
[0157] The first probability determination module is used to determine the probability that the next character of the current input string is the end character according to the language model established based on the user's historical input string.
[0158] Optionally, the end probability determination module may include:
[0159] The second probability determination module is used to determine the probability that the next character of the current input string is the end character according to the classification model established based on the user's historical input string.
[0160] Optionally, the cloud processing module may include:
[0161] The fusion processing module is used to perform cloud processing based on the probability that the next character of the current input string is the end character, the length information of the current input string, and / or the time information corresponding to the current input string.
[0162] Optionally, the cloud processing is performed according to the probability that the next character of the current input string is the terminator, the length information of the current input string, and / or the time information corresponding to the current input string, and may include:
[0163] A first processing module is used to perform cloud processing according to the probability that the next character of the current input string is the terminator and the relationship information between the length information of the current input string and the average length of the historical input string; or
[0164] A second processing module is used to perform cloud processing according to the probability that the next character of the current input string is the end character and the relationship information between the time information corresponding to the current input string and the mean time interval of the historical input string; or
[0165] The third processing module is used to perform cloud processing based on the probability that the next character of the current input string is the end character, the relationship information between the length information of the current input string and the average length of the historical input strings, and the relationship information between the time information corresponding to the current input string and the average time interval of the historical input strings.
[0166] Optionally, the device may further include:
[0167] A candidate determination module, used to determine word candidates corresponding to the current input string, and / or determine local association candidates corresponding to the previous text and the current input string;
[0168] The association-based processing module is used to perform cloud processing according to the type of generalized label of the word candidate hit, and / or according to the type of generalized label of the local association candidate hit, and / or according to the probability information of the local association candidate.
[0169] Optionally, the above-mentioned association-based processing module specifically includes:
[0170] a first associative processing module, configured to send a cloud request if the word candidate hits a first type of generalized tag; and / or
[0171] a second association processing module, configured to send a cloud request if the local association candidate hits a generalized tag of the first type; and / or
[0172] a third association processing module, configured to not send a cloud request if the local association candidate hits a second type of generalized tag; and / or
[0173] The fourth association processing module is used to send a cloud request if the probability fusion values of the local association candidates corresponding to the multiple word candidates do not exceed the first threshold.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] 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. The one or more programs include instructions for performing the following operations: determining the probability that the next character of the current input string is an end character based on the user's historical input string; and performing cloud processing based on the probability that the next character of the current input string is an end character.
[0178] 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.
[0179] 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 .
[0180] 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.
[0181] 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.
[0182] 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.
[0183] 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.
[0184] 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.
[0185] 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.
[0186] 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.
[0187] 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.
[0188] 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.
[0189] 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.
[0190] 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.
[0191] 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.
[0192] 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.
[0193] 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 the probability that the next character of the current input string is an end character based on the user's historical input string; and performing cloud processing based on the probability that the next character of the current input string is an end character.
[0194] 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.
[0195] 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.
[0196] 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.
[0197] 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. < / unk> < / unk> < / unk>
Claims
1. A request processing method, characterized in that: Applied to a client, the method comprises: According to the user's historical input string, determine the probability that the next character of the current input string is the end character; According to the probability that the next character of the current input string is the end character, cloud processing is performed; The cloud processing is performed according to the probability that the next character of the current input string is the end character, including: Cloud processing is performed based on the probability that the next character of the current input string is the end character, the length information of the current input string, and / or the time information corresponding to the current input string.
2. The method according to claim 1, characterized in that The determining of the probability that the next character of the current input string is the terminator comprises: According to the language model established based on the user's historical input string, the probability that the next character of the current input string is the end character is determined.
3. The method according to claim 1, characterized in that The determining of the probability that the next character of the current input string is the terminator comprises: According to the classification model established based on the user's historical input string, the probability that the next character of the current input string is the end character is determined.
4. The method according to claim 1, characterized in that The cloud processing is performed according to the probability that the next character of the current input string is the terminator, the length information of the current input string, and / or the time information corresponding to the current input string, including: Perform cloud processing based on the probability that the next character of the current input string is the terminator and the relationship between the length information of the current input string and the average length of the historical input strings; or Perform cloud processing based on the probability that the next character of the current input string is the end character and the relationship information between the time information corresponding to the current input string and the mean time interval of the historical input string; or Cloud processing is performed based on the probability that the next character of the current input string is the end character, the relationship information between the length information of the current input string and the average length of the historical input strings, and the relationship information between the time information corresponding to the current input string and the average time interval of the historical input strings.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Determine word candidates corresponding to the current input string, and / or determine local association candidates corresponding to the previous text and the current input string; Cloud processing is performed based on the type of generalized label of the word candidate hit, and / or based on the type of generalized label of the local association candidate hit, and / or based on the probability information of the local association candidate.
6. The method according to claim 5, characterized in that The cloud processing is performed according to the type of the generalized label of the word candidate hit, and / or according to the type of the generalized label of the local association candidate hit, and / or according to the probability information of the local association candidate, including: If the word candidate hits a first type of generalized tag, sending a cloud request; and / or If the local association candidate hits the generalized tag of the first type, sending a cloud request; and / or If the local association candidate hits the second type of generalized tag, no cloud request is sent; and / or If the probability fusion values of the local association candidates corresponding to the multiple word candidates do not exceed the first threshold, a cloud request is sent.
7. A request processing device, characterized in that: Applied to a client, the device comprises: The end probability determination module is used to determine the probability that the next character of the current input string is the end character according to the user's historical input string; A cloud processing module is used to perform cloud processing according to the probability that the next character of the current input string is the end character; The fusion processing module is used to perform cloud processing based on the probability that the next character of the current input string is the end character, the length information of the current input string, and / or the time information corresponding to the current input string.
8. The device according to claim 7, characterized in that The end probability determination module includes: The first probability determination module is used to determine the probability that the next character of the current input string is the end character according to the language model established based on the user's historical input string.
9. The device according to claim 7, characterized in that The end probability determination module includes: The second probability determination module is used to determine the probability that the next character of the current input string is the end character according to the classification model established based on the user's historical input string.
10. The device according to claim 7, characterized in that The fusion processing module includes: A first processing module is used to perform cloud processing according to the probability that the next character of the current input string is the terminator and the relationship information between the length information of the current input string and the average length of the historical input string; or A second processing module is used to perform cloud processing according to the probability that the next character of the current input string is the end character and the relationship information between the time information corresponding to the current input string and the mean time interval of the historical input string; or The third processing module is used to perform cloud processing based on the probability that the next character of the current input string is the end character, the relationship information between the length information of the current input string and the average length of the historical input strings, and the relationship information between the time information corresponding to the current input string and the average time interval of the historical input strings.
11. The device according to any one of claims 7 to 9, characterized in that The device also includes: A candidate determination module, used to determine word candidates corresponding to the current input string, and / or determine local association candidates corresponding to the previous text and the current input string; The association-based processing module is used to perform cloud processing according to the type of generalized label of the word candidate hit, and / or according to the type of generalized label of the local association candidate hit, and / or according to the probability information of the local association candidate.
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, cause an apparatus to perform a request processing method as claimed in one or more of claims 1 to 6.
Citation Information
Patent Citations
Association method, device, apparatus and readable storage medium of input method
CN109634436A