CN116681060A - Dialogue data processing method, man-machine interaction method, equipment and storage medium - Google Patents
Dialogue data processing method, man-machine interaction method, equipment and storage medium Download PDFInfo
- Publication number
- CN116681060A CN116681060A CN202310559957.9A CN202310559957A CN116681060A CN 116681060 A CN116681060 A CN 116681060A CN 202310559957 A CN202310559957 A CN 202310559957A CN 116681060 A CN116681060 A CN 116681060A
- Authority
- CN
- China
- Prior art keywords
- dialogue
- data
- dialogue data
- question
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 86
- 230000003993 interaction Effects 0.000 title claims abstract description 28
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000001514 detection method Methods 0.000 claims abstract description 116
- 238000012545 processing Methods 0.000 claims abstract description 39
- 238000012549 training Methods 0.000 claims description 105
- 230000002159 abnormal effect Effects 0.000 claims description 29
- 238000002372 labelling Methods 0.000 claims description 15
- 230000002596 correlated effect Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 11
- 230000004044 response Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 230000008451 emotion Effects 0.000 description 7
- 238000012423 maintenance Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000000875 corresponding effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 230000035935 pregnancy Effects 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000002996 emotional effect Effects 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000007477 logistic regression Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 206010000234 Abortion spontaneous Diseases 0.000 description 1
- 238000003646 Spearman's rank correlation coefficient Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 238000005352 clarification Methods 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 208000015994 miscarriage Diseases 0.000 description 1
- 230000032696 parturition Effects 0.000 description 1
- 208000000995 spontaneous abortion Diseases 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
- G06F40/35—Discourse or dialogue representation
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Probability & Statistics with Applications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
Abstract
本发明实施例提供一种对话数据处理方法、人机交互方法、设备和存储介质,该方法包括:处理设备获取包含至少一轮问答的待处理对话数据的统计特征,该统计特征与待处理对话数据的对话内容无关,进一步地,可以根据此统计特征确定待处理对话数据是否存在问答不匹配。上述方式中,由于待处理对话数据的统计特征是与对话内容无关并且还与待处理对话数据是否存在问答不匹配具有相关性的特征,因此,在不同场景下产生的、不同内容的对话数据都可以使用上述方法进行是否存在问答不匹配的检测,从而提高问答不匹配检测的泛化性。
An embodiment of the present invention provides a dialogue data processing method, a human-computer interaction method, a device, and a storage medium. The method includes: the processing device acquires statistical features of the dialogue data to be processed including at least one round of question and answer, and the statistical features are related to the dialogue data to be processed. The dialogue content of the data is irrelevant, and further, it can be determined whether there is a question-answer mismatch in the dialogue data to be processed according to this statistical feature. In the above method, since the statistical characteristics of the dialogue data to be processed are irrelevant to the content of the dialogue and are also correlated with whether there is a question-answer mismatch in the dialogue data to be processed, the dialogue data generated in different scenarios and with different contents are different. The above method can be used to detect whether there is a question-answer mismatch, thereby improving the generalization of question-answer mismatch detection.
Description
技术领域technical field
本发明涉及人工智能技术领域,尤其涉及一种对话数据处理方法、人机交互方法、设备和存储介质。The present invention relates to the technical field of artificial intelligence, in particular to a dialog data processing method, a human-computer interaction method, a device and a storage medium.
背景技术Background technique
利用人工智能技术已经能够实现人机对话,并且人机对话也已经可以应用于各个场景中。比如可以利用集成有对话系统的硬件交互设备与用户进行对话。其中,交互设备具体可以是服务机器人、智能音箱、移动终端设备等等。举例来说,当服务机器人具体是部署在商场、餐厅的引导机器人时,服务机器人可以通过和用户进行多轮对话来为用户进行引导。又比如还可以利用部署于云端的对话系统与用户进行对话,比如在线智能客服等等,用于满足用户对相关信息的查询需求。Using artificial intelligence technology has been able to achieve man-machine dialogue, and man-machine dialogue can also be applied to various scenarios. For example, a hardware interaction device integrated with a dialogue system may be used to conduct a dialogue with the user. Wherein, the interactive device may specifically be a service robot, a smart speaker, a mobile terminal device, and the like. For example, when the service robot is a guidance robot deployed in shopping malls and restaurants, the service robot can guide the user through multiple rounds of dialogue with the user. For another example, the dialogue system deployed in the cloud can also be used to communicate with users, such as online intelligent customer service, etc., to meet the user's query requirements for relevant information.
在不同场景中,人机对话的内容是十分丰富的。并且在任一场景中,人机对话过程中一种经常出现的情况是问答不匹配即答非所问,其会严重影响用户体验。因此,如何在不同场景下都能够准确检测出人机对话过程中出现的问答不匹配就成为一个亟待解决的问题。In different scenarios, the content of man-machine dialogue is very rich. And in any scenario, a common situation in the process of man-machine dialogue is that the question and answer do not match, that is, the answer is not what was asked, which will seriously affect the user experience. Therefore, how to accurately detect the question-answer mismatch in the process of man-machine dialogue in different scenarios has become an urgent problem to be solved.
发明内容Contents of the invention
有鉴于此,本发明实施例提供一种对话数据处理方法、人机交互方法、设备和存储介质,用以准确地检测出不同场景的对话数据中是否存在问答不匹配。In view of this, the embodiments of the present invention provide a dialogue data processing method, a human-computer interaction method, a device, and a storage medium, so as to accurately detect whether there is a question-answer mismatch in dialogue data in different scenarios.
第一方面,本发明实施例提供一种对话数据处理方法,包括:In a first aspect, an embodiment of the present invention provides a dialog data processing method, including:
获取包含至少一轮问答的待处理对话数据的统计特征,所述统计特征与所述待处理对话数据的对话内容无关;Obtaining statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features having nothing to do with the dialogue content of the dialogue data to be processed;
根据所述统计特征确定所述待处理对话数据是否存在问答不匹配。Determine whether there is a question-answer mismatch in the dialogue data to be processed according to the statistical features.
第二方面,本发明实施例提供一种人机交互方法,包括:In a second aspect, an embodiment of the present invention provides a human-computer interaction method, including:
显示提示消息,所述提示消息在异常对话数据的数量大于预设数量时生成,所述异常对话数据包括存在问答不匹配的对话数据,对话数据由用户和所述对话系统在人机对话过程中产生,对话数据是否存在问答不匹配由所述对话数据的统计特征确定得到;Displaying a prompt message, the prompt message is generated when the amount of abnormal dialogue data is greater than a preset number, the abnormal dialogue data includes dialogue data that does not match the question and answer, and the dialogue data is generated by the user and the dialogue system during the man-machine dialogue Generate, whether there is a question-answer mismatch in the dialogue data is determined by the statistical characteristics of the dialogue data;
响应对所述提示消息的处理操作。Respond to the processing operation on the prompt message.
第三方面,本发明实施例提供一种电子设备,包括处理器和存储器,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第一方面中的对话数据处理方法,或者上述第二方面中的人机交互方法。该电子设备还可以包括通信接口,用于与其他设备或通信系统通信。In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, the memory is used to store one or more computer instructions, wherein, when the one or more computer instructions are executed by the processor Realize the dialog data processing method in the first aspect above, or the human-computer interaction method in the second aspect above. The electronic device may also include a communication interface for communicating with other devices or communication systems.
第四方面,本发明实施例提供了一种非暂时性机器可读存储介质,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器至少可以实现如上述第一方面中的对话数据处理方法,或者上述第二方面中的人机交互方法。In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, where executable code is stored on the non-transitory machine-readable storage medium, and when the executable code is executed by a processor of an electronic device During execution, the processor can at least implement the dialog data processing method in the first aspect above, or the human-computer interaction method in the second aspect above.
本发明实施例提供的对话数据处理方法,处理设备获取包括至少一轮问答的待处理对话数据的统计特征,该统计特征与待处理对话数据的对话内容无关,进一步地,可以根据此统计特征确定待处理对话数据是否存在问答不匹配。上述方式中,由于待处理对话数据的统计特征是与对话内容无关,因此,在不同场景下产生的、不同内容的对话数据都可以使用上述方法进行是否存在问答不匹配的检测,从而提高问答不匹配检测的泛化性。In the dialogue data processing method provided by the embodiment of the present invention, the processing device obtains the statistical characteristics of the dialogue data to be processed including at least one round of question and answer, and the statistical characteristics have nothing to do with the dialogue content of the dialogue data to be processed. Further, it can be determined according to the statistical characteristics Whether there is a question-answer mismatch in the pending conversation data. In the above method, since the statistical characteristics of the dialogue data to be processed have nothing to do with the dialogue content, therefore, the dialogue data generated in different scenarios and with different contents can use the above method to detect whether there is a question-answer mismatch, thereby improving the question-answer gap. Generalization of match detection.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例提供的一种对话数据处理方法的流程图;FIG. 1 is a flowchart of a dialog data processing method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种操作界面的示意图;Fig. 2 is a schematic diagram of an operation interface provided by an embodiment of the present invention;
图3为本发明实施例提供的一种检测模型训练方法的流程图;FIG. 3 is a flow chart of a detection model training method provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种对话数据处理方法的流程图;FIG. 4 is a flow chart of another dialogue data processing method provided by an embodiment of the present invention;
图5为本发明实施例提供的另一种检测模型训练方法的流程图;FIG. 5 is a flowchart of another detection model training method provided by an embodiment of the present invention;
图6为本发明实施例提供的又一种检测模型训练方法的流程图;FIG. 6 is a flowchart of another detection model training method provided by an embodiment of the present invention;
图7为本发明实施例提供的对话数据处理方法的应用示意图;FIG. 7 is a schematic diagram of the application of the dialog data processing method provided by the embodiment of the present invention;
图8为本发明实施例提供的一种人机交互方法的流程图;FIG. 8 is a flowchart of a human-computer interaction method provided by an embodiment of the present invention;
图9为本发明实施例提供的另一种人机交互方法的流程图;FIG. 9 is a flowchart of another human-computer interaction method provided by an embodiment of the present invention;
图10为本发明实施例提供的一种对话数据处理装置的结构示意图;FIG. 10 is a schematic structural diagram of a dialogue data processing device provided by an embodiment of the present invention;
图11为本发明实施例提供的一种人机交互装置的结构示意图;FIG. 11 is a schematic structural diagram of a human-computer interaction device provided by an embodiment of the present invention;
图12为本发明实施例提供的一种电子设备的结构示意图;FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention;
图13为本发明实施例提供的另一种电子设备的结构示意图;FIG. 13 is a schematic structural diagram of another electronic device provided by an embodiment of the present invention;
图14为本发明实施例提供的另一种人机交互装置的结构示意图;Fig. 14 is a schematic structural diagram of another human-computer interaction device provided by an embodiment of the present invention;
图15为本发明实施例提供的又一种电子设备的结构示意图。FIG. 15 is a schematic structural diagram of another electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。Terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise, "multiple" Generally, at least two kinds are included, but the case of including at least one kind is not excluded.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used herein is only an association relationship describing associated objects, which means that there may be three relationships, for example, A and/or B, which may mean that A exists alone, and A and B exist simultaneously. B, there are three situations of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于识别”。类似地,取决于语境,短语“如果确定”或“如果识别(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当识别(陈述的条件或事件)时”或“响应于识别(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to identifying". Similarly, depending on the context, the phrases "if determined" or "if identified (the stated condition or event)" could be interpreted as "when determined" or "in response to the determined" or "when identified (the stated condition or event) )” or “in response to recognition of (a stated condition or event)”.
需要说明的有,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a good or system comprising a set of elements includes not only those elements but also items not expressly listed other elements, or also include elements inherent in the commodity or system. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the article or system comprising said element.
需要说明的有,本发明所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all It is information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose authorization or reject.
需要说明的还有,与背景技术中的描述类似的,诸如服务机器人、迎宾机器人、自移动售货机器人等智能机器人可以集成有对话系统。除此之外,诸如移动终端、智能家电、智能穿戴设备等智能终端也可以集成有对话系统。上述各硬件设备都可以认为是交互设备。另外,对话系统还可以部署在云端以为用户提供在线购物、在线咨询等服务。泛泛而言,任何支持以语音方式或文字方式与用户进行人机对话的、部署在硬件设备或者云端的对话系统都可以与用户产生对话数据。并且本发明下述各实施例可以将用户和对话系统在人机对话过程中产生的任务型对话确定为待处理对话数据。It should be noted that, similar to the description in the background art, intelligent robots such as service robots, welcome robots, and self-moving vending robots can be integrated with a dialogue system. In addition, smart terminals such as mobile terminals, smart home appliances, and smart wearable devices can also be integrated with dialogue systems. Each of the above hardware devices can be considered as an interactive device. In addition, the dialogue system can also be deployed in the cloud to provide users with online shopping, online consultation and other services. Generally speaking, any dialogue system that supports man-machine dialogue with users in voice or text and is deployed on hardware devices or in the cloud can generate dialogue data with users. In addition, the following embodiments of the present invention can determine the task-type dialogue generated by the user and the dialogue system during the man-machine dialogue process as dialogue data to be processed.
在对本发明下述各实施例提供的对话数据处理方法和人机交互方法进行详细描述之前,还可以先对下述各实施例中涉及到的相关概念进行解释:Before describing in detail the dialog data processing method and the human-computer interaction method provided by the following embodiments of the present invention, the related concepts involved in the following embodiments can also be explained first:
任务型对话:对话系统针对用户的某一需求而产生的至少一轮对话即至少一轮问答。对话系统可以通过理解、澄清等方式确定用户意图,继而通过答复的方式完成用户的该需求。Task-based dialogue: At least one round of dialogue, that is, at least one round of question and answer, generated by the dialogue system for a certain demand of the user. The dialogue system can determine the user's intention through understanding, clarification, etc., and then complete the user's demand by replying.
问答不匹配:对话系统在回答用户给出的问题时没有直接给出答案,或没有回答问题的实际意思,问答不匹配实际上即为答非所问。Question and answer mismatch: When the dialogue system answers the question given by the user, it does not directly give an answer, or does not have the actual meaning of answering the question. The question and answer mismatch actually means that the answer is not what was asked.
举例来说,在线下服务场景比如下线银行咨询场景中,用户和银行大厅内设置的服务机器人之间可以产生以下对话数据:For example, in an offline service scenario such as an offline bank consultation scenario, the following dialogue data can be generated between the user and the service robot set up in the bank lobby:
服务机器人:您好,请问您需要办理什么?Service robot: Hello, what do you need to do?
用户:我要换一些美元。User: I want to change some dollars.
服务机器人:请问您是否携带了身份证及银行卡?Service Robot: Do you have your ID card and bank card with you?
用户:身份证和银行卡都带了。User: Bring your ID card and bank card.
服务机器人:请将身份证放在感应区,选择外汇兑换并取号。Service robot: Please put your ID card in the induction area, select foreign exchange exchange and get the number.
上述对话中,服务机器人最终成功引导用户完成外汇对话的取号,所以上述对话数据不存在问答不匹配。In the above dialogue, the service robot finally successfully guides the user to complete the number taking of the foreign exchange dialogue, so there is no question-answer mismatch in the above dialogue data.
举例来说,在线上服务场景比如线上的政务信息咨询场景中,用户和在线智能客服之间可以产生以下对话数据:For example, in an online service scenario such as an online government information consultation scenario, the following dialogue data can be generated between a user and an online intelligent customer service:
在线智能客服:您好,能为您提供人力社保方面的信息咨询,您可以说养老金调整、工资申报、医疗保险、生育津贴、失业保险等等。Online intelligent customer service: Hello, I can provide you with information consultation on human resources and social security. You can talk about pension adjustment, salary declaration, medical insurance, maternity allowance, unemployment insurance and so on.
用户:人工服务。User: human service.
在线智能客服:您可以说一下您要咨询的问题,若无法解答将为您转接人工客服。Online intelligent customer service: You can talk about the questions you want to consult, if you cannot answer, you will be transferred to manual customer service.
用户:前几天有打电话来说生育津贴的问题。User: I called a few days ago about maternity allowance.
在线智能客服:请问您是生育还是流产。Online intelligent customer service: May I ask whether you are giving birth or having a miscarriage.
用户:上次申请生育津贴时没有写支行名称。User: I did not write the name of the branch when I applied for maternity allowance last time.
在线智能客服:不好意思,我没有听清楚,您请说。Online intelligent customer service: Sorry, I didn't hear clearly, please tell me.
用户:人工服务。User: human service.
上述对话中,在线智能客服最终没有理解用户意图,所以上述对话数据存在问答不匹配。In the above conversation, the online intelligent customer service did not understand the user's intention in the end, so there is a question-answer mismatch in the above conversation data.
在实际中,问答不匹配会严重影响用户体验,此时便可以使用本发明下述各实施例中提及的方法检测对话数据中是否存在问答不匹配。In practice, the mismatch of questions and answers will seriously affect the user experience. At this time, the methods mentioned in the following embodiments of the present invention can be used to detect whether there is a mismatch of questions and answers in the dialogue data.
则基于上述描述,下面可以结合附图对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。Based on the above description, some embodiments of the present invention may be described in detail below in conjunction with the accompanying drawings. Under the condition that there is no conflict between the various embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the sequence of steps in the following method embodiments is only an example, rather than a strict limitation.
图1为本发明实施例提供的一种对话数据处理方法的流程图。本发明实施例提供的该对话数据处理方法可以由处理设备执行。处理设备即可以是物理设备也可以是虚拟设备。如图1所示,该方法可以包括如下步骤:FIG. 1 is a flow chart of a dialog data processing method provided by an embodiment of the present invention. The dialog data processing method provided by the embodiment of the present invention may be executed by a processing device. Processing devices can be either physical or virtual. As shown in Figure 1, the method may include the following steps:
S101,获取包含至少一轮问答的待处理对话数据的统计特征,统计特征与待处理对话数据的对话内容无关。S101. Obtain statistical features of the dialogue data to be processed including at least one round of question and answer, where the statistical features are not related to the dialogue content of the dialogue data to be processed.
在用户和对话系统的人机对话过程中,二者共同产生的对话数据即为待处理对话数据。并且响应于人机对话的开启,对话系统可以记录自身与用户产生的待处理对话数据。其中,一段待处理对话数据可以包括用户与对话系统在一次对话过程中产生的至少一轮问答。比如上述在线下服银行咨询场景或者在线上政务信息咨询场景中产生的对话数据。During the man-machine dialogue process between the user and the dialogue system, the dialogue data jointly generated by the two is the dialogue data to be processed. And in response to the opening of the man-machine dialogue, the dialogue system can record the pending dialogue data generated between itself and the user. Wherein, a piece of dialogue data to be processed may include at least one round of questions and answers generated during a dialogue between the user and the dialogue system. For example, the above-mentioned dialogue data generated in the offline service bank consultation scenario or the online government information consultation scenario.
可选地,用户和对话系统均可以主动开启人机对话。对于用户主动触发对话开启操作的情况,承接上述的线下银行咨询场景,可选地,用户可以主动对服务机器人提供的操作界面上触发对话开启操作,以主动开启人机对话。此时产生的待处理对话数据通常可以表现为语音形式或者文本形式。承接上述的线上政务信息咨询场景,用户可以主动拨打政务信息咨询电话以主动开启人机对话。此时,产生的待处理对话数据通常可以表现为语音形式。用户也可以主动对政务网站提供的操作界面上触发对话开启操作,以主动开启人机对话。此时,待处理对话数据通常可以表现为文本数据形式。Optionally, both the user and the dialog system can actively start the man-machine dialog. For the case where the user actively triggers the dialogue opening operation, following the above-mentioned offline banking consultation scenario, optionally, the user can actively trigger the dialogue opening operation on the operation interface provided by the service robot to actively open the man-machine dialogue. The dialogue data to be processed generated at this time can usually be in the form of speech or text. To undertake the above-mentioned online government information consultation scenario, users can actively dial the government information consultation phone to initiate a man-machine dialogue. At this point, the generated dialogue data to be processed can usually be in the form of speech. The user can also actively trigger the dialogue opening operation on the operation interface provided by the government website to actively open the man-machine dialogue. At this point, the dialog data to be processed can generally be represented as text data.
对于对话系统主动触发对话开启操作的情况,在线上客服回访场景中,可选地,可以由对话系统主动向用户拨打回访电话以开启人机对话,此种场景下产生的待处理对话数据可以表现为语音形式。For the case where the dialogue system actively triggers the dialogue opening operation, in the online customer service return visit scenario, optionally, the dialogue system can actively call the user to start the man-machine dialogue. The dialogue data to be processed in this scenario can be expressed in phonetic form.
可选地,对于统计特征的获取,对话系统在记录待处理对话数据中的每个语句的同时还可以记录该语句的生成时间。基于此,可以由对话系统或者其他设备或系统根据此生成时间对待处理对话数据进行统计,以得到待处理对话数据的统计特征。处理设备可以从对话系统处获取此统计特征。Optionally, for the acquisition of statistical features, the dialogue system may also record the generation time of each statement in the dialogue data to be processed while recording the statement. Based on this, the dialogue system or other devices or systems can make statistics on the dialogue data to be processed according to the generation time, so as to obtain the statistical characteristics of the dialogue data to be processed. The processing device can obtain this statistical feature from the dialogue system.
可选地,待处理对话数据的统计特征可以包括对话数据中与对话内容无关的特征。可选地,具体可以包括以下至少一项:对话轮数、对话系统没有给出答案的次数、用户产生的对话是否过长、用户在预设时长内没有产生对话的次数、转人工对话的次数、用户产生的对话中是否包含负面情绪、对话中的指代次数、最后一轮对话中是否出现对话系统没有给出答案并且用户挂断的情况以及最后一轮对话时用户是否在预设时长内没有产生对话等等。根据上述给出的统计特征可知,统计特征实际上是数值类型的特征。Optionally, the statistical features of the dialog data to be processed may include features in the dialog data that are not related to the dialog content. Optionally, it may specifically include at least one of the following: the number of dialogue rounds, the number of times the dialogue system did not give an answer, whether the dialogue generated by the user is too long, the number of times the user did not produce a dialogue within the preset duration, and the number of times the dialogue was switched to a manual , Whether the dialogue generated by the user contains negative emotions, the number of references in the dialogue, whether the dialogue system does not give an answer and the user hangs up in the last round of dialogue, and whether the user is within the preset duration of the last round of dialogue No dialogue etc. was produced. According to the statistical characteristics given above, it can be seen that the statistical characteristics are actually numerical characteristics.
下面还可以对上述各项统计特征进行解释:The above statistical characteristics can also be explained as follows:
对话系统没有给出答案可以表现为对话系统给出“不好意思,我没有听清,您请说”或者“不好意思,请您再说一遍”等表明没有理解用户意图的应答。The failure of the dialogue system to give an answer can be manifested as the dialogue system giving a response indicating that it does not understand the user's intention, such as "Sorry, I didn't hear you clearly, please say" or "Sorry, please say it again".
用户产生的对话中包含负面情绪可以表现为用户产生的对话中包含预设的情感词语,并且该情感词语表示的是负面情绪。Containing negative emotions in the dialog generated by the user may be represented by including preset emotional words in the dialog generated by the user, and the emotional words represent negative emotions.
用户在预设时长内没有产生对话也即为用户产生对话超时,则用户在预设时长内没有产生对话的次数即为用户产生对话超时的次数。类似的,最后一轮对话时用户是否在预设时长内没有产生对话即为用户最后一轮对话超时。If the user does not generate a dialog within the preset time period, the user generates a dialog timeout, and the number of times the user does not generate a dialog within the preset time period is the number of times the user generates a dialog timeout. Similarly, whether the user does not generate a dialogue within the preset time period in the last round of dialogue is the timeout of the user's last round of dialogue.
其中,“用户产生的对话是否过长”、“用户产生的对话中是否包含负面情绪”以及“最后一轮对话时用户是否在预设时长内没有产生对话”这几项统计特征还可以用不同标识表示是否出现上述情况,比如可以用“1”表示出现上述情况,用“0”表示没有出现上述情况。Among them, the statistical features of "whether the conversation generated by the user is too long", "whether the conversation generated by the user contains negative emotions" and "whether the user did not generate a conversation within the preset time period in the last round of dialogue" can also be used in different ways. The mark indicates whether the above-mentioned situation occurs, for example, "1" can be used to indicate that the above-mentioned situation occurs, and "0" can be used to indicate that the above-mentioned situation does not occur.
则任一待处理对话数据的统计特征可以示意性地如下表所示:Then the statistical characteristics of any dialogue data to be processed can be schematically shown in the following table:
上表中的内容表示:该待处理对话数据的对话轮次为3次,出现1次转人工对话,对话中出现1次指代。The content in the above table indicates that the dialog data to be processed has 3 dialog turns, 1 transfer to manual dialog, and 1 reference in the dialog.
并且需要说明的是,统计特征中各项特征均与对话数据是否存在问答不匹配是具体相关性的。可选地,相关性的高低具体使用皮尔森相关系数、Spearman(Spearman RankCorrelation Coefficient,简称Src)秩相关系数、肯德尔(Kendall)相关系数等任一种进行度量。And it should be noted that each feature in the statistical features is specifically related to whether there is a question-answer mismatch in the dialogue data. Optionally, the level of correlation is specifically measured by any one of Pearson correlation coefficient, Spearman (Spearman Rank Correlation Coefficient, Src for short) rank correlation coefficient, Kendall (Kendall) correlation coefficient and the like.
具体地,“对话轮数”、“对话系统没有给出答案的次数”、“用户产生的对话是否过长”以及“用户在预设时长内没有产生对话的次数”这几项统计特征与对话数据存在问答不匹配是高度正相关。即对话轮数越多、用户产生的对话越长、用户在预设时长内没有产生对话的次数越多,表明对话数据存在问答不匹配的可能性越高。Specifically, the statistical features of "number of dialogue rounds", "number of times the dialogue system did not give an answer", "whether the dialogue generated by the user is too long", and "the number of times the user did not produce a dialogue within the preset duration" are related to the dialogue Data with a question-answer mismatch is highly positively correlated. That is, the more dialogue rounds, the longer the dialogue generated by the user, and the more times the user did not produce a dialogue within the preset time period, the higher the possibility of a question-answer mismatch in the dialogue data.
“最后一轮对话中是否出现对话系统没有给出答案并且用户挂断的情况”、“最后一轮对话时用户是否在预设时长内没有产生对话”、“用户产生的对话中是否包含负面情绪”以及“对话中的指代次数”这几项统计特征与对话数据存在问答不匹配是正相关。"Whether the dialogue system did not give an answer and the user hung up in the last round of dialogue", "Whether the user did not generate a dialogue within the preset time period during the last round of dialogue", "Whether the dialogue generated by the user contains negative emotions " and "Number of Referrals in Dialogues" are positively correlated with question-answer mismatches in dialogue data.
“转人工对话的次数”这项统计特征与对话数据存在问答不匹配是负相关,即转人工对话的次数越少,对话数据存在问答不匹配的可能性越低。The statistical feature "Number of conversations transferred to a human" is negatively correlated with the question-answer mismatch in the conversation data, that is, the fewer the number of conversations transferred to a human, the lower the possibility of a question-answer mismatch in the conversation data.
S102,根据统计特征确定待处理对话数据是否存在问答不匹配。S102. Determine whether there is a question-answer mismatch in the dialogue data to be processed according to statistical features.
接着,处理设备可以直接根据待处理对话数据的统计特征,确定该待处理对话是否存在问答不匹配。Next, the processing device may directly determine whether there is a question-answer mismatch in the pending dialog according to the statistical characteristics of the pending dialog data.
可选地,对于数值类型的统计特征,还可以根据不同统计特征与对话数据是否存在问答不匹配具有的相关性高低,可以为每一项统计特征设置权重系数,并对统计特征及其对应的权重系统进行加权求和,求和结果可以通过与预设数值进行比较以确定待处理对话数据是否存在问答不匹配。Optionally, for numerical statistical features, according to the degree of correlation between different statistical features and whether there is a question-answer mismatch in the dialogue data, a weight coefficient can be set for each statistical feature, and the statistical feature and its corresponding The weighting system performs weighted summation, and the summation result can be compared with a preset value to determine whether there is a question-answer mismatch in the dialogue data to be processed.
本实施例中,处理设备获取包含至少一轮问答的待处理对话数据的统计特征,该统计特征与待处理对话数据的对话内容无关,进一步地,可以根据此统计特征确定待处理对话数据是否存在问答不匹配。上述方式中,由于待处理对话数据的统计特征是与对话内容无关的特征,因此,在不同场景下产生的、不同内容的对话数据都可以使用上述方法进行是否存在问答不匹配的检测,从而提高问答不匹配检测的泛化性。另外,相比于特征向量类型的特征,数值类型的统计特征包含的数据量更小,因此,使用上述方法还能够降低检测是否存在问答不匹配过程中的计算量。In this embodiment, the processing device obtains the statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features have nothing to do with the dialogue content of the dialogue data to be processed, and further, can determine whether the dialogue data to be processed exists according to the statistical features Question and answer do not match. In the above method, since the statistical characteristics of the dialogue data to be processed are features that have nothing to do with the content of the dialogue, therefore, dialogue data with different contents generated in different scenarios can be detected whether there is a question-answer mismatch using the above method, thereby improving Generalizability for question-answer mismatch detection. In addition, compared with the features of the feature vector type, the statistical features of the numerical type contain a smaller amount of data. Therefore, using the above method can also reduce the amount of calculation in the process of detecting whether there is a question-answer mismatch.
容易理解的,存在问答不匹配的对话数据的数量越多表明对话系统的性能越差,因此,处理设备可以将历史时间段内产生的对话数据都作为待处理对话数据并按照图1所示实施例的方式对其进行检测,根据检测结果即可知晓历史时间段内存在问答不匹配的异常对话数据的数量。可选地,该数量还可以显示在处理设备提供的统计界面上。若异常对话数据的数量大于预设数量,则统计界面上还可以显示提示消息。此时,对话系统的运维人员可以根据统计界面上显示的提示消息选择是否对对话系统进行优化。It is easy to understand that the greater the amount of dialogue data that does not match the question and answer, the worse the performance of the dialogue system. Therefore, the processing device can use all dialogue data generated in the historical time period as dialogue data to be processed and implement it as shown in Figure 1. According to the detection results, we can know the number of abnormal dialogue data with mismatched questions and answers in the historical time period. Optionally, the quantity can also be displayed on a statistical interface provided by the processing device. If the amount of abnormal dialogue data is greater than the preset amount, a prompt message may also be displayed on the statistics interface. At this time, the operation and maintenance personnel of the dialogue system can choose whether to optimize the dialogue system according to the prompt message displayed on the statistics interface.
可选地,统计界面上还可以显示有历史时间段内对话数据的数量变化曲线、统计界面上还可以显示有与异常对话数据相关的其他信息,比如当前历史时间段内对话数据的总数、当前历史时间段内异常对话数据的占比、与上一历史时间段内异常对话数据的数量相比,当前历史时间段内异常对话数据数量的变化率等等。可选地,历史时间端可以是一周、一个月或几个月等。Optionally, the statistical interface can also display the quantity change curve of the dialogue data in the historical time period, and other information related to the abnormal dialogue data can also be displayed on the statistical interface, such as the total number of dialogue data in the current historical time period, the current The proportion of abnormal dialogue data in the historical time period, compared with the number of abnormal dialogue data in the previous historical period, the change rate of the abnormal dialogue data in the current historical period, etc. Optionally, the historical time end may be one week, one month, or several months.
处理设备提供的统计界面可以如图2所示。The statistical interface provided by the processing device may be as shown in FIG. 2 .
对于根据统计特征确定待处理对话数据中是否存在问答不匹配的过程,除了图1所示实施例中的加权求和方式,另一种可选地方式,还可以借助检测模型来实现。具体的,可以将待处理对话数据的统计特征输入检测模型,以由检测模型直接输出该待处理对话数据是否存在问答不匹配。其中,检测模型本质上是一个分类模型,则可选地,检测模型具体可以是任一种可以实现分类功能的模型,比如各种神经网络(Neural Networks,简称NN)、逻辑回归(Logistic regression)模型、支持向量机(Support Vector Machine,SVM)等等。For the process of determining whether there is a question-answer mismatch in the dialogue data to be processed according to statistical features, in addition to the weighted summation method in the embodiment shown in FIG. 1 , another optional method can also be implemented by means of a detection model. Specifically, the statistical features of the dialogue data to be processed can be input into the detection model, so that the detection model can directly output whether there is a question-answer mismatch in the dialogue data to be processed. Wherein, the detection model is essentially a classification model, then optionally, the detection model can be any model that can realize the classification function, such as various neural networks (Neural Networks, NN for short), logistic regression (Logistic regression) Model, Support Vector Machine (Support Vector Machine, SVM) and so on.
一种可选地方式,可以利用有监督训练的方式对一个初始模型进行训练,以训练得到上述各实施例中使用的检测模型。另一种可选地方式,还可以对多个初始模型进行训练,以得到上述检测模型。则图3为本发明实施例提供的一种检测模型训练方法的流程图。本发明实施例提供的该对话数据处理方法可以由训练设备执行。可选地,训练设备可以是上述实施例中提及的处理设备,也可以是处理设备之外的其他设备。如图3所示,可以包括以下步骤:In an optional manner, an initial model may be trained in a supervised training manner, so as to obtain the detection model used in the foregoing embodiments. In another optional manner, multiple initial models may also be trained to obtain the above-mentioned detection model. Fig. 3 is a flow chart of a detection model training method provided by an embodiment of the present invention. The dialog data processing method provided by the embodiment of the present invention may be executed by a training device. Optionally, the training device may be the processing device mentioned in the foregoing embodiments, or other devices other than the processing device. As shown in Figure 3, the following steps may be included:
S201,获取包含至少一轮问答的训练对话数据的统计特征以及反映训练对话数据是否存在问答不匹配的标注结果。S201. Obtain statistical features of training dialogue data including at least one round of question-and-answer and labeling results reflecting whether there is a question-answer mismatch in the training dialogue data.
训练设备可以先获取包含至少一轮问答的训练对话数据。可选地,训练对话数据可以通过网络收集到,也可以是用户在历史时间段内产生的对话数据。同时,训练设备还可以获取训练对话数据的标注结果,该标注结果用于反映训练对话数据是否存在问答不匹配,可选地,该标注结果可以由人工标注。The training device may first obtain training dialogue data including at least one round of question and answer. Optionally, the training dialogue data may be collected through the network, or may be dialogue data generated by users within a historical time period. At the same time, the training device can also obtain an annotation result of the training dialogue data, which is used to reflect whether there is a question-answer mismatch in the training dialogue data. Optionally, the annotation result can be manually annotated.
S202,将训练对话数据的统计特征作为训练数据,将标注结果作为监督信息分别对预设数量的初始模型进行训练,以得到不同模型参数的备选模型。S202. Using the statistical features of the training dialogue data as training data, and using the labeling results as supervision information, respectively train a preset number of initial models to obtain candidate models with different model parameters.
接着,训练设备还可以获取预设数量的初始模型。之后,一种可选地方式,预设数量的初始模型可以具有相同的模型结构以及不同的初始模型参数,则可以将步骤S201中的训练对话数据的统计特征作为训练数据,将训练对话数据的标注结果作为监督信息分别训练预设数量的初始模型。由于初始模型的初始模型参数不同,因此,即使使用相同的训练数据也可以得到模型参数不同的备选模型。Then, the training device can also acquire a preset number of initial models. Afterwards, in an optional manner, the preset number of initial models may have the same model structure and different initial model parameters, then the statistical features of the training dialogue data in step S201 may be used as training data, and the training dialogue data's The annotation results are used as supervisory information to train a preset number of initial models respectively. Since the initial model parameters of the initial model are different, alternative models with different model parameters can be obtained even with the same training data.
另一种可选地方式,可以按照预设数量对步骤S201中的训练对话数据进行划分。然后,将多份训练对话数据各自的统计特征分别作为预设数量的初始模型的训练数据,将训练对话数据的标注结果作为监督信息分别训练预设数量的初始模型。此种方式中,预设数量的初始模型可以具有相同的模型结构以及相同的初始模型参数。由于训练初始模型使用的训练对话数据不同,因此,得到的备选模型的模型参数不同。In another optional manner, the training dialog data in step S201 may be divided according to a preset number. Then, the respective statistical features of the plurality of training dialogue data are used as training data of a preset number of initial models, and the labeling results of the training dialogue data are used as supervision information to train a preset number of initial models respectively. In this manner, the preset number of initial models may have the same model structure and the same initial model parameters. Since the training dialogue data used to train the initial model is different, the model parameters of the obtained candidate models are different.
可选地,可以按照以下公式进行损失计算,并采用梯度下降的方式实现初始模型的训练:Optionally, the loss calculation can be performed according to the following formula, and the initial model training can be realized by gradient descent:
其中,p为检测模型输出的表明训练对话样本存在问答不匹配的检测结果的置信度,σ是用于计算检测结果和标准结果之间损失值的损失函数,x=W1X1+W2X2+...+WkXk+b,X1、X2...Xk是训练对话数据的统计特征,W1、W2...Wk是检测模型的权重值,b是检测模型的偏置值,权重值和偏置值共同构成检测模型的模型参数。Among them, p is the confidence degree of the detection result output by the detection model indicating that there is a question-answer mismatch in the training dialogue sample, σ is the loss function used to calculate the loss value between the detection result and the standard result, x=W1X1+W2X2+...+ WkXk+b, X1, X2...Xk are the statistical features of the training dialogue data, W1, W2...Wk are the weight values of the detection model, b is the bias value of the detection model, and the weight value and the bias value together constitute Model parameters for detection models.
S203,根据备选模型的模型参数确定检测模型的模型参数,以得到检测模型。S203. Determine the model parameters of the detection model according to the model parameters of the candidate model to obtain a detection model.
最后,训练设备可以对预设数量的备选模型各自的模型参数进行集成,以确定检测模型的模型参数。可选地,可以将预设数量的备选模型各自的模型参数取均值或者加权求和,计算结果可以作为检测模型的模型参数,从而得到检测模型。其中,检测模型与初始模型、备选模型具有相同的模型结构。Finally, the training device can integrate the respective model parameters of the preset number of candidate models to determine the model parameters of the detection model. Optionally, the model parameters of the preset number of candidate models can be averaged or weighted and summed, and the calculation results can be used as the model parameters of the detection model, thereby obtaining the detection model. Among them, the detection model has the same model structure as the initial model and the candidate model.
本实施例中,通过综合考虑多个备选模型的模型参数即参数集成的方式提高检测模型的检测准确性。具体地,训练设备先训练出多个备选模型,然后通过综合考虑备选模型各自的模型参数的方式得到检测模型的模型参数,从而提高检测模型的模型参数的准确性,也即是提高检测模型的检测准确性。In this embodiment, the detection accuracy of the detection model is improved by comprehensively considering model parameters of multiple candidate models, that is, parameter integration. Specifically, the training device first trains a plurality of candidate models, and then obtains the model parameters of the detection model by comprehensively considering the model parameters of the candidate models, thereby improving the accuracy of the model parameters of the detection model, that is, improving the accuracy of the detection model. The detection accuracy of the model.
为了提高问答不匹配的检测准确性,另一种可选地方式,在按照图3所示实施例的方式得到预设数量的备选模型后,还可以结合集成学习(Ensemble Learning)机制,即可以综合考虑多个检测结果以得到更准地检测结果。In order to improve the detection accuracy of the question-answer mismatch, another optional way, after obtaining a preset number of candidate models according to the embodiment shown in Figure 3, can also be combined with an ensemble learning (Ensemble Learning) mechanism, that is Multiple detection results can be considered comprehensively to obtain more accurate detection results.
具体地,可以由预设数量的备选模型各自输出待处理对话数据的检测结果以及该检测结果的置信度,然后综合多个检测结果比如对置信度取平均值或者对置信度进行加权求和,以最终得到待处理对话数据的检测结果。Specifically, each of the preset number of candidate models can output the detection result of the dialogue data to be processed and the confidence of the detection result, and then integrate multiple detection results such as averaging the confidence or performing a weighted summation of the confidence , to finally obtain the detection result of the dialogue data to be processed.
在图1所示实施例的基础上,为了进一步提高问答不匹配检测的准确性,图4为本发明实施例提供的另一种对话数据的处理方法的流程图。如图4所示,可以包括以下步骤:On the basis of the embodiment shown in FIG. 1 , in order to further improve the accuracy of question-answer mismatch detection, FIG. 4 is a flowchart of another dialogue data processing method provided by an embodiment of the present invention. As shown in Figure 4, the following steps may be included:
S301,获取包含至少一轮对话的待处理对话数据的统计特征,统计特征与待处理对话数据的对话内容无关。S301. Obtain statistical features of the dialogue data to be processed including at least one round of dialogue, where the statistical features are not related to the dialogue content of the dialogue data to be processed.
步骤S301的具体实现过程可以参见图1所示实施例中相关步骤的具体描述,在此不再赘述。For the specific implementation process of step S301, reference may be made to the specific description of relevant steps in the embodiment shown in FIG. 1 , which will not be repeated here.
S302,对统计特征进行特征组合,以得到待处理对话数据的组合特征。S302. Perform feature combination on statistical features to obtain combined features of the dialogue data to be processed.
S303,根据待处理对话数据的组合特征确定待处理对话数据是否存在问答不匹配。S303. Determine whether there is a question-answer mismatch in the dialogue data to be processed according to the combination feature of the dialogue data to be processed.
处理设备可以对待处理对话数据的统计特征进行特征组合也即是特征交叉,以得到待处理对话数据的组合特征。其中,对于特征的组合还可以进行以下理解:正如上表中给出的多种统计特征,可以将其中任意至少两个的特征进行组合。其中需要说明的有,组合的两个特征可以是相同或者不同的两个特征。并且与统计特征相同的,组合特征也与待处理对话数据的对话内容无关。The processing device may perform feature combination, that is, feature intersection, on the statistical features of the dialogue data to be processed, so as to obtain combined features of the dialogue data to be processed. Among them, the combination of features can also be understood as follows: just like the various statistical features given in the above table, any at least two of the features can be combined. It should be noted that the two features to be combined may be the same or different two features. And the same as the statistical feature, the combined feature has nothing to do with the dialogue content of the dialogue data to be processed.
可选地,可以采用二项式或更高阶多项式的方式进行特征组合。举例来说,对于统计特征[a,b,c],对其进行二项式特征交叉后得到的组合特征可以包括[a,b,c,ab,bc,ac,a2,b2,c2];对其进行三项式特征交叉后的组合特征可以包括[a,b,c,ab,bc,ac,a3,b3,c3,a2b,ab2,a2c,ac2,b2c,bc2,abc]。Optionally, binomial or higher order polynomials can be used for feature combination. For example, for statistical features [a,b,c], the combined features obtained after binomial feature crossover can include [a,b,c,ab,bc,ac,a 2 ,b 2 ,c 2 ]; the combined features after trinomial feature crossover can include [a, b, c, ab, bc, ac, a 3 , b 3 , c 3 , a 2 b, ab 2 , a 2 c, ac 2 ,b 2 c,bc 2 ,abc].
其中,a,b,c可以代表图1所示实施例中提及的多项统计特征中的任意三项。在数字意义上,a,b,c具体表现为数值,则ab,bc,a2,c2等即为数值的乘积。在物理意义上,比如a代表用户产生的对话是否过长,b代表用户产生的对话中是否包含负面情绪,c代表转人工对话的次数,ab代表用户产生的对话是否过长,同时用户产生的对话中是否包含负面情绪,ac代表用户产生的对话是否过长,同时是否产生转人工对话以及转人工对话的次数。Wherein, a, b, and c may represent any three of the multiple statistical features mentioned in the embodiment shown in FIG. 1 . In the digital sense, a, b, c are expressed as numerical values, and then ab, bc, a 2 , c 2 , etc. are the products of numerical values. In the physical sense, for example, a represents whether the conversation generated by the user is too long, b represents whether the conversation generated by the user contains negative emotions, c represents the number of times the conversation is transferred to a manual conversation, ab represents whether the conversation generated by the user is too long, and the conversation generated by the user Whether the dialogue contains negative emotions, ac represents whether the dialogue generated by the user is too long, and whether there are manual dialogues and the number of manual dialogues.
可见,相比于原始的统计特征,通过特征组合能够扩充统计特征的数量,并且扩充得到的组合特征也能够更全面地描述待处理对话数据的特征,因此也就能够更准确地确定出待处理对话数据中是否存在问答不匹配。It can be seen that compared with the original statistical features, the number of statistical features can be expanded through feature combination, and the expanded combined features can also more comprehensively describe the characteristics of the dialogue data to be processed, so it can be more accurately determined. Whether there is a question-answer mismatch in the conversation data.
本实施例中,通过对待处理对话数据的统计特征进行特征组合,能够得到数量和含义更丰富的组合特征,该组合特征能够更全面地描述待处理对话数据的特征,以最终更准确地确定待处理对话数据是否存在问答不匹配。另外,本实施例中未详细描述的内容以及所能实现的技术效果均可以参见图1所示实施例中的相关描述,在此不再赘述。In this embodiment, by combining the statistical features of the dialogue data to be processed, combined features with richer quantities and meanings can be obtained, which can more comprehensively describe the characteristics of the dialogue data to be processed, so as to finally more accurately determine the Process dialog data for question-answer mismatches. In addition, for the content not described in detail in this embodiment and the technical effects that can be achieved, refer to the relevant description in the embodiment shown in FIG. 1 , and details are not repeated here.
可选地,对于图4所示实施例提供的方式,可选地,也可以由检测模型进行统计特征的特征组合,进一步将组合特征输入检测模型,以由该检测模型输出待处理对话数据中是否存在问答不匹配的检测结果。Optionally, for the method provided by the embodiment shown in FIG. 4 , optionally, the detection model can also perform feature combination of statistical features, and further input the combined features into the detection model, so that the detection model can output the dialog data to be processed. Whether there is a question-answer mismatch detection result.
也就是说,与图1和图3所示实施例中提及的检测模型相比,与图4所示实施例对应的检测模型还具有特征组合功能,则对于进行特征组合的检测模型,图5为本发明实施例提供的另一种模型训练的流程图。本实施例同样可以由上述的训练设备执行。如图5所示,在步骤可以包括以下步骤:That is to say, compared with the detection model mentioned in the embodiment shown in Figure 1 and Figure 3, the detection model corresponding to the embodiment shown in Figure 4 also has a feature combination function, then for the detection model that performs feature combination, Fig. 5 is a flow chart of another model training provided by the embodiment of the present invention. This embodiment can also be executed by the above-mentioned training device. As shown in Figure 5, the steps may include the following steps:
S401,获取包含至少一轮对话的训练对话数据的统计特征以及反映训练对话数据是否存在问答不匹配的标注结果。S401. Obtain statistical features of training dialogue data including at least one round of dialogue and labeling results reflecting whether there is a question-answer mismatch in the training dialogue data.
上述步骤S401的具体实现过程可以参见图3所示实施例中相关步骤的具体描述,在此不再赘述。For the specific implementation process of the above step S401, reference may be made to the specific description of the relevant steps in the embodiment shown in FIG. 3 , which will not be repeated here.
S402,对训练对话数据的统计特征进行特征组合,以得到训练对话数据的组合特征。S402. Perform feature combination on statistical features of the training dialogue data to obtain combined features of the training dialogue data.
对训练对话数据的统计特征的特征组合过程,与对待处理对话数据的统计特征进行特征组合的过程类似,则上述步骤402的具体实现过程可以参见图4所示实施例中相关步骤的具体描述,在此不再赘述。The feature combination process of the statistical features of the training dialogue data is similar to the process of feature combination of the statistical features of the dialogue data to be processed. The specific implementation process of the above step 402 can refer to the specific description of the relevant steps in the embodiment shown in FIG. 4 , I won't repeat them here.
S403,将训练对话数据的组合特征作为训练数据,将标注结果作为监督信息进行模型训练,以得到检测模型。S403, using the combined features of the training dialogue data as training data, and using the labeling results as supervision information to perform model training to obtain a detection model.
最终,可以将训练对话数据的组合特征作为训练数据,将训练对话数据的标注结果作为监督信息,进行有监督训练。可选地,可以按照以下公式进行损失计算,并采用梯度下降的方式实现检测模型训练:Finally, the combined features of the training dialogue data can be used as training data, and the labeling results of the training dialogue data can be used as supervision information for supervised training. Optionally, the loss calculation can be performed according to the following formula, and the detection model training can be realized by gradient descent:
其中,p’为检测模型输出的、表明训练对话样本存在问答不匹配的检测结果的置信度,σ是用于计算检测结果和标准结果之间损失值的损失函数,x=W1’X1’+W2’X2’+...+Wk’Xk’+b’,X1’、X2’...Xk’是训练对话数据的组合特征,W1’、W2’...Wk’是检测模型的权重值,b’是检测模型的偏置值,权重值和偏置值共同构成检测模型的模型参数。Among them, p' is the confidence degree of the detection result output by the detection model, indicating that there is a question-answer mismatch in the training dialogue sample, σ is the loss function used to calculate the loss value between the detection result and the standard result, x=W1'X1'+ W2'X2'+...+Wk'Xk'+b', X1', X2'...Xk' are the combined features of the training dialogue data, W1', W2'...Wk' are the weights of the detection model value, b' is the bias value of the detection model, and the weight value and bias value together constitute the model parameters of the detection model.
本实施例中,可以先对训练对话数据的统计特征进行组合,以得到组合特征。再基于数量更多、含义更丰富的组合特征进行模型训练,以提高检测模型的检测准确性。In this embodiment, the statistical features of the training dialogue data may be combined first to obtain combined features. Model training is then performed based on a larger number of combined features with richer meanings to improve the detection accuracy of the detection model.
为了进一步提高检测模型的准确性,图6为本发明实施例提供的另一种模型训练的流程图。本实施例同样可以由上述的训练设备执行。如图6所示,在步骤可以包括以下步骤:In order to further improve the accuracy of the detection model, FIG. 6 is a flowchart of another model training provided by an embodiment of the present invention. This embodiment can also be executed by the above-mentioned training device. As shown in Figure 6, the steps may include the following steps:
S501,获取包含至少一轮问答的训练对话数据的统计特征以及反映训练对话数据是否存在问答不匹配的标注结果。S501. Obtain statistical features of training dialog data including at least one round of question-answering and an annotation result reflecting whether there is a question-answer mismatch in the training dialog data.
S502,对训练对话数据的统计特征进行特征组合,以得到训练对话数据的组合特征。S502. Perform feature combination on statistical features of the training dialogue data to obtain combined features of the training dialogue data.
上述步骤S501~步骤S502的具体实现过程可以参见图5所示实施例中相关步骤的具体描述,在此不再赘述。For the specific implementation process of the above step S501 to step S502, refer to the specific description of the relevant steps in the embodiment shown in FIG. 5 , which will not be repeated here.
S503,将训练对话数据的组合特征作为训练数据,将标注结果作为监督信息分别训练预设数量的初始模型,以得到不同模型参数的备选模型。S503, using the combined features of the training dialogue data as training data, and using the labeling results as supervision information to train a preset number of initial models respectively, so as to obtain candidate models with different model parameters.
接着,训练设备还可以获取预设数量的初始模型,则一种可选地方式,预设数量的初始模型可以具有相同的模型结构以及不同的初始模型参数,则可以将步骤S502中的训练对话数据的组合特征作为训练数据,将训练对话数据的标注结果作为监督信息分别训练预设数量的初始模型。由于初始模型的初始模型参数不同,因此,即使使用相同的训练数据也可以得到模型参数不同的备选模型。Next, the training device can also obtain a preset number of initial models, and in an optional manner, the preset number of initial models can have the same model structure and different initial model parameters, then the training dialogue in step S502 can be The combined features of the data are used as training data, and the annotation results of the training dialogue data are used as supervision information to train a preset number of initial models respectively. Since the initial model parameters of the initial model are different, alternative models with different model parameters can be obtained even with the same training data.
另一种可选地方式,可以按照预设数量对步骤S501中的训练对话数据进行划分。然后,将多份训练对话数据各自的组合特征分别作为预设数量的初始模型的训练数据,将训练对话数据的标注结果作为监督信息分别训练预设数量的初始模型。其中,预设数量的初始模型可以具有相同的模型结构以及相同的初始模型参数。由于训练初始模型的训练对话数据不同,因此训练对话数据的组合特征也不同,最终得到的备选模型的模型参数不同。In another optional manner, the training dialogue data in step S501 may be divided according to a preset number. Then, the combined features of the plurality of training dialog data are respectively used as training data of a preset number of initial models, and the labeling results of the training dialog data are used as supervision information to train a preset number of initial models respectively. Wherein, the preset number of initial models may have the same model structure and the same initial model parameters. Since the training dialogue data for training the initial model is different, the combined features of the training dialogue data are also different, and the model parameters of the final candidate models are different.
S504,根据备选模型的参数确定检测模型的参数,以得到检测模型。S504. Determine the parameters of the detection model according to the parameters of the candidate model to obtain a detection model.
最后,训练设备可以根据预设数量的备选模型各自的模型参数确定检测模型的模型参数。可选地,可以将预设数量的备选模型各自的模型参数取均值或者进行加权求和,模型参数的计算结果可以作为检测模型的模型参数,从而得到检测模型。其中,检测模型与初始模型、备选模型具有相同的模型结构。Finally, the training device can determine the model parameters of the detection model according to the respective model parameters of the preset number of candidate models. Optionally, the model parameters of the preset number of candidate models can be averaged or weighted and summed, and the calculation results of the model parameters can be used as the model parameters of the detection model, thereby obtaining the detection model. Among them, the detection model has the same model structure as the initial model and the candidate model.
本实施例中,通过特征组合以及综合考虑模型参数即参数集成来提高检测模型的检测准确性。具体地,训练设备先利用组合特征训练出多个备选模型,然后通过综合考虑备选模型各自的模型参数的方式得到检测模型的模型参数,从而提高检测模型的模型参数的准确性,也即是提高检测模型的检测准确性。In this embodiment, the detection accuracy of the detection model is improved by feature combination and comprehensive consideration of model parameters, that is, parameter integration. Specifically, the training device first uses the combined features to train multiple candidate models, and then obtains the model parameters of the detection model by comprehensively considering the model parameters of the candidate models, thereby improving the accuracy of the model parameters of the detection model, that is, It is to improve the detection accuracy of the detection model.
为了进一步提高问答不匹配的检测准确性,除了图6所示实施例的方式,另一种可选地方式,还可以综合考虑多个检测结果以得到更准地检测结果。具体地,在按照图6所示实施例训练得到预设数量的备选模型后,还可以由该预设数量的备选模型各自输出待处理对话数据的检测结果以及该检测结果的置信度,然后综合多个检测结果比如对置信度取平均值或者对置信度进行加权求和,以最终得到待处理对话数据的检测结果。In order to further improve the detection accuracy of the question-answer mismatch, in addition to the method shown in the embodiment shown in FIG. 6 , another optional method may be to comprehensively consider multiple detection results to obtain a more accurate detection result. Specifically, after training a preset number of candidate models according to the embodiment shown in FIG. 6 , each of the preset number of candidate models can also output the detection results of the dialogue data to be processed and the confidence of the detection results, Then, multiple detection results are integrated, such as averaging the confidence degrees or performing weighted summation on the confidence degrees, so as to finally obtain the detection result of the dialogue data to be processed.
为了便于理解,下面可以对上述各实施例提供的对话数据处理方法的具体实现过程进行示例性说明。下述过程还可以结合图7理解。For ease of understanding, the specific implementation process of the dialog data processing method provided by the above-mentioned embodiments will be described below as an example. The following process can also be understood in conjunction with FIG. 7 .
对话系统可以部署在云端或者硬件设备中,用以为用户在不同场景下提供咨询服务。户和对话系统在人机对话过程可以产生上述实施例中给出的多段对话。在人机对话过程中,对话系统可以实时记录对话双方产生的对话,并且在对话结束后还可以对对话数据进行统计,以得到该对话数据的统计特征。The dialogue system can be deployed on the cloud or on hardware devices to provide users with consulting services in different scenarios. The user and the dialogue system can generate the multi-segment dialogues given in the above-mentioned embodiments during the man-machine dialogue process. During the process of man-machine dialogue, the dialogue system can record the dialogue produced by both parties in real time, and can also make statistics on the dialogue data after the dialogue is over, so as to obtain the statistical characteristics of the dialogue data.
则处理设备可以获取该统计特征,可选地,处理设备可以直接利用此与对话内容无关且表现为数值的统计特征确定对话数据中是否存在问答不匹配。可选地,处理设备还可以对统计特征进行特征组合,以得到组合特征。处理设备可以进一步利用此组合特征确定对话数据中是否存在问答不匹配。检测结果还可以显示在图2所示的操作界面上。Then the processing device may obtain the statistical feature. Optionally, the processing device may directly use the statistical feature that is irrelevant to the dialogue content and is expressed as a value to determine whether there is a question-answer mismatch in the dialogue data. Optionally, the processing device may also perform feature combination on the statistical features to obtain a combined feature. The processing device can further utilize this combined feature to determine whether there is a question-answer mismatch in the dialog data. The detection result can also be displayed on the operation interface shown in FIG. 2 .
可选地,处理设备所执行的上述处理流程具体可以是处理设备中部署的检测模型执行的。而检测模型的具体训练过程则可以参见上述各实施例中的相关描述,在此不再赘述。Optionally, the foregoing processing procedure executed by the processing device may specifically be executed by a detection model deployed in the processing device. As for the specific training process of the detection model, reference may be made to the relevant descriptions in the foregoing embodiments, which will not be repeated here.
图1~图7所示实施例详细描述了处理设备对对话数据的处理过程。在此基础上,还可以从用户的交互流程出发提出一种人机交互方法。则图8为本发明实施例提供的一种人机交互方法的流程图。该方法的执行主体具体可以是提供操作界面的处理设备。如图8所示,该方法可以包括如下步骤:The embodiments shown in FIG. 1 to FIG. 7 describe in detail the processing process of the dialog data by the processing device. On this basis, a human-computer interaction method can also be proposed starting from the user's interaction process. Then FIG. 8 is a flowchart of a human-computer interaction method provided by an embodiment of the present invention. The execution body of the method may specifically be a processing device providing an operation interface. As shown in Figure 8, the method may include the following steps:
S601,显示提示消息,提示消息在异常对话数据的数量大于预设数量时生成,异常对话数据包括存在问答不匹配的对话数据,对话数据由用户和对话系统在人机对话过程中产生,对话数据是否存在问答不匹配由对话数据的统计特征确定得到,统计特征与对话数据的对话内容无关。S601, displaying a prompt message, the prompt message is generated when the amount of abnormal dialog data is greater than the preset amount, the abnormal dialog data includes dialog data that does not match the question and answer, the dialog data is generated by the user and the dialog system during the man-machine dialog, the dialog data Whether there is a question-answer mismatch is determined by the statistical characteristics of the dialogue data, and the statistical characteristics have nothing to do with the dialogue content of the dialogue data.
处理设备可以按照上述各实施例中提供的方式检测历史时间段内产生的各待处理对话数据是否存在问答不匹配。其中,存在问答不匹配的待处理对话数据可以称为异常对话数据。若异常对话数据的数量大于预设阈值,则处理设备提供的操作界面上可以显示提示消息。The processing device may detect whether there is a question-answer mismatch in the dialogue data to be processed generated in the historical time period according to the manners provided in the foregoing embodiments. Among them, the dialogue data to be processed with a question-answer mismatch may be referred to as abnormal dialogue data. If the amount of abnormal dialog data is greater than the preset threshold, a prompt message may be displayed on the operation interface provided by the processing device.
如图2所示的操作界面,该提示消息可以包括对对话系统进行优化的文字提示。可选地,统计界面上还可以显示有与异常对话数据相关的其他信息,比如当前历史时间段内对话数据的总数、当前历史时间段内异常对话数据的占比、与上一历史时间段内异常对话数量相比,当前历史时间段内异常对话数据数量的变化率等等。As shown in the operation interface in FIG. 2 , the prompt message may include a text prompt for optimizing the dialogue system. Optionally, other information related to the abnormal dialogue data can also be displayed on the statistical interface, such as the total number of dialogue data in the current historical time period, the proportion of abnormal dialogue data in the current historical time period, and the total number of abnormal dialogue data in the previous historical time period. Compared with the number of abnormal conversations, the rate of change of the number of abnormal conversations in the current historical time period, etc.
S602,响应对提示消息的处理操作。S602. Respond to the processing operation on the prompt message.
接着,对话系统的运维人员可以对该提示消息触发处理操作,则处理设备可以响应运维人员对提示消息触发操作,以确定是否对对话系统进行优化。Then, the operation and maintenance personnel of the dialog system can trigger a processing operation on the prompt message, and the processing device can respond to the operation and maintenance personnel triggering an operation on the prompt message to determine whether to optimize the dialog system.
本实施例中,借助处理设备提供的操作界面,对话系统的运维人员能够与处理设备进行交互以确定是否对对话系统进行处理。同时还可以运维人员还可以借助操作界面上显示的各项信息准确了解对话系统的性能。另外,本实施例中未详细描述的内容以及所能实现的技术效果均可以参加上述各实施例中的相关描述,在此不再赘述。In this embodiment, by means of the operation interface provided by the processing device, the operation and maintenance personnel of the dialog system can interact with the processing device to determine whether to process the dialog system. At the same time, the operation and maintenance personnel can also accurately understand the performance of the dialogue system with the help of various information displayed on the operation interface. In addition, the content that is not described in detail in this embodiment and the technical effects that can be achieved can be referred to in the relevant descriptions in the above embodiments, and will not be repeated here.
可选地,对话系统可以部署在在线客服平台中,则提示消息可以显示在在线客服平台提供的统计界面上。Optionally, the dialog system can be deployed on the online customer service platform, and the prompt message can be displayed on the statistical interface provided by the online customer service platform.
上述各实施例提供的问答不匹配的方案也可以作为一种指软件运营服务(Software as aService,简称SaaS)提供给部署有对话系统的在线客服平台或者其他在线平台的运维人员。该服务还可以部署在云端的服务平台中。则图9为本发明实施例提供的另一种人机交互方法的流程图。该方法的执行主体可以为服务平台。如图9所示,该方法可以包括如下步骤:The question-and-answer mismatch solution provided by the above embodiments can also be provided as a software operation service (Software as a Service, SaaS for short) to the operation and maintenance personnel of the online customer service platform deployed with the dialogue system or other online platforms. The service can also be deployed on a cloud-based service platform. Then FIG. 9 is a flowchart of another human-computer interaction method provided by an embodiment of the present invention. The execution subject of the method may be a service platform. As shown in Figure 9, the method may include the following steps:
S701,响应于检测操作的触发,获取包括至少一轮问答的待处理对话数据的统计特征,统计特征与待处理对话数据的对话内容无关。S701. In response to the triggering of the detection operation, acquire the statistical features of the dialogue data to be processed including at least one round of question and answer, where the statistical features are not related to the dialogue content of the dialogue data to be processed.
S702,根据统计特征检测待处理对话数据是否存在问答不匹配。S702. Detect whether there is a question-answer mismatch in the dialogue data to be processed according to statistical features.
S703,显示待处理对话数据的检测结果。S703. Display the detection result of the dialogue data to be processed.
可选地,运维人员可以在云端的操作平台上触发检测操作,则服务平台可以获取包括至少一轮问答的待处理对话数据,并按照上述各实施例提供的方式检测该待处理对话数据是否存在问答不匹配。最终检测结果还可以显示在服务平台提到的统计界面上。Optionally, the operation and maintenance personnel can trigger the detection operation on the cloud operating platform, then the service platform can obtain the pending dialogue data including at least one round of question and answer, and detect whether the pending dialogue data is There is a question-answer mismatch. The final detection result can also be displayed on the statistics interface mentioned by the service platform.
本实施例中未详细描述的内容以及所能实现的技术效果均可以参加上述各实施例中的相关描述,在此不再赘述。The content not described in detail in this embodiment and the technical effects that can be achieved can be referred to in the relevant descriptions in the above embodiments, and will not be repeated here.
以下将详细描述本发明的一个或多个实施例的对话数据处理装置。本领域技术人员可以理解,这些对话数据处理装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。The dialogue data processing apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these dialogue data processing devices can be configured by using commercially available hardware components through the steps taught in this solution.
图10为本发明实施例提供的一种对话数据处理装置的结构示意图,如图10所示,该装置包括:FIG. 10 is a schematic structural diagram of a dialogue data processing device provided by an embodiment of the present invention. As shown in FIG. 10 , the device includes:
特征获取模块11,用于获取包括至少一轮问答的待处理对话数据的统计特征,所述统计特征与所述待处理对话数据的对话内容无关。The feature acquisition module 11 is configured to acquire the statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features have nothing to do with the dialogue content of the dialogue data to be processed.
确定模块12,用于根据所述统计特征确定所述待处理对话数据是否存在问答不匹配。The determination module 12 is configured to determine whether there is a question-answer mismatch in the dialogue data to be processed according to the statistical features.
可选地,所述确定模块12,用于将所述统计特征输入检测模型,以由所述检测模型输出所述待处理对话数据是否存在问答不匹配。Optionally, the determining module 12 is configured to input the statistical features into a detection model, so that the detection model outputs whether there is a question-answer mismatch in the dialogue data to be processed.
可选地,所述装置还包括:训练模块13,用于获取包括至少一轮问答的训练对话数据的统计特征以及反映所述训练对话数据是否存在问答不匹配的标注结果;将所述训练对话数据的统计特征作为训练数据,将所述标注结果作为监督信息分别对预设数量的初始模型进行训练,以得到不同模型参数的备选模型;根据所述备选模型的模型参数确定所述检测模型的模型参数,以得到所述检测模型。Optionally, the device further includes: a training module 13, configured to obtain statistical features of training dialogue data including at least one round of question-and-answer and annotate results reflecting whether there is a question-answer mismatch in the training dialogue data; The statistical characteristics of the data are used as training data, and the labeling results are used as supervision information to train a preset number of initial models respectively to obtain candidate models with different model parameters; determine the detection according to the model parameters of the candidate models The model parameters of the model to get the detection model.
可选地,所述确定模块12,用于对多种统计特征中的任意至少两种进行特征组合,以得到所述待处理对话数据的组合特征;根据所述待处理对话数据的组合特征确定所述待处理对话数据是否存在问答不匹配。Optionally, the determining module 12 is configured to perform feature combination on any at least two of various statistical features to obtain the combined features of the dialogue data to be processed; determine according to the combined features of the dialogue data to be processed Whether there is a question-answer mismatch in the dialogue data to be processed.
可选地,所述确定模块12,用于将所述统计特征输入检测模型,以由所述检测模型对所述统计特征进行特征组合;将所述组合特征输入所述检测模型,以由所述检测模型输出反映所述待处理对话数据是否存在问答不匹配的检测结果。Optionally, the determination module 12 is configured to input the statistical features into a detection model, so that the statistical features are combined by the detection model; input the combined features into the detection model, so that the statistical features can be combined by the detection model. The detection model outputs a detection result reflecting whether there is a question-answer mismatch in the dialogue data to be processed.
可选地,所述训练模块13,用于获取包括至少一轮问答的训练对话数据的统计特征以及反映所述训练对话数据是否存在问答不匹配的标注结果;对所述训练对话数据的统计特征进行特征组合,以得到所述训练对话数据的组合特征;将所述训练对话数据的组合特征作为训练数据,将所述标注结果作为监督信息进行模型训练,以得到所述检测模型。Optionally, the training module 13 is configured to acquire statistical features of training dialogue data including at least one round of question and answer and annotate results reflecting whether there is a question-answer mismatch in the training dialogue data; Combining features to obtain the combined features of the training dialogue data; using the combined features of the training dialogue data as training data, and using the labeling results as supervision information to perform model training to obtain the detection model.
可选地,所述训练模块13,用于将所述训练对话数据的组合特征作为训练数据,将所述标注结果作为监督信息分别训练预设数量的初始模型,以得到不同模型参数的备选模型;根据所述备选模型的参数确定所述检测模型的参数,以得到所述检测模型。Optionally, the training module 13 is configured to use the combined features of the training dialogue data as training data, and use the labeling results as supervision information to train a preset number of initial models respectively, so as to obtain alternatives of different model parameters. A model: determining parameters of the detection model according to parameters of the candidate model to obtain the detection model.
所述获取模块11,用于获取所述对话系统输出的所述统计特征,所述统计特征由所述对话系统在人机对话结束后对所述待处理对话数据进行统计后输出。其中,所述待处理对话数据由用户和对话系统在人机对话过程中产生。The acquiring module 11 is configured to acquire the statistical features output by the dialogue system, and the statistical features are output by the dialogue system after the dialogue data to be processed is counted after the man-machine dialogue ends. Wherein, the dialogue data to be processed is generated by the user and the dialogue system during the man-machine dialogue.
所述装置还包括:统计模块14和信息显示模块15。The device also includes: a statistical module 14 and an information display module 15 .
所述统计模块14,用于统计历史时间段内存在问答不匹配的异常对话数据的数量。The statistical module 14 is used to count the number of abnormal dialog data with question-answer mismatch in the historical time period.
所述信息显示模块15,用于在统计界面上显示所述异常对话数据的数量;若所述异常对话数据的数量大于预设数量,则在所述统计界面上显示用以优化所述对话系统的提示消息。The information display module 15 is used to display the quantity of the abnormal dialogue data on the statistical interface; if the quantity of the abnormal dialogue data is greater than a preset quantity, it is displayed on the statistical interface to optimize the dialogue system prompt message.
其中,所述待处理对话数据包括用户和对话系统在人机对话过程中产生的文本或者语音;所述待处理对话数据的统计特征包括数值类型特征。Wherein, the dialog data to be processed includes text or voice generated during the man-machine dialog between the user and the dialog system; the statistical features of the dialog data to be processed include numeric features.
图10所示装置可以执行图1至图6所示实施例的方法,本实施例未详细描述的部分,可参考对图1至图6所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1至图6所示实施例中的描述,在此不再赘述。The device shown in FIG. 10 can execute the method of the embodiment shown in FIG. 1 to FIG. 6 . For parts not described in detail in this embodiment, reference can be made to relevant descriptions of the embodiment shown in FIG. 1 to FIG. 6 . For the execution process and technical effect of this technical solution, refer to the description in the embodiment shown in FIG. 1 to FIG. 6 , which will not be repeated here.
图11为本发明实施例提供的一种人机交互装置的结构示意图,如图11所示,该装置包括:Fig. 11 is a schematic structural diagram of a human-computer interaction device provided by an embodiment of the present invention. As shown in Fig. 11, the device includes:
显示模块21,用于显示提示消息,所述提示消息在异常对话数据的数量大于预设数量时生成,所述异常对话数据包括存在问答不匹配的对话数据,对话数据由用户和对话系统在人机对话过程中产生,对话数据是否存在问答不匹配由所述对话数据的统计特征确定得到,所述统计特征与所述对话数据的对话内容无关。The display module 21 is used to display a prompt message, the prompt message is generated when the amount of abnormal dialogue data is greater than a preset number, the abnormal dialogue data includes dialogue data that does not match the question and answer, and the dialogue data is generated by the user and the dialogue system in person Generated during a computer-to-computer dialogue, whether there is a question-answer mismatch in the dialogue data is determined by the statistical characteristics of the dialogue data, and the statistical characteristics have nothing to do with the dialogue content of the dialogue data.
响应模块22,用于响应对所述提示消息的处理操作。The response module 22 is configured to respond to the processing operation on the prompt message.
图11所示装置可以执行图8所示实施例的方法,本实施例未详细描述的部分,可参考对图8所示实施例的相关说明。该技术方案的执行过程和技术效果参见图8所示实施例中的描述,在此不再赘述。The device shown in FIG. 11 can execute the method of the embodiment shown in FIG. 8 . For parts not described in detail in this embodiment, refer to the relevant description of the embodiment shown in FIG. 8 . For the execution process and technical effect of this technical solution, refer to the description in the embodiment shown in FIG. 8 , and details are not repeated here.
在一个可能的设计中,上述各实施例提供的对话数据处理方法可以应用在一电子设备中,如图12所示,该电子设备可以包括:第一处理器31和第一存储器32。其中,第一存储器32用于存储支持该电子设备执行上述图1~图6所示实施例中提供的对话数据处理方法的程序,第一处理器31被配置为用于执行第一存储器32中存储的程序。In a possible design, the dialog data processing methods provided in the foregoing embodiments may be applied in an electronic device, and as shown in FIG. 12 , the electronic device may include: a first processor 31 and a first memory 32 . Wherein, the first memory 32 is used to store the program that supports the electronic device to execute the dialog data processing method provided in the above-mentioned embodiments shown in FIGS. 1 to 6 , and the first processor 31 is configured to execute the stored program.
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第一处理器31执行时能够实现如下步骤:The program includes one or more computer instructions, wherein, when one or more computer instructions are executed by the first processor 31, the following steps can be realized:
获取包含至少一轮问答的待处理对话数据的统计特征,所述统计特征与所述待处理对话数据的对话内容无关;Obtaining statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features having nothing to do with the dialogue content of the dialogue data to be processed;
根据所述统计特征确定所述待处理对话数据是否存在问答不匹配。Determine whether there is a question-answer mismatch in the dialogue data to be processed according to the statistical features.
可选地,第一处理器31还用于执行前述图1~图6所示实施例中的全部或部分步骤。Optionally, the first processor 31 is further configured to execute all or part of the steps in the foregoing embodiments shown in FIGS. 1 to 6 .
其中,电子设备的结构中还可以包括第一通信接口33,用于该电子设备与其他设备或通信系统通信。Wherein, the structure of the electronic device may further include a first communication interface 33, which is used for the electronic device to communicate with other devices or communication systems.
另外,本发明实施例提供了一种计算机存储介质,用于储存上述电子设备所用的计算机软件指令,其包含用于执行上述图1~图6所示的对话数据处理方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above-mentioned electronic device, which includes a program for executing the dialog data processing method shown in FIGS. 1 to 6 above.
在一个可能的设计中,上述各实施例提供的人机交互方法可以应用在另一电子设备中,如图13所示,该电子设备可以包括:第二处理器41和第二存储器42。其中,第二存储器42用于存储支持该电子设备执行上述图8所示实施例中提供的人机交互方法的程序,第二处理器41被配置为用于执行第二存储器42中存储的程序。In a possible design, the human-computer interaction methods provided in the foregoing embodiments may be applied in another electronic device, and as shown in FIG. 13 , the electronic device may include: a second processor 41 and a second memory 42 . Wherein, the second memory 42 is used to store a program that supports the electronic device to execute the human-computer interaction method provided in the embodiment shown in FIG. 8 , and the second processor 41 is configured to execute the program stored in the second memory 42 .
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第二处理器41执行时能够实现如下步骤:The program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the second processor 41, the following steps can be realized:
显示提示消息,所述提示消息在异常对话数据的数量大于预设数量时生成,所述异常对话数据包括存在问答不匹配的对话数据,对话数据由用户和所述对话系统在人机对话过程中产生,对话数据是否存在问答不匹配由所述对话数据的统计特征确定得到,所述统计特征与所述对话数据的对话内容无关;Displaying a prompt message, the prompt message is generated when the amount of abnormal dialogue data is greater than a preset number, the abnormal dialogue data includes dialogue data that does not match the question and answer, and the dialogue data is generated by the user and the dialogue system during the man-machine dialogue Generate, whether there is a question-answer mismatch in the dialogue data is determined by the statistical characteristics of the dialogue data, and the statistical characteristics have nothing to do with the dialogue content of the dialogue data;
响应对所述提示消息的处理操作。Respond to the processing operation on the prompt message.
可选地,第二处理器41还用于执行前述图8所示实施例中的全部或部分步骤。Optionally, the second processor 41 is further configured to execute all or part of the steps in the foregoing embodiment shown in FIG. 8 .
其中,电子设备的结构中还可以包括第二通信接口43,用于该电子设备与其他设备或通信系统通信。Wherein, the structure of the electronic device may further include a second communication interface 43, which is used for the electronic device to communicate with other devices or communication systems.
另外,本发明实施例提供了一种计算机存储介质,用于储存上述电子设备所用的计算机软件指令,其包含用于执行上述图8所示的人机交互方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above-mentioned electronic device, which includes a program for executing the above-mentioned human-computer interaction method shown in FIG. 8 .
图14为本发明实施例提供的另一种人机交互装置的结构示意图,如图14所示,该装置包括:Fig. 14 is a schematic structural diagram of another human-computer interaction device provided by an embodiment of the present invention. As shown in Fig. 14, the device includes:
获取模块51,用于响应于检测操作的触发,获取包括至少一轮问答的待处理对话数据的统计特征,所述统计特征与所述待处理对话数据的对话内容无关。The acquiring module 51 is configured to acquire, in response to the trigger of the detection operation, statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features being irrelevant to the dialogue content of the dialogue data to be processed.
检测模块52,用于根据所述统计特征检测所述待处理对话数据是否存在问答不匹配。The detection module 52 is configured to detect whether there is a question-answer mismatch in the dialogue data to be processed according to the statistical characteristics.
结果显示模块53,用于显示所述待处理对话数据的检测结果。The result display module 53 is configured to display the detection result of the dialogue data to be processed.
图14所示装置可以执行图9所示实施例的方法,本实施例未详细描述的部分,可参考对图9所示实施例的相关说明。该技术方案的执行过程和技术效果参见图9所示实施例中的描述,在此不再赘述。The device shown in FIG. 14 can execute the method of the embodiment shown in FIG. 9 . For parts not described in detail in this embodiment, reference can be made to relevant descriptions of the embodiment shown in FIG. 9 . For the execution process and technical effect of this technical solution, refer to the description in the embodiment shown in FIG. 9 , and details are not repeated here.
在一个可能的设计中,上述各实施例提供的人机交互方法可以应用在又一电子设备中,如图15所示,该电子设备可以包括:第三处理器61和第三存储器62。其中,第三存储器62用于存储支持该电子设备执行上述图9所示实施例中提供的人机交互方法的程序,第三处理器61被配置为用于执行第三存储器62中存储的程序。In a possible design, the human-computer interaction methods provided in the foregoing embodiments may be applied in yet another electronic device. As shown in FIG. 15 , the electronic device may include: a third processor 61 and a third memory 62 . Wherein, the third memory 62 is used to store a program that supports the electronic device to execute the human-computer interaction method provided in the embodiment shown in FIG. 9 above, and the third processor 61 is configured to execute the program stored in the third memory 62 .
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第三处理器61执行时能够实现如下步骤:The program includes one or more computer instructions, wherein, when one or more computer instructions are executed by the third processor 61, the following steps can be realized:
响应于检测操作的触发,获取包括至少一轮问答的待处理对话数据的统计特征,所述统计特征与所述待处理对话数据的对话内容无关;Responsive to the triggering of the detection operation, acquiring statistical features of the dialogue data to be processed including at least one round of question and answer, the statistical features having nothing to do with the dialogue content of the dialogue data to be processed;
根据所述统计特征检测所述待处理对话数据是否存在问答不匹配;Detecting whether there is a question-answer mismatch in the dialogue data to be processed according to the statistical characteristics;
显示所述待处理对话数据的检测结果。Display the detection result of the dialogue data to be processed.
可选地,第三处理器61还用于执行前述图9所示实施例中的全部或部分步骤。Optionally, the third processor 61 is further configured to execute all or part of the steps in the foregoing embodiment shown in FIG. 9 .
其中,电子设备的结构中还可以包括第三通信接口63,用于该电子设备与其他设备或通信系统通信。Wherein, the structure of the electronic device may further include a third communication interface 63, which is used for the electronic device to communicate with other devices or communication systems.
另外,本发明实施例提供了一种计算机存储介质,用于储存上述电子设备所用的计算机软件指令,其包含用于执行上述图9所示的人机交互方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above-mentioned electronic device, which includes a program for executing the above-mentioned human-computer interaction method shown in FIG. 9 .
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (14)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310559957.9A CN116681060A (en) | 2023-05-15 | 2023-05-15 | Dialogue data processing method, man-machine interaction method, equipment and storage medium |
PCT/SG2024/050243 WO2024237851A2 (en) | 2023-05-15 | 2024-04-09 | Dialogue data processing method, human-computer interaction method, device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310559957.9A CN116681060A (en) | 2023-05-15 | 2023-05-15 | Dialogue data processing method, man-machine interaction method, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116681060A true CN116681060A (en) | 2023-09-01 |
Family
ID=87788203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310559957.9A Pending CN116681060A (en) | 2023-05-15 | 2023-05-15 | Dialogue data processing method, man-machine interaction method, equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116681060A (en) |
WO (1) | WO2024237851A2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5188977B2 (en) * | 2005-09-30 | 2013-04-24 | アイロボット コーポレイション | Companion robot for personal interaction |
CN112328774B (en) * | 2020-11-27 | 2022-10-25 | 北京邮电大学 | Implementation method of task-based human-machine dialogue task based on multi-document |
CN113127904B (en) * | 2021-04-26 | 2021-12-28 | 北京中启赛博科技有限公司 | Intelligent optimization system and method for access control strategy |
-
2023
- 2023-05-15 CN CN202310559957.9A patent/CN116681060A/en active Pending
-
2024
- 2024-04-09 WO PCT/SG2024/050243 patent/WO2024237851A2/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024237851A2 (en) | 2024-11-21 |
WO2024237851A3 (en) | 2024-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11632463B2 (en) | Automated systems and methods for natural language processing with speaker intention inference | |
US20200202840A1 (en) | Systems and methods for providing automated natural language dialogue with customers | |
US20230080660A1 (en) | Systems and method for visual-audio processing for real-time feedback | |
CN110869969A (en) | Virtual assistant for generating personalized responses within a communication session | |
US9904927B2 (en) | Funnel analysis | |
KR102225603B1 (en) | Device and Method of Scoring Emotion for Psychological Consultation | |
US11336770B2 (en) | Systems and methods for analyzing coaching comments | |
Pawlik et al. | A method for improving bot effectiveness by recognising implicit customer intent in contact centre conversations | |
CN108763548A (en) | Collect method, apparatus, equipment and the computer readable storage medium of training data | |
CA3147634A1 (en) | Method and apparatus for analyzing sales conversation based on voice recognition | |
US20110264444A1 (en) | Keyword display system, keyword display method, and program | |
CN112036923A (en) | Service evaluation method, system, device and storage medium | |
US20240346242A1 (en) | Systems and methods for proactively extracting data from complex documents | |
EP4093005A1 (en) | System method and apparatus for combining words and behaviors | |
US20240412238A1 (en) | Predicting customer interaction using deep learning model | |
Sakurai et al. | Evaluating Intention Detection Capability of Large Language Models in Persuasive Dialogues | |
CN114925159A (en) | User sentiment analysis model training method, device, electronic device and storage medium | |
CN116681060A (en) | Dialogue data processing method, man-machine interaction method, equipment and storage medium | |
CN112632241A (en) | Method, device, equipment and computer readable medium for intelligent conversation | |
US11133010B1 (en) | Intelligent agent for interactive service environments | |
KR20230115723A (en) | Real time consulting evaluation system | |
CN110826339B (en) | Behavior recognition method, behavior recognition device, electronic equipment and medium | |
CN115379054A (en) | Method and device for processing call-out operation | |
CN115271932A (en) | Outbound risk identification method and device | |
US20200042886A1 (en) | Information output system, information output method, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |