WO2020073530A1 - Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium - Google Patents

Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2020073530A1
WO2020073530A1 PCT/CN2018/125249 CN2018125249W WO2020073530A1 WO 2020073530 A1 WO2020073530 A1 WO 2020073530A1 CN 2018125249 W CN2018125249 W CN 2018125249W WO 2020073530 A1 WO2020073530 A1 WO 2020073530A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
input sentence
standard
conversation text
vector
Prior art date
Application number
PCT/CN2018/125249
Other languages
French (fr)
Chinese (zh)
Inventor
许开河
杨坤
王少军
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020073530A1 publication Critical patent/WO2020073530A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification

Definitions

  • the present application relates to the field of data processing technology, and in particular to a customer service robot conversation text classification method and device, electronic equipment, and computer-readable storage medium.
  • each knowledge point corresponds to a standard question.
  • the customer service robot After the customer service robot obtains the extended question, it needs to use the text classification model to classify the extended question to obtain the category of the standard question corresponding to the extended question, and then extract the answer that matches the standard question category from its own knowledge base according to the resulting standard question category . Therefore, whether the expansion problem is accurately classified is the key to whether the customer service robot can accurately answer customer questions.
  • Control area the category corresponding to this control area is the standard problem category corresponding to the extended problem.
  • an object of the present application is to provide a customer service robot conversation text classification method and device, electronic equipment, and computer-readable storage medium.
  • a conversation text classification method for a customer service robot includes: acquiring input sentences of a customer service robot in a conversation, converting the input sentences into standard conversation text, and the input sentences are conversations waiting for a response from the customer service robot to process a response Message; obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text; perform category label prediction on the semantic vector of the standard conversation text to obtain the category label probability vector corresponding to the standard conversation text Selecting the category corresponding to the maximum probability label from the category label probability vector as the category of the standard conversation text, the category is used to assist in performing the response of the customer service robot to the input text.
  • a customer service robot conversation text classification device includes: an input sentence conversion module for acquiring an input sentence of a customer service robot in a conversation, converting the input sentence into standard conversation text, and the input sentence is waiting The customer service robot processes the responded conversation message; the semantic feature extraction module is used to obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text; the text category prediction module is used to compare the standard The semantic vector of the conversation text is used to predict the category label, and the probability vector of the category label corresponding to the standard conversation text is obtained; the text category acquisition module is used to select the category corresponding to the maximum probability label from the category label probability vector as the criterion A category of conversation text, which is used to assist in performing the response of the customer service robot to the input text.
  • an electronic device includes a processor and a memory, and a computer-readable instruction is stored on the memory, and when the computer-readable instruction is executed by the processor, the method for classifying a customer service robot conversation text as described above is implemented .
  • a computer-readable storage medium has stored thereon a computer program, and when the computer program is executed by a processor, the customer service robot conversation text classification method as described above is implemented.
  • the input sentence of the customer service robot in the ongoing conversation is the extended question acquired by the customer service robot, and the standard conversation text is the standard question corresponding to this extended question.
  • the application After obtaining the input sentence in the conversation conducted by the customer service robot, the application first converts the input sentence into standard conversation text, and then classifies the resulting standard conversation text.
  • the size of the corresponding control area of the different standard conversation text categories in the text category marking space is the same, so that when text classification is performed on the standard conversation texts, there is no reason for the The inconsistent size of the control area leads to misclassification, so that the input sentences obtained by the customer service robot can be accurately classified.
  • Fig. 1 is a hardware block diagram of a customer service robot according to an exemplary embodiment.
  • Fig. 2 is a flowchart illustrating a method for classifying customer service robot conversation text according to an exemplary embodiment.
  • Fig. 3 is a schematic diagram illustrating a process of encoding and decoding an input sentence according to an exemplary embodiment.
  • Fig. 4 is a flow chart showing a method for classifying customer service robot conversation text according to another exemplary embodiment.
  • Fig. 5 is a block diagram showing a customer service robot conversation text classification device according to an exemplary embodiment.
  • Fig. 1 is a hardware block diagram of a customer service robot according to an exemplary embodiment. It should be noted that the customer service robot is only an example adapted to the present disclosure, and cannot be considered as providing any limitation on the scope of use of the present disclosure.
  • the customer service robot may include one or more of the following components: a processing component 101, a memory 102, a power component 103, a multimedia component 104, an audio component 105, a sensor component 107, and a communication component 108.
  • a processing component 101 a memory 102
  • a power component 103 a power component 103
  • a multimedia component 104 a multimedia component 104
  • an audio component 105 a sensor component 107
  • a communication component 108 a communication component 108.
  • the above components are not all necessary.
  • the customer service robot may add other components or reduce some components according to its own functional requirements, which is not limited in this embodiment.
  • the processing component 101 generally controls the overall operations of the customer service robot, such as operations associated with display, data communication, camera operations, and log data processing.
  • the processing component 101 may include one or more processors 109 to execute instructions to complete all or part of the steps of the above operations.
  • the processing component 101 may include one or more modules to facilitate interaction between the processing component 101 and other components.
  • the processing component 101 may include a multimedia module to facilitate interaction between the multimedia component 104 and the processing component 101.
  • the memory 102 is configured to store various types of data to support the operation of the customer service robot. Examples of these data include instructions for any application or method to operate on the customer service robot.
  • the memory 102 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as SRAM (Static Random Access Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), ROM (Read Only Memory), disk or CD.
  • SRAM Static Random Access Memory
  • EEPROM Electrical Erasable Programmable Read Only Memory
  • ROM Read Only Memory
  • One or more modules are also stored in the memory 102, and the one or more modules are configured to be executed by the one or more processors 109 to complete all or part of any of the following customer service robot conversation text classification methods step.
  • the power supply component 103 provides power for various components of the customer service robot.
  • the power supply component 103 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the customer service robot.
  • the multimedia component 104 includes a screen that provides an output interface between the customer service robot and the user.
  • the screen may include an LCD (liquid crystal display) and a TP (touch panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding action, but also detect the duration and pressure related to the touch or sliding operation.
  • the audio component 105 is configured to output and / or input audio signals.
  • the audio component 105 includes a microphone.
  • the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 102 or transmitted via the communication component 108.
  • the audio component 105 further includes a speaker for outputting audio signals to implement conversation operations between the customer service robot and the customer.
  • the sensor assembly 107 includes one or more sensors for providing computer equipment with various aspects of status assessment.
  • the sensor component 107 can also detect changes in the coordinates of the customer service robot or a component of the customer service robot and temperature changes in the customer service robot.
  • the sensor assembly 107 may also include a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 108 is configured to facilitate wired or wireless communication between the customer service robot and other devices.
  • Customer service robots can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof.
  • the customer service robot may be controlled by one or more ASICs (application specific integrated circuits), DSPs (digital signal processors), PLDs (programmable logic devices), FPGAs (field programmable gate arrays), and controllers , Microcontroller, microprocessor or other electronic components to implement the text classification method of customer service robot conversation shown below.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • PLDs programmable logic devices
  • FPGAs field programmable gate arrays
  • controllers Microcontroller, microprocessor or other electronic components to implement the text classification method of customer service robot conversation shown below.
  • the customer service robot is a machine device for automatically performing dialogue work, and may specifically be a terminal device such as a smart phone, tablet computer, notebook computer, or other machine equipment with a specific shape and function. Not going.
  • Fig. 2 is a flow chart of a method for classifying conversation text of a customer service robot according to an exemplary embodiment. The method is applicable to the customer service robot shown in Fig. 1. As shown in Figure 2, the method may include the following steps:
  • step 210 the input sentence of the customer service robot in the ongoing conversation is obtained, and the input sentence is converted into standard conversation text.
  • the input sentence of the customer service robot in the conversation is a conversation message waiting for the response of the customer service robot to process the response, which is easy to understand.
  • the input sentence is an expansion problem that the customer inputs to the customer service robot during the conversation between the customer service robot and the customer. For example, the customer enters "Hello, I would like to ask what is the annual fee of the owner card”, “Will I apply for an annual fee for the owner card”, “I ask, my owner card "What is the annual fee-free requirement" and other input sentences, and these input sentences are all extended questions corresponding to the standard question "Car Owner's Card Annual Fee".
  • the input sentence may be obtained by the customer service robot by recognizing the voice signal input by the customer.
  • the customer service robot obtains the question voice input by the customer through the microphone configured by itself, and performs speech recognition on the obtained question voice to obtain the input sentence.
  • the input sentence can also be obtained through the touch screen configured by the customer service robot.
  • the customer enters the question he wants to ask on the touch screen configured by the customer service robot.
  • the customer service robot directly obtains the text information entered on the touch screen as an input sentence.
  • the input sentence is converted into standard conversation text corresponding to the input sentence.
  • the standard conversation text is the standard question corresponding to the extension question, such as the above-mentioned "Car Owner's Card Annual Fee”.
  • the input sentence can be converted into standard conversation text corresponding to the input sentence through text translation, which may include the following steps:
  • the coding of the input sentence is carried out using a neural network model to automatically analyze the key semantic features of the input sentence.
  • the key semantic feature is an important feature used to express the semantics of the input sentence. It is highly related to the semantics of the input sentence and can include the structural features and keywords of the input sentence.
  • an LSTM (Long Short-Term Memory, Long Short-Term Neural Network) model can be used to encode input sentences.
  • the specific process is as follows: input each word vector of the input sentence into the LSTM model in sequence, and input The word vector is traversed to obtain a hidden state vector obtained through traversal, and the hidden state vector is a semantic vector corresponding to the input sentence.
  • the word vector of the input sentence is obtained by vectorizing the words in the input sentence. First, perform word segmentation on the input sentence to divide the input text into several word sequences arranged in sequence. For example, if the input text is "Do I have to pay an annual fee for the owner card I apply for", the word segmentation process will result in the phrase "Please ⁇ Me ⁇ Apply ⁇ 's ⁇ Owner Card ⁇ Want ⁇ Receive ⁇ Annual fee ⁇ "
  • the word segmentation processing of the input sentence may be performed by using a word segmentation algorithm, such as a word segmentation method based on string matching, a word segmentation method based on understanding, or a word segmentation method based on statistics.
  • each word in the word sequence is mapped to a low-dimensional vector to obtain a word vector corresponding to each word.
  • one-hot (one-hot code) vector coding or word2vec (word embeddings (word vector) vector coding method, or other methods can also be used, not limited here.
  • the vector obtained by the one-hot vector coding method does not store the correlation between the words in the input sentence, it is necessary to add weight information to the one-hot vector obtained by each word.
  • the weight of each word is related to the degree of semantic relevance of the word to the input sentence. For example, in the above input sentence "Do I need to charge an annual fee for the owner card I apply for", the "owner card” and “annual fee” The two words have a greater semantic relevance to the input sentence, and the corresponding weights should be higher, while the words “I ask” and "I” are obviously not highly semantically related to the input sentence, and the corresponding weights are also higher. low.
  • Each word vector obtained through the word2vec vector coding method is also associated with the semantics of the input sentence, and each word vector obtained through the word2vec method can still reflect the degree of relevance of each word to the input sentence semantics.
  • Each word vector of the input sentence is input into the LSTM model in sequence, and the specific process of traversing the input word vector in chronological order is shown in FIG. 3.
  • the word vectors X1, X2, X3 are sequentially input into the LSTM model in chronological order, and the state of the hidden layer at different times is updated.
  • the update of the state of the hidden layer at each time depends on the state of the hidden layer updated at the previous time, and will be updated to EOS end of sentence, the first hidden state vector L as the semantic vector of the input sentence.
  • the output first hidden state vector L can establish the global semantic expression of each word combined with the input sentence, so that the obtained semantic vector fully correlates with the key semantics of the input sentence feature.
  • Bi-LSTM Bi-Long Short-Term Memory, bidirectional long-term neural network
  • the key features of the input sentence are decoded using another LSTM model or Bi-LSTM model.
  • the LSTM model is used as an example for description below.
  • the specific decoding process is still shown in Figure 3.
  • the semantic vector L of the encoded input sentence is used as the initial value in the LSTM model, the probability distribution of the output words at this time is calculated, the probability of the possible output words is obtained, and then the probability of the output word Sampling is performed to obtain the final word O output at this moment, and the state of the hidden layer is updated.
  • the word vector O finally output at this time is used as the input at the next time, and the updated hidden layer state is passed to the next time to calculate the word P output at the next time. This cycle until the end of the output sentence indicates that the decoding is complete.
  • the word sequence obtained by arranging the words output by decoding in chronological order is the standard conversation text obtained by text translation of the input sentence.
  • the text translation of the input sentence may be performed by the processor configured by the customer service robot, or may be performed by a server that has established a wired or wireless network connection with the customer service robot in advance. limited.
  • a semantic vector corresponding to the standard conversation text is obtained by performing semantic feature extraction on the standard conversation text.
  • a convolutional neural network (CNN) model is used to extract the semantic features of the standard conversation text to obtain the semantic vector corresponding to the standard conversation text.
  • CNN convolutional neural network
  • the semantic vector corresponding to the standard conversation text is obtained by pooling the extracted semantic features.
  • the second hidden state vector obtained by decoding the key semantic features is the hidden layer state vector corresponding to each output word.
  • Several second hidden state vectors obtained by decoding are arranged in sequence to form a vector matrix with dimension dimension length_state (length of state sequence) ⁇ hidden_size (number of hidden state vectors) to obtain a hidden state vector matrix.
  • the state sequence length is the number of elements contained in the second hidden state vector, and the resulting hidden state vector matrix is used as the input layer of the convolutional neural network.
  • the convolutional layer of the convolutional neural network After obtaining the hidden state vector matrix, the convolutional layer of the convolutional neural network convolves the hidden state vector matrix to convolve the input layer to obtain several features Map (feature label).
  • the size of the convolution window is the length of the state sequence in the hidden state vector matrix ⁇ the number of hidden state vectors.
  • a number of feature labels with a column number of 1 are obtained. These feature labels are used to represent the semantic features of standard conversational text.
  • the pooling of the extracted semantic features is performed by the pooling layer of the convolutional neural network model.
  • the pooling layer extracts the feature vector corresponding to the maximum value from each feature label obtained by the convolutional layer, and obtains the semantic vector corresponding to the standard conversation text by combining these extracted feature vectors.
  • step 250 class label prediction is performed on the semantic vector of the standard conversation text to obtain the class label probability vector corresponding to the standard conversation text.
  • the category label prediction of the semantic vector of the standard conversation text is to predict the probability that the standard conversation text satisfies each control region in the text category label space according to the semantic vector of the standard conversation text.
  • the text category mark space is a preset sample space, and the control areas in the text category mark space correspond to preset standard question categories.
  • Each element in the predicted category label probability vector is the probability that the standard conversation text satisfies each control region in the text category label space.
  • the category label prediction on the semantic vector of the standard conversation text may specifically include the following steps:
  • the semantic vector of the standard conversation text is nonlinearly mapped to obtain the state vector of the standard conversation text in the text category label space;
  • Probability normalization is performed on the state vector of the standard conversation text in the text category label space to obtain the category label probability vector corresponding to the standard conversation text.
  • the non-linear mapping of the semantic vector of the standard conversation text through the target parameter matrix is used to map the semantic vector of the standard conversation text to the text category label space, so as to associate the standard conversation text with the sample space.
  • the target parameter matrix is a non-linear mapping condition that maps the semantic vector of the standard conversation text to the text category label space. Therefore, the parameter values in the target parameter matrix will directly affect the accuracy of class label prediction of the semantic vector of the standard conversation text. degree.
  • the probability normalization of the state vector of the standard conversation text in the text category label space is performed by the Softmax multi-class prediction function.
  • Softmax multi-class prediction function is as follows:
  • k represents the number of divided text categories in the text category label space.
  • the softmax multi-class prediction function maps the state vector of standard conversation text in the text category label space to a probability vector formed by the combination of probability value sequences between (0,1) to obtain the category label probability corresponding to the standard conversation text vector.
  • step 270 the category corresponding to the maximum probability label is selected from the category label probability vector as the category of standard conversation text.
  • each element in the category label probability vector is the probability that the standard conversation text satisfies each control region in the text category label space, and the category marked by the most probable control region is closest to the true category of the standard conversation text .
  • selecting the category corresponding to the maximum probability label from the category label probability vector as the category of the standard conversation text can be as close as possible to the true category of the standard conversation text, thereby accurately predicting the type of the standard conversation text.
  • process of classifying the standard conversation text in this embodiment may be performed by the processor configured by the customer service robot, or may be pre-established with the customer service robot Executed by a server connected to a wired or wireless network.
  • the input sentence is first converted into standard conversational text, and then the standard conversational text is classified. Since each control area in the text category mark space corresponds to each preset standard question, and the standard conversation text is the standard question corresponding to the input sentence, when classifying the standard conversation text, each text area in the text category mark space
  • the size of a control area is the same, so that in this embodiment, when classifying standard conversational text, it will not be erroneously divided because of the size of the control area in the text category mark space. Therefore, the method provided by the present application can accurately predict the category corresponding to the input sentence.
  • the customer service robot After the customer service robot obtains the category of the input sentence, it selects the answer sentence matching this category from its own knowledge base, and outputs the voice of the answer sentence through the speaker configured by the customer service robot, or through the configured
  • the LCD screen displays text of the answer sentence, so as to have a conversation with the user.
  • the above-mentioned method for classifying customer service robot conversation text can be used as an offline training stage and an online prediction stage, respectively.
  • the purpose of offline training is to optimize the target parameter matrix described in step 250 to obtain the optimal target parameter matrix.
  • the optimal target parameter matrix obtained in the offline training stage is directly used to classify the input sentences, and the optimal category of the input sentences is directly output.
  • Fig. 4 is a method for classifying conversation text of a customer service robot shown in another exemplary embodiment, which is applicable to the offline training stage. As shown in FIG. 4, after obtaining the category of the standard conversation text, the method may further include the following steps:
  • step 310 the translation deviation of the input sentence into the standard conversational text and the classification deviation of the text classification of the standard conversational text are summed to obtain the input sentence classification deviation.
  • the translation deviation is the error value between the standard conversation text converted from the input sentence and the real standard conversation text of the input sentence
  • the classification deviation is between the category obtained by text classification of the standard conversation text and the real category of the standard conversation text Error value.
  • the input sentence classification deviation is calculated according to the cross-entropy loss function.
  • the definition of the present invention is crossover
  • the entropy loss function includes the sum of these two loss functions.
  • the cross-entropy loss function defined in the present invention is:
  • p (x) represents the probability of translating the input sentence into the standard conversation sample x in text translation. Only when the input sentence is translated into the real standard conversation text, the value of p (x) is 1, in other cases p (x) The value of x) is 0.
  • q (x) represents the probability of text translation of the input sentence.
  • p (i) represents the probability of labeling the standard conversation text as category i in text classification. Only when the standard conversation text is marked as the real text category, the value of p (i) is 1, in other cases p (i) The value is 0.
  • q (i) represents the class probability obtained by text classification of standard conversation text.
  • the value of the input sentence classification deviation H (p, q) is calculated. If the calculated input sentence classification deviation is less than the preset threshold, it means that the target parameter matrix currently used for classifying and predicting the input sentence is not optimal.
  • step 330 the target parameter matrix is updated by minimizing the input sentence classification deviation.
  • the input sentence classification deviation needs to be minimized.
  • a gradient descent algorithm is used to minimize input sentence classification deviation.
  • the specific processing procedure is: performing a derivative operation on the above cross-entropy loss function to obtain the partial derivative of the cross-entropy loss function with respect to the current target parameter matrix.
  • the obtained partial derivatives are also called gradient values.
  • the target parameter matrix currently used and the obtained partial derivative are subtracted to obtain a new parameter matrix, and the target parameter matrix is updated according to the new parameter matrix.
  • the input sentence is still trained for the next text classification according to the methods described in steps 210 to 270, and the target parameter matrix adopted at this time is the updated parameter matrix.
  • the input sentence classification deviation is calculated according to the cross entropy loss function.
  • the obtained input sentence classification deviation is still less than the preset threshold, then repeat the method described in steps 310 and 330 to update the target parameter matrix, and perform the next text classification on the input sentence according to the method described in steps 210 to 270 Training, until the obtained input sentence classification deviation is greater than a preset threshold, it means that the target parameter matrix used for text classification training of the input sentence this time is optimal, and the offline training phase is completed at this time.
  • the target parameters used in this training are directly used for online prediction of input sentences.
  • the present application further provides a customer service robot conversation text classification device, which includes:
  • the input sentence conversion module 410 is used to obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the response of the customer service robot to process the response;
  • the semantic feature extraction module 430 is used to obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
  • the text category prediction module 450 is used to predict category labels on the semantic vector of the standard conversation text to obtain the category label probability vector corresponding to the standard conversation text;
  • the text category acquisition module 470 is used to select the category corresponding to the maximum probability label from the category label probability vector as the category of standard conversation text, which is used to assist in executing the response of the customer service robot to the input text.
  • the input sentence conversion module 410 may include:
  • the sentence coding unit is used to extract the key semantic features of the input sentence by coding the input sentence;
  • the sentence decoding unit is used to decode key semantic features to obtain the standard conversation text corresponding to the input sentence.
  • the sentence encoding unit may include:
  • the word vector acquisition subunit is used to obtain the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
  • the semantic vector acquisition subunit is used to traverse the word vector corresponding to the words in the input sentence in chronological order, and extract the first hidden state vector obtained by the traversal as the semantic vector of the input sentence.
  • the semantic feature extraction module 430 includes:
  • the feature acquisition unit is used to acquire a second hidden state vector obtained by decoding key semantic features, and the second hidden state vector forms a hidden state vector matrix;
  • Feature extraction unit used to extract semantic features of standard conversation text according to the hidden state vector matrix
  • the feature pooling unit is used to obtain the semantic vector corresponding to the standard conversation text by pooling the extracted semantic features.
  • the text category prediction module 450 may further include:
  • the state vector acquisition unit is used to nonlinearly map the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
  • the category label probability vector acquisition unit is used to normalize the probability of the state vector of the standard conversation text in the text category label space to obtain the category label probability vector corresponding to the standard conversation text.
  • the robot conversation text classification apparatus further includes:
  • the input sentence classification deviation acquisition module is used to sum the translation deviation of the input sentence into the standard conversation text and the classification deviation of the text classification of the standard conversation text to obtain the input sentence classification deviation;
  • the parameter update module is used to update the target parameter matrix by minimizing the input sentence classification deviation.
  • the present application further provides an electronic device, the electronic device includes:
  • Processor memory, computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, the customer service robot conversation text classification method shown above is realized.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the customer service robot conversation text classification method as described above.

Abstract

Disclosed are a customer service robot session text classification method and apparatus. The customer service robot session text classification method comprises: acquiring an input statement in a session carried out by a customer service robot, and converting the input statement into a standard session text, wherein the input statement is a session message waiting for the customer service robot to process and respond to same; performing semantic feature extraction on the standard session text to obtain a semantic vector corresponding to the standard session text; performing category label prediction on the semantic vector of the standard session text to obtain a category label probability vector corresponding to the standard session text; and selecting, from the category label probability vector, a category corresponding to a label with the maximum probability to serve as the category of the standard session text, wherein the category is used for assisting the execution of a response of the customer service robot to the input text. By means of the customer service robot session text classification method and apparatus disclosed in the present application, an input statement acquired by a customer service robot can be accurately classified.

Description

客服机器人会话文本分类方法及装置、电子设备、计算机可读存储介质Customer service robot conversation text classification method and device, electronic equipment, and computer-readable storage medium 技术领域Technical field
本申请要求2018年10月12日递交、申请名称为“客服机器人会话文本分类方法及装置、设备、存储介质”的中国专利申请201811191509.3的优先权,在此通过引用将其全部内容合并于此。This application requires the priority of the Chinese patent application 201811191509.3 filed on October 12, 2018, and the application name is "Customer Service Robot Session Text Classification Method and Apparatus, Equipment, and Storage Media", and the entire contents are incorporated herein by reference.
本申请涉及数据处理技术领域,尤其涉及一种客服机器人会话文本分类方法及装置、电子设备、计算机可读存储介质。The present application relates to the field of data processing technology, and in particular to a customer service robot conversation text classification method and device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
在客服机器人的FAQ(常见问题解答)场景中,每个知识点对应一个标准问题,标准问题有多种问法,这些不同的问法称为扩展问题。客服机器人获取扩展问题后,需要使用文本分类模型对扩展问题进行分类,得到扩展问题所对应标准问题的类别,然后根据所得标准问题的类别,从自身知识库中提取与标准问题类别相匹配的回答。因此,是否对扩展问题进行了准确分类,是客服机器人是否能够准确回答客户提问的关键。In the FAQ (Frequently Asked Questions) scenario of customer service robots, each knowledge point corresponds to a standard question. There are multiple questions for standard questions. These different questions are called extended questions. After the customer service robot obtains the extended question, it needs to use the text classification model to classify the extended question to obtain the category of the standard question corresponding to the extended question, and then extract the answer that matches the standard question category from its own knowledge base according to the resulting standard question category . Therefore, whether the expansion problem is accurately classified is the key to whether the customer service robot can accurately answer customer questions.
发明人意识到,文本分类模型对扩展问题进行分类的过程中,将扩展问题映射至向量空间,通过对向量空间的切分判断,获得扩展问题所对应向量属于向量空间中的哪一标准问题类别控制区域,此控制区域所对应的类别即为扩展问题所对应的标准问题类别。有些知识点对应的扩展问题数量比较少,这些扩展问题对应的标准问题类别在向量空间中的控制区域也比较少,导致对这些扩展问题进行文本分类时容易被错分,从而不能准确获得这些扩展问题对应的标准问题类别。The inventor realized that in the process of classifying the expansion problem by the text classification model, the expansion problem is mapped to the vector space, and by dividing the vector space, the standard problem in the vector space to which the vector corresponding to the expansion problem belongs is obtained. Control area, the category corresponding to this control area is the standard problem category corresponding to the extended problem. Some knowledge points correspond to a relatively small number of expansion problems, and the standard problem categories corresponding to these expansion problems also have fewer control areas in the vector space, resulting in easy classification of these expansion problems in text classification, so that these expansions cannot be accurately obtained. The standard question category corresponding to the question.
因此,如何对客服机器人获取的扩展问题进行准确分类是现有技术中有待解决的问题。Therefore, how to accurately classify the extended problems acquired by the customer service robot is a problem to be solved in the prior art.
技术问题technical problem
为了解决上述技术问题,本申请的一个目的在于提供一种客服机器人会话文本分类方法及装置、电子设备、计算机可读存储介质。In order to solve the above technical problems, an object of the present application is to provide a customer service robot conversation text classification method and device, electronic equipment, and computer-readable storage medium.
技术解决方案Technical solution
其中,本申请所采用的技术方案为:Among them, the technical solutions adopted in this application are:
一方面,一种客服机器人会话文本分类方法,包括:获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。On the one hand, a conversation text classification method for a customer service robot includes: acquiring input sentences of a customer service robot in a conversation, converting the input sentences into standard conversation text, and the input sentences are conversations waiting for a response from the customer service robot to process a response Message; obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text; perform category label prediction on the semantic vector of the standard conversation text to obtain the category label probability vector corresponding to the standard conversation text Selecting the category corresponding to the maximum probability label from the category label probability vector as the category of the standard conversation text, the category is used to assist in performing the response of the customer service robot to the input text.
另一方面,一种客服机器人会话文本分类装置,包括:输入语句转换模块,用于获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;语义特征提取模块,用于通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;文本类别预测模块,用于对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;文本类别获取模块,用于从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。On the other hand, a customer service robot conversation text classification device includes: an input sentence conversion module for acquiring an input sentence of a customer service robot in a conversation, converting the input sentence into standard conversation text, and the input sentence is waiting The customer service robot processes the responded conversation message; the semantic feature extraction module is used to obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text; the text category prediction module is used to compare the standard The semantic vector of the conversation text is used to predict the category label, and the probability vector of the category label corresponding to the standard conversation text is obtained; the text category acquisition module is used to select the category corresponding to the maximum probability label from the category label probability vector as the criterion A category of conversation text, which is used to assist in performing the response of the customer service robot to the input text.
另一方面,一种电子设备,包括处理器及存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时实现如上所述的客服机器人会话文本分类方法。On the other hand, an electronic device includes a processor and a memory, and a computer-readable instruction is stored on the memory, and when the computer-readable instruction is executed by the processor, the method for classifying a customer service robot conversation text as described above is implemented .
另一方面,一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的客服机器人会话文本分类方法。On the other hand, a computer-readable storage medium has stored thereon a computer program, and when the computer program is executed by a processor, the customer service robot conversation text classification method as described above is implemented.
在上述技术方案中,客服机器人在所进行会话中的输入语句为客服机器人获取的扩展问题,标准会话文本则为此扩展问题所对应的标准问题。本申请获取客服机器人在所进行会话中的输入语句后,先将输入语句转换为标准会话文本,然后再使对所得的标准会话文本进行文本分类。In the above technical solution, the input sentence of the customer service robot in the ongoing conversation is the extended question acquired by the customer service robot, and the standard conversation text is the standard question corresponding to this extended question. After obtaining the input sentence in the conversation conducted by the customer service robot, the application first converts the input sentence into standard conversation text, and then classifies the resulting standard conversation text.
有益效果Beneficial effect
由于类别不同的标准会话文本数量往往只有一个,文本类别标记空间中不同标准会话文本类别所对应控制区域的大小相同,使得在对标准会话文本进行文本分类时,不会因为文本类别标记空间中的控制区域大小不一致而导致错分,从而能够对客服机器人获取的输入语句进行准确分类。Since the number of standard conversation texts with different categories is often only one, the size of the corresponding control area of the different standard conversation text categories in the text category marking space is the same, so that when text classification is performed on the standard conversation texts, there is no reason for the The inconsistent size of the control area leads to misclassification, so that the input sentences obtained by the customer service robot can be accurately classified.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present application.
附图说明BRIEF DESCRIPTION
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并于说明书一起用于解释本申请的原理。The drawings here are incorporated into the specification and constitute a part of the specification, show embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
图1是根据一示例性实施例示出的一种客服机器人的硬件框图。Fig. 1 is a hardware block diagram of a customer service robot according to an exemplary embodiment.
图2是根据一示例性实施例示出一种客服机器人会话文本分类方法的流程图。Fig. 2 is a flowchart illustrating a method for classifying customer service robot conversation text according to an exemplary embodiment.
图3是根据一示例性实施例示出的一种对输入语句进行编码和解码过程的示意图。Fig. 3 is a schematic diagram illustrating a process of encoding and decoding an input sentence according to an exemplary embodiment.
图4是根据另一示例性实施例示出的一种客服机器人会话文本分类方法的流程图。Fig. 4 is a flow chart showing a method for classifying customer service robot conversation text according to another exemplary embodiment.
图5是根据一示例性实施例示出一种客服机器人会话文本分类装置的框图。Fig. 5 is a block diagram showing a customer service robot conversation text classification device according to an exemplary embodiment.
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述,这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。Through the above drawings, clear embodiments of the present application have been shown, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but by referring to specific embodiments The concept of the present application will be explained to those skilled in the art.
本发明的实施方式Embodiments of the invention
这里将详细地对示例性实施例执行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。The exemplary embodiments will be explained in detail here, examples of which are shown in the drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
图1是根据一示例性实施例示出的一种客服机器人的硬件框图。需要说明的是,该客服机器人只是一个适配于本公开的示例,不能认为是提供了对本公开使用范围的任何限制。Fig. 1 is a hardware block diagram of a customer service robot according to an exemplary embodiment. It should be noted that the customer service robot is only an example adapted to the present disclosure, and cannot be considered as providing any limitation on the scope of use of the present disclosure.
如图1所示,客服机器人可以包括以下一个或者多个组件:处理组件101,存储器102,电源组件103,多媒体组件104,音频组件105,传感器组件107以及通信组件108。其中,上述组件并不全是必须的,客服机器人可以根据自身功能需求增加其他组件或减少某些组件,本实施例不作限定。As shown in FIG. 1, the customer service robot may include one or more of the following components: a processing component 101, a memory 102, a power component 103, a multimedia component 104, an audio component 105, a sensor component 107, and a communication component 108. Among them, the above components are not all necessary. The customer service robot may add other components or reduce some components according to its own functional requirements, which is not limited in this embodiment.
处理组件101通常控制客服机器人的整体操作,诸如与显示,数据通信,相机操作以及日志数据处理相关联的操作等。处理组件101可以包括一个或多个处理器109来执行指令,以完成上述操作的全部或部分步骤。此外,处理组件101可以包括一个或多个模块,便于处理组件101和其他组件之间的交互。例如,处理组件101可以包括多媒体模块,以方便多媒体组件104和处理组件101之间的交互。The processing component 101 generally controls the overall operations of the customer service robot, such as operations associated with display, data communication, camera operations, and log data processing. The processing component 101 may include one or more processors 109 to execute instructions to complete all or part of the steps of the above operations. In addition, the processing component 101 may include one or more modules to facilitate interaction between the processing component 101 and other components. For example, the processing component 101 may include a multimedia module to facilitate interaction between the multimedia component 104 and the processing component 101.
存储器102被配置为存储各种类型的数据以支持在客服机器人的操作。这些数据的示例包括用于在客服机器人上操作的任何应用程序或方法的指令。存储器102可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如SRAM(静态随机存取存储器),EEPROM(电可擦除可编程只读存储器),ROM(只读存储器),磁盘或光盘。存储器102中还存储有一个或多个模块,该一个或多个模块被配置成由该一个或多个处理器109执行,以完成以下任一所示客服机器人会话文本分类方法中的全部或者部分步骤。The memory 102 is configured to store various types of data to support the operation of the customer service robot. Examples of these data include instructions for any application or method to operate on the customer service robot. The memory 102 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as SRAM (Static Random Access Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), ROM (Read Only Memory), disk or CD. One or more modules are also stored in the memory 102, and the one or more modules are configured to be executed by the one or more processors 109 to complete all or part of any of the following customer service robot conversation text classification methods step.
电源组件103为客服机器人的各种组件提供电力。电源组件103可以包括电源管理系统,一个或多个电源,及其他与为客服机器人生成、管理和分配电力相关联的组件。The power supply component 103 provides power for various components of the customer service robot. The power supply component 103 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the customer service robot.
多媒体组件104包括在所述客服机器人和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括LCD(液晶显示器)和TP(触摸面板)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。The multimedia component 104 includes a screen that provides an output interface between the customer service robot and the user. In some embodiments, the screen may include an LCD (liquid crystal display) and a TP (touch panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding action, but also detect the duration and pressure related to the touch or sliding operation.
音频组件105被配置为输出和/或输入音频信号。例如,音频组件105包括一个麦克风,当客服机器人处于操作模式,如记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器102或经由通信组件108发送。音频组件105还包括一个扬声器,用于输出音频信号,以实现客服机器人与客户之间进行会话操作。The audio component 105 is configured to output and / or input audio signals. For example, the audio component 105 includes a microphone. When the customer service robot is in an operation mode, such as a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in the memory 102 or transmitted via the communication component 108. The audio component 105 further includes a speaker for outputting audio signals to implement conversation operations between the customer service robot and the customer.
传感器组件107包括一个或多个传感器,用于为计算机设备提供各个方面的状态评估。例如,传感器组件107还可以检测客服机器人或客服机器人一个组件的坐标改变以及客服机器人的温度变化。在一些实施例中,该传感器组件107还可以包括磁传感器,压力传感器或温度传感器。The sensor assembly 107 includes one or more sensors for providing computer equipment with various aspects of status assessment. For example, the sensor component 107 can also detect changes in the coordinates of the customer service robot or a component of the customer service robot and temperature changes in the customer service robot. In some embodiments, the sensor assembly 107 may also include a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件108被配置为便于客服机器人和其他设备之间有线或无线方式的通信。客服机器人可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。The communication component 108 is configured to facilitate wired or wireless communication between the customer service robot and other devices. Customer service robots can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof.
在示例性实施例中,客服机器人可以被一个或多个ASIC(应用专用集成电路)、DSP(数字信号处理器)、PLD(可编程逻辑器件)、FPGA(现场可编程门阵列)、控制器、微控制器、微处理器或其他电子元件实现,用于执行以下所示客服机器人会话文本分类方法。In an exemplary embodiment, the customer service robot may be controlled by one or more ASICs (application specific integrated circuits), DSPs (digital signal processors), PLDs (programmable logic devices), FPGAs (field programmable gate arrays), and controllers , Microcontroller, microprocessor or other electronic components to implement the text classification method of customer service robot conversation shown below.
在本实施例中,客服机器人是用于自动执行对话工作的机器装置,具体可以是一种智能手机、平板电脑、笔记本电脑等终端设备,或者是其他具备特定外形和功能的机器设备,本处不进行。In this embodiment, the customer service robot is a machine device for automatically performing dialogue work, and may specifically be a terminal device such as a smart phone, tablet computer, notebook computer, or other machine equipment with a specific shape and function. Not going.
图2是根据一示例性实施例示出的一种客服机器人会话文本分类方法的流程图,该方法适用于图1所示的客服机器人。如图2所示,该方法可以包括以下步骤:Fig. 2 is a flow chart of a method for classifying conversation text of a customer service robot according to an exemplary embodiment. The method is applicable to the customer service robot shown in Fig. 1. As shown in Figure 2, the method may include the following steps:
在步骤210中,获取客服机器人在所进行会话中的输入语句,转换输入语句为标准会话文本。In step 210, the input sentence of the customer service robot in the ongoing conversation is obtained, and the input sentence is converted into standard conversation text.
其中,客服机器人在进行会话中的输入语句是等待客服机器人处理响应的会话消息,便于理解的,输入语句为客服机器人与客户所进行会话过程中客户向客服机器人输入的扩展问题。例如,客户向客服机器人输入“你好,我想请问一下车主卡的年费是怎样的”、“请问我申请的车主卡要收年费么”、“我问下,我这张车主卡的免年费要求是什么”等输入语句,这些输入语句均为标准问题“车主卡年费”所对应的扩展问题。Among them, the input sentence of the customer service robot in the conversation is a conversation message waiting for the response of the customer service robot to process the response, which is easy to understand. The input sentence is an expansion problem that the customer inputs to the customer service robot during the conversation between the customer service robot and the customer. For example, the customer enters "Hello, I would like to ask what is the annual fee of the owner card", "Will I apply for an annual fee for the owner card", "I ask, my owner card "What is the annual fee-free requirement" and other input sentences, and these input sentences are all extended questions corresponding to the standard question "Car Owner's Card Annual Fee".
输入语句可以是客服机器人通过识别客户输入的语音信号获得。例如,客服机器人通过所自身配置的麦克风获取客户输入的提问语音,并对获取的提问语音进行语音识别获得输入语句。The input sentence may be obtained by the customer service robot by recognizing the voice signal input by the customer. For example, the customer service robot obtains the question voice input by the customer through the microphone configured by itself, and performs speech recognition on the obtained question voice to obtain the input sentence.
输入语句还可以通过客服机器人所配置的触摸屏获取。例如,客户通过在客服机器人所配置的触摸屏上输入想要提问的问题,此时,客服机器人直接获取触摸屏上输入的文本信息为输入语句。The input sentence can also be obtained through the touch screen configured by the customer service robot. For example, the customer enters the question he wants to ask on the touch screen configured by the customer service robot. At this time, the customer service robot directly obtains the text information entered on the touch screen as an input sentence.
获取输入语句后,将输入语句转换成输入语句所对应的标准会话文本。其中,标准会话文本为扩展问题所对应的标准问题,如上述的“车主卡年费”。After the input sentence is obtained, the input sentence is converted into standard conversation text corresponding to the input sentence. Among them, the standard conversation text is the standard question corresponding to the extension question, such as the above-mentioned "Car Owner's Card Annual Fee".
在一实施例中,可通过文本翻译的方式将输入语句转换成输入语句所对应的标准会话文本,可以包括如下步骤:In an embodiment, the input sentence can be converted into standard conversation text corresponding to the input sentence through text translation, which may include the following steps:
通过对输入语句进行编码,提取得到输入语句的关键语义特征;By encoding the input sentence, the key semantic features of the input sentence are extracted;
对关键语义特征进行解码,获得输入语句对应的标准会话文本。Decode the key semantic features to obtain the standard conversation text corresponding to the input sentence.
其中,对输入语句进行编码是采用神经网络模型所进行的,以自动分析输入语句的关键语义特征。关键语义特征是用于表达输入语句语义的重要特征,与输入语句语义的关联程度较高,可以包括输入语句的结构特征和关键词。Among them, the coding of the input sentence is carried out using a neural network model to automatically analyze the key semantic features of the input sentence. The key semantic feature is an important feature used to express the semantics of the input sentence. It is highly related to the semantics of the input sentence and can include the structural features and keywords of the input sentence.
本实施例可采用LSTM(Long Short-Term Memory,长短期神经网络)模型对输入语句进行编码,具体过程为:将输入语句的每一词向量顺序输入LSTM模型中,按照时间先后顺序对输入的词向量进行遍历,获取通过遍历得到隐状态向量,该隐状态向量则为输入语句对应的语义向量。In this embodiment, an LSTM (Long Short-Term Memory, Long Short-Term Neural Network) model can be used to encode input sentences. The specific process is as follows: input each word vector of the input sentence into the LSTM model in sequence, and input The word vector is traversed to obtain a hidden state vector obtained through traversal, and the hidden state vector is a semantic vector corresponding to the input sentence.
输入语句的词向量是通过对输入语句中的词语向量化所获得的。首先,对输入语句进行分词处理,将输入文本分割成若干个顺序排列的词语序列。例如,输入文本为“请问我申请的车主卡要收年费么”,进行分词处理可得到词组为“请问^我^申请^的^车主卡^要^收^年费^么”。对输入语句进行分词处理可以是通过采用分词算法进行的,例如基于字符串匹配的分词方法、基于理解的分词方法或基于统计的分词方法等。The word vector of the input sentence is obtained by vectorizing the words in the input sentence. First, perform word segmentation on the input sentence to divide the input text into several word sequences arranged in sequence. For example, if the input text is "Do I have to pay an annual fee for the owner card I apply for", the word segmentation process will result in the phrase "Please ^ Me ^ Apply ^ 's ^ Owner Card ^ Want ^ Receive ^ Annual fee ^" The word segmentation processing of the input sentence may be performed by using a word segmentation algorithm, such as a word segmentation method based on string matching, a word segmentation method based on understanding, or a word segmentation method based on statistics.
然后,将词语序列中的每一词语映射低维向量,获得每一词语对应的词向量。具体可采用one-hot(独热码)向量编码方式或者word2vec(word embeddings,词向量)向量编码方式进行,或者也可以采用其他方式,本处不进行限定。Then, each word in the word sequence is mapped to a low-dimensional vector to obtain a word vector corresponding to each word. Specifically, one-hot (one-hot code) vector coding or word2vec (word embeddings (word vector) vector coding method, or other methods can also be used, not limited here.
需要说明的是,由于采用one-hot向量编码方式所得的向量没有存储输入语句中各词语之间的关联性,还需对每一词语所得的one-hot向量加上权重信息。每一词语所加的权重大小与该词语对输入语句语义的关联程度有关,例如在上述输入语句“请问我申请的车主卡要收年费么”中,“车主卡”、“年费”这2个词语对输入语句的语义关联性较大,其所对应的权重应当较高,而“请问”、“我”等词语明显与输入语句的语义关联性不高,其所对应的权重也较低。It should be noted that, since the vector obtained by the one-hot vector coding method does not store the correlation between the words in the input sentence, it is necessary to add weight information to the one-hot vector obtained by each word. The weight of each word is related to the degree of semantic relevance of the word to the input sentence. For example, in the above input sentence "Do I need to charge an annual fee for the owner card I apply for", the "owner card" and "annual fee" The two words have a greater semantic relevance to the input sentence, and the corresponding weights should be higher, while the words "I ask" and "I" are obviously not highly semantically related to the input sentence, and the corresponding weights are also higher. low.
通过word2vec向量编码方式获得的每一词向量也与输入语句的语义相关联,通过word2vec方式获得的每一词向量仍能够反映每一词语对输入语句语义的关联程度。Each word vector obtained through the word2vec vector coding method is also associated with the semantics of the input sentence, and each word vector obtained through the word2vec method can still reflect the degree of relevance of each word to the input sentence semantics.
将输入语句的每一词向量顺序输入LSTM模型中,按照时间先后顺序对输入的词向量进行遍历的具体过程如图3所示。将词向量X1、X2、X3按照时间顺序依次输入LSTM模型中,并更新不同时刻的隐藏层状态,每一时刻隐藏层状态的更新依赖于上一时刻更新的隐藏层状态,将更新至EOS(end of sentence,句尾)所输出的第一隐状态向量L作为输入语句的语义向量。Each word vector of the input sentence is input into the LSTM model in sequence, and the specific process of traversing the input word vector in chronological order is shown in FIG. 3. The word vectors X1, X2, X3 are sequentially input into the LSTM model in chronological order, and the state of the hidden layer at different times is updated. The update of the state of the hidden layer at each time depends on the state of the hidden layer updated at the previous time, and will be updated to EOS end of sentence, the first hidden state vector L as the semantic vector of the input sentence.
通过对输入语句中每一词向量在LSTM模型中进行遍历,输出的第一隐状态向量L能够建立每一词语结合输入语句全局的语义表达,使得获取的语义向量充分关联了输入语句的关键语义特征。另外,对输入语句中的每一词向量进行遍历还可以采用Bi-LSTM(Bi-Long Short-Term Memory,双向长短期神经网络)模型,本处并不对此进行限定。By traversing each word vector in the input sentence in the LSTM model, the output first hidden state vector L can establish the global semantic expression of each word combined with the input sentence, so that the obtained semantic vector fully correlates with the key semantics of the input sentence feature. In addition, Bi-LSTM (Bi-Long Short-Term Memory, bidirectional long-term neural network) model can also be used to traverse each word vector in the input sentence, which is not limited here.
相对应的,对输入语句的关键特征进行解码采用另一LSTM模型或者Bi-LSTM模型进行,下文以LSTM模型为例进行说明。Correspondingly, the key features of the input sentence are decoded using another LSTM model or Bi-LSTM model. The LSTM model is used as an example for description below.
具体解码过程仍如图3所示,将编码所得输入语句的语义向量L作为初始值输入LSTM模型中,计算此时刻输出词语的概率分布,获得可能输出的词语概率,然后依据可能输出的词语概率进行采样获得该时刻最终输出的词语O,并更新隐藏层状态。接下来,将该时刻最终输出的词语向量O作为下一时刻的输入,并将更新的隐藏层状态传入下一时刻,计算下一时刻输出的词语P。如此循环,直至输出句尾表示解码完成。The specific decoding process is still shown in Figure 3. The semantic vector L of the encoded input sentence is used as the initial value in the LSTM model, the probability distribution of the output words at this time is calculated, the probability of the possible output words is obtained, and then the probability of the output word Sampling is performed to obtain the final word O output at this moment, and the state of the hidden layer is updated. Next, the word vector O finally output at this time is used as the input at the next time, and the updated hidden layer state is passed to the next time to calculate the word P output at the next time. This cycle until the end of the output sentence indicates that the decoding is complete.
将解码输出的词语按照时间先后顺序排列所得的词语序列即为对输入语句进行文本翻译所得的标准会话文本。The word sequence obtained by arranging the words output by decoding in chronological order is the standard conversation text obtained by text translation of the input sentence.
需要说明的是,对输入语句所进行的文本翻译可以是由客服机器人所配置的处理器执行的,也可以由与客服机器人预先建立有线或者无线网络连接的服务器执行,本实施例并不对比进行限定。It should be noted that the text translation of the input sentence may be performed by the processor configured by the customer service robot, or may be performed by a server that has established a wired or wireless network connection with the customer service robot in advance. limited.
在步骤230中,通过对标准会话文本进行语义特征提取获得标准会话文本对应的语义向量。In step 230, a semantic vector corresponding to the standard conversation text is obtained by performing semantic feature extraction on the standard conversation text.
其中,为了实现对客服机器人与客户之间的会话,将输入语句转换为标准会话文本后,还需对标准会话文本进行文本分类,以使客服机器人根据标准会话文本对应的类别执行对输入语句的响应。Among them, in order to realize the conversation between the customer service robot and the customer, after the input sentence is converted into standard conversation text, it is also necessary to classify the standard conversation text so that the customer service robot executes the input sentence according to the category corresponding to the standard conversation text response.
为了获得标准会话文本的类别,在一实施例中,采用卷积神经网络(CNN)模型对标准会话文本进行语义特征提取,获得标准会话文本对应的语义向量,可以包括如下步骤:In order to obtain the category of the standard conversation text, in one embodiment, a convolutional neural network (CNN) model is used to extract the semantic features of the standard conversation text to obtain the semantic vector corresponding to the standard conversation text.
获取关键语义特征解码所得的第二隐状态向量,由第二隐状态向量构成隐状态向量矩阵;Obtain the second hidden state vector obtained by decoding the key semantic features, and form the hidden state vector matrix from the second hidden state vector;
根据隐状态向量矩阵对标准会话文本进行语义特征提取;Semantic feature extraction of standard conversation text based on hidden state vector matrix;
通过对所提取语义特征的池化获得标准会话文本对应的语义向量。The semantic vector corresponding to the standard conversation text is obtained by pooling the extracted semantic features.
其中,关键语义特征解码所得的第二隐状态向量为每一输出词语所对应的隐藏层状态向量。将解码所得的若干第二隐状态向量依次排列组成维数为sequence_length (状态序列长度)× hidden_size (隐状态向量数量)的向量矩阵即可获得隐状态向量矩阵。状态序列长度为第二隐状态向量中所含元素的数量,所得的隐状态向量矩阵作为卷积神经网络的输入层。The second hidden state vector obtained by decoding the key semantic features is the hidden layer state vector corresponding to each output word. Several second hidden state vectors obtained by decoding are arranged in sequence to form a vector matrix with dimension dimension length_state (length of state sequence) × hidden_size (number of hidden state vectors) to obtain a hidden state vector matrix. The state sequence length is the number of elements contained in the second hidden state vector, and the resulting hidden state vector matrix is used as the input layer of the convolutional neural network.
获得隐状态向量矩阵后,通过卷积神经网络的卷积层对隐状态向量矩阵进行卷积,以对输入层进行卷积操作得到若干个Feature Map(特征标签)。卷积窗口的大小为隐状态向量矩阵中状态序列长度×隐状态向量数量。After obtaining the hidden state vector matrix, the convolutional layer of the convolutional neural network convolves the hidden state vector matrix to convolve the input layer to obtain several features Map (feature label). The size of the convolution window is the length of the state sequence in the hidden state vector matrix × the number of hidden state vectors.
使用卷积神经网络的卷积层对隐状态向量矩阵进行卷积处理后,获得若干个列数为1的特征标签,这些特征标签用于表示标准会话文本的语义特征。After the convolutional layer of the convolutional neural network is used to convolve the hidden state vector matrix, a number of feature labels with a column number of 1 are obtained. These feature labels are used to represent the semantic features of standard conversational text.
对所提取语义特征的池化是通过卷积神经网络模型的池化层进行的。池化层通过从卷积层获取的每一特征标签中提取出最大值所对应的特征向量,并通过对组合这些提取的特征向量获得标准会话文本对应的语义向量。The pooling of the extracted semantic features is performed by the pooling layer of the convolutional neural network model. The pooling layer extracts the feature vector corresponding to the maximum value from each feature label obtained by the convolutional layer, and obtains the semantic vector corresponding to the standard conversation text by combining these extracted feature vectors.
在步骤250中,对标准会话文本的语义向量进行类别标签预测,获得标准会话文本对应的类别标签概率向量。In step 250, class label prediction is performed on the semantic vector of the standard conversation text to obtain the class label probability vector corresponding to the standard conversation text.
其中,对标准会话文本的语义向量进行类别标签预测,是根据标准会话文本的语义向量预测该标准会话文本满足文本类别标记空间中每一控制区域的概率。文本类别标记空间为预置的样本空间,文本类别标记空间中的控制区域相应为预置的若干标准问题类别。预测所得类别标签概率向量中的每一元素为标准会话文本分别满足文本类别标记空间中每一控制区域的概率。Among them, the category label prediction of the semantic vector of the standard conversation text is to predict the probability that the standard conversation text satisfies each control region in the text category label space according to the semantic vector of the standard conversation text. The text category mark space is a preset sample space, and the control areas in the text category mark space correspond to preset standard question categories. Each element in the predicted category label probability vector is the probability that the standard conversation text satisfies each control region in the text category label space.
在一实施例中,对标准会话文本的语义向量进行类别标签预测具体可以包括以下步骤:In an embodiment, the category label prediction on the semantic vector of the standard conversation text may specifically include the following steps:
通过目标参数矩阵对标准会话文本的语义向量进行非线性映射,获得标准会话文本在文本类别标记空间中的状态向量;Through the target parameter matrix, the semantic vector of the standard conversation text is nonlinearly mapped to obtain the state vector of the standard conversation text in the text category label space;
对标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到标准会话文本对应的类别标签概率向量。Probability normalization is performed on the state vector of the standard conversation text in the text category label space to obtain the category label probability vector corresponding to the standard conversation text.
其中,通过目标参数矩阵对标准会话文本的语义向量进行非线性映射,是用于将标准会话文本的语义向量映射至文本类别标记空间,从而将标准会话文本与样本空间建立关联。目标参数矩阵则为将标准会话文本的语义向量映射至文本类别标记空间的非线性映射条件,因此,目标参数矩阵中的参数值将会直接影响对标准会话文本的语义向量进行类别标签预测的准确程度。Among them, the non-linear mapping of the semantic vector of the standard conversation text through the target parameter matrix is used to map the semantic vector of the standard conversation text to the text category label space, so as to associate the standard conversation text with the sample space. The target parameter matrix is a non-linear mapping condition that maps the semantic vector of the standard conversation text to the text category label space. Therefore, the parameter values in the target parameter matrix will directly affect the accuracy of class label prediction of the semantic vector of the standard conversation text. degree.
将标准会话文本的语义向量映射至样本标记空间具体为,对语义向量与目标参数矩阵进行加权和运算,用公式可表达为:z=Wx,其中“W”表示目标参数矩阵,“x”表示标准会话文本的语义向量,“z”则相应表示该标准会话文本在文本类别标记空间中的状态向量。The mapping of the semantic vectors of standard conversational texts to the sample mark space is specifically to perform a weighted sum operation on the semantic vectors and the target parameter matrix, which can be expressed as: z = Wx, where "W" indicates the target parameter matrix and "x" indicates The semantic vector of standard conversational text, "z" correspondingly represents the state vector of the standard conversational text in the space of text category mark.
在一实施例中,对标准会话文本在文本类别标记空间的状态向量进行概率归一化是通过Softmax多分类预测函数进行的。Softmax多分类预测函数的定义如下:In an embodiment, the probability normalization of the state vector of the standard conversation text in the text category label space is performed by the Softmax multi-class prediction function. The definition of Softmax multi-class prediction function is as follows:
Figure 770253dest_path_image001
Figure 770253dest_path_image001
其中,“k”表示文本类别标记空间中所分文本类别的数量。通过Softmax多分类预测函数将标准会话文本在文本类别标记空间中的状态向量映射成由(0,1)之间的概率值序列组合形成的概率向量,以获得标准会话文本所对应的类别标签概率向量。Among them, "k" represents the number of divided text categories in the text category label space. The softmax multi-class prediction function maps the state vector of standard conversation text in the text category label space to a probability vector formed by the combination of probability value sequences between (0,1) to obtain the category label probability corresponding to the standard conversation text vector.
在步骤270中,从所述类别标签概率向量中选取最大概率标签所对应的类别作为标准会话文本的类别。In step 270, the category corresponding to the maximum probability label is selected from the category label probability vector as the category of standard conversation text.
其中,如前所述,类别标签概率向量中每一元素为该标准会话文本分别满足文本类别标记空间中每一控制区域的概率,概率最大控制区域所标记的类别最接近标准会话文本的真实类别。Among them, as mentioned above, each element in the category label probability vector is the probability that the standard conversation text satisfies each control region in the text category label space, and the category marked by the most probable control region is closest to the true category of the standard conversation text .
因此,从类别标签概率向量中选取最大概率标签所对应的类别作为标准会话文本的类别,能够最大可能地接近标准会话文本的真实类别,从而对标准会话文本的类型进行准确预测。Therefore, selecting the category corresponding to the maximum probability label from the category label probability vector as the category of the standard conversation text can be as close as possible to the true category of the standard conversation text, thereby accurately predicting the type of the standard conversation text.
应当说明的是,与上述将输入语句转换为标准会话文本相同,本实施例对标准会话文本进行文本分类的过程可以是由客服机器人所配置的处理器执行的,也可以由与客服机器人预先建立有线或者无线网络连接的服务器执行。It should be noted that the process of classifying the standard conversation text in this embodiment may be performed by the processor configured by the customer service robot, or may be pre-established with the customer service robot Executed by a server connected to a wired or wireless network.
在本实施例中,先将输入语句转换为标准会话文本,然后再对标准会话文本进行文本分类。由于文本类别标记空间中每一控制区域对应为预置的每一标准问题,并且标准会话文本为输入语句所对应的标准问题,在对标准会话文本进行文本分类时,该文本类别标记空间中每一控制区域的大小是相同的,使得本实施例在对标准会话文本进行文本分类时,不会因为文本类别标记空间中控制区域大小不同而被错分。因此,本申请所提供的方法能够对输入语句对应的类别进行准确预测。In this embodiment, the input sentence is first converted into standard conversational text, and then the standard conversational text is classified. Since each control area in the text category mark space corresponds to each preset standard question, and the standard conversation text is the standard question corresponding to the input sentence, when classifying the standard conversation text, each text area in the text category mark space The size of a control area is the same, so that in this embodiment, when classifying standard conversational text, it will not be erroneously divided because of the size of the control area in the text category mark space. Therefore, the method provided by the present application can accurately predict the category corresponding to the input sentence.
在一种应用场景中,客服机器人获取输入语句的类别后,从自身知识库中选取与此类别相匹配的回答语句,并通过客服机器人所配置的扬声器输出该回答语句的语音,或者通过所配置的LCD屏幕对回答语句进行文本显示,从而与用户进行会话。In an application scenario, after the customer service robot obtains the category of the input sentence, it selects the answer sentence matching this category from its own knowledge base, and outputs the voice of the answer sentence through the speaker configured by the customer service robot, or through the configured The LCD screen displays text of the answer sentence, so as to have a conversation with the user.
上述本发明提供客服机器人会话文本分类方法可分别用作离线训练阶段和在线预测阶段。其中,离线训练的目的在于优化步骤250中所描述的目标参数矩阵,以获得最优的目标参数矩阵。在线预测阶段则直接使用离线训练阶段获得的最优目标参数矩阵对输入语句进行文本分类,直接输出输入语句的最优类别。The above-mentioned method for classifying customer service robot conversation text can be used as an offline training stage and an online prediction stage, respectively. The purpose of offline training is to optimize the target parameter matrix described in step 250 to obtain the optimal target parameter matrix. In the online prediction stage, the optimal target parameter matrix obtained in the offline training stage is directly used to classify the input sentences, and the optimal category of the input sentences is directly output.
图4是另一示例性实施例示出的一种客服机器人会话文本分类方法,该方法适用于离线训练阶段。如图4所示,该方法在获取标准会话文本的类别后,还可以包括以下步骤:Fig. 4 is a method for classifying conversation text of a customer service robot shown in another exemplary embodiment, which is applicable to the offline training stage. As shown in FIG. 4, after obtaining the category of the standard conversation text, the method may further include the following steps:
在步骤310中,对进行输入语句转换成所述标准会话文本的翻译偏差和对标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差。In step 310, the translation deviation of the input sentence into the standard conversational text and the classification deviation of the text classification of the standard conversational text are summed to obtain the input sentence classification deviation.
其中,翻译偏差是对输入语句转换成的标准会话文本与输入语句的真实标准会话文本之间的误差值,分类偏差是对标准会话文本进行文本分类所得的类别与标准会话文本的真实类别之间的误差值。Among them, the translation deviation is the error value between the standard conversation text converted from the input sentence and the real standard conversation text of the input sentence, and the classification deviation is between the category obtained by text classification of the standard conversation text and the real category of the standard conversation text Error value.
在一实施例中,输入语句分类偏差是根据交叉熵损失函数计算得出的。在对输入语句进行文本分类的过程中,由于对输入语句进行文本翻译的准确性和对标准会话文本进行文本分类的准确性均能影响对输入语句进行文本分类的准确度,本发明定义的交叉熵损失函数包括此两部分损失函数的和。In one embodiment, the input sentence classification deviation is calculated according to the cross-entropy loss function. In the process of text classification of input sentences, since the accuracy of text translation of input sentences and the accuracy of text classification of standard conversation texts can both affect the accuracy of text classification of input sentences, the definition of the present invention is crossover The entropy loss function includes the sum of these two loss functions.
本发明定义的交叉熵损失函数为:The cross-entropy loss function defined in the present invention is:
Figure 607540dest_path_image002
Figure 607540dest_path_image002
其中,p(x)表示文本翻译中,将输入语句翻译为标准会话样本x的概率,只有当输入语句被翻译为真实的标准会话文本时p(x)的值为1,其余情况下p(x)的值为0。q(x)表示对输入语句进行文本翻译所得的概率。p(i)表示文本分类中,将标准会话文本标注为类别i的概率,只有当标准会话文本被标注为真实的文本类别时p(i)的值为1,其余情况下p(i)的值为0。q(i)表示对标准会话文本进行文本分类所得的类别概率。Among them, p (x) represents the probability of translating the input sentence into the standard conversation sample x in text translation. Only when the input sentence is translated into the real standard conversation text, the value of p (x) is 1, in other cases p (x) The value of x) is 0. q (x) represents the probability of text translation of the input sentence. p (i) represents the probability of labeling the standard conversation text as category i in text classification. Only when the standard conversation text is marked as the real text category, the value of p (i) is 1, in other cases p (i) The value is 0. q (i) represents the class probability obtained by text classification of standard conversation text.
根据上述交叉熵损失函数,计算输入语句分类偏差H(p,q)的值。若计算的输入语句分类偏差小于预设阈值,则表示当前对输入语句进行分类预测所使用的目标参数矩阵不是最优的。According to the above cross-entropy loss function, the value of the input sentence classification deviation H (p, q) is calculated. If the calculated input sentence classification deviation is less than the preset threshold, it means that the target parameter matrix currently used for classifying and predicting the input sentence is not optimal.
在步骤330中,通过最小化输入语句分类偏差对目标参数矩阵进行更新。In step 330, the target parameter matrix is updated by minimizing the input sentence classification deviation.
其中,如果所得的输入语句分类偏差小于预设阈值,需对输入语句分类偏差进行最小化处理。Among them, if the resulting input sentence classification deviation is less than a preset threshold, the input sentence classification deviation needs to be minimized.
在一实施例中,采用梯度下降算法对输入语句分类偏差进行最小化。具体处理过程为:对上述交叉熵损失函数进行求导运算,获得该交叉熵损失函数相对当前目标参数矩阵的偏导数。得到的偏导数也称为梯度值。然后将当前采用的目标参数矩阵与求得的偏导数进行减法运算,获得新的参数矩阵,并根据新的参数矩阵目标参数矩阵进行更新。In one embodiment, a gradient descent algorithm is used to minimize input sentence classification deviation. The specific processing procedure is: performing a derivative operation on the above cross-entropy loss function to obtain the partial derivative of the cross-entropy loss function with respect to the current target parameter matrix. The obtained partial derivatives are also called gradient values. Then, the target parameter matrix currently used and the obtained partial derivative are subtracted to obtain a new parameter matrix, and the target parameter matrix is updated according to the new parameter matrix.
获取更新的参数矩阵后,仍按照步骤210至步骤270所描述的方法对输入语句进行下一次文本分类训练,此时所采用的目标参数矩阵为更新的参数矩阵。获得输入语句对应的类别后,根据上述交叉熵损失函数计算输入语句分类偏差。After obtaining the updated parameter matrix, the input sentence is still trained for the next text classification according to the methods described in steps 210 to 270, and the target parameter matrix adopted at this time is the updated parameter matrix. After the category corresponding to the input sentence is obtained, the input sentence classification deviation is calculated according to the cross entropy loss function.
若获得的输入语句分类偏差仍小于预设阈值,则重复步骤310和步骤330所描述的方法对目标参数矩阵进行更新,并按照步骤210至步骤270所描述的方法对输入语句进行下一次文本分类训练,直至获得的输入语句分类偏差大于预设阈值,则表示此次对输入语句进行文本分类训练使用的目标参数矩阵最优,此时离线训练阶段完成。在线预测阶段则直接使用此次训练所使用的目标参数进行输入语句的在线预测。If the obtained input sentence classification deviation is still less than the preset threshold, then repeat the method described in steps 310 and 330 to update the target parameter matrix, and perform the next text classification on the input sentence according to the method described in steps 210 to 270 Training, until the obtained input sentence classification deviation is greater than a preset threshold, it means that the target parameter matrix used for text classification training of the input sentence this time is optimal, and the offline training phase is completed at this time. In the online prediction phase, the target parameters used in this training are directly used for online prediction of input sentences.
如图5所示,在一示例性实施例中,本申请还提供一种客服机器人会话文本分类装置,该装置包括:As shown in FIG. 5, in an exemplary embodiment, the present application further provides a customer service robot conversation text classification device, which includes:
输入语句转换模块410,用于获取客服机器人在所进行会话中的输入语句,转换输入语句为标准会话文本,输入语句是等待客服机器人处理响应的会话消息;The input sentence conversion module 410 is used to obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the response of the customer service robot to process the response;
语义特征提取模块430,用于通过对标准会话文本进行语义特征提取获得标准会话文本对应的语义向量;The semantic feature extraction module 430 is used to obtain the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
文本类别预测模块450,用于对标准会话文本的语义向量进行类别标签预测,获得标准会话文本对应的类别标签概率向量;The text category prediction module 450 is used to predict category labels on the semantic vector of the standard conversation text to obtain the category label probability vector corresponding to the standard conversation text;
文本类别获取模块470,用于从类别标签概率向量中选取最大概率标签所对应的类别作为标准会话文本的类别,该类别用于辅助执行所述客服机器人对所述输入文本的响应。The text category acquisition module 470 is used to select the category corresponding to the maximum probability label from the category label probability vector as the category of standard conversation text, which is used to assist in executing the response of the customer service robot to the input text.
在另一示例性实施例中,输入语句转换模块410可以包括:In another exemplary embodiment, the input sentence conversion module 410 may include:
语句编码单元,用于通过对输入语句进行编码,提取得到输入语句的关键语义特征;The sentence coding unit is used to extract the key semantic features of the input sentence by coding the input sentence;
语句解码单元,用于对关键语义特征进行解码,获得输入语句对应的标准会话文本。The sentence decoding unit is used to decode key semantic features to obtain the standard conversation text corresponding to the input sentence.
在另一示例性实施例中,语句编码单元可以包括:In another exemplary embodiment, the sentence encoding unit may include:
词向量获取子单元,用于通过进行输入语句中词语的向量化获得输入语句中词语对应的词向量;The word vector acquisition subunit is used to obtain the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
语义向量获取子单元,用于按照时间先后顺序对输入语句中词语对应的词向量进行遍历,提取遍历所得的第一隐状态向量为输入语句的语义向量。The semantic vector acquisition subunit is used to traverse the word vector corresponding to the words in the input sentence in chronological order, and extract the first hidden state vector obtained by the traversal as the semantic vector of the input sentence.
在另一示例性实施例中,语义特征提取模块430包括:In another exemplary embodiment, the semantic feature extraction module 430 includes:
特征获取单元,用于获取关键语义特征解码所得的第二隐状态向量,由第二隐状态向量构成隐状态向量矩阵;The feature acquisition unit is used to acquire a second hidden state vector obtained by decoding key semantic features, and the second hidden state vector forms a hidden state vector matrix;
特征提取单元,用于根据隐状态向量矩阵对标准会话文本进行语义特征提取;Feature extraction unit, used to extract semantic features of standard conversation text according to the hidden state vector matrix;
特征池化单元,用于通过对所提取语义特征的池化获得标准会话文本对应的语义向量。The feature pooling unit is used to obtain the semantic vector corresponding to the standard conversation text by pooling the extracted semantic features.
在另一示例性实施例中,文本类别预测模块450还可以包括:In another exemplary embodiment, the text category prediction module 450 may further include:
状态向量获取单元,用于通过目标参数矩阵对标准会话文本的语义向量进行非线性映射,获得标准会话文本在文本类别标记空间中的状态向量;The state vector acquisition unit is used to nonlinearly map the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
类别标签概率向量获取单元,用于对标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到标准会话文本对应的类别标签概率向量。The category label probability vector acquisition unit is used to normalize the probability of the state vector of the standard conversation text in the text category label space to obtain the category label probability vector corresponding to the standard conversation text.
在另一示例性实施例中,机器人会话文本分类装置还包括:In another exemplary embodiment, the robot conversation text classification apparatus further includes:
输入语句分类偏差获取模块,用于对进行输入语句转换成标准会话文本的翻译偏差和对标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差;The input sentence classification deviation acquisition module is used to sum the translation deviation of the input sentence into the standard conversation text and the classification deviation of the text classification of the standard conversation text to obtain the input sentence classification deviation;
参数更新模块,用于通过最小化输入语句分类偏差对目标参数矩阵进行更新。The parameter update module is used to update the target parameter matrix by minimizing the input sentence classification deviation.
需要说明的是,上述实施例所提供的装置与上述实施例所提供的方法属于同一构思,其中各个模块执行操作的具体方式已经在方法实施例中进行了详细描述,此处不再赘述。It should be noted that the device provided in the above embodiment and the method provided in the above embodiment belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiment, and will not be repeated here.
在一示例性实施例中,本申请还提供一种电子设备,该电子设备包括:In an exemplary embodiment, the present application further provides an electronic device, the electronic device includes:
处理器;存储器,该存储器上存储有计算机可读指令,该计算机可读指令被处理器执行时,实现如前所示的客服机器人会话文本分类方法。Processor; memory, computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, the customer service robot conversation text classification method shown above is realized.
在一示例性实施例中,本申请还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时,实现如前所示的客服机器人会话文本分类方法。In an exemplary embodiment, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the customer service robot conversation text classification method as described above.
上述内容,仅为本申请的较佳示例性实施例,并非用于限制本申请的实施方案,本领域普通技术人员根据本申请的主要构思和精神,可以十分方便地进行相应的变通或修改,故本申请的保护范围应以权利要求书所要求的保护范围为准。The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation of the present application. Those of ordinary skill in the art can easily make corresponding changes or modifications according to the main idea and spirit of the present application. Therefore, the scope of protection of this application shall be subject to the scope of protection required by the claims.

Claims (24)

  1. 一种客服机器人会话文本分类方法,包括:A customer service robot conversation text classification method, including:
    获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;Obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the customer service robot to process a response;
    通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;Obtaining a semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
    对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;Performing category label prediction on the semantic vector of the standard conversation text to obtain a category label probability vector corresponding to the standard conversation text;
    从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。The category corresponding to the maximum probability label is selected from the category label probability vector as the category of the standard conversation text, and the category is used to assist in performing the response of the customer service robot to the input text.
  2. 如权利要求1所述的方法,其中,所述获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,包括:The method according to claim 1, wherein the acquiring input sentences of the customer service robot in the conducted conversation, and converting the input sentences into standard conversation text includes:
    通过对所述输入语句进行编码,提取得到所述输入语句的关键语义特征;Encoding the input sentence to extract key semantic features of the input sentence;
    对所述关键语义特征进行解码,获得所述输入语句对应的标准会话文本。Decode the key semantic features to obtain standard conversation text corresponding to the input sentence.
  3. 如权利要求2所述的方法,其中,所述通过对所述输入语句进行编码提取所述输入语句的关键语义特征,包括:The method of claim 2, wherein the extracting key semantic features of the input sentence by encoding the input sentence comprises:
    通过进行所述输入语句中词语的向量化获得所述输入语句中词语对应的词向量;Obtaining the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
    按照时间先后顺序对所述输入语句中词语对应的词向量进行遍历,提取遍历所得的第一隐状态向量为所述输入语句的语义向量。The word vectors corresponding to the words in the input sentence are traversed in chronological order, and the first hidden state vector obtained by the traversal is extracted as the semantic vector of the input sentence.
  4. 如权利要求1至3任一项所述的方法,其中,所述通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量,包括:The method according to any one of claims 1 to 3, wherein the obtaining the semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text includes:
    获取所述关键语义特征解码所得的第二隐状态向量,由所述第二隐状态向量构成隐状态向量矩阵;Acquiring a second hidden state vector obtained by decoding the key semantic features, and forming a hidden state vector matrix from the second hidden state vector;
    根据对所述隐状态向量矩阵对所述标准会话文本进行语义特征提取;Performing semantic feature extraction on the standard conversation text according to the hidden state vector matrix;
    通过对所提取语义特征的池化获得所述标准会话文本对应的语义向量。The semantic vector corresponding to the standard conversation text is obtained by pooling the extracted semantic features.
  5. 如权利要求1至4任一项所述的方法,其中,所述对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量,包括:The method according to any one of claims 1 to 4, wherein the class label prediction on the semantic vector of the standard conversation text to obtain the class label probability vector corresponding to the standard conversation text includes:
    通过目标参数矩阵对所述标准会话文本的语义向量进行非线性映射,获得所述标准会话文本在文本类别标记空间中的状态向量;Performing a non-linear mapping on the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
    对所述标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到所述标准会话文本对应的类别标签概率向量。Probability normalization is performed on the state vector of the standard conversation text in the text category label space to obtain a category label probability vector corresponding to the standard conversation text.
  6. 如权利要求5所述的方法,所述方法还包括:The method of claim 5, further comprising:
    对进行所述输入语句转换成所述标准会话文本的翻译偏差和对所述标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差;Summing the translation deviations of converting the input sentence into the standard conversational text and the classification deviation of the text classification of the standard conversational text to obtain the input sentence classification deviation;
    通过最小化所述输入语句分类偏差对所述目标参数矩阵进行更新。The target parameter matrix is updated by minimizing the input sentence classification deviation.
  7. 一种客服机器人会话文本分类装置,包括:A customer service robot conversation text classification device, including:
    输入语句转换模块,配置为获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;The input sentence conversion module is configured to obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the customer service robot to process a response;
    语义特征提取模块,配置为通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;A semantic feature extraction module configured to obtain a semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
    文本类别预测模块,配置为对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;A text category prediction module configured to predict category labels on the semantic vector of the standard conversation text to obtain a category label probability vector corresponding to the standard conversation text;
    文本类别获取模块,配置为从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。The text category acquisition module is configured to select the category corresponding to the maximum probability label from the category label probability vector as the category of the standard conversation text, the category is used to assist in performing the response of the customer service robot to the input text .
  8. 如权利要求7所述的装置,其中,所述语句转换模块包括:The apparatus of claim 7, wherein the sentence conversion module comprises:
    语句编码单元,配置为通过对输入语句进行编码,提取得到输入语句的关键语义特征;The sentence coding unit is configured to extract key semantic features of the input sentence by coding the input sentence;
    语句解码单元,配置为于对关键语义特征进行解码,获得输入语句对应的标准会话文本。The sentence decoding unit is configured to decode key semantic features and obtain standard conversation text corresponding to the input sentence.
  9. 如权利要求8所述的装置,其中,所述语句编码单元包括:The apparatus of claim 8, wherein the sentence encoding unit comprises:
    词向量获取子单元,配置为通过进行输入语句中词语的向量化获得输入语句中词语对应的词向量;The word vector acquisition subunit is configured to obtain the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
    语义向量获取子单元,配置为按照时间先后顺序对输入语句中词语对应的词向量进行遍历,提取遍历所得的第一隐状态向量为输入语句的语义向量。The semantic vector acquisition subunit is configured to traverse the word vector corresponding to the words in the input sentence in chronological order, and extract the first hidden state vector obtained by the traversal as the semantic vector of the input sentence.
  10. 如权利要求7至9任一项所述的装置,其中,所述语义特征提取模块包括:The apparatus according to any one of claims 7 to 9, wherein the semantic feature extraction module includes:
    特征获取单元,配置为获取关键语义特征解码所得的第二隐状态向量,由第二隐状态向量构成隐状态向量矩阵;The feature acquisition unit is configured to acquire a second hidden state vector obtained by decoding key semantic features, and the second hidden state vector constitutes a hidden state vector matrix;
    特征提取单元,配置为根据隐状态向量矩阵对标准会话文本进行语义特征提取;The feature extraction unit is configured to extract the semantic features of the standard conversation text according to the hidden state vector matrix;
    特征池化单元,配置为通过对所提取语义特征的池化获得标准会话文本对应的语义向量。The feature pooling unit is configured to obtain the semantic vector corresponding to the standard conversation text by pooling the extracted semantic features.
  11. 如权利要求7或10任一项所述的装置,其中,所述文本类别预测模块包括:The apparatus according to any one of claims 7 or 10, wherein the text category prediction module includes:
    状态向量获取单元,配置为通过目标参数矩阵对标准会话文本的语义向量进行非线性映射,获得标准会话文本在文本类别标记空间中的状态向量;The state vector acquisition unit is configured to nonlinearly map the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
    类别标签概率向量获取单元,配置为对标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到标准会话文本对应的类别标签概率向量。The category label probability vector acquisition unit is configured to normalize the probability of the state vector of the standard conversation text in the text category label space to obtain the category label probability vector corresponding to the standard conversation text.
  12. 如权利要求11所述的装置,所述装置还包括:The apparatus of claim 11, further comprising:
    输入语句分类偏差获取模块,配置为对进行输入语句转换成标准会话文本的翻译偏差和对标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差;The input sentence classification deviation acquisition module is configured to sum the translation deviation of the input sentence into the standard conversation text and the classification deviation of the text classification of the standard conversation text to obtain the input sentence classification deviation;
    参数更新模块,配置为通过最小化输入语句分类偏差对目标参数矩阵进行更新。The parameter updating module is configured to update the target parameter matrix by minimizing the input sentence classification deviation.
  13. 一种电子设备,包括:An electronic device, including:
    处理器;processor;
    及存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,所述处理器用于实现以下步骤:And a memory, where computer readable instructions are stored on the memory, and when the computer readable instructions are executed by the processor, the processor is used to implement the following steps:
    获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;Obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the customer service robot to process a response;
    通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;Obtaining a semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
    对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;Performing category label prediction on the semantic vector of the standard conversation text to obtain a category label probability vector corresponding to the standard conversation text;
    从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。The category corresponding to the maximum probability label is selected from the category label probability vector as the category of the standard conversation text, and the category is used to assist in performing the response of the customer service robot to the input text.
  14. 如权利要求13所述的电子设备,其中,所述获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述处理器用于实现以下步骤:The electronic device of claim 13, wherein the input sentence of the customer service robot in the ongoing conversation is converted into standard conversation text, and the processor is used to implement the following steps:
    通过对所述输入语句进行编码,提取得到所述输入语句的关键语义特征;Encoding the input sentence to extract key semantic features of the input sentence;
    对所述关键语义特征进行解码,获得所述输入语句对应的标准会话文本。Decode the key semantic features to obtain standard conversation text corresponding to the input sentence.
  15. 如权利要求14所述的电子设备,其中,所述通过对所述输入语句进行编码提取所述输入语句的关键语义特征,所述处理器用于实现以下步骤:The electronic device according to claim 14, wherein the key semantic feature of the input sentence is extracted by encoding the input sentence, and the processor is configured to implement the following steps:
    通过进行所述输入语句中词语的向量化获得所述输入语句中词语对应的词向量;Obtaining the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
    按照时间先后顺序对所述输入语句中词语对应的词向量进行遍历,提取遍历所得的第一隐状态向量为所述输入语句的语义向量。The word vectors corresponding to the words in the input sentence are traversed in chronological order, and the first hidden state vector obtained by the traversal is extracted as the semantic vector of the input sentence.
  16. 如权利要求13至15任一项所述的电子设备,其中,所述通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量,所述处理器用于实现以下步骤:The electronic device according to any one of claims 13 to 15, wherein the semantic vector corresponding to the standard conversation text is obtained by performing semantic feature extraction on the standard conversation text, and the processor is configured to implement the following steps:
    获取所述关键语义特征解码所得的第二隐状态向量,由所述第二隐状态向量构成隐状态向量矩阵;Acquiring a second hidden state vector obtained by decoding the key semantic features, and forming a hidden state vector matrix from the second hidden state vector;
    根据对所述隐状态向量矩阵对所述标准会话文本进行语义特征提取;Performing semantic feature extraction on the standard conversation text according to the hidden state vector matrix;
    通过对所提取语义特征的池化获得所述标准会话文本对应的语义向量。The semantic vector corresponding to the standard conversation text is obtained by pooling the extracted semantic features.
  17. 如权利要求13或16任一项所述的电子设备,其中,所述对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量,所述处理器用于实现以下步骤:The electronic device according to any one of claims 13 or 16, wherein the class label prediction is performed on the semantic vector of the standard conversation text to obtain a category label probability vector corresponding to the standard conversation text, and the processor uses To achieve the following steps:
    通过目标参数矩阵对所述标准会话文本的语义向量进行非线性映射,获得所述标准会话文本在文本类别标记空间中的状态向量;Performing a non-linear mapping on the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
    对所述标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到所述标准会话文本对应的类别标签概率向量。Probability normalization is performed on the state vector of the standard conversation text in the text category label space to obtain a category label probability vector corresponding to the standard conversation text.
  18. 如权利要求17所述的电子设备,所述处理器还用于实现以下步骤:The electronic device of claim 17, the processor is further configured to implement the following steps:
    对进行所述输入语句转换成所述标准会话文本的翻译偏差和对所述标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差;Summing the translation deviations of converting the input sentence into the standard conversational text and the classification deviation of the text classification of the standard conversational text to obtain the input sentence classification deviation;
    通过最小化所述输入语句分类偏差对所述目标参数矩阵进行更新。The target parameter matrix is updated by minimizing the input sentence classification deviation.
  19. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,所述处理器用于实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the processor is used to implement the following steps:
    获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述输入语句是等待所述客服机器人处理响应的会话消息;Obtain the input sentence of the customer service robot in the ongoing conversation, convert the input sentence into standard conversation text, and the input sentence is a conversation message waiting for the customer service robot to process a response;
    通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量;Obtaining a semantic vector corresponding to the standard conversation text by performing semantic feature extraction on the standard conversation text;
    对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量;Performing category label prediction on the semantic vector of the standard conversation text to obtain a category label probability vector corresponding to the standard conversation text;
    从所述类别标签概率向量中选取最大概率标签所对应的类别作为所述标准会话文本的类别,所述类别用于辅助执行所述客服机器人对所述输入文本的响应。The category corresponding to the maximum probability label is selected from the category label probability vector as the category of the standard conversation text, and the category is used to assist in performing the response of the customer service robot to the input text.
  20. 如权利要求19所述的计算机可读存储介质,其中,所述获取客服机器人在所进行会话中的输入语句,转换所述输入语句为标准会话文本,所述处理器用于实现以下步骤:The computer-readable storage medium according to claim 19, wherein the input sentence of the customer service robot in the ongoing conversation is converted into standard conversation text, and the processor is used to implement the following steps:
    通过对所述输入语句进行编码,提取得到所述输入语句的关键语义特征;Encoding the input sentence to extract key semantic features of the input sentence;
    对所述关键语义特征进行解码,获得所述输入语句对应的标准会话文本。Decode the key semantic features to obtain standard conversation text corresponding to the input sentence.
  21. 如权利要求20所述的计算机可读存储介质,其中,所述通过对所述输入语句进行编码提取所述输入语句的关键语义特征,所述处理器用于实现以下步骤:The computer-readable storage medium of claim 20, wherein the key semantic feature of the input sentence is extracted by encoding the input sentence, and the processor is configured to implement the following steps:
    通过进行所述输入语句中词语的向量化获得所述输入语句中词语对应的词向量;Obtaining the word vector corresponding to the word in the input sentence by vectorizing the word in the input sentence;
    按照时间先后顺序对所述输入语句中词语对应的词向量进行遍历,提取遍历所得的第一隐状态向量为所述输入语句的语义向量。The word vectors corresponding to the words in the input sentence are traversed in chronological order, and the first hidden state vector obtained by the traversal is extracted as the semantic vector of the input sentence.
  22. 如权利要求19至21任一项所述的计算机可读存储介质,其中,所述通过对所述标准会话文本进行语义特征提取获得所述标准会话文本对应的语义向量,所述处理器用于实现以下步骤:The computer-readable storage medium according to any one of claims 19 to 21, wherein the semantic vector corresponding to the standard conversation text is obtained by performing semantic feature extraction on the standard conversation text, and the processor is used to implement The following steps:
    获取所述关键语义特征解码所得的第二隐状态向量,由所述第二隐状态向量构成隐状态向量矩阵;Acquiring a second hidden state vector obtained by decoding the key semantic features, and forming a hidden state vector matrix from the second hidden state vector;
    根据对所述隐状态向量矩阵对所述标准会话文本进行语义特征提取;Performing semantic feature extraction on the standard conversation text according to the hidden state vector matrix;
    通过对所提取语义特征的池化获得所述标准会话文本对应的语义向量。The semantic vector corresponding to the standard conversation text is obtained by pooling the extracted semantic features.
  23. 如权利要求19或22任一项所述的计算机可读存储介质,其中,所述对所述标准会话文本的语义向量进行类别标签预测,获得所述标准会话文本对应的类别标签概率向量,所述处理器用于实现以下步骤:The computer-readable storage medium according to any one of claims 19 or 22, wherein the class label prediction is performed on the semantic vector of the standard conversation text to obtain a class label probability vector corresponding to the standard conversation text. The processor is used to implement the following steps:
    通过目标参数矩阵对所述标准会话文本的语义向量进行非线性映射,获得所述标准会话文本在文本类别标记空间中的状态向量;Performing a non-linear mapping on the semantic vector of the standard conversation text through the target parameter matrix to obtain the state vector of the standard conversation text in the text category label space;
    对所述标准会话文本在文本类别标记空间的状态向量进行概率归一化,得到所述标准会话文本对应的类别标签概率向量。Probability normalization is performed on the state vector of the standard conversation text in the text category label space to obtain a category label probability vector corresponding to the standard conversation text.
  24. 如权利要求23所述的计算机可读存储介质,所述处理器还用于实现以下步骤:The computer-readable storage medium of claim 23, the processor is further configured to implement the following steps:
    对进行所述输入语句转换成所述标准会话文本的翻译偏差和对所述标准会话文本进行文本分类的分类偏差进行求和运算,获得输入语句分类偏差;Summing the translation deviations of converting the input sentence into the standard conversational text and the classification deviation of the text classification of the standard conversational text to obtain the input sentence classification deviation;
    通过最小化所述输入语句分类偏差对所述目标参数矩阵进行更新。The target parameter matrix is updated by minimizing the input sentence classification deviation.
PCT/CN2018/125249 2018-10-12 2018-12-29 Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium WO2020073530A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811191509.3A CN109543030B (en) 2018-10-12 2018-10-12 Method, device, equipment and storage medium for classifying session texts of customer service robot
CN201811191509.3 2018-10-12

Publications (1)

Publication Number Publication Date
WO2020073530A1 true WO2020073530A1 (en) 2020-04-16

Family

ID=65843938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125249 WO2020073530A1 (en) 2018-10-12 2018-12-29 Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN109543030B (en)
WO (1) WO2020073530A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932296A (en) * 2020-07-20 2020-11-13 中国建设银行股份有限公司 Product recommendation method and device, server and storage medium
CN112101021A (en) * 2020-09-03 2020-12-18 沈阳东软智能医疗科技研究院有限公司 Method, device and equipment for realizing standard word mapping
CN112633690A (en) * 2020-12-22 2021-04-09 微民保险代理有限公司 Service personnel information distribution method, service personnel information distribution device, computer equipment and storage medium
CN113282724A (en) * 2021-05-21 2021-08-20 北京京东振世信息技术有限公司 Interaction method and device for intelligent customer service
CN113792140A (en) * 2021-08-12 2021-12-14 南京星云数字技术有限公司 Text processing method and device and computer readable storage medium
CN114257524A (en) * 2021-12-17 2022-03-29 马上消费金融股份有限公司 Communication establishing method, device and equipment
CN114358014A (en) * 2021-12-23 2022-04-15 佳源科技股份有限公司 Work order intelligent diagnosis method, device, equipment and medium based on natural language

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110846A (en) * 2019-04-24 2019-08-09 重庆邮电大学 Auxiliary driver's vehicle exchange method based on convolutional neural networks
CN110413788B (en) * 2019-07-30 2023-01-31 携程计算机技术(上海)有限公司 Method, system, device and storage medium for predicting scene category of conversation text
CN112447173A (en) * 2019-08-16 2021-03-05 阿里巴巴集团控股有限公司 Voice interaction method and device and computer storage medium
CN111291987A (en) * 2020-01-23 2020-06-16 广东电网有限责任公司计量中心 Method and device for predicting service life of mutual inductor
CN111400340B (en) * 2020-03-12 2024-01-09 杭州城市大数据运营有限公司 Natural language processing method, device, computer equipment and storage medium
CN111694939B (en) * 2020-04-28 2023-09-19 平安科技(深圳)有限公司 Method, device, equipment and storage medium for intelligent robot calling
CN111666400B (en) * 2020-07-10 2023-10-13 腾讯科技(深圳)有限公司 Message acquisition method, device, computer equipment and storage medium
CN111782793A (en) * 2020-08-11 2020-10-16 深圳市北科瑞声科技股份有限公司 Intelligent customer service processing method, system and equipment
CN112734050A (en) * 2020-12-11 2021-04-30 平安科技(深圳)有限公司 Text model training method, text model recognition device, text model equipment and storage medium
CN112784031B (en) * 2021-01-29 2022-04-22 湖南大学 Method and system for classifying customer service conversation texts based on small sample learning
CN113377951A (en) * 2021-05-20 2021-09-10 广州云趣信息科技有限公司 Corpus construction method and apparatus for intelligent customer service robot
CN113705220A (en) * 2021-08-19 2021-11-26 上海明略人工智能(集团)有限公司 Method and device for determining work skill, electronic equipment and storage medium
CN116150625B (en) * 2023-03-08 2024-03-29 华院计算技术(上海)股份有限公司 Training method and device for text search model and computing equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017202125A1 (en) * 2016-05-25 2017-11-30 华为技术有限公司 Text classification method and apparatus
CN108241741A (en) * 2017-12-29 2018-07-03 深圳市金立通信设备有限公司 A kind of file classification method, server and computer readable storage medium
CN108363716A (en) * 2017-12-28 2018-08-03 广州索答信息科技有限公司 Realm information method of generating classification model, sorting technique, equipment and storage medium
CN108376151A (en) * 2018-01-31 2018-08-07 深圳市阿西莫夫科技有限公司 Question classification method, device, computer equipment and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677779B (en) * 2015-12-30 2018-10-30 山东大学 A kind of feedback-type problem types classifier system and its working method based on scoring
CN106503236B (en) * 2016-10-28 2020-09-11 北京百度网讯科技有限公司 Artificial intelligence based problem classification method and device
CN106599933A (en) * 2016-12-26 2017-04-26 哈尔滨工业大学 Text emotion classification method based on the joint deep learning model
US10769522B2 (en) * 2017-02-17 2020-09-08 Wipro Limited Method and system for determining classification of text
CN107145484A (en) * 2017-04-24 2017-09-08 北京邮电大学 A kind of Chinese word cutting method based on hidden many granularity local features
CN107291795B (en) * 2017-05-03 2020-06-19 华南理工大学 Text classification method combining dynamic word embedding and part-of-speech tagging
CN107229684B (en) * 2017-05-11 2021-05-18 合肥美的智能科技有限公司 Sentence classification method and system, electronic equipment, refrigerator and storage medium
CN107679234B (en) * 2017-10-24 2020-02-11 上海携程国际旅行社有限公司 Customer service information providing method, customer service information providing device, electronic equipment and storage medium
CN107943967B (en) * 2017-11-28 2020-05-22 华南理工大学 Text classification algorithm based on multi-angle convolutional neural network and cyclic neural network
CN108170681A (en) * 2018-01-15 2018-06-15 中南大学 Text emotion analysis method, system and computer readable storage medium
CN108363753B (en) * 2018-01-30 2020-05-19 南京邮电大学 Comment text emotion classification model training and emotion classification method, device and equipment
CN108334499B (en) * 2018-02-08 2022-03-18 海南云江科技有限公司 Text label labeling device and method and computing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017202125A1 (en) * 2016-05-25 2017-11-30 华为技术有限公司 Text classification method and apparatus
CN108363716A (en) * 2017-12-28 2018-08-03 广州索答信息科技有限公司 Realm information method of generating classification model, sorting technique, equipment and storage medium
CN108241741A (en) * 2017-12-29 2018-07-03 深圳市金立通信设备有限公司 A kind of file classification method, server and computer readable storage medium
CN108376151A (en) * 2018-01-31 2018-08-07 深圳市阿西莫夫科技有限公司 Question classification method, device, computer equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932296A (en) * 2020-07-20 2020-11-13 中国建设银行股份有限公司 Product recommendation method and device, server and storage medium
CN112101021A (en) * 2020-09-03 2020-12-18 沈阳东软智能医疗科技研究院有限公司 Method, device and equipment for realizing standard word mapping
CN112633690A (en) * 2020-12-22 2021-04-09 微民保险代理有限公司 Service personnel information distribution method, service personnel information distribution device, computer equipment and storage medium
CN113282724A (en) * 2021-05-21 2021-08-20 北京京东振世信息技术有限公司 Interaction method and device for intelligent customer service
CN113792140A (en) * 2021-08-12 2021-12-14 南京星云数字技术有限公司 Text processing method and device and computer readable storage medium
CN114257524A (en) * 2021-12-17 2022-03-29 马上消费金融股份有限公司 Communication establishing method, device and equipment
CN114358014A (en) * 2021-12-23 2022-04-15 佳源科技股份有限公司 Work order intelligent diagnosis method, device, equipment and medium based on natural language
CN114358014B (en) * 2021-12-23 2023-08-04 佳源科技股份有限公司 Work order intelligent diagnosis method, device, equipment and medium based on natural language

Also Published As

Publication number Publication date
CN109543030A (en) 2019-03-29
CN109543030B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
WO2020073530A1 (en) Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium
US10614803B2 (en) Wake-on-voice method, terminal and storage medium
US10515627B2 (en) Method and apparatus of building acoustic feature extracting model, and acoustic feature extracting method and apparatus
CN108985358B (en) Emotion recognition method, device, equipment and storage medium
US10114809B2 (en) Method and apparatus for phonetically annotating text
WO2021135611A1 (en) Method and device for speech recognition, terminal and storage medium
CN112685565A (en) Text classification method based on multi-mode information fusion and related equipment thereof
WO2020073532A1 (en) Method and device for identifying conversation state of customer service robot, electronic device, and computer-readable storage medium
CN111402861B (en) Voice recognition method, device, equipment and storage medium
JP2016513269A (en) Method and device for acoustic language model training
CN112328761B (en) Method and device for setting intention label, computer equipment and storage medium
WO2021051514A1 (en) Speech identification method and apparatus, computer device and non-volatile storage medium
JP2021108098A (en) Review information processing method, device, computer apparatus, and medium
CN112632244A (en) Man-machine conversation optimization method and device, computer equipment and storage medium
CN111312233A (en) Voice data identification method, device and system
CN115688937A (en) Model training method and device
CN113160820B (en) Speech recognition method, training method, device and equipment of speech recognition model
CN113434642B (en) Text abstract generation method and device and electronic equipment
CN111538817A (en) Man-machine interaction method and device
US11036996B2 (en) Method and apparatus for determining (raw) video materials for news
CN115687934A (en) Intention recognition method and device, computer equipment and storage medium
CN115512682A (en) Polyphone pronunciation prediction method and device, electronic equipment and storage medium
CN115620726A (en) Voice text generation method, and training method and device of voice text generation model
WO2021051565A1 (en) Machine learning-based semantic parsing method and apparatus, electronic device, and computer non-volatile readable storage medium
CN110728137B (en) Method and device for word segmentation

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18936413

Country of ref document: EP

Kind code of ref document: A1