Request processing methods, apparatus and media

By generalizing the above text and judging the generalized tags, the problem of frequent cloud association requests from the client is solved, the accuracy and intelligence of the association candidates are improved, and network resources and cloud burden are saved.

CN115509370BActive Publication Date: 2026-04-03BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-07
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Frequent cloud association requests from clients lead to high network resource consumption and increase the processing burden on the cloud, a problem that current technologies have not been able to effectively solve.

Method used

By generalizing the above text, the generalization result is determined. Based on whether the generalization result contains a specific type of generalization label or local association candidate information, it is determined whether to send a cloud association request. The generalization result of the language model is used to identify and process unrecorded characters, thereby improving the accuracy of local association candidate information.

Benefits of technology

It improves the accuracy of local association candidate information and the intelligence of judgment results, saves network resources on the client side and reduces the processing burden on the server side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509370B_ABST
    Figure CN115509370B_ABST
Patent Text Reader

Abstract

This invention provides a request processing method, apparatus, and medium. The method specifically includes: determining a generalization processing result corresponding to the preceding text; determining whether to send a cloud association request based on whether the generalization processing result contains a first type of generalized tag, and / or, based on local association candidate information corresponding to the generalization processing result; wherein the local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing. This invention can save network resources on the client side and reduce the processing burden on the server side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a request processing method, apparatus, and medium. Background Technology

[0002] Currently, input method programs can provide corresponding suggested suggestions for the words displayed by the user. These suggested suggestions can include local suggestions and / or cloud suggestions. Local suggestions are provided by the client, while cloud suggestions are provided by the cloud. Because the cloud relies on cloud computing technology and the powerful storage and computing capabilities of server clusters, the quality of cloud suggested suggestions is generally higher than that of local suggestions.

[0003] Currently, to improve the quality of suggested cloud recommendations, clients typically make frequent cloud recommendation requests. For example, upon detecting the update mentioned above, a cloud recommendation request is immediately sent to the cloud.

[0004] In implementing the embodiments of the present invention, the inventors discovered that frequent cloud association requests from the client often consume a lot of network resources and increase the processing burden on the cloud. Summary of the Invention

[0005] This invention provides a request processing method, apparatus, and medium. How to save network resources on the client and reduce the processing burden on the server is a technical problem that needs to be solved by those skilled in the art.

[0006] To address the aforementioned problems, this invention discloses a request processing method applied to a client, the method comprising:

[0007] Determine the generalization result corresponding to the above text;

[0008] Based on whether the generalization result contains a first type of generalization tag, and / or based on the local association candidate information corresponding to the generalization result, determine whether to send a cloud association request;

[0009] The local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing.

[0010] On the other hand, embodiments of the present invention disclose a request processing apparatus applied to a client, the apparatus comprising:

[0011] The generalization module is used to determine the generalization result corresponding to the above text; and

[0012] The judgment module is used to determine whether to send a cloud association request based on whether the generalization processing result contains a first type of generalization tag, and / or based on the local association candidate information corresponding to the generalization processing result.

[0013] The local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing.

[0014] In another aspect, embodiments of the present invention disclose an apparatus for processing requests, including a memory and one or more programs, wherein one or more programs are stored in the memory, and when the programs are executed by one or more processors, they implement the steps of the aforementioned method.

[0015] In another aspect, embodiments of the present invention disclose a machine-readable medium having instructions stored thereon that, when executed by one or more processors, cause a device to perform one or more of the aforementioned request processing methods.

[0016] The embodiments of the present invention have the following advantages:

[0017] In this embodiment of the invention, the vocabulary corresponding to the language model may include characters that have undergone generalization processing. Therefore, the language model has the ability to recognize and process the generalization processing results. Thus, by providing the language model with the generalization processing results corresponding to the preceding text, the language model processes these results. On the one hand, this allows the language model to process based on the semantic information contained in the generalization processing results; on the other hand, if the preceding text contains unrecorded characters, the generalization processing results corresponding to these unrecorded characters can be recognized and processed by the language model, thereby increasing the range of characters that the language model can recognize. These two aspects improve the accuracy of the local associative candidate information output by the language model.

[0018] Furthermore, while improving the accuracy of local association candidate information, this embodiment of the invention determines whether to send a cloud association request based on the aforementioned local association candidate information, thereby improving the accuracy of the judgment result and the intelligence of the request processing.

[0019] Furthermore, this embodiment of the invention determines whether to send a cloud association request based on whether the generalization processing result contains a first type of generalized tag. It can also determine whether to send a cloud association request based on whether the preceding text relates to a topic, thereby improving the accuracy of the judgment and the intelligence of the request processing. For example, if the preceding text relates to a topic, the server can use its information to associate the topic; therefore, in this case, a cloud association request can be sent.

[0020] In summary, this embodiment of the invention sends a cloud association request only when the determination result is yes. Since a cloud association request can be avoided when the determination result is no, it saves network resources on the client side and reduces the processing burden on the server side. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

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

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

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

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

[0026] Figure 5 These are schematic diagrams of the server structure in some embodiments of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] The embodiments of this invention can be applied to input method application scenarios. An input method refers to an encoding method used to input various characters into a computer or other devices (such as mobile phones and tablets). Specifically, input methods can include traditional input methods and cloud input methods.

[0029] Traditional input methods, limited by the local computer's memory capacity and CPU capabilities, use relatively small dictionaries and language models, resulting in limited input accuracy. Cloud input methods, relying on cloud computing technology, leverage the powerful storage and computing capabilities of server clusters, possessing unparalleled advantages over traditional input methods: larger and more up-to-date dictionaries and more advanced language models. These advantages significantly improve input accuracy.

[0030] The predictive suggestions provided by the input method program may include: local predictive suggestions and / or cloud predictive suggestions; local predictive suggestions are provided by the client, and cloud predictive suggestions are provided by the cloud.

[0031] Currently, to improve the quality of suggested cloud suggestions, clients often make frequent cloud suggestion requests. For example, upon detecting the update mentioned above, a cloud suggestion request is immediately sent to the cloud. However, frequent cloud suggestion requests from clients often consume significant network resources and increase the processing burden on the cloud.

[0032] To address the technical problem of saving network resources on the client side and reducing the processing burden on the server side, this invention provides a request processing scheme, which may include: determining the generalization processing result corresponding to the above text; determining whether to send a cloud association request based on whether the generalization processing result contains a first type of generalized tag, and / or based on the local association candidate information corresponding to the generalization processing result; wherein the local association candidate information may be obtained based on a language model, and the vocabulary corresponding to the language model may include characters that have undergone generalization processing.

[0033] In this embodiment of the invention, generalization can refer to expanding the specific and individual to the general. Data typically contains detailed information at the original conceptual level; therefore, the generalization process in this embodiment can abstract data from a lower conceptual level to a higher conceptual level, using higher-level concepts to represent lower-level concepts. For example, <place name> represents "Xi'an," and <person's name> represents "name," and so on. <num4>Alternatively, you can use "year" to represent "2018", use "punctuation" to represent "", or use "end marker" to indicate the end of text input, etc.

[0034] In this embodiment of the invention, the preceding text is generalized, and the resulting generalization result can contain the corresponding semantic information. For example, traditional language models usually interpret "2018" as a quantifier, while the generalization process in this embodiment can interpret a string of numbers of length 4 as a <year>, thereby enabling the generalization result to contain deeper semantic information.

[0035] The first type of generalized tag can represent topic information. In this embodiment of the invention, the determination of whether to send a cloud association request is based on whether the generalization processing result contains a first type of generalized tag. This can be determined by whether the preceding text relates to the topic; a cloud association request is only sent if the determination result is yes. Since a cloud association request can be avoided if the determination result is no, it saves network resources on the client side and reduces the processing burden on the server side. For example, if the preceding text relates to the topic, the server can perform association on the topic information; therefore, in this case, a cloud association request can be sent.

[0036] A language model is an abstract mathematical model of language based on objective linguistic facts, and it can establish a certain correspondence between the language model and objective linguistic facts. Specifically, in the embodiments of this invention, the language model can be used to predict the results of generalization processing to obtain local associative candidate information corresponding to the generalization processing results.

[0037] A language model's vocabulary represents the range of characters the model can recognize. The vocabulary is typically finite; for example, a vocabulary of 10,000 characters means it contains 10,000 characters. A finite vocabulary usually cannot cover all characters; therefore, a language model often cannot recognize characters not present in the vocabulary. These unrecorded characters are called unrecorded characters.

[0038] In this embodiment of the invention, the vocabulary corresponding to the language model may include characters that have undergone generalization processing. Therefore, the language model has the ability to recognize and process the generalization processing results. Thus, by providing the language model with the generalization processing results corresponding to the preceding text, the language model processes these results. On the one hand, this allows the language model to process based on the semantic information contained in the generalization processing results; on the other hand, if the preceding text contains unrecorded characters, the generalization processing results corresponding to these unrecorded characters can be recognized and processed by the language model, thereby increasing the range of characters that the language model can recognize. These two aspects improve the accuracy of the local associative candidate information output by the language model.

[0039] While improving the accuracy of local association candidate information, this embodiment of the invention determines whether to send a cloud association request based on the aforementioned local association candidate information, thereby improving the accuracy of the determination result and the intelligence of request processing. This embodiment of the invention sends a cloud association request only when the determination result is yes. Since a cloud association request can be avoided when the determination result is no, it saves network resources on the client side and reduces the processing burden on the server side.

[0040] The request processing method provided in this embodiment of the invention can be applied to Figure 1 In the application environment shown, such as 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 interact with each other through the wired or wireless network.

[0041] Optionally, the client 100 can run on a terminal, which specifically includes, but is not limited to: smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, in-vehicle computers, desktop computers, set-top boxes, smart TVs, wearable devices, etc. The client 100 can correspond to a website or an app (application). The client 100 can correspond to applications such as input method apps.

[0042] In this embodiment of the invention, the server can be a cloud server (cloud). The cloud is a simple, efficient, secure, reliable, and elastically scalable computing service. The resource information in the cloud is dynamic, which makes its processing capacity elastically scalable.

[0043] In this embodiment of the invention, candidates can be used to represent one or more characters provided by the input method program to be selected by the user. Candidates can be characters from languages ​​such as Chinese, English, and Japanese, and can also be combinations of emoticons, images, etc. Emoticons include, but are not limited to, pictures composed of lines, symbols, and characters. Examples of emoticons include: ":P", ":-o", ":-)", etc.

[0044] Associative suggestions can be based on the suggestions obtained above. Local associative suggestions can be provided by the client's local language model. Cloud associative suggestions can be provided by the language model in the cloud.

[0045] Method Example 1

[0046] This embodiment illustrates the language model.

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

[0048] The N-gram language model is based on the assumption that the occurrence of the Nth word is only related to the preceding N-1 words and not to any other words, and the probability of the whole sentence is the product of the probabilities of each word.

[0049] Compared to N-gram language models, one advantage of neural network language models is that they can truly and fully utilize the variable-length preceding context to predict the next word. Therefore, neural network language models can process word sequences of variable length. Neural network language models can further include: RNNLM (Recurrent Neural Network) language models, CNNLM (Convolutional Neural Network) language models, LSTM (Long Short-Term Memory) language models, etc.

[0050] A language model can provide P(any element | context, ...), which represents the probability of any element given the context. Elements can serve as sources of association candidates. Besides the context, these conditions can also include information such as input environment features and language style.

[0051] In practical applications, the corpus can be processed such as word segmentation to obtain a vocabulary corresponding to the language model. Furthermore, the language model can be trained based on the corpus and the vocabulary. The aforementioned corpus may specifically include: spoken chat corpus, written corpus, web page corpus, etc. It is understood that this embodiment of the invention does not limit the specific corpus used.

[0052] The vocabulary of this invention may include: generalized characters, which can be referred to as generalized tags.

[0053] In practical implementation, characters can be generalized based on the mapping relationship between characters and generalized tags to obtain the corresponding generalized tags. The relationship between characters and generalized tags is usually many-to-one; therefore, converting characters into generalized tags for storage can reduce the vocabulary space. Of course, in addition to generalized tags, the vocabulary can also include characters.

[0054] Those skilled in the art can determine the type of generalized tag based on actual application requirements.

[0055] For example, the types of generalized tags can include:

[0056] Entity types, such as using <singer> to represent the singer's name, <location> to represent the location name, and <song> to represent the song title, etc.;

[0057] Punctuation type, for example, use <punctuation> to represent punctuation marks such as tilde and comma;

[0058] Number types, using <num4>To represent "2018", use <num5>To represent "10086", using <num11>This indicates an 11-digit mobile phone number;

[0059] End type: Use end markers such as <\s> to indicate the end of text input;

[0060] Unrecorded type, using <unki>Denote an out-of-vocabulary word with length i; and so on.

[0061] In a specific implementation, the corpus can be generalized, and the language model can be trained according to the generalized corpus.

[0062] Generalizing the corpus specifically includes: converting at least some characters in the corpus into corresponding generalization tags. For example, converting "Wudaokou" in the corpus "I + go to + Wudaokou + work in the morning" into <location>, so that the generalized corpus can be: "I + go to + <location> + work in the morning".

[0063] The generalized corpus can include: generalization tags. In the process of training the language model according to the generalized corpus, the word vectors of the generalization tags and the parameters of the language model can be trained, thereby enabling the language model to have the recognition and processing capabilities of the generalization tags.

[0064] In summary, the embodiments of the present invention train the language model according to the generalized corpus. On the one hand, the language model can process according to the semantic information contained in the generalization result; on the other hand, in the case where the above text contains out-of-vocabulary characters, the generalization result corresponding to the out-of-vocabulary characters can be recognized and processed by the language model, so the character range 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.

[0065] Moreover, the embodiments of the present invention can also convert the characters in the vocabulary into generalization tags for storage, which can reduce the vocabulary space.

[0066] Method Embodiment Two

[0067] Refer to Figure 2 , which shows the step flowchart of an embodiment of the request processing method of the present invention, and specifically may include the following steps:

[0068] Step 201, determine the generalization result corresponding to the above text;

[0069] Step 202, determine whether to send a cloud association request according to whether the above generalization result contains a first type of generalization tag, and / or according to the local association candidate information corresponding to the above generalization result;

[0070] Among them, the above local association candidate information can be obtained according to the language model, and the vocabulary corresponding to the above language model can include: generalized characters.

[0071] Figure 2 The method embodiments shown can be executed by a client. It can be understood that the embodiments of the present invention do not limit the specific execution entity of the method embodiments.

[0072] In step 201, the above text can refer to the part before the input cursor. According to one embodiment, the above text can include: the most recent or multiple recent content that has been input onto the screen. According to another embodiment, the above text can include: in a communication scenario, the communication content sent by the communication counterpart. For example, in an instant messaging scenario, after user A receives the communication content "People from Africa come to Xi'an to escape the heat" sent by user B and clicks on the input box to input, an input cursor can appear in the input box. Since the communication content is before the input cursor in the communication window, this communication content can be used as the above text. It can be understood that the embodiments of the present application do not limit the specific above text.

[0073] The above text can be generalized to obtain a corresponding generalization result.

[0074] Generalizing the above text specifically includes: converting at least some characters in the above text into corresponding generalization tags. In practical applications, the above text can be segmented, and according to the mapping relationship between the characters and the generalization tags, at least some characters in the above text are converted.

[0075] For example, converting "Jay Chou" in the above text B "I + recently + became obsessed with + Jay Chou +'s" to <singer>. In this way, the above text B after generalization can be: "I + recently + became obsessed with + <singer> +'s".

[0076] It should be noted that if the characters in the above text do not match the mapping relationship, the characters in the above text may not be generalized. In this case, the generalization result can be the same as the above text. For example, assuming that the characters in the above text A "Alright, goodbye" do not match the mapping relationship, the generalization result corresponding to the above text A can be the same as the above text.

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

[0078] In step 202, the generalization result can be provided to the language model, and the language model processes the returned processing result. Specifically, the language model can make predictions for the generalization result to obtain local association candidate information corresponding to the generalization result.

[0079] Local association candidate information may include: the probability of local association candidates, and / or, information about the generalized tags corresponding to the local association candidates.

[0080] In a practical implementation, the language model can output one or both of the aforementioned local association candidate information.

[0081] For example, the generalization result is input into a language model to obtain local association candidates output by the language model, and the first generalization label corresponding to the local association candidate is determined.

[0082] The local association candidates output by the language model can be local association candidates whose probabilities meet a preset probability condition. The preset probability condition can be: the top M local association candidates with the highest probability in descending order, where M can be a positive integer. Furthermore, based on the local association candidates, a search can be performed in the above mapping relationship, and the generalized label obtained from the search can be used as the first generalized label.

[0083] For example, the generalization processing result is input into a language model to obtain the second generalization label corresponding to the local association candidate output by the language model, and the local association candidate corresponding to the second generalization label is determined.

[0084] The second generalized label output by the language model can be a generalized label whose probability meets a preset probability condition. The preset probability condition can be the top P generalized labels with the highest probability in descending order, where P can be a positive integer. Furthermore, based on the second generalized label, a search can be performed within the above mapping relationship, and the searched character can be used as a local association candidate.

[0085] For example, the generalization result can be input into a language model to obtain the local association candidates and their corresponding generalized labels output by the language model.

[0086] Since the local association candidate information output by the language model has high accuracy, determining whether to send a cloud association request based on this local association candidate information can improve the accuracy of the judgment result and the intelligence of the request processing.

[0087] The embodiments of the present invention can provide the following method for determining whether to send a cloud association request:

[0088] Judgment Method 1: If the fused probability values ​​of the top M local association candidates (ranked from largest to smallest) do not exceed the first threshold, then send a cloud association request; and / or

[0089] Judgment Method 2: If the local association candidate corresponds to the first type of generalized tag, then send a cloud association request; and / or

[0090] Judgment Method 3: If the local association candidate corresponds to the second type of generalized tag, then do not send a cloud association request; and / or

[0091] Judgment Method 4: If the above generalization processing result contains a generalization tag of the first type, then send a cloud association request.

[0092] For judgment methods 1 to 3, we can determine whether the local system can provide accurate association candidates based on the local association candidate information, and thus decide whether to send a cloud association request. Generally speaking, if the local system can provide accurate association candidates, then a cloud association request does not need to be sent. Conversely, if the local system cannot provide accurate association candidates, then a cloud association request can be sent.

[0093] For judgment method 1, the probability fusion value of the top M local association candidates, ranked from highest to lowest, can characterize the accuracy of the local association candidates. Generally, if the probability fusion value exceeds a first threshold, it indicates that the accuracy of the local association candidate is high; in this case, a cloud association request does not need to be sent. Otherwise, if the probability fusion value does not exceed the first threshold, it indicates that the accuracy of the local association candidate is low; in this case, a cloud association request can be sent to request a more accurate cloud association candidate from the cloud.

[0094] The value of M can be determined based on the number of Lenovo candidates displayed on the first screen. Specifically, if the number of Lenovo candidates displayed on the first screen is 5, then the value of M can be 5.

[0095] For judgment methods 2 and 3, the local system can determine whether it is capable of providing accurate local association candidates based on the type of generalized tag corresponding to the local association candidate. The local association candidates in judgment methods 2 and 3 can be candidates whose probability exceeds the second threshold. In other words, for local association candidates whose probability exceeds the second threshold, it can be determined whether they correspond to a first-type or second-type generalized tag.

[0096] For judgment method 2, the first type of generalized tag can represent the information of the topic. When the local association candidate involves the topic, the information of the topic can be associated with the server. Therefore, in this case, a cloud association request can be sent.

[0097] The first type specifically includes: entity types, or unrecorded types. Entity types correspond to topics that the language model can recognize. Unrecorded types correspond to topics that the language model cannot recognize.

[0098] For entity types, the language model can determine the topic corresponding to the preceding text and predict the generalized label of the entity type corresponding to that topic based on the semantic information contained in the generalization processing result, but it cannot predict the specific character corresponding to the generalized label of the entity type.

[0099] For example, if the generalized tag for an entity type is "<song>", it means that the local system can predict that the next candidate should be of type "<song>", but it doesn't know the specific name of "<song>". In this case, a cloud association request can be sent to retrieve the specific name of "<song>" from the cloud.

[0100] For example, if the generalized context B is "I've recently become obsessed with <singer>", the user would typically expect the associated result to be "a song" or "a variety show". The local language model can predict a generalized label that represents the type of associated result based on the generalization result. For example, based on the generalized context B, the language model outputs the generalized label "<song>".

[0101] Unrecorded generalized tags can represent characters that do not exist in the vocabulary of a language model. For example, in the above text C, which is "Speaking of + goldfish +, +he + most + likes +", the user's expected association result would generally be "a certain goldfish breed". However, the language model's vocabulary does not contain a generalized tag corresponding to <goldfish breed>, nor does it contain a specific character corresponding to <goldfish breed>. In this case, the generalized tag output by the language model can be: unrecorded tag. Therefore, this embodiment of the invention can send a cloud association request to request more accurate cloud association candidates from the cloud.

[0102] The scenario corresponding to judgment method 3 is that the local machine is capable of processing the second type of generalized tags. Specifically, the local machine is capable of predicting the specific character corresponding to the second type of generalized tags, or the specific character corresponding to the second type of generalized tags can be input by the user, or the prediction of the specific character corresponding to the second type of generalized tags is not required.

[0103] The second type can specifically include: number type, end type, or punctuation type.

[0104] For example, if A in the previous text is "Okay, goodbye," then there's not much to say in the following text. The most probable generalized label output by the language model is the "end" type. Since the end-type generalized label indicates the end of text input, in this case, no suggested suggestions need to be provided to reduce the disruption to the user caused by suggestions that don't meet their needs.

[0105] For example, if a language model outputs generalized labels for numbers, it can leverage local capabilities to predict these generalized labels. For instance, the generalized label for a number might be... <num11>,because <num11>This indicates an 11-digit mobile phone number, so the corresponding mobile phone number can be searched in the local address book, and the search results will be presented as local suggested search terms.

[0106] For example, if the language model outputs generalized tags for punctuation, local capabilities can be used to predict these generalized tags. For instance, if the generalized tag for punctuation is "wavy line," then "wavy line symbol" can be presented as a local associative candidate.

[0107] For judgment method 4, the first type of generalized tag can represent the information of the topic. In the case of topics mentioned above, the server can be used to make associations about the topic information, so in this case, a cloud association request can be sent.

[0108] For example, the generalized text D is: "I recently became obsessed with <singer>". Since the generalized text D contains the entity type <singer> tag, it means that text D is related to the <singer> topic. Therefore, a cloud association request can be sent to request the association results corresponding to the <singer> topic from the cloud.

[0109] For example, in the sentence E above, which is "Speaking of + goldfish +, +he + most + likes + the + national lion", since the language model's vocabulary does not contain "national lion", and there is no generalized label corresponding to "national lion" in the mapping relationship (such as <goldfish breed>), in this case, during the generalization process of the sentence E above, the generalized label corresponding to "national lion" can be determined as: unrecorded label. The unrecorded type can correspond to topics that the language model cannot recognize. In this case, the server can be used to associate information about the topic, so a cloud association request can be sent.

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

[0111] For example, we can first use judgment method 4 to determine whether to send a cloud association request. If the above generalization processing result contains a first type of generalization tag, then send a cloud association request; otherwise, if the above generalization processing result does not contain a first type of generalization tag, then use any or a combination of judgment methods 1 to 3 to determine whether to send a cloud association request.

[0112] In the specific implementation, the decision to send a cloud association request includes either sending the cloud association request or not sending the cloud association request.

[0113] When sending a cloud association request, the system can receive cloud association candidates returned by the server and display them. Optionally, it can also jointly display cloud association candidates and local association candidates. For example, cloud association candidates are located in the first j (j can be a positive integer) candidate positions out of M candidate positions, and local association candidates are located in the last (Mj) candidate positions out of M candidate positions.

[0114] Local association candidates can be displayed without sending cloud association requests. The displayed local association candidates can be provided by the language model and / or determined based on the generalized labels output by the language model. In practical applications, local association candidates can be displayed in M ​​candidate positions on the first screen.

[0115] In summary, the request processing method of this embodiment of the invention determines whether to send a cloud association request based on the aforementioned local association candidate information, and / or determines whether to send a cloud association request based on whether the generalization processing result contains a first type of generalization tag.

[0116] In this embodiment of the invention, a cloud association request is sent only if the determination result is yes. Since a cloud association request can be avoided if the determination result is no, this saves network resources on the client side and reduces the processing burden on the server side.

[0117] For example, in the case of topics mentioned above, information about the topic can be associated with the server. Therefore, in this case, a cloud association request can be sent.

[0118] For example, based on local association candidate information, it can be determined whether the local system can provide accurate association candidates, and thus decide whether to send a cloud association request. Generally speaking, if the local system can provide accurate association candidates, a cloud association request need not be sent. Conversely, if the local system cannot provide accurate association candidates, a cloud association request can be sent.

[0119] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of motion actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the motion actions involved are not necessarily required by the embodiments of the present invention.

[0120] Device Examples

[0121] Reference Figure 3 The diagram shows a structural block diagram of an embodiment of a request processing device according to the present invention. The device is applied to a client and may specifically include: a generalization processing module 301 and a judgment module 302.

[0122] Among them, the generalization processing module 301 is used to determine the generalization processing result corresponding to the above text;

[0123] The judgment module 302 is used to determine whether to send a cloud association request based on whether the generalization processing result contains a first type of generalization tag, and / or based on the local association candidate information corresponding to the generalization processing result.

[0124] The aforementioned local association candidate information can be obtained from a language model, and the vocabulary corresponding to the language model can include characters that have undergone generalization.

[0125] Optionally, the aforementioned local association candidate information may include: the probability of the local association candidate, and / or, the information of the generalized label corresponding to the local association candidate.

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

[0127] The first judgment module is used to send a cloud association request if the probability fusion value of the top M local association candidates (ranked from largest to smallest) does not exceed a first threshold; and / or

[0128] The second judgment module is used to send a cloud association request if the local association candidate corresponds to the generalized tag of the first type; and / or

[0129] The third judgment module is used to prevent sending a cloud association request if the local association candidate corresponds to a generalized tag of the second type; and / or

[0130] The fourth judgment module is used to send a cloud association request if the generalization result above contains a generalization tag of the first type.

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

[0132] Optionally, the second type mentioned above may include: number type, end type, or punctuation type.

[0133] Optionally, the generalization processing module 301 is specifically used to convert at least some of the characters in the above text into corresponding generalized tags.

[0134] Optionally, the above-mentioned device may further include:

[0135] The first association processing module is used to input the generalization processing result into the language model to obtain the local association candidates output by the language model, and determine the first generalization label corresponding to the local association candidate; or

[0136] The second association processing module is used to input the generalization processing result into the language model to obtain the second generalized label corresponding to the local association candidate output by the language model, and to determine the local association candidate corresponding to the second generalized label.

[0137] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0138] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0139] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0140] This invention provides an apparatus for processing requests, including a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors. The programs include instructions for performing the following operations: determining a generalization result corresponding to the preceding text; determining whether to send a cloud association request based on whether the generalization result contains a first type of generalization tag, and / or based on local association candidate information corresponding to the generalization result; wherein the local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing.

[0141] Figure 4 This is a block diagram illustrating an apparatus 800 for processing requests according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0142] Reference Figure 4 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply 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.

[0143] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0144] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. 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 storage, flash memory, magnetic disk, or optical disk.

[0145] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.

[0146] 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

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

[0148] 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 buttons, volume buttons, power buttons, and lock buttons.

[0149] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0150] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID), Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

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

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

[0153] Figure 5 This is a schematic diagram of the server structure in some embodiments of the present invention. The server 1900 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 1922 (e.g., one or more processors) and memory 1932, and one or more storage media 1930 (e.g., one or more mass storage devices) for storing application programs 1942 or data 1944. The memory 1932 and storage media 1930 can be temporary or persistent storage. The program stored in the storage media 1930 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the server. Furthermore, the CPU 1922 may be configured to communicate with the storage media 1930 and execute the series of instruction operations in the storage media 1930 on the server 1900.

[0154] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input / output interfaces 1958, one or more keyboards 1956, and / or one or more operating systems 1941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0155] A non-transitory computer-readable storage medium that, when 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 handling method shown.

[0156] A non-transitory 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 a generalization result corresponding to the preceding text; determining whether to send a cloud association request based on whether the generalization result contains a first type of generalization tag, and / or, based on local association candidate information corresponding to the generalization result; wherein the local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes: characters that have undergone generalization processing.

[0157] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0158] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

[0159] 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 principles of the present invention should be included within the protection scope of the present invention.

[0160] The foregoing has provided a detailed description of a request processing method, a request processing apparatus, an apparatus for processing requests, and a machine-readable medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention. < / unki>

Claims

1. A request processing method, characterized in that, Applied to a client, the method includes: Determine the generalization result corresponding to the above text; Based on whether the generalization result contains a first type of generalization tag, and / or based on the local association candidate information corresponding to the generalization result, determine whether to send a cloud association request; The local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing. The determination of whether to send a cloud association request includes: If the fused probability values ​​of the top M local association candidates (ranked from highest to lowest) do not exceed the first threshold, then a cloud association request is sent; and / or If the local association candidate corresponds to a generalized tag of the first type, then send a cloud association request; and / or If the local association candidate corresponds to a generalized tag of type 2, then no cloud association request will be sent; and / or If the generalization result contains a first type of generalization label, then send a cloud association request; The first type of generalized tag is used to represent topic information, and the second type of generalized tag is used to represent generalized tags that can be processed locally.

2. The method according to claim 1, characterized in that, The local association candidate information includes: the probability of the local association candidate, and / or, the information of the generalized label corresponding to the local association candidate.

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

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

5. The method according to any one of claims 1 to 4, characterized in that, Determining the generalization result corresponding to the above text includes: Convert at least some of the characters in the above text into the corresponding generalized tags.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The generalization result is input into the language model to obtain the local association candidates output by the language model, and the first generalized label corresponding to the local association candidate is determined; or The generalization result is input into the language model to obtain the second generalization label corresponding to the local association candidate output by the language model, and the local association candidate corresponding to the second generalization label is determined.

7. A request processing apparatus, characterized in that, Applied to a client, the device includes: The generalization module is used to determine the generalization result corresponding to the above text; and The judgment module is used to determine whether to send a cloud association request based on whether the generalization processing result contains a first type of generalization tag, and / or based on the local association candidate information corresponding to the generalization processing result. The local association candidate information is obtained based on a language model, and the vocabulary corresponding to the language model includes characters that have undergone generalization processing. The judgment module is specifically used for: If the fused probability values ​​of the top M local association candidates (ranked from highest to lowest) do not exceed the first threshold, then a cloud association request is sent; and / or If the local association candidate corresponds to a generalized tag of the first type, then send a cloud association request; and / or If the local association candidate corresponds to a generalized tag of type 2, then no cloud association request will be sent; and / or If the generalization result contains a first type of generalization label, then send a cloud association request; The first type of generalized tag is used to represent topic information, and the second type of generalized tag is used to represent generalized tags that can be processed locally.

8. The apparatus according to claim 7, characterized in that, The local association candidate information includes: the probability of the local association candidate, and / or, the information of the generalized label corresponding to the local association candidate.

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

10. The apparatus according to claim 7, characterized in that, The second type includes: number type, end type, or punctuation type.

11. The apparatus according to any one of claims 7 to 10, characterized in that, The generalization processing module is specifically used to convert at least some of the characters in the above text into corresponding generalized tags.

12. An apparatus for processing a request, characterized in that, It includes a memory and one or more programs, one or more of which are stored in the memory, and when the programs are executed by one or more processors, they implement the steps of the method according to any one of claims 1 to 6.

13. A machine-readable medium having instructions stored thereon that, when executed by one or more processors, cause a device to perform a request processing method as described in one or more of claims 1 to 6.

Citation Information

Patent Citations

  • Associative candidate word generation method and device

    CN110858100A

  • Cloud association method and related device

    CN112015281A