A method, device, electronic device and storage medium for processing user requests

By obtaining the target request message on the user side and finding matching alternative request messages in the preset request message set, calculating the similarity and selecting the request message to be pushed, the problem of inaccurate request messages in the prior art is solved, and the server is improved Response efficiency and resource utilization.

CN111831796BActive Publication Date: 2025-02-11BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910300721.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-15
Publication Date
2025-02-11
Estimated Expiration
2039-04-15

AI Technical Summary

Technical Problem

In the prior art, click search prompt method based on keyword matching may push inaccurate request messages, resulting in low server response efficiency and wasting network and processing resources.

Method used

By obtaining the target request message from the user side, finding matching alternative request messages in the preset request message set, and calculating the similarity between each alternative request message and the target request message, thereby selecting the request message to be pushed.

Benefits of technology

Improve server response efficiency, save network and processing resources on the user side and server side, and push request messages are more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111831796B_ABST
    Figure CN111831796B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer processing technology, and in particular to a method, device, electronic device and storage medium for processing user requests. By obtaining a target request message from a user terminal, the present application can find multiple alternative request messages that match the target request message in a preset request message set, that is, firstly preliminarily screen the messages in the preset request message set through the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained can be secondary screened through the similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer processing technology, and in particular to a method, device, electronic device and storage medium for processing user requests. Background Art

[0002] Click-to-search prompts are a method in which the customer service system prompts users with multiple alternative request messages based on the target request message input by the user in real time, such as a customer service question, and asks them to click on them. This method can improve the efficiency and accuracy of user input by matching the target request message that the user wants to search for, while also playing a role in standardizing user input.

[0003] The main way to click on the search prompt is based on keyword matching, that is, matching the request message to be pushed to the user according to the keyword in the target request message entered by the user. However, this method has the problem that the pushed request message may be inaccurate, cannot achieve the search prompt effect, cannot improve the server response efficiency, and wastes the network and processing resources of the user and server. Summary of the invention

[0004] In view of this, the purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for processing user requests, which can improve the server response efficiency and save network and processing resources on the user side and the server side.

[0005] It mainly includes the following aspects:

[0006] In a first aspect, an embodiment of the present application provides a method for processing a user request, the method comprising:

[0007] Get the target request message from the user;

[0008] Based on the target request message, searching for multiple candidate request messages matching the target request message in a preset request message set;

[0009] Calculating the similarity between each candidate request message and the target request message respectively, and selecting a request message to be pushed from the plurality of candidate request messages based on the calculated similarities;

[0010] Send the request message to be pushed to the user terminal.

[0011] In a possible implementation, searching for multiple candidate request messages matching the target request message in a preset request message set based on the target request message includes:

[0012] Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0013] For each of the target words, the candidate request message containing the target word is searched in the preset request message set.

[0014] In a possible implementation, for each of the candidate request messages, calculating the similarity between the candidate request message and the target request message includes:

[0015] Calculating the similarity between the candidate request message and the target request message according to the feature vector of the candidate request message and the feature vector of the target request message;

[0016] Among them, each element in the feature vector of any of the alternative request messages represents the importance of a word contained in the alternative request message in the alternative request message; each element in the feature vector of any of the target request messages represents the importance of a word contained in the target request message in the target request message.

[0017] In a possible implementation manner, the number of dimensions of the feature vector is equal to the total number of all words included in the candidate request message and the target request message.

[0018] In a possible implementation, the importance is determined according to the following steps:

[0019] The importance of the word is determined according to the frequency of occurrence of the corresponding word in the alternative request message or the target request message and the inverse text frequency index of the word.

[0020] In one possible implementation, the frequency of a word is determined according to the following steps:

[0021] taking the ratio between the number of times the word appears in the alternative request message and the number of words included in the alternative request message as the frequency of occurrence of the word in the alternative request message;

[0022] The ratio between the number of times the word appears in the target request message and the number of words included in the target request message is taken as the frequency of occurrence of the word in the target request.

[0023] In one possible implementation, the inverse text frequency index of a word is determined according to the following steps:

[0024] The ratio of the total number of messages in the candidate request message and the target request message to the total number of messages containing the word in the candidate request message and the target request message is used as the inverse text frequency index of the word.

[0025] In a possible implementation manner, the selecting a request message to be pushed from a plurality of candidate request messages based on the calculated similarity includes:

[0026] A request message to be pushed is selected from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0027] In a second aspect, an embodiment of the present application further provides a method for processing a user request, the method comprising:

[0028] Get the target request message from the user;

[0029] Calculating the similarity between each candidate request message in the preset request message set and the target request message respectively, and selecting the request message to be pushed from the plurality of candidate request messages based on the calculated similarity;

[0030] Send the request message to be pushed to the user terminal.

[0031] In a possible implementation manner, respectively calculating the similarity between each candidate request message in the preset request message set and the target request message includes:

[0032] Calculating the similarity between the candidate request message and the target request message according to the semantic vector of the candidate request message and the semantic vector of the target request message;

[0033] The alternative request message and the semantic vector of the alternative request message are stored in association with each other in the preset request message set.

[0034] In a possible implementation manner, after obtaining the target request message of the user terminal, the method further includes:

[0035] Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0036] Input the target word into a preset semantic model and output the word vector of the target word;

[0037] The word vectors of the multiple target words corresponding to the target request message are added together to obtain the semantic vector of the target request message.

[0038] In a possible implementation manner, the selecting a request message to be pushed from a plurality of candidate request messages based on the calculated similarity includes:

[0039] A request message to be pushed is selected from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0040] In a third aspect, an embodiment of the present application provides a device for processing a request message, the device comprising:

[0041] An acquisition module is used to acquire a target request message from a user end;

[0042] A search module, configured to search for multiple candidate request messages matching the target request message in a preset request message set based on the target request message;

[0043] A calculation module, used to calculate the similarity between each candidate request message and the target request message, and select a request message to be pushed from the multiple candidate request messages based on the calculated similarity;

[0044] The sending module is used to send the request message to be pushed to the user terminal.

[0045] In a possible implementation manner, the search module is specifically configured to search for multiple candidate request messages according to the following steps:

[0046] Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0047] For each of the target words, the candidate request message containing the target word is searched in the preset request message set.

[0048] In a possible implementation manner, for each of the candidate request messages, the calculation module is specifically configured to calculate the similarity between the candidate request message and the target request message according to the following steps:

[0049] Calculating the similarity between the candidate request message and the target request message according to the feature vector of the candidate request message and the feature vector of the target request message;

[0050] Among them, each element in the feature vector of any of the alternative request messages represents the importance of a word contained in the alternative request message in the alternative request message; each element in the feature vector of any of the target request messages represents the importance of a word contained in the target request message in the target request message.

[0051] In a possible implementation manner, the number of dimensions of the feature vector is equal to the total number of all words included in the candidate request message and the target request message.

[0052] In a possible implementation manner, the calculation module is further configured to determine the importance according to the following steps:

[0053] The importance of the word is determined according to the frequency of occurrence of the corresponding word in the alternative request message or the target request message and the inverse text frequency index of the word.

[0054] In a possible implementation, the calculation module includes a first calculation unit;

[0055] The first calculation unit is used to determine the frequency of words in the candidate request message according to the following steps:

[0056] taking the ratio between the number of times the word appears in the alternative request message and the number of words included in the alternative request message as the frequency of occurrence of the word in the alternative request message;

[0057] The first computing unit is further configured to determine the frequency of words in the target request message according to the following steps:

[0058] The ratio between the number of times the word appears in the target request message and the number of words included in the target request message is taken as the frequency of occurrence of the word in the target request.

[0059] In a possible implementation, the calculation module further includes a second calculation unit;

[0060] The second calculation unit is used to determine the inverse text frequency index of the word according to the following steps:

[0061] The ratio of the total number of messages in the candidate request message and the target request message to the total number of messages containing the word in the candidate request message and the target request message is used as the inverse text frequency index of the word.

[0062] In a possible implementation, the calculation module further includes a selection unit;

[0063] The selection unit is used to select a request message to be pushed from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0064] In a fourth aspect, an embodiment of the present application further provides a device for processing a user request, the device comprising:

[0065] An acquisition module is used to acquire a target request message from a user end;

[0066] A calculation module, used to calculate the similarity between each candidate request message in the preset request message set and the target request message, and select a request message to be pushed from the multiple candidate request messages based on the calculated similarity;

[0067] The sending module is used to send the request message to be pushed to the user terminal.

[0068] In a possible implementation manner, the calculation module is specifically configured to calculate the similarity according to the following steps:

[0069] Calculating the similarity between the candidate request message and the target request message according to the semantic vector of the candidate request message and the semantic vector of the target request message;

[0070] The alternative request message and the semantic vector of the alternative request message are stored in association with each other in the preset request message set.

[0071] In a possible implementation manner, the processing device further includes a processing module;

[0072] The processing module is used to perform word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0073] The calculation module is further configured to determine the semantic vector of the target request message according to the following steps:

[0074] Input the target word into a preset semantic model and output the word vector of the target word;

[0075] The word vectors of the multiple target words corresponding to the target request message are added together to determine the semantic vector of the target request message.

[0076] In a possible implementation, the calculation module further includes a selection unit;

[0077] The selection unit is used to select a request message to be pushed from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0078] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for processing user requests described in the first aspect or any possible implementation of the first aspect; or execute the steps of the method for processing user requests described in the second aspect or any possible implementation of the second aspect.

[0079] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program executes the steps of the method for processing user requests described in the first aspect or any possible implementation of the first aspect; or executes the steps of the method for processing user requests described in the second aspect or any possible implementation of the second aspect.

[0080] In an embodiment of the present application, by obtaining a target request message from the user end, multiple alternative request messages that match the target request message can be found in a preset request message set, that is, the messages in the preset request message set are first preliminarily screened through the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, a request message to be pushed can be selected from multiple alternative request messages, that is, the multiple alternative request messages obtained are secondary screened through similarity to obtain the request message to be pushed, so that the request message pushed to the user end is more accurate, thereby improving the response efficiency of the server and saving network and processing resources on the user end and the server end.

[0081] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0083] Figure 1 A flowchart of a method for processing a user request provided in Embodiment 1 of the present application is shown;

[0084] Figure 2 A flowchart showing another method for processing a user request provided in the second embodiment of the present application is shown;

[0085] Figure 3 One of the functional module diagrams of a user request processing device provided in the third embodiment of the present application is shown;

[0086] Figure 4 The second functional module diagram of a user request processing device provided in the third embodiment of the present application is shown;

[0087] Figure 5One of the functional module diagrams of another user request processing device provided in the fourth embodiment of the present application is shown;

[0088] Figure 6 A second functional module diagram of another user request processing device provided in the fourth embodiment of the present application is shown;

[0089] Figure 7 A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application is shown. DETAILED DESCRIPTION

[0090] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0091] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0092] In order to enable those skilled in the art to use the contents of this application, the following implementation method is given in combination with the specific application scenario of "processing user requests in an online customer service scenario". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.

[0093] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario where user request processing is required. The embodiments of the present application are not limited to specific application scenarios. Any scheme of the user request processing method and device provided by the embodiments of the present application is within the scope of protection of the present application.

[0094] It is worth noting that before the present application was proposed, the main method of clicking on the search prompt in the existing solution was based on keyword matching, that is, matching the request message to be pushed to the user according to the keyword in the target request message input by the user. However, this method has the problem that the pushed request message may be inaccurate, cannot achieve the search prompt effect, cannot improve the server response efficiency, and thus wastes the network and processing resources of the user and server ends.

[0095] In response to the above problems, the embodiments of the present application can find multiple alternative request messages that match the target request message in the preset request message set by obtaining the target request message of the user terminal, that is, the messages in the preset request message set are preliminarily screened by the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained can be secondary screened by similarity to obtain the request message to be pushed. In this way, the request message pushed to the user terminal is more accurate, which can improve the response efficiency of the server and save user terminal and server resources.

[0096] It should be noted that click-to-search prompts are a common function that is widely used in search websites, various search bars, and online customer service. Specifically, click-to-search prompts are a method in which the customer service system prompts users with multiple alternative request messages and asks them to click on them based on the target request message input by the user in real time, such as a customer service question. In this way, by matching the target request message that the user wants to search for, the efficiency and accuracy of user input can be improved, while also playing a role in standardizing user input, thereby improving server response efficiency.

[0097] It should be noted that the user end may be a client, and the device of the user end may be a terminal device, and the terminal device is not limited to terminal devices such as mobile terminals and personal computers (PC) terminals carried by users.

[0098] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.

[0099] Embodiment 1

[0100] See also Figure 1 As shown, the device for executing the method for processing user requests can be a cloud platform or server that interacts with the user terminal. The following describes the method for processing user requests provided in the first embodiment of the present application from the perspective of the execution subject being the server. A flowchart of a method for processing user requests provided in the first embodiment of the present application includes the following steps:

[0101] S101: Obtain a target request message from a user terminal.

[0102] In a specific implementation, the server can obtain the target request message to be processed input by the user from the user terminal in real time.

[0103] Here, the target request message may be, for example, a customer service question, that is, a question the user wants to ask. Usually, the target request message may be text or voice. Here, there is no limit on the length of the message contained in the target request message, and the semantics in the target request message may be complete or incomplete.

[0104] S102: Based on the target request message, search for multiple candidate request messages matching the target request message in a preset request message set.

[0105] In a specific implementation, request messages commonly used in the field can be collected in advance and formed into a preset request message set after processing. Then, after obtaining the target request message sent by the user end, multiple alternative request messages matching the target request message can be found in the preset request message set through the content of the target request message. In this way, the target request message can be preliminarily screened in the preset request message set to obtain multiple alternative request messages matching the target request message.

[0106] Here, the candidate request message is a request message in a preset request message set that matches the target request message, and may be a match in terms of content or semantics.

[0107] It should be noted that, in the customer service field, the request message in the preset request message set may be a customer service question, and the request message in the preset request message set is a request message that has been collected or manually generated.

[0108] S103: Calculate the similarity between each candidate request message and the target request message respectively, and select a request message to be pushed from the multiple candidate request messages based on the calculated similarities.

[0109] In a specific implementation, after preliminarily selecting multiple candidate request messages that match the target request message from a preset request message set according to the target request message, it is necessary to further select the multiple candidate request messages so as to select the request message to be pushed to the user terminal from the multiple candidate request messages. Specifically, the similarity between each candidate request message and the target request message can be calculated respectively, and then the multiple candidate request messages can be sorted according to the values ​​of the multiple similarities calculated, and then the request message to be pushed can be selected from the multiple candidate request messages according to the sorting results of the multiple candidate request messages. In this way, the multiple candidate request messages can be further screened through the calculated similarity, so that the request message can be accurately pushed to the user terminal.

[0110] S104: Send the request message to be pushed to the user terminal.

[0111] In a specific implementation, after selecting a request message to be pushed from multiple alternative request messages based on the calculated similarity, that is, after determining the request message that best matches the target request message, the request message to be pushed can be sent to the user end. In this way, the user on the user end can initiate a request to the server by clicking on the request message to be pushed. While improving the accuracy of the request message input by the user, it can also play a role in standardizing the request message input by the user, thereby improving the server response efficiency and rationally utilizing the network and processing resources of the user end and the server end.

[0112] Here, one request message to be pushed may be selected, or a preset number of request messages to be pushed may be selected, or corresponding request messages with a similarity greater than a set threshold may be selected for pushing.

[0113] In an embodiment of the present application, by obtaining a target request message from the user terminal, multiple alternative request messages that match the target request message can be found in a preset request message set, that is, the messages in the preset request message set are preliminarily screened through the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained can be secondary screened through the similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.

[0114] In a possible implementation, in S102, based on the target request message, searching for multiple candidate request messages matching the target request message in a preset request message set includes the following steps:

[0115] Step (1): performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words.

[0116] In the specific implementation, first, the target request message is processed by word segmentation and synonym replacement, and multiple target words after word segmentation and synonym replacement can be obtained. The target words obtained in this way are relatively standardized, which facilitates the subsequent search for multiple alternative request messages matching the target request message in the preset request message set based on the target words.

[0117] In one example, the target request message is "How to cancel an order". After word segmentation of the target request message and replacing "cancel" with "close", multiple target words "how", "close", and "order" can be obtained.

[0118] Step (2): for each of the target words, search the preset request message set for the candidate request message containing the target word.

[0119] In a specific implementation, the target request message may be segmented and replaced with synonyms to obtain multiple target words. For each target word, the target word may be used as a keyword to search for alternative request messages containing the target word in a preset request message set.

[0120] It should be noted that the request messages in the preset request message set can be pre-processed by word segmentation and synonym replacement, and then multiple words can be obtained. For each word, the word can be associated with the request message containing the word. In this way, based on the obtained target word, alternative request messages containing the target word can be found in the preset request message set.

[0121] Here, in the specific implementation, an inverted index can be used. The inverted index originates from the need to find records based on attribute values ​​in actual applications. Each item in this index table includes an attribute value and the address of each record with the attribute value. The inverted list is used to record which request messages contain a certain word. A series of inverted index items containing this word form a list structure. This is the inverted list corresponding to a certain word, that is, the request message containing the word can be found based on the word.

[0122] In one example, the target word is "how", and based on the target word "how", alternative request messages containing "how" are found in the preset request message set, among which the multiple alternative messages found include "how to complain", "how to close an order", and "how to calculate service points".

[0123] In this embodiment, multiple target words can be obtained by processing the target request message, and then for each target word, an alternative request message containing the target word can be found in the preset request message set. In this way, multiple alternative request messages matching the target request message can be obtained through preliminary screening of the target words.

[0124] In a possible implementation, for each of the candidate request messages, calculating the similarity between the candidate request message and the target request message in S103 includes:

[0125] The similarity between the candidate request message and the target request message is calculated according to the feature vector of the candidate request message and the feature vector of the target request message.

[0126] In a specific implementation, the alternative request message can be converted into a feature vector, and the target request message can be converted into a feature vector. Then, the similarity between the alternative request message and the target request message can be calculated by calculating the similarity between the feature vector of the alternative request message and the feature vector of the target request message.

[0127] Here, the similarity can be cosine similarity, which evaluates the similarity of two vectors by calculating the cosine value of the angle between them. The calculation formula of cosine similarity is: a is the feature vector of the candidate request message, and b is the feature vector of the target request message.

[0128] In an example, a feature vector of an alternative request message is (0.183 0.322 0.322 0.102 0.322 00 0 0 0 0), and a feature vector of a target request message is (0 0 0 0.101 0 0.275 0.173 0 0 0 0.448), and the cosine similarity is calculated to be 0.0307.

[0129] Among them, each element in the feature vector of any alternative request message represents the importance of a word contained in the alternative request message; each element in the feature vector of any target request message represents the importance of a word contained in the target request message.

[0130] Here, the feature vector of the alternative request message is composed of multiple elements, and each element in the feature vector represents the importance of a word contained in the alternative request message corresponding to the feature vector in the alternative request message; the feature vector of the target request message is composed of multiple elements, and each element in the feature vector represents the importance of a word contained in the target request message corresponding to the feature vector in the target request message.

[0131] In one example, the alternative request message is "How to calculate service points", and the alternative request message is converted into a feature vector a = (a1 a2 a3 a4 a5 a6), where the feature vector is composed of elements a1, a2, a3, a4, a5, and a6. Each element in the feature vector a, such as a1, represents the importance of a word such as "calculation" contained in the alternative request message corresponding to the feature vector a.

[0132] In one example, the target request message is "How to improve service points", and the target request message is converted into a feature vector b = (b1 b2 b3 b4 b5 b6), where the feature vector is composed of elements b1, b2, b3, b4, b5, b6, and each element in the feature vector b, such as b1, represents the importance of a word such as "improve" contained in the target request message corresponding to the feature vector b.

[0133] In this embodiment, the target request message can be converted into a feature vector, and the alternative request message can be converted into a feature vector, and then the similarity between the feature vector of the alternative request message and the feature vector of the target request message can be calculated as the similarity between the alternative request message and the target request message. In this way, multiple alternative request messages can be further screened by the calculated similarity, and the request message to be pushed to the user end can be determined. The server can quickly identify the request message and respond. Therefore, the embodiment of the present application can not only improve the accuracy of pushing request messages to the user end, but also improve the server response efficiency.

[0134] In a possible implementation manner, the number of dimensions of the feature vector is equal to the total number of all words included in the candidate request message and the target request message.

[0135] In a specific implementation, the number of dimensions of the feature vector of the alternative request message is the same as the number of dimensions of the feature vector of the target request message, which facilitates the calculation of the similarity between the alternative request message and the target request message, wherein the number of dimensions of the feature vector is equal to the sum of the number of words contained in all the screened alternative request messages and the number of words contained in the target request message.

[0136] It should be noted that the words included in the target request message are multiple words obtained by segmenting and replacing the target request message with synonyms; similarly, the words included in the alternative request message are also multiple words obtained by segmenting the alternative request message. Among them, the alternative request messages in the preset request message set are processed by word standardization in advance, that is, the words involving synonyms are all represented by one word.

[0137] Here, when the target request message does not contain a certain word, when calculating the importance of the word in the target request message, the element at that position in the feature vector of the target request message is set to 0. Similarly, when any candidate request message does not contain a certain word, when calculating the importance of the word in the candidate request message, the element at that position in the feature vector of the candidate request message is set to 0. In this way, the number of dimensions of the feature vector of the candidate request message can be ensured to be the same as the number of dimensions of the feature vector of the target request message, thereby facilitating the calculation of similarity based on the feature vector.

[0138] In a possible implementation, the importance is determined according to the following steps: the importance of the word is determined according to the frequency of occurrence of the corresponding word in the alternative request message or the target request message, and the inverse text frequency index of the word.

[0139] In a specific implementation, each element in the feature vector of any alternative request message represents the importance of a word contained in the alternative request message in the alternative request message, and the importance of the word in the alternative request message is determined by the frequency of the word appearing in the alternative request message and the inverse text frequency index of the word; each element in the feature vector of the target request message represents the importance of a word contained in the target request message in the target request message, and the importance of the word in the target request message is determined by the frequency of the word appearing in the target request message and the inverse text frequency index of the word.

[0140] Here, the importance of a word (Term Frequency–Inverse Document Frequency, TF-IDF) is used to evaluate the importance of a word to one of the request messages (any candidate request message or target request message) in a request message set (a set of all candidate request messages and target request messages). If a word appears with a high frequency TF in a request message and rarely appears in other request messages, it is considered that the word has good category discrimination ability and is suitable for classification. TFIDF is actually TF*IDF. Specifically, TF refers to frequency (Term Frequency) and IDF refers to inverse document frequency index (Inverse Document Frequency).

[0141] Specifically, the calculation formula for the importance of a word is V=TF*IDF, where V represents the importance of the word, TF represents the frequency of the word, and IDF represents the inverse text frequency index of the word.

[0142] In this embodiment, by representing each element in the feature vector with the importance of a word, the request message corresponding to the feature vector can be fully characterized, and then the request message to be pushed can be more accurately selected from multiple candidate request messages through the calculated similarity.

[0143] In a possible implementation, the frequency of a word is determined according to the following steps: the ratio between the number of times the word appears in the alternative request message and the number of words included in the alternative request message is used as the frequency of the word appearing in the alternative request message.

[0144] In a specific implementation, the frequency of a word contained in any alternative request message in the alternative request message is determined by the ratio between the number of times the word appears in the alternative request message and the number of words contained in the alternative request message.

[0145] Specifically, the frequency TF of a word is calculated as TF=F1 / N1, wherein F1 represents the number of times a word appears in the request message, and N1 represents the number of words included in the request message.

[0146] In one example, the alternative request message is "How to improve service points", where the frequency of the word "service points" in the alternative request message = the number of times the word "service points" appears in the alternative request message ÷ the number of words included in the alternative request message = 1 / 3 = 0.333.

[0147] The frequency of a word is determined according to the following steps: the ratio between the number of times the word appears in the target request message and the number of words contained in the target request message is taken as the frequency of the word appearing in the target request.

[0148] In a specific implementation, the frequency of a word contained in the target request message is determined by the ratio between the number of times the word appears in the target request message and the number of words contained in the target request message.

[0149] In one example, the target request message is “How to cancel an order”, where the frequency of the word “cancel” in the target request message = the number of times the word “cancel” appears in the target request message ÷ the number of words contained in the target request message = 1 / 3 = 0.333.

[0150] In one possible implementation, the inverse text frequency index of a word is determined according to the following steps: the ratio of the total number of messages in the alternative request message and the target request message to the total number of messages containing the word in the alternative request message and the target request message is used as the inverse text frequency index of the word.

[0151] In a specific implementation, the inverse text frequency index of a word contained in any alternative request message in the alternative request message is determined by the ratio of the total number of messages in all the alternative request messages and the target request message, and the total number of messages containing the word in all the alternative request messages and the target request message; the inverse text frequency index of a word contained in the target request message in the target request message is determined by the ratio of the total number of messages in all the alternative request messages and the target request message, and the total number of messages containing the word in all the alternative request messages and the target request message.

[0152] It should be noted that, for the same word, the calculation formula of the inverse text frequency index of a word contained in any alternative request message in the alternative request message and the calculation formula of the inverse text frequency index of a word contained in the target request message in the target request message are the same.

[0153] Specifically, the calculation formula of the inverse text frequency index IDF of a word can be IDF=ln(F2 / N2) or IDF=lg(F2 / N2), wherein F2 represents the total number of messages in all screened alternative request messages and target request messages, and N2 represents the total number of messages containing the word in all screened alternative request messages and target request messages.

[0154] In one example, there are 3 alternative request messages screened out and 1 target request message, among which the alternative request messages are "How to lock", "How to repair the vehicle", and "What are the vehicle usage rules", and the target request message is "How to lock", and the inverse text frequency index of "lock" in "how to lock" = the total number of messages in all alternative request messages and target request messages ÷ the total number of messages containing the word in all alternative request messages and target request messages = 4 / 2 = 2, and the inverse text frequency index of "lock" in "how to lock" = ln(the total number of messages in all alternative request messages and target request messages ÷ the total number of messages containing the word in all alternative request messages and target request messages) = ln(4 / 2) = ln2.

[0155] In a possible implementation manner, the selecting a request message to be pushed from the multiple candidate request messages based on the calculated similarity in S103 includes:

[0156] A request message to be pushed is selected from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0157] In a specific implementation, after calculating the similarity between multiple alternative request messages and the target request message, in order to more accurately push the request message to be pushed to the user terminal, the multiple alternative request messages can be further sorted based on the similarity and the actual situation of the business, such as the historical click rate of the alternative request messages in the business, to determine the request message to be pushed to the user terminal.

[0158] In an example, if the similarities between the target request message and alternative request messages 1, 3, 4, and 5 are 0.0307, ​​0.589, 0.115, and 0.054 respectively, the result of sorting according to the similarity is alternative request messages 3, 4, 5, and 1. Taking into account business needs, the historical click-through rates of the above alternative questions are used as the conditions for secondary sorting, and the alternative request message 3 with the greatest similarity is retained. The other alternative request messages 4, 5, and 1 are re-sorted according to the historical click-through rates. For example, the sorting results of alternative request messages 4, 5, and 1 according to the historical click-through rates are 5, 4, and 1, and the final sorting results are alternative request messages 3, 5, 4, and 1. If 2 alternative request messages are selected as the request messages to be pushed, alternative request messages 3 and 5 should be selected and pushed to the user end.

[0159] In an embodiment of the present application, by obtaining a target request message from the user terminal, multiple alternative request messages that match the target request message can be found in a preset request message set, that is, the messages in the preset request message set are first preliminarily screened through the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, a request message to be pushed can be selected from multiple alternative request messages, that is, the multiple alternative request messages obtained are secondary screened through similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.

[0160] Embodiment 2

[0161] See also Figure 2 As shown, the device for executing the method for processing user requests can be a cloud platform or server that interacts with the user terminal. The following describes the method for processing user requests provided in Example 2 of the present application from the perspective of the execution subject being a server. A flowchart of another method for processing user requests provided in Example 2 of the present application includes the following steps:

[0162] S201: Obtain a target request message from the user end.

[0163] In a specific implementation, the target request message to be processed input by the user can be obtained from the user terminal in real time.

[0164] It should be noted that the target request message can be a customer service question, that is, a question the user wants to ask. Usually, the target request message can be text or voice. Here, there is no limit on the length of the message contained in the target request message, and the semantics in the target request message can be complete or incomplete.

[0165] S202: Calculate the similarity between each candidate request message in the preset request message set and the target request message respectively, and select a request message to be pushed from the plurality of candidate request messages based on the calculated similarity.

[0166] In a specific implementation, in order to filter out the request message to be pushed to the user terminal, first, the similarity between the target request message and each candidate request message in the preset request message set can be calculated respectively, and then the request message to be pushed to the user terminal is selected from all the candidate request messages in the preset request message set according to the similarity. In this way, by filtering all the candidate request messages in the preset request message set according to the similarity, the accuracy of pushing the request message to the user terminal can be improved.

[0167] S203: Send the request message to be pushed to the user terminal.

[0168] In a specific implementation, after selecting a request message to be pushed from multiple alternative request messages based on the calculated similarity, that is, after determining the request message that best matches the target request message, the request message to be pushed can be sent to the user end. In this way, the user on the user end can initiate a request to the server by clicking on the request message to be pushed. While improving the accuracy of the request message input by the user, it can also play a role in standardizing the request message input by the user, thereby improving the server response efficiency and rationally utilizing the network and processing resources of the user end and the server end.

[0169] In an embodiment of the present application, the target request message of the user terminal is first obtained. The similarity between each alternative request message and the target request message can be calculated. Further, the request message to be pushed can be selected from multiple alternative request messages according to the similarity, and the request message to be pushed can be sent to the user terminal. In this way, the accuracy of pushing the request message to the user terminal can be improved, thereby improving the server response efficiency.

[0170] In a possible implementation manner, respectively calculating the similarity between each candidate request message in the preset request message set and the target request message in S202 includes:

[0171] The similarity between the candidate request message and the target request message is calculated according to the semantic vector of the candidate request message and the semantic vector of the target request message.

[0172] The alternative request message and the semantic vector of the alternative request message are stored in association with each other in the preset request message set.

[0173] In a specific implementation, the alternative request message can be converted into a semantic vector, and the target request message can be converted into a semantic vector. Then, the similarity between the alternative request message and the target request message can be calculated by calculating the similarity between the semantic vector of the alternative request message and the semantic vector of the target request message.

[0174] Here, all alternative request messages in the preset request message set can be converted into semantic vectors in advance, and each alternative request message and its semantic vector can be associated and stored, so that the similarity between the target request message and any alternative request message can be directly calculated.

[0175] In addition, the semantic vector of the target request message is a vector used to characterize the semantics of the target request message. Specifically, the target request message can be input into a trained semantic model to obtain the semantic vector; the semantic vector of the alternative request message is a vector used to characterize the semantics of the alternative request message. Specifically, the alternative request message can be input into a trained semantic model to obtain the semantic vector.

[0176] It should be noted that the similarity can be cosine similarity, which evaluates the similarity of two vectors by calculating the cosine value of the angle between them. The calculation formula of cosine similarity is: c is the semantic vector of the candidate request message, and d is the semantic vector of the target request message.

[0177] In this embodiment, the target request message can be converted into a semantic vector, and the candidate request message can be converted into a semantic vector, and then the similarity between the semantic vector of the candidate request message and the semantic vector of the target request message can be calculated as the similarity between the candidate request message and the target request message. In this way, multiple candidate request messages can be screened by the calculated similarity, and the request message to be pushed to the user terminal can be determined, which can improve the accuracy of pushing the request message to the user terminal, thereby improving the server response efficiency.

[0178] In a possible implementation manner, after obtaining the target request message of the user terminal in S201, the following steps are further included:

[0179] Step a: performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words.

[0180] In a specific implementation, first, the target request message is processed with word segmentation and synonym replacement, and multiple target words can be obtained after word segmentation and synonym replacement. The target words obtained in this way are unified with the words contained in each request message in a preset request message set, so as to facilitate subsequent search for multiple alternative request messages that match the target request message in the preset request message set.

[0181] Step b: input the target word into a preset semantic model and output the word vector of the target word.

[0182] In a specific implementation, for each target word after processing the target request message, the target word can be input into a preset semantic model, and then a word vector corresponding to the target word can be output.

[0183] Here, the preset semantic model may be a word vector model (word to vector), which is used to convert each word into a vector and can represent the relationship between words.

[0184] Step c: Add the word vectors of the multiple target words corresponding to the target request message to obtain the semantic vector of the target request message.

[0185] In a specific implementation, the semantic vector of the target request message is obtained by adding the word vectors of multiple target words corresponding to the target request message.

[0186] In this embodiment, a method for converting a target request message into a semantic vector is given, and by calculating the similarity between the semantic vector of the target request message and the semantic vector of the alternative request message, the request message to be pushed to the user terminal can be determined based on the similarity, which can improve the accuracy of pushing the request message to the user terminal and thereby improve the server response efficiency.

[0187] In a possible implementation manner, the selecting a request message to be pushed from the multiple candidate request messages based on the calculated similarity in S202 includes:

[0188] A request message to be pushed is selected from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0189] In a specific implementation, after calculating the similarity between multiple alternative request messages and the target request message, in order to more accurately push the request message to be pushed to the user terminal, the multiple alternative request messages can be further sorted based on the similarity and the actual situation of the business, such as the historical click rate of the alternative request messages in the business, to determine the request message to be pushed to the user terminal.

[0190] In an example, if the similarities between the target request message and alternative request messages 1, 3, 4, and 5 are 0.0307, ​​0.589, 0.115, and 0.054 respectively, the result of sorting according to the similarity is alternative request messages 3, 4, 5, and 1. Taking into account business needs, the historical click-through rates of the above alternative questions are used as the conditions for secondary sorting, and the alternative request message 3 with the greatest similarity is retained. The other alternative request messages 4, 5, and 1 are re-sorted according to the historical click-through rates. For example, the sorting results of alternative request messages 4, 5, and 1 according to the historical click-through rates are 5, 4, and 1, and the final sorting results are alternative request messages 3, 5, 4, and 1. If 3 alternative request messages are selected as request messages to be pushed, alternative request messages 3, 5, and 4 should be selected and pushed to the user end.

[0191] In an embodiment of the present application, the target request message of the user terminal is first obtained. The similarity between each alternative request message and the target request message can be calculated. Further, the request message to be pushed can be selected from multiple alternative request messages according to the similarity, and the request message to be pushed can be sent to the user terminal. In this way, the accuracy of pushing the request message to the user terminal can be improved, thereby improving the server response efficiency.

[0192] Embodiment 3

[0193] Based on the same application concept, Example 3 of the present application also provides a user request processing device corresponding to the user request processing method provided in Example 1. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the user request processing method in the above-mentioned Example 1 of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0194] like Figure 3 As shown, it is one of the functional module diagrams of a user request processing device 300 provided in Embodiment 3 of the present application, such as Figure 4 FIG. 2 is a second functional module diagram of a user request processing device 300 provided in Embodiment 3 of the present application, wherein the user request processing device 300 includes:

[0195] An acquisition module 310 is used to acquire a target request message from a user terminal;

[0196] A search module 320 is used to search for multiple candidate request messages matching the target request message in a preset request message set based on the target request message;

[0197] A calculation module 330, configured to calculate the similarity between each candidate request message and the target request message, and select a request message to be pushed from the plurality of candidate request messages based on the calculated similarity;

[0198] The sending module 340 is used to send the request message to be pushed to the user terminal.

[0199] In an embodiment of the present application, the target request message of the user terminal is obtained by acquiring module 310, and multiple alternative request messages matching the target request message can be found in the preset request message set, that is, the messages in the preset request message set are preliminarily screened by the target request message to obtain multiple alternative request messages; further, the similarity between each alternative request message and the target request message is calculated by calculating module 330, and the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained are secondary screened by similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.

[0200] In a possible implementation, Figure 3 and Figure 4 As shown, the search module 320 is specifically used to search for multiple candidate request messages according to the following steps:

[0201] Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0202] For each of the target words, the candidate request message containing the target word is searched in the preset request message set.

[0203] In a possible implementation, Figure 3 and Figure 4 As shown, for each of the candidate request messages, the calculation module 330 is specifically configured to calculate the similarity between the candidate request message and the target request message according to the following steps:

[0204] Calculating the similarity between the candidate request message and the target request message according to the feature vector of the candidate request message and the feature vector of the target request message;

[0205] Among them, each element in the feature vector of any of the alternative request messages represents the importance of a word contained in the alternative request message in the alternative request message; each element in the feature vector of any of the target request messages represents the importance of a word contained in the target request message in the target request message.

[0206] In a possible implementation, Figure 3 and Figure 4 As shown, the dimension number of the feature vector is equal to the total number of all words contained in the alternative request message and the target request message.

[0207] In a possible implementation manner, the calculation module 330 is further configured to determine the importance according to the following steps:

[0208] The importance of the word is determined according to the frequency of occurrence of the corresponding word in the alternative request message or the target request message and the inverse text frequency index of the word.

[0209] In a possible implementation, Figure 4 As shown, the calculation module 330 includes a first calculation unit 332;

[0210] The first calculation unit 332 is configured to determine the frequency of words in the candidate request message according to the following steps:

[0211] taking the ratio between the number of times the word appears in the alternative request message and the number of words included in the alternative request message as the frequency of occurrence of the word in the alternative request message;

[0212] The first calculation unit 332 is further configured to determine the frequency of words in the target request message according to the following steps:

[0213] The ratio between the number of times the word appears in the target request message and the number of words included in the target request message is taken as the frequency of occurrence of the word in the target request.

[0214] In a possible implementation, Figure 4 As shown, the calculation module 330 also includes a second calculation unit 334;

[0215] The second calculation unit 334 is used to determine the inverse text frequency index of the word according to the following steps:

[0216] The ratio of the total number of messages in the candidate request message and the target request message to the total number of messages containing the word in the candidate request message and the target request message is used as the inverse text frequency index of the word.

[0217] In a possible implementation, Figure 4 As shown, the calculation module 330 also includes a selection unit 336;

[0218] The selection unit 336 is configured to select a request message to be pushed from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0219] In an embodiment of the present application, the target request message of the user terminal is obtained by acquiring module 310, and multiple alternative request messages matching the target request message can be found in the preset request message set, that is, the messages in the preset request message set are preliminarily screened by the target request message to obtain multiple alternative request messages; further, the similarity between each alternative request message and the target request message is calculated by calculating module 330, and the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained are secondary screened by similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.

[0220] Embodiment 4

[0221] Based on the same application concept, Example 4 of the present application also provides a user request processing device corresponding to the user request processing method provided in Example 2. Since the principle of solving the problem by the device in the example of the present application is similar to the user request processing method in the above-mentioned Example 2 of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0222] like Figure 5 As shown, it is one of the functional module diagrams of another user request processing device 400 provided in the fourth embodiment of the present application, such as Figure 6 FIG. 2 is a second functional module diagram of another user request processing device 400 provided in Embodiment 4 of the present application, wherein the user request processing device 400 includes:

[0223] An acquisition module 410 is used to acquire a target request message from a user terminal;

[0224] A calculation module 420, configured to respectively calculate the similarity between each candidate request message in the preset request message set and the target request message, and select a request message to be pushed from the plurality of candidate request messages based on the calculated similarity;

[0225] The sending module 430 is used to send the request message to be pushed to the user terminal.

[0226] In a possible implementation, Figure 5 and Figure 6 As shown, the calculation module 420 is specifically used to calculate the similarity according to the following steps:

[0227] Calculating the similarity between the candidate request message and the target request message according to the semantic vector of the candidate request message and the semantic vector of the target request message;

[0228] The alternative request message and the semantic vector of the alternative request message are stored in association with each other in the preset request message set.

[0229] In a possible implementation, as shown in 6 , the user request processing device 400 further includes a processing module 440 ;

[0230] The processing module 440 is used to perform word segmentation and synonym replacement processing on the target request message to obtain multiple target words;

[0231] The calculation module 420 is further configured to determine the semantic vector of the target request message according to the following steps:

[0232] Input the target word into a preset semantic model and output the word vector of the target word;

[0233] The word vectors of the multiple target words corresponding to the target request message are added together to determine the semantic vector of the target request message.

[0234] In a possible implementation, as shown in Figure 6, the calculation module 420 further includes a selection unit 422;

[0235] The selection unit 422 is configured to select a request message to be pushed from the multiple candidate request messages according to the similarity and the historical click rates of the multiple candidate request messages.

[0236] In an embodiment of the present application, the target request message of the user terminal is first obtained through the acquisition module 410, and the similarity between each alternative request message and the target request message can be calculated through the calculation module 420. Furthermore, the request message to be pushed can be selected from multiple alternative request messages according to the similarity, and the request message to be pushed can be sent to the user terminal through the sending module 430. In this way, the accuracy of pushing the request message to the user terminal can be improved, thereby improving the server response efficiency.

[0237] Embodiment 5

[0238] Based on the same application concept, see Figure 7 As shown, it is a structural diagram of an electronic device 500 provided in Example 5 of the present application, including: a processor 510, a memory 520 and a bus 530, the memory 520 stores machine-readable instructions executable by the processor 510, when the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530, and the machine-readable instructions are executed by the processor 510 when running, as in the steps of the method for processing user requests described in either Example 1 or Example 2.

[0239] Specifically, when the machine-readable instruction is executed by the processor 510, the following processing may be performed:

[0240] Get the target request message from the user;

[0241] Based on the target request message, searching for multiple candidate request messages matching the target request message in a preset request message set;

[0242] Calculating the similarity between each candidate request message and the target request message respectively, and selecting a request message to be pushed from the plurality of candidate request messages based on the calculated similarities;

[0243] Send the request message to be pushed to the user terminal.

[0244] In an embodiment of the present application, by obtaining a target request message from the user terminal, multiple alternative request messages that match the target request message can be found in a preset request message set, that is, the messages in the preset request message set are preliminarily screened through the target request message to obtain multiple alternative request messages; further, by respectively calculating the similarity between each alternative request message and the target request message, the request message to be pushed can be selected from the multiple alternative request messages, that is, the multiple alternative request messages obtained can be secondary screened through the similarity to obtain the request message to be pushed, so that the request message pushed to the user terminal is more accurate, thereby improving the response efficiency of the server and saving user terminal and server resources.

[0245] Specifically, when the machine-readable instruction is executed by the processor 510, the following processing may also be performed:

[0246] Get the target request message from the user;

[0247] Calculating the similarity between each candidate request message in the preset request message set and the target request message respectively, and selecting the request message to be pushed from the plurality of candidate request messages based on the calculated similarity;

[0248] Send the request message to be pushed to the user terminal.

[0249] In an embodiment of the present application, the target request message of the user terminal is first obtained. The similarity between each alternative request message and the target request message can be calculated. Further, the request message to be pushed can be selected from multiple alternative request messages according to the similarity, and the request message to be pushed can be sent to the user terminal. In this way, the accuracy of pushing the request message to the user terminal can be improved, thereby improving the server response efficiency.

[0250] Embodiment 6

[0251] Based on the same application concept, embodiment six of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing user requests provided in the above embodiment one or embodiment two are executed.

[0252] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned method for processing user requests, which can improve the accuracy of pushing request messages to the user end, thereby improving the server response efficiency.

[0253] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0254] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0255] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0256] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0257] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing a user request, characterized in that: The processing method comprises: Get the target request message from the user; Based on the target request message, searching for multiple candidate request messages matching the target request message in a preset request message set; Calculating the similarity between each candidate request message and the target request message respectively, and selecting a request message to be pushed from the plurality of candidate request messages based on the calculated similarities; Sending the request message to be pushed to the user terminal; The step of searching, based on the target request message, a plurality of candidate request messages matching the target request message in a preset request message set comprises: Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words; For each of the target words, the target word is associated with the alternative request message containing the target word by using an inverted index, so as to find the alternative request message containing the target word in the preset request message set; For each of the candidate request messages, calculating the similarity between the candidate request message and the target request message includes: Calculating the similarity between the candidate request message and the target request message according to the feature vector of the candidate request message and the feature vector of the target request message; Wherein, each element in the feature vector of any of the alternative request messages represents the importance of a word contained in the alternative request message in the alternative request message; each element in the feature vector of any of the target request messages represents the importance of a word contained in the target request message in the target request message; Determine the importance by following these steps: Determining the importance of the word according to the frequency of occurrence of the corresponding word in the candidate request message or the target request message and the inverse text frequency index of the word; The inverse text frequency index of the term is determined according to the following steps: The ratio of the total number of messages in the candidate request message and the target request message to the total number of messages containing the word in the candidate request message and the target request message is used as the inverse text frequency index of the word.

2. The processing method according to claim 1, characterized in that: The dimension number of the feature vector is equal to the total number of all words contained in the candidate request message and the target request message.

3. The processing method according to claim 1, characterized in that: The frequency of the words is determined by following these steps: The ratio between the number of times the word appears in the alternative request message and the number of words included in the alternative request message is used as the frequency of occurrence of the word in the alternative request message.

4. A method for processing a user request, characterized in that: The processing method comprises: Get the target request message from the user; Calculating the similarity between each candidate request message in the preset request message set and the target request message respectively, and selecting the request message to be pushed from the plurality of candidate request messages based on the calculated similarity; Sending the request message to be pushed to the user terminal; The respectively calculating the similarity between each candidate request message in the preset request message set and the target request message includes: Calculating the similarity between the candidate request message and the target request message according to the semantic vector of the candidate request message and the semantic vector of the target request message; The alternative request message and the semantic vector of the alternative request message are stored in association with the preset request message set; The calculating the similarity between the candidate request message and the target request message according to the semantic vector of the candidate request message and the semantic vector of the target request message includes: Converting the candidate request message into a first semantic vector and converting the target request message into a second semantic vector; The similarity between the first semantic vector and the second semantic vector is calculated, and the similarity between the first semantic vector and the second semantic vector is determined as the similarity between the candidate request message and the target request message.

5. The processing method according to claim 4, characterized in that: The method further comprises: Performing word segmentation and synonym replacement processing on the target request message to obtain multiple target words; Input the target word into a preset semantic model and output the word vector of the target word; The word vectors of the multiple target words corresponding to the target request message are added together to obtain the semantic vector of the target request message.

6. A user request processing device, characterized in that: The processing device comprises: An acquisition module is used to acquire a target request message from a user end; A search module, configured to search for multiple candidate request messages matching the target request message in a preset request message set based on the target request message; A calculation module, used to calculate the similarity between each candidate request message and the target request message, and select a request message to be pushed from the multiple candidate request messages based on the calculated similarity; A sending module, used to send the request message to be pushed to the user terminal; The search module is specifically used to perform word segmentation and synonym replacement processing on the target request message to obtain multiple target words; For each of the target words, searching the preset request message set for the candidate request message containing the target word; The calculation module is specifically used to calculate the similarity between the candidate request message and the target request message according to the following steps: Calculating the similarity between the candidate request message and the target request message according to the feature vector of the candidate request message and the feature vector of the target request message; Wherein, each element in the feature vector of any of the alternative request messages represents the importance of a word contained in the alternative request message in the alternative request message; each element in the feature vector of any of the target request messages represents the importance of a word contained in the target request message in the target request message; The calculation module is further used to determine the importance according to the following steps: Determining the importance of the word according to the frequency of occurrence of the corresponding word in the candidate request message or the target request message and the inverse text frequency index of the word; The calculation module is further used to determine the inverse text frequency index of the word according to the following steps: The ratio of the total number of messages in the candidate request message and the target request message to the total number of messages containing the word in the candidate request message and the target request message is used as the inverse text frequency index of the word.

7. A user request processing device, characterized in that: The processing device comprises: An acquisition module is used to acquire a target request message from a user end; A calculation module, used to respectively calculate the similarity between each candidate request message in the preset request message set and the target request message, and select a request message to be pushed from the multiple candidate request messages based on the calculated similarity; A sending module, used to send the request message to be pushed to the user terminal; The calculation module is specifically used to calculate the similarity between the alternative request message and the target request message according to the semantic vector of the alternative request message and the semantic vector of the target request message; wherein the alternative request message and the semantic vector of the alternative request message are associated and stored in the preset request message set; Also used to convert the alternative request message into a first semantic vector and convert the target request message into a second semantic vector; The similarity between the first semantic vector and the second semantic vector is calculated, and the similarity between the first semantic vector and the second semantic vector is determined as the similarity between the candidate request message and the target request message.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for processing user requests as claimed in claim 1 are executed, or the steps of the method for processing user requests as claimed in claim 4 are executed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program executes the steps of the method for processing user requests as claimed in claim 1, or executes the steps of the method for processing user requests as claimed in claim 4.

Citation Information

Patent Citations

  • Method and system for interactively finding synonyms using positive and negative feedback

    US20110251839A1

  • Candidate pipeline builder

    US20160125360A1