CN113282755A - Dialogue type text classification method, system, equipment and storage medium - Google Patents

Dialogue type text classification method, system, equipment and storage medium Download PDF

Info

Publication number
CN113282755A
CN113282755A CN202110655090.8A CN202110655090A CN113282755A CN 113282755 A CN113282755 A CN 113282755A CN 202110655090 A CN202110655090 A CN 202110655090A CN 113282755 A CN113282755 A CN 113282755A
Authority
CN
China
Prior art keywords
conversation
text
type
dialog
dialogue
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110655090.8A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xunmeng Information Technology Co Ltd
Original Assignee
Shanghai Xunmeng Information Technology Co Ltd
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 Shanghai Xunmeng Information Technology Co Ltd filed Critical Shanghai Xunmeng Information Technology Co Ltd
Priority to CN202110655090.8A priority Critical patent/CN113282755A/en
Publication of CN113282755A publication Critical patent/CN113282755A/en
Pending legal-status Critical Current

Links

Images

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/35Clustering; Classification
    • 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
    • G06F16/3329Natural language query formulation or dialogue systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a system, equipment and a storage medium for classifying dialog type texts, wherein the method comprises the following steps: obtaining a dialog text to be classified; extracting the text features to be classified of the dialog type texts to be classified; inputting the text features to be classified into a trained dialog type text classification model; obtaining conversation types output by the conversation type text classification model, wherein the conversation types comprise service conversation types and chatting conversation types; if the conversation type is a service conversation, the corresponding conversation priority is improved; and if the conversation type is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation reaches a preset threshold value. The invention identifies and classifies the dialogue type texts, provides the chatting service for chatting dialogue clients and provides faster and better service for service dialogue clients.

Description

Dialogue type text classification method, system, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, a system, a device, and a storage medium for classifying dialog texts.
Background
In the process of solving the user logistics problem by the logistics customer service, the user has some chatting conversation contents which are started up and down, and the honor range of the chatting conversation is wide and unlimited.
In a conversation scene between a user and a logistics customer service, some users can consult the logistics service problem with the customer service, and some users only send chatting without actual intention or purpose to the logistics customer service. In order to improve the service experience of the customer, the chat conversation needs to be identified, so that the intelligent robot or the artificial customer service can provide faster and more accurate logistics service answers to the user logistics questions.
Disclosure of Invention
The present invention is directed to a method, a system, a device, and a storage medium for classifying dialog texts, which identify and classify dialog texts, provide chat services for chat clients, and provide faster and better service for service clients.
The embodiment of the invention provides a method for classifying dialog type texts, which comprises the following steps:
obtaining a dialog text to be classified;
extracting the text features to be classified of the dialog type texts to be classified;
inputting the text features to be classified into a trained dialog type text classification model;
obtaining conversation types output by the conversation type text classification model, wherein the conversation types comprise service conversation types and chatting conversation types;
if the conversation type is a service conversation, the corresponding conversation priority is improved;
and if the conversation category is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation which is continuously the chatting conversation reaches a preset threshold value.
In some embodiments, the conversational text classification model is a binary classification model.
In some embodiments, the conversational text classification model is a librinear binary classification model.
In some embodiments, the obtaining of the dialog-type text to be classified includes the following steps:
acquiring a customer service dialogue type text to be classified;
and extracting the client dialogue type text from the customer service dialogue type text to be classified as the dialogue type text to be classified.
In some embodiments, after determining the type of the dialog category, the method further includes the following steps:
if the dialog type output by the dialog type text classification model is a business dialog type, identifying the business type corresponding to the dialog type text to be classified, and generating a reply text according to the business type;
and if the dialogue category output by the dialogue type text classification model is the chatting dialogue category, generating a reply text based on a preset chatting dialogue reply rule.
In some embodiments, the method further comprises the steps of:
collecting sample dialogue type texts;
adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label;
training the conversational text classification model based on the sample conversational text.
In some embodiments, the classification weight of the business conversation is higher than the classification weight of the chat conversation when training the conversational text classification model based on the sample conversational text.
In some embodiments, the collecting sample conversational text includes collecting historical conversational text, extracting historical customer conversational text as the sample conversational text.
The embodiment of the invention also provides a dialog type text classification system, which is applied to the dialog type text classification method, and the system comprises:
the text acquisition module is used for acquiring the dialog text to be classified;
the feature extraction module is used for extracting the text features to be classified of the dialog texts to be classified;
the model input module is used for inputting the text features to be classified into the trained dialogue type text classification model;
and the text classification module is used for acquiring conversation types output by the conversation type text classification model, wherein the conversation types comprise service conversation types and chatting conversation types.
In some embodiments, the model training module is further included for collecting sample conversational text; adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label; and training the conversational text classification model based on the sample conversational text;
when the model training module trains the dialogue-type text classification model based on the sample dialogue-type text, the classification weight of the business dialogue is higher than that of the chat dialogue;
the dialogue processing module is used for improving the corresponding dialogue priority if the dialogue type is a business dialogue; and if the conversation type is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation which is continuously the chatting conversation reaches a preset threshold value.
An embodiment of the present invention further provides a dialog text classification device, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the conversational text classification method via execution of the executable instructions.
An embodiment of the present invention further provides a computer-readable storage medium for storing a program, where the program is executed by a processor to implement the steps of the dialog-type text classification method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The dialog type text classification method, the dialog type text classification system, the dialog type text classification equipment and the dialog type text classification storage medium have the following beneficial effects:
the method and the device identify and classify the dialogue type texts, respectively provide different service modes according to the classification result, provide the chatting service for chatting dialogue clients, reduce the priority of the chatting dialogue clients when the priority reduction condition is met, avoid excessive occupation of customer service resources, provide more sufficient customer service resources for the business dialogue clients, and improve the corresponding dialogue priority of the business dialogue clients, so that faster and better business service can be provided for the business dialogue clients.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
FIG. 1 is a flow diagram of a conversational text classification method according to an embodiment of the invention;
FIG. 2 is a flow diagram of generating a reply text in accordance with one embodiment of the present invention;
FIG. 3 is a flow diagram of processing a business conversation in accordance with an embodiment of the present invention;
FIG. 4 is a flow diagram of handling chat sessions according to an embodiment of the invention;
FIG. 5 is a flowchart of a training process for a conversational text classification model according to an embodiment of the invention;
FIG. 6 is a flow diagram of extracting sample conversational text, according to an embodiment of the invention;
FIG. 7 is a block diagram of a conversational text classification system according to an embodiment of the invention;
FIG. 8 is a schematic structural diagram of a dialog-type text classification apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of 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.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
As shown in fig. 1, an embodiment of the present invention provides a method for classifying dialog texts, including the following steps:
s100: obtaining a dialog text to be classified, wherein the dialog text can be collected in real time in the process of a client-service dialog;
s200: extracting the text features to be classified of the dialog type texts to be classified;
the text features to be classified can be extracted by segmenting the dialog text, then acquiring corresponding word vectors for each word, combining the word vectors to obtain the text features to be classified, or extracting the text features through a word2vec model or a convolutional neural network and other feature extraction models;
s300: inputting the text features to be classified into a trained dialog type text classification model;
s400: obtaining conversation types output by the conversation type text classification model, wherein the conversation types comprise service conversation types and chatting conversation types;
the business conversation category is mainly directly related to customer service business, such as business conversation of customer consultation "when express arrives", that is, belonging to logistics customer service. The chatting conversation is not related to the customer service, for example, the customer says "weather is good today" and belongs to the chatting conversation;
s500: judging the type of the dialog type output by the dialog type text classification model;
s600: if the conversation type is a service conversation, the corresponding conversation priority is improved;
in this embodiment, the dialog-type text to be classified is a text in a dialog currently in progress, and the corresponding dialog refers to a dialog from which the dialog-type text to be classified originates.
Specifically, ways to increase conversation priority may include, but are not limited to: the method comprises the following steps of directly switching the machine customer service to the artificial customer service, improving the queuing sequence of the artificial customer service, switching to the artificial customer service with a high level or a high historical score, or switching from the general-purpose robot customer service to the special-purpose robot customer service.
S700: and if the conversation category is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation which is continuously the chatting conversation reaches a preset threshold value.
Specifically, when the current dialogue category is the chat dialogue, counting the corresponding dialogues, that is, when it is currently detected that the dialogue type text to be classified in the ongoing dialogue is the chat dialogue, setting the number of the chat dialogues to be 1, continuously monitoring and identifying the new dialogue type text in the dialogue, and if a new chat dialogue appears, adding 1 to the number, where the continuous chat dialogue refers to continuously monitoring the chat dialogue. And if the counted number reaches a preset number threshold, reducing the corresponding conversation priority. And timing the corresponding conversation, namely starting timing when the current conversation to be classified in the ongoing conversation is detected to be a chatting conversation, continuously increasing the time until the service conversation is monitored if the chatting conversation is monitored all the time, and reducing the priority of the corresponding conversation if the timed time is greater than a preset time threshold.
Here, decreasing the corresponding conversation priority may include, but is not limited to: the method comprises the following steps of directly switching the artificial customer service to the robot customer service, reducing the queuing sequence of the artificial customer service, switching to the artificial customer service with a low level or low historical score, or switching from the special robot customer service to the general robot customer service.
The conversation type text classification method of the invention obtains the conversation type text and extracts the text characteristics through the steps S100 and S200, identifies and classifies the conversation type text through the steps S300 and S400, provides different service modes according to the classification result through the steps S500 to S700, provides the chatting service for chatting conversation clients, reduces the priority of the chatting conversation clients when the priority reducing condition is met, avoids excessive occupation of customer service resources, also provides more sufficient customer service resources for the business conversation clients, and promotes the corresponding conversation priority for the business conversation clients, thereby providing faster and better business service for the business conversation clients.
The dialog text classification method can be applied to the customer service servers in various service fields, obtains the dialog text to be classified in the customer service dialog in real time, and can determine the subsequent customer service strategy according to the classification type of the dialog text. The client communicates with the customer service server by using a mobile phone, a tablet computer, a notebook computer and other user terminals, the customer service is divided into a robot service and an artificial service, an algorithm of the robot service can be built in a customer service system or a robot service server is provided independently, and the artificial service communicates with the customer service server through the used computer and other terminals. Namely, the customer service server establishes a communication channel between the client and the customer service, and the client and the customer service can carry out a conversation based on the customer service server. The conversation type text classification method can also be applied to a single server, is communicated with the customer service server, acquires the conversation type text to be classified in the customer service conversation from the customer service server in real time, can determine the subsequent customer service strategy according to the classification type of the conversation type text, and sends the subsequent customer service strategy to the customer service server if the customer service strategy is updated compared with the previous moment.
Further, in the step S700, if the dialog category is a chat dialog, the method may further include starting a chat library. The chatting library is a special chatting corpus and can quickly find a corresponding reply sentence according to the content of the dialog text, if the current chat is the robot customer service, the corresponding reply sentence can be quickly fed back to a client according to the reply sentence inquired from the chatting library, if the current chat is the artificial customer service, the reply sentence can be inquired from the chatting library and sent to the artificial customer service, and the artificial customer service can quickly make a response by referring to the reply sentence;
in this embodiment, the conversational text classification model is a binary classification model, for example, the conversational text classification model may be a librinear binary classification model. The librinear is an improved version of a linear kernel of libsvm and is specially suitable for the classification of millions of data volumes. In other alternative embodiments, the conversational text classification model may also be other types of binary classification models, such as decision trees, logistic regression models, and so on. In addition, the dialogue-type text classification model can also be other types of machine learning models, such as a convolutional neural network model and the like.
In this embodiment, the dialog-type text classification method mainly classifies dialogs of clients during a client-server dialog, that is, judges whether to chat or service dialog according to the content of the dialogs spoken by the clients. The step S100: the method for acquiring the dialog text to be classified comprises the following steps:
the method comprises the steps of obtaining customer service conversational texts to be classified, wherein the customer service conversational texts comprise customer conversational texts sent by customers through client sides of the customers and customer service reply texts replied by customer service to the customer conversational texts;
and extracting the client dialogue type text from the customer service dialogue type text to be classified as the dialogue type text to be classified, namely, only recognizing the dialogue type text sent by the client, so that the workload of dialogue recognition is reduced, and the workload of a dialogue processing system is reduced.
As shown in fig. 2, in this embodiment, the step S500: after judging the type of the conversation category, the method also comprises the following steps:
s510: if the conversation type output by the conversation type text classification model is a business conversation type, identifying the business type corresponding to the conversation type text to be classified, generating a reply text according to the business type, for example, the business type can comprise mail inquiry, logistics time consultation type, logistics time service complaint type, logistics service complaint type and the like, presetting different reply rules according to different business types, for example, automatically inquiring the order of a client according to the logistics time consultation type, automatically inquiring the logistics process according to the order of the client and generating the reply text, firstly automatically generating a comfort statement for the logistics time complaint type, then inquiring a preset processing mechanism and the like, when the robot service is served, directly pushing the reply text to the client, when the robot service is served, pushing the reply text to the customer service, the customer service is assisted to quickly respond, and the session priority can be adjusted according to the subdivision of the service types, for example, the service type of the complaint logistics timeliness is improved;
specifically, as shown in fig. 2, the step S510: identifying the service type corresponding to the dialog text to be classified, and generating the reply text according to the service type may include the following steps:
s511: identifying the service type corresponding to the dialog text to be classified;
s512: loading a service reply corpus corresponding to the service type;
s513: and selecting a reply text matched with the dialog type text to be classified from the service reply corpus according to the dialog type text to be classified and a preset service reply matching rule.
S520: if the conversation type output by the conversation type text classification model is a chatting conversation type, generating a reply text based on a preset chatting conversation reply rule, specifically, the preset chatting conversation reply rule can be a matching rule with chatting linguistic data in a chatting library, and the chatting linguistic data is matched from the chatting library according to the conversation type text and the matching rule.
Further, in the step S700: after the chatting library is started, the dialog type text classification method further comprises the following steps:
detecting whether chat conversations exist in all current customer service servers;
and if the chatting conversations do not exist in all the current customer service servers, namely the current customer service conversations are all service conversations, the chatting library does not need to be continuously used, and the chatting library is closed.
Further, in the step S700: after the chatting library is started, the dialog type text classification method further comprises the following steps:
detecting whether robot customer service conversations exist in all current customer service servers;
if the robot customer service conversations do not exist in all the current customer service servers, the current customer service conversations show that the manual customer service is providing service, namely the manual customer service can meet the current customer service requirements, the chatting room does not need to be used continuously, and the chatting room is closed.
Further, as shown in fig. 3, in this embodiment, the step S600: if the conversation type is a service conversation, the corresponding conversation priority is improved, and the method comprises the following steps:
s610: obtaining client dialogue data of a corresponding dialogue, wherein the dialogue data can comprise all dialogue texts of a client in a previous preset time period in the dialogue and/or historical dialogue texts of the client before the dialogue;
s620: performing emotion analysis and/or character analysis on the client according to the client conversation data;
performing emotion analysis on the client, for example, inputting feature vectors of all conversational texts of the client in a preset time period before the conversation by using a pre-trained emotion recognition machine learning model to obtain an emotion category of the current client, where the emotion category may include, for example, dissatisfaction, anger, happiness, and the like; that is, the emotional analysis of the client is based primarily on the client's conversational text in the current conversation, regardless of the historical conversational text prior to the conversation; the emotion recognition machine learning model can adopt a convolutional neural network model or two classification models such as a support vector machine and a decision tree, and is trained by adopting a plurality of sample texts added with emotion classification labels in advance to obtain a converged emotion recognition machine learning model;
performing personality analysis on the client, for example, inputting all dialog texts of the client in a previous preset time period in the dialog and/or historical dialog texts of the client before the dialog by using a pre-trained personality recognition machine learning model, to obtain a personality category of the current client, where the personality category may include, for example, aggressive, steady, and the like; the identification of the client character can be based on the dialogue type text in the dialogue, and also can be based on all the historical dialogue type texts to carry out more objective comprehensive evaluation on the client; the character recognition machine learning model can adopt a convolutional neural network model or a support vector machine, a decision tree and other two classification models, and adopts a plurality of sample texts added with character category labels to train in advance to obtain a convergent character recognition machine learning model;
s630: judging whether a preset conversation priority improving condition is met or not according to the emotion analysis and/or character analysis;
for example, the conversation priority raising condition is preset to be that the recognized emotion is discontent or angry, or the conversation priority raising condition is preset to be that the recognized character is aggressive, or other conditions related to the emotion and/or character recognition result; the conversation priority improving condition can be adjusted according to different conditions;
s640: if so, the corresponding conversation priority is improved, and the method for improving the conversation priority can adopt the modes of directly transferring to the artificial customer service, transferring to the special robot customer service, transferring to a higher-level artificial customer service, transferring to an artificial customer service with higher history score and the like;
s650: otherwise, the corresponding conversation priority is not increased.
As shown in fig. 4, in the step S700, when the counting or counting result of the session duration being the chat session reaches a preset threshold, the step of decreasing the corresponding session priority includes the following steps:
s810: acquiring service volume data of a current customer service server, wherein the service volume data of the customer service server comprises but is not limited to: one or more of various data such as the access amount of the customer service server within a preset time range, the queuing number or the queuing duration of the artificial customer service, the number of the current idle artificial customer service, the number of the current chatting conversation, the number of the current service conversation, the number of the service conversations of various service types and the like;
s820: judging whether the service volume data of the current customer service server meets a preset priority reduction condition, for example, the priority reduction condition is set to include that the access volume of the current customer service server in a preset time range is larger than a preset access volume threshold, the queuing number of the manual customer service is larger than a preset number threshold, the manual queuing time is larger than a preset time threshold, and the like;
s830: if so, it indicates that the workload of the current customer service server is relatively large, and in order to provide more resource guarantees for the service session, the session priority corresponding to the chat session needs to be reduced, for example, as described above, the robot service is changed, the general robot service is changed, the queuing order of the manual service is reduced, and the like;
s840: if not, the corresponding conversation priority is not reduced.
As shown in fig. 5, in this embodiment, the dialog text classification method further includes a step of training the dialog text classification model, specifically, the dialog text classification model is trained by the following steps:
s910: collecting sample dialogue type texts;
s920: adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label;
for example, a dialog-type text is "what is so for XX mobile phone", which is a service dialog for store customer service of XX mobile phone, but is a chatty dialog for logistics customer service, and a dialog-type text is "how to update logistics", which is a service dialog for logistics customer service;
s930: training the conversational text classification model based on the sample conversational text;
during training, dividing the sample dialog type text into a training data set, a verification data set and a test data set, then adopting the training data set to iteratively train the dialog type text classification model, training until a loss function value is smaller than a preset threshold value, adopting the verification data set to carry out model verification, adopting the test data set to carry out testing, and after the testing is passed, deploying and applying the dialog type text classification model.
In this embodiment, the dialoging-type text classification model will be described as an example of a librinear two-classification model. As noted above, in other alternative embodiments, the conversational text classification model may also be a machine learning model of other classes. Because chatting conversation content is wide and unlimited in scope, data thereof cannot be completely collected. Therefore, in this embodiment, when the dialog-type text classification model is trained based on the sample dialog-type text, the classification weight of the business dialog is higher than that of the chatting dialog, and the obtained dialog-type text classification model can perform chatting recognition better.
As shown in fig. 6, in this embodiment, the S911: collecting sample conversational text, comprising S911: and collecting historical dialogue type texts, and extracting historical customer dialogue type texts as the sample dialogue type texts. Because the different fields of customer service encounter different types of customer dialogue text, the different fields of business dialogue and chat dialogue have different criteria. Thus, for a domain-specific conversational text classification model, samples thereof are preferably obtained from historical conversational text of the domain.
In the embodiment, in order to further improve the accuracy of the identification and classification of the service dialog, the service dialog is prevented from being mistakenly regarded as chatting dialog processing, and bad experience is brought to a client. After the service conversation is identified, if the service conversation of a certain service type cannot be identified, a very accurate service reply cannot be made during subsequent reply. Therefore, when training the dialogue-type text classification model, sample dialogue-type texts of various service types are required to be included, and the number of the sample dialogue-type texts of the various service types is balanced.
As shown in fig. 6, the step S911: after extracting the historical client dialog type text as the sample dialog type text, the method also comprises the following steps:
s912: dividing the sample dialogue type text into a service dialogue category and a chatting dialogue category;
s913: dividing the sample dialogue-type texts of the business dialogue categories into sample dialogue-type texts of various business types, wherein the business types can include a mail query, a logistics time consultation type, a logistics time complaint type, a logistics service complaint type and the like as described above;
s914: judging whether the number of the sample dialog type texts of each service type is within a preset sample number range or not; the preset sample number range comprises a preset sample number maximum value and a preset sample number minimum value, and the numerical range between the maximum value and the minimum value is the preset sample number range;
s915: if the number of the sample dialogue type texts of one service type is larger than the maximum value of the preset sample number, the balance among samples of various service types can be influenced due to the fact that the number of the sample dialogue type texts of the service type is too large, and the sample dialogue type texts exceeding the maximum value of the preset sample number in the service type are removed;
when the sample dialogue type texts exceeding the maximum value of the preset sample number are eliminated, the sample dialogue type texts with high similarity with other sample dialogue texts are preferably eliminated, and the method specifically comprises the following steps:
calculating the similarity of every two text vectors of the sample conversational texts of the service type, and sequencing the obtained similarity results from large to small;
sequentially selecting the similarity results from front to back according to the similarity result sorting sequence, and removing a sample dialogue type text corresponding to the selected similarity result until the sample dialogue type text in the service type is less than or equal to the maximum value of the preset sample number;
s916: if the number of the sample dialogue type texts of a service type is smaller than the minimum value of the preset sample number, the number of the sample dialogue type texts of the service type is insufficient, the sample dialogue type texts of the service type are expanded until the number of the sample dialogue type texts of the service type is larger than or equal to the minimum value of the preset sample number, and therefore each service type is guaranteed to have enough samples for training;
the sample dialogue-type text of the service type is expanded, and some words in the sample dialogue-type text can be replaced, for example, when the express arrives, "instead of" when the express arrives, "how the express does not yet arrive" instead of "how the package does not yet arrive," and the replaced text is also used as the sample dialogue-type text;
s917: and if the number of the sample dialog type texts of the service type is between the maximum value of the preset sample number and the minimum value of the preset sample number, keeping the sample dialog type texts of the service type unchanged.
As shown in fig. 7, an embodiment of the present invention further provides a dialog text classification system, which is applied to the dialog text classification method, and the system includes:
the system comprises a text acquisition module M100, a text classification module M and a text classification module M, wherein the text acquisition module M100 is used for acquiring the dialog type text to be classified, the text acquisition module M100 can be communicated with a customer service server or is in data interaction with a customer service data management module of the customer service server, and the dialog type text is acquired in real time in the process of a customer service dialog;
the feature extraction module M200 is configured to extract text features to be classified of the dialog text to be classified, where the feature extraction module M200 may extract the text features to be classified by segmenting the dialog text, then obtaining a corresponding word vector for each word, and combining the word vectors to obtain the text features to be classified, or may extract the text features by using a feature extraction model such as a word2vec model or a convolutional neural network;
the model input module M300 is used for inputting the characteristics of the text to be classified into the trained conversational text classification model;
the text classification module M400 is configured to obtain a dialog category output by the dialog type text classification model, where the dialog category includes a service dialog category and a chat dialog category;
the dialog processing module M500 is configured to, if the dialog category is a service dialog, increase a corresponding dialog priority, where the manner of increasing the dialog priority may include, but is not limited to: the method comprises the following steps that one or more of various modes such as direct switching of machine customer service to artificial customer service, improvement of queuing sequence of the artificial customer service, switching to the artificial customer service with a high level or high historical score, or switching from general-purpose robot customer service to special-purpose robot customer service; and if the dialog category is a chat dialog, counting or timing the corresponding dialog, and when the counting or timing result of the dialog reaches a preset threshold, reducing the corresponding dialog priority, where reducing the corresponding dialog priority may include, but is not limited to: the method comprises the following steps of directly switching the artificial customer service to the robot customer service, reducing the queuing sequence of the artificial customer service, switching to the artificial customer service with a low level or low historical score, or switching from the special robot customer service to the general robot customer service.
The dialog type text classification system of the invention obtains dialog type texts and extracts text features through the text obtaining module M100 and the feature extraction module M200, identifies and classifies the dialog type texts through the model input module M300 and the text classification module M400, and provides different service modes according to classification results through the text classification module M400 respectively, provides chatting services for chatting dialog clients, and reduces the priority of the chatting dialog clients when the priority reducing condition is met, avoids excessive occupation of customer service resources, also provides more sufficient customer service resources for business dialog clients, and promotes the corresponding dialog priority for the business dialog clients, thereby providing faster and better business services for the business dialog clients.
The dialog type text classification system can be applied to customer service servers in various service fields, obtains dialog type texts to be classified in a customer service dialog in real time, and can determine a subsequent customer service strategy according to the classification type of the dialog type texts. The client communicates with the customer service server by using a mobile phone, a tablet computer, a notebook computer and other user terminals, the customer service is divided into a robot service and an artificial service, an algorithm of the robot service can be built in a customer service system or a robot service server is provided independently, and the artificial service communicates with the customer service server through the used computer and other terminals. Namely, the customer service server establishes a communication channel between the client and the customer service, and the client and the customer service can carry out a conversation based on the customer service server. The dialogue type text classification system can also be applied to a single server, is communicated with the customer service server, acquires the dialogue type text to be classified in the customer service dialogue from the customer service server in real time, can determine a subsequent customer service strategy according to the classification type of the dialogue type text, and sends the strategy to the customer service server if the customer service strategy is updated compared with the previous moment.
In this embodiment, the dialog-type text classification system further includes a model training module for collecting sample dialog-type text; adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label; and training the conversational text classification model based on the sample conversational text. The model training module may be, for example, a librinear binary model, or other type of machine learning model.
In this embodiment, the model training module trains the dialogue-based text classification model based on the sample dialogue-based text, and the business dialogue has a higher classification weight than the chat dialogue.
The embodiment of the invention also provides dialog type text classification equipment, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the conversational text classification method via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 600 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the electronic device 600 is embodied in the form of a general purpose 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 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the above-mentioned dialog-based text classification method section of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, 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.
The memory 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 thereof, may comprise an implementation of a network environment.
Bus 630 may be 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.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may 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 the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, 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, among others.
In the dialog text classification device, the program in the memory implements the steps of the dialog text classification method when executed by the processor, and thus the computer storage medium can also achieve the technical effects of the dialog text classification method described above.
An embodiment of the present invention further provides a computer-readable storage medium for storing a program, where the program is executed by a processor to implement the steps of the dialog-type text classification method. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the invention described in the above section of the dialog-type text classification method of this specification, when the program product is executed on the terminal device.
Referring to fig. 9, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind 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).
The program in the computer storage medium, when executed by a processor, implements the steps of the dialog-type text classification method, and thus the computer storage medium may also achieve the technical effects of the dialog-type text classification method described above.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (12)

1. A conversational text classification method, the method comprising:
obtaining a dialog text to be classified;
extracting the text features to be classified of the dialog type texts to be classified;
inputting the text features to be classified into a trained dialog type text classification model;
obtaining conversation types output by the conversation type text classification model, wherein the conversation types comprise service conversation types and chatting conversation types;
if the conversation type is a service conversation, the corresponding conversation priority is improved;
and if the conversation category is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation which is continuously the chatting conversation reaches a preset threshold value.
2. The conversational text classification method of claim 1, wherein the conversational text classification model is a binary classification model.
3. The method of claim 2, wherein the conversational text classification model is a librinear binary classification model.
4. The method for classifying dialog-type text according to claim 1, wherein the step of obtaining the dialog-type text to be classified comprises the steps of:
acquiring a customer service dialogue type text to be classified;
and extracting the client dialogue type text from the customer service dialogue type text to be classified as the dialogue type text to be classified.
5. The dialog text classification method according to claim 4, characterized in that after determining the type of the dialog class, it further comprises the following steps:
if the dialog type output by the dialog type text classification model is a business dialog type, identifying the business type corresponding to the dialog type text to be classified, and generating a reply text according to the business type;
and if the dialogue category output by the dialogue type text classification model is the chatting dialogue category, generating a reply text based on a preset chatting dialogue reply rule.
6. The conversational text classification method of claim 1, further comprising the steps of:
collecting sample dialogue type texts;
adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label;
training the conversational text classification model based on the sample conversational text.
7. The dialog text classification method according to claim 6, characterized in that the classification weight of the business dialog is higher than the classification weight of the chat dialog when the dialog text classification model is trained on the sample dialog text.
8. The dialog text classification method according to claim 6, characterized in that the collecting of sample dialog text comprises collecting historical dialog text, extracting historical customer dialog text as the sample dialog text.
9. A conversational text classification system, for use in the method of any one of claims 1 to 8, the system comprising:
the text acquisition module is used for acquiring the dialog text to be classified;
the feature extraction module is used for extracting the text features to be classified of the dialog texts to be classified;
the model input module is used for inputting the text features to be classified into the trained dialogue type text classification model;
the text classification module is used for acquiring conversation types output by the conversation type text classification model, and the conversation types comprise service conversation types and chatting conversation types;
the dialogue processing module is used for improving the corresponding dialogue priority if the dialogue type is a business dialogue; and if the conversation type is the chatting conversation, counting or timing the corresponding conversation, and reducing the corresponding conversation priority when the counting or timing result of the conversation which is continuously the chatting conversation reaches a preset threshold value.
10. The conversational text classification system of claim 9, further comprising a model training module to collect sample conversational text; adding conversation category labels to the sample conversation type text, wherein the conversation category labels comprise a business conversation label and a chatting conversation label; and training the conversational text classification model based on the sample conversational text;
and when the model training module trains the dialogue-type text classification model based on the sample dialogue-type text, the classification weight of the business dialogue is higher than that of the chat dialogue.
11. An electronic device, characterized in that the electronic device comprises:
a processor;
memory on which a computer program is stored which, when executed by the processor, performs the dialog-type text classification method according to any of claims 1 to 8.
12. A computer storage medium, in which a computer program is stored which, when being executed by a processor, carries out the dialog text classification method according to any one of claims 1 to 8.
CN202110655090.8A 2021-06-11 2021-06-11 Dialogue type text classification method, system, equipment and storage medium Pending CN113282755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110655090.8A CN113282755A (en) 2021-06-11 2021-06-11 Dialogue type text classification method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110655090.8A CN113282755A (en) 2021-06-11 2021-06-11 Dialogue type text classification method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113282755A true CN113282755A (en) 2021-08-20

Family

ID=77284361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110655090.8A Pending CN113282755A (en) 2021-06-11 2021-06-11 Dialogue type text classification method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282755A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427722A (en) * 2018-02-09 2018-08-21 卫盈联信息技术(深圳)有限公司 intelligent interactive method, electronic device and storage medium
CN109753561A (en) * 2019-01-16 2019-05-14 长安汽车金融有限公司 A kind of generation method automatically replied and device
CN110046221A (en) * 2019-03-01 2019-07-23 平安科技(深圳)有限公司 A kind of machine dialogue method, device, computer equipment and storage medium
CN111177359A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Multi-turn dialogue method and device
CN111667926A (en) * 2020-06-06 2020-09-15 中国科学院心理研究所 Psychological consultation (conversation) system and method based on artificial intelligence
CN111782793A (en) * 2020-08-11 2020-10-16 深圳市北科瑞声科技股份有限公司 Intelligent customer service processing method, system and equipment
CN111783439A (en) * 2020-06-28 2020-10-16 平安普惠企业管理有限公司 Man-machine interaction dialogue processing method and device, computer equipment and storage medium
CN112182220A (en) * 2020-10-10 2021-01-05 携程计算机技术(上海)有限公司 Customer service early warning analysis method, system, equipment and medium based on deep learning

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427722A (en) * 2018-02-09 2018-08-21 卫盈联信息技术(深圳)有限公司 intelligent interactive method, electronic device and storage medium
CN109753561A (en) * 2019-01-16 2019-05-14 长安汽车金融有限公司 A kind of generation method automatically replied and device
CN110046221A (en) * 2019-03-01 2019-07-23 平安科技(深圳)有限公司 A kind of machine dialogue method, device, computer equipment and storage medium
CN111177359A (en) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 Multi-turn dialogue method and device
CN111667926A (en) * 2020-06-06 2020-09-15 中国科学院心理研究所 Psychological consultation (conversation) system and method based on artificial intelligence
CN111783439A (en) * 2020-06-28 2020-10-16 平安普惠企业管理有限公司 Man-machine interaction dialogue processing method and device, computer equipment and storage medium
CN111782793A (en) * 2020-08-11 2020-10-16 深圳市北科瑞声科技股份有限公司 Intelligent customer service processing method, system and equipment
CN112182220A (en) * 2020-10-10 2021-01-05 携程计算机技术(上海)有限公司 Customer service early warning analysis method, system, equipment and medium based on deep learning

Similar Documents

Publication Publication Date Title
CN110377911B (en) Method and device for identifying intention under dialog framework
KR102288249B1 (en) Information processing method, terminal, and computer storage medium
CN111428010B (en) Man-machine intelligent question-answering method and device
CN110019742B (en) Method and device for processing information
CN111883115B (en) Voice flow quality inspection method and device
CN110597952A (en) Information processing method, server, and computer storage medium
CN111897935B (en) Knowledge graph-based conversational path selection method and device and computer equipment
CN110223134B (en) Product recommendation method based on voice recognition and related equipment
CN114416943B (en) Training method and device for dialogue model, electronic equipment and storage medium
CN111177186A (en) Question retrieval-based single sentence intention identification method, device and system
US20230072171A1 (en) System and method for training and refining machine learning models
CN110633475A (en) Natural language understanding method, device and system based on computer scene and storage medium
CN111737987A (en) Intention recognition method, device, equipment and storage medium
CN112632248A (en) Question answering method, device, computer equipment and storage medium
CN112100339A (en) User intention recognition method and device for intelligent voice robot and electronic equipment
CN113591463B (en) Intention recognition method, device, electronic equipment and storage medium
CN114817478A (en) Text-based question and answer method and device, computer equipment and storage medium
CN110826327A (en) Emotion analysis method and device, computer readable medium and electronic equipment
CN110750626B (en) Scene-based task-driven multi-turn dialogue method and system
CN114297359A (en) Dialog intention recognition method and device, electronic equipment and readable storage medium
CN116881730A (en) Chat scene matching system, method, equipment and storage medium based on context
CN116978367A (en) Speech recognition method, device, electronic equipment and storage medium
CN113282755A (en) Dialogue type text classification method, system, equipment and storage medium
CN115688758A (en) Statement intention identification method and device and storage medium
KR102386898B1 (en) Apparatus and method for providing question and answer service base on intents

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination