CN111831796A - User request processing method and device, electronic equipment and storage medium - Google Patents

User request processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111831796A
CN111831796A CN201910300721.7A CN201910300721A CN111831796A CN 111831796 A CN111831796 A CN 111831796A CN 201910300721 A CN201910300721 A CN 201910300721A CN 111831796 A CN111831796 A CN 111831796A
Authority
CN
China
Prior art keywords
request message
target
alternative
messages
similarity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910300721.7A
Other languages
Chinese (zh)
Inventor
何鹏
王伟玮
李奘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN201910300721.7A priority Critical patent/CN111831796A/en
Publication of CN111831796A publication Critical patent/CN111831796A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles

Abstract

The present application relates to the field of computer processing technologies, and in particular, to a method and an apparatus for processing a user request, an electronic device, and a storage medium. According to the method and the device, a plurality of candidate request messages matched with the target request message can be found in the preset request message set by acquiring the target request message of the user side, namely, the messages in the preset request message set are preliminarily screened through the target request message to obtain a plurality of candidate request messages; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message pushed to the user side is more accurate, the response efficiency of the server can be improved, and the resources of the user side and the server are saved.

Description

User request processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer processing technologies, and in particular, to a method and an apparatus for processing a user request, an electronic device, and a storage medium.
Background
The click search prompt is a mode that in an online customer service scene, a customer service system prompts and clicks a plurality of alternative request messages to a user according to a target request message input by the user in real time, such as a customer service problem. By adopting the mode, the target request message which the user wants to search is matched, so that the input efficiency and accuracy of the user can be improved, and the input of the user is normalized.
The main way of clicking on the search prompt is based on keyword matching, i.e. matching the request message to be pushed to the user according to the keywords in the target request message input by the user. However, in this way, the pushed request message may be inaccurate, the search prompt effect cannot be achieved, the server response efficiency cannot be improved, and the network and processing resources of the user side and the server side are wasted.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for processing a user request, an electronic device, and a storage medium, which can improve response efficiency of a server and save network and processing resources of a client and the server.
Mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for processing a user request, where the method includes:
acquiring a target request message of a user side;
based on the target request message, searching a plurality of alternative request messages matched with the target request message in a preset request message set;
respectively calculating the similarity between each alternative request message and the target request message, and selecting a request message to be pushed from the alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
In a possible implementation manner, the finding, based on the target request message, a plurality of candidate request messages matching the target request message in a preset request message set includes:
performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
and aiming at each target word, searching the alternative request message containing the target word in the preset request message set.
In one possible embodiment, for each of the alternative request messages, calculating a similarity between the alternative 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;
each element in the feature vector of any one of the alternative request messages represents the importance degree of a word contained in the alternative request message; each element in the feature vector of any one of the target request messages represents the importance of a word contained in the target request message.
In one possible implementation, 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.
In one possible embodiment, the degree of importance is determined according to the following steps:
and determining the importance degree of the word according to the frequency of the corresponding word appearing in the alternative request message or the target request message and the reverse text frequency index of the word.
In one possible embodiment, the frequency of the words is determined according to the following steps:
taking the ratio of the number of times of the words appearing in the alternative request message and the number of the words contained in the alternative request message as the frequency of the words appearing in the alternative request message;
and taking the ratio of the number of times of the words appearing in the target request message and the number of words contained in the target request message as the frequency of the words appearing in the target request message.
In one possible implementation, the inverse text frequency index of a word is determined according to the following steps:
and taking the ratio of the total number of the messages in the alternative request message and the target request message to the total number of the messages containing the words in the alternative request message and the target request message as the reverse text frequency index of the words.
In a possible embodiment, the selecting a request message to be pushed from a plurality of the alternative request messages based on the calculated similarity includes:
and selecting the request message to be pushed from the multiple alternative request messages according to the similarity and the historical click rate of the multiple alternative request messages.
In a second aspect, an embodiment of the present application further provides a method for processing a user request, where the method includes:
acquiring a target request message of a user side;
respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting a request message to be pushed from a plurality of alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
In a possible implementation manner, the separately calculating the similarity between each alternative request message in the preset request message set and the target request message includes:
calculating 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 stored in association in the preset request message set.
In a possible implementation manner, after the obtaining the target request message of the user end, the method further includes:
performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
inputting the target words into a preset semantic model, and outputting word vectors of the target words;
adding the word vectors of the target words corresponding to the target request message to obtain the semantic vector of the target request message.
In a possible embodiment, the selecting a request message to be pushed from a plurality of the alternative request messages based on the calculated similarity includes:
and selecting the request message to be pushed from the multiple alternative request messages according to the similarity and the historical click rate of the multiple alternative request messages.
In a third aspect, an embodiment of the present application provides a processing apparatus for a request message, where the processing apparatus includes:
the acquisition module is used for acquiring a target request message of a user side;
the searching module is used for searching a plurality of candidate request messages matched with the target request message in a preset request message set based on the target request message;
the calculation module is used for calculating the similarity between each alternative request message and the target request message respectively and selecting the request message to be pushed from the alternative request messages based on the calculated similarity;
and the sending module is used for sending the request message to be pushed to the user side.
In a possible implementation manner, the search module is specifically configured to search for a plurality of candidate request messages according to the following steps:
performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
and aiming at each target word, searching the alternative request message containing the target word in the preset request message set.
In a possible implementation manner, for each alternative request message, the calculating module is specifically configured to calculate a similarity between the alternative 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;
each element in the feature vector of any one of the alternative request messages represents the importance degree of a word contained in the alternative request message; each element in the feature vector of any one of the target request messages represents the importance of a word contained in the target request message.
In one possible implementation, 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.
In a possible implementation, the calculation module is further configured to determine the importance level according to the following steps:
and determining the importance degree of the word according to the frequency of the corresponding word appearing in the alternative request message or the target request message and the reverse text frequency index of the word.
In a possible embodiment, the calculation module comprises a first calculation unit;
the first calculating unit is configured to determine a frequency of words in the alternative request message according to the following steps:
taking the ratio of the number of times of the words appearing in the alternative request message and the number of the words contained in the alternative request message as the frequency of the words appearing in the alternative request message;
the first computing unit is further configured to determine a frequency of words in the target request message according to the following steps:
and taking the ratio of the number of times of the words appearing in the target request message and the number of words contained in the target request message as the frequency of the words appearing in the target request message.
In a possible embodiment, the computing module further comprises a second computing unit;
the second calculating unit is used for determining the inverse text frequency index of the word according to the following steps:
and taking the ratio of the total number of the messages in the alternative request message and the target request message to the total number of the messages containing the words in the alternative request message and the target request message as the reverse text frequency index of the words.
In a possible embodiment, the calculation module further comprises a selection unit;
and the selecting unit is used for selecting the request message to be pushed from the candidate request messages according to the similarity and the historical click rate of the candidate request messages.
In a fourth aspect, an embodiment of the present application further provides a device for processing a user request, where the device includes:
the acquisition module is used for acquiring a target request message of a user side;
the calculation module is used for respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting a request message to be pushed from the alternative request messages based on the calculated similarity;
and the sending module is used for sending the request message to be pushed to the user side.
In a possible implementation manner, the calculating module is specifically configured to calculate the similarity according to the following steps:
calculating 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 stored in association in the preset request message set.
In a possible embodiment, the processing device further comprises a processing module;
the processing module is used for carrying out word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
the computing module is further configured to determine a semantic vector of the target request message according to the following steps:
inputting the target words into a preset semantic model, and outputting word vectors of the target words;
adding the word vectors of the target words corresponding to the target request message to determine the semantic vector of the target request message.
In a possible embodiment, the calculation module further comprises a selection unit;
and the selecting unit is used for selecting the request message to be pushed from the candidate request messages according to the similarity and the historical click rate of the candidate request messages.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions being executable by the processor to perform the steps of the method for processing a user request according to the first aspect or any one of the possible embodiments of the first aspect; or to perform the steps of the method for processing a user request as described in the second aspect or any one of the possible embodiments of the second aspect.
In a sixth aspect, this application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program is executed by a processor to perform the steps of the method for processing a user request described in the first aspect or any one of the possible implementation manners of the first aspect; or to perform the steps of the method for processing a user request as described in the second aspect or any one of the possible embodiments of the second aspect.
In the embodiment of the application, by acquiring the target request message of the user side, a plurality of alternative request messages matched with the target request message can be found in the preset request message set, that is, firstly, the messages in the preset request message set are preliminarily screened through the target request message to obtain a plurality of alternative request messages; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message to be pushed is more accurate, the response efficiency of the server can be improved, and the network and processing resources of the client and the server are saved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a method for processing a user request according to an embodiment of the present application;
FIG. 2 is a flow chart of another method for processing a user request provided in the second embodiment of the present application;
FIG. 3 is a functional block diagram of a processing apparatus for processing a user request according to a third embodiment of the present application;
fig. 4 is a second functional block diagram of a processing apparatus for processing a user request according to a third embodiment of the present application;
FIG. 5 is a functional block diagram of another apparatus for processing a user request according to a fourth embodiment of the present application;
FIG. 6 is a second functional block diagram of another apparatus for processing a user request according to a fourth embodiment of the present application;
fig. 7 shows a schematic structural diagram of an electronic device provided in the fifth embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and that steps without logical context may be performed in reverse order or concurrently. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
To enable those skilled in the art to utilize the present disclosure, the following embodiments are presented in conjunction with a specific application scenario "handling user requests in an online customer service scenario," and it will be apparent to those skilled in the art that the general principles defined herein may be applied to other embodiments and application scenarios without departing from the spirit and scope of the present disclosure.
The method, apparatus, electronic device or computer-readable storage medium described in the embodiments of the present application may be applied to any scenario that requires processing of a user request, and the embodiments of the present application do not limit a specific application scenario, and any scheme that uses the method and apparatus for processing a user request provided in the embodiments of the present application is within the scope of protection of the present application.
It is noted that, before the present application is proposed, in the existing solutions, the main way of clicking 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 input by the user. However, in this way, the pushed request message may be inaccurate, the search prompt effect cannot be achieved, the server response efficiency cannot be improved, and further, the network and processing resources of the user side and the server side are wasted.
In order to solve the above problem, in the embodiment of the present application, by obtaining a target request message of a user side, a plurality of candidate request messages matched with the target request message can be found in a preset request message set, that is, a plurality of candidate request messages are obtained by primarily screening messages in the preset request message set through the target request message; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message pushed to the user side is more accurate, the response efficiency of the server can be improved, and the resources of the user side and the server are saved.
It should be noted that clicking the search prompt is a general function, and is widely applied in the fields of searching websites, various search columns and online customer service. Specifically, the click search prompt is a manner in which, in an online customer service scene, a customer service system prompts and clicks a plurality of candidate request messages to a user according to a target request message, such as a customer service question, input by the user in real time. By adopting the mode, the target request message which the user wants to search is matched, so that the input efficiency and accuracy of the user can be improved, the input of the user is normalized, and the response efficiency of the server is improved.
It should be noted that the user end may be a client, the device at the user end may be a terminal device, and the terminal device is not limited to a mobile terminal and a Personal Computer (PC) terminal that are carried by the user.
For the convenience of understanding of the present application, the technical solutions provided in the present application will be described in detail below with reference to specific embodiments.
Example one
Referring to fig. 1, the device for executing the processing method of the user request may be a cloud platform or a server interacting with a user terminal. The following describes a method for processing a user request provided in the first embodiment of the present application from the perspective of an execution subject being a server. A flowchart of a method for processing a user request provided in an embodiment of the present application includes the following steps:
s101: and acquiring a target request message of the user terminal.
In specific implementation, the server may obtain, in real time, a target request message to be processed, which is input by the user, from the user side.
Here, the target request message may be, for example, a customer service question, that is, a question that a user wants to ask, and generally, the target request message may be text or voice, where the length of the message included in the target request message is not limited, and the semantics in the target request message may be complete or incomplete.
S102: and based on the target request message, searching a plurality of alternative request messages matched with the target request message in a preset request message set.
In specific implementation, request messages commonly used in the field can be collected in advance, a preset request message set is formed after the request messages are processed, and then a plurality of alternative request messages matched with the target request messages can be found in the preset request message set through the content of the target request messages after the target request messages sent by the user side are obtained, so that the plurality of alternative request messages matched with the target request messages can be obtained through preliminary screening of the target request messages in the preset request message set.
Here, the alternative request message is a request message matching the target request message in the preset request message set, and may be a content and semantic match.
It should be noted that, if the request message is 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 collected or manually generated request message.
S103: and respectively calculating the similarity between each alternative request message and the target request message, and selecting the request message to be pushed from the alternative request messages based on the calculated similarity.
In a specific implementation, after a plurality of candidate request messages matched with the target request message are preliminarily screened out from a preset request message set according to the target request message, the plurality of candidate request messages need to be further screened out so as to screen out the request message to be pushed to a user side from the plurality of candidate request messages, specifically, the similarity between each candidate request message and the target request message can be respectively calculated, the plurality of candidate request messages are sorted according to the calculated values of the similarity, and the request message to be pushed is selected from the plurality of candidate request messages according to the sorting result of the plurality of candidate request messages. In this way, the similarity obtained through calculation can realize further screening of a plurality of alternative request messages, so that the request messages can be accurately pushed to the user side.
S104: and sending the request message to be pushed to the user side.
In specific implementation, after the request message to be pushed is selected from the multiple candidate request messages based on the calculated similarity, that is, after the request message most matched with the target request message is determined, the request message to be pushed can be sent to the user side, so that a user of the user side can initiate a request to the server by clicking the request message to be pushed, the accuracy of inputting the request message by the user is improved, the request message input by the user can be normalized, the response efficiency of the server can be improved, and the network and processing resources of the user side and the server side can be reasonably utilized.
Here, one request message to be pushed may be selected, or a preset number of request messages to be pushed may be selected, or a request message whose corresponding similarity is greater than a set threshold may be selected for pushing.
In the embodiment of the application, by acquiring the target request message of the user side, a plurality of alternative request messages matched with the target request message can be found in the preset request message set, that is, the messages in the preset request message set are primarily screened through the target request message to obtain a plurality of alternative request messages; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message pushed to the user side is more accurate, the response efficiency of the server can be improved, and the resources of the user side and the server are saved.
In a possible implementation manner, in S102, based on the target request message, a plurality of candidate request messages matched with the target request message are found in a preset request message set, including the following steps:
step (1): and performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words.
In specific implementation, firstly, the target request message is subjected to word segmentation and synonym replacement, and a plurality of target words subjected to word segmentation and synonym replacement can be obtained, so that a target word comparison specification is obtained, and a plurality of alternative request messages matched with the target request message can be conveniently found out in a preset request message set according to the target words.
In one example, after the target request message is "how to cancel an order," tokenizing the target request message, and replacing "cancel" with "close," a plurality of target words "how," "close," and "order" may be obtained.
Step (2): and aiming at each target word, searching the alternative request message containing the target word in the preset request message set.
In specific implementation, a plurality of target words obtained by replacing the target request message with the participles and the synonyms may be obtained, and for each target word, the target word may be used as a keyword, and the candidate request message including the target word may be found in a preset request message set.
It should be noted that word segmentation and synonym replacement processing may be performed on the request message in the preset request message set in advance, so that a plurality of words may be obtained, and for each word, the word may be associated with the request message including the word, so that the candidate request message including the target word may be found in the preset request message set according to the obtained target word.
Here, in the specific implementation, the method may be implemented by using an inverted index, where the inverted index is derived from that in practical applications, records need to be searched according to the value of an attribute, and each entry in such an index table includes an attribute value and the address of each record having the attribute value. The inverted list is used to record which request messages contain a word, and a series of inverted index items containing the word form a list structure, which is the inverted list corresponding to the word, that is, the request message containing the word can be found according to the word.
In one example, the target word is "how", and the candidate request message including "how" is found in the preset request message set according to the target word "how", wherein the plurality of candidate messages found include "how to complain", "how to close the order", and "how to calculate the service score".
In this embodiment, a plurality of target words may be obtained by processing the target request message, and then for each target word, an alternative request message including the target word may be found in the preset request message set, so that a plurality of alternative request messages matched with the target request message may be obtained by primarily screening the target word.
In a possible implementation manner, for each alternative request message, calculating a similarity between the alternative request message and the target request message in S103 includes:
and 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.
In specific implementation, the candidate request message may be converted into a feature vector, the target request message may be converted into a feature vector, and then the similarity between the feature vector of the candidate request message and the feature vector of the target request message may be calculated as the similarity between the candidate request message and the target request message.
Here, the similarity may be cosine similarity, which is obtained by calculating cosine values of an included angle between two vectors to evaluate the similarity, wherein the cosine similarity is calculated by the following formula
Figure BDA0002028140100000121
a is the feature vector of the alternative request message, and b is the feature vector of the target request message.
In one example, the feature vector of one candidate request message is (0.1830.3220.3220.1020.322000000), the feature vector of the target request message is (0000.10100.2750.1730000.448), and the cosine similarity is 0.0307.
Each element in the feature vector of any alternative request message represents the importance degree 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.
Here, the feature vector of the candidate request message is composed of a plurality of elements, and each element in the feature vector represents the importance degree of a word contained in the candidate request message corresponding to the feature vector in the candidate request message; the feature vector of the target request message is composed of a plurality of elements, and each element in the feature vector represents the importance degree of a word contained in the target request message corresponding to the feature vector in the target request message.
In one example, the alternative request message is "how to compute 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, and each element in the feature vector a is, as denoted by a1, a word included in the alternative request message corresponding to the feature vector a, such as "compute" importance level in the alternative request message.
In one example, the target request message is "how to improve the service score", 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, and b6, and each element in the feature vector b is, as indicated by b1, a word included in the target request message corresponding to the feature vector b, such as "improve" the importance level in the target request message.
In this embodiment, the target request message may be converted into a feature vector, the candidate request message may be converted into a feature vector, and then the similarity between the feature vector of the candidate request message and the feature vector of the target request message may be calculated as the similarity between the candidate request message and the target request message. Therefore, the multiple alternative request messages are further screened through the similarity obtained through calculation, the request message to be pushed to the user side can be determined, and the server can quickly identify the request message and make a response, so that the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server is also improved.
In one possible implementation, 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.
In a specific implementation, the dimension number of the feature vector of the candidate request message is the same as the dimension number of the feature vector of the target request message, so that the similarity between the candidate request message and the target request message is conveniently calculated, wherein the dimension number of the feature vector is equal to the sum of the number of words contained in all screened candidate request messages and the number of words contained in the target request message.
It should be noted that the words contained in the target request message are a plurality of words obtained by replacing the target request message with the participles and the synonyms; similarly, the word included in the alternative request message is also a plurality of words obtained by segmenting the alternative request message. The alternative request messages in the preset request message set are processed by word specification in advance, namely, words related to synonyms are all represented by one word.
Here, when the target request message does not contain a word, the element of the position in the feature vector of the target request message is set to 0 when calculating the degree of importance of the word in the target request message, and similarly, when any alternative request message does not contain a word, the element of the position in the feature vector of the alternative request message is set to 0 when calculating the degree of importance of the word in the alternative request message. Therefore, the dimension number of the feature vector of the candidate request message can be ensured to be the same as the dimension number of the feature vector of the target request message, and the similarity can be calculated conveniently according to the feature vector.
In one possible embodiment, the degree of importance is determined according to the following steps: and determining the importance degree of the word according to the frequency of the corresponding word appearing in the alternative request message or the target request message and the reverse text frequency index of the word.
In a specific implementation, for each element in the feature vector of any alternative request message, the importance degree of a word contained in the alternative request message is represented, and the importance degree 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; for each element in the feature vector of the target request message, the importance degree of a word contained in the target request message is represented, and the importance degree of the word in the target request message is determined by the frequency of the word in the target request message and the inverse text frequency index of the word.
Here, the Term importance (TF-IDF) is used to evaluate the importance of a Term to one of request messages (either an alternative request message or a target request message) in a request message set (a set of all alternative request messages and target request messages). If a word appears frequently in one request message TF is high and rarely appears in other request messages, the word is considered to have a good class distinction capability and is suitable for classification. TFIDF is actually TF × IDF, specifically TF refers to Frequency (Term Frequency), and IDF refers to Inverse text Frequency index (Inverse Document Frequency).
Specifically, the formula for calculating the importance of a word is V ═ TF × IDF, 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.
In this embodiment, each element in the feature vector is represented by the importance degree of a word, so that the request message corresponding to the feature vector can be fully characterized, and further, the request message to be pushed can be more accurately selected from a plurality of candidate request messages through the calculated similarity.
In one possible embodiment, the frequency of the words is determined according to the following steps: and taking the ratio of the number of times the word appears in the alternative request message and the number of words contained in the alternative request message as the frequency of the word appearing in the alternative request message.
In particular implementations, the frequency of a word contained in any one alternative request message in an 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.
Specifically, the calculation formula of the frequency TF of the word is TF 1/N1, where F1 represents the number of times the word appears in the request message, and N1 represents the number of words contained in the request message.
In one example, the alternative request message is "how to promote the service score", where the frequency of the word "service score" in the alternative request message is the number of times the word "service score" appears in the alternative request message ÷ the number of words contained in the alternative request message is 1/3 ═ 0.333.
Determining the frequency of words according to the following steps: and taking the ratio of the number of times of the words appearing in the target request message and the number of words contained in the target request message as the frequency of the words appearing in the target request message.
In particular implementations, the frequency of a word contained in a targeted request message in the targeted request message is determined by the ratio between the number of times the word appears in the targeted request message and the number of words contained in the targeted request message.
In one example, the target request message is "how to cancel the order", where the frequency of the word "cancel" in the target request message is the number of times the word "cancel" appears in the target request message/the number of words contained in the target request message is 1/3-0.333.
In one possible implementation, the inverse text frequency index of a word is determined according to the following steps: and taking the ratio of the total number of the messages in the alternative request message and the target request message to the total number of the messages containing the words in the alternative request message and the target request message as the reverse text frequency index of the words.
In specific implementation, the reverse text frequency index of a word contained in any alternative request message in the alternative request message is determined by the total number of messages in all the alternative request messages and the target request message and the ratio of the total number of messages containing words in all the alternative request messages and the target request message; the reverse text frequency index of a word contained 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 to the total number of messages containing the word in all the alternative request messages and the target request message.
It should be noted that, for the same word, the calculation formula of the inverse text frequency index of a word included in any alternative request message in the alternative request message is the same as the calculation formula of the inverse text frequency index of a word included in the target request message.
Specifically, the formula for calculating the inverse text frequency index IDF of a word may be IDF ═ ln (F2/N2) or IDF ═ lg (F2/N2), where F2 represents the total number of messages in all screened candidate request messages and target request messages, and N2 represents the total number of messages in all screened candidate request messages and target request messages that include the word.
In an example, there are 3 screened candidate request messages and 1 target request message, where the candidate request messages are "how to lock", "how to guarantee the vehicle", "which vehicle usage rules are", the target request message is "how to lock", the reverse text frequency index of "how to lock" in "all candidate request messages and target request messages is ÷ the total number of messages in all candidate request messages and target request messages is ═ 4/2 ═ 2, and the reverse text frequency index of" how to lock "in" all candidate request messages and target request messages is ═ ln (the total number of messages in all candidate request messages and target request messages is ÷ the total number of messages in all candidate request messages and target request messages is ═ ln (4/2) ═ ln 2.
In a possible implementation manner, the selecting a request message to be pushed from a plurality of the alternative request messages based on the calculated similarity in S103 includes:
and selecting the request message to be pushed from the multiple alternative request messages according to the similarity and the historical click rate of the multiple alternative request messages.
In a specific implementation, after calculating the similarity between the multiple candidate request messages and the target request message, in order to more accurately push the request message to be pushed to the user side, the multiple candidate request messages may be further sorted according to the actual conditions of the service, such as the historical click rate of the candidate request messages in the service, on the basis of sorting according to the similarity, so as to determine the request message to be pushed to the user side.
In an example, if the similarities between the target request message and the alternative request messages 1, 3, 4, and 5 are 0.0307, 0.589, 0.115, and 0.054, respectively, then the candidate request messages 3, 4, 5, and 1 are obtained according to the result of the similarity ranking, considering the service requirement, the historical click rate of the above alternative problem is used as a secondary ranking condition, the alternative request message 3 with the highest similarity is retained, the other alternative request messages 4, 5, and 1 are reordered according to the historical click rate, for example, the ranking result of the alternative request messages 4, 5, and 1 according to the historical click rate is 5, 4, and 1, the final ranking result is the alternative request message 3, 5, 4, and 1, and if 2 alternative request messages are selected as the request messages to be pushed, the alternative request messages 3 and 5 should be selected to be pushed to the user end.
In the embodiment of the application, by acquiring the target request message of the user side, a plurality of alternative request messages matched with the target request message can be found in the preset request message set, that is, firstly, the messages in the preset request message set are preliminarily screened through the target request message to obtain a plurality of alternative request messages; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message pushed to the user side is more accurate, the response efficiency of the server can be improved, and the resources of the user side and the server are saved.
Example two
Referring to fig. 2, the device for executing the processing method of the user request may be a cloud platform or a server interacting with the user terminal. Next, a method for processing a user request provided in the second embodiment of the present application will be described with reference to the server as an execution subject. Another flowchart of a method for processing a user request provided in the second embodiment of the present application includes the following steps:
s201: and acquiring a target request message of the user terminal.
In specific implementation, a target request message to be processed, which is input by a user, may be acquired from a user side in real time.
It should be noted that the target request message may be a customer service question, that is, a question that the user wants to ask, and generally, the target request message may be text or voice, where the length of the message included in the target request message is not limited, and the semantics in the target request message may be complete or incomplete.
S202: and respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting the request message to be pushed from the alternative request messages based on the calculated similarity.
In a specific implementation, in order to screen out request messages to be pushed to a user side, first, a similarity between a target request message and each alternative request message in a preset request message set may be respectively calculated, and then a request message to be pushed to the user side is selected from all alternative request messages in the preset request message set according to the similarity. Therefore, all the alternative request messages in the preset request message set are screened according to the similarity, and the accuracy of pushing the request messages to the user side can be improved.
S203: and sending the request message to be pushed to the user side.
In specific implementation, after the request message to be pushed is selected from the multiple candidate request messages based on the calculated similarity, that is, after the request message most matched with the target request message is determined, the request message to be pushed can be sent to the user side, so that a user at the user side can initiate a request to the server by clicking the request message to be pushed, the accuracy of inputting the request message by the user is improved, the request message input by the user can be normalized, the response efficiency of the server can be improved, and the network and processing resources of the user side and the server side are reasonably utilized.
In the embodiment of the application, the target request message of the user side is obtained first, 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 a plurality of alternative request messages through the similarity, and the request message to be pushed is sent to the user side, so that the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server is improved.
In a possible implementation manner, the step S202 of calculating the similarity between each alternative request message in a preset request message set and the target request message respectively includes:
and calculating 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 stored in association in the preset request message set.
In specific implementation, the candidate request message may be converted into a semantic vector, the target request message may 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 may be calculated as the similarity between the candidate request message and the target request message.
Here, all the candidate request messages in the preset request message set may be converted into semantic vectors in advance, and each candidate request message and the semantic vector of the candidate request message are stored in association, so that the similarity between the target request message and any candidate request message may be directly calculated.
In addition, the semantic vector of the target request message is a vector for representing the semantics of the target request message, and specifically, the target request message can be input into a trained semantic model to obtain the semantic vector; the semantic vector of the candidate request message is a vector for representing the semantic of the candidate request message, and specifically, the candidate request message may be input into a trained semantic model to obtain the semantic vector.
It should be noted that the similarity may be cosine similarity, and the cosine similarity is obtained by calculating cosine values of an included angle between two vectors to evaluate the similarity, wherein the cosine similarity is calculated according to the formula
Figure BDA0002028140100000181
c is the semantic vector of the alternative request message, d is the semantic vector of the target request message.
In this embodiment, the target request message may be converted into a semantic vector, the candidate request message may 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 may be calculated as the similarity between the candidate request message and the target request message. Therefore, the multiple alternative request messages are screened through the similarity obtained through calculation, the request message to be pushed to the user side can be determined, the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server is further improved.
In a possible implementation manner, after acquiring the target request message of the user end S201, the method further includes the following steps:
step a: and performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words.
In specific implementation, firstly, the segmentation and synonym replacement processing is performed on the target request message, so that a plurality of target words subjected to the segmentation and synonym replacement processing can be obtained, and thus the obtained target words are unified with words contained in each request message in the preset request message set, so that a plurality of alternative request messages matched with the target request message can be found out in the preset request message set in the following process.
Step b: and inputting the target words into a preset semantic model, and outputting word vectors of the target words.
In specific implementation, for each target word that has been processed for the target request message, the target word may be input into a preset semantic model, and then a word vector corresponding to the target word may be output.
Here, the preset semantic model may be a word to vector model (word to vector) for converting each word into a vector, which may represent a relationship between words.
Step c: adding the word vectors of the target words corresponding to the target request message to obtain the semantic vector of the target request message.
In a specific implementation, the semantic vector of the target request message is obtained by adding word vectors of a plurality of target words corresponding to the target request message.
In this embodiment, a manner of converting the target request message into a semantic vector is provided, and the similarity between the semantic vector of the target request message and the semantic vector of the candidate request message is calculated, so that the request message to be pushed to the user side can be determined according to the similarity, the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server can be improved.
In a possible implementation manner, the selecting a request message to be pushed from a plurality of the alternative request messages based on the calculated similarity in S202 includes:
and selecting the request message to be pushed from the multiple alternative request messages according to the similarity and the historical click rate of the multiple alternative request messages.
In a specific implementation, after calculating the similarity between the multiple candidate request messages and the target request message, in order to more accurately push the request message to be pushed to the user side, the multiple candidate request messages may be further sorted according to the actual conditions of the service, such as the historical click rate of the candidate request messages in the service, on the basis of sorting according to the similarity, so as to determine the request message to be pushed to the user side.
In an example, if the similarities between the target request message and the alternative request messages 1, 3, 4, and 5 are 0.0307, 0.589, 0.115, and 0.054, respectively, then the candidate request messages 3, 4, 5, and 1 are obtained according to the result of the similarity ranking, considering the service requirement, the historical click rate of the above alternative problem is used as a secondary ranking condition, the alternative request message 3 with the highest similarity is retained, the other alternative request messages 4, 5, and 1 are reordered according to the historical click rate, for example, the ranking result of the alternative request messages 4, 5, and 1 according to the historical click rate is 5, 4, and 1, the final ranking result is the alternative request message 3, 5, 4, and 1, and if 3 alternative request messages are selected as the request messages to be pushed, the alternative request messages 3, 5, and 4 should be selected to be pushed to the user end.
In the embodiment of the application, the target request message of the user side is obtained first, 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 a plurality of alternative request messages through the similarity, and the request message to be pushed is sent to the user side, so that the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server is improved.
EXAMPLE III
Based on the same application concept, a device for processing the user request corresponding to the method for processing the user request provided in the first embodiment is also provided in the third embodiment of the present application, and since the principle of solving the problem of the device in the embodiment of the present application is similar to the method for processing the user request in the first embodiment of the present application, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
As shown in fig. 3, a functional block diagram of a processing apparatus 300 for a user request according to a third embodiment of the present application is shown, and as shown in fig. 4, a functional block diagram of a processing apparatus 300 for a user request according to a third embodiment of the present application is shown, wherein the processing apparatus 300 for a user request includes:
an obtaining module 310, configured to obtain a target request message of a user end;
a searching module 320, configured to search, based on the target request message, a plurality of candidate request messages matched with the target request message in a preset request message set;
a calculating module 330, configured to calculate a similarity between each candidate request message and the target request message, and select a request message to be pushed from the candidate request messages based on the calculated similarity;
the sending module 340 is configured to send the request message to be pushed to the user side.
In the embodiment of the present application, the obtaining module 310 obtains the target request message of the user side, and can search a plurality of candidate request messages matched with the target request message in the preset request message set, that is, first, the target request message is used to perform preliminary screening on the messages in the preset request message set to obtain a plurality of candidate request messages; further, the similarity between each candidate request message and the target request message is calculated by the calculation module 330, and the request message to be pushed can be selected from the multiple candidate request messages, that is, the request message to be pushed can be obtained by performing secondary screening on the multiple candidate request messages obtained through the similarity, so that the request message to be pushed is more accurate, the response efficiency of the server can be improved, and the resources of the client and the server can be saved.
In a possible implementation manner, as shown in fig. 3 and fig. 4, the searching module 320 is specifically configured to search for a plurality of alternative request messages according to the following steps:
performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
and aiming at each target word, searching the alternative request message containing the target word in the preset request message set.
In a possible implementation manner, as shown in fig. 3 and fig. 4, for each alternative request message, the calculating module 330 is specifically configured to calculate a similarity between the alternative 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;
each element in the feature vector of any one of the alternative request messages represents the importance degree of a word contained in the alternative request message; each element in the feature vector of any one of the target request messages represents the importance of a word contained in the target request message.
In one possible implementation, as shown in fig. 3 and 4, 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.
In a possible implementation, the calculating module 330 is further configured to determine the importance degree according to the following steps:
and determining the importance degree of the word according to the frequency of the corresponding word appearing in the alternative request message or the target request message and the reverse text frequency index of the word.
In one possible implementation, as shown in fig. 4, the calculation module 330 includes a first calculation unit 332;
the first calculating unit 332 is configured to determine a frequency of words in the alternative request message according to the following steps:
taking the ratio of the number of times of the words appearing in the alternative request message and the number of the words contained in the alternative request message as the frequency of the words appearing in the alternative request message;
the first calculating unit 332 is further configured to determine a frequency of words in the target request message according to the following steps:
and taking the ratio of the number of times of the words appearing in the target request message and the number of words contained in the target request message as the frequency of the words appearing in the target request message.
In one possible implementation, as shown in fig. 4, the calculation module 330 further includes a second calculation unit 334;
the second calculating unit 334 is configured to determine an inverse text frequency index of a word according to the following steps:
and taking the ratio of the total number of the messages in the alternative request message and the target request message to the total number of the messages containing the words in the alternative request message and the target request message as the reverse text frequency index of the words.
In a possible implementation, as shown in fig. 4, the calculation module 330 further includes a selection unit 336;
the selecting 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.
In the embodiment of the present application, the obtaining module 310 obtains the target request message of the user side, and can search a plurality of candidate request messages matched with the target request message in the preset request message set, that is, first, the target request message is used to perform preliminary screening on the messages in the preset request message set to obtain a plurality of candidate request messages; further, the similarity between each candidate request message and the target request message is calculated by the calculation module 330, and the request message to be pushed can be selected from the multiple candidate request messages, that is, the request message to be pushed can be obtained by performing secondary screening on the multiple candidate request messages obtained through the similarity, so that the request message to be pushed is more accurate, the response efficiency of the server can be improved, and the resources of the client and the server can be saved.
Example four
Based on the same application concept, in the fourth embodiment of the present application, a device for processing a user request corresponding to the method for processing a user request provided in the second embodiment of the present application is further provided, and since the principle of solving the problem of the device in the embodiment of the present application is similar to the method for processing a user request in the second embodiment of the present application, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
As shown in fig. 5, a functional block diagram of another processing apparatus 400 for a user request provided in the fourth embodiment of the present application is shown, and as shown in fig. 6, a functional block diagram of another processing apparatus 400 for a user request provided in the fourth embodiment of the present application is shown, in which the processing apparatus 400 for a user request includes:
an obtaining module 410, configured to obtain a target request message of a user side;
a calculating module 420, configured to calculate a similarity between each candidate request message in a preset request message set and the target request message, and select a request message to be pushed from the candidate request messages based on the calculated similarity;
the sending module 430 is configured to send a request message to be pushed to the user side.
In a possible implementation manner, as shown in fig. 5 and fig. 6, the calculating module 420 is specifically configured to calculate the similarity according to the following steps:
calculating 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 stored in association in the preset request message set.
In one possible implementation, as shown in fig. 6, the processing device 400 for the user request further includes a processing module 440;
the processing module 440 is configured to perform word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
the calculating module 420 is further configured to determine a semantic vector of the target request message according to the following steps:
inputting the target words into a preset semantic model, and outputting word vectors of the target words;
adding the word vectors of the target words corresponding to the target request message to determine the semantic vector of the target request message.
In a possible implementation, as shown in fig. 6, the calculation module 420 further includes a selection unit 422;
the selecting 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.
In the embodiment of the present application, first, the obtaining module 410 obtains the target request message of the user side, and the calculating module 420 may calculate the similarity between each candidate request message and the target request message, and further, the request message to be pushed may be selected from the multiple candidate request messages according to the similarity, and the request message to be pushed is sent to the user side through the sending module 430, so that the accuracy of pushing the request message to the user side may be improved, and the server response efficiency may be improved.
EXAMPLE five
Based on the same application concept, referring to fig. 7, a schematic structural diagram of an electronic device 500 provided in the fifth embodiment of the present application includes: a processor 510, a memory 520, and a bus 530, wherein the memory 520 stores machine-readable instructions executable by the processor 510, the processor 510 and the memory 520 communicate via the bus 530 when the electronic device 500 is operating, and the machine-readable instructions are executed by the processor 510 to perform the steps of the method for processing a user request according to the first embodiment or the second embodiment.
In particular, the machine readable instructions, when executed by the processor 510, may perform the following:
acquiring a target request message of a user side;
based on the target request message, searching a plurality of alternative request messages matched with the target request message in a preset request message set;
respectively calculating the similarity between each alternative request message and the target request message, and selecting a request message to be pushed from the alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
In the embodiment of the application, by acquiring the target request message of the user side, a plurality of alternative request messages matched with the target request message can be found in the preset request message set, that is, the messages in the preset request message set are primarily screened through the target request message to obtain a plurality of alternative request messages; further, by 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 obtained multiple alternative request messages are subjected to secondary screening through the similarity to obtain the request message to be pushed, so that the request message pushed to the user side is more accurate, the response efficiency of the server can be improved, and the resources of the user side and the server are saved.
In particular, the machine readable instructions, when executed by the processor 510, may also perform the following:
acquiring a target request message of a user side;
respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting a request message to be pushed from a plurality of alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
In the embodiment of the application, the target request message of the user side is obtained first, 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 a plurality of alternative request messages through the similarity, and the request message to be pushed is sent to the user side, so that the accuracy of pushing the request message to the user side can be improved, and the response efficiency of the server is improved.
EXAMPLE six
Based on the same application concept, a sixth embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps of the method for processing a user request provided in the first embodiment or the second embodiment.
Specifically, the storage medium may be a general storage medium, such as a removable disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the processing method of the user request may be executed, so that the accuracy of pushing the request message to the user side may be improved, and the response efficiency of the server may be improved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A processing method for user requests is characterized by comprising the following steps:
acquiring a target request message of a user side;
based on the target request message, searching a plurality of alternative request messages matched with the target request message in a preset request message set;
respectively calculating the similarity between each alternative request message and the target request message, and selecting a request message to be pushed from the alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
2. The processing method according to claim 1, wherein the searching for multiple candidate request messages matching the target request message in a preset request message set based on the target request message comprises:
performing word segmentation and synonym replacement processing on the target request message to obtain a plurality of target words;
and aiming at each target word, searching the alternative request message containing the target word in the preset request message set.
3. The processing method according to claim 1, wherein calculating, for each of the alternative request messages, a similarity between the alternative request message and the target request message comprises:
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;
each element in the feature vector of any one of the alternative request messages represents the importance degree of a word contained in the alternative request message; each element in the feature vector of any one of the target request messages represents the importance of a word contained in the target request message.
4. The processing method according to claim 3, wherein the feature vector has a dimension number equal to the total number of all words contained in the candidate request message and the target request message.
5. A processing method according to claim 3, characterized in that the degree of importance is determined according to the following steps:
and determining the importance degree of the word according to the frequency of the corresponding word appearing in the alternative request message or the target request message and the reverse text frequency index of the word.
6. A processing method for user requests is characterized by comprising the following steps:
acquiring a target request message of a user side;
respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting a request message to be pushed from a plurality of alternative request messages based on the calculated similarity;
and sending the request message to be pushed to the user side.
7. The processing method according to claim 6, wherein said separately calculating the similarity between each of the alternative request messages in the preset request message set and the target request message comprises:
calculating 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 stored in association in the preset request message set.
8. A processing apparatus for a user request, the processing apparatus comprising:
the acquisition module is used for acquiring a target request message of a user side;
the searching module is used for searching a plurality of candidate request messages matched with the target request message in a preset request message set based on the target request message;
the calculation module is used for calculating the similarity between each alternative request message and the target request message respectively and selecting the request message to be pushed from the alternative request messages based on the calculated similarity;
and the sending module is used for sending the request message to be pushed to the user side.
9. A processing apparatus for a user request, the processing apparatus comprising:
the acquisition module is used for acquiring a target request message of a user side;
the calculation module is used for respectively calculating the similarity between each alternative request message in a preset request message set and the target request message, and selecting a request message to be pushed from the alternative request messages based on the calculated similarity;
and the sending module is used for sending the request message to be pushed to the user side.
10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operated, the machine-readable instructions when executed by the processor performing the steps of the method of processing a user request according to claim 1 or performing the steps of the method of processing a user request according to claim 6.
11. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method for handling a user request according to claim 1 or performs the steps of the method for handling a user request according to claim 6.
CN201910300721.7A 2019-04-15 2019-04-15 User request processing method and device, electronic equipment and storage medium Pending CN111831796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910300721.7A CN111831796A (en) 2019-04-15 2019-04-15 User request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910300721.7A CN111831796A (en) 2019-04-15 2019-04-15 User request processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111831796A true CN111831796A (en) 2020-10-27

Family

ID=72914247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910300721.7A Pending CN111831796A (en) 2019-04-15 2019-04-15 User request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111831796A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110251839A1 (en) * 2010-04-09 2011-10-13 International Business Machines Corporation Method and system for interactively finding synonyms using positive and negative feedback
CN106339507A (en) * 2016-10-31 2017-01-18 腾讯科技(深圳)有限公司 Method and device for pushing streaming media message
US20170193086A1 (en) * 2015-12-31 2017-07-06 Shanghai Xiaoi Robot Technology Co., Ltd. Methods, devices, and systems for constructing intelligent knowledge base
US20180181988A1 (en) * 2016-12-26 2018-06-28 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for pushing information
CN109067643A (en) * 2018-09-26 2018-12-21 中国平安财产保险股份有限公司 Answering method, device, computer equipment and storage medium based on keyword
US20190057164A1 (en) * 2017-08-16 2019-02-21 Beijing Baidu Netcom Science And Technology Co., Ltd. Search method and apparatus based on artificial intelligence

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110251839A1 (en) * 2010-04-09 2011-10-13 International Business Machines Corporation Method and system for interactively finding synonyms using positive and negative feedback
US20170193086A1 (en) * 2015-12-31 2017-07-06 Shanghai Xiaoi Robot Technology Co., Ltd. Methods, devices, and systems for constructing intelligent knowledge base
CN106339507A (en) * 2016-10-31 2017-01-18 腾讯科技(深圳)有限公司 Method and device for pushing streaming media message
US20180181988A1 (en) * 2016-12-26 2018-06-28 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for pushing information
US20190057164A1 (en) * 2017-08-16 2019-02-21 Beijing Baidu Netcom Science And Technology Co., Ltd. Search method and apparatus based on artificial intelligence
CN109067643A (en) * 2018-09-26 2018-12-21 中国平安财产保险股份有限公司 Answering method, device, computer equipment and storage medium based on keyword

Similar Documents

Publication Publication Date Title
CN108804641B (en) Text similarity calculation method, device, equipment and storage medium
TWI524193B (en) Computer-readable media and computer-implemented method for semantic table of contents for search results
CN105045781B (en) Query term similarity calculation method and device and query term search method and device
US8290927B2 (en) Method and apparatus for rating user generated content in search results
JP4011906B2 (en) Profile information search method, program, recording medium, and apparatus
CN109033101B (en) Label recommendation method and device
US9256649B2 (en) Method and system of filtering and recommending documents
JP2012527028A (en) Search method, apparatus and system
CN103136228A (en) Image search method and image search device
CN110309251B (en) Text data processing method, device and computer readable storage medium
CN113326420B (en) Question retrieval method, device, electronic equipment and medium
WO2013192093A1 (en) Search method and apparatus
US9721000B2 (en) Generating and using a customized index
US9552415B2 (en) Category classification processing device and method
JP5367632B2 (en) Knowledge amount estimation apparatus and program
CN111553151A (en) Question recommendation method and device based on field similarity calculation and server
JP2016045620A (en) Expert search apparatus, expert search method, and expert search program
CN105653553B (en) Word weight generation method and device
US20150074121A1 (en) Semantics graphs for enterprise communication networks
CN111625619B (en) Query omission method, device, computer readable medium and electronic equipment
CN110008396B (en) Object information pushing method, device, equipment and computer readable storage medium
CN111831796A (en) User request processing method and device, electronic equipment and storage medium
CN114610859A (en) Product recommendation method, device and equipment based on content and collaborative filtering
CN112541069A (en) Text matching method, system, terminal and storage medium combined with keywords
CN112597760A (en) Method and device for extracting domain words in document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination