CN113742480A - Customer service response method and device - Google Patents

Customer service response method and device Download PDF

Info

Publication number
CN113742480A
CN113742480A CN202010560031.8A CN202010560031A CN113742480A CN 113742480 A CN113742480 A CN 113742480A CN 202010560031 A CN202010560031 A CN 202010560031A CN 113742480 A CN113742480 A CN 113742480A
Authority
CN
China
Prior art keywords
classification result
dimensional
statement
target
scene
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
CN202010560031.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.)
Beijing Huijun Technology Co ltd
Original Assignee
Beijing Huijun 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 Beijing Huijun Technology Co ltd filed Critical Beijing Huijun Technology Co ltd
Priority to CN202010560031.8A priority Critical patent/CN113742480A/en
Publication of CN113742480A publication Critical patent/CN113742480A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention discloses a customer service response method and a customer service response device, and relates to the technical field of computers. One embodiment of the method comprises: obtaining a sentence to be answered, and identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention identification model; acquiring a slot filling statement corresponding to a statement to be answered, and determining a target multidimensional classification result corresponding to the statement to be answered according to the first multidimensional classification result and the slot filling statement; and generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene. The implementation method can simplify the system architecture, reduce the model training cost, improve the reusability of the model, and improve the accuracy rate and the response accuracy rate of the intention recognition result.

Description

Customer service response method and device
Technical Field
The invention relates to the technical field of computers, in particular to a customer service response method and a customer service response device.
Background
In the application scene of the intelligent response system, the most extensive application scene is intelligent customer service, and a quick and effective technical means based on natural language is established for communication between enterprises and mass users. In the intelligent customer service response method, an intention recognition model is used for recognizing user intentions, the recognized user intentions are used as conditions for entering a response scene, a groove filling question back is carried out in the response scene according to scene requirements, after the user answers the question back, the intention recognition model is used for re-recognizing the scene and completing the groove filling, and finally a response answer is obtained.
However, the existing intention recognition model belongs to a multilayer model, and due to diversification of user requirements, the number of layers and models of each layer is more and more, so that the complexity and maintenance difficulty of the system are higher, the reusability of the model is not high, and the training cost is higher. In addition, in the process of filling the slot and asking back, because the expression modes of the user responses are different, scene switching is easy to occur, and the response accuracy rate is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a customer service response method and apparatus, which can simplify a system architecture, reduce model training cost, improve model reusability, and improve accuracy of an intention recognition result and response accuracy.
To achieve the above object, according to a first aspect of embodiments of the present invention, a customer service response method is provided.
The customer service response method of the embodiment of the invention comprises the following steps: obtaining a statement to be answered, and identifying a first multi-dimensional classification result corresponding to the statement to be answered based on a multi-dimensional intention identification model; acquiring a slot filling statement corresponding to the statement to be answered, and determining a target multi-dimensional classification result corresponding to the statement to be answered according to the first multi-dimensional classification result and the slot filling statement; and generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene.
Optionally, the method further comprises: obtaining a historical response log, and carrying out dimension marking on the historical response log according to a preset dimension attribute to obtain a multi-dimensional marking result; training a sub-intention recognition model corresponding to the dimension attributes according to the multi-dimensional labeling result based on a deep learning model, and forming the multi-dimensional intention recognition model by using the sub-intention recognition model corresponding to the dimension attributes; and the input of the multi-dimensional intention recognition model is a statement, and the output is a classification result of the statement on the dimension attribute.
Optionally, the obtaining a slot filling statement corresponding to the to-be-answered statement, and determining a target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement includes: judging whether a scene slot is required to be filled; if yes, acquiring the filling sentence, identifying a second multi-dimensional classification result corresponding to the filling sentence by using the multi-dimensional intention identification model, and determining the target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result; if not, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result.
Optionally, the determining the target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result includes: judging whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result; if so, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result; if not, obtaining a difference classification result and a same classification result in the second multi-dimensional classification result, calculating a correlation weight of the difference classification result and the same classification result, and determining the target multi-dimensional classification result according to the correlation weight according to a preset intention inheritance rule.
Optionally, the calculating the relevance weights of the different classification results and the same classification result includes at least one of the following options: according to a historical response log, counting a first frequency of occurrence of the difference classification result, a second frequency of occurrence of the same classification result and a third frequency of occurrence of the difference classification result and the same classification result at the same time, and then according to the first frequency, the second frequency and the third frequency, calculating a correlation weight of the difference classification result and the same classification result; and calculating a correlation weight value table according to the historical response log, and then inquiring the correlation weight values of the difference classification results and the same classification results from the correlation weight value table.
Optionally, the determining the target multidimensional classification result according to the relevance weight according to a preset intention inheritance rule includes: judging whether the correlation weight is greater than a preset weight or not; if so, determining the second multi-dimensional classification result as the target multi-dimensional classification result; and if not, according to the difference classification result, performing de-entity generalization processing on the filling sentence, then utilizing the multi-dimensional intention recognition model to perform recognition to obtain a third multi-dimensional classification result, and determining the target classification result according to the third multi-dimensional classification result.
Optionally, the generating a response sentence corresponding to the sentence to be responded according to the target multidimensional classification result based on the mapping relationship between the classification result and the scene includes: matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene; and generating a response statement corresponding to the statement to be responded under the target scene.
Optionally, before matching the target scene corresponding to the target multi-dimensional classification result, the method further includes: acquiring an online response log and a scene corresponding to the online response log; classifying the on-line response logs by using the multi-dimensional intention recognition model to obtain multi-dimensional classification results corresponding to the on-line response logs; and establishing a mapping relation between the classification result and the scene according to the multi-dimensional classification result corresponding to the on-line response log and the scene corresponding to the on-line response log.
To achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided a customer service response device.
The customer service answering device of the embodiment of the invention comprises: the recognition module is used for acquiring a sentence to be answered, recognizing a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention recognition model; a determining module, configured to obtain a slot filling statement corresponding to the to-be-answered statement, and determine a target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement; and the generating module is used for generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result on the basis of the mapping relation between the classification result and the scene.
Optionally, the apparatus further comprises a training module for: obtaining a historical response log, and carrying out dimension marking on the historical response log according to a preset dimension attribute to obtain a multi-dimensional marking result; training a sub-intention recognition model corresponding to the dimension attributes according to the multi-dimensional labeling result based on a deep learning model, and forming the multi-dimensional intention recognition model by using the sub-intention recognition model corresponding to the dimension attributes; and the input of the multi-dimensional intention recognition model is a statement, and the output is a classification result of the statement on the dimension attribute.
Optionally, the determining module is further configured to: judging whether a scene slot is required to be filled; if yes, acquiring the filling sentence, identifying a second multi-dimensional classification result corresponding to the filling sentence by using the multi-dimensional intention identification model, and determining the target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result; if not, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result.
Optionally, the determining module is further configured to: judging whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result; if so, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result; if not, obtaining a difference classification result and a same classification result in the second multi-dimensional classification result, calculating a correlation weight of the difference classification result and the same classification result, and determining the target multi-dimensional classification result according to the correlation weight according to a preset intention inheritance rule.
Optionally, the determining module is further configured to: according to a historical response log, counting a first frequency of occurrence of the difference classification result, a second frequency of occurrence of the same classification result and a third frequency of occurrence of the difference classification result and the same classification result at the same time, and then according to the first frequency, the second frequency and the third frequency, calculating a correlation weight of the difference classification result and the same classification result; and calculating a correlation weight value table according to the historical response log, and then inquiring the correlation weight values of the difference classification results and the same classification results from the correlation weight value table.
Optionally, the determining module is further configured to: judging whether the correlation weight is greater than a preset weight or not; if so, determining the second multi-dimensional classification result as the target multi-dimensional classification result; and if not, according to the difference classification result, performing de-entity generalization processing on the filling sentence, then utilizing the multi-dimensional intention recognition model to perform recognition to obtain a third multi-dimensional classification result, and determining the target classification result according to the third multi-dimensional classification result.
Optionally, the generating module is further configured to: matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene; and generating a response statement corresponding to the statement to be responded under the target scene.
Optionally, the apparatus further comprises a setup module configured to: acquiring an online response log and a scene corresponding to the online response log; classifying the on-line response logs by using the multi-dimensional intention recognition model to obtain multi-dimensional classification results corresponding to the on-line response logs; and establishing a mapping relation between the classification result and the scene according to the multi-dimensional classification result corresponding to the on-line response log and the scene corresponding to the on-line response log.
To achieve the above object, according to a third aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors realize the customer service response method of the embodiment of the invention.
To achieve the above object, according to a fourth aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, and the program, when executed by a processor, implements a customer service response method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the method can utilize the multi-dimensional intention recognition model to perform intention recognition on the sentences to be responded, solves the problems of high system complexity and maintenance difficulty, low model reusability and high training cost caused by multiple layers of intention recognition models in the prior art, can also utilize the slot filling sentences to correct the first multi-dimensional classification result to obtain a target multi-dimensional classification result, improves the accuracy of the intention recognition result, generates the answer sentences by utilizing the mapping relation between the classification result and the scenes and combining the target multi-dimensional classification result, solves the problem of scene switching caused by different expression modes of user answers in the prior art, and improves the answer accuracy.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a customer service response method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of a method of training a multi-dimensional intent recognition model according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a main flow of a method for establishing a mapping relationship between a classification result and a scene according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating the use of a graph database to store a mapping of classification results to scenes in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of a main flow of a method for determining a target multi-dimensional classification result from a first multi-dimensional classification result and a slot-filling statement according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a main flow of a customer service response method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of the main blocks of a customer service answering device according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The intelligent customer service mainly comprises two parts of intention identification and answer session management. The intention recognition is used for recognizing the intention of the user, the intention recognition can use a deep learning technology to carry out model classification on the user question, and the intention of the user is determined based on the classification result to obtain an intention recognition result; and the response session management is used for matching a response scene based on the intention recognition result, performing slot filling and question returning in the scene according to the scene requirements, recognizing the intention of the user by using the intention recognition model again after the user inputs the question, reentering the scene, completing slot filling, and finally returning the response answer of the user. The task filling method comprises the steps of filling a slot, namely a process of completing information for converting user intention into a user-specific instruction, taking interaction between a user and a task robot as an example, supplementing user information through multiple rounds of interaction, and finally achieving the purpose of task completion, wherein the process of supplementing the user information is the slot filling.
Table 1 shows an example of the intelligent response method, where the intelligent customer service performs intent recognition on the user question "i want to modify an order" to obtain an intent recognition result "modify an order", then the intelligent customer service performs a slot filling response "ask you to enter an order number", performs intent recognition again after obtaining an order number "10649835 XXXX" to obtain a result "modify an order", and then returns a response answer "your order is shipped and cannot be modified; you can choose to cancel or reject the order and then place the order ".
Figure BDA0002545958410000071
TABLE 1
In the existing intelligent customer service response method, an intention identification model is used as a multilayer model, a large business scene mapped with the intention of a user is identified through a top layer model, then a sub-model corresponding to the large business scene is entered, and a sub-scene mapped with the intention of the user is identified through the sub-model. However, as responses become finer and finer, the disadvantages of this identification approach become more and more evident: (1) along with the refinement of identification, the top-level model classification and the sub-model classification are more and more, and the level number is more and more, so that the complexity and the maintenance difficulty of the system are more and more high; (2) the reusability of the submodel is not high, and a large amount of training models are needed during service expansion, so that the training cost of the models is high. In addition, in the process of multi-round interaction of a user in a scene, the user is asked backwards based on the configuration of scene slot filling, and scene switching is easy to happen due to different expression modes of the user, so that response and answer are asked, the response accuracy is reduced, and the user experience is poor.
In order to solve the above problems, embodiments of the present invention provide a customer service response method, which can simplify a system architecture, reduce model training cost, improve model reusability, and improve response session fluency and response experience under the condition that intent recognition accuracy and scene response accuracy are guaranteed. Fig. 1 is a schematic diagram of a main flow of a customer service response method according to an embodiment of the present invention. As shown in fig. 1, the main flow of the customer service response method may include steps S101 to S103.
Step S101: and acquiring a sentence to be answered, and identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on the multi-dimensional intention identification model.
The multi-dimensional intention recognition model is composed of a plurality of sub-intention recognition models, the multi-dimensional intention recognition model is used for carrying out intention recognition on the to-be-responded statement, and a multi-dimensional classification result corresponding to the to-be-responded statement can be obtained, namely the multi-dimensional intention recognition model is used for carrying out intention recognition on the to-be-responded statement, and the classification result of the to-be-responded statement on the plurality of sub-intention recognition models is obtained. For example, the multidimensional intention recognition model M includes A, B and C, which are 3 sub-intention recognition models, and performs intention recognition on a sentence to be answered by using M, that is, performs intention recognition on a sentence to be answered by using a to obtain a classification result a, performs intention recognition on a sentence to be answered by using B to obtain a classification result B, and performs intention recognition on a sentence to be answered by using C to obtain a classification result C.
It should be noted that the to-be-answered statement is equivalent to a statement sent to the intelligent customer service, such as "how to modify the order address if the address is filled in by mistake". In order to distinguish the appearing multi-dimensional classification results, the present embodiment of the invention is limited by the "first multi-dimensional classification result", the "second multi-dimensional classification result", and the "third multi-dimensional classification result".
In the embodiment of the invention, a multi-dimensional intention recognition model is adopted to replace a multi-layer intention recognition model in the prior art, so that the classification in the model can be reduced, the multi-layer intention recognition model in the prior art is equivalent to a single-dimensional intention recognition model, the subdivision intentions in a large business scene need to be recognized independently, for example, sentences to be answered are 'order modification', 'order modification address', 'order modification telephone', 'invoice modification address', 'invoice modification heading', 6 classifications are required to be recognized, and the repetition degree of the corpus combing and model training contents is high when a business scene is added. However, in the embodiment of the invention, a multi-dimensional intention recognition model is adopted, the action sub-intention recognition model only needs to recognize ' modification ', the business sub-intention recognition model recognizes ' orders ' and ' invoices ', the business entity sub-intention recognition model recognizes ' addresses ', telephones ' and ' heads up ', other sub-intention recognition models can be recognized as null values, so that in the model of each dimension, the classification is greatly reduced, the training difficulty is reduced, the accuracy is improved, the recognition performance is also improved, the classification result on the attribute of each dimension can be reused under different business scenes, and the repeated training work is reduced.
Step S102: and acquiring a slot filling statement corresponding to the statement to be answered, and determining a target multi-dimensional classification result corresponding to the statement to be answered according to the first multi-dimensional classification result and the slot filling statement.
In the embodiment of the invention, the statements to be answered can be analyzed by combining the context, the slot filling question is sent to the user according to the requirement, and then the slot filling statements input by the user are obtained. The slot filling access is to supplement user information, the intelligent customer service sends a question and answer sentence to the user, for example, the user sends a to-be-answered sentence to the intelligent customer service, namely, the user sends the to-be-answered sentence, namely, "address misfilling, how to modify an order address", the intelligent customer service can generate a slot filling question back "how many order numbers are", and then the user inputs a slot filling sentence, namely, "order number is 123456 XXXX". In addition, the statements to be answered and the context can be analyzed and then the back-questioned slots can be performed based on the dialogue management technique and the natural language generation technique. The dialogue management technology can estimate the target of a user in each turn of the dialogue, manage the input and the dialogue history of each turn, output the current dialogue state, and output the next system behavior and the updated dialogue state based on the semantic expression input by the user and the current dialogue state; the natural language generation technology can generate fluent and readable natural language sentences from semantic expression output by the dialogue strategy and feed the sentences back to the user.
After the slot filling sentence input by the user is obtained, the first multi-dimensional classification result can be corrected by combining the slot filling sentence, a target multi-dimensional classification result corresponding to the sentence to be responded is obtained, and the accuracy of the multi-dimensional classification result is improved.
Step S103: and generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene.
In a referential embodiment of the present invention, generating a response sentence corresponding to a sentence to be responded according to a target multidimensional classification result based on a mapping relationship between the classification result and a scene may include: matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene; and generating a response statement corresponding to the statement to be responded under the target scene.
After a target multi-dimensional classification result corresponding to the sentence to be responded is obtained, a target scene corresponding to the target multi-dimensional classification result is matched in the mapping relation between the classification result and the scene, and then the responding sentence is generated according to the context and the target scene. The method comprises the steps of obtaining a target multi-dimensional classification result, obtaining a target scene corresponding to the target multi-dimensional classification result, and selecting a matching scene arranged at the first position as a target scene, wherein the target scene corresponding to the target multi-dimensional classification result can be matched in a matching mode of a regular expression, considering that one or more matching scenes can be returned, and then sorting the matching scenes, and then entering the target scene for response. For example, if the to-be-responded statement of the user is that the order address needs to be modified after the delivery address is filled in by mistake, the finally obtained target scene is the scene of modifying the order address, and the order number is obtained according to the context, then the state of the order number is inquired in the scene of modifying the order address, and a response statement that your order is delivered and cannot be modified is generated; you can choose to cancel or reject the order and then place the order ".
In the technical scheme of the customer service response, the multi-dimensional intention recognition model can be used for performing intention recognition on the to-be-responded sentences, the problems of high system complexity and maintenance difficulty, low model reusability and high training cost caused by multiple layers of intention recognition models in the prior art are solved, the first multi-dimensional classification result can be corrected by using the slot filling sentences to obtain the target multi-dimensional classification result, the accuracy of the intention recognition result is improved, the response sentences are generated by using the mapping relation between the classification result and the scene and combining the target multi-dimensional classification result, the problem of scene switching caused by different expression modes of user responses in the prior art is solved, and the response accuracy is improved.
In the embodiment of the invention, the multi-dimensional intention recognition model is required to be used for intention recognition, and the answer sentence is generated by means of the mapping relation between the classification result and the scene, so that the training of the multi-dimensional intention recognition model and the establishment of the mapping relation between the classification result and the scene can be regarded as data initialization processing. Next, a method of training a model and a method of establishing a mapping relationship will be described in detail.
FIG. 2 is a schematic diagram of a main flow of a method of training a multi-dimensional intent recognition model according to an embodiment of the present invention. As shown in FIG. 2, the main flow of the method for training the multi-dimensional intent recognition model may include:
step S201, obtaining a historical response log, and performing dimension marking on the historical response log according to a preset dimension attribute to obtain a multi-dimensional marking result;
step S202, training a child intention recognition model corresponding to the dimension attribute according to a multi-dimensional labeling result based on a deep learning model;
step S203, a multi-dimensional intention recognition model is formed by using the sub-intention recognition models corresponding to the dimension attributes.
The multi-dimensional intention recognition model is composed of a plurality of sub-intention recognition models, and each sub-intention recognition model is obtained through training according to preset dimension attributes. The preset latitude attributes may include: the multi-dimensional intention recognition model is composed of the action sub-intention recognition model, the business entity sub-intention recognition model, the scenario sub-intention recognition model and the question sub-intention recognition model.
The specific training process may be that, in step S201, a historical response log is obtained, and then dimension labeling is performed on the historical response log according to a preset dimension attribute, so as to obtain a labeling result. The historical response log may be a historical response dialog of the user with the intelligent customer service, such as a historical response dialog of the previous two months. And then, carrying out multi-dimensional labeling on the historical response log on preset dimension attributes, such as labeling the historical response log on action attributes, service entity attributes, scenario attributes and inquiry attributes respectively. Table 2 is a multi-dimensional labeling example table of the history response log according to an embodiment of the present invention.
Figure BDA0002545958410000111
TABLE 2
After the history response log is multi-dimensionally labeled through step S201, a multi-dimensional labeling result is obtained, and then in step S202, a sub-intention recognition model corresponding to each dimension attribute is trained in combination with the multi-dimensional labeling result based on a deep learning model such as a BERT model (i.e., a new language model, which is collectively referred to as Bidirectional Encoder responses from transformations). The number of dimensions of the dimension attributes can be set according to requirements, and the number of the sub-intention recognition models is the same as the number of dimensions of the preset dimension attributes.
The method comprises the steps of utilizing a multi-dimensional intention recognition model to carry out intention recognition on a sentence to be responded, and obtaining a multi-dimensional classification result corresponding to the sentence to be responded, namely utilizing a plurality of sub-intention recognition models to carry out intention recognition on the sentence to be responded, and obtaining classification results of the sentence to be responded on a plurality of dimensional attributes. For example, the multidimensional intention recognition model is composed of an action sub-intention recognition model, a business entity sub-intention recognition model, a scenario sub-intention recognition model and a question sub-intention recognition model, the sentence to be responded is "address misfilling, how i modify the order address", the sentence to be responded is subjected to intention recognition, and the obtained classification result on the latitude attribute is: modification (action attributes), order (business attributes), order address (business entity attributes), filled-in error (scenario attributes) and mode (question attribute).
Fig. 3 is a schematic diagram of a main flow of a method for establishing a mapping relationship between a classification result and a scene according to an embodiment of the present invention. As shown in fig. 3, the main process of the method for establishing the mapping relationship between the classification result and the scene may include:
step S301, acquiring an online response log and a scene corresponding to the online response log;
step S302, classifying the on-line response logs by using a multi-dimensional intention recognition model to obtain multi-dimensional classification results corresponding to the on-line response logs;
step S303, establishing a mapping relation between the classification result and the scene according to the multi-dimensional classification result corresponding to the on-line response log and the scene corresponding to the on-line response log.
In the embodiment of the invention, the historical response logs can be analyzed to obtain response logs which can be successfully matched with the scene, the response logs which are successfully matched with the scene are defined as the online response logs, and the mapping relation between the classification result and the scene can be established by combining the corresponding scene.
The online answer logs are classified by using the multidimensional intention identification model, and multidimensional classification results corresponding to each online answer log can be obtained, for example, the online answer logs are 'I want to modify order addresses', and the obtained multidimensional classification results are modification (action attributes), orders (business attributes), order addresses (business entity attributes), other (scenario attributes) and other (question and question attributes). Then, mapping the scene corresponding to the online response log and the multi-dimensional classification result corresponding to the online response log, for example, the multi-dimensional classification result is: modifying (action attribute), orders (service attribute), order addresses (service entity attribute), other (scenario attribute) and other (question attribute), wherein the corresponding scenes are 'modified order addresses'. It should be noted that after obtaining the multi-dimensional classification result corresponding to each online response log, the online response logs with the same multi-dimensional classification result may be subjected to deduplication processing, and may also be subjected to supplementary processing.
In addition, in the embodiment of the invention, the mapping relation between the classification result and the scene can be stored in a graph database form, wherein the graph database is a novel database and can process large-scale data and changing requirements. FIG. 4 is a diagram illustrating the use of a graph database to store a mapping between classification results and scenes according to an embodiment of the present invention. In fig. 4, the large circles represent scene nodes, the small circles represent model nodes, it can be seen that one scene node is connected with 5 model nodes, the dimensionality attributes of the representation of each model node are different, and the direct connection of the circles represents the relationship between the nodes. As can be seen from fig. 4, when the modified order address (scene node) is connected with the order (business sub-intention recognition model node), the order address (business entity sub-intention recognition model node), the modification (action sub-intention recognition model node), the other (scene sub-intention recognition model node) and the other (question sub-intention recognition model node), a scene { modified order address } corresponding to the multidimensional classification result { order, order address, modification, other } is obtained.
After the first multi-dimensional classification result is obtained, the first multi-dimensional classification result can be corrected by using the slot filling sentences to obtain a target multi-dimensional classification result, so that the accuracy of user intention identification can be improved. Therefore, in a referential embodiment of the present invention, acquiring a slot filling statement corresponding to a to-be-answered statement, and determining a target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement may include:
step S1021, determining whether scene slot filling is needed, if yes, performing step S1022, and if no, performing step S1023;
step S1022, acquiring the slot filling sentences, identifying a second multi-dimensional classification result corresponding to the slot filling sentences by using the multi-dimensional intention identification model, and determining a target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result;
in step S1023, the first multi-dimensional classification result is directly determined as the target multi-dimensional classification result.
Firstly, analyzing the sentence to be responded and the context based on a dialogue management technology and a natural language generation technology, and judging whether scene slot filling is needed, namely, judging whether user information is completely supplemented or not by analyzing the sentence to be responded and the context, if so, indicating that the scene slot filling is not needed, and directly determining the first multi-dimensional classification result as a target classification result. And if the scene slot filling is needed, performing slot filling question reversing, namely, the intelligent customer service makes a conversation with the user, and the sentence answered by the user to the slot filling question reversing is the slot filling sentence. For example, the user sends the to-be-answered statement "how to modify the order receiver information" to the intelligent customer service, the intelligent customer service may generate a slot-filling question "how many the order number is", and then the user inputs the slot-filling statement "the order number is 123456 XXXX".
After the slot filling statement is obtained, the multidimensional intention recognition model can be used for carrying out intention recognition on the slot filling statement, and a second multidimensional classification result corresponding to the slot filling statement is obtained. Scene switching may occur because the slot filling sentences input by the user are expressed differently. For example, a sentence to be responded input by a user is "i buy a mobile phone for price reduction", a corresponding scene may be "apply for price protection", a slot filling request is required to be made, "ask you to input an order number", a slot filling sentence input by the user is "i say that 10649835 XXXX", a corresponding scene may be "order query", and it can be obtained that, after the user inputs the slot filling sentence, the scene is switched, so that the intention identification accuracy of the user is reduced, further the scene response accuracy is reduced, and the user experience is influenced. In the embodiment of the invention, the target classification result can be obtained by comparing the first multi-dimensional classification result with the second multi-dimensional classification result, and then the response sentence is generated by using the target classification result.
Under the condition that the first multi-dimensional classification result is the same as the second multi-dimensional classification result, the first multi-dimensional classification result can be directly determined as a target multi-dimensional classification result; under the condition that the first multi-dimensional classification result is different from the second multi-dimensional classification result, the first multi-dimensional classification result and the second multi-dimensional classification result can be analyzed to determine a target multi-dimensional classification result. It should be noted that, in the case that there may be multiple slot filling statements, for each slot filling statement, a multidimensional classification result corresponding to the slot filling statement is obtained, and then two adjacent slot filling statements may be analyzed to obtain a target multidimensional classification result. For example, a sentence to be processed N1, corresponding slot filling sentences are N2, N3 and N4 in sequence, and a multidimensional intent recognition model M is used to perform intent recognition on N1 to obtain a multidimensional classification result W1; then, M is used for carrying out intention recognition on N2 to obtain a multi-dimensional classification result W2, and W1 and W2 are analyzed to obtain a target classification result W1; then, M is used for carrying out intention recognition on N3 to obtain a multi-dimensional classification result W3, and W1 and W3 are analyzed to obtain a target classification result W3; finally, intention recognition is carried out on N4 through M to obtain a multi-dimensional classification result W4, and W3 and W4 are analyzed to obtain a final target classification result W4.
In a referential embodiment of the present invention, determining a target multi-dimensional classification result according to a first multi-dimensional classification result and a second multi-dimensional classification result includes: judging whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result; if yes, directly determining the first multi-dimensional classification result as a target multi-dimensional classification result; if not, obtaining a difference classification result and the same classification result in the second multi-dimensional classification result, calculating a correlation weight of the difference classification result and the same classification result, and determining a target multi-dimensional classification result according to the correlation weight according to a preset intention inheritance rule.
In the embodiment of the invention, a multi-dimensional intention recognition model is adopted to recognize the intention of the sentence to be processed or the groove filling sentence, so that a multi-dimensional classification result, namely a classification result on a plurality of dimensional attributes can be obtained. Considering that the to-be-processed sentence and the slot filling sentence have a context relationship, the first multi-dimensional classification result corresponding to the to-be-processed sentence and the second multi-dimensional classification result corresponding to the slot filling sentence may be different in classification result on one sub-intention recognition model or a plurality of sub-intention recognition models. Therefore, in the embodiment of the present invention, the difference classification result and the same classification result in the second multi-dimensional classification result may be obtained, the correlation weight of the difference classification result and the same classification result may be calculated, and then the target multi-dimensional classification result may be determined according to the correlation weight according to the preset intention inheritance rule.
For example, a sentence to be processed, "i buy the mobile phone and reduce the price," is that a corresponding first multidimensional classification result { action sub-intention recognition model, business sub-intention recognition model } is { application, price protection }, a groove filling sentence "i say that a corresponding second multidimensional classification result { action sub-intention recognition model, business sub-intention recognition model } of 10649853 XXXX" is { application, order }, and it can be obtained that compared with the first multidimensional classification result, the classification result of the second multidimensional classification result on the business sub-intention recognition model changes, a difference classification result { business sub-intention recognition model, order } and the same classification result { action sub-intention recognition model, application } in the second multidimensional classification result are obtained, and then a target multidimensional classification result is determined by calculating a correlation weight.
And determining the target multi-dimensional classification result by considering the relevance weight of the calculated difference classification result and the same classification result. Therefore, in the embodiment of the present invention, calculating the correlation weights of the different classification results and the same classification result may include: step (a), according to the historical response log, counting a first frequency of occurrence of a difference classification result, a second frequency of occurrence of the same classification result and a third frequency of occurrence of the difference classification result and the same classification result at the same time; and (b) calculating the correlation weight of the differential classification result and the same classification result according to the first frequency, the second frequency and the third frequency. Defining: in the case that the classification result a under the a sub-intention recognition Model is Model (a, a), the classification result B under the B sub-intention recognition Model is Model (B, B), and the Model (a, a) and Model (B, B) correlation weight is the occurrence Model (a, a), the probability value of the occurrence of the Model (B, B) may be as follows:
R(Model(A,a),Model(B,b))=(Count(Model(B,b))/Count(Model(A,a)))*lg(Count(Model(A,a))
wherein, Count (Model (a, a)) is expressed as the number of times of occurrence of the classification result a under the a child intention recognition Model counted according to the historical response log; count (Model (B, B)) represents the number of occurrences of the classification result B under the B child intention recognition Model counted from the history response log.
The embodiment of the present invention may also be implemented by using the above step (a) and step (b), specifically, after determining the differential classification result and the same classification result, querying a historical response log, and counting a first number of times that the differential classification result appears, a second number of times that the same classification result appears, and a third number of times that the differential classification result and the same classification result appear at the same time; and then calculating the correlation weight of the difference classification result and the same classification result according to the first frequency, the second frequency and the third frequency.
For example, the difference classification result { business sub-intention recognition model, order } and the same classification result { action sub-intention recognition model, application }, a first number of times that the order appears under the business sub-intention recognition model, a second number of times that the application appears under the action sub-intention recognition model, and a third number of times that the order appears under the business sub-intention recognition model and the application appears under the action sub-intention recognition model are counted by querying the historical response log, and then the correlation weight of the difference classification result { business sub-intention recognition model, order } and the same classification result { action sub-intention recognition model, application } is calculated according to the first number, the second number, and the third number.
In the embodiment of the invention, a relevance weight table can be obtained by calculation in advance according to the historical response log, and the relevance weights between the dimension classification results in the multi-dimensional intention model are stored, so that after the difference classification result and the same classification result are obtained, the relevance weights between the difference classification result and the same classification result can be inquired by inquiring the relevance weight table.
The preset intention inheritance rule refers to a preset rule for judging whether to inherit the intention recognition result. In the referential embodiment of the present invention, determining the target multidimensional classification result according to the relevance weight according to the preset intention inheritance rule may include: judging whether the correlation weight is greater than a preset weight or not; if so, determining the second multi-dimensional classification result as a target multi-dimensional classification result; if not, according to the difference classification result, de-entity generalization processing is carried out on the groove filling sentence, then a multi-dimensional intention recognition model is used for recognition, a third multi-dimensional classification result is obtained, and a target classification result is determined according to the third multi-dimensional classification result.
The relevance weight calculates the relevance of the difference classification result and the same classification result. The difference classification result is a different classification result part in the second multi-dimensional classification result corresponding to the slot filling statement compared with the first multi-dimensional classification result corresponding to the statement to be answered. Therefore, if the correlation weight is greater than the preset weight, which indicates that the correlation between the differential classification result and the same classification result is greater, it can be determined that the second multi-dimensional classification result is the target classification result.
If the correlation weight is not greater than the preset weight, the filled-in statement can be de-processed in an entity generalization way according to the difference classification result, for example, the filled-in statement "i say that it is 10649853 XXXX", the obtained difference classification result { business sub-intention identification model, order } and the same classification result { action sub-intention identification model, application }, then de-entity generalization processing is carried out on the slot filling statement to obtain that what i say is the (other), namely replacing (other) parts corresponding to the difference classification results, then utilizing a multi-dimensional intention identification model to identify the intention, obtaining a third multi-dimensional classification result { an action sub intention identification model and a business sub intention identification model } as { application and price protection }, if the comparison result is the same as the first multi-dimensional classification result, it indicates that the first multi-dimensional classification result can be directly inherited, that is, the first multi-dimensional classification result is determined to be the target multi-dimensional classification result. Of course, if the third multi-dimensional classification result and the second multi-dimensional classification result obtained by identification, or the de-materialized part obtained by analyzing the third multi-dimensional classification result may affect the model classification, the second multi-dimensional classification result is determined as the target multi-dimensional classification result.
It should be noted that, in the embodiment of the present invention, the number of the difference classification results may be one or more, and the number of the same classification results may also be one or more. For example, when there are two different classification results models (a1, a1) and models (a2, a2), there are two same classification results models (B1, B1) and models (B2, B2), the correlation weight R1 between the Model (a1, a1) and the Model (B1, B1), the correlation weight R2 between the Model (a1, a1) and the Model (B2, B2), the correlation weight R3 between the Model (a2, a2) and the Model (B1, B1), and the correlation weight R2 between the Model (a2, a2) and the Model (B2, B2) can be calculated, if the product of R2 and R2 is greater than the preset weight Y2, and the product of R2 and R2 is greater than the preset weight Y2, the multi-dimensional classification result (a2, and a2) are included in the classification result. If the product of R1 and R2 is not greater than the preset weight Y1, de-entity generalization processing needs to be performed on the portion corresponding to the Model (a1, a1) to obtain a third multi-dimensional classification result, and further obtain the target multi-dimensional classification result.
Fig. 5 is a schematic diagram of a main flow of a method for determining a target multi-dimensional classification result according to a first multi-dimensional classification result and a slot filling statement according to an embodiment of the present invention. As shown in fig. 5, the main flow of the method for determining a target multi-dimensional classification result according to a first multi-dimensional classification result and a slot filling statement may include:
step S501, judging whether scene slot filling is needed, if yes, executing step S502, and if not, executing step S504;
step S502, acquiring a slot filling statement, and identifying a second multi-dimensional classification result corresponding to the slot filling statement by using a multi-dimensional intention identification model;
step S503, determining whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result, if yes, performing step S504, and if no, performing step S505;
step S504, directly determining the first multi-dimensional classification result as a target multi-dimensional classification result;
step S505, obtaining a difference classification result and a same classification result in the second multi-dimensional classification result, and calculating a correlation weight of the difference classification result and the same classification result;
step S506, determining whether the correlation weight is greater than a preset weight, if so, performing step S507, otherwise, performing step S508;
step S507, determining a second multi-dimensional classification result as a target multi-dimensional classification result;
step S508, according to the difference classification result, the groove filling sentence is subjected to de-entity generalization treatment, and then is identified by using the multi-dimensional intention identification model to obtain a third multi-dimensional classification result;
step S509, determining a target classification result according to the third multi-dimensional classification result.
It should be noted that, the correlation weights of the difference classification result and the same classification result are calculated in step S505, which may be implemented according to step (a) and step (b) above after the difference classification result and the same classification result are determined, or may be obtained by searching the correlation weight table after the correlation weight table is obtained by pre-calculation, and then obtaining specific values from the correlation weight table.
In the embodiment of the invention, the first multi-dimensional classification result can be corrected by using the slot filling sentences to obtain the target multi-dimensional classification result, so that the accuracy of the intention identification result is improved, the problem of scene switching caused by different expression modes of user answers in the prior art is solved, and the response accuracy is further improved.
Fig. 6 is a schematic diagram of a main flow of a customer service response method according to an embodiment of the present invention. As shown in fig. 6, the main flow of the customer service response method may include:
step S601, obtaining a sentence to be answered, and identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention identification model;
step S602, determining whether scene slot filling is required, if yes, performing step S603, and if no, performing step S605;
step S603, acquiring a slot filling statement, and identifying a second multi-dimensional classification result corresponding to the slot filling statement by using a multi-dimensional intention identification model;
step S604, determining whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result, if yes, performing step S605, and if not, performing step S606;
step S605, directly determining the first multi-dimensional classification result as a target multi-dimensional classification result;
step S606, obtaining the difference classification result and the same classification result in the second multi-dimensional classification result, and calculating the correlation weight of the difference classification result and the same classification result;
step S607, determining whether the correlation weight is greater than the preset weight, if yes, performing step S608, and if no, performing step S609;
step S608, determining the second multi-dimensional classification result as a target multi-dimensional classification result;
step S609, according to the difference classification result, performing de-entity generalization processing on the groove filling sentence, and then recognizing by using a multi-dimensional intention recognition model to obtain a third multi-dimensional classification result;
step S610, determining a target classification result according to the third multi-dimensional classification result;
step S611, matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene;
step S612, in the target scene, generating a response sentence corresponding to the sentence to be responded.
Before step S601 is executed, the multi-dimensional intent recognition model needs to be trained in advance, and the specific training method is explained in detail in step S201 to step S203 above, and will not be described again here. In addition, the correlation weight between the difference classification result and the same classification result in step S606 may be calculated according to the above steps (a) and (b) after the difference classification result and the same classification result are determined, or may be calculated in advance to obtain a correlation weight table, and then a specific value is obtained by querying from the correlation weight table. In addition, before step S611, a mapping relationship between the classification result and the scene is established, and a specific method is explained in detail in the above step S301 to step S303, which is not repeated here.
In the technical scheme of the customer service response, the multi-dimensional intention recognition model can be used for performing intention recognition on the to-be-responded sentences, the problems of high system complexity and maintenance difficulty, low model reusability and high training cost caused by multiple layers of intention recognition models in the prior art are solved, the first multi-dimensional classification result can be corrected by using the slot filling sentences to obtain the target multi-dimensional classification result, the accuracy of the intention recognition result is improved, the response sentences are generated by using the mapping relation between the classification result and the scene and combining the target multi-dimensional classification result, the problem of scene switching caused by different expression modes of user responses in the prior art is solved, and the response accuracy is improved.
Fig. 7 is a schematic diagram of the main blocks of a customer service answering device according to an embodiment of the present invention. As shown in fig. 7, the main modules of the customer service answering device 700 may include: an identification module 701, a determination module 702 and a generation module 703.
The identification module 701 can be used for acquiring a sentence to be answered, and identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention identification model; the determining module 702 may be configured to obtain a slot filling statement corresponding to a to-be-answered statement, and determine a target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement; the generating module 703 may be configured to generate a response sentence corresponding to the sentence to be responded according to the target multidimensional classification result based on the mapping relationship between the classification result and the scene.
In this embodiment of the present invention, the customer service response device 700 may further: including a training module (not shown). The training module may be operable to: obtaining a historical response log, and carrying out dimension marking on the historical response log according to a preset dimension attribute to obtain a multi-dimensional marking result; and training a sub-intention recognition model corresponding to the dimension attributes according to the multi-dimensional labeling result based on the deep learning model, and forming the multi-dimensional intention recognition model by using the sub-intention recognition model corresponding to the dimension attributes. The input of the multi-dimensional intention recognition model is a sentence, and the output is a classification result of the sentence on the dimension attribute.
In this embodiment of the present invention, the determining module 702 may further be configured to: judging whether a scene slot is required to be filled; if yes, acquiring a slot filling statement, identifying a second multi-dimensional classification result corresponding to the slot filling statement by using a multi-dimensional intention identification model, and determining a target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result; if not, directly determining the first multi-dimensional classification result as a target multi-dimensional classification result.
In this embodiment of the present invention, the determining module 702 may further be configured to: judging whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result; if yes, directly determining the first multi-dimensional classification result as a target multi-dimensional classification result; if not, obtaining a difference classification result and the same classification result in the second multi-dimensional classification result, calculating a correlation weight of the difference classification result and the same classification result, and determining a target multi-dimensional classification result according to the correlation weight according to a preset intention inheritance rule.
In this embodiment of the present invention, the determining module 702 may further be configured to: according to the historical response log, counting a first frequency of occurrence of the difference classification result, a second frequency of occurrence of the same classification result and a third frequency of occurrence of the difference classification result and the same classification result at the same time, and then calculating a correlation weight of the difference classification result and the same classification result according to the first frequency, the second frequency and the third frequency; and calculating a correlation weight value table according to the historical response log, and inquiring the correlation weight values of the different classification results and the same classification results from the correlation weight value table.
In this embodiment of the present invention, the determining module 702 may further be configured to: judging whether the correlation weight is greater than a preset weight or not; if so, determining the second multi-dimensional classification result as a target multi-dimensional classification result; if not, according to the difference classification result, de-entity generalization processing is carried out on the groove filling sentence, then a multi-dimensional intention recognition model is used for recognition, a third multi-dimensional classification result is obtained, and a target classification result is determined according to the third multi-dimensional classification result.
In this embodiment of the present invention, the generating module 703 may further be configured to: matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene; and generating a response statement corresponding to the statement to be responded under the target scene.
In this embodiment of the present invention, the customer service response device may further include: a building block (not shown). The setup module may be to: acquiring an online response log and a scene corresponding to the online response log; classifying the on-line response logs by using a multi-dimensional intention recognition model to obtain a multi-dimensional classification result corresponding to the on-line response logs; and establishing a mapping relation between the classification result and the scene according to the multi-dimensional classification result corresponding to the on-line response log and the scene corresponding to the on-line response log.
From the above description, it can be seen that the customer service response device of the embodiment of the present invention can utilize the multidimensional intention recognition model to perform intention recognition on a to-be-responded statement, solve the problems of high system complexity and maintenance difficulty, low model reusability, and high training cost caused by multiple layers of intention recognition models in the prior art, and can also utilize the slot filling statement to correct the first multidimensional classification result to obtain the target multidimensional classification result, thereby improving the accuracy of the intention recognition result.
Fig. 8 shows an exemplary system architecture 800 of a customer service response method or a customer service response apparatus to which embodiments of the present invention may be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 801, 802, 803 to interact with a server 805 over a network 804 to receive or send messages or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 805 may be a server that provides various services, such as a back-office management server (for example only) that supports shopping-like websites browsed by users using the terminal devices 801, 802, 803. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the customer service response method provided by the embodiment of the present invention is generally executed by the server 805, and accordingly, the customer service response apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 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. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present invention, a computer 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an identification module, a determination module, and a generation module. The names of the modules do not form a limitation on the modules themselves under certain conditions, for example, the identification module may also be described as a module for acquiring a sentence to be answered, identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on the multi-dimensional intention identification model.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: obtaining a sentence to be answered, and identifying a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention identification model; acquiring a slot filling statement corresponding to a statement to be answered, and determining a target multidimensional classification result corresponding to the statement to be answered according to the first multidimensional classification result and the slot filling statement; and generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene.
According to the technical scheme of the embodiment of the invention, the multi-dimensional intention recognition model can be used for carrying out intention recognition on the to-be-responded sentences, the problems of higher system complexity and maintenance difficulty, low model reusability and higher training cost caused by multiple layers of intention recognition models in the prior art are solved, the first multi-dimensional classification result can be corrected by using the slot filling sentences to obtain the target multi-dimensional classification result, the accuracy of the intention recognition result is improved, the response sentences are generated by using the mapping relation between the classification result and the scene and combining the target multi-dimensional classification result, the problem of scene switching caused by different expression modes of user responses in the prior art is solved, and the response accuracy is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A customer service response method, comprising:
obtaining a statement to be answered, and identifying a first multi-dimensional classification result corresponding to the statement to be answered based on a multi-dimensional intention identification model;
acquiring a slot filling statement corresponding to the statement to be answered, and determining a target multi-dimensional classification result corresponding to the statement to be answered according to the first multi-dimensional classification result and the slot filling statement;
and generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene.
2. The method of claim 1, further comprising:
obtaining a historical response log, and carrying out dimension marking on the historical response log according to a preset dimension attribute to obtain a multi-dimensional marking result;
training a sub-intention recognition model corresponding to the dimension attributes according to the multi-dimensional labeling result based on a deep learning model, and forming the multi-dimensional intention recognition model by using the sub-intention recognition model corresponding to the dimension attributes; wherein the content of the first and second substances,
and the input of the multi-dimensional intention recognition model is a statement, and the output is a classification result of the statement on the dimension attribute.
3. The method according to claim 1, wherein the obtaining of the slot filling statement corresponding to the to-be-answered statement and the determining of the target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement comprises:
judging whether a scene slot is required to be filled;
if yes, acquiring the filling sentence, identifying a second multi-dimensional classification result corresponding to the filling sentence by using the multi-dimensional intention identification model, and determining the target multi-dimensional classification result according to the first multi-dimensional classification result and the second multi-dimensional classification result;
if not, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result.
4. The method of claim 3, wherein determining the target multi-dimensional classification result from the first multi-dimensional classification result and the second multi-dimensional classification result comprises:
judging whether the first multi-dimensional classification result is the same as the second multi-dimensional classification result;
if so, directly determining the first multi-dimensional classification result as the target multi-dimensional classification result;
if not, obtaining a difference classification result and a same classification result in the second multi-dimensional classification result, calculating a correlation weight of the difference classification result and the same classification result, and determining the target multi-dimensional classification result according to the correlation weight according to a preset intention inheritance rule.
5. The method according to claim 4, wherein the calculating the relevance weights of the difference classification results and the same classification results comprises at least one of the following options:
according to a historical response log, counting a first frequency of occurrence of the difference classification result, a second frequency of occurrence of the same classification result and a third frequency of occurrence of the difference classification result and the same classification result at the same time, and then according to the first frequency, the second frequency and the third frequency, calculating a correlation weight of the difference classification result and the same classification result;
and calculating a correlation weight value table according to the historical response log, and then inquiring the correlation weight values of the difference classification results and the same classification results from the correlation weight value table.
6. The method according to claim 4, wherein the determining the target multi-dimensional classification result according to the relevance weight according to a preset intent inheritance rule comprises:
judging whether the correlation weight is greater than a preset weight or not;
if so, determining the second multi-dimensional classification result as the target multi-dimensional classification result;
and if not, according to the difference classification result, performing de-entity generalization processing on the filling sentence, then utilizing the multi-dimensional intention recognition model to perform recognition to obtain a third multi-dimensional classification result, and determining the target classification result according to the third multi-dimensional classification result.
7. The method according to claim 1, wherein the generating a response sentence corresponding to the sentence to be responded according to the target multidimensional classification result based on the mapping relationship between the classification result and the scene comprises:
matching a target scene corresponding to the target multi-dimensional classification result based on the mapping relation between the classification result and the scene;
and generating a response statement corresponding to the statement to be responded under the target scene.
8. The method of claim 7, wherein before matching the target scene corresponding to the target multi-dimensional classification result, the method further comprises:
acquiring an online response log and a scene corresponding to the online response log;
classifying the on-line response logs by using the multi-dimensional intention recognition model to obtain multi-dimensional classification results corresponding to the on-line response logs;
and establishing a mapping relation between the classification result and the scene according to the multi-dimensional classification result corresponding to the on-line response log and the scene corresponding to the on-line response log.
9. A customer service response apparatus, comprising:
the recognition module is used for acquiring a sentence to be answered, recognizing a first multi-dimensional classification result corresponding to the sentence to be answered based on a multi-dimensional intention recognition model;
a determining module, configured to obtain a slot filling statement corresponding to the to-be-answered statement, and determine a target multidimensional classification result corresponding to the to-be-answered statement according to the first multidimensional classification result and the slot filling statement;
and the generating module is used for generating a response sentence corresponding to the sentence to be responded according to the target multi-dimensional classification result on the basis of the mapping relation between the classification result and the scene.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202010560031.8A 2020-06-18 2020-06-18 Customer service response method and device Pending CN113742480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010560031.8A CN113742480A (en) 2020-06-18 2020-06-18 Customer service response method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010560031.8A CN113742480A (en) 2020-06-18 2020-06-18 Customer service response method and device

Publications (1)

Publication Number Publication Date
CN113742480A true CN113742480A (en) 2021-12-03

Family

ID=78728071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010560031.8A Pending CN113742480A (en) 2020-06-18 2020-06-18 Customer service response method and device

Country Status (1)

Country Link
CN (1) CN113742480A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070208556A1 (en) * 2006-03-03 2007-09-06 Samsung Electronics Co., Ltd. Apparatus for providing voice dialogue service and method of operating the same
US20180365257A1 (en) * 2017-06-19 2018-12-20 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatu for querying
CN110019844A (en) * 2019-02-20 2019-07-16 众安信息技术服务有限公司 A kind of insurance industry knowledge mapping question answering system construction method and device
CN110176315A (en) * 2019-06-05 2019-08-27 京东方科技集团股份有限公司 Medical answering method and system, electronic equipment, computer-readable medium
CN110321418A (en) * 2019-06-06 2019-10-11 华中师范大学 A kind of field based on deep learning, intention assessment and slot fill method
CN110502608A (en) * 2019-07-05 2019-11-26 平安科技(深圳)有限公司 The interactive method and human-computer dialogue device of knowledge based map
CN110659366A (en) * 2019-09-24 2020-01-07 Oppo广东移动通信有限公司 Semantic analysis method and device, electronic equipment and storage medium
CN110704641A (en) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 Ten-thousand-level intention classification method and device, storage medium and electronic equipment
CN111221961A (en) * 2019-10-31 2020-06-02 南京南邮信息产业技术研究院有限公司 Speaker intention recognition system and method based on S-LSTM model and slot value gate
CN111241260A (en) * 2020-01-08 2020-06-05 平安科技(深圳)有限公司 Data processing method, device and equipment based on human-computer interaction and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070208556A1 (en) * 2006-03-03 2007-09-06 Samsung Electronics Co., Ltd. Apparatus for providing voice dialogue service and method of operating the same
US20180365257A1 (en) * 2017-06-19 2018-12-20 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatu for querying
CN110019844A (en) * 2019-02-20 2019-07-16 众安信息技术服务有限公司 A kind of insurance industry knowledge mapping question answering system construction method and device
CN110176315A (en) * 2019-06-05 2019-08-27 京东方科技集团股份有限公司 Medical answering method and system, electronic equipment, computer-readable medium
CN110321418A (en) * 2019-06-06 2019-10-11 华中师范大学 A kind of field based on deep learning, intention assessment and slot fill method
CN110502608A (en) * 2019-07-05 2019-11-26 平安科技(深圳)有限公司 The interactive method and human-computer dialogue device of knowledge based map
CN110659366A (en) * 2019-09-24 2020-01-07 Oppo广东移动通信有限公司 Semantic analysis method and device, electronic equipment and storage medium
CN110704641A (en) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 Ten-thousand-level intention classification method and device, storage medium and electronic equipment
CN111221961A (en) * 2019-10-31 2020-06-02 南京南邮信息产业技术研究院有限公司 Speaker intention recognition system and method based on S-LSTM model and slot value gate
CN111241260A (en) * 2020-01-08 2020-06-05 平安科技(深圳)有限公司 Data processing method, device and equipment based on human-computer interaction and storage medium

Similar Documents

Publication Publication Date Title
US10853577B2 (en) Response recommendation system
US20210304075A1 (en) Batching techniques for handling unbalanced training data for a chatbot
US10599644B2 (en) System and method for managing artificial conversational entities enhanced by social knowledge
CN113647067A (en) Maintaining machine language model states across communication channels
CN111492383A (en) Automated communication using intent classifiers
CN108989397B (en) Data recommendation method and device and storage medium
US11086857B1 (en) Method and system for semantic search with a data management system
WO2016101811A1 (en) Information arrangement method and apparatus
US11269665B1 (en) Method and system for user experience personalization in data management systems using machine learning
US20190057297A1 (en) Leveraging knowledge base of groups in mining organizational data
US11461317B2 (en) Method, apparatus, system, device, and storage medium for answering knowledge questions
US11775894B2 (en) Intelligent routing framework
CN113364853A (en) Business service system, business request method and gateway equipment
CN115481227A (en) Man-machine interaction dialogue method, device and equipment
US20140095527A1 (en) Expanding high level queries
CN111522840B (en) Label configuration method, device, equipment and computer readable storage medium
CN112989170A (en) Keyword matching method applied to information search, information search method and device
US20230004555A1 (en) Automatically and incrementally specifying queries through dialog understanding in real time
CN113742480A (en) Customer service response method and device
CN115619142A (en) Method, device, equipment and computer readable medium for matching data
US11200222B2 (en) Natural language interface databases
CN113325959A (en) Input corpus recommendation method and device
CN113360672A (en) Methods, apparatus, devices, media and products for generating a knowledge graph
CN111782776A (en) Method and device for realizing intention identification through slot filling
CN112131484A (en) Multi-person session establishing method, device, equipment and storage medium

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