Conversational text classification method, system, device and storage medium
Through dialogue-based text classification methods, the priority of logistics customer service dialogue is solved, and the service efficiency and quality of business dialogue is improved.
Patent Information
- Application Number
- CN202110655090.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-06-11
AI Technical Summary
In the process of logistics customer service answering user logistics questions, chatting and conversations occupy a lot of resources, resulting in the inability to provide services to users who really need to solve the problem in a timely and accurate manner.
Using dialogue text classification method, by obtaining, extracting and classifying dialogue text features, using the trained dialogue text classification model to identify business dialogue and chat conversations, and adjust the priority according to the classification results, increase the priority of business dialogues, and reduce the Priority for chat conversations.
Effectively identify and classify conversation types, improve service efficiency of business conversations, reduce the resource usage of chat conversations, and ensure that business conversation users have faster and better service experience.
Smart Images

Figure CN113282755B_ABST
Abstract
Description
Background Art
[0002] In the process of logistics customer service answering users' logistics questions, users will have some casual conversations that connect the previous and the next, and the scope of casual conversations is relatively broad and unlimited.
[0003] In the dialogue scenario between users and logistics customer service, some users will ask the customer service about logistics business issues, while some users will only chat with the logistics customer service without any real intention or purpose. Since the logistics customer service has limited reception and response energy, if too much time is spent on chatting with users, it will not be possible to provide timely and accurate services to users who really need to solve problems. In order to improve the customer service experience, it is necessary to identify the chat dialogue so that intelligent robots or manual customer service can provide faster and more accurate logistics business answers to users' logistics problems. Summary of the invention
[0004] In response to the problems in the prior art, the purpose of the present invention is to provide a conversational text classification method, system, device and storage medium to identify and classify conversational text, provide chat services for chat dialogue customers, and provide faster and better business services for business dialogue customers.
[0005] The embodiment of the present invention provides a method for classifying conversational texts, comprising the following steps:
[0006] Obtain the conversational text to be classified;
[0007] Extracting text features to be classified of the conversational text to be classified;
[0008] Inputting the features of the text to be classified into a trained conversational text classification model;
[0009] Obtaining a conversation category output by the conversational text classification model, wherein the conversation category includes a business conversation category and a small talk conversation category;
[0010] If the conversation category is a business conversation, increase the corresponding conversation priority;
[0011] If the conversation category is a small talk conversation, the corresponding conversation is counted or timed, and when the counting or timing result of the conversation continuing to be a small talk conversation reaches a preset threshold, the corresponding conversation priority is lowered.
[0012] In some embodiments, the conversational text classification model is a binary classification model.
[0013] In some embodiments, the conversational text classification model is a Liblinear binary classification model.
[0014] In some embodiments, obtaining the conversational text to be classified includes the following steps:
[0015] Obtain customer service conversation text to be classified;
[0016] The customer conversational text is extracted from the customer service conversational text to be classified as the conversational text to be classified.
[0017] In some embodiments, after determining the type of the dialog category, the following steps are further included:
[0018] If the conversation category output by the conversational text classification model is a business conversation category, identifying the business type corresponding to the conversational text to be classified, and generating a reply text according to the business type;
[0019] If the conversation category output by the conversational text classification model is a small talk conversation category, a reply text is generated based on a preset small talk conversation reply rule.
[0020] In some embodiments, the following steps are also included:
[0021] Collect sample conversational texts;
[0022] Adding a dialogue category tag to the sample dialogue text, wherein the dialogue category tag includes a business dialogue tag and a casual chat dialogue tag;
[0023] The conversational text classification model is trained based on the sample conversational text.
[0024] In some embodiments, when the conversational text classification model is trained based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the casual chat conversation.
[0025] In some embodiments, the collecting of sample conversational text includes collecting historical conversational text and extracting historical customer conversational text as the sample conversational text.
[0026] The embodiment of the present invention further provides a conversational text classification system, which is applied to the conversational text classification method, and the system includes:
[0027] A text acquisition module, used to acquire the conversational text to be classified;
[0028] A feature extraction module, used for extracting text features to be classified of the conversational text to be classified;
[0029] A model input module, used for inputting the features of the text to be classified into a trained conversational text classification model;
[0030] The text classification module is used to obtain the dialogue category output by the conversational text classification model, wherein the dialogue category includes a business dialogue category and a casual chat dialogue category.
[0031] In some embodiments, a model training module is further included for collecting sample conversational texts; adding conversational category labels to the sample conversational texts, wherein the conversational category labels include business conversation labels and small talk conversation labels; and training the conversational text classification model based on the sample conversational texts;
[0032] When the model training module trains the conversational text classification model based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the casual chat conversation;
[0033] The conversation processing module is used to increase the priority of the corresponding conversation if the conversation category is a business conversation; and if the conversation category is a chat conversation, count or time the corresponding conversation, and when the counting or timing result of the conversation continues to be a chat conversation and reaches a preset threshold, lower the priority of the corresponding conversation.
[0034] The embodiment of the present invention further provides a conversational text classification device, comprising:
[0035] processor;
[0036] a memory storing executable instructions of the processor;
[0037] The processor is configured to perform the steps of the conversational text classification method by executing the executable instructions.
[0038] The embodiment of the present invention further provides a computer-readable storage medium for storing a program, wherein the program implements the steps of the conversational text classification method when executed by a processor.
[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0040] The conversational text classification method, system, device and storage medium of the present invention have the following beneficial effects:
[0041] The present invention identifies and classifies conversational texts, and provides different service modes according to the classification results. It provides chat services for chat conversation customers, and when the priority reduction conditions are met, it lowers the priority of the chat conversation customers to avoid excessive occupation of customer service resources, and also provides more sufficient customer service resources for business conversation customers. For business conversation customers, their corresponding conversation priority is increased, so that faster and better business services can be provided to business conversation users. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0043] Figure 1 is a flow chart of a method for classifying conversational text according to an embodiment of the present invention;
[0044] Figure 2 is a flow chart of generating a reply text according to an embodiment of the present invention;
[0045] Figure 3 is a flow chart of processing a business dialogue according to an embodiment of the present invention;
[0046] Figure 4 is a flow chart of processing a small talk dialogue according to an embodiment of the present invention;
[0047] Figure 5 is a flow chart of the training process of a conversational text classification model according to an embodiment of the present invention;
[0048] Figure 6 is a flow chart of extracting sample conversational text according to an embodiment of the present invention;
[0049] Figure 7 is a schematic diagram of the structure of a conversational text classification system according to an embodiment of the present invention;
[0050] Figure 8 is a schematic diagram of the structure of a conversational text classification device according to an embodiment of the present invention;
[0051] Fig. 9 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0053] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0054] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0055] like Figure 1 As shown, an embodiment of the present invention provides a method for classifying conversational texts, comprising the following steps:
[0056] S100: Acquire a conversational text to be classified, where the conversational text may be a conversational text collected in real time during a conversation between a customer and a customer service representative;
[0057] S200: extracting text features to be classified of the conversational text to be classified;
[0058] Here, the features of the text to be classified can be extracted by segmenting the conversational text, obtaining the corresponding word vector for each word, and combining the word vectors to obtain the features of the text to be classified. The text features can also be extracted by feature extraction models such as word2vec model or convolutional neural network.
[0059] S300: Inputting the features of the text to be classified into a trained conversational text classification model;
[0060] S400: Acquire the conversation category output by the conversational text classification model, where the conversation category includes a business conversation category and a casual chat conversation category;
[0061] Business conversations are mainly related to customer service. For example, if a customer asks "when will the express arrive?", this is a business conversation for logistics customer service. Casual conversations are not related to customer service. For example, if a customer says "the weather is nice today," this is a casual conversation.
[0062] S500: Determine the type of the dialogue category output by the dialogue text classification model;
[0063] S600: If the conversation category is a business conversation, increase the corresponding conversation priority;
[0064] In this embodiment, the conversational text to be classified is text in a currently ongoing conversation, and the corresponding conversation refers to the conversation from which the conversational text to be classified originates.
[0065] Specifically, ways to improve the priority of a conversation may include, but are not limited to: transferring machine customer service directly to human customer service, improving the queue order of human customer service, transferring to human customer service of a higher level or with a higher historical score, or transferring from general robot customer service to professional robot customer service, etc. One or more of the following methods.
[0066] S700: If the conversation category is a small talk conversation, count or time the corresponding conversation, and when the count or time result of the conversation continuing to be a small talk conversation reaches a preset threshold, reduce the priority of the corresponding conversation.
[0067] Specifically, when the current conversation category is a small talk conversation, counting the corresponding conversation means that when it is currently detected that the conversational text to be classified in the ongoing conversation is a small talk conversation, the number of small talk conversations is set to 1, and the newly appeared conversational text in the conversation is continuously monitored and identified. If a new small talk conversation appears, the number is increased by 1. Here, continuing to be a small talk conversation means that small talk conversations are continuously monitored. If the counted number reaches a preset number threshold, the priority of the corresponding conversation is lowered. Timing the corresponding conversation means that when it is currently detected that the conversational text to be classified in the ongoing conversation is a small talk conversation, the timing starts. If small talk conversations are continuously monitored, the time continues to increase until a business conversation is monitored. If the timing time is greater than the preset time threshold, the priority of the corresponding conversation is lowered.
[0068] Here, lowering the corresponding conversation priority may include, but is not limited to: directly transferring the human customer service to the robot customer service, lowering the queue order of the human customer service, transferring to a human customer service of a lower level or with a lower historical score, or transferring from a professional robot customer service to a general robot customer service, etc. One or more of the following methods.
[0069] The conversational text classification method of the present invention obtains conversational text and extracts text features through steps S100 and S200, identifies and classifies the conversational text through steps S300 and S400, and provides different service modes according to the classification results through steps S500 to S700, providing chat services for chat dialogue customers, and lowering the priority of chat dialogue customers when the priority reduction conditions are met to avoid excessive occupation of customer service resources, and also providing more sufficient customer service resources for business dialogue customers. For business dialogue customers, their corresponding conversation priority is improved, so as to provide faster and better business services for business dialogue users.
[0070] The conversational text classification method of the present invention can be applied to customer service servers in various service fields, and the conversational text to be classified in the customer service dialogue is obtained in real time, and the subsequent customer service strategy can be determined according to the classification type of the conversational text. The customer communicates with the customer service server by using user terminals such as mobile phones, tablet computers, and laptop computers. The customer service is divided into robot customer service and manual customer service. The algorithm of the robot customer service can be built into the customer service system or a robot customer service server is provided separately. The manual customer service communicates with the customer service server through the terminal such as the computer used by it. That is, the customer service server establishes a communication channel between the customer and the customer service, and the customer and the customer service can have a conversation based on the customer service server. The conversational text classification method of the present invention can also be applied to a separate server, communicate with the customer service server, obtain the conversational text to be classified in the customer service dialogue from the customer service server in real time, and determine the subsequent customer service strategy according to the classification type of the conversational text. If the customer service strategy is updated compared to the previous moment, it is sent to the customer service server.
[0071] Furthermore, in step S700, if the conversation category is a small talk conversation, it may further include starting a small talk library. The small talk library is a special chat corpus that can quickly find the corresponding reply statement according to the content of the conversation text. If the current customer service is a robot, the reply statement retrieved from the small talk library can be quickly fed back to the customer. If the current customer service is a human, the reply statement can be retrieved from the small talk library and sent to the human customer, who can quickly respond with reference to the reply statement.
[0072] In this embodiment, the conversational text classification model is a binary classification model, for example, the conversational text classification model can be a Liblinear binary classification model. Liblinear is an improved version of the linear kernel of libsvm, which is specifically suitable for the classification of millions of data. In other alternative implementations, the conversational text classification model can also be other types of binary classification models, such as decision trees, logistic regression models, etc. In addition, the conversational text classification model can also be other types of machine learning models, such as convolutional neural network models, etc.
[0073] In this embodiment, the conversational text classification method is mainly aimed at classifying the conversation between the customer and the customer service, that is, judging whether it is a small talk or a business conversation according to the content of the customer's words. The step S100: obtaining the conversational text to be classified includes the following steps:
[0074] Acquire customer service conversational text to be classified, where the customer service conversational text includes customer conversational text sent by the customer through its client, and also includes customer service reply text in which the customer service replies to the customer conversational text;
[0075] The customer conversational text is extracted from the customer service conversational text to be classified as the conversational text to be classified, that is, only the conversational text sent by the customer is recognized, which reduces the workload of conversation recognition and reduces the workload of the conversation processing system.
[0076] like Figure 2 As shown, in this embodiment, after the step S500: determining the type of the dialogue category, the following steps are also included:
[0077] S510: If the dialog category output by the dialog text classification model is a business dialog category, the business type corresponding to the dialog text to be classified is identified, and a reply text is generated according to the business type. For example, the business type may include a mailing inquiry, a logistics time consultation type, a logistics time complaint type, a logistics service complaint type, etc. Different reply rules may be preset according to different business types. For example, for a logistics time consultation type, the customer's order is automatically queried, and the logistics process is automatically queried according to the customer's order and a reply text is generated. For a logistics time complaint type, a soothing statement is first automatically generated, and then a preset processing mechanism is queried. When a robot customer service is used, the reply text may be directly pushed to the customer. When a manual customer service is used, the reply text may be pushed to the customer service to assist the customer service in responding quickly. The conversation priority may also be adjusted according to the segmentation of the business type. For example, the priority of the business type complaining about logistics time is increased.
[0078] Specifically, Figure 2 As shown, the step S510: identifying the business type corresponding to the conversational text to be classified, and generating a reply text according to the business type may include the following steps:
[0079] S511: Identify the business type corresponding to the conversational text to be classified;
[0080] S512: Loading a business response corpus corresponding to the business type;
[0081] S513: According to the conversational text to be classified and a preset business response matching rule, a response text matching the conversational text to be classified is selected from the business response corpus.
[0082] S520: If the conversation category output by the conversational text classification model is a casual chat conversation category, a reply text is generated based on a preset casual chat conversation reply rule. Specifically, the preset casual chat conversation reply rule may be a matching rule with the casual chat corpus in the casual chat library. According to the conversational text and the matching rule, the casual chat corpus is matched from the casual chat library. When a robot customer service is used, the reply text can be directly pushed to the customer. When a manual customer service is used, the reply text can be pushed to the customer service to assist the customer service in responding quickly.
[0083] Furthermore, after the step S700: starting the chat library, the conversational text classification method further includes the following steps:
[0084] Check whether there is a chat conversation in all current customer service servers;
[0085] If there is no idle chat dialogue in all current customer service servers, that is, the current customer service dialogues are all business dialogues, there is no need to continue using the idle chat library, and the idle chat library is closed.
[0086] Furthermore, after the step S700: starting the chat library, the conversational text classification method further includes the following steps:
[0087] Check whether there is a robot customer service dialogue in all current customer service servers;
[0088] If there is no robot customer service dialogue in all current customer service servers, it means that the current customer service dialogue is provided by human customer service, that is, human customer service can meet the current customer service needs, and there is no need to continue using the chat library, so the chat library is closed.
[0089] like Figure 3 As shown, further, in this embodiment, the step S600: if the conversation category is a business conversation, increasing the corresponding conversation priority includes the following steps:
[0090] S610: Acquire customer conversation data of the corresponding conversation, where the conversation data may include all conversation texts of the customer in the previous preset time period in the conversation and / or the historical conversation texts of the customer before the conversation;
[0091] S620: Performing emotion analysis and / or personality analysis on the customer based on the customer conversation data;
[0092] Performing emotion analysis on customers, for example, using a pre-trained emotion recognition machine learning model, inputting feature vectors of all conversational texts of customers in a preset time period before the conversation, and obtaining the emotion category of the current customer, which may include, for example, dissatisfaction, anger, happiness, etc.; that is, the emotion analysis of customers is mainly based on the conversational texts of customers in the current conversation, without considering the historical conversational texts before the conversation; the emotion recognition machine learning model may, for example, use a convolutional neural network model or a binary classification model such as a support vector machine or a decision tree, and pre-train using a plurality of sample texts with emotion category labels added to obtain a converged emotion recognition machine learning model;
[0093] Conducting personality analysis on customers, for example, using a pre-trained personality recognition machine learning model, inputting all conversational texts of the customer in the previous preset time period in the conversation and / or the historical conversational texts of the customer before the conversation, to obtain the personality category of the current customer, which may include, for example, aggressive, stable, etc.; identifying the customer's personality may be based on the conversational text in the conversation, or based on all the historical conversational texts, to conduct a more objective and comprehensive evaluation of the customer; the personality recognition machine learning model may, for example, use a convolutional neural network model or a binary classification model such as a support vector machine or a decision tree, and may be pre-trained using multiple sample texts with personality category labels added to obtain a converged personality recognition machine learning model;
[0094] S630: judging whether a preset conversation priority raising condition is met according to the emotion analysis and / or personality analysis;
[0095] For example, the conversation priority raising condition is preset as the recognized emotion being dissatisfaction or anger, or the conversation priority raising mediation is preset as the recognized personality being aggressive, or other conditions related to the emotion and / or personality recognition results; this conversation priority raising condition can be adjusted according to different situations;
[0096] S640: If yes, then increase the priority of the corresponding conversation. The method of increasing the priority of the conversation may adopt the above-mentioned methods of directly transferring to human customer service, transferring to professional robot customer service, transferring to a higher level of human customer service, transferring to a human customer service with a higher historical score, etc.;
[0097] S650: Otherwise, the corresponding dialog priority is not increased.
[0098] like Figure 4 As shown, further, in the step S700, when the count or timing result of the conversation continuing to be a small talk conversation reaches a preset threshold, the corresponding conversation priority is reduced, including the following steps:
[0099] S810: Obtain service volume data of the current customer service server, wherein the service volume data of the customer service server includes but is not limited to: one or more of the following data: the number of visits to the customer service server within a preset time range, the number of queues or the length of queues for manual customer service, the number of currently idle manual customer service, the number of current casual chat conversations, the number of current business conversations, the number of business conversations of various business types, and the like;
[0100] S820: Determine whether the service volume data of the current customer service server meets the preset priority reduction conditions. For example, the priority reduction conditions include: the number of visits to the current customer service server within a preset time range is greater than a preset visit volume threshold, the number of manual customer service queues is greater than a preset number threshold, the manual queue time is greater than a preset time threshold, etc.;
[0101] S830: If yes, it means that the workload of the current customer service server is relatively large. In order to provide more resource guarantee for business dialogue, it is necessary to reduce the dialogue priority corresponding to the chat dialogue, for example, switching to robot customer service, switching to general robot customer service, reducing the queue order of manual customer service, etc.;
[0102] S840: If not, the corresponding conversation priority is not lowered.
[0103] like Figure 5 As shown, in this embodiment, the conversational text classification method further includes a step of training the conversational text classification model. Specifically, the conversational text classification model is trained using the following steps:
[0104] S910: Collecting sample conversational text;
[0105] S920: Adding a dialogue category tag to the sample dialogue text, wherein the dialogue category tag includes a business dialogue tag and a casual chat dialogue tag;
[0106] For example, a conversational text such as "How is XX mobile phone?" is a business conversation for the store customer service of XX mobile phone, but a casual conversation for the logistics customer service. A conversational text such as "Why is the logistics not updated?" is a business conversation for the logistics customer service.
[0107] S930: Training the conversational text classification model based on the sample conversational text;
[0108] During training, the sample conversational text is divided into a training data set, a verification data set and a test data set, and then the training data set is used to iteratively train the conversational text classification model until the loss function value is less than a preset threshold. The verification data set is used to verify the model, and the test data set is used to test. After the test passes, the conversational text classification model can be deployed and applied.
[0109] In this embodiment, the conversational text classification model is taken as a Liblinear two-classification model for illustration. As mentioned above, in other alternative implementations, the conversational text classification model may also be a machine learning model of other categories. Since the content of small talk conversations is wide and unlimited, its data cannot be fully collected. Therefore, in this embodiment, when the conversational text classification model is trained based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the small talk conversation, and the obtained conversational text classification model can better perform small talk recognition.
[0110] like Figure 6 As shown, in this embodiment, the S911: collecting sample conversational texts includes S911: collecting historical conversational texts, extracting historical customer conversational texts as the sample conversational texts. Because customer conversational texts encountered by customer service in different fields are different, the distinction criteria between business conversations and small talk conversations in different fields are also different. Therefore, for a conversational text classification model in a specific field, its samples are preferably obtained from the historical conversational texts in the specific field.
[0111] In this embodiment, in order to further improve the accuracy of business conversation recognition and classification, it is avoided that business conversations are mistakenly regarded as small talk conversations, which brings a bad experience to customers. After the business conversation is recognized, if a business conversation of a certain business type cannot be recognized, it is impossible to make a very accurate business reply when making a subsequent reply. Therefore, when training the conversational text classification model, it is necessary to include sample conversational texts of various business types, and the number of sample conversational texts of various business types is balanced.
[0112] like Figure 6 As shown, after the step S911: extracting the historical customer conversational text as the sample conversational text, the following steps are also included:
[0113] S912: Classify the sample conversational text into a business conversation category and a casual conversation category;
[0114] S913: Divide the sample dialogue text of the business dialogue category into sample dialogue texts of various business types. As described above, the business types may include mailing inquiry, logistics time consultation type, logistics time complaint type, logistics service complaint type, etc.;
[0115] S914: Determine whether the number of sample conversational texts of each business type is within a preset sample number range; the preset sample number range includes a preset sample number maximum value and a preset sample number minimum value, and the value range between the maximum value and the minimum value is the preset sample number range;
[0116] S915: If the number of sample conversational texts of a business type is greater than the preset maximum number of samples, it means that the number of sample conversational texts of the business type is too large, which will affect the balance between samples of various business types, and the sample conversational texts of the business type that exceed the preset maximum number of samples are removed;
[0117] When removing the sample conversational texts that exceed the preset maximum number of samples, the sample conversational texts with high similarity to other sample conversational texts are preferably removed. Specifically, the steps include:
[0118] Calculate the similarity of the text vectors of every two sample conversational texts of the business type, and sort the obtained similarity results from large to small;
[0119] Select similarity results from the front to the back in the order in which the similarity results are sorted, and remove a sample conversational text corresponding to the selected similarity result until the sample conversational text in the business type is less than or equal to the maximum number of preset samples;
[0120] S916: If the number of sample conversational texts of a business type is less than a preset minimum number of samples, it means that the number of sample conversational texts of the business type is insufficient, and the sample conversational texts of the business type are expanded until the number of sample conversational texts of the business type is greater than or equal to the preset minimum number of samples, thereby ensuring that each business type has enough samples for training;
[0121] Here, the sample dialogue text of this business type is expanded by replacing some words in the sample dialogue text, for example, replacing "when will the express arrive" with "when will the express arrive", and replacing "why hasn't the express arrived yet" with "why hasn't the package arrived yet", and the replaced text is also used as the sample dialogue text;
[0122] S917: If the number of sample conversational texts of a business type is between a preset maximum number of samples and a preset minimum number of samples, the sample conversational texts of the business type remain unchanged.
[0123] like Figure 7 As shown, an embodiment of the present invention further provides a conversational text classification system, which is applied to the conversational text classification method, and the system includes:
[0124] The text acquisition module M100 is used to acquire the conversational text to be classified. The text acquisition module M100 can communicate with the customer service server, or interact with the customer service data management module of the customer service server, and collect the conversational text in real time during the conversation between the customer and the customer service;
[0125] The feature extraction module M200 is used to extract the text features to be classified of the conversational text to be classified. The feature extraction module M200 can segment the conversational text, obtain the corresponding word vector for each word, and combine the word vectors to obtain the text features to be classified. The text features can also be extracted by a feature extraction model such as a word2vec model or a convolutional neural network.
[0126] A model input module M300 is used to input the features of the text to be classified into a trained conversational text classification model;
[0127] A text classification module M400 is used to obtain the dialog category output by the dialog text classification model, wherein the dialog category includes a business dialog category and a casual chat dialog category;
[0128] The dialogue processing module M500 is used to increase the priority of the corresponding dialogue if the dialogue category is a business dialogue. The ways to increase the dialogue priority may include but are not limited to: directly transferring the machine customer service to the manual customer service, improving the queuing order of the manual customer service, transferring to a manual customer service of a higher level or with a higher historical score, or transferring from a general robot customer service to a professional robot customer service, etc.; and if the dialogue category is a chat dialogue, the corresponding dialogue is counted or timed, and when the counting or timing result of the dialogue reaches a preset threshold, the corresponding dialogue priority is lowered. Lowering the corresponding dialogue priority may include but is not limited to: directly transferring the manual customer service to the robot customer service, lowering the queuing order of the manual customer service, transferring to a manual customer service of a lower level or with a lower historical score, or transferring from a professional robot customer service to a general robot customer service, etc. One or more of the various methods.
[0129] The conversational text classification system of the present invention obtains conversational text and extracts text features through a text acquisition module M100 and a feature extraction module M200, identifies and classifies conversational text through a model input module M300 and a text classification module M400, and provides different service modes according to the classification results through the text classification module M400, provides chat services for chat dialogue customers, and when the priority reduction conditions are met, reduces the priority of the chat dialogue customers to avoid excessive occupation of customer service resources, and also provides more sufficient customer service resources for business dialogue customers, and improves the corresponding conversation priority for business dialogue customers, thereby providing faster and better business services for business dialogue users.
[0130] The conversational text classification system of the present invention can be applied to customer service servers in various service fields, and the conversational text to be classified in the customer service dialogue is obtained in real time, and the subsequent customer service strategy can be determined according to the classification type of the conversational text. The customer communicates with the customer service server by using user terminals such as mobile phones, tablet computers, and laptop computers. The customer service is divided into robot customer service and manual customer service. The algorithm of the robot customer service can be built into the customer service system or a robot customer service server can be provided separately. The manual customer service communicates with the customer service server through the terminal such as the computer used by it. That is, the customer service server establishes a communication channel between the customer and the customer service, and the customer and the customer service can have a dialogue based on the customer service server. The conversational text classification system of the present invention can also be applied to a separate server, communicate with the customer service server, obtain the conversational text to be classified in the customer service dialogue from the customer service server in real time, and determine the subsequent customer service strategy according to the classification type of the conversational text. If the customer service strategy is updated compared to the previous moment, it is sent to the customer service server.
[0131] In this embodiment, the conversational text classification system further includes a model training module, which is used to collect sample conversational texts; add conversation category labels to the sample conversational texts, wherein the conversation category labels include business conversation labels and chat conversation labels; and train the conversational text classification model based on the sample conversational texts. The model training module can be, for example, a Liblinear binary classification model, or other types of machine learning models.
[0132] In this embodiment, when the model training module trains the conversational text classification model based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the casual chat conversation.
[0133] An embodiment of the present invention also provides a conversational text classification device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to perform the steps of the conversational text classification method by executing the executable instructions.
[0134] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0135] Refer to the following Figure 8 The electronic device 600 according to this embodiment of the present invention is described. Figure 8The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0136] like Figure 8 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0137] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above-mentioned conversational text classification method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0138] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0139] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0140] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0141] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0142] In the conversational text classification device, the program in the memory implements the steps of the conversational text classification method when executed by the processor. Therefore, the computer storage medium can also obtain the technical effect of the conversational text classification method.
[0143] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, wherein the program, when executed by a processor, implements the steps of the method for classifying conversational text. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps of various exemplary implementations of the present invention described in the above part of the method for classifying conversational text.
[0144] refer to Fig. 9 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0145] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0146] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0147] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0148] When the program in the computer storage medium is executed by the processor, the steps of the conversational text classification method are implemented. Therefore, the computer storage medium can also obtain the technical effect of the conversational text classification method.
[0149] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for classifying conversational text, characterized in that: The method comprises: Obtain the conversational text to be classified; Extracting text features to be classified of the conversational text to be classified; Inputting the features of the text to be classified into a trained conversational text classification model; Obtaining a conversation category output by the conversational text classification model, wherein the conversation category includes a business conversation category and a small talk conversation category; If the conversation category is a business conversation, increase the corresponding conversation priority; If the conversation category is a small talk conversation, the corresponding conversation is counted or timed, and when the counting or timing result of the conversation continuing to be a small talk conversation reaches a preset threshold, the service volume data of the current customer service server is obtained to determine whether the service volume data of the current customer service server meets the preset priority reduction condition, if yes, the corresponding conversation priority is reduced, if not, the corresponding conversation priority is not reduced, and the reduction of the corresponding conversation priority includes one or more of directly transferring the manual customer service to the robot customer service, reducing the queue order of the manual customer service, and transferring to the manual customer service of a lower level or a low historical score; The method further comprises the steps of: Collecting sample conversational texts, wherein historical conversational texts are collected, historical customer conversational texts are extracted as the sample conversational texts, and whether the number of sample conversational texts of each business type is within a preset sample number range, if the number of sample conversational texts of a business type is greater than the preset maximum sample number, calculating the similarity of text vectors for every two sample conversational texts of the business type, sorting the obtained similarity results from large to small, selecting similarity results from front to back in the similarity result sorting order, and removing a sample conversational text corresponding to the selected similarity result, until the sample conversational text in the business type is less than or equal to the preset maximum sample number; Adding a dialogue category tag to the sample dialogue text, wherein the dialogue category tag includes a business dialogue tag and a casual chat dialogue tag; The conversational text classification model is trained based on the sample conversational text.
2. The method for classifying conversational text according to claim 1, characterized in that: The conversational text classification model is a binary classification model.
3. The method for classifying conversational text according to claim 2, characterized in that: The conversational text classification model is a Liblinear binary classification model.
4. The method for classifying conversational text according to claim 1, characterized in that: The step of obtaining the dialog text to be classified comprises the following steps: Obtain customer service conversation text to be classified; The customer conversational text is extracted from the customer service conversational text to be classified as the conversational text to be classified.
5. The method for classifying conversational text according to claim 4, characterized in that: After determining the type of the dialogue category, the following steps are also included: If the conversation category output by the conversational text classification model is a business conversation category, identifying the business type corresponding to the conversational text to be classified, and generating a reply text according to the business type; If the conversation category output by the conversational text classification model is a small talk conversation category, a reply text is generated based on a preset small talk conversation reply rule.
6. The method for classifying conversational text according to claim 1, characterized in that: When the conversational text classification model is trained based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the casual chat conversation.
7. A conversational text classification system, characterized in that: The method for classifying conversational texts according to any one of claims 1 to 6, wherein the system comprises: A text acquisition module, used to acquire the conversational text to be classified; A feature extraction module, used for extracting text features to be classified of the conversational text to be classified; A model input module, used for inputting the features of the text to be classified into a trained conversational text classification model; A text classification module, used to obtain the dialogue category output by the conversational text classification model, wherein the dialogue category includes a business dialogue category and a casual chat dialogue category; a conversation processing module, configured to increase the priority of the corresponding conversation if the conversation category is a business conversation; and to count or time the corresponding conversation if the conversation category is a casual conversation, and when the counting or timing result of the conversation continuing to be a casual conversation reaches a preset threshold, obtain the service volume data of the current customer service server, and determine whether the service volume data of the current customer service server meets the preset priority reduction condition, and if so, reduce the priority of the corresponding conversation, and if not, do not reduce the priority of the corresponding conversation, wherein reducing the priority of the corresponding conversation includes one or more of directly transferring the manual customer service to the robot customer service, reducing the queue order of the manual customer service, and transferring to the manual customer service of a lower level or with a low historical score; The model training module is used to collect sample conversational texts; add conversation category labels to the sample conversational texts, wherein the conversation category labels include business conversation labels and small talk conversation labels; and train the conversational text classification model based on the sample conversational texts.
8. The conversational text classification system according to claim 7, characterized in that: When the model training module trains the conversational text classification model based on the sample conversational text, the classification weight of the business conversation is higher than the classification weight of the chat conversation.
9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having a computer program stored thereon, wherein the computer program, when executed by the processor, executes the method for classifying conversational text according to any one of claims 1 to 6.
10. A computer storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the method for classifying conversational text according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Method for chatting with online customer service representative
CN105162688A
Intelligent interaction method, electronic device and storage medium
CN108427722A
Automatic reply generation method and device
CN109753561A
Machine dialogue method and device, computer equipment and storage medium
CN110046221A
Multi-round dialogue method and device
CN111177359A
