Seat verbal skill recommendation method and device, storage medium and electronic equipment
By extracting keywords from user chat information in the online agent service, querying the knowledge base and recommending candidate questions and speeches, the problems of distraction and low work efficiency in responding to user problems are solved, and more efficient services are achieved.
Patent Information
- Application Number
- CN202311241704.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-28
AI Technical Summary
In the online seat service, when responding to user questions, the seat staff needs to frequently search and filter knowledge, resulting in distraction and low work efficiency.
By obtaining user chat information in the current session, extracting target keywords and querying relevant standard questions and speeches in the knowledge base, candidate questions and speeches are recommended to the agent.
There is no need for the agent to manually search for speech, and directly recommend candidate questions and speech, which improves the work efficiency of the agent and reduces the time for search and screening.
Smart Images

Figure CN119719346A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a method, device, storage medium, and electronic device for recommending agent speech. Background Art
[0002] More and more agent scenarios have been transferred from offline to online, including telephone agents, online customer service, etc. The initial learning cost of agents is relatively high, and it takes a long time to train before they can officially take up their posts. In addition, during the on-the-job process, since users' questions are various and involve all aspects, agents need to master more knowledge to solve users' problems. However, human energy and memory are limited, and it is often difficult to record all the knowledge. Therefore, by building a knowledge retrieval system, agents can query the required knowledge to answer users' questions.
[0003] However, online agent services have high real-time requirements and need to answer users' questions in a relatively short time, so there is not much time for agents to search for knowledge. Agents need to answer users' questions while searching for knowledge and screen the knowledge, which distracts agents and reduces their work efficiency. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present application provides a method, device, storage medium and electronic device for recommending agent speech, which can improve the work efficiency of agents.
[0005] According to a first aspect of an embodiment of the present application, a method for recommending agent speech is provided, comprising the following steps:
[0006] Get the chat information of the user in the current session;
[0007] Extract target keywords from chat messages, and query the knowledge base to obtain several standard questions related to the target keywords and corresponding standard scripts;
[0008] Obtain the user's core questions from the chat information, match the user's core questions with several standard questions for similarity, and obtain a preset number of candidate questions and corresponding candidate dialogues;
[0009] A preset number of candidate questions and corresponding candidate dialogues are recommended to the agents in the current conversation.
[0010] According to a second aspect of an embodiment of the present application, a device for recommending agent speech techniques is provided, including:
[0011] A chat information acquisition module is used to obtain the chat information of the user in the current session;
[0012] The standard speech acquisition module is used to extract target keywords from chat information and query the knowledge base to obtain several standard questions related to the target keywords and the corresponding standard speech;
[0013] A candidate speech acquisition module is used to obtain the user's core questions from the chat information, match the user's core questions with a number of standard questions for similarity, and obtain a preset number of candidate questions and corresponding candidate speech;
[0014] The candidate speech recommendation module is used to recommend a preset number of candidate questions and corresponding candidate speech to the agent of the current conversation.
[0015] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a display, a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned agent speech recommendation method.
[0016] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for recommending agent speech techniques as described above is implemented.
[0017] The embodiment of the present application obtains the chat information of the user in the current session; extracts the target keyword from the chat information, queries the knowledge base to obtain several standard questions related to the target keyword and the corresponding standard speech; obtains the user's core question from the chat information, matches the user's core question with several standard questions for similarity, obtains a preset number of candidate questions and corresponding candidate speech; recommends the preset number of candidate questions and the corresponding candidate speech to the agent of the current session. The present application matches the candidate questions and the corresponding candidate speech from the knowledge base based on the target keywords and the user's core questions obtained from the chat information, eliminates the need for the agent to manually search for the speech, and improves the work efficiency of the agent.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0019] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of an agent conversation interface in a related technology shown in an embodiment of the present application;
[0021] Figure 2 This is a flow chart of a method for recommending agent speech skills according to an embodiment of the present application;
[0022] Figure 3This is a flow chart before step S20 in the agent speech recommendation method according to one embodiment of the present application;
[0023] Figure 4 This is a flowchart after step S21 in the agent speech recommendation method according to one embodiment of the present application;
[0024] Figure 5 This is a flowchart of step S22 in the agent speech recommendation method according to one embodiment of the present application;
[0025] Figure 6 This is a flowchart of step S24 in the agent speech recommendation method according to an embodiment of the present application;
[0026] Figure 7 This is a flowchart of step S25 in the agent speech recommendation method according to one embodiment of the present application;
[0027] Figure 8 This is a flowchart of step S30 in the agent speech recommendation method according to one embodiment of the present application;
[0028] Fig. 9 This is a flowchart of step S30 in the agent speech recommendation method according to another embodiment of the present application;
[0029] Fig.10 This is a flowchart of step S40 in the agent speech recommendation method according to one embodiment of the present application;
[0030] Fig.11 A schematic diagram of an agent conversation interface according to an embodiment of the present application;
[0031] Fig.12 This is a schematic block diagram of the structure of a device for recommending agent speech techniques according to an embodiment of the present application;
[0032] Fig.13 The present invention is a block diagram showing the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0034] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0035] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include the majority form, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0036] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0037] The application environment of the agent speech recommendation method provided in the embodiment of the present application includes an agent speech recommendation device.
[0038] The agent speech recommendation method provided in the embodiment of the present application can be executed by an agent speech recommendation device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities, or one physical entity. The agent speech recommendation device can be any electronic device with an agent speech recommendation application installed, and the electronic device can be a computer, a mobile phone, a tablet, or an interactive tablet and other smart devices.
[0039] The agent speech recommendation method of the embodiment of the present application can be applied to online customer service scenarios. The inventor discovered during the process of implementing the present invention that in online customer service scenarios, agents are required to respond to user questions promptly and accurately. Figure 1 When responding to a question raised by user 2, agent 1 needs to query relevant knowledge about the user's question from multiple knowledge retrieval systems 3 or knowledge bases based on the question raised by user 2, and needs to screen and organize the relevant knowledge, which causes the agent to spend a lot of time and energy, distract his attention, and have low work efficiency.
[0040] To this end, this application matches candidate questions and corresponding candidate scripts from the knowledge base based on the target keywords and user core questions obtained from the chat information, eliminating the need for agents to manually search for scripts, thereby improving the work efficiency of agents.
[0041] Based on this, the present application proposes a method, device, storage medium and electronic device for recommending agent speech.
[0042] See also Figure 2 The agent speech recommendation method provided in the embodiment of the present application includes the following steps:
[0043] S10: Obtain chat information of the user in the current session.
[0044] The current session includes the chat information of the user and the chat information of the agent. Specifically, the chat information of the user includes the questions raised by the user to the agent, and the chat information of the agent includes the message in which the agent replies to the questions raised by the user.
[0045] In the embodiment of the present application, the latest chat information of the user in the current session can be obtained, and the latest chat information of the user is the chat information of the user at the current moment. The chat information of the user before the current moment in the current session can also be obtained.
[0046] S20: Extract target keywords from the chat information, and query the knowledge base to obtain several standard questions related to the target keywords and corresponding standard speech.
[0047] The target keywords include but are not limited to the product information, intent words and subject words involved in the chat information. The product information includes but is not limited to the product name and product model.
[0048] In the knowledge base, a standard question corresponds to a unique standard script. A standard question corresponds to at least one keyword and at least one synonym of the keyword. A standard question is obtained by normalizing the questions raised by users according to preset rules. A standard script is the solution step for a standard question. A standard script is obtained by normalizing the script used by agents when answering users according to preset rules.
[0049] In an embodiment of the present application, keywords or synonyms consistent with the target keyword can be queried from the knowledge base, standard questions corresponding to the keywords or synonyms can be determined as several standard questions related to the target keyword, and standard scripts corresponding to the several standard questions can be obtained.
[0050] S30: Obtain the user's core question from the chat information, perform similarity matching between the user's core question and a number of standard questions, and obtain a preset number of candidate questions and corresponding candidate dialogues.
[0051] Among them, the user's core problem refers to the problem that the user needs to solve most.
[0052] In an embodiment of the present application, semantic recognition can be performed on chat information to determine the core questions of the user. Specifically, based on deep learning technology, a pre-trained semantic recognition model can be used to perform semantic recognition on chat information to determine the core questions of the user. After obtaining the core questions of the user, the core questions of the user can be matched with several standard questions obtained from the knowledge base query to obtain candidate questions and corresponding candidate words whose similarity ranks before a preset number. Specifically, the core questions of the user can be matched with several standard questions based on literal matching and / or vector similarity calculation.
[0053] S40: Recommending a preset number of candidate questions and corresponding candidate dialogues to the agent of the current conversation.
[0054] Since a standard question in the knowledge base corresponds to a unique standard speech, a preset number of candidate questions are matched from the standard question, and thus, the candidate speech corresponding to each candidate question can be obtained from the standard speech.
[0055] In an embodiment of the present application, a preset number of candidate questions and corresponding candidate speech can be displayed in the first preset area of the current conversation interface for the agent to view. A preset number of candidate questions can also be displayed in the first preset area of the current conversation interface for the agent to view. The agent clicks on a candidate question to display the candidate speech corresponding to the candidate question. Specifically, the candidate speech can be displayed in the second preset area of the current conversation interface, and the display position of the second preset area is different from that of the first preset area. The candidate speech can also be displayed in a floating window of the current conversation interface.
[0056] The embodiment of the present application is applied to obtain the chat information of the user in the current session; extract the target keyword from the chat information, query the knowledge base to obtain several standard questions related to the target keyword and the corresponding standard speech; obtain the user's core question from the chat information, match the user's core question with several standard questions for similarity, obtain a preset number of candidate questions and corresponding candidate speech; recommend the preset number of candidate questions and corresponding candidate speech to the seat staff of the current session. The present application matches the candidate questions and the corresponding candidate speech from the knowledge base based on the target keywords and the user's core questions obtained from the chat information, without the need for the seat staff to manually search for the speech, thereby improving the work efficiency of the seat staff.
[0057] In an alternative embodiment, see Figure 3 , before step S20, including steps S21 to S26, which are specifically as follows:
[0058] S21: Obtain source data of several question-answer pairs.
[0059] The question-and-answer data includes, but is not limited to, historical conversations between several agents and several users, question-and-answer document files in the form of dialogues, and question-and-answer logs.
[0060] S22: extracting the user's core question, the agent's speech corresponding to the user's core question, and the first keyword of the user's core question from a plurality of question-answer pair source data.
[0061] Each question-answer pair source data includes a user session and an agent session. The user session includes questions raised by the user, and the agent session includes answers from the agent to the user's questions.
[0062] In an embodiment of the present application, a supervised learning model or an unsupervised learning model can be trained to extract the user's core question, the agent's speech corresponding to the user's core question, and the first keyword of the user's core question from each question-and-answer pair source data.
[0063] S23: Clustering the source data of the plurality of question and answer pairs according to the first keyword to obtain a plurality of clusters.
[0064] In the embodiment of the present application, after obtaining a number of first keywords corresponding to each question-answer pair source data, the first keywords are pieced together to form a key short sentence, and the key short sentence is converted into a semantic vector using a pre-trained word vector model. The pre-trained word vector model includes but is not limited to the Word2Vec word vector model and the GloVe word vector model.
[0065] The acquired semantic vectors are clustered based on a clustering algorithm, and the source data of question-answer pairs with similar semantics are grouped into the same cluster by identifying the similarity between the semantic vectors, thereby obtaining a number of clusters. The clustering algorithm includes but is not limited to K-means, DBSCAN or a hierarchical clustering algorithm.
[0066] S24: Filter out similar user core questions from each cluster, integrate the similar user core questions and the agent scripts corresponding to the similar user core questions, and obtain standard questions and standard scripts corresponding to the standard questions.
[0067] In the embodiment of the present application, according to the clustering of the first keyword, the source data of question-answer pairs containing similar first keywords can be clustered together, but there are multiple source data of question-answer pairs with similar first keywords but different user core questions in the same cluster. For example, the first keywords of the user core questions corresponding to the two source data of question-answer pairs "the screen of the large-screen TV is broken" and "the screen of the learning machine is broken" are both "screen" and "broken", but these two user core questions are not the same question, so they need to be distinguished again.
[0068] A supervised learning model or an unsupervised learning model can be trained, and similar user core questions can be screened out from each cluster using the supervised learning model or the unsupervised learning model. Similar user core questions and the agent scripts corresponding to the similar user core questions can be integrated to obtain standard questions and standard scripts corresponding to the standard questions.
[0069] S25: Extracting a second keyword and a synonym corresponding to the second keyword from the standard question.
[0070] In an embodiment of the present application, a supervised learning model or an unsupervised learning model may be trained, and the supervised learning model or the unsupervised learning model may be used to extract the second keyword and the synonyms corresponding to the second keyword for each standard question.
[0071] S26: Generate a knowledge base based on standard questions, standard words, second keywords and synonyms.
[0072] In the embodiment of the present application, a mapping relationship is established among the standard question, the standard words corresponding to the standard question, the second keyword of the standard question, and the synonym of the second keyword. The standard question, the standard words corresponding to the standard question, the second keyword of the standard question, the synonym of the second keyword, and the corresponding mapping relationship are stored in the knowledge base.
[0073] By extracting the user's core questions, agent's words and the first keyword from the source data of several question and answer pairs, the knowledge base can be built automatically and quickly.
[0074] In an alternative embodiment, see Figure 4 , after step S21, steps S211 to S213 are included, which are specifically as follows:
[0075] S211: Classify a number of question-answer pair source data to obtain the category of each question-answer pair source data.
[0076] Among them, the source data of question and answer pairs can be classified differently based on different business scenarios or products, such as pre-sales and after-sales scenarios, and different products. The core questions of users in the source data of question and answer pairs of the same category have certain relevance or similarity. For example, in the after-sales scenario of notebook computers, users ask various after-sales questions about notebook computers, such as blue screen, keyboard failure, etc.
[0077] In the embodiment of the present application, the source data of several question and answer pairs are classified according to the product, and the categories of the source data of several question and answer pairs are obtained. Specifically, the product information consulted by the user can be determined by identifying the user's incoming channel. The incoming channel represents some relevant information selected by the user when entering the manual seat service, for example, which type of product the user chooses to consult. The product information can also be identified from the chat information by identifying the user's chat information.
[0078] S212: Perform text recognition on multimedia files of all question-answer pair source data in the same category, and add the recognized text to the corresponding question-answer pair source data.
[0079] The multimedia files include but are not limited to pictures, audio and video.
[0080] In an embodiment of the present application, optical character recognition can be performed on the pictures in the question-answer source data to identify the text information in the pictures. A speech-to-text tool can be used to recognize the speech in the question-answer source data to obtain text information corresponding to the speech. The video in the question-answer source data can be split into video frames and audio, optical character recognition can be performed on the video frames to identify the text information in the video frames, and a speech-to-text tool can be used to recognize the audio to obtain text information corresponding to the audio.
[0081] S213: Perform session truncation and session sensitive information deletion on all question and answer pair source data in the same category.
[0082] Among them, the conversation between the user and the agent may contain a lot of content that is not related to question answering, such as greetings, small talk, thanks, etc.
[0083] In an embodiment of the present application, in order to filter out the conversation part that is directly related to the problem-solving process, the conversation can be truncated by using algorithms such as keyword recognition and intent recognition, so that the truncated conversation content only contains key information.
[0084] When processing question-and-answer source data, it is necessary to pay attention to the protection of user privacy. Therefore, it is necessary to delete or replace the user's personal information (such as name, phone number, email address, etc.) in the session.
[0085] In the embodiments of the present application, by integrating regular expression matching, entity recognition and other technologies, the portion of the conversation containing sensitive information is removed.
[0086] The quality of question-answer source data is improved by classifying the source data, processing multimedia files, truncating sessions, and deleting sensitive information in sessions.
[0087] In an alternative embodiment, see Figure 5Step S22 includes steps S221 to S224, which are specifically as follows:
[0088] S221: For each question-answer pair of source data, construct a first instruction for extracting the user's core question and the agent's speech corresponding to the user's core question.
[0089] Among them, Large Language Model (LLM) is widely used in unsupervised tasks. By simply designing appropriate instructions, the large language model can extract key information. The large language model is good at summarizing and summarizing text, and the input and output of the model can be adjusted through instruction control.
[0090] In the embodiment of the present application, the first instruction is in the following form:
[0091] "Based on the conversation between the given user and the agent, extract a core question of the user. The output format is: <User core question: xxxx>,
[0092] Extract the agent's scripts (no more than 10) to answer the user's core questions and output them in a list format.
[0093] Extract the links in the agent's reply and output them in a list.
[0094] The following is the conversation content between the user and the agent: xxxx"
[0095] S222: Input each question-answer pair source data and the corresponding first instruction into the large language model to obtain the user's core question and the agent's speech corresponding to the user's core question.
[0096] In an embodiment of the present application, the first instruction for extracting the user's core questions and the agent's speech is combined with the conversation content and input into the large language model together. The large language model will output the user's core questions and the agent's speech corresponding to the user's core questions, wherein the agent's speech also includes a multimedia file access link sent by the user.
[0097] S223: Construct a second instruction for extracting the first keyword of the user's core question.
[0098] In the embodiment of the present application, the second instruction is in the following form:
[0099] "The sentence xxxx is the user's core question. Extracting the two most important keywords from it can express the meaning of the original sentence."
[0100] S224: Input the user's core question and the corresponding second instruction into the large language model to obtain the first keyword of the user's core question.
[0101] In an embodiment of the present application, the second instruction corresponding to the first keyword for extracting the core question of the user is input into the large language model, and the large language model outputs two keywords representing the core question of the user.
[0102] By using a large language model and constructing the first instruction and the second instruction, the user's core question, the agent's words corresponding to the user's core question, and the first keyword of the user's core question can be automatically and quickly extracted.
[0103] In an alternative embodiment, see Figure 6 Step S24 includes steps S241 to S224, which are specifically as follows:
[0104] S241: For each cluster, construct a third instruction for extracting similar user core questions.
[0105] In the embodiment of the present application, the third instruction is in the following form:
[0106] "The following sentences are descriptions of equipment failure phenomena. Which sentences are semantically similar? The output format is a list, and the elements in the list are a collection of semantically similar sentences.
[0107] Input: [Download DingTalk##Unable to log in to DingTalk##Log in to DingTalk at the same time##Log in to DingTalk with verification##Log in to Seewo DingTalk at the same time##Download DingTalk##Learning machine and mobile phone cannot log in to WeChat and DingTalk at the same timeLog in to WeChat and DingTalk at the same time]
[0108] Output: [{Download DingTalk##Download DingTalk}, {Login to DingTalk at the same time##Login to Xiwo DingTalk at the same time}]
[0109] Input: [Mini Program cannot be opened##WeChat Mini Program cannot be opened##Mini Program cannot be opened##Why can't the mini program of WeChat on the machine be opened? ##Mini Program cannot be opened]
[0110] Output: [{Mini program cannot be opened##WeChat mini program cannot be opened##Mini program cannot be opened##Why can't the WeChat mini program on the machine be opened? ##Mini program cannot be opened}]
[0111] Input: xxxx"
[0112] Among them, the third instruction is the few-shot input instruction, which allows the large language model to learn solutions based on given examples, thereby finding similar user core problems.
[0113] S242: Input the user core questions corresponding to all question-answer pair source data in each cluster and the corresponding third instructions into the large language model to obtain similar user core questions corresponding to each cluster.
[0114] In an embodiment of the present application, all user core questions in the same cluster are concatenated together, for example, [user core question 1##user core question 2##user core question 3##…], and then added to the third instruction mentioned above to construct a large language model input under a few-shot setting.
[0115] The format of the large language model output is: [{user core question a, user core question c}, {user core question b, user core question f}, ... . ] Each curly brace contains a similar user core question.
[0116] S243: Select any one of the similar user core questions as a standard question.
[0117] In the embodiment of the present application, since there are multiple similar user core questions, any one of them can be selected as the standard question.
[0118] S244: Integrate the agent scripts corresponding to similar core user questions to obtain standard scripts corresponding to standard questions.
[0119] In the embodiment of the present application, different agents have given different agent speeches to solve the core problems of users. Therefore, it is necessary to integrate these agent speeches to obtain a more comprehensive and appropriate agent speech.
[0120] Specifically, a large language model can be used to integrate the agent's speech corresponding to similar user core questions to obtain standard speech. The form of constructing the agent's speech integration instruction is as follows:
[0121] "Below are the solutions given by different agents to the {core problem position symbol} problem. Please organize these solutions and come up with a more appropriate and professional solution script with no more than 5 steps.
[0122] {Solution 1}
[0123] {Solution Talk 2}”
[0124] The agent's speech integration instructions and the agent's speech corresponding to similar user core questions are input into the large language model, and the large language model outputs standard speech.
[0125] By using a large language model and constructing third instructions, standard questions and the standard dialogue corresponding to the standard questions can be obtained automatically and quickly.
[0126] In an alternative embodiment, see Figure 7 Step S25 includes steps S251 to S252, which are specifically as follows:
[0127] S251: For each standard question, construct a fourth instruction for extracting a second keyword and a synonym corresponding to the second keyword.
[0128] In the embodiment of the present application, the fourth instruction is in the following form:
[0129] "Input: All-in-one screen lock unlock, output: ['lock screen / screen lock / unlock']
[0130] Input: Workbench-5 Intelligent Control, Output: ['Intelligent Control / Control']
[0131] Input: How does the class optimization master redeem the store prizes? Output: ['prize', 'exchange / exchange']
[0132] Input: {Standard Question}"
[0133] S252: Input each standard question and the corresponding fourth instruction into the large language model to obtain the second keyword of the standard question and the synonym corresponding to the second keyword.
[0134] In an embodiment of the present application, the standard question and the corresponding fourth instruction are input into the large language model, and the large language model outputs the second keyword and the synonym of the second keyword according to the format, where the synonym of the second keyword is represented after “ / ”.
[0135] By using a large language model and constructing the fourth instruction, the second keyword of the standard question and the synonyms corresponding to the second keyword can be automatically and quickly obtained.
[0136] In an alternative embodiment, see Figure 8 The step of obtaining the user's core question from the chat information in step S30 includes steps S311 to S313, which are specifically as follows:
[0137] S311: Segment the chat information, remove punctuation marks, and remove stop words to obtain a number of original segmented words;
[0138] S312: using a preset domain dictionary, performing text error correction on a number of original segmented words to obtain a number of target segmented words;
[0139] S313: Based on several target word segmentations, the user's core question is obtained.
[0140] In the embodiment of the present application, chat information is segmented, punctuation marks and stop words are removed, and useless information in the chat information can be removed. Text error correction is performed on several original segmented words, specifically, based on the user's conversation content and the contextual meaning, obvious grammatical errors and obvious typos in several original segmented words are corrected. Several target segmented words are spliced to obtain the user's core question.
[0141] By segmenting chat messages, removing punctuation marks, removing stop words, and correcting text, the core issues of users can be obtained automatically and quickly.
[0142] In an alternative embodiment, see Fig. 9 In step S30, the user's core question is matched with a number of standard questions for similarity, and a preset number of candidate questions and corresponding candidate speech words are obtained, including steps S321 to S323, which are specifically as follows:
[0143] S321: Based on literal matching, the user's core question is matched with a number of standard questions in similarity to obtain a first candidate question whose similarity ranks before a preset number.
[0144] The literal matching methods include but are not limited to bm25 and TF-IDF algorithms.
[0145] In the embodiment of the present application, a literal matching method is used to calculate the similarity scores between several standard questions and the user's core question, and the m standard questions with the highest similarity scores are determined as the first candidate questions.
[0146] S322: Based on vector similarity calculation, the user's core question is matched with a number of standard questions in similarity to obtain a second candidate question whose similarity ranks before a preset number.
[0147] The vector similarity calculation method includes but is not limited to Word2Vec, Glove and other vector similarity calculation methods.
[0148] In the embodiment of the present application, a vector similarity calculation method is used to calculate the similarity scores between a number of standard questions and the user's core question, and the n standard questions with the highest similarity scores are determined as the second candidate questions.
[0149] S323: Input the first candidate question, the second candidate question and the user's core question into the trained language representation model to obtain candidate questions that rank before a preset number in similarity to the user's question and candidate dialogues corresponding to the candidate questions.
[0150] The trained language representation model may be a Bert model.
[0151] In the embodiment of the present application, the trained language representation model outputs the similarity scores of the first candidate question and the second candidate question with the user's core question, and the k standard questions with the highest similarity scores are determined as candidate questions. The candidate speech corresponding to the candidate question is obtained from the knowledge base.
[0152] Through literal matching, vector similarity calculation and trained language representation models, a preset number of candidate questions and corresponding candidate dialogues can be obtained automatically and quickly.
[0153] In an alternative embodiment, see Fig.10 , step S40, including steps S41 to S42, are as follows:
[0154] S41: Display a preset number of candidate questions in a first display area; wherein the first display area is located below the chat information.
[0155] The first display area may be a rectangular area of a preset size.
[0156] In the embodiments of this application, please refer to Fig.11 , a preset number of candidate questions can be displayed in the form of a list in the first display area 11, and the first display area 11 is located below the user chat information for the convenience of the seat staff to watch.
[0157] S42: In response to a triggering operation on a target candidate question, a target candidate speech corresponding to the target candidate question is displayed in a second display area; wherein the second display area is located on the right side of the interface where the current conversation is located, and the target candidate question is any one of a preset number of candidate questions.
[0158] The second display area may be a rectangular area of a preset size.
[0159] In the embodiment of the present application, a hyperlink or button control can be set for the candidate questions displayed in the first display area 11. The agent can trigger the hyperlink of the candidate question by clicking on any candidate question, so that the second display area 12 is displayed on the interface where the current session is located. The agent can also display the second display area 12 on the interface where the current session is located by clicking on the button control. The second display area 12 displays the candidate speech corresponding to the candidate question. The agent can copy and paste the candidate speech to reply to the user. The agent can also modify the candidate speech and reply the modified candidate speech to the user.
[0160] By displaying candidate questions below the user's chat information and clicking on the hyperlink or button control of the candidate question to display the candidate wording of the candidate question, the agent can see the recommended candidate questions while reading the user's chat information. If the agent needs to view the candidate wording of the candidate question, he can directly click on the candidate question to view the candidate wording, which can reduce the agent's active query actions, reduce the agent's attention distraction, provide the agent with concentration, and improve the agent's work efficiency.
[0161] In an optional embodiment, the agent speech recommendation method includes step S43, which is as follows:
[0162] S43: When it is detected that the agent sends the target candidate script to the user, the display state of the first display area is switched from the expanded state to the collapsed state; wherein the expanded state is used to display a preset number of candidate questions, and the collapsed state is used to not display the preset number of candidate questions.
[0163] In an embodiment of the present application, the display state of the first display area includes an expanded state and a collapsed state. When the first display area is in the expanded state, the agent can see the candidate questions. When the first display area is in the collapsed state, the agent cannot see the candidate questions. After the agent replies to the user with the target candidate words, the first display area can be automatically switched from the expanded state to the collapsed state, thereby reducing information interference on the agent conversation interface and improving the agent's attention. In an optional embodiment, the first display area can also be switched from the expanded state to the collapsed state after detecting that the user has sent the latest chat message.
[0164] When the user's latest chat information is detected, corresponding candidate questions can be recommended to the agent based on the user's latest chat information, that is, a first display area is displayed below the user's latest chat information, and the first display area is in an expanded state.
[0165] In an optional embodiment, if the agent needs to view the candidate questions corresponding to the chat information before the latest chat message, an expansion button can be set for the first display area. By clicking the expansion button, the agent can switch the first display area corresponding to the chat information before the latest chat message from a collapsed state to an expanded state.
[0166] The present application also provides a device embodiment, which can be used to execute the content of the agent speech recommendation method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the content of the agent speech recommendation method in the embodiment of the present application.
[0167] See also Fig.12 , a seat speech recommendation device 5 disclosed in an embodiment of the present application includes:
[0168] A chat information acquisition module 51 is used to acquire the chat information of the user in the current session;
[0169] The standard speech acquisition module 52 is used to extract the target keyword from the chat information, and query the knowledge base to obtain a number of standard questions related to the target keyword and the corresponding standard speech;
[0170] The candidate speech acquisition module 53 is used to obtain the user's core question from the chat information, match the user's core question with a number of standard questions for similarity, and obtain a preset number of candidate questions and corresponding candidate speech;
[0171] The candidate speech recommendation module 54 is used to recommend a preset number of candidate questions and corresponding candidate speech to the agent of the current conversation.
[0172] The agent speech recommendation device provided in the above embodiment and the agent speech recommendation method provided in the embodiment of the present application belong to the same concept. For the implementation process, please refer to steps S10 to S40 of the method embodiment for details, which will not be repeated here.
[0173] The present application also provides a device embodiment that can be used to execute the contents of the agent speech recommendation method in the embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the contents of the agent speech recommendation method in the embodiment of the present application.
[0174] See also Fig.13 The present application also provides an electronic device 300, which can be a computer, a seat speech recommendation device, etc. In an exemplary embodiment of the present application, the electronic device 300 is a seat speech recommendation device, which includes: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304 and at least one communication bus 305.
[0175] The user interface 304 is mainly used to provide an input interface for the user and obtain data input by the user. Optionally, the user interface may also include a standard wired interface or a wireless interface.
[0176] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0177] The communication bus 305 is used to realize the connection and communication between these components.
[0178] Among them, the processor 301 may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor can integrate one or more combinations of central processing unit (Central Processing Unit, CPU), image processor (Graphics Processing Unit, GPU) and modem. Among them, the CPU mainly processes the operating system, user interface and application program, etc.; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented by a single chip.
[0179] Among them, the memory 302 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory may also be optionally at least one storage device located away from the aforementioned processor. As Fig.13 As shown, the memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program.
[0180] The processor can be used to call the application of the agent speech recommendation method of the agent speech recommendation device stored in the memory, and specifically execute the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the method embodiment, which will not be repeated here.
[0181] The present application also provides a computer-readable storage medium on which a computer program is stored, and the instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiment. The specific execution process can refer to the specific description shown in the embodiment, and will not be repeated here. The device where the storage medium is located can be a personal computer, a laptop computer, a smart phone, a tablet computer, a picture director device and other electronic devices.
[0182] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0183] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0184] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.
[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.
[0186] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0187] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0188] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0189] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0190] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for recommending agent speech, characterized in that: The steps include: Get the chat information of the user in the current session; Extracting target keywords from the chat information, and querying a knowledge base to obtain several standard questions and corresponding standard speech words related to the target keywords; Obtaining a user's core question from the chat information, performing similarity matching between the user's core question and a number of the standard questions, and obtaining a preset number of candidate questions and corresponding candidate speech scripts; The preset number of candidate questions and the corresponding candidate dialogues are recommended to the agent of the current conversation.
2. The method for recommending agent speech skills according to claim 1, characterized in that: Before the step of extracting the target keyword from the chat information and querying a knowledge base to obtain a number of standard questions related to the target keyword and corresponding standard speech, the method includes: Obtain source data of several question-answer pairs; Extracting the user's core question, the agent's speech corresponding to the user's core question, and the first keyword of the user's core question from the plurality of question-answer pair source data; Clustering the plurality of question-answer pair source data according to the first keyword to obtain a plurality of cluster clusters; Filtering out similar core user questions from each of the clusters, integrating the similar core user questions and the agent scripts corresponding to the similar core user questions, and obtaining standard questions and the standard scripts corresponding to the standard questions; Extracting a second keyword and a synonym corresponding to the second keyword from the standard question; A knowledge base is generated according to the standard question, the standard words, the second keyword and the synonyms.
3. The method for recommending agent speech according to claim 2, characterized in that: The step of extracting the user's core question, the agent's speech corresponding to the user's core question, and the first keyword of the user's core question from the plurality of question-answer pair source data comprises: For each of the question-answer pair source data, construct a first instruction for extracting the user's core question and the agent's speech corresponding to the user's core question; Inputting each of the question-answer pair source data and the corresponding first instruction into a large language model to obtain the user's core question and the agent's speech corresponding to the user's core question; Constructing a second instruction for extracting a first keyword of the user's core question; The user's core question and the corresponding second instruction are input into the large language model to obtain a first keyword of the user's core question.
4. The method for recommending agent speech according to claim 2, characterized in that: The step of screening out similar core user questions from each of the clusters, integrating the similar core user questions and the agent's speech corresponding to the similar core user questions, and obtaining standard questions and the standard speech corresponding to the standard questions includes: For each of the clusters, construct a third instruction for extracting similar core questions of users; Inputting the user core questions corresponding to all the question-answer pair source data in each of the clusters and the corresponding third instructions into the large language model to obtain similar user core questions corresponding to each of the clusters; Select any one of the similar user core questions as the standard question; The agent scripts corresponding to the similar user core questions are integrated to obtain the standard scripts corresponding to the standard questions.
5. The method for recommending agent speech according to claim 2, characterized in that: The step of extracting the second keyword and the synonyms corresponding to the second keyword from the standard question includes: For each of the standard questions, construct a fourth instruction for extracting a second keyword and a synonym corresponding to the second keyword; Each of the standard questions and the corresponding fourth instruction are input into the large language model to obtain the second keyword of the standard question and the synonyms corresponding to the second keyword.
6. The method for recommending agent speech skills according to claim 2, characterized in that: After the step of obtaining a plurality of question-answer pair source data, the following steps are included: Classify the plurality of question-answer pair source data to obtain the category to which each of the question-answer pair source data belongs; Perform text recognition on multimedia files of all question-answer pair source data in the same category, and add the recognized text to the corresponding question-answer pair source data; The source data of all the question and answer pairs in the same category are subjected to session truncation and session sensitive information deletion.
7. The method for recommending agent speech skills according to any one of claims 1 to 6, characterized in that: The step of matching the user's core question with a number of the standard questions by similarity to obtain a preset number of candidate questions and corresponding candidate speech scripts includes: Based on literal matching, the user's core question is matched with a number of the standard questions for similarity, and a first candidate question with a similarity ranking before a preset number is obtained; Based on vector similarity calculation, the user's core question is matched with a number of the standard questions in similarity to obtain a second candidate question whose similarity ranks before a preset number; The first candidate question, the second candidate question and the user core question are input into a trained language representation model to obtain candidate questions whose similarity to the user question ranks before a preset number and candidate speech corresponding to the candidate questions.
8. The method for recommending agent speech skills according to any one of claims 1 to 6, characterized in that: The step of obtaining the user's core question from the chat information includes: Perform word segmentation, punctuation removal, and stop word removal on the chat information to obtain a number of original word segmentations; Using a preset domain dictionary, performing text error correction on a number of the original segmented words to obtain a number of target segmented words; Based on the target word segmentations, the core question of the user is obtained.
9. The method for recommending agent speech skills according to any one of claims 1 to 6, characterized in that: The step of recommending the preset number of candidate questions and the corresponding candidate speech scripts to the agent of the current conversation includes: Displaying the preset number of candidate questions in a first display area; wherein the first display area is located below the chat information; In response to a triggering operation on a target candidate question, the target candidate speech corresponding to the target candidate question is displayed in a second display area; wherein the second display area is located on the right side of the interface where the current session is located, and the target candidate question is any one of the preset number of candidate questions.
10. The method for recommending agent speech according to claim 9, characterized in that: include: When it is detected that the agent sends the target candidate script to the user, the display state of the first display area is switched from an expanded state to a collapsed state; wherein the expanded state is used to display the preset number of candidate questions, and the collapsed state is used not to display the preset number of candidate questions.
11. A device for recommending agent speech, characterized in that: include: A chat information acquisition module is used to obtain the chat information of the user in the current session; A standard speech acquisition module is used to extract target keywords from the chat information, and query a knowledge base to obtain a number of standard questions related to the target keywords and corresponding standard speech; A candidate speech acquisition module is used to obtain the user's core question from the chat information, perform similarity matching between the user's core question and a number of the standard questions, and obtain a preset number of candidate questions and corresponding candidate speech; The candidate speech recommendation module is used to recommend the preset number of candidate questions and the corresponding candidate speech to the agent of the current conversation.
12. An electronic device comprising a display, a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the agent speech recommendation method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the agent speech recommendation method as described in any one of claims 1 to 10 is implemented.
Citation Information
Cited By
Marketing verbal skill recommendation method and device, equipment and storage medium
CN121388288A