An intelligent customer service voice processing system and method based on a knowledge graph
Through the improved ADFBERT network model and multi-hop relationship prediction algorithm based on BERT, the problem of low accuracy of the intelligent question-and-answer system under complex problems is solved, and a more efficient intelligent customer service system is realized, reducing enterprise costs.
Patent Information
- Application Number
- CN202211292269.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-10-21
AI Technical Summary
The existing intelligent question-and-answer system based on knowledge graphs has problems with low accuracy when facing complex multi-hop problems and cannot provide satisfactory intelligent answers.
The ADFBERT network model and multi-hop relationship prediction algorithm are adopted based on BERT, and the user's voice questions are converted into text, similarity recognition, entity recognition and problem classification are carried out, answers are obtained using the knowledge graph, and manual services are transferred to when necessary.
It improves the efficiency of customer service Q&A, reduces the cost of corporate customer service positions and newcomers training, and provides more accurate and intelligent answers.
Smart Images

Figure CN115688879B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an intelligent customer service voice processing system and method based on a knowledge graph, belonging to the technical field of intelligent customer service. Background Art
[0002] As a bridge for establishing a trust relationship between an enterprise and its customers, a good user experience provided by customer service can not only maintain the enterprise's reputation but also facilitate users to solve problems. A qualified human customer service has advantages such as high accuracy in answering questions and considerate service. However, with the growth of enterprise scale and the increasing number of customers, the disadvantages of high employment cost, long new employee training cycle, and low question-answering efficiency of human customer service become increasingly prominent. Therefore, intelligent customer service has emerged as the times require.
[0003] Intelligent customer service is an industry-oriented application developed on the basis of large-scale knowledge processing, involving large-scale knowledge processing technology, natural language processing technology, knowledge management technology, automatic question-answering system, reasoning technology, etc. Among them, the most crucial natural language processing technology (NLP) is a science that integrates mathematics, computer science, artificial intelligence, and linguistics. It studies various theories and methods that can achieve effective communication between humans and computers in natural language. Compared with human customer service, an intelligent customer service system built with the help of big data and natural language processing technology has advantages such as low implementation cost and high question-answering efficiency.
[0004] In recent years, intelligent question-answering systems based on knowledge graphs have become a research and application hotspot in academia and industry. The high semantic understanding degree, data accuracy, and high-efficiency retrieval of knowledge graphs have made them widely used. Currently, most intelligent question-answering systems based on knowledge graphs have achieved good results in single simple questions. However, in actual question-answering scenarios, users' questions are often more complex. Once the question is too long or there are multiple relationships and entities, existing technical methods are prone to problems such as multi-hop relationship errors and entity linking errors, ultimately resulting in a low precision rate of question-answering results or even incorrect answers, and customers cannot get satisfactory intelligent answers. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide an intelligent customer service voice processing system and method based on a knowledge graph, which can be used for both customer consultation and answer and new customer service training, greatly reducing the cost of enterprises and improving the question-answering efficiency of customer service at the same time.
[0006] To achieve the above purpose, the present invention is implemented by the following technical solutions:
[0007] In the first aspect, the present invention provides an intelligent customer service voice processing method based on a knowledge graph, including:
[0008] Receive the voice question input by the user and convert it into text information;
[0009] Select questions from the Q&A library in sequence and splice them with the text information, and input the splicing result into the pre-constructed similarity recognition model to obtain the corresponding similarity value;
[0010] If the maximum similarity value is less than the similarity threshold, obtain the question corresponding to the maximum similarity value from the Q&A library;
[0011] Input the question corresponding to the maximum similarity value into the pre-constructed entity recognition model to obtain entity information;
[0012] If the entity information can be successfully linked to the knowledge graph, obtain its category of the question it belongs to based on the pre-constructed question category recognition model;
[0013] Determine the candidate relationship path set according to the category of the question it belongs to, select the path with the highest similarity in the candidate relationship path set to retrieve the knowledge graph to obtain the answer, and convert the answer into voice information and feedback it to the user.
[0014] Optionally, if the maximum similarity value is greater than or equal to the similarity threshold, obtain the answer to the question corresponding to the maximum matching degree from the Q&A library; convert the answer into voice information and feedback it to the user.
[0015] Optionally, if the entity information cannot be successfully linked to the knowledge graph, transfer to the manual service.
[0016] Optionally, the construction of the similarity recognition model includes: constructing a training data set for similarity recognition and inputting it into the improved BERT model for model training to obtain the similarity recognition model;
[0017] The construction of the entity recognition model includes: constructing a training data set for entity recognition and inputting it into the improved BERT model for model training to obtain the entity recognition model; among them, a BiLSTM model and a CRF layer generation model are connected downstream of the improved BERT model;
[0018] The construction of the question category recognition model includes: constructing a training data set for question category recognition and inputting it into the improved BERT model for model training to obtain the question category recognition model.
[0019] Optionally, the improved BERT model includes:
[0020] Add an average pooling layer after the token embedding part of the BERT model input to form Average_pooling;
[0021] In the network connection of the attention layer of BERT, each layer outside the attention layer is connected to the previous two layers by a dense network to form Densely_connected;
[0022] The flip method is added to the cross-entropy loss function of BERT to form Flip.
[0023] Optionally, the determining the candidate relationship path set according to the problem category includes:
[0024] If the problem category belongs to the one-hop relationship category, for each entity in the entity information of the question sentence, retrieve its one-hop relationship path in the knowledge graph, calculate the similarity between the one-hop relationship path and the text information through the path similarity algorithm, and list the one-hop relationship path with the highest similarity into the one-hop candidate relationship path set;
[0025] If the problem category belongs to the multi-hop relationship category, for each entity in the entity information of the question sentence, retrieve its one-hop relationship path in the knowledge graph, calculate the similarity between the one-hop relationship path and the text information through the path similarity algorithm, and list the one-hop relationship path with the highest similarity into the candidate relationship path set; judge whether the current one-hop relationship path should stop extending through the stop decision algorithm. If it stops extending, use the one-hop relationship path in the current candidate relationship path set as the start and end path of the multi-hop relationship path of the current entity, and list the start and end path into the multi-hop candidate relationship path set.
[0026] In a second aspect, the present invention provides an intelligent customer service voice processing system based on a knowledge graph, and the device includes:
[0027] A question sentence receiving module, configured to receive a voice question sentence input by a user and convert it into text information;
[0028] A similarity recognition module, configured to sequentially select question sentences from the question-answer library and splice them with the text information, and input the splicing result into a pre-constructed similarity recognition model to obtain a corresponding similarity value;
[0029] A question sentence extraction module, configured to, if the maximum similarity value is less than the similarity threshold, obtain the question sentence corresponding to the maximum similarity value from the question-answer library;
[0030] An entity information module, configured to input the question sentence corresponding to the maximum similarity value into a pre-constructed entity recognition model to obtain entity information;
[0031] A problem category module, configured to, if the entity information can be successfully linked to the knowledge graph, obtain its problem category based on a pre-constructed problem identification model;
[0032] An answer generation module, which is used to determine a set of candidate relationship paths according to the category of the question, select the path with the highest similarity in the set of candidate relationship paths to retrieve the knowledge graph to obtain an answer, and convert the answer into voice information and feedback it to the user.
[0033] In a third aspect, the present invention provides an intelligent customer service voice processing device based on a knowledge graph, including a processor and a storage medium;
[0034] The storage medium is used to store instructions;
[0035] The processor is used to operate according to the instructions to execute the steps of the above method.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented.
[0037] Compared with the prior art, the beneficial effects achieved by the present invention:
[0038] The present invention proposes an intelligent customer service voice processing system and method based on a knowledge graph, which adopts an ADFBERT network model improved based on BERT and a multi-hop relationship prediction algorithm based on the knowledge graph, effectively solves the problem of low precision of the existing intelligent question-answering system based on the knowledge graph when facing complex multi-hop questions, can be used for both customer consultation and answering questions, and can also be used for training new customer service representatives, greatly reducing the employment cost of enterprise customer service positions and the training cost of new customer service representatives, while improving the efficiency of customer service answering questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic flowchart of an intelligent customer service system based on a knowledge graph provided by Embodiment 1 of the present invention;
[0040] Figure 2 is an internal structure diagram of the ADFBERT model provided by Embodiment 1 of the present invention;
[0041] Figure 3 is an internal structure diagram of the entity recognition algorithm provided by Embodiment 1 of the present invention;
[0042] Figure 4 is an internal structure diagram of the entity disambiguation algorithm provided by Embodiment 1 of the present invention;
[0043] Figure 5 is an internal structure diagram of the single-hop relationship prediction module provided by Embodiment 1 of the present invention;
[0044] Figure 6 is an internal structure diagram of the stop decision algorithm provided by Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and should not be used to limit the protection scope of the present invention.
[0046] Embodiment 1:
[0047] An intelligent customer service voice processing method based on a knowledge graph includes the following steps:
[0048] Step 01: Receive the voice question QV (Question_Voice) input by the user and proceed to Step 02.
[0049] Step 02: Convert QV into text information QT (Question_Text) through the question processing module and proceed to Step 03.
[0050] Step 03: Through the question matching module, perform a similarity match between QT and the questions in the preset Q&A library. If the matching degree exceeds the threshold threshold = 0.9, proceed to Step 04; otherwise, proceed to Step 05.
[0051] Step 04: Retrieve the question with the highest matching degree with QT in the preset Q&A library, and use the answer corresponding to this question as the final answer, and proceed to Step 12.
[0052] Step 05: Through the entity processing module, identify the entity information in the question and link the identified entity to the knowledge graph. If the link is successful, proceed to Step 06; otherwise, proceed to Step 07.
[0053] Step 06: Through the question classification module, judge the question category to which QT belongs. If it belongs to the query entity type question, proceed to Step 11; if it belongs to the query single relationship type question, proceed to Step 08; if it belongs to the query multi-relationship type question, proceed to Step 09; otherwise, proceed to Step 07.
[0054] Step 07: Transfer to the human customer service, and the process ends.
[0055] Step 08: Through the single-hop relationship prediction module, obtain the candidate relationship path set Path_all of the question and proceed to Step 10.
[0056] Step 09: Through the multi-hop relationship prediction module, obtain the candidate relationship path set Path_all of the question and proceed to Step 10.
[0057] Step 10: Through the candidate relationship path set Path_all, obtain the relationship path Path_max with the highest score and proceed to Step 11.
[0058] Step 11: Retrieve the knowledge graph according to the relationship path Path_max with the highest score, obtain the final answer, and proceed to Step 12.
[0059] Step 12: Return the text-based final answer AT (Answer_Text), and proceed to Step 13.
[0060] Step 13: Convert AT into voice information through the answer processing module as the final answer AV (Answer_Voice) to be fed back to the user, and the process ends.
[0061] The question processing module in Step 02: Receives the voice question input by the user and performs text processing on the voice information.
[0062] The question matching module in Step 03: Performs similarity matching between the text-processed question and the questions in the preset Q&A library. The similarity matching is to splice the two questions with [SEP] and fine-tune the ADFBERT network model for the semantic similarity analysis task.
[0063] The ADFBERT (Average_pooling_Densely_connected_Flip_BERT) network model is a network model innovated based on BERT, as Figure 2 shown. Compared with BERT, the main improvement points are:
[0064] (1) Average_pooling: Add an average pooling layer after the token embedding part of the BERT model. The average pooling layer acts on the input features and reduces their size by calculating the average value of the element values within the pooling kernel region. The specific operation is as follows: Select some features according to the pooling region, then add and sum the selected features, and take the average value as the output. Applying the average pooling layer to the token embedding part can improve the model's ability to capture semantic information at the phrase level and at the same time cause a small amount of perturbation to improve the model's stability.
[0065] (2) Densely_connected: In the network connection of the attention layer of BERT, keep the residual network connection inside the attention layer unchanged, and connect each layer outside the attention layer to the previous two layers with a dense network. The formula is as follows:
[0066] x i = H(x i-1 ) + αx i-1 + βx i-2
[0067] Among them, H is a non-linear transformation, and α and β are weight coefficients. This design enables the features extracted by each layer to be repeatedly utilized between different attention layers, improving the feature utilization rate; and further enhancing the sensitivity of the model to gradients, thereby improving the training efficiency of the model.
[0068] The residual network has an additional data connection between each layer in the network and a certain layer several layers downstream. This design enables the gradient signal to be better conducted between layers and also enables the convolutional neural network to have a deeper number of layers. The formula is as follows:
[0069] x i =H i (x i-1 ) + x i-1
[0070] Among them, x i is the output value of the i-th residual unit, and H i is a non-linear transformation.
[0071] The dense network connection means that each layer in the network is connected to every layer downstream. The formula is as follows:
[0072] x i =H i ([x0, x1,..., x i-1 )
[0073] (3) Flip: Use the flip loss function. The flip loss function is to add the flip method to the cross-entropy loss function of BERT. The specific formula is as follows:
[0074]
[0075] Using the flip loss function is equivalent to "flipping" the part below the threshold c in the original cross-entropy loss function. Thus, when the Loss is greater than the threshold during the initial stage of model training, normal gradient descent is performed. When the Loss is lower than the threshold, on the contrary, gradient ascent is performed to keep the Loss near the threshold, thereby avoiding the Loss falling into a local minimum and preventing the model from overfitting, and enhancing the generalization ability of the model.
[0076] The entity processing module in step 05 performs entity recognition tasks and entity disambiguation tasks, and finally links the entities to the knowledge graph.
[0077] The entity recognition task is to identify the topic entity in the question sentence. By connecting a BiLSTM model and a CRF layer downstream of the ADFBERT network model, such as Figure 3As shown below. Specifically, the pre-trained model ADFBERT is used to map the annotated original corpus into dynamic word vectors; the vectors are input into the BiLSTM network layer to extract features and output the maximum probability of the vector feature extraction result sequence; in order to avoid unreasonable outputs in the extracted feature sequence, the conditional random field (CRF) layer is used to learn the dependency features between entities, restrict the invalid sequences output by the BiLSTM layer, and improve the recognition accuracy of the model; finally, the predicted annotation sequence is obtained, and each entity in the sequence is extracted and classified to complete the entity recognition task.
[0078] The entity disambiguation task is to generate a set of candidate entities related to the recognized entity from the knowledge graph and disambiguate the candidate entity set, and finally select the correct candidate entity. The method adopted is to input the question sentence and the candidate entity set into the ADFBERT+CNN model, as Figure 4 shown below, and the convolutional neural network is used to enhance the entity features pre-trained by the ADFBERT model for entity disambiguation. Specifically, if the candidate entity is the subject entity in the annotated triple, the output label is 1, otherwise the output label is 0. The input data is composed of [CLS]+question character sequence+[SEP]+candidate entity concatenated with relationship features+[SEP]. Among them, the one-hop relationship feature is the set of one-hop relationships connected starting from the candidate entity in the knowledge graph, and the formula is shown below, where q is the question, e is the candidate entity, and p is the one-hop relationship starting from e.
[0079] x = [CLS], q, [SEP], e, p1,..., p n , [SEP]
[0080] After being encoded by the ADFBERT network, the hidden layer vectors output by the last four layers of the encoder are obtained, and the hidden layer output H is obtained by adding them. The feature C of the convolutional layer is expressed as:
[0081]
[0082] where σ is the sigmoid function, is the convolution operation, W is the weight in the convolution kernel, and b is the bias. H is respectively passed through three convolutional layers with strides of 1, 3, and 5 to extract features. Then it is input into the max pooling layer, and the three obtained vectors are concatenated and then input into the Softmax layer for classification, and the output label is 0 or 1. The loss function is the cross-entropy loss function, and the formula is as follows:
[0083] L = -[y·ln(x)+(1 - y)·ln(1 - x)]
[0084] During training, the loss function is minimized. During prediction, the probability that the candidate entity is predicted as label 1 is used as the candidate entity score.
[0085] The question classification module in step 06 is used to identify the category to which the question sentence belongs. The categories are divided into query entity class, query single-hop relationship class, and query multi-hop relationship class. The query entity class means that the question sentence is an entity in the knowledge graph. For the determination of the single-hop relationship class and the multi-hop relationship class, the method of using a fine-tuned ADFBERT model for a binary classification task is adopted.
[0086] The single-hop relationship prediction module in step 08 performs the retrieval and analysis tasks for questions of the single-hop relationship class. The method of connecting a BiLSTM model and a CNN model downstream of the ADFBERT network model is adopted, as Figure 5 shown. Specifically, for the candidate relationship samples that can correctly reflect the intention of the question sentence, the output label is 1, and vice versa, the output label is 0. The input data consists of the question relationship pair and the one-hop relationship features of the answer entity. The question relationship pair is composed of [CLS]+question character sequence+[SEP]+candidate relationship+[SEP], and the formula is as follows, where q is the question and p i is the one-hop relationship of the candidate entity.
[0087] x = [CLS],q,[SEP],p i ,[SEP]
[0088] After being encoded by the ADFBERT network, the hidden layer vectors output by the last four layers of the encoder are obtained. After adding them up, the context information of the sequence is learned through the BiLSTM network. Given the input sequence [x1,x2,...,x t ,...,x n , the calculation formula of the LSTM network at time t is as follows:
[0089] i t =σ(W i x t +U i h t-1 +b i )
[0090] f t =σ(W f x t +U f h t-1 +b f )
[0091] o t =σ(W o x t +U o h t-1 +b o )
[0092] C t =tanh(W c xt +U c h t-1 +b c )
[0093]
[0094]
[0095] where i t , f t , o t represent the input gate, forget gate, and output gate of the LSTM network respectively. W and U are weight matrices, b is the bias, C t represents the cell state, and h t represents the network output.
[0096] The outputs of the LSTMs in two directions are concatenated to obtain the output of the BiLSTM. Then, features are extracted through three convolutional layers with strides of 1, 3, and 5, and then input into the max-pooling layer. The three vectors obtained are concatenated to generate y2.
[0097] The input data of the single-hop relationship features of the answer entity consists of the set of single-hop relationships [r1, r2,..., r i retrieved from the candidate entity along the candidate relationship. After mapping through the relationship matrix, the vector representation [R1, R2,..., R i of the relationship features is obtained. The attention mechanism is used to interact the single-hop relationship features of the answer entity with the vector H [CLS] at the [CLS] position in the hidden layer vector to obtain y1. In the ADFBERT pre-training task, the vector H [CLS] is usually used for classification. Therefore, the vector H [CLS] contains the interaction information of the question-answer relationship pair after being encoded by ADFBERT. The calculation formula for the attention mechanism part is as follows:
[0098] H′ [CLS] = W t T H [CLS]
[0099] α j = softmax(R j × H′ [CLS] )
[0100]
[0101]
[0102] where W t is a transformation matrix of learnable parameters with a dimension of dR ×d ADFBERT After concatenating y1 and y2, input them into the Softmax layer for classification, and the output label is 0 or 1. The loss function is the cross-entropy loss function, and the loss function is minimized during training. During prediction, the probability that the predicted candidate relationship is label 1 is used as the score of the candidate relationship.
[0103] The multi-hop relationship prediction module in step 09 performs retrieval and analysis tasks for multi-hop relationship type problems, using a stop decision algorithm and a path similarity algorithm. Specifically, for each entity e in the set of subject entities in a multi-hop relationship type problem, retrieve the one-hop relationship paths of e in the knowledge graph, calculate the paths with the highest similarity through the path similarity algorithm and list them as candidates, and then use the stop decision algorithm to determine whether the current path should stop extending. If true, stop the extension operation, use the current path P e as the path starting from this entity e, and merge it into the set of total paths of the problem P, and perform the same operation as above for the next entity; if false, continue the above extension operation until it stops.
[0104] The stop decision algorithm uses the Sentence-ADFBERT model, as Figure 6 shown, to determine whether the current path should perform an extension operation and perform a path transfer for the next hop. Specifically, in the question and path representation layers, a siamese network structure is constructed, and the pre-trained model ADFBERT with shared weights is used to encode and represent the question Q and the candidate path P respectively. Then, take the average of the hidden layer vector representations output by ADFBERT as the vector representations H Q and H P , and the formula is as follows:
[0105] H Q = Mean_pooling(ADFBERT(x Q ))
[0106] x Q = [[CLS],q1,...q n ,[SEP]]
[0107] H P = Mean_pooling(ADFBERT(x P ))
[0108] x P = [[CLS],p1,...p m ,[SEP]]
[0109] In the type feature introduction layer, for the set of type words R of an entity, perform max pooling and average pooling operations on the matrix obtained by encoding it through the pre-trained word vector embedding layer, respectively, to obtain two vector representations and The formulas are as follows:
[0110] H R = Embedding(R)
[0111] R = [r1, r2,..., r i
[0112]
[0113]
[0114] In the attention mechanism interaction layer, concatenate and to obtain H′ R , and transform its dimension through matrix W R . Then, transform the dimension of H Q through matrix W Q . Multiply the two matrices after dimension transformation to obtain the weight a ij of Attention. After weighted summation with H′ R , perform dot product with H Q and then pass through the average pooling layer to obtain the new question representation AttQ. The formula is as follows:
[0115]
[0116]
[0117]
[0118]
[0119] In the output layer, perform operations, concatenation on AttQ and H Q 、H P , and pass the output vector to the Softmax layer for binary classification task. The formula is as follows:
[0120] y = Softmax(H)
[0121] H = [H Q , H P , H Q - H P , H Q - AttQ - H P
[0122] The output label is 0 or 1. The loss function is the cross entropy loss function, which is minimized during training. When predicting, the probabilities of the output labels 0 and 1 are compared, and the one with a larger probability is taken as the predicted label for the sample.
[0123] The path similarity algorithm adopts the Sentence-ADFBERT model to calculate the similarity between the candidate relationship path of the current number of hops and the question, and selects the relationship path with the highest similarity among the candidate relationship paths. Different from the stopping decision algorithm, the loss function with soft interval is adopted. As long as the interval between the negative sample and the positive sample is greater than γ, no penalty is imposed. The formula is as follows:
[0124] Loss=max(0,γ-S(Q,P + )+S(Q,P - ))
[0125] Where Q represents the question, P + represents the positive example in the candidate relationship path, P - represents the negative example in the candidate relationship path, and S represents the similarity score calculated by the path similarity calculation network.
[0126] The answer processing module in step 13 converts the final textual output answer into voice information and feeds it back to the user.
[0127] Embodiment 2:
[0128] An intelligent customer service voice processing system based on a knowledge graph can implement an intelligent customer service voice processing method based on a knowledge graph described in Embodiment 1, including:
[0129] A question receiving module is used to receive voice questions input by users and convert them into text information;
[0130] A similarity recognition module is used to select questions from the question-answer library in turn and concatenate them with the text information, and input the concatenation results into a pre-built similarity recognition model to obtain the corresponding similarity value;
[0131] A question extraction module is used to obtain the question corresponding to the maximum similarity value from the question-answer database if the maximum similarity value is less than the similarity threshold;
[0132] An entity information module, used to input the question corresponding to the maximum similarity value into a pre-built entity recognition model to obtain entity information;
[0133] The question category module is used to obtain the question category to which the entity information belongs based on the pre-built question identification model if the entity information can be successfully linked to the knowledge graph;
[0134] The answer generation module is used to determine a set of candidate relationship paths according to the category of the question, select the path with the highest similarity in the set of candidate relationship paths to retrieve the knowledge graph for obtaining an answer, and convert the answer into voice information and feedback it to the user.
[0135] Embodiment 3:
[0136] An embodiment of the present invention further provides an intelligent customer service voice processing device based on a knowledge graph, which can implement the intelligent customer service voice processing method described in Embodiment 1, including a processor and a storage medium;
[0137] The storage medium is used to store instructions;
[0138] The processor is used to operate according to the instructions to execute the steps of the above method.
[0139] Embodiment 4:
[0140] An embodiment of the present invention further provides a computer-readable storage medium, which can implement the intelligent customer service voice processing method described in Embodiment 1, and has a computer program stored thereon. When the program is executed by a processor, the steps of the above method are implemented.
[0141] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0143] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0145] The foregoing is only a preferred embodiment of the present invention, and it should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. An intelligent customer service voice processing method based on a knowledge graph, characterized in that, Including: Receiving a voice question input by a user and converting it into text information; Sequentially selecting questions from a question-answer library and concatenating them with the text information, and inputting the concatenated result into a pre-constructed similarity recognition model to obtain the corresponding similarity value; If the maximum similarity value is less than the similarity threshold, obtaining the question corresponding to the maximum similarity value from the question-answer library; Inputting the question corresponding to the maximum similarity value into a pre-constructed entity recognition model to obtain entity information; If the entity information can be successfully linked to a knowledge graph, obtaining its belonging question category based on a pre-constructed belonging question recognition model, where the belonging question category includes one-hop relationship classes and multi-hop relationship classes; Determining a candidate relationship path set according to the belonging question category, selecting the path with the highest similarity in the candidate relationship path set to retrieve the knowledge graph to obtain an answer, and converting the answer into voice information and feeding it back to the user; Among them, the similarity recognition model, the entity recognition model or the problem recognition model belongs is based on an improved BERT model construction, and the improved BERT model includes: After BERT the part of tokenembedding the model input, add an average pooling layer to form Average _ pooling ; In BERT In the attention layer network connection of the model, each layer outside the attention layer is connected to the previous two layers by a dense network to form Densely _ connected ; Add BERT to the cross-entropy loss function of the model flip to form Flip .
2. The intelligent customer service voice processing method based on a knowledge graph according to claim 1, characterized in that If the maximum similarity value is greater than or equal to the similarity threshold, obtaining the answer to the question corresponding to the maximum matching degree from the question-answer library; converting the answer into voice information and feeding it back to the user.
3. The intelligent customer service voice processing method based on a knowledge graph according to claim 1, characterized in that If the entity information cannot be successfully linked to the knowledge graph, transferring to manual service.
4. The intelligent customer service voice processing method based on a knowledge graph according to claim 1, characterized in that, The construction of the similarity recognition model includes: constructing a training data set for similarity recognition and inputting it into an improved BERT model for model training to obtain a similarity recognition model; The construction of the entity recognition model includes: constructing a training data set for entity recognition and inputting it into an improved BERT model for model training to obtain an entity recognition model; wherein, the improved BERT model is connected downstream to BiLSTM a model and CRF a layer generation model; The construction of the above-mentioned problem identification model includes: constructing a training data set for problem identification and inputting it into an improved BERT model for model training to obtain a problem identification model.
5. The intelligent customer service voice processing method based on a knowledge graph according to claim 1, characterized in that The determining the candidate relationship path set according to the belonging question category includes: If the belonging question category is a one-hop relationship class, for each entity in the entity information of the question, retrieving its one-hop relationship path in the knowledge graph, calculating the similarity between the one-hop relationship path and the text information through a path similarity algorithm, and listing the one-hop relationship path with the highest similarity in the one-hop candidate relationship path set; If the belonging question category is a multi-hop relationship class, for each entity in the entity information of the question, retrieving its one-hop relationship path in the knowledge graph, calculating the similarity between the one-hop relationship path and the text information through a path similarity algorithm, and listing the one-hop relationship path with the highest similarity in the candidate relationship path set; judging whether the current one-hop relationship path should stop extending through a stop decision algorithm, and if it stops extending, taking the one-hop relationship path in the current candidate relationship path set as the start and end path of the multi-hop relationship path of the current entity, and listing the start and end path in the multi-hop candidate relationship path set.
6. An intelligent customer service voice processing system based on a knowledge graph, characterized in that, The system includes: A question receiving module for receiving a voice question input by a user and converting it into text information; A similarity recognition module for sequentially selecting questions from a question-answer library and concatenating them with the text information, and inputting the concatenated result into a pre-constructed similarity recognition model to obtain the corresponding similarity value; A question extraction module for obtaining the question corresponding to the maximum similarity value from the question-answer library if the maximum similarity value is less than the similarity threshold; An entity information module for inputting the question corresponding to the maximum similarity value into a pre-constructed entity recognition model to obtain entity information; A problem category module, which is used to obtain its belonging problem category based on a pre-built belonging problem recognition model if the entity information can be successfully linked to the knowledge graph, and the belonging problem category includes one-hop relationship categories and multi-hop relationship categories; An answer generation module, which is used to determine a candidate relationship path set according to the belonging problem category, select the path with the highest similarity in the candidate relationship path set to retrieve the knowledge graph to obtain an answer, and convert the answer into voice information and feedback it to the user; Among them, the similarity recognition model, the entity recognition model or the problem recognition model belongs is based on an improved BERT model construction, and the improved BERT model includes: After BERT the part of tokenembedding the model input, add an average pooling layer to form Average _ pooling ; In BERT the attention layer network connection of the model, each layer outside the attention layer is connected to the previous two layers by a dense network to form Densely _ connected ; Add BERT to the cross-entropy loss function of the model flip to form Flip .
7. An intelligent customer service voice processing device based on a knowledge graph, characterized in that, It includes a processor and a storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Question and answer method and device, electronic equipment and storage medium
CN110837550A
Comprehensive pipe gallery industry knowledge question-answering system construction method based on knowledge graph
CN111831794A