WO2023147733A1 - 问答方法、装置、电子设备和计算机可读存储介质 - Google Patents

问答方法、装置、电子设备和计算机可读存储介质 Download PDF

Info

Publication number
WO2023147733A1
WO2023147733A1 PCT/CN2022/131497 CN2022131497W WO2023147733A1 WO 2023147733 A1 WO2023147733 A1 WO 2023147733A1 CN 2022131497 W CN2022131497 W CN 2022131497W WO 2023147733 A1 WO2023147733 A1 WO 2023147733A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
question
topic
reply
category
Prior art date
Application number
PCT/CN2022/131497
Other languages
English (en)
French (fr)
Inventor
夏波
Original Assignee
京东科技信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东科技信息技术有限公司 filed Critical 京东科技信息技术有限公司
Publication of WO2023147733A1 publication Critical patent/WO2023147733A1/zh

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/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular to a question answering method, device, electronic equipment and computer-readable storage medium.
  • Online customer service extracts key information from user questions through chatting with users, and provides corresponding answers through internal analysis.
  • online customer service includes robot customer service and human customer service.
  • robot customer service cannot understand the semantics of user questions well and cannot solve user problems, so users will choose manual customer service, resulting in excessive work pressure for manual customer service.
  • This application aims to solve one of the technical problems in the related art at least to a certain extent.
  • the application proposes a question answering method, device, electronic equipment, and computer-readable storage medium.
  • the embodiment of the first aspect of the present application proposes a question answering method, including:
  • the target reply is sent to the customer service working end as a reply suggestion.
  • the embodiment of the second aspect of the present application proposes a question answering device, including:
  • the receiving module is used to receive the target question of the client
  • a classification module configured to classify according to the semantics of the target question, to obtain the target topic to which the target question belongs, and the confidence that the target question belongs to the target topic;
  • a reply module configured to reply to the target question by using a question-and-answer model corresponding to the target topic to obtain a target reply;
  • a processing module configured to send the target reply to the client when the confidence is greater than a set threshold
  • the processing module is further configured to send the target reply as a reply suggestion to the customer service working terminal when the confidence degree is less than or equal to the set threshold.
  • the embodiment of the third aspect of the present application proposes an electronic device, including:
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in the first aspect.
  • the embodiment of the fourth aspect of the present application provides a non-transitory computer-readable storage medium storing computer instructions, the computer instructions are used to make the computer execute the method described in the first aspect.
  • the embodiment of the fifth aspect of the present application provides a computer program product, including a computer program, when the computer program is executed by a processor, the method described in the first aspect is implemented.
  • FIG. 1 is a schematic flow diagram of a question-and-answer method provided in an embodiment of the present application
  • FIG. 2 is a schematic flow diagram of another question-and-answer method provided in the embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another question-and-answer method provided in the embodiment of the present application.
  • FIG. 4 is a schematic diagram of a question-and-answer interaction provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a knowledge base provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a question answering device provided by an embodiment of the present application.
  • This application proposes a question answering method, device, electronic equipment, and computer-readable storage medium to implement a question answering model based on training.
  • the robot helps the customer service to assist in answering the user's questions, and at the same time determines different answering methods based on the confidence of the topic category. , improving the accuracy and efficiency of question answering.
  • FIG. 1 is a schematic flowchart of a question answering method provided by an embodiment of the present application.
  • the method includes the following steps 101 to 105 .
  • Step 101 receiving a target question from a client.
  • the execution subject of the embodiment of the present application is a question answering device, which may be an electronic device, or be set in an electronic device.
  • the electronic device includes a robot, but is not limited to a robot, and may also be a mobile phone, a handheld computer, and the like.
  • the client is an application program installed on the electronic device, for example, an e-commerce application program, an instant messaging application program, and the like.
  • Target questions are questions that users send through the client, for example, hello, are you there? Or: When will my order ship? Or: what size is this washing machine? Or: what type of computer's CPU, how big is the memory, and what size is it? etc.
  • Step 102 classify according to the semantics of the target question, and obtain the target topic to which the target question belongs, and the confidence that the target question belongs to the target topic.
  • the target question is input into the trained recognition model, and the target topic to which the target question belongs and the confidence that the target question belongs to the target topic are output.
  • the vector coding of the question text of the corpus pair contained in each topic category determine the vector coding of each topic category, encode the target question, and obtain the vector coding of the target question, according to The distance between the vector code of the target question and the vector code of each topic category, determine the target topic to which the target question belongs from each topic category, and determine the target question according to the distance between the vector code of the target question and the vector code of the target topic Confidence of belonging to the target topic.
  • the target question is "what is the size of this refrigerator XX", and the target subject of the determined target question is the industry category, specifically the refrigerator industry category, and at the same time, the confidence level of belonging to the refrigerator industry category is 0.9. If the target question is "when can the goods be shipped", then it is determined that the target topic to which the target question belongs is a general category, and the confidence level of belonging to the general category is 0.8.
  • Step 103 using the question answering model corresponding to the target topic to reply to the target question to obtain the target reply.
  • the question-answer model has a corresponding relationship with the target topic, that is, each topic has a corresponding question-answer model, and the question-answer model corresponding to the topic has learned the corresponding relationship between questions and replies under the topic through training in advance.
  • the target question is "what is the processor model of this computer”
  • the recognized target reply is "the model is X-11”.
  • Step 104 when the confidence level is greater than the set threshold, send a target reply to the client.
  • Step 105 if the confidence level is less than or equal to the set threshold, send the target reply as a reply suggestion to the customer service working terminal.
  • the target question reply in order to improve the accuracy of the target question reply, different types of responses are performed according to the accuracy of the classification result of the target question, that is, according to the confidence of the determined target topic to which the target question belongs.
  • the target reply when the confidence of the target topic is greater than the set threshold, the target reply is sent to the client, that is to say, if it is determined to be a target reply with high accuracy, the target reply is sent to the client .
  • the target reply is sent to the customer service working end as a reply suggestion, so as to be confirmed as an accurate target reply at the customer service working end, and then sent to client.
  • the message channel between the electronic device, the client, and the customer service working end is opened.
  • the electronic device obtains the target question of the client, it pushes the target reply to different target ends according to the matching routing rules, so that the electronic device Closely integrated with manual work, the reception efficiency of customer service work is improved, and the experience of client users is improved at the same time.
  • the set threshold can be set by those skilled in the art according to business requirements, and its size can be adjusted according to the accuracy of business requirements.
  • the target question of the client is received, classified according to the semantics of the target question, the target topic to which the target question belongs, and the confidence that the target question belongs to the target topic are obtained, and the question answering model corresponding to the target topic is used to analyze the target topic.
  • the robot helps customer service to answer user questions. At the same time, based on the confidence of the topic category, it determines different answer methods, which improves the accuracy and efficiency.
  • FIG. 2 is a schematic flowchart of another question answering method provided in the embodiment of the present application, specifically illustrating the training process of the question answering model.
  • the method may include the following steps 201 to 208 .
  • Step 201 receiving a target question from a client.
  • Step 202 classify the target question according to its semantics, and obtain the target topic to which the target question belongs and the confidence that the target question belongs to the target topic.
  • steps 203 to 205 of the training process of the question-answering model of each subject category are not limited to be performed after step 202, but may also be performed before step 202 or before step 201.
  • Step 203 obtaining a plurality of corpus pairs from historical customer service dialogues.
  • a plurality of corpus pairs are obtained by extracting the historical chat corpus from the historical customer service conversations and the corpus of frequently asked questions accumulated by the customer service according to the tool based on data warehouse technology (Extract-Transform-Load, ETL). Among them, the corpus pair contains the question text and the corresponding reply text.
  • ETL refers to the process of extracting, transforming, and loading data from the source to the destination.
  • the term ETL is more commonly used in data warehouses, but its objects are not limited to data warehouses.
  • Step 204 performing clustering according to the semantics of the multiple corpus pairs, and dividing the multiple corpus pairs into at least two topic categories.
  • an unsupervised learning algorithm may be used to cluster the semantics of multiple corpus pairs.
  • similar corpus pairs can be classified into the same topic category based on the distance between the corpus pairs.
  • the clustering algorithm is hierarchical clustering algorithm, K-means clustering algorithm, and expectation maximization (Expectation Maximization, EM) clustering algorithm, etc.
  • EM expectation maximization
  • Step 205 using the corpus pairs included in each topic category to train a question answering model corresponding to the topic category.
  • the question text of a corpus pair in a topic category is input into the question answering model of the corresponding topic category to obtain a predicted reply.
  • the model parameters are adjusted to realize the training of the question answering model of the corresponding topic category.
  • the corpus pairs under the topic category are used as samples to train the corresponding question answering model, which improves the training effect of the question answering model corresponding to each topic category.
  • Step 206 Reply the target question by using the question answering model corresponding to the target topic to obtain the target reply.
  • Step 207 when the confidence level is greater than the set threshold, send a target reply to the client.
  • Step 208 if the confidence level is less than or equal to the set threshold, send the target reply as a reply suggestion to the customer service working terminal.
  • a plurality of corpus pairs are obtained in the dialogue of the historical customer service, and the plurality of corpus pairs are determined by clustering at least two subject categories determined by clustering, and the corpus pairs are determined by clustering
  • the category does not require manual labeling, which improves efficiency.
  • the question text and corresponding reply text contained in each corpus pair are used to train the question answering model through a supervised training method, which avoids manual labeling and improves the effect of model training, and uses a large number of historical samples for training, improving efficiency.
  • FIG. 3 is a schematic flowchart of another question-and-answer method provided in the embodiment of the present application. As shown in FIG. 3 , the method includes the following steps 301 to 311 .
  • Step 301 receiving a target question from a client.
  • an electronic device is taken as a robot as an example for description.
  • the robot interacts with the user through the client installed on the robot, and receives the user's target questions based on the gateway. For example, the user inputs the text of the target question, or acquires the voice of the target question, and determines the target question through voice recognition.
  • Step 302 classify the target question according to its semantics, and obtain the target topic to which the target question belongs and the confidence level that the target question belongs to the target topic.
  • the semantics of the target question is identified to determine the target topic to which the target question belongs and the confidence that the target question belongs to the target topic.
  • NLU Natural Language Understanding
  • step 303 the question answering model corresponding to the target topic is used to reply to the target question, and the target reply is obtained.
  • Step 304 determining that the confidence that the target question belongs to the target topic is greater than a set threshold.
  • steps 305 to 308 setting standard reply speeches for knowledge points under the target topic can be performed after step 304, or can be performed before step 304.
  • Step 305 from the historical customer service dialogues, determine the text of each question belonging to the target topic.
  • the target topic to which each question text belongs can be determined by referring to the clustering method in step 201 and step 202 in the above embodiment, so as to determine each question text belonging to the target topic.
  • Step 306 according to the semantic similarity between the question texts of the target topic, the questions are merged to obtain the merged questions of the target topic.
  • the vector codes of each question text of the target topic are determined, the semantic similarity is determined based on the distance between the vector codes of each question text, and the question texts whose semantic similarity meets the threshold are merged. For example, each question text is spliced, or each question text is fused to obtain each merged question of the target topic.
  • question text 1 is "when will it be shipped?"
  • question text 2 is “when can I receive it”
  • question text 3 is "has it been shipped?”
  • the merged question obtained by merging is "delivery time” or "receipt time”.
  • Step 307 according to each merged question of the target topic, generate corresponding knowledge points under the target topic.
  • each merged question is a knowledge point under the target topic.
  • delivery time is a corresponding knowledge point under the topic of general type.
  • Step 308 in response to the configuration operation, configure standard reply speeches for the knowledge points under the target topic.
  • the user's standard reply speech to the knowledge point configuration under the target topic is obtained, for example, for the knowledge point "delivery time", the corresponding standard reply speech is "48 hours after payment Inside".
  • Step 309 according to the target question, query each knowledge point under the target topic in the knowledge base.
  • the knowledge base is pre-established, and the knowledge base includes knowledge bases of various topics.
  • the knowledge base includes general knowledge base, industry knowledge base, FAQ knowledge base and so on.
  • the FAQ knowledge base uses the classification of standardized "shortcut phrases" and uses mathematical induction to form a standard FAQ.
  • each topic also has a corresponding answer model.
  • the general theme corresponds to the general model
  • the industry theme corresponds to the industry model.
  • the industry includes different industries such as washing machines, refrigerators, and air conditioners.
  • the knowledge base of each topic contains multiple knowledge points.
  • the knowledge points under the general topic are "delivery time” and “coupon”.
  • the target question is matched with each knowledge point under the target topic in the knowledge base, and the knowledge points that match the target question are determined, for example, based on distance matching, it is determined whether the target topic exists in the knowledge base.
  • the target knowledge points for question matching are determined, for example, based on distance matching, it is determined whether the target topic exists in the knowledge base.
  • Step 310 when it is determined that there is no target knowledge point matching the target question, or if the target knowledge point matching the target question is not configured with a standard reply speech technique, send a target reply to the client.
  • a target reply is sent to the client.
  • the pressure on the customer service working end is reduced, and the reply efficiency is improved.
  • the target reply is sent to the client to realize the reply to the target question, which reduces the pressure on the customer service working end and improves the response efficiency.
  • Step 311 when it is determined that the existing target knowledge point matching the target question is configured with a standard reply speech, send the standard reply speech to the client.
  • the standard reply speech is based on user calibration, the accuracy is high. Therefore, when the standard reply speech is configured for the target knowledge point matching the target question, the standard reply speech The reply speech is sent to the client, which improves the accuracy of the reply.
  • the reply sent to the client in FIG. 4 may be a target reply obtained from recognition, or a standard reply phrase matched from the knowledge base.
  • Step 312 when the confidence that the target question belongs to the target topic is less than or equal to the set threshold, send the target reply as a reply suggestion to the customer service working terminal.
  • the knowledge base of each topic is pre-generated, and the knowledge points of the question are set in the knowledge base of each topic, and the standard reply speech is configured for the knowledge points under the target topic in response to the operation configuration in advance , thus, in order to improve accuracy, for the target reply obtained for the target question, first determine whether there is a standard reply script corresponding to the target question, if not, send the target reply to the client, if there is a standard reply script, Then the standard reply speech is sent to the client, which improves the accuracy of the reply and improves the efficiency of the reply.
  • the present application also proposes a question answering device.
  • FIG. 6 is a schematic structural diagram of a question answering device provided by an embodiment of the present application.
  • the device includes a receiving module 61 , a classifying module 62 , a replying module 63 and a processing module 64 .
  • the receiving module 61 is configured to receive the target question of the client.
  • the classification module 62 is configured to perform classification according to the semantics of the target question, and obtain the target topic to which the target question belongs, and the confidence degree that the target question belongs to the target topic.
  • the reply module 63 is configured to use the question-answer model corresponding to the target topic to reply to the target question to obtain a target reply.
  • a processing module 64 configured to send the target reply to the client when the confidence level is greater than a set threshold.
  • the processing module 64 is further configured to send the target reply as a reply suggestion to the customer service working terminal when the confidence degree is less than or equal to the set threshold.
  • the device further includes an acquisition module, a clustering module, and a training module.
  • the obtaining module is used to obtain multiple corpus pairs from historical customer service dialogues.
  • a clustering module configured to perform clustering according to the semantics of the multiple corpus pairs, and divide the multiple corpus pairs into at least two topic categories.
  • the training module is used to use the corpus pairs contained in each of the subject categories to train the question answering model corresponding to the subject category.
  • each corpus pair includes a question text and a corresponding reply text.
  • the training module is used to input the question text of the corpus pair in the subject category into the question answering model of the corresponding subject category for any subject category to obtain a predicted reply; according to the difference between the predicted reply and the corresponding reply text Make model parameter adjustments.
  • the classification module 62 is configured to determine the vector encoding of each subject category according to the vector encoding of the question text of the corpus pair contained in each subject category; encode the target question, Obtain the vector coding of the target question; according to the distance between the vector coding of the target question and the vector coding of each topic category, determine the target topic to which the target question belongs from each topic category; The distance between the vector encoding and the vector encoding of the target topic determines the confidence that the target question belongs to the target topic.
  • the processing module 64 includes a query unit and a sending unit.
  • a query unit configured to query knowledge points under the target topic in the knowledge base according to the target question when the confidence level is greater than a set threshold.
  • a sending unit configured to send the target reply to the client when it is determined that there is no target knowledge point matching the target question, or if the target knowledge point is not configured with a standard reply speech technique .
  • the processing module 64 further includes a determining unit, a combining unit, a generating unit, and a configuring unit.
  • the determination unit is configured to determine each question text belonging to the target topic from the historical customer service dialogue.
  • the merging unit is configured to merge questions according to the semantic similarity between the texts of the questions of the target topic, so as to obtain the merged questions of the target topic.
  • a generating unit configured to generate corresponding knowledge points under the target topic according to each merged question of the target topic.
  • the configuration unit is configured to configure the standard reply speech for the knowledge points under the target topic in response to a configuration operation.
  • the target question of the client is received, and the target question is classified according to the semantics of the target question, the target topic to which the target question belongs, and the confidence that the target question belongs to the target topic are obtained, and the question answering model corresponding to the target topic is used to analyze the target topic.
  • the robot helps customer service to answer user questions. At the same time, based on the confidence of the topic category, it determines different answer methods, which improves the accuracy and efficiency.
  • an embodiment of the present application further proposes an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor.
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the methods described in the foregoing method embodiments.
  • the embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions, the computer instructions are used to make the computer execute the method described in the foregoing method embodiments.
  • the embodiments of the present application further propose a computer program product, including a computer program, and when the computer program is executed by a processor, the methods described in the foregoing method embodiments are implemented.
  • first and second are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
  • the features defined as “first” and “second” may explicitly or implicitly include at least one of these features.
  • “plurality” means at least two, such as two, three, etc., unless otherwise specifically defined.
  • a "computer-readable medium” may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device.
  • computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM).
  • the computer-readable medium may even be paper or other suitable medium on which the program can be printed, as it may be possible, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or other suitable processing if necessary.
  • the program is processed electronically and stored in computer memory.
  • each part of the present application may be realized by hardware, software, firmware or a combination thereof.
  • various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: a discrete Logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Human Computer Interaction (AREA)
  • Accounting & Taxation (AREA)
  • Probability & Statistics with Applications (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提出一种问答方法、装置、电子设备和计算机可读存储介质,其中,方法包括:接收客户端的目标问题,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复,在置信度大于设定阈值的情况下,向客户端发送目标回复,在置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端。

Description

问答方法、装置、电子设备和计算机可读存储介质
相关申请的交叉引用
本申请基于申请号为202210116820.1、申请日为2022年02月07日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种问答方法、装置、电子设备和计算机可读存储介质。
背景技术
随着互联网和电子商务的发展,很多电商或网站都会提供在线客服的服务,以为用户解答疑惑。在线客服通过与用户进行聊天对话,从用户的提问中提取关键信息,经过内部分析反馈相应的答案,其中,在线客服包括机器人客服和人工客服。然而,机器人客服不能很好的理解用户问题的语义,无法解决用户的问题,使得用户会选择人工客服,造成人工客服的工作压力过大。
发明内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本申请提出一种问答方法、装置、电子设备和计算机可读存储介质。
本申请第一方面实施例提出了一种问答方法,包括:
接收客户端的目标问题;
根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度;
采用所述目标主题对应的问答模型对所述目标问题进行回复,得到目标回复;
在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复;
在所述置信度小于或等于所述设定阈值的情况下,将所述目标回复作为回复建议发送至客服工作端。
本申请第二方面实施例提出了一种问答装置,包括:
接收模块,用于接收客户端的目标问题;
分类模块,用于根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度;
回复模块,用于采用所述目标主题对应的问答模型对所述目标问题进行回复,得到目标回复;
处理模块,用于在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复;
所述处理模块,还用于在所述置信度小于或等于所述设定阈值的情况下,将所述目标回复作为回复建议发送至客服工作端。
本申请第三方面实施例提出了一种电子设备,包括:
至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行第一方面所述的方法。
本申请第四方面实施例提出了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行第一方面所述的方法。
本申请第五方面实施例提出了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现第一方面所述的方法。
本申请实施例所提供的技术方案可以包含如下的有益效果:
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本申请实施例提供的一种问答方法的流程示意图;
图2为本申请实施例提供的另一种问答方法的流程示意图;
图3为本申请实施例提供的再一种问答方法的流程示意图;
图4为本申请实施例提供的一种问答交互的示意图;
图5为本申请实施例提供的一种知识库的示意图;以及
图6为本申请实施例提供的一种问答装置的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。
本申请提出一种问答方法、装置、电子设备和计算机可读存储介质,以实现基于训练得到的问答模型,机器人帮助客服辅助回答用户的问题,同时基于主题类别的置信度,确定不同的应答方式,提高了问答的准确率和效率。
下面参考附图描述本申请实施例的问答方法、装置、电子设备和计算机可读存储介质。
图1为本申请实施例所提供的一种问答方法的流程示意图。
如图1所示,该方法包括以下步骤101至步骤105。
步骤101,接收客户端的目标问题。
本申请实施例的执行主体为问答装置,问答装置可为电子设备,或者是设置在电子设备中。电子设备包含机器人,但不限定为机器人,还可以为移动手机、掌上电脑等。
在一些实施例中,客户端是安装在电子设备上的应用程序,例如,电商应用程序,即时沟通应用程序等。
目标问题是用户通过客户端发送的问题,例如,你好,在吗?或者是:我的订单什么时候发货?或者是:这款洗衣机尺寸是多少?或者是:电脑的CPU什么型号、内存多大、尺寸是多大?等等。
步骤102,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度。
本本申请实施例的一种实现方式中,将目标问题输入训练得到的识别模型,输出目标问题所属的目标主题,以及目标问题属于目标主题的置信度。
本申请实施例的另一种实现方式中,根据各主题类别中所含语料对的问题文本的向量编码,确定各主题类别的向量编码,对目标问题进行编码,得到目标问题的向量编码,根据目标问题的向量编码与各主题类别的向量编码之间的距离,从各主题类别中确定目标问题所属的目标主题,根据目标问题的向量编码与目标主题的向量编码之间的距离,确定目标问题属于目标主题的置信度。
例如,目标问题为“XX这款冰箱的尺寸是多少”,确定的目标问题所属的目标主题为行业类别,具体为冰箱行业类别,同时,属于冰箱行业类别的置信度为0.9。目标问题为“什么时候可以发货”,则确定该目标问题所属的目标主题为通用类别,属于通用类别的置信度为0.8。
步骤103,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复。
其中,问答模型和目标主题具有对应关系,即每一个主题均具有对应的问答模型,该主题对应的问答模型,已经预先通过训练学习到该主题下的问题和回复的对应关系。
例如,目标问题为“这个电脑的处理器型号是什么”,识别得到的目标回复为“型号为X-11”。
步骤104,在置信度大于设定阈值的情况下,向客户端发送目标回复。
步骤105,在置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端。
本申请实施例中,为了提高目标问题回复的准确度,根据目标问题的分类结果的准确度,即根据确定的目标问题所属的目标主题的置信度进行不同类型的应答。在一种场景下,在目标主题的置信度大于设定阈值的情况下,向客户端发送目标回复,也就是说在确定是准确度较高的目标回复的情况下,向客户端发送目标回复。在另一种场景下,在目标主题的置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端,以在客服工作端确认为准确的目标回复,则发送至客户端。在本申请实施例中,开通了电子设备和客户端、客服工作端的消息通道,电子设备在获取到客户端的目标问题后,将目标回复根据匹配的路由规则推送到不同的目标端,使电子设备和人工紧 密结合,提高客服工作端的接待效率,同时提升客户端用户的体验。
在一些实施例中,设定阈值可以是本领域技术人员根据业务需求进行设置的,其大小可以随业务需求的精度进行调整。
本申请实施例的问答方法中,接收客户端的目标问题,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复,在置信度大于设定阈值的情况下,向客户端发送目标回复,在置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端,实现了基于训练得到的问答模型,机器人帮助客服辅助回答用户的问题,同时基于主题类别的置信度,确定不同的应答方式,提高了准确率和效率。
上述实施例中说明了,针对获取的客户端的目标问题,确定该目标问题所述的目标主题,根据目标主题对应的问答模型对目标问题进行回复,得到目标回复,从而,本实施例中对目标主题对应的问答模型的训练过程进行说明。基于上一实施例,图2为本申请实施例提供的另一种问答方法的流程示意图,具体说明了问答模型的训练过程。
如图2所示,该方法可以包括以下步骤201至步骤208。
步骤201,接收客户端的目标问题。
步骤202,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度。
其中,步骤201至步骤202,可参照前述方法实施例的解释说明,原理相同,此处不再赘述。
上述步骤203至步骤205的各个主题类别的问答模型的训练过程,并不限定在步骤202之后执行,还可以在步骤202之前,或者是步骤201之前执行。
步骤203,从历史客服对话中,获取多个语料对。
本申请实施例中,根据基于数据仓库技术(Extract-Transform-Load,ETL)的工具从历史客服对话中抽取历史聊天语料,以及客服累积的常见问题解答的语料,得到多个语料对。其中,语料对中包含问题文本和对应的回复文本。
其中,ETL表示将数据从来源端经过抽取(extract)、转换(transform)、加载(load)至目的端的过程。ETL一词较常用在数据仓库,但其对象并不限于数据仓库。
步骤204,根据多个语料对的语义进行聚类,将多个语料对划分为至少两个主题类别。
本申请实施例的一种实现方式中,可利用无监督的学习算法对多个语料对的语义进行聚类。作为一种实现方式,可基于语料对之间的距离,将相似的语料对划分为同一主题类别。例如,聚类算法为层次聚类算法、K-means聚类算法和期望最大化(Expectation Maximization,EM)聚类算法等。通过聚类,将多个语料对划分为至少两个主题类别,而聚类算法,属于无监督的学习算法,不需要人工标注,降低了主题类别识别的成本,提高了效率。
步骤205,采用各主题类别内包含的语料对,训练对应主题类别的问答模型。
在本申请实施例的一种实现方式中,针对任意的一主题类别,将一主题类别中语料对的问题文本输入对应主题类别的问答模型,得到预测回复。根据预测回复与对应的回复文本之间的差异进行模型参数调整,实现了对对应主题类别的问答模型进行训练。本申请实施例中,针对每一个主题类别,分别采用该主题类别下的语料对作为样本对对应的问答模型进行训练,提高了各个主题类别对应的问答模型的训练效果。
步骤206,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复。
步骤207,在置信度大于设定阈值的情况下,向客户端发送目标回复。
步骤208,在置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端。
其中,步骤206至步骤208,可参照前述方法实施例的解释说明,原理相同,此处不再赘述。
本申请实施例中的问答方法中采用对历史客服对话中,获取多个语料对,通过聚类的方式,确定多个语料对通过聚类确定的至少两个主题类别,通过聚类确定语料对的类别,不需要人工标注,提高了效率。设置至少两个主题类别对应的问答模型,进而采用每个主题类型包含的语料对,训练对应主题类别的问答模型,实现了训练得到的问答模型,学习到对应主题类别下的问题和回复之间的对应关系,提高了各个主题类别下问题回复的效率。其中,采用每个语料对中包含的问题文本和对应的回复文本,通过有监督的训练方法训练问答模型,避免了人工的标注,提高了模型训练的效果,而采用历史大量样本进行训练,提高了效率。
基于上述实施例,本申请实施例提供了另一种问答方法,图3为本申请实施例提供的另一种问答方法的流程示意图,如图3所示,该方法包含以下步骤301至步骤311。
步骤301,接收客户端的目标问题。
本申请实施例中,以电子设备为机器人为例进行说明。
如图4所示,机器人通过安装在机器人上的客户端,与用户交互,基于网关接收用户的目标问题。例如,通过用户输入目标问题的文本,或者是获取目标问题的语音,通过语音识别,确定目标问题。
步骤302,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度。
如图4所示,根据获取的目标问题,基于自然语言理解技术(Natural Language Understanding,NLU),识别目标问题的语义,以确定目标问题所属的目标主题,以及目标问题属于目标主题的置信度。
步骤303,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复。
其中,步骤301至步骤302,可参照前述实施例中的解释说明,原理相同,本实施例中不再赘述。
步骤304,确定目标问题属于目标主题的置信度大于设定阈值。
需要说明的是,步骤305至步骤308中对目标主题下知识点设置标准回复话术,可在步骤304之后执行,也可以在步骤304之前执行。
步骤305,从历史客服对话中,确定属于目标主题的各问题文本。
可参照上述实施例中步骤201和步骤202中的聚类的方法,确定各问题文本属于的目标主题,从而确定属于目标主题的各问题文本。
步骤306,根据目标主题的各问题文本之间的语义相似性,进行问题合并,得到目标主题的各合并问题。
本申请实施例中,确定目标主题的各问题文本的向量编码,基于各问题文本的向量编码间的距离,确定语义相似性,将语义相似度满足阈值的各个问题文本进行合并。例如,将各个问题文本进行拼接,或者是将各个问题文本进行融合,得到目标主题的各合并问题。
例如,目标主题为通用类型的主题,问题文本1为“啥时候发货?”,问题文本2为“什么时候能收到”,问题文本3为“发货了吗”,那么通过融合的方式,合并得到的合并问题为“发货时间”或者为“收到货时间”。
步骤307,根据目标主题的各合并问题,生成目标主题下对应的知识点。
本申请实施例中,目标主题下,具有多个合并问题,每一个合并问题即为目标主题下的一个知识点。例如,发货时间,即通用类型的主题下对应的一个知识点。
步骤308,响应于配置操作,对目标主题下的知识点配置标准回复话术。
本申请实施例中,响应于配置操作,获取用户对目标主题下的知识点配置的标准回复话术,例如,知识点“发货时间”,对应的标准回复话术为“付款后的48小时内”。
步骤309,根据目标问题查询知识库中目标主题下的各知识点。
其中,知识库是预先建立的,知识库中包含了各主题的知识库。例如,如图4和图5所示,该知识库中包含通用知识库,行业知识库,常见问题解答FAQ知识库等。其中,常见问题解答FAQ知识库是采用对标准化“快捷短语”分类,用数学归纳法将其形成标准的FAQ,同时每一个主题还具有对应的应答模型。其中,通用的主题对应的是通用模型,行业的主题,对应的是行业模型。其中,行业包含洗衣机、冰箱、空调等不同行业。而各主题的知识库中,包含多个知识点。
例如,通用主题下的知识点为“发货时间”和“优惠券”。
本申请实施例中,将目标问题和知识库中目标主题下的各知识点进行匹配,确定和目标问题匹配的知识点,例如,基于距离进行匹配,确定知识库中目标主题下是否存在和目标问题匹配的目标知识点。
步骤310,在确定不存在与目标问题匹配的目标知识点的情况下,或者,目标问题匹配的目标知识点未配置标准回复话术的情况下,向客户端发送目标回复。
本申请实施例的一种实现方式中,在确定目标问题属于目标主题的置信度大于设定阈值,同时确定不存在与目标问题匹配的目标知识点的情况下,则向客户端发送目标回复,以实现对目标问题进行回复,降低了客服工作端的压力,提高了回复效率。
本申请实施例的另一种实现方式中,在确定目标问题属于目标主题的置信度大于设定阈值的情况下,确定目标问题存在匹配的目标知识点,而该目标指示点未配置标准回复话术的情况下,向客户端发送目标回复,以实现对目标问题进行回复,降低了客服工作端的压力,提高了回复效率。
步骤311,在确定存在的与目标问题匹配的目标知识点配置了标准回复话术的情况下,向客户端发送标准回复话术。
本申请实施例的一种实现方式中,在确定目标问题属于目标主题的置信度大于设定阈值的情况下,在确定存在的与目标问题匹配的目标知识点配置了标准回复话术的情况下,向客户端发送标准回复话术,由于标准回复话术,是基于用户标定的,准确度较高,因此,在确定目标问题匹配的目标知识点配置了标准回复话术的情况下,将标准回复话术发送给客户端,提高了回复的准确性。
需要说明的是,图4中发送至客户端的回复,可以为识别得到的目标回复,或者为从知识库中匹配得到的标准回复话术。
步骤312,在目标问题属于目标主题的置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端。
具体可参照前述实施例中的说明,此处不再赘述。
本申请实施例的问答方法中,预先生成各个主题的知识库,并在各个主题的知识库中设置问题的知识点,并预先响应于操作配置,对目标主题下的知识点配置标准回复话术,从而,为了提高准确性,针对目标问题获取到的目标回复,先确定是否有和目标问题对应的标准回复话术,若没有,则将目标回复发送至客户端,若存在标准回复话术,则将标准回复话术发送至客户端,提高了回复的准确性,提高了回复的效率。
为了实现上述实施例,本申请还提出一种问答装置。
图6为本申请实施例提供的一种问答装置的结构示意图。
如图6所示,该装置包括接收模块61、分类模块62、回复模块63和处理模块64。
接收模块61,用于接收客户端的目标问题。
分类模块62,用于根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度。
回复模块63,用于采用所述目标主题对应的问答模型对所述目标问题进行回复,得到目标回复。
处理模块64,用于在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复。
处理模块64,还用于在所述置信度小于或等于所述设定阈值的情况下,将所述目标回复作为回复建议发送至客服工作端。
进一步地,在本申请实施例的一种实现方式中,装置还包括获取模块、聚类模块和训练模块。
获取模块,用于从历史客服对话中,获取多个语料对。
聚类模块,用于根据所述多个语料对的语义进行聚类,将所述多个语料对划分为至少两个主题类别。
训练模块,用于采用各所述主题类别内包含的语料对,训练对应主题类别的问答模型。
在本申请实施例的一种实现方式中,每个所述语料对中包含问题文本和对应的回复文本。训练模块,用于针对任意的一主题类别,将所述一主题类别中语料对的问题文本输入对应主题类别的问答模型,得到预测回复;根据所述预测回复与对应的回复文本之间的差异进行模型参数调整。
在本申请实施例的一种实现方式中,分类模块62,用于根据各主题类别中所含语料对的问题文本的向量编码,确定各主题类别的向量编码;对所述目标问题进行编码,得到所述目标问题的向量编码;根据所述目标问题的向量编码与各主题类别的向量编码之间的距离,从各主题类别中确定所述目标问题所属的目标主题;根据所述目标问题的向量编码与所述目标主题的向量编码之间的距离,确定所述目标问题属于所述目标主题的置信度。
进一步地,在本申请实施例的一种实现方式中,处理模块64,包括查询单元和发送单元。
查询单元,用于在所述置信度大于设定阈值的情况下,根据所述目标问题查询知识库中所述目标主题下的各知识点。
发送单元,用于在确定不存在与所述目标问题匹配的目标知识点的情况下,或者,所述目标知识点未配置标准回复话术的情况下,向所述客户端发送所述目标回复。
在本申请实施例的一种实现方式中,处理模块64,还包括确定单元、合并单元、生成单元和配置单元。
确定单元,用于从历史客服对话中,确定属于所述目标主题的各问题文本。
合并单元,用于根据所述目标主题的各问题文本之间的语义相似性,进行问题合并,得到所述目标主题的各合并问题。
生成单元,用于根据所述目标主题的各合并问题,生成所述目标主题下对应的知识点。
配置单元,用于响应于配置操作,对所述目标主题下的知识点配置所述标准回复话术。
需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。
本申请实施例的问答装置中,接收客户端的目标问题,根据目标问题的语义进行分类,得到目标问题所属的目标主题,以及目标问题属于目标主题的置信度,采用目标主题对应的问答模型对目标问题进行回复,得到目标回复,在置信度大于设定阈值的情况下,向客户端发送目标回复,在置信度小于或等于设定阈值的情况下,将目标回复作为回复建议发送至客服工作端,实现了基于训练得到的问答模型,机器人帮助客服辅助回 答用户的问题,同时基于主题类别的置信度,确定不同的应答方式,提高了准确率和效率。
为了实现上述实施例,本申请实施例还提出一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器。
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述方法实施例所述的方法。
为了实现上述实施例,本申请实施例还提出一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行前述方法实施例所述的方法。
为了实现上述实施例,本申请实施例还提出一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现前述方法实施例所述的方法。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质 甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (15)

  1. 一种问答方法包括:
    接收客户端的目标问题;
    根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度;
    采用所述目标主题对应的问答模型对所述目标问题进行回复,得到目标回复;
    在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复;
    在所述置信度小于或等于所述设定阈值的情况下,将所述目标回复作为回复建议发送至客服工作端。
  2. 根据权利要求1所述的问答方法,还包括:
    从历史客服对话中,获取多个语料对;
    根据所述多个语料对的语义进行聚类,将所述多个语料对划分为至少两个主题类别;
    采用各所述主题类别内包含的语料对,训练对应主题类别的问答模型。
  3. 根据权利要求2所述的问答方法,其中,每个所述语料对中包含问题文本和对应的回复文本;所述采用各所述主题类别内包含的语料对,训练对应主题类别的问答模型,包括:
    针对任意的一主题类别,将所述一主题类别中语料对的问题文本输入对应主题类别的问答模型,得到预测回复;
    根据所述预测回复与对应的回复文本之间的差异进行模型参数调整。
  4. 根据权利要求2所述的方法,其中,所述根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度,包括:
    根据各主题类别中所含语料对的问题文本的向量编码,确定各主题类别的向量编码;
    对所述目标问题进行编码,得到所述目标问题的向量编码;
    根据所述目标问题的向量编码与各主题类别的向量编码之间的距离,从各主题类别中确定所述目标问题所属的目标主题;
    根据所述目标问题的向量编码与所述目标主题的向量编码之间的距离,确定所述目标问题属于所述目标主题的置信度。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复,包括:
    在所述置信度大于设定阈值的情况下,根据所述目标问题查询知识库中所述目标主题下的各知识点;
    在确定不存在与所述目标问题匹配的目标知识点的情况下,或者,在所述目标知识点未配置标准回复话术的情况下,向所述客户端发送所述目标回复。
  6. 根据权利要求5所述的方法,其中,所述根据所述目标问题查询知识库中所述目标主题下的各知识点之前,还包括:
    从历史客服对话中,确定属于所述目标主题的各问题文本;
    根据所述目标主题的各问题文本之间的语义相似性,进行问题合并,得到所述目标主题的各合并问题;
    根据所述目标主题的各合并问题,生成所述目标主题下对应的知识点;
    响应于配置操作,对所述目标主题下的知识点配置所述标准回复话术。
  7. 一种问答装置,包括:
    接收模块,用于接收客户端的目标问题;
    分类模块,用于根据所述目标问题的语义进行分类,得到所述目标问题所属的目标主题,以及所述目标问题属于所述目标主题的置信度;
    回复模块,用于采用所述目标主题对应的问答模型对所述目标问题进行回复,得到目标回复;
    处理模块,用于在所述置信度大于设定阈值的情况下,向所述客户端发送所述目标回复;
    所述处理模块,还用于在所述置信度小于或等于所述设定阈值的情况下,将所述目标回复作为回复建议发送至客服工作端。
  8. 根据权利要求7所述的问答装置,还包括:
    获取模块,用于从历史客服对话中,获取多个语料对;
    聚类模块,用于根据所述多个语料对的语义进行聚类,将所述多个语料对划分为至少两个主题类别;
    训练模块,用于采用各所述主题类别内包含的语料对,训练对应主题类别的问答模型。
  9. 根据权利要求8所述的问答装置,其中,每个所述语料对中包含问题文本和对应的回复文本;所述训练模块,用于:
    针对任意的一主题类别,将所述一主题类别中语料对的问题文本输入对应主题类别的问答模型,得到预测回复;
    根据所述预测回复与对应的回复文本之间的差异进行模型参数调整。
  10. 根据权利要求8所述的装置,其中,所述分类模块,用于:
    根据各主题类别中所含语料对的问题文本的向量编码,确定各主题类别的向量编码;
    对所述目标问题进行编码,得到所述目标问题的向量编码;
    根据所述目标问题的向量编码与各主题类别的向量编码之间的距离,从各主题类别中确定所述目标问题所属的目标主题;
    根据所述目标问题的向量编码与所述目标主题的向量编码之间的距离,确定所述目标问题属于所述目标主题的置信度。
  11. 根据权利要求7至10中任一项所述的装置,其中,所述处理模块,包括:
    查询单元,用于在所述置信度大于设定阈值的情况下,根据所述目标问题查询知识库中所述目标主题下的各知识点;
    发送单元,用于在确定不存在与所述目标问题匹配的目标知识点的情况下,或者,所述目标知识点未配置标准回复话术的情况下,向所述客户端发送所述目标回复。
  12. 根据权利要求11所述的装置,其中,所述处理模块,还包括:
    确定单元,用于从历史客服对话中,确定属于所述目标主题的各问题文本;
    合并单元,用于根据所述目标主题的各问题文本之间的语义相似性,进行问题合并,得到所述目标主题的各合并问题;
    生成单元,用于根据所述目标主题的各合并问题,生成所述目标主题下对应的知识点;
    配置单元,用于响应于配置操作,对所述目标主题下的知识点配置所述标准回复话术。
  13. 一种电子设备,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至6中任一项所述的方法。
  14. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1至6中任一项所述的方法。
  15. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现权利要求1至6中任一项所述的方法。
PCT/CN2022/131497 2022-02-07 2022-11-11 问答方法、装置、电子设备和计算机可读存储介质 WO2023147733A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210116820.1 2022-02-07
CN202210116820.1A CN114519093A (zh) 2022-02-07 2022-02-07 问答方法、装置、电子设备和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2023147733A1 true WO2023147733A1 (zh) 2023-08-10

Family

ID=81597236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/131497 WO2023147733A1 (zh) 2022-02-07 2022-11-11 问答方法、装置、电子设备和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN114519093A (zh)
WO (1) WO2023147733A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117725185A (zh) * 2024-02-06 2024-03-19 河北神玥软件科技股份有限公司 智能对话生成方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114519093A (zh) * 2022-02-07 2022-05-20 京东科技信息技术有限公司 问答方法、装置、电子设备和计算机可读存储介质
CN114996433A (zh) * 2022-08-08 2022-09-02 北京聆心智能科技有限公司 一种对话生成方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160217389A1 (en) * 2015-01-22 2016-07-28 International Business Machines Corporation Training machine learning models for open-domain question answering system
CN109033221A (zh) * 2018-06-29 2018-12-18 上海银赛计算机科技有限公司 答案生成方法、装置及服务器
CN112765306A (zh) * 2020-12-30 2021-05-07 金蝶软件(中国)有限公司 智能问答方法、装置、计算机设备和存储介质
CN114519093A (zh) * 2022-02-07 2022-05-20 京东科技信息技术有限公司 问答方法、装置、电子设备和计算机可读存储介质
CN114610854A (zh) * 2022-03-15 2022-06-10 深圳壹账通智能科技有限公司 智能问答方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160217389A1 (en) * 2015-01-22 2016-07-28 International Business Machines Corporation Training machine learning models for open-domain question answering system
CN109033221A (zh) * 2018-06-29 2018-12-18 上海银赛计算机科技有限公司 答案生成方法、装置及服务器
CN112765306A (zh) * 2020-12-30 2021-05-07 金蝶软件(中国)有限公司 智能问答方法、装置、计算机设备和存储介质
CN114519093A (zh) * 2022-02-07 2022-05-20 京东科技信息技术有限公司 问答方法、装置、电子设备和计算机可读存储介质
CN114610854A (zh) * 2022-03-15 2022-06-10 深圳壹账通智能科技有限公司 智能问答方法、装置、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117725185A (zh) * 2024-02-06 2024-03-19 河北神玥软件科技股份有限公司 智能对话生成方法及系统
CN117725185B (zh) * 2024-02-06 2024-05-07 河北神玥软件科技股份有限公司 智能对话生成方法及系统

Also Published As

Publication number Publication date
CN114519093A (zh) 2022-05-20

Similar Documents

Publication Publication Date Title
WO2023147733A1 (zh) 问答方法、装置、电子设备和计算机可读存储介质
CN110838288B (zh) 一种语音交互方法及其系统和对话设备
US11315560B2 (en) Method for conducting dialog between human and computer
CN108763510B (zh) 意图识别方法、装置、设备及存储介质
CN107329967B (zh) 基于深度学习的问答系统以及方法
CN111737987B (zh) 意图识别方法、装置、设备及存储介质
CN112214593A (zh) 问答处理方法、装置、电子设备及存储介质
US11636272B2 (en) Hybrid natural language understanding
WO2023108994A1 (zh) 一种语句生成方法及电子设备、存储介质
CN111062220B (zh) 一种基于记忆遗忘装置的端到端意图识别系统和方法
CN107526826A (zh) 语音搜索处理方法、装置及服务器
CN111182162A (zh) 基于人工智能的电话质检方法、装置、设备和存储介质
US20220208176A1 (en) Punctuation and capitalization of speech recognition transcripts
CN113051374A (zh) 一种文本匹配优化方法及装置
CN113590778A (zh) 智能客服意图理解方法、装置、设备及存储介质
CN113408287A (zh) 实体识别方法、装置、电子设备及存储介质
JP2018156418A (ja) 修正装置、修正方法および修正プログラム
CN116978367A (zh) 语音识别方法、装置、电子设备和存储介质
CN115858757A (zh) 客服邮件应答方法及其装置、设备、介质、产品
CN114118080B (zh) 一种从销售会话中自动识别客户意向的方法及系统
CN115270818A (zh) 一种意图识别方法及装置、存储介质、计算机设备
CN113515611B (zh) 一种任务型多意图对话的意图识别方法和识别系统
CN111046151A (zh) 一种消息处理方法及装置
WO2023144872A1 (ja) 文書分類装置、文書分類方法、および文書分類プログラム
CN113609275B (zh) 信息处理方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22924660

Country of ref document: EP

Kind code of ref document: A1