Customer service dialogue abstract generation method and device, electronic equipment and readable storage medium
By identifying the domain and intent of customer service dialogue data and combining it with semantic slot mapping, a structured customer service dialogue summary is generated, which solves the problem of insufficient accuracy in the existing technology and improves service efficiency.
Patent Information
- Application Number
- CN202310833804.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2024-10-18
AI Technical Summary
The existing method of generating customer service dialogue summaries is not accurate enough to clarify user needs, resulting in low service efficiency.
By identifying the domain and intent of the customer service conversation data, the conversation title and user appeal are generated, and combined with the semantic slot mapping relationship, the customer service conversation summary form is filled in, including sentiment analysis and service quality evaluation values.
It achieves more accurate and clear identification of user needs, and improves the accuracy and service efficiency of customer service dialogue summaries.
Smart Images

Figure CN118797033A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a method, device, electronic device and readable storage medium for generating a customer service conversation summary. Background Art
[0002] With the continuous development of artificial intelligence (AI) technology, more and more industries can apply AI technology to improve efficiency, and the customer service industry is one of them. Natural language processing (NLP) technology is one of the important research directions in the field of AI. From the perspective of function, it can be generally divided into two parts: natural language understanding (NLU) and natural language generation (NLG). The main function of NLU is to convert natural language text into digital symbol information that can be understood and processed by computers, and then the computer performs calculations to obtain semantic information in natural language corresponding to the task.
[0003] In scenarios such as customer service dialogue systems, the task of NLU is to interpret user utterances based on semantic meaning representation so that they can be used together with backend actions or knowledge providers. However, the current generation of customer service dialogue summary information often relies on keyword recognition or similarity matching of customer dialogues with pre-set user questions. The resulting dialogue summary content is often not accurate enough to clarify user needs.
[0004] Currently, there is an urgent need for a solution that can efficiently and accurately generate customer service conversation summary information. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and readable storage medium for generating a customer service conversation summary, which can solve the problem of how to efficiently and accurately generate customer service conversation summary information.
[0006] In a first aspect, a method for generating a customer service conversation summary is provided, comprising:
[0007] Performing domain identification and type identification on the target customer service conversation data, and generating a conversation title according to the identified domain and type of the target customer service conversation data;
[0008] Performing intent recognition on each sentence in the target customer service conversation data, and generating one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service conversation data;
[0009] Fill the conversation title and the one or more user demands into a customer service conversation summary form;
[0010] Each of the user demands corresponds to a pair of intent and domain.
[0011] Optionally, performing intent recognition on each sentence in the target customer service conversation data and generating one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service conversation data include:
[0012] Perform intent recognition on each sentence in the target customer service conversation data to obtain the intent label corresponding to each sentence;
[0013] According to the correspondence between the intent label, the field and the user demand, the intent label corresponding to each sentence and the user demand corresponding to the identified field are determined.
[0014] Optionally, the method further comprises:
[0015] According to the mapping relationship between the domain, the intent, and the semantic slots, one or more semantic slots corresponding to each of the user demands are generated in the customer service conversation summary form;
[0016] Extracting semantic information values from each sentence according to the intent corresponding to each sentence in the target customer service conversation data;
[0017] According to the mapping relationship between the domain, the intention and the semantic slot, all the extracted semantic information values are filled into the corresponding semantic slots.
[0018] Optionally, the method further comprises:
[0019] Divide the target customer service conversation data into user statements and customer service statements;
[0020] Performing a first sentiment analysis on the user sentence to obtain a first sentiment label of the user sentence;
[0021] Performing a second sentiment analysis on the customer service sentence to obtain a second sentiment label of the customer service sentence;
[0022] Calculate the emotion value of the target customer service conversation data according to the first emotion label and the second emotion label, as well as a preset weight and a preset bias value;
[0023] Calculate the service quality evaluation value according to the emotion value of the target customer service conversation data;
[0024] Service quality information is generated according to the service quality evaluation value, and the service quality information is filled in the customer service conversation summary form.
[0025] Optionally, performing intent recognition on each sentence in the target customer service dialogue data to obtain an intent label corresponding to each sentence includes:
[0026] After performing intent recognition on each sentence in the target customer service conversation data and obtaining multiple intent labels corresponding to each sentence, obtain an importance label corresponding to each intent label and a sequence value corresponding to the importance label;
[0027] Select the intent label corresponding to the importance label with the largest sequence value as the target intent label corresponding to each sentence;
[0028] Determine the intent label corresponding to each sentence by using the target intent label corresponding to each sentence;
[0029] Optionally, obtaining an importance tag corresponding to each intent tag and a sequence value corresponding to the importance tag includes:
[0030] Preprocess each sentence in the target customer service dialogue data to obtain a first tensor containing all information of each sentence;
[0031] Performing a relationship analysis on each of the sentences based on the first tensor, and outputting a second tensor containing the contextual relationships of different sentences;
[0032] Based on the second tensor, an importance label determination process is performed on each intent label corresponding to each sentence, and a third tensor containing the importance label corresponding to each intent label is output;
[0033] Based on the third tensor, sequence labeling processing is performed on the importance label corresponding to each intent label, and the importance label and the sequence value corresponding to the importance label are output.
[0034] Optionally, extracting a semantic information value from each sentence according to the intent corresponding to each sentence in the target customer service dialogue data includes:
[0035] Determine, according to a preset mapping relationship, a semantic slot corresponding to the intent corresponding to each sentence in the target customer service dialogue data;
[0036] Using the BIO annotation method, the characters associated with the semantic slots in each sentence are annotated;
[0037] Obtaining labeled data according to characters labeled as b-slot words and i-slot words;
[0038] The semantic information value in each sentence is obtained according to the annotated data.
[0039] Optionally, acquiring the semantic information value in each sentence according to the annotated data includes:
[0040] Performing semantic slot determination processing on each character in the annotated data, and outputting a fourth tensor containing the semantic slot corresponding to each character;
[0041] Performing sequence labeling processing on each semantic slot based on the fourth tensor, and outputting a sequence value of each semantic slot;
[0042] The semantic information value in each sentence is determined according to the sequence value of each semantic slot and the characters in the annotation data corresponding to each semantic slot.
[0043] In a second aspect, a device for generating a customer service conversation summary is provided, comprising:
[0044] A first generating module is used to perform domain identification and type identification on target customer service conversation data, and generate a conversation title according to the identified domain and type of the target customer service conversation data;
[0045] A second generating module is used to perform intent recognition on each sentence in the target customer service dialogue data, and generate one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service dialogue data;
[0046] A first filling module, used to fill the conversation title and the one or more user demands into a customer service conversation summary form;
[0047] Each of the user demands corresponds to a pair of intent and domain.
[0048] Optionally, the second generating module is specifically used to:
[0049] Perform intent recognition on each sentence in the target customer service conversation data to obtain the intent label corresponding to each sentence;
[0050] According to the correspondence between the intent label, the field and the user demand, the intent label corresponding to each sentence and the user demand corresponding to the identified field are determined.
[0051] Optionally, the device further comprises:
[0052] A third generating module is used to generate one or more semantic slots corresponding to each of the user demands in the customer service dialogue summary form according to the mapping relationship between the domain, the intent and the semantic slots;
[0053] An extraction module, configured to extract a semantic information value from each sentence in the target customer service dialogue data according to the intent corresponding to each sentence;
[0054] The first filling module is used to fill all the extracted semantic information values into corresponding semantic slots according to the mapping relationship between the domain, the intention and the semantic slots.
[0055] Optionally, the device further comprises:
[0056] A segmentation module, used to segment the target customer service dialogue data into user statements and customer service statements;
[0057] A first analysis module, configured to perform a first sentiment analysis on the user sentence to obtain a first sentiment label of the user sentence;
[0058] A second analysis module, configured to perform a second sentiment analysis on the customer service statement to obtain a second sentiment label of the customer service statement;
[0059] A first calculation module, configured to calculate the emotion value of the target customer service conversation data according to the first emotion label and the second emotion label, as well as a preset weight and a preset bias value;
[0060] A second calculation module, configured to calculate a service quality evaluation value according to the emotion value of the target customer service conversation data;
[0061] The second filling module is used to generate service quality information according to the service quality evaluation value, and fill the service quality information into the customer service dialogue summary form.
[0062] Optionally, the second generating module is specifically used to:
[0063] After performing intent recognition on each sentence in the target customer service conversation data and obtaining multiple intent labels corresponding to each sentence, obtain an importance label corresponding to each intent label and a sequence value corresponding to the importance label;
[0064] Select the intent label corresponding to the importance label with the largest sequence value as the target intent label corresponding to each sentence;
[0065] Determine the intent label corresponding to each sentence by using the target intent label corresponding to each sentence;
[0066] Optionally, the second generating module is specifically used to:
[0067] Preprocess each sentence in the target customer service dialogue data to obtain a first tensor containing all information of each sentence;
[0068] Performing a relationship analysis on each of the sentences based on the first tensor, and outputting a second tensor containing the contextual relationships of different sentences;
[0069] Based on the second tensor, an importance label determination process is performed on each intent label corresponding to each sentence, and a third tensor containing the importance label corresponding to each intent label is output;
[0070] Based on the third tensor, sequence labeling processing is performed on the importance label corresponding to each intent label, and the importance label and the sequence value corresponding to the importance label are output.
[0071] Optionally, the extraction module is specifically used to:
[0072] Determine, according to a preset mapping relationship, a semantic slot corresponding to the intent corresponding to each sentence in the target customer service dialogue data;
[0073] Using the BIO annotation method, the characters associated with the semantic slots in each sentence are annotated;
[0074] Obtaining labeled data according to characters labeled as b-slot words and i-slot words;
[0075] The semantic information value in each sentence is obtained according to the annotated data.
[0076] Optionally, the extraction module is specifically used to:
[0077] Performing semantic slot determination processing on each character in the annotated data, and outputting a fourth tensor containing the semantic slot corresponding to each character;
[0078] Performing sequence labeling processing on each semantic slot based on the fourth tensor, and outputting a sequence value of each semantic slot;
[0079] The semantic information value in each sentence is determined according to the sequence value of each semantic slot and the characters in the annotation data corresponding to each semantic slot.
[0080] According to a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and wherein the programs or instructions, when executed by the processor, implement the steps of the method for generating a customer service conversation summary as described in the first aspect.
[0081] In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method for generating a customer service conversation summary as described in the first aspect are implemented.
[0082] In a fifth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0083] In a sixth aspect, a computer program / program product is provided. The computer program / program product is stored in a storage medium, and the program / program product is executed by at least one processor to implement the method as described in the first aspect.
[0084] In an embodiment of the present application, the field and type of the customer service conversation are identified to generate a conversation title, it is clear which category in which field the user demand is for, intent recognition is performed on each sentence of the customer service conversation, and the identified intent is combined with the previously identified field to generate a user demand. An independent identification design is adopted for each layer of summary information, and a mapping relationship is established between each layer, that is, the customer service conversation data is respectively identified for field type and intent. When generating user demands, it is necessary to combine intent and field, that is, each user demand corresponds to a pair of intent and field, so that the user demand content is simultaneously associated with the field to which the customer conversation belongs and the intent contained in the customer service conversation, and the obtained user demand is clearer and more specific. By adopting the technical solution of the present application, clearer and more specific conversation titles and user demands can be generated in the customer service conversation summary form, so that the extraction of customer service conversation summary information is more accurate, thereby clearly knowing the user's needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 It is a flowchart of a method for generating a customer service conversation summary provided in an embodiment of the present application;
[0086] Figure 2 This is a schematic diagram of a domain identification process provided by an embodiment of the present application;
[0087] Figure 3 It is an example of a field and type label provided in an embodiment of the present application;
[0088] Figure 4 This is a schematic diagram of a data preprocessing process provided by an embodiment of the present application;
[0089] Figure 5 This is a schematic diagram of an intent recognition process provided by an embodiment of the present application;
[0090] Figure 6 This is a schematic diagram of a user demand generation process provided by an embodiment of the present application;
[0091] Figure 7 This is a schematic diagram of a structure of a customer service conversation summary generation device provided in an embodiment of the present application.
[0092] Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0093] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
[0094] The terms "first", "second", etc. of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of one type, and the number of objects is not limited, for example, the first object can be one or more. In addition, "and / or" in the present application represents at least one of the connected objects. For example, "A or B" covers three schemes, namely, Scheme 1: including A and excluding B; Scheme 2: including B and excluding A; Scheme 3: including both A and B. The character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0095] The term "indication" in this application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, operations to be performed, or request results in the sent indication; an indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the request result according to the judgment result.
[0096] The following is a detailed description of the method for generating a customer service conversation summary provided by the embodiment of the present application through some embodiments and their application scenarios in combination with the accompanying drawings.
[0097] See also Figure 1 , the present application embodiment provides a method for generating a customer service conversation summary, comprising:
[0098] Step 101: Perform domain identification and type identification on target customer service conversation data, and generate a conversation title according to the identified domain and type of the target customer service conversation data;
[0099] Step 102: performing intent recognition on each sentence in the target customer service conversation data, and generating one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service conversation data;
[0100] Step 103: Fill the conversation title and one or more user demands into the customer service conversation summary form;
[0101] Among them, each user demand corresponds to a pair of intent and domain.
[0102] It should be noted that the target customer service conversation data refers to the conversation content extracted from the daily conversation between the user and the customer service. The conversation can be a conversation between the user and the customer service through a telephone or other means, and then the conversation is converted into text by voice; or the conversation can also be an online communication between the user and the customer service through the Internet or other means, and the text content of the communication is extracted. The embodiment of the present application does not specifically limit the method for obtaining the target customer service conversation data.
[0103] The above-mentioned customer service conversation summary form refers to extracting summary information and generating a table by identifying the target customer service conversation data, wherein the content of the customer service conversation summary form, such as the conversation title and user demands, is obtained based on the method described in steps 101 to 102 above, forming structured summary information, which can clearly understand the user's needs for this conversation with the customer, thereby providing services to the customer based on customer needs.
[0104] The above conversation title is generated based on domain identification and type identification, and is mainly used to clarify which business field the user's needs for this conversation belong to, such as: broadband business consultation; the above user demands are generated based on domain identification and intent identification, and are mainly used to clarify the user's specific business demands in the corresponding business field. It is understandable that there can be one or more business demands in the same business field, such as: broadband fee inquiry, broadband migration;
[0105] In this way, by adopting the technical solution of the embodiment of the present application, the conversation title and one or more user demands can be automatically identified based on the target customer service conversation data, and the information is filled into the customer service conversation summary form to obtain a form with structured summary information. According to the customer service conversation summary form, it is possible to clearly know what the user's needs are for this conversation with the customer, so as to provide services to the customer based on the customer's needs. Compared with the traditional method of autonomously judging customer needs by manual customer service, on the one hand, it avoids manual subjective judgment errors and ensures the accuracy of customer demand identification. On the other hand, it can effectively improve business processing efficiency by automatically identifying and generating a customer service conversation summary form.
[0106] Specifically, with respect to the above step 101, the target customer service conversation data is subjected to domain identification and type identification, and a conversation title is generated according to the identified domain and type of the target customer service conversation data, specifically including:
[0107] (1) Performing domain identification on the target customer service conversation data to obtain the domain to which the target customer service conversation data belongs;
[0108] (2) performing type identification on the domain of the target customer service conversation data to obtain one or more types corresponding to the domain to which the target customer service conversation data belongs;
[0109] (3) Generate a conversation title according to the field to which the target customer service conversation data belongs and one or more types corresponding to the field to which the target customer service conversation data belongs.
[0110] In the embodiment of the present application, domain identification of the target customer service conversation data refers to analyzing the content of the conversation between the customer service and the user, accurately locating the core domain of the conversation, and then outputting the domain information most relevant to the conversation. This module regards domain and type identification as a text hierarchical classification problem and uses NLU technology to solve this problem.
[0111] In a specific implementation scenario, one or more fields can be identified based on the target customer service conversation data. When a field is identified, the field is further identified to obtain one or more types corresponding to the field. For example, if the field is identified as a package, and the corresponding types include ordering, a corresponding conversation title "package ordering" can be generated. Another example: if the field is identified as a package, and the corresponding types include consultation and ordering, a corresponding conversation title "package consultation and ordering" can be generated or divided into two conversation titles "package consultation" and "package ordering". The conversation title reflects that the user's needs include consultation and ordering for packages.
[0112] In the case where multiple fields are identified, each field is identified separately to obtain one or more types corresponding to each field. For example, if the fields are identified as packages and broadband, where the corresponding type of packages is consultation and the corresponding type of broadband is payment, then the corresponding dialogue titles "package consultation" and "broadband payment" can be generated. The dialogue titles reflect that the user's needs include consultation on packages and payment for broadband.
[0113] This module uses pre-trained model fine-tuning as a solution for domain and type recognition. The pre-trained model focuses on text context and can capture longer text information. The model structure characteristics allow larger models to have better results. It is understandable that the pre-trained model can use existing algorithm models.
[0114] The input of the model is the entire conversation. The model uses conversation-level annotations, and the model output is the domain classification label of the conversation. In the modeling process, the input conversation text is first preprocessed, and the text sequence is encoded using a pre-trained model to obtain the semantic vector representation of the text. Finally, the probability of the conversation domain category label is obtained through Sigmoid processing in the fully connected layer. The domain identification process can include 6 steps, as follows: Figure 2 As shown:
[0115] Step 1.1: This module uses labeled data to train the model. The data label example is: domain##type (name##type), where domain (name) has 10 dimensions and type (type) has 7 dimensions. ## indicates a hierarchical relationship, such as Figure 3 As shown, the label can be expressed as Package##Order, Package##Consult, Package##Modify, etc. At the same time, this module first cleans the dirty data to address the problems of low quality of labeled data, insufficient coverage of training data, and small number of samples. Then, the instance-level evidence analysis method based on feature similarity is used to mine the sparse data in the data to be predicted, and data enhancement is performed by synonym replacement.
[0116] It should be noted that the above-mentioned field name has 10 dimensions and the type type has 7 dimensions, which is only an example of a feasible solution. The embodiment of the present application does not specifically limit the number of dimensions of the field and type.
[0117] Step 1.2: This module uses the pre-trained ERNIE model. After the text is embedded in the input layer, it passes through the 6-layer multi-head self-attention module of the model. Each layer of the multi-head self-attention module can capture different semantic features, and the features captured by the last layer are the best. The hidden state output of the model in the last layer is used as the text representation rich in syntactic and semantic features. (n is the length of the text, b is the number of hidden units in the ERNIE hidden layer, 768), and in addition, a special symbol vector needs to be obtained To represent the semantic information of the global context of the sentence. Represents a real number of length n; CLS is a special string in the pre-trained language model.
[0118] Step 1.3: For the input dialogue text data, use the tokenizer of the pre-trained model ERNIE to embed the dialogue. After the conversion, each character is converted into a dictionary ID and the label has been converted into a one-hot encoding. Then set the maximum length of the dialogue text to 1024, truncate the text over 1024 characters, and fill the sentence with 0 if the length is less than 1024. Finally, construct a data loader to batch the data, set the batch size (Batch_Size) to 16, and the dimension of the dialogue data to [16,1024].
[0119] Step 1.4: Instantiate the model, set the learning rate of the model to 0.00003, and the epoch to 20. Use the Adam optimizer, and the loss function uses the binary cross-entropy. Due to the large number of labels, the evaluation indicator uses Micro F1 to better reflect the average level of the model.
[0120] Step 1.5: Train the model parameters to achieve the best results. During the training process, print a training log every ten steps, perform a model evaluation on the validation set every eval_steps, and save the best Micro F1 model in the training process.
[0121] Step 1.6: Load the trained model for evaluation. Re-instantiate a model, then load the trained model parameters into the new model, and select the dialogue text for evaluation. Construct the Data Loader of the test data in the evaluation mode, perform sigmoid processing on the logits matrix returned by the model, and set the threshold to 0.5. If it is greater than 0.5, it will be correctly predicted as the label, otherwise it will be predicted as others.
[0122] It should be noted that the process of domain and type identification described in the above steps 1.1 to 1.6 is only an example of a feasible solution. Similarly, the training model, algorithm, and parameter values used above are also examples. The embodiments of the present application do not specifically limit the method of identifying the domain and type. Other algorithm processes that can realize domain identification and type identification of the target customer service conversation data are also covered in the technical concept of the present application.
[0123] Specifically, with respect to the above step 102, the intent of each sentence in the target customer service dialogue data is identified, and one or more user demands are generated according to the identified intent of each sentence and the identified domain of the target customer service dialogue data, including:
[0124] (1) Perform intent recognition on each sentence in the target customer service conversation data to obtain the intent label corresponding to each sentence;
[0125] (2) According to the correspondence between intent labels, domains, and user demands, determine the intent label corresponding to each sentence and the user demand corresponding to the identified domain.
[0126] In an embodiment of the present application, the intent label identified for each sentence in the target customer service conversation data is integrated with the previously identified domain to obtain the user demand corresponding to each sentence. This, on the one hand, extracts the user's intent for this conversation and clarifies the user's needs. On the other hand, a mapping relationship is established between the user's intent and the business domain, thereby enabling the generated user demand to be associated with the previously generated conversation title, thereby generating structured customer service conversation summary information.
[0127] In a possible implementation, intent recognition is performed on each sentence in the target customer service conversation data to obtain an intent label corresponding to each sentence, including:
[0128] (1.1) After performing intent recognition on each sentence in the target customer service conversation data and obtaining multiple intent labels corresponding to each sentence, obtain an importance label corresponding to each intent label and a sequence value corresponding to the importance label;
[0129] (1.2) Select the intent label corresponding to the importance label with the largest sequence value as the target intent label corresponding to each sentence;
[0130] (1.3) Determine the target intent label corresponding to each sentence by the intent label corresponding to each sentence;
[0131] In a possible implementation, obtaining the importance tag corresponding to each intent tag and the sequence value corresponding to the importance tag includes:
[0132] (1.1.1) Preprocess each sentence in the target customer service conversation data to obtain the first tensor containing all the information of each sentence; for example, the target customer service conversation data can be input into the pre-trained Bert model to obtain the encoding of the sentence, and the 'pooler_output' result in the output of the Bert model, that is, the 768-dimensional result representing 'CLS', is taken as the vector representing the meaning of this sentence. A conversation contains N sentences, and a tensor of [N,768] can be obtained, which contains all the information of the text of this conversation.
[0133] (1.1.2) Perform relationship analysis on each sentence based on the first tensor, and output a second tensor containing the contextual relationships between different sentences. For example, the tensor obtained from the previous layer can be input into the BiLSTM layer, and hidden_size is a definable hyperparameter. For example, hidden_size can be set to 80, and a tensor of [N, hidden_size] can be obtained, which contains both the sentence meaning and the contextual relationships between different sentences in a conversation.
[0134] (1.1.3) Based on the second tensor, each intent label corresponding to each sentence is processed for importance label determination, and a third tensor containing the importance label corresponding to each intent label is output; for example, the tensor obtained above can be input into the MLP (Multilayer Perceptron) layer, so that the tensor can be fully crossed between different dimensions, so that the model can capture more nonlinear features and combined features. The number of output layer nodes of the MLP layer should be the same as the total number of importance label categories, for example, it can be set to 14, so that the MLP layer can finally obtain a [N, 14] tensor.
[0135] (1.1.4) Based on the third tensor, the importance labels corresponding to each intent label are sequence labeled, and the importance labels and the sequence values corresponding to the importance labels are output. For example, the [N,14] tensor obtained from the upper layer can be input into the CRF layer. The CRF layer calculates the possible importance labeling sequence and obtains the sequence with the highest score as the final result. In this model, if the data input to the model contains sentence label data, the CRF layer can be trained based on the label data, and the returned data is loss information; otherwise, if the label data is identified as None, no training is performed but a prediction operation is performed. The returned data is an important label sequence for this conversation.
[0136] The above-mentioned importance label can be called an "Important" label. The "Important" label is a mark to determine whether the sentence is important. For example, the sentence is "Hello, I want to change a package. What price packages are available?" This sentence contains two intentions: package change and package price consultation. The more important intention is package price consultation. Therefore, the importance label corresponding to the intent label can be obtained. The importance label will eventually determine the intent label of the sentence as package price consultation through the importance label, so as to more accurately obtain the user's intention needs.
[0137] Specifically, the above user demands are generated by the following steps:
[0138] Step 2.1: Obtain conversation data with a standardized structure and complete information.
[0139] Step 2.2: Preprocess the data, including extracting dialogue text and character information, segmenting the text, removing stop words, and performing truncation and completion operations.
[0140] Step 2.3: Input the processed data into the intent recognition model to perform intent recognition on each sentence of the conversation.
[0141] Step 2.4: Classify the domain to which the conversation belongs and the intention that exists, input the demand recognition model, and obtain the caller's demand.
[0142] The data processing process in step 2.2 is as follows: Figure 4 The detailed process is as follows:
[0143] 1) Read the structured data into the program and extract the information in the data, including the dialogue sentences, the role information corresponding to the sentences, the intention labels in the training data, etc. Use multiple lists to store the dialogue sentences, the role information of the sentences, the intention labels of the sentences, the numbers of the dialogues corresponding to the sentences, etc. Different lists are stored strictly in the order in which the sentences are read in, so that they can be matched one by one later. Assuming that there are N sentences in total forming M dialogues, the shape of each list should be [N,1].
[0144] 2) Traverse the list of stored sentences, use Jieba word segmentation and stop word removal, set the sentence length to 64 characters, truncate if it exceeds, and fill it with 0 if it is less than. After processing all the sentences, use the tokenizer of the bert pre-trained model to embed each sentence, and store the embedded vectors in the list in the same way. The shape of the list should be [N,64].
[0145] 3) The basic units of the lists stored in the first step are all based on sentences, but the program uses a dialogue as the batch unit for intent prediction. The model uses Bi-directional Long Short-Term Memory (BiLSTM) and Conditional Random Field (CRF). Therefore, the sentences, role information, intent labels, etc. are combined into a list based on the corresponding dialogue number information. The length of the list is M. The length of each element of the list is not fixed and is determined by the number of sentences in the corresponding dialogue.
[0146] 4) Set the dataset to load the dataloader for batch processing. The dataset should be set according to the needs. The dataset of training data needs to have label information for training, so the labels should be retained in the dataset. However, there is no label information in the prediction data, so the labels information should be removed when setting the labels of the prediction data.
[0147] The structure of the pre-module for judging the incoming call request in step 2.3, namely the intention recognition model, is as follows Figure 5 The detailed process is as follows:
[0148] 1) Input the pre-processed conversation data into the pre-trained Bert model to obtain the encoding of the sentence, and take the 'pooler_output' result in the output of the Bert model, that is, the 768-dimensional result representing 'CLS' as the vector representing the meaning of this sentence. A conversation contains N sentences, and a tensor of [N,768] can be obtained, which contains all the information of the text of this conversation.
[0149] 2) Input the tensor obtained from the previous layer into the BiLSTM layer. hidden_size is a definable hyperparameter. hidden_size is temporarily set to 80. A tensor of [N, hidden_size] can be obtained, which contains both the sentence meaning and the relationship between different sentences in a conversation.
[0150] 3) Input the tensor obtained above into the Multilayer Perceptron (MLP) layer to make the tensor fully cross between different dimensions, so that the model can capture more nonlinear features and combined features. The number of nodes in the output layer of the MLP layer should be the same as the total number of intent labels, which is set to 14 this time, so the MLP layer can finally obtain a [N, 14] tensor.
[0151] 4) Input the tensor [N,14] obtained from the upper layer into the CRF layer. The CRF layer is most commonly used in named entity recognition and can constrain the order of appearance between different entity types. In this experiment, there are similar constraints between entities between different intents. The CRF layer calculates possible intent labeling sequences and takes the sequence with the highest score as the final result. In this model, if the data input to the model contains sentence label data, the CRF layer can be trained based on the label data, and the returned data is loss information; otherwise, if the label data is identified as None, no training is performed but a prediction operation is performed, and the returned data is a sequence of intent labels for this conversation. The sequence of intent labels is stored in the form of a digital sequence, and each number from 0 to 13 corresponds to an intent.
[0152] 5) During the label setting process, some intents are role-specific labels, that is, intents that only customers or customer service personnel have. When there are certain labels with exclusive situations, the intent is judged and modified in accordance with the role information of the sentence. For example, if the role information of a sentence is customer, but the predicted label is inquire_user, but the inquire_user label is a label exclusive to customer service personnel, the label is changed to the corresponding label inform_user of the customer identity.
[0153] 6) During training, the sentences are passed through a predefined dictionary, and the corresponding text intent labels are converted into numerical labels for training; during prediction, the predicted label is also a numerical label, and the number is converted into a text label according to this dictionary.
[0154] The structure of the call request integration module in step 2.4 is as follows: Figure 6 The detailed process is as follows:
[0155] 1) The required data consists of two parts: one is the upstream task, namely domain identification and determination of related type labels, and the other is all intent sequences in the conversation.
[0156] 2) Input the two parts of data into the demand determination method for integration, and obtain the customer's real needs according to the demand integration method.
[0157] 3) Judgment method First, the judgment is made based on the special intent contained in the domain and the conversation. The special intent of the corresponding domain is manually summarized and defined in the process of annotating data. The corresponding relationship table has been manually summarized for different domains and types and the special intent of the domain.
[0158] 4) For example, if the domain label obtained by the upstream domain identification task is broadband, and the conversation contains the intent of inform_fault, then it can be determined that the incoming call contains the demand for broadband fault repair. Assuming that the domain label obtained by the upstream domain identification task is package, and the conversation contains the intent label of request_cancel, then it can be determined that the incoming call contains the demand for business request cancellation. Assuming that this conversation does not contain a special label for the corresponding domain, the demand is determined based on the domain and type. For example, if the domain label is business and the type is consultation, and there is no special intent, then it can be determined that the demand is for consultation on new business details.
[0159] It should be noted that the process of intent recognition and generating user demands described in the above steps 2.1 to 2.4 is only an example of a feasible solution. Similarly, the training model, algorithm, and parameter values used above are also examples. The embodiments of the present application do not specifically limit the methods for intent recognition and generating user demands. Other algorithm processes that can realize intent recognition of target customer service conversation data and generate user demands are also covered in the technical concept of this application.
[0160] In a possible implementation, the method further includes:
[0161] (1) Determine the semantic slot corresponding to the intent corresponding to each sentence in the target customer service conversation data according to the preset mapping relationship;
[0162] (2) Using the BIO annotation method, annotate the characters associated with the semantic slots in each sentence;
[0163] (3) obtaining labeled data according to the characters labeled as b-slot words and i-slot words;
[0164] (4) Obtain the semantic information value in each sentence based on the annotated data
[0165] In a possible implementation, obtaining the semantic information value in each sentence includes:
[0166] (4.1) Perform semantic slot determination processing on each character in the annotated data, and output a fourth tensor containing the semantic slot corresponding to each character; for example, the obtained data can be passed through a fully connected layer, the size can be [768, slots_num], slots_num is the total number of slots designed, and a tensor of size [batch_size, slots_num] is obtained.
[0167] (4.2) Perform sequence labeling on each semantic slot based on the fourth tensor and output the sequence value of each semantic slot; for example, the output result of the fully connected layer can be input into the CRF layer, the CRF layer calculates the possible slot labeling sequence, and obtains the sequence with the highest score as the final result.
[0168] (4.3) Determine the semantic information value in each sentence based on the sequence value of each semantic slot and the characters in the annotation data corresponding to each semantic slot. For example, the obtained sequence annotation results can be used to extract the corresponding slot value information in the text sentence and summarize it into a list.
[0169] In the embodiment of the present application, in order to make the summary information in the customer service conversation summary form more detailed, a semantic slot can be further generated in the customer service conversation summary form, and then the semantic information value is extracted from each sentence according to the intent corresponding to each sentence in the target customer service conversation data, and all the extracted semantic information values are filled into the corresponding semantic slot according to the preset mapping relationship, wherein the preset mapping relationship is the mapping relationship between the domain, intent and semantic slot, that is, the technical solution of the present application constructs a three-layer structure of domain-intent-slot, compared with the conventional solution which is mostly based on the two-layer structure of subject-slot, different slots are designed for different subjects and summarized, and the design difficulty and workload are relatively large. The method of the present application is aimed at the characteristics of the specific field of customer service conversation, and there is coupling between a large amount of information, such as the flow balance, fee amount and other information between the two fields of package and flow, so each layer of the three-layer structure can be designed independently, and then the mapping relationship between each layer can be established, which reduces the workload to a certain extent and has better generalization.
[0170] Specifically, the semantic slot extraction module is implemented by the following steps:
[0171] Step 3.1: Predefine the semantic slot information and use the labeled data for model pre-training.
[0172] Step 3.2: Input the slot extraction model based on the domain of each conversation and the intention label predicted for each sentence to obtain the corresponding semantic slot information.
[0173] Step 3.3: Based on the defined mapping relationship between domain, intent and slot, output the corresponding semantic slot information into the form.
[0174] The specific steps of step 3.1 are as follows:
[0175] 1) Design corresponding semantic slots based on the mobile customer service conversation data to extract useful semantic information from the conversation. For example:
[0176] "This 8-yuan Feixiang package includes 50 megabytes of data within the province and 30 minutes of calls within the province. It is free for one year, but it will no longer be free after one year. In addition, with this package, domestic calls are 19 cents and incoming calls are free nationwide."
[0177] The semantic slot information that can be extracted is shown in Table 1:
[0178] Table 1
[0179] Slot Slot Value Business Expenses Eight Yuan Package Name Fly Enjoy Package Total traffic volume Fifty trillion Flow range Province Talk time 30 minutes Call range Province Domestic calling 1.9 Domestic call free Business Rules I sent it for one year in a row, but after one year I stopped sending it.
[0180] It can be understood that the slot types listed in the above Table 1 are only examples. Technical personnel can flexibly adjust them according to actual business needs, and according to the mapping relationship between the above-mentioned domain-intent-slot, different slots can be designed for different domains and intents.
[0181] 2) First, the data is annotated with slot values by sequence annotation to obtain a batch of pre-trained data corpus. The sequence annotation method uses the BIO annotation method (B-begin, I-inside, O-outside). Words without semantic information are annotated with the letter o, the first character of the slot word with semantic information is annotated with "b-slot word", and the slot value character is annotated with "i-slot word". The specific annotation examples are shown in Table 2.
[0182]
[0183] 3) The obtained labeled data is segmented by Jieba and stop words are removed. The sentence length is set to 128 characters. If it exceeds the limit, it is truncated and if it is less than the limit, placeholders are added. Then, the tokenizer of the Bert pre-trained model is used to perform an embedding operation on each sentence to obtain a list of dimension [N, 128], where N represents the number of training data.
[0184] 4) Set the dataset to load the dataloader to batch process the data. The dataset should be set according to the needs. The dataset of training data needs to have label information for training, so the labels should be retained in the dataset. However, there is no labels information in the prediction data, so the labels information is removed when setting the labels of the prediction data. Therefore, a number mapping relationship between slots and slot values should be established.
[0185] 5) Pass the obtained data through a fully connected layer, the size can be [768, slots_num], slots_num is the total number of slots designed. Get a tensor of size [batch_size, slots_num].
[0186] 6) The output of the fully connected layer is input into the CRF layer. The CRF layer calculates the possible slot labeling sequence and takes the sequence with the highest score as the final result. The returned data is a slot label sequence for this conversation. The slot label sequence is stored in the form of a digital sequence, and each number from 0-slots_num corresponds to a slot value.
[0187] 7) Using the obtained sequence annotation results, extract the corresponding slot value information from the text sentences and summarize them into a list.
[0188] 8) For some slot labels with few labeled samples and poor prediction results, a method of manually constructing prompt templates is used. Prompt templates are designed for slot labels with few samples to improve the slot extraction effect.
[0189] Prompting refers to adding additional prompt information to the text as input, converting downstream prediction tasks into language model tasks, and converting the prediction results of the language model into the prediction results of the original downstream tasks.
[0190] For example, we use a pre-trained language model (PLM) to perform sequence labeling on "My home broadband is 100M". For the traditional Fine-tuning paradigm, taking BERT as an example, we will use PLM to extract the features of the [CLS] position, use it as the features of the sentence, and train a classifier for the sequence labeling task, using the features for classification; for the Prompting paradigm, its process is divided into three steps:
[0191] (1) Add a prompt to the sentence. Generally speaking, prompts are divided into two forms: cloze (used in autoencoding PLMs such as BERT) and prefix (used in autoregressive PLMs such as GPT). In this example, they are:
[0192] My home has 100M broadband. This is a [MASK] type of broadband. (Fill in the blanks)
[0193] Or "My home has 100M broadband. What type of broadband is mentioned in the sentence?" (prefix).
[0194] (2) Based on the form of the prompt, predict the word at the [MASK] position or after the prompt prefix.
[0195] (3) Concatenate the prompt template and the sentence to be annotated for sequence labeling.
[0196] The output annotation sequence is:
[0197] [O,O,O,B-broadband type,I-broadband type,I-broadband type,O,O,O].
[0198] The specific steps of step 3.3 are as follows:
[0199] 1) Build a corresponding mapping relationship table between user demands and slot value information. The main purpose is to summarize the potential semantic slot information required under different user demands. For example, in "broadband service query", the slot information we may need includes ["service fee", "broadband type", "service duration", ...].
[0200] 2) Based on one or more user demand results obtained in the upstream task, we filter out the corresponding useful slot information according to the mapping relationship table we built and integrate it into the dialogue information work order item.
[0201] It should be noted that the process of generating semantic slots and semantic slot information described in the above steps 3.1 to 3.3 is only an example of a feasible solution. Similarly, the training model, algorithm, and parameter values used above are also examples. The embodiments of the present application do not specifically limit the method for generating semantic slots and semantic slot information. Other algorithm processes that can realize the generation of semantic slots and semantic slot information are also covered in the technical concept of the present application.
[0202] In a possible implementation, the method further includes:
[0203] (1) Divide the target customer service conversation data into user statements and customer service statements;
[0204] (2) performing a first sentiment analysis on the user's sentence to obtain a first sentiment label of the user's sentence;
[0205] (3) Perform a second sentiment analysis on the customer service statement to obtain a second sentiment label for the customer service statement; step (3) may be performed synchronously or asynchronously with step (2), and this application does not make any specific limitation on this.
[0206] (4) calculating the emotion value of the target customer service conversation data according to the first emotion label and the second emotion label, as well as the preset weight and the preset bias value;
[0207] (5) Calculate the service quality evaluation value based on the emotion value of the target customer service conversation data;
[0208] (6) Generate service quality information in the customer service conversation summary form based on the service quality evaluation value.
[0209] The first emotion label and the second emotion label are emotion labels for user statements and customer service statements, respectively. Optionally, in order to distinguish the two statements, the first emotion label is described as an "emotion label" and the second emotion label is described as a "comfort label" to reflect the difference between user statements and customer service statements.
[0210] In the embodiment of the present application, considering the customer service scenario, service quality (that is, customer satisfaction) is also an important indicator for service evaluation, so the service quality can also be reflected in the customer service conversation summary form. Specifically, sentiment analysis is performed on user sentences in the target customer service conversation data, and appeasement analysis is performed on customer service sentences in the target customer service conversation data. Combined with customer sentiment and customer appeasement, the sentiment value of the target customer service conversation data is calculated, and the service quality is measured by the sentiment value, which is specifically reflected by the service quality evaluation value.
[0211] Specifically, the customer service quality assessment part includes the following steps:
[0212] Step 4.1 preprocesses the conversation data, then inputs the data into the user sentiment analysis model, and uses the model to classify the sentiment labels of all "user" sentences in a conversation;
[0213] Step 4.2: Preprocess the conversation data, then input the data into the customer service appeasement analysis model, and use the model to classify the appeasement labels of all "customer service" sentences in a conversation;
[0214] Step 4.3 uses the tags obtained in steps 4.1 and 4.2 to evaluate the customer service quality of the conversation and obtain an evaluation result.
[0215] Among them, the n texts of a conversation can be divided into user utterances and customer service utterances according to the speakers, and their numbers are n1 and n2 respectively.
[0216] The detailed process of step 4.1 is as follows:
[0217] 1) From the conversation data, separate the sentences spoken by the user according to the speaker and store them in a list. Assuming that there are n1 sentences spoken by n1 users in a conversation, a list with a length of n1 should be generated. Traverse the list, truncate the sentences with a length greater than 128, and add 0 to the sentences with a length less than 128. Then convert each word in the sentence into a corresponding label according to the dictionary, and then store the generated label sequence in another list, and finally generate a label sequence list with a length of n1. Load the label sequence into the dataloader for batch processing of the data, and each batch has batch_size sentences of conversation. batch_size is temporarily set to 16.
[0218] 2) Input the preprocessed dialogue data into the pretrained Bert model, and obtain the generated 768-dimensional vector from the Bert model as the result. There are 16 dialogues in the same batch of dialogue data, so a tensor with a dimension of [16, 768] is obtained as the output result, which represents the entire semantics of this batch of input data.
[0219] 3) The output tensor of the Bert layer is input to the convolution layer. The convolution layer uses a one-dimensional convolution kernel of length 3 to convolve the input tensor and uses the ReLU function model activation to finally obtain a tensor of dimension [16, 128] as the output result.
[0220] 4) The output tensor of the convolutional layer is then pooled to the maximum, and dropout is set to make the neurons of the pooling layer fail randomly in a certain proportion to prevent overfitting. Finally, the pooled [16, 128] tensor is input to the fully connected layer, and the softmax function is applied to output a tensor of dimension [16, 3] as the output result.
[0221] 5) For the [16, 3] tensor output by the fully connected layer, count the position on the second dimension with the largest prediction probability, so as to determine the model's prediction for the label of the sentence. Finally, a tensor with a dimension of [16, 1] is obtained, which represents the predicted label of this batch of input data predicted by the model. Labels 0-2 correspond to the three sentiment labels of "positive", "negative" and "neutral" respectively.
[0222] 6) All conversation data is taken as input and fed into the model to obtain the corresponding label prediction results for the next step of processing.
[0223] The detailed process of step 4.2 is as follows:
[0224] 1) From the conversation data, separate the customer service statements according to the speaker and store them in a list. Assuming there are n2 customer service statements in a conversation, a list of length n2 should be generated. Traverse the list, truncate sentences longer than 128, and add 0 to the sentences shorter than 128. Then convert each word in the sentence into a corresponding label according to the dictionary, and store the generated label sequence in another list, and finally generate a list of label sequences of length n2. Load the label sequence into the dataloader for batch processing of the data, with batch_size sentences in each batch. batch_size can be set to 16.
[0225] 2) Input the preprocessed dialogue data into the pretrained Bert model, and obtain the generated 768-dimensional vector from the Bert model as the result. There are 16 dialogues in the same batch of dialogue data, so a tensor with a dimension of [16, 768] is obtained as the output result, which represents the entire semantics of this batch of input data.
[0226] 3) The output tensor of the Bert layer is input to the convolution layer. The convolution layer uses a one-dimensional convolution kernel of length 3 to convolve the input tensor and uses the ReLU function model activation to finally obtain a tensor of dimension [16, 128] as the output result.
[0227] 4) The output tensor of the convolutional layer is then pooled to the maximum, and dropout is set to make the neurons of the pooling layer fail randomly in a certain proportion to prevent overfitting. Finally, the pooled [16, 128] tensor is input to the fully connected layer, and the softmax function is applied to output a tensor of dimension [16, 3] as the output result.
[0228] 5) For the tensor [16, 3] output by the fully connected layer, the predicted probability of the position on the second dimension is counted to determine the model's prediction for the label of the sentence. Finally, a tensor with a dimension of [16, 1] is obtained, which represents the predicted label of this batch of input data predicted by the model. Labels 0-2 correspond to the three comfort labels of "comforting sentence", "business sentence" and "other".
[0229] 6) All conversation data is taken as input and fed into the model to obtain the corresponding label prediction results for the next step of processing.
[0230] After model training, n corresponding label values labeli,i∈(1,2,…,n) are generated. The user sentiment analysis model divides "user" sentences into three sentiment labels: "positive", "negative" and "neutral", and the corresponding numbers are a1, a2, a3; the customer service comfort analysis model divides "customer service" sentences into three comfort labels: "comforting sentences", "business sentences" and "others", and the corresponding numbers are a4, a5, a6. And the sum of the number of each label should be n:
[0231]
[0232] For the customer service quality evaluation result of step 4.3, use the tag sequence obtained in steps 4.1 and 4.2 to calculate. For 6 different tags, set the weights s1, s2…s6 and the bias value b1, and use the formula:
[0233]
[0234] Calculate the total emotion value e1 of the conversation.
[0235] For n texts, set the dynamic weight wi,i∈(1,2,…,n) and the bias value b2, and calculate the final sentiment value e2 according to the label sequence label generated according to the text order:
[0236]
[0237] Map e1 and e2 to the interval [-1,1] according to tanh, and compare with the standard table to get the final evaluation result:
[0238] res=tanh(e1+e2)
[0239]
[0240] The corresponding relationship of the evaluation results is shown in Table 3.
[0241] Table 3
[0242] Rating 0 1 2 3 4 evaluate Very bad Poor normal better very good
[0243] It should be noted that the process of generating service quality information in the customer service conversation summary form described in the above steps 4.1 to 4.3 is only an example of a feasible solution. Similarly, the training model, algorithm, and parameter values used above are also examples. The embodiment of the present application does not specifically limit the method of generating service quality information in the customer service conversation summary form. Other algorithm processes that can generate service quality information in the customer service conversation summary form are also covered in the technical concept of the present application.
[0244] Based on the above generation process of the conversation title, user demand, semantic information value, and service quality information, a structured customer service conversation summary form can be generated. The summary information in the customer service conversation summary form can clearly show what the customer's needs are in the target customer service conversation data, and the service quality brought to the customer by the target customer service conversation data. See Table 4, which shows the final output content of a customer service conversation summary form.
[0245] Table 4
[0246]
[0247] The method for generating a customer service conversation summary provided in the embodiment of the present application can be executed by a device for generating a customer service conversation summary. In the embodiment of the present application, the device for generating a customer service conversation summary is taken as an example to illustrate the device for generating a customer service conversation summary provided in the embodiment of the present application.
[0248] See also Figure 7, the embodiment of the present application provides a device 700 for generating a customer service conversation summary, including:
[0249] The first generating module 701 is used to perform domain identification and type identification on the target customer service conversation data, and generate a conversation title according to the identified domain and type of the target customer service conversation data;
[0250] A second generating module 702 is used to perform intent recognition on each sentence in the target customer service dialogue data, and generate one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service dialogue data;
[0251] A first filling module 703, configured to fill the conversation title and the one or more user demands into a customer service conversation summary form;
[0252] Each of the user demands corresponds to a pair of intent and domain.
[0253] Optionally, the second generating module is specifically used to:
[0254] Perform intent recognition on each sentence in the target customer service conversation data to obtain the intent label corresponding to each sentence;
[0255] According to the correspondence between the intent label, the field and the user demand, the intent label corresponding to each sentence and the user demand corresponding to the identified field are determined.
[0256] Optionally, the device further comprises:
[0257] A third generating module is used to generate one or more semantic slots corresponding to each of the user demands in the customer service dialogue summary form according to the mapping relationship between the domain, the intent and the semantic slots;
[0258] An extraction module, configured to extract a semantic information value from each sentence in the target customer service dialogue data according to the intent corresponding to each sentence;
[0259] The first filling module is used to fill all the extracted semantic information values into corresponding semantic slots according to the mapping relationship between the domain, the intention and the semantic slots.
[0260] Optionally, the device further comprises:
[0261] A segmentation module, used to segment the target customer service dialogue data into user statements and customer service statements;
[0262] A first analysis module, configured to perform a first sentiment analysis on the user sentence to obtain a first sentiment label of the user sentence;
[0263] A second analysis module, configured to perform a second sentiment analysis on the customer service statement to obtain a second sentiment label of the customer service statement;
[0264] A first calculation module, configured to calculate the emotion value of the target customer service conversation data according to the first emotion label and the second emotion label, as well as a preset weight and a preset bias value;
[0265] A second calculation module, configured to calculate a service quality evaluation value according to the emotion value of the target customer service conversation data;
[0266] The second filling module is used to generate service quality information according to the service quality evaluation value, and fill the service quality information into the customer service dialogue summary form.
[0267] Optionally, the second generating module is specifically used to:
[0268] After performing intent recognition on each sentence in the target customer service conversation data and obtaining multiple intent labels corresponding to each sentence, obtain an importance label corresponding to each intent label and a sequence value corresponding to the importance label;
[0269] Select the intent label corresponding to the importance label with the largest sequence value as the target intent label corresponding to each sentence;
[0270] Determine the intent label corresponding to each sentence by using the target intent label corresponding to each sentence;
[0271] Optionally, the second generating module is specifically used to:
[0272] Preprocess each sentence in the target customer service dialogue data to obtain a first tensor containing all information of each sentence;
[0273] Performing a relationship analysis on each of the sentences based on the first tensor, and outputting a second tensor containing the contextual relationships of different sentences;
[0274] Based on the second tensor, an importance label determination process is performed on each intent label corresponding to each sentence, and a third tensor containing the importance label corresponding to each intent label is output;
[0275] Based on the third tensor, sequence labeling processing is performed on the importance label corresponding to each intent label, and the importance label and the sequence value corresponding to the importance label are output.
[0276] Optionally, the extraction module is specifically used to:
[0277] Determine, according to a preset mapping relationship, a semantic slot corresponding to the intent corresponding to each sentence in the target customer service dialogue data;
[0278] Using the BIO annotation method, the characters associated with the semantic slots in each sentence are annotated;
[0279] Obtaining labeled data according to characters labeled as b-slot words and i-slot words;
[0280] The semantic information value in each sentence is obtained according to the annotated data.
[0281] Optionally, the extraction module is specifically used to:
[0282] Performing semantic slot determination processing on each character in the annotated data, and outputting a fourth tensor containing the semantic slot corresponding to each character;
[0283] Performing sequence labeling processing on each semantic slot based on the fourth tensor, and outputting a sequence value of each semantic slot;
[0284] The semantic information value in each sentence is determined according to the sequence value of each semantic slot and the characters in the annotation data corresponding to each semantic slot.
[0285] The device for generating the customer service conversation summary in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of terminals 11 listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiment of the present application.
[0286] The customer service conversation summary generation device provided in the embodiment of the present application can achieve Figures 1 to 6 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.
[0287] See also Figure 8 The embodiment of the present invention provides an electronic device 800, including: at least one processor 801, a memory 902, a user interface 803 and at least one network interface 804. The various components in the user device 900 are coupled together via a bus system 805.
[0288] It is understood that the bus system 805 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus, and a status signal bus. Figure 8 Various buses are labeled as bus system 805 .
[0289] The user interface 803 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen, etc.).
[0290] It is understood that the memory 802 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM). The memory 902 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0291] In some implementations, the memory 802 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 8021 and an application program 8022 .
[0292] The operating system 8021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program 8022 includes various application programs, such as a media player, a browser, etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application program 9022.
[0293] In the embodiment of the present invention, the electronic device 800 may further include: a program stored in the memory 802 and executable on the processor 801, which implements the steps of the method provided in the embodiment of the present invention when executed by the processor 801.
[0294] The method disclosed in the above embodiment of the present invention can be applied to the processor 801, or implemented by the processor 801. The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 801 or the instruction in the form of software. The above processor 801 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a computer-readable storage medium mature in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The computer-readable storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802 and completes the steps of the above method in combination with its hardware. Specifically, a computer program is stored on the computer-readable storage medium.
[0295] It is to be understood that the embodiments described in the embodiments of the present invention may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more ASICs, DSPs, digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application or a combination thereof.
[0296] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned customer service conversation summary generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0297] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.
[0298] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned customer service conversation summary generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0299] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0300] The embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned customer service conversation summary generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0301] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0302] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general hardware platform, and of course, can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, disk, CD, etc.), including several instructions to enable a terminal or a network-side device to execute the methods described in each embodiment of the present application.
[0303] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of the present application and the scope of protection of the claims, and these implementation methods are all within the protection of the present application.
Claims
1. A method for generating a customer service conversation summary, characterized in that: include: Performing domain identification and type identification on the target customer service conversation data, and generating a conversation title according to the identified domain and type of the target customer service conversation data; Performing intent recognition on each sentence in the target customer service conversation data, and generating one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service conversation data; Fill the conversation title and the one or more user demands into a customer service conversation summary form; Each of the user demands corresponds to a pair of intent and domain.
2. The method according to claim 1, characterized in that: The performing of intent recognition on each sentence in the target customer service conversation data and generating one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service conversation data includes: Perform intent recognition on each sentence in the target customer service conversation data to obtain the intent label corresponding to each sentence; According to the correspondence between the intent label, the field and the user demand, the intent label corresponding to each sentence and the user demand corresponding to the identified field are determined.
3. The method according to claim 1, characterized in that The method further comprises: According to the mapping relationship between the domain, the intent, and the semantic slot, one or more semantic slots corresponding to each of the user demands are generated in the customer service conversation summary form; Extracting semantic information values from each sentence according to the intent corresponding to each sentence in the target customer service conversation data; According to the mapping relationship between the domain, the intention and the semantic slot, all the extracted semantic information values are filled into the corresponding semantic slots.
4. The method according to claim 1, characterized in that: The method further comprises: Divide the target customer service conversation data into user statements and customer service statements; Performing a first sentiment analysis on the user sentence to obtain a first sentiment label of the user sentence; Performing a second sentiment analysis on the customer service sentence to obtain a second sentiment label of the customer service sentence; Calculate the emotion value of the target customer service conversation data according to the first emotion label and the second emotion label, as well as a preset weight and a preset bias value; Calculate the service quality evaluation value according to the emotion value of the target customer service conversation data; Service quality information is generated according to the service quality evaluation value, and the service quality information is filled in the customer service conversation summary form.
5. The method according to claim 2, characterized in that: The intent recognition is performed on each sentence in the target customer service dialogue data to obtain the intent label corresponding to each sentence, including: After performing intent recognition on each sentence in the target customer service conversation data and obtaining multiple intent labels corresponding to each sentence, obtain an importance label corresponding to each intent label and a sequence value corresponding to the importance label; Select the intent label corresponding to the importance label with the largest sequence value as the target intent label corresponding to each sentence; The target intent label corresponding to each sentence is used to determine the intent label corresponding to each sentence.
6. The method according to claim 5, characterized in that The obtaining of the importance label corresponding to each intention label and the sequence value corresponding to the importance label includes: Preprocess each sentence in the target customer service dialogue data to obtain a first tensor containing all information of each sentence; Performing a relationship analysis on each of the sentences based on the first tensor, and outputting a second tensor containing the contextual relationships of different sentences; Based on the second tensor, an importance label determination process is performed on each intent label corresponding to each sentence, and a third tensor containing the importance label corresponding to each intent label is output; Based on the third tensor, sequence labeling processing is performed on the importance label corresponding to each intent label, and the importance label and the sequence value corresponding to the importance label are output.
7. The method according to claim 3, characterized in that The extracting semantic information value from each sentence according to the intent corresponding to each sentence in the target customer service dialogue data includes: Determine, according to a preset mapping relationship, a semantic slot corresponding to the intent corresponding to each sentence in the target customer service dialogue data; Using the BIO annotation method, the characters associated with the semantic slots in each sentence are annotated; Obtaining labeled data according to characters labeled as b-slot words and i-slot words; The semantic information value in each sentence is obtained according to the annotated data.
8. The method according to claim 7, characterized in that The obtaining the semantic information value in each sentence according to the annotated data includes: Performing semantic slot determination processing on each character in the annotated data, and outputting a fourth tensor containing the semantic slot corresponding to each character; Performing sequence labeling processing on each semantic slot based on the fourth tensor, and outputting a sequence value of each semantic slot; The semantic information value in each sentence is determined according to the sequence value of each semantic slot and the characters in the annotation data corresponding to each semantic slot.
9. A device for generating a customer service conversation summary, characterized in that: include: A first generating module is used to perform domain identification and type identification on target customer service conversation data, and generate a conversation title according to the identified domain and type of the target customer service conversation data; A second generating module is used to perform intent recognition on each sentence in the target customer service dialogue data, and generate one or more user demands according to the recognized intent of each sentence and the recognized domain of the target customer service dialogue data; A first filling module, used to fill the conversation title and the one or more user demands into a customer service conversation summary form; Each of the user demands corresponds to a pair of intent and domain.
10. An electronic device, characterized in that: It includes a processor and a memory, the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method for generating a customer service conversation summary as described in any one of claims 1 to 5 are implemented.
11. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for generating a customer service conversation summary as described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Personalized content generation method and device, electronic equipment and storage medium
CN121681896A
