Method and device for managing knowledge base of customer service robot

文档序号:1952643 发布日期:2021-12-10 浏览:21次 中文

阅读说明:本技术 一种客服机器人知识库的管理方法和装置 (Method and device for managing knowledge base of customer service robot ) 是由 范开强 于 2020-06-23 设计创作,主要内容包括:本发明公开了一种客服机器人知识库的管理方法和装置,涉及计算机技术领域。该方法的一种具体实施方式包括:获取客服机器人接收的一个或多个用户问题及所述客服机器人基于知识库为所述用户问题提供的答复结果;根据所述答复结果以及所述用户问题在所述知识库中命中的知识条目,对所述用户问题进行诊断分析;根据所述诊断分析的结果对所述知识库进行优化。该实施方式实现了对知识库的自动诊断分析,并基于诊断分析结果实现了对知识库的自动优化,提升了知识库的诊断、优化效率。(The invention discloses a method and a device for managing a customer service robot knowledge base, and relates to the technical field of computers. One embodiment of the method comprises: acquiring one or more user questions received by a customer service robot and a reply result provided by the customer service robot for the user questions based on a knowledge base; according to the reply result and the knowledge items hit by the user questions in the knowledge base, carrying out diagnosis analysis on the user questions; and optimizing the knowledge base according to the diagnosis and analysis result. The implementation mode realizes automatic diagnosis and analysis of the knowledge base, realizes automatic optimization of the knowledge base based on the diagnosis and analysis result, and improves the diagnosis and optimization efficiency of the knowledge base.)

1. A method for managing a customer service robot knowledge base is characterized by comprising the following steps:

acquiring one or more user questions received by a customer service robot and a response result provided by the customer service robot for the user questions based on a knowledge base, wherein the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the response result indicates whether the user questions are matched with the knowledge items and the reasons for unmatching the answers provided by the customer service robot when the user questions are matched with the knowledge items;

according to the reply result and the knowledge items hit by the user questions in the knowledge base, carrying out diagnosis analysis on the user questions;

and optimizing the knowledge base according to the diagnosis and analysis result.

2. The method for managing a customer service robot knowledge base according to claim 1, wherein the user question and the response result pushed to the message queue by the customer service robot are obtained through a message queue.

3. The method as claimed in claim 2, wherein before the service robot pushes the user question and the response result to the message queue, the service robot obtains the user question and the response result by a dynamic point-burying technique.

4. The method for managing a customer service robot knowledge base according to claim 1, wherein the performing of the diagnosis analysis on the user question according to the response result and the knowledge item hit by the user question in the knowledge base comprises:

clustering the user questions by adopting a clustering algorithm to generate new knowledge items under the condition that the answer result is that the user questions are not matched with any knowledge items;

and in the case that the answer result is that the user question is matched with the knowledge item, counting the unmatched reasons of the answers corresponding to the user question in the matched knowledge item and the number of the corresponding user questions.

5. The method for managing a customer service robot knowledge base according to claim 4, further comprising:

before clustering the user problems by adopting a clustering algorithm to generate a new knowledge item, judging whether the number of the user problems which are not matched with the knowledge item is larger than a threshold value user problem number;

and clustering the user problems by adopting a clustering algorithm to generate a new knowledge item under the condition that the number of the user problems is greater than the threshold number of the user problems.

6. The method for managing a customer service robot knowledge base according to claim 4, wherein the optimizing the knowledge base according to the result of the diagnosis and analysis comprises:

and updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers of the user questions and the number of the corresponding user questions when the answer result is that the user questions are matched with the knowledge items.

7. The method for managing a customer service robot knowledge base according to claim 6, wherein the reasons for the unmatched answers include one or more of: the valid time is not matched, the commodity identification is not matched, the commodity classification is not matched, and the user is not satisfied.

8. The method for managing a customer service robot knowledge base according to claim 7, wherein the updating of the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers to the user questions and the corresponding number of the user questions comprises:

under the condition that the unmatched reason of the answer is that the commodity identification is not matched, updating the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity identification in the user question;

and under the condition that the unmatched reason of the answer is that the commodity classification is unmatched, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification in the user question.

9. The method for managing a customer service robot knowledge base according to claim 1, further comprising:

judging whether the knowledge base has knowledge items which do not indicate answers or not indicate bottom-of-pocket answers or not, and increasing the answers or bottom-of-pocket answers corresponding to the knowledge items in the knowledge base under the condition that the knowledge items which do not indicate answers or not indicate bottom-of-pocket answers exist in the knowledge base.

10. A management device for a knowledge base of a customer service robot, comprising: the system comprises an information acquisition module, a diagnosis analysis module and a knowledge base optimization module; wherein the content of the first and second substances,

the information acquisition module is used for acquiring one or more user questions received by the customer service robot and a reply result provided by the customer service robot for the user questions based on a knowledge base, the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the reply result indicates whether the user questions are matched with the knowledge items or not and a reason why the answers provided by the customer service robot are not matched when the user questions are matched with the knowledge items;

the diagnosis and analysis module is used for carrying out diagnosis and analysis on the user question according to the reply result and the knowledge item hit by the user question in the knowledge base;

and the knowledge base optimizing module is used for optimizing the knowledge base according to the diagnosis and analysis result.

11. An electronic device for administration of a customer care robot knowledge base, comprising:

one or more processors;

a storage device for storing one or more programs,

the one or more programs, when executed by the one or more processors, implement the method of any of claims 1-9.

12. 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-9.

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for managing a knowledge base of a customer service robot.

Background

The knowledge base refers to a system or an expert system based on knowledge and having intelligence. As an important component of the customer service robot, the knowledge base is the core of the customer service robot capable of providing the consultation service for the user, and the customer service robot with richer knowledge base is more intelligent when communicating with the user.

However, since the knowledge base established in the initial stage has certain limitations, the customer service robot cannot solve any user problem proposed by the user based on the knowledge base established in the initial stage, and thus the knowledge base of the customer service robot needs to be continuously expanded and perfected. At present, the optimization of the knowledge base is completed by manual configuration on the basis of manually judging the problems of the knowledge base, the operation is complicated, a large amount of manpower and material resources are consumed, and the optimization of the knowledge base is not timely.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method and an apparatus for managing a knowledge base of a service robot, which can implement automatic diagnosis and analysis of the knowledge base by dynamically obtaining user questions received by a customer service robot and response results provided by the customer service robot, and implement automatic optimization of the knowledge base based on the diagnosis and analysis results, thereby improving diagnosis and optimization efficiency of the knowledge base.

To achieve the above object, according to an aspect of an embodiment of the present invention, a method for managing a knowledge base of a customer service robot includes:

acquiring one or more user questions received by a customer service robot and a response result provided by the customer service robot for the user questions based on a knowledge base, wherein the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the response result indicates whether the user questions are matched with the knowledge items and the reasons for unmatching the answers provided by the customer service robot when the user questions are matched with the knowledge items;

according to the reply result and the knowledge items hit by the user questions in the knowledge base, carrying out diagnosis analysis on the user questions;

and optimizing the knowledge base according to the diagnosis and analysis result.

Optionally, the user question and the answer result pushed to the message queue by the customer service robot are obtained through the message queue.

Optionally, before the customer service robot pushes the user question and the response result to the message queue, the customer service robot obtains the user question and the response result through a dynamic point burying technology.

Optionally, the performing a diagnostic analysis on the user question according to the answer result and the knowledge item hit by the user question in the knowledge base includes:

clustering the user questions by adopting a clustering algorithm to generate new knowledge items under the condition that the answer result is that the user questions are not matched with any knowledge items;

and in the case that the answer result is that the user question is matched with the knowledge item, counting the unmatched reasons of the answers corresponding to the user question in the matched knowledge item and the number of the corresponding user questions.

Optionally, the method further comprises:

before clustering the user problems by adopting a clustering algorithm to generate a new knowledge item, judging whether the number of the user problems which are not matched with the knowledge item is larger than a threshold value user problem number;

and clustering the user problems by adopting a clustering algorithm to generate a new knowledge item under the condition that the number of the user problems is greater than the threshold number of the user problems.

Optionally, the optimizing the knowledge base according to the result of the diagnostic analysis includes:

and updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers of the user questions and the number of the corresponding user questions when the answer result is that the user questions are matched with the knowledge items.

Optionally, the reasons for the answers not matching include one or more of: the valid time is not matched, the commodity identification is not matched, the commodity classification is not matched, and the user is not satisfied.

Optionally, the updating the answer indicated by the knowledge item in the knowledge base according to the unmatched reason of the answer to the user question and the number of the corresponding user questions includes:

under the condition that the unmatched reason of the answer is that the commodity identification is not matched, updating the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity identification in the user question;

and under the condition that the unmatched reason of the answer is that the commodity classification is unmatched, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification in the user question.

Optionally, the method further comprises:

judging whether the knowledge base has knowledge items which do not indicate answers or not indicate bottom-of-pocket answers or not, and increasing the answers or bottom-of-pocket answers corresponding to the knowledge items in the knowledge base under the condition that the knowledge items which do not indicate answers or not indicate bottom-of-pocket answers exist in the knowledge base.

To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a management apparatus for a knowledge base of a customer service robot, including: the system comprises an information acquisition module, a diagnosis analysis module and a knowledge base optimization module; wherein the content of the first and second substances,

the information acquisition module is used for acquiring one or more user questions received by the customer service robot and a reply result provided by the customer service robot for the user questions based on a knowledge base, the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the reply result indicates whether the user questions are matched with the knowledge items or not and a reason why the answers provided by the customer service robot are not matched when the user questions are matched with the knowledge items;

the diagnosis and analysis module is used for carrying out diagnosis and analysis on the user question according to a response result hit by the user question in the knowledge base and the knowledge item;

and the knowledge base optimizing module is used for optimizing the knowledge base according to the diagnosis and analysis result.

Optionally, the information obtaining module is configured to obtain, through a message queue, the user question and the reply result that are pushed to the message queue by the customer service robot.

Optionally, before the customer service robot pushes the user question and the response result to the message queue, the customer service robot obtains the user question and the response result through a dynamic point burying technology.

Optionally, the performing a diagnostic analysis on the user question according to the type of the response result and the knowledge item hit by the user question in the knowledge base includes:

clustering the user questions by adopting a clustering algorithm to generate new knowledge items under the condition that the answer result is that the user questions are not matched with any knowledge items;

and in the case that the answer result is that the user question is matched with the knowledge item, counting the unmatched reason of the answer corresponding to the user question in each matched knowledge item and the number of the corresponding user questions.

Optionally, the diagnostic analysis module is further operable,

before clustering the user problems by adopting a clustering algorithm to generate a new knowledge item, judging whether the number of the user problems which are not matched with the knowledge item is larger than a threshold value user problem number;

and clustering the user problems by adopting a clustering algorithm to obtain new knowledge items under the condition that the number of the user problems is larger than the threshold number of the user problems.

Optionally, the optimizing the knowledge base according to the result of the diagnostic analysis includes:

and updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers of the user questions and the number of the corresponding user questions when the answer result is that the user questions are matched with the knowledge items.

Optionally, the reasons for the answers not matching include one or more of: the valid time is not matched, the commodity identification is not matched, the commodity classification is not matched, and the user is not satisfied.

Optionally, the updating the answer indicated by the knowledge item in the knowledge base according to the unmatched reason of the answer to the user question and the number of the corresponding user questions includes:

under the condition that the unmatched reason of the answer is that the commodity identification is not matched, updating the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity identification in the user question;

and under the condition that the unmatched reason of the answer is that the commodity classifications are not matched, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification in the user question.

Optionally, the diagnostic analysis module is further operable,

judging whether the knowledge base has knowledge items which do not indicate answers or not indicate bottom-of-pocket answers or not, and increasing the answers or bottom-of-pocket answers corresponding to the knowledge items in the knowledge base under the condition that the knowledge items which do not indicate answers or not indicate bottom-of-pocket answers exist in the knowledge base.

To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic device for customer service management of a robot knowledge base, including:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the customer service robot knowledge base management methods described above.

To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processor, implementing any one of the customer service robot knowledge base management methods described above.

The embodiment of the invention has the following advantages or beneficial effects: the automatic diagnosis and analysis of the knowledge base are realized by dynamically acquiring the user questions received by the customer service robot and the reply result provided by the customer service robot based on the knowledge base; based on the diagnosis and analysis result, a new knowledge item is generated through a clustering algorithm, so that the expansion of a knowledge base is realized; meanwhile, under the condition that the unmatched reason of the answer is that the commodities are unmatched or the commodity classifications are unmatched, the commodity identification or the commodity classification corresponding to the user problems in the knowledge base is updated by counting the commodity identification or the commodity classification appearing in the user problems. In addition, whether the knowledge items in the knowledge base are provided with the answers or the answers at the bottom of a pocket is monitored in real time, so that the management and optimization of the knowledge base are further realized, and the diagnosis and optimization efficiency of the knowledge base is improved.

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 management method of a customer service robot knowledge base according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a main flow of another method for managing a knowledge base of a customer service robot according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a main flow of a method for optimizing a customer service robot knowledge base according to an embodiment of the invention;

FIG. 4 is a schematic diagram of the main modules of a management device of a customer service robot knowledge base according to an embodiment of the present invention;

FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;

fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the 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.

Fig. 1 is a schematic diagram of a main flow of a management method of a customer service robot knowledge base according to an embodiment of the present invention, and as shown in fig. 1, the management method of the customer service robot knowledge base may specifically include the following steps:

step S101, one or more user questions received by a customer service robot and a reply result provided by the customer service robot for the user questions based on a knowledge base are obtained, the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the reply result indicates whether the user questions are matched with the knowledge items or not and reasons for unmatching of the answers provided by the customer service robot when the user questions are matched with the knowledge items.

The user question refers to any question that the user may ask when consulting with the customer service robot, such as "is this 304 stainless steel? "," hello! Is the material 304 stainless steel, is it stainless steel? "," can the chafing dish be rinsed? "," how much the weather is today? "and the like. The knowledge item refers to any information such as characters, concepts, categories, products, etc., which can be expressed in any form of words, terms, phrases, sentences, symbols, etc. It can be understood that, due to the limitation of the knowledge items in the knowledge base, when the customer service robot searches in the knowledge base according to the received user question, the knowledge items may be matched or may not be matched based on the similarity of the user question, and in the case of matching the knowledge items, the answer corresponding to the user question provided based on the knowledge base is not necessarily the answer capable of solving the user question or the answer that the user can adopt, that is, there is a case where the knowledge items are matched but the answers are not matched.

As shown in table 1 below, the knowledge base includes a plurality of knowledge items such as weather, material, and function, and each knowledge item includes one or more similar user questions, and the user questions are all matched with the knowledge items, that is, all the user questions related to the knowledge items can be searched in the knowledge base according to the knowledge items. In order that the customer service robot can match knowledge items in the knowledge base and reply according to the user questions indicated under the knowledge items when the user questions are received, the corresponding relation between the user questions under the knowledge items and the answers needs to be preset in the knowledge base. However, it can be understood that, because the knowledge item data included in the knowledge base is huge and the knowledge items are still in continuous updating and expansion, the user questions under the knowledge items may have the situation that corresponding answers or bottom-of-pocket answers are not set; the answers corresponding to a plurality of user questions in the same knowledge item may be the same or different, so that the user questions and the answers in the knowledge item may have a one-to-one relationship, or a many-to-one, one-to-many relationship.

Table 1 knowledge base example

On the basis, in order to improve the quality of the answers in the knowledge base, the customer service robot can provide one or more limiting conditions related to the answers for the user while providing the answers for the received user questions, such as commodity identification (such as commodity name, commodity number and the like), commodity classification, effective time and the like, so that the user can judge whether to adopt the answers according to the limiting conditions when browsing the answers. On the basis, under the condition that the user does not adopt the answer provided by the customer service robot, the answer in the knowledge base can be updated according to the limiting condition adopted when the user filters the answer, namely the unmatched reason of the answer. The embodiment is described by taking only the reasons for the unmatched answers as examples, including one or more of the following: the valid time is not matched, the commodity identification is not matched, the commodity classification is not matched, and the user is not satisfied.

As shown in table 2, an example of the obtained user question and response result is as follows, in which the user question "is this stainless steel? "no knowledge item is matched in the knowledge base; the user question "how do it rain today? "although the knowledge item" weather "is matched, the answer provided is not satisfied by the user; the user question "what this power is? "knowledge item matched" power "; but the corresponding answer valid time is expired and the user does not adopt the answer; the user question "what function this has? Although the knowledge item function is matched, the commodity identifications related to the provided answers are not matched, and are not answers which the user wants to obtain, and the user does not adopt; and the user question "what material this is? Although the knowledge item 'material' is matched, the commodity classification of the corresponding answer is not matched, and the user does not adopt the answer. It will be appreciated that different user questions may match the same knowledge item, and that the reasons for the non-matching of the corresponding answers may or may not be the same. Therefore, before the diagnosis and analysis of the obtained user question and response result, if the user question matches with a knowledge item, the reasons for the mismatch of different user questions and answers need to be counted according to the knowledge item.

TABLE 2 example user question and answer results

In an optional implementation manner, the user question and the reply result pushed to the message queue by the customer service robot are obtained through the message queue.

Message queues refer to message queues implemented using Redis or Kafka, RabbitMQ, RockketMQ, or like message middleware. Therefore, decoupling between dynamic acquisition of the user questions and analysis and diagnosis of the user questions is achieved by pushing the user questions, the response results and the knowledge items which are dynamically acquired to the message queue, and further personalized diagnosis and analysis of the user questions, the response results and the knowledge items can be achieved according to actual requirements of application scenes and the like of the customer service robot on the basis of the acquisition of the user questions, the response results and the knowledge items.

It is understood that, before the customer service robot pushes the user question and the response result to the message queue, the customer service robot obtains the user question and the response result through a dynamic point burying technology. That is, an interface is provided for the customer service robot through the dynamic embedded point SDK, so that the customer service robot can record the user question received by the customer service robot and the reply result provided by the customer service robot in real time in a calling mode.

Step S102, according to the reply result and the knowledge item hit by the user question in the knowledge base, the user question is diagnosed and analyzed.

In one aspect, in the event that the answer result is that the user question does not match any of the knowledge entries, clustering the user question using a clustering algorithm to generate a new knowledge entry. Specifically, referring to the user problem clustering result provided in table 3 below, two clusters containing similar user problems are obtained after clustering, and the corresponding new knowledge items are "stainless steel" and "processor". In this way, the "stainless steel" and the "processor" can be added to the knowledge base as new knowledge items and one or more answers can be configured for corresponding user questions in the knowledge base, so that when a subsequent customer service robot receives user questions related to the "stainless steel" or the "processor", the knowledge items "stainless steel" and "processor" can be matched in the knowledge base and corresponding answers are provided, and the user experience of the customer service robot is improved. The clustering algorithm that can be used includes, but is not limited to, any of the following: k-means algorithm, hierarchical clustering algorithm and mean shift clustering algorithm.

See Table 3 user questions clustering results example

On the basis, in order to ensure that the number of the user problems participating in clustering is enough to improve the clustering effect, before clustering the user problems by adopting a clustering algorithm to generate a new knowledge item, judging whether the number of the user problems which are not matched with the knowledge item is larger than the threshold number of the user problems; and clustering the user problems by adopting a clustering algorithm to generate a new knowledge item under the condition that the number of the user problems is greater than the threshold number of the user problems.

The threshold user problem number is preset according to actual requirements such as a clustering algorithm, and for example, the threshold user problem number is 1000: after obtaining user questions and answer results corresponding to the user questions from the message queue, under the condition that the answer results are not matched with the knowledge items, storing the user questions which are not matched with the knowledge items by adopting a database such as MySQL and the like, judging whether the number of the currently stored user questions which are not matched with the knowledge items is more than 1000, if not more than 1000, continuously obtaining the user questions which are not matched with the knowledge items from the message queue, if more than 1000, clustering 1000 user questions which are not matched with the knowledge items by adopting any one of a K-means algorithm, a hierarchical clustering algorithm, a mean shift clustering algorithm and the like to generate one or more clusters, wherein each cluster comprises one or more user questions with higher similarity, and the cluster can be screened by the minimum number of the user questions contained in the cluster and the lowest value of the similarity of the user questions, and generating a new knowledge item based on the screened class cluster, and enabling the new knowledge item to be matched with the user problem in the class cluster. On the basis, the new knowledge item and one or more user questions in the class cluster corresponding to the knowledge item can be added into the knowledge base, and one or more answers are set for the user questions in the knowledge base to enrich and expand the knowledge base.

More specifically, in the process of generating a new knowledge item by using a clustering algorithm, user problems are processed by using a TF-IDF (Term Frequency-Inverse Document Frequency) technology, i.e., a commonly used weighting technology for information retrieval (information retrieval) and text mining (text mining), so as to determine the similarity of the user problems by converting the user problems into vectors and calculating the similarity between vectors corresponding to the user problems, thereby realizing user problem clustering.

On the other hand, in the case that the answer result is that the user question is matched to the knowledge item, the unmatched reason of the answer corresponding to the user question in the matched knowledge item and the number of the corresponding user questions are counted. Specifically, the unmatched reason of the answer corresponding to each matched knowledge item according to the knowledge item statistics and the number of user questions are shown in the following table 4, wherein a plurality of user questions matched with the "material" of the knowledge item are provided, and the number of the user questions filtered due to the unmatched commodity classification of the corresponding answer is at most 50. It is understood that the greater the number of questions of the user, the lower the probability that the corresponding answer is adopted, i.e., the more the answer needs to be updated. Therefore, the answers to be updated in the knowledge base or information such as commodity classification, commodity identification, effective time and the like related to the answers can be determined based on the counted unmatched reasons of the answers corresponding to each knowledge item and the number of the user questions.

Table 4 statistical result example based on knowledge entries

And S103, optimizing the knowledge base according to the diagnosis and analysis result.

In one aspect, upon generating a new knowledge item from a cluster of user questions that do not match a knowledge item, the new knowledge item may be added to a knowledge base and one or more answers may be configured in the knowledge base for the corresponding user questions to enrich the augmented knowledge base.

On the other hand, when the answer result is that the user question is matched with the knowledge item, the answer indicated by the knowledge item in the knowledge base is updated according to the unmatched reason of the answer of the user question and the number of the corresponding user questions. If table 4 is still used as an example for illustration, the answer corresponding to the user question indicated by the "weather" item may be updated or enriched in the knowledge base; meanwhile, the answer corresponding to the user question indicated by the knowledge item 'power' can be updated according to the current time period; for the knowledge items "function" and "material", information such as the product identification and product classification related to the answer needs to be updated respectively.

Furthermore, in order to make the updated commodity identification and commodity classification more in line with the expectation of the user and improve the satisfaction degree of the user on the answer, under the condition that the unmatched reason of the answer is that the commodity identification is unmatched, the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base is updated according to the occurrence frequency of the commodity identification in the user question; and under the condition that the unmatched reason of the answer is that the commodity classification is unmatched, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification in the user question. Specifically, taking the example that the commodity identifications appearing in the user question are AAA, BBB, CCC, respectively, and the corresponding appearance frequencies are 10, 5, and 1, respectively, the commodity identification AAA with the highest appearance frequency may be preferentially substituted for the commodity identification related to the answer in the knowledge base; if the commodity classifications appearing in the user question are 111, 222 and 333, respectively, and the corresponding appearance frequencies are 3, 2 and 1, respectively, for example, the commodity classification 111 with the highest appearance frequency may be used to replace the commodity share classification related to the answer in the knowledge base.

In addition, with continuous optimization and updating of the knowledge base, in order to avoid knowledge items with unconfigured answers or with no yet-to-be-found answers in the knowledge base as much as possible, in the whole knowledge base management process, whether the knowledge base has knowledge items with no indicated answers or with no yet-to-be-found answers or not can be monitored in real time, so that under the condition that the knowledge base has knowledge items with no indicated answers or with no yet-to-be-found answers, answers or with no yet-to-be-found answers corresponding to the knowledge items are added in the knowledge base.

Based on the embodiment, the automatic diagnosis and analysis of the knowledge base are realized by dynamically acquiring the user questions received by the customer service robot and the response results provided by the customer service robot based on the knowledge base; based on the diagnosis and analysis result, a new knowledge item is generated through a clustering algorithm, so that the expansion of a knowledge base is realized; meanwhile, under the condition that the unmatched reason of the answer is that the commodities are unmatched or the commodity classifications are unmatched, the commodity identification or the commodity classification corresponding to the user problems in the knowledge base is updated by counting the commodity identification or the commodity classification appearing in the user problems. In addition, whether the knowledge items in the knowledge base are provided with the answers or the answers at the bottom of a pocket is monitored in real time, so that the management and optimization of the knowledge base are further realized, and the diagnosis and optimization efficiency of the knowledge base is improved.

Referring to fig. 2, on the basis of the foregoing embodiment, an embodiment of the present invention provides another method for managing a knowledge base of a customer service robot, where the method specifically includes the following steps:

step S201, one or more user questions received by the customer service robot and a reply result provided by the customer service robot for the user questions based on the knowledge base are obtained. Specifically, the user question and the response result pushed by the customer service robot can be received through the message queue.

Step S202, judging whether the user question is matched with a knowledge item; if the answer result is that the user question matches the knowledge item, the step S206 is continuously executed, and if the answer result is that the user question does not match the knowledge item, the step S203 is continuously executed.

Step S203, judging whether the number of the user questions which are not matched with the knowledge items is larger than the threshold number of the user questions when the answer result is that the user questions are not matched with the knowledge items; if yes, the following step S204 is continuously executed, and if not, the following step S201 is continuously executed, namely, the user question, the response result and the knowledge item are continuously acquired from the message queue.

And step S204, clustering the user problems by adopting a clustering algorithm to generate new knowledge items.

Step S205, add the new knowledge item to the knowledge base. At the same time, one or more answers should also be configured for the user question indicated by the new knowledge item.

And step S206, counting the unmatched reasons of the answers corresponding to the user questions in the matched knowledge items and the number of the corresponding user questions.

Step S207, updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers to the user questions and the corresponding number of the user questions.

Referring to fig. 3, on the basis of the foregoing embodiment, an embodiment of the present invention provides a method for optimizing a knowledge base of a customer service robot, so as to describe in detail an implementation manner of step S207, which may specifically include the following steps:

step S2071, judging the reasons of unmatched answers; if the unmatched reason of the answer is that the product classification is not matched, the step S2075 is continuously executed, if the unmatched reason of the answer is that the product identification is not matched, the step S2073 is continuously executed, and if the unmatched reason of the answer is that the user is dissatisfied, the valid time is not matched and other reasons are continuously executed, the step S2072 is continuously executed.

Step S2072, in case that the unmatched reason of the answer is the user dissatisfaction or the other reasons such as the mismatch of the valid time, updating the answer indicated by the knowledge item in the knowledge base.

Step S2073, counting the commodity identification in the user problem and the occurrence frequency of the commodity identification.

And step S2074, updating the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity identification.

Step S2075, counting the commodity classifications in the user question and the occurrence frequency of the commodity classifications.

And step S2076, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification.

Referring to fig. 4, on the basis of the above embodiment, an embodiment of the present invention provides a management apparatus 400 for a knowledge base of a customer service robot, including: an information acquisition module 401, a diagnosis analysis module 402 and a knowledge base optimization module 403; wherein the content of the first and second substances,

the information acquisition module 401 is configured to acquire one or more user questions received by a customer service robot and a response result provided by the customer service robot for the user questions based on a knowledge base, where the knowledge base includes one or more knowledge entries indicating one or more user questions matched with the knowledge entries and one or more answers, and the response result indicates whether the user questions are matched with the knowledge entries and a reason why the answers provided by the customer service robot are not matched when the user questions are matched with the knowledge entries;

the diagnosis and analysis module 402 is configured to perform diagnosis and analysis on the user question according to the answer result and the knowledge item hit by the user question in the knowledge base;

the knowledge base optimizing module 403 is configured to optimize the knowledge base according to the result of the diagnosis and analysis.

In an optional implementation manner, the information obtaining module 401 is configured to obtain, through a message queue, the user question and the response result that are pushed to the message queue by the customer service robot.

On the basis, before the customer service robot pushes the user question and the response result to the message queue, the customer service robot acquires the user question and the response result through a dynamic point burying technology.

In an alternative embodiment, the performing a diagnostic analysis on the user question according to the type of the response result and the knowledge item hit by the user question in the knowledge base includes:

clustering the user questions by adopting a clustering algorithm to generate new knowledge items under the condition that the answer result is that the user questions are not matched with any knowledge items;

and in the case that the answer result is that the user question is matched with the knowledge item, counting the unmatched reason of the answer corresponding to the user question in each matched knowledge item and the number of the corresponding user questions.

In an alternative embodiment, the diagnostic analysis module 403 is further configured to,

before clustering the user problems by adopting a clustering algorithm to generate a new knowledge item, judging whether the number of the user problems which are not matched with the knowledge item is larger than a threshold value user problem number;

and clustering the user problems by adopting a clustering algorithm to obtain new knowledge items under the condition that the number of the user problems is larger than the threshold number of the user problems.

In an alternative embodiment, the optimizing the knowledge base according to the results of the diagnostic analysis includes:

and updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers of the user questions and the number of the corresponding user questions when the answer result is that the user questions are matched with the knowledge items.

In an alternative embodiment, the reasons for the answers not matching include one or more of the following: the valid time is not matched, the commodity identification is not matched, the commodity classification is not matched, and the user is not satisfied.

In an optional implementation manner, the updating the answers indicated by the knowledge items in the knowledge base according to the unmatched reasons of the answers to the user questions and the corresponding number of the user questions includes:

under the condition that the unmatched reason of the answer is that the commodity identification is not matched, updating the commodity identification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity identification in the user question;

and under the condition that the unmatched reason of the answer is that the commodity classifications are not matched, updating the commodity classification corresponding to the answer indicated by the knowledge item in the knowledge base according to the occurrence frequency of the commodity classification in the user question.

In an alternative embodiment, the diagnostic analysis module 403 is further configured to,

judging whether the knowledge base has knowledge items which do not indicate answers or not indicate bottom-of-pocket answers or not, and increasing the answers or bottom-of-pocket answers corresponding to the knowledge items in the knowledge base under the condition that the knowledge items which do not indicate answers or not indicate bottom-of-pocket answers exist in the knowledge base.

Fig. 5 shows an exemplary system architecture 500 of a method for managing a customer service robot knowledge base or a management apparatus of a customer service robot knowledge base to which an embodiment of the present invention can be applied.

As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like.

The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting user consultation of questions, including but not limited to a smart customer service robot, etc.

The server 505 may be a server providing various services, such as a server that analyzes the user question and answer results sent by the user using the terminal devices 501, 502, 503 to optimize the knowledge base. The background management server can analyze and process the received data such as the user question and the response result, and feed back the processing result to the terminal equipment.

The method for managing the customer service robot knowledge base according to the embodiment of the present invention is generally executed by the server 505, and accordingly, the management apparatus for the customer service robot knowledge base is generally provided in the server 505.

It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 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. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 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 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.

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 information acquisition module, a diagnostic analysis module, and a knowledge base optimization module. The names of these modules do not in some cases constitute a limitation on the module itself, for example, the knowledge base optimization module may also be described as a "module for optimizing a knowledge base based on the results of a diagnostic analysis".

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: acquiring one or more user questions received by a customer service robot and a response result provided by the customer service robot for the user questions based on a knowledge base, wherein the knowledge base comprises one or more knowledge items, the knowledge items indicate one or more user questions matched with the knowledge items and one or more answers, and the response result indicates whether the user questions are matched with the knowledge items and the reasons for unmatching the answers provided by the customer service robot when the user questions are matched with the knowledge items; performing diagnosis analysis on the user question according to the answer result and the knowledge item hit by the user question in the knowledge base; and optimizing the knowledge base according to the diagnosis and analysis result.

According to the technical scheme of the embodiment of the invention, the automatic diagnosis and analysis of the knowledge base are realized by dynamically acquiring the user questions received by the customer service robot and the reply result provided by the customer service robot based on the knowledge base; based on the diagnosis and analysis result, a new knowledge item is generated through a clustering algorithm, so that the expansion of a knowledge base is realized; meanwhile, under the condition that the unmatched reason of the answer is that the commodities are unmatched or the commodity classifications are unmatched, the commodity identification or the commodity classification corresponding to the user problems in the knowledge base is updated by counting the commodity identification or the commodity classification appearing in the user problems. In addition, whether the knowledge items in the knowledge base are provided with the answers or the answers at the bottom of a pocket is monitored in real time, so that the management and optimization of the knowledge base are further realized, and the diagnosis and optimization efficiency of the knowledge base 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.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:词库更新方法和装置、风险控制方法、装置和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!