[go: up one dir, main page]

CN115775052A - Complaint prediction method and device, electronic equipment and storage medium - Google Patents

Complaint prediction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115775052A
CN115775052A CN202211643794.4A CN202211643794A CN115775052A CN 115775052 A CN115775052 A CN 115775052A CN 202211643794 A CN202211643794 A CN 202211643794A CN 115775052 A CN115775052 A CN 115775052A
Authority
CN
China
Prior art keywords
user
complaint
probability
features
current speech
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211643794.4A
Other languages
Chinese (zh)
Inventor
陈勇
陈新月
韩亚昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lingxi Beijing Technology Co Ltd
Original Assignee
Lingxi Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lingxi Beijing Technology Co Ltd filed Critical Lingxi Beijing Technology Co Ltd
Priority to CN202211643794.4A priority Critical patent/CN115775052A/en
Publication of CN115775052A publication Critical patent/CN115775052A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a complaint prediction method, a complaint prediction device, electronic equipment and a storage medium, which are applied to a man-machine conversation scene, wherein the method comprises the following steps: acquiring preset static characteristics used for representing a user and preset dynamic characteristics used for representing the current speech of the user; determining user characteristics according to the static characteristics and the dynamic characteristics; and inputting the user characteristics into the trained complaint prediction model, and acquiring the complaint probability of the user under the current speech. Static features are inherent attributes of a user. The dynamic feature is associated with the current utterance. Because the probability that a certain user generates complaints in one man-machine conversation is related to the user and each speaking of the user in the conversation, in the prediction process, the inherent attribute of the user and the current speaking condition of the user are taken into consideration, complaint prediction is carried out from multiple dimensions and multiple characteristics, various factors influencing the complaints can be taken into consideration, and the prediction accuracy of the complaint probability is improved.

Description

一种投诉预测方法、装置、电子设备及存储介质Complaint prediction method, device, electronic equipment and storage medium

技术领域technical field

本申请涉及人机交互技术领域,具体而言,涉及一种投诉预测方法、装置、电子设备及存储介质。The present application relates to the technical field of human-computer interaction, and in particular, to a complaint prediction method, device, electronic equipment, and storage medium.

背景技术Background technique

近年来随着人工智能(Artificial Intelligence,AI)技术的迅速发展,人机对话广泛应用在各种场景中,如电话销售场景、智能客服场景等等。在人机对话中,由于机器人的理解能力偏差,容易导致用户体验较差从而产生投诉。如何提高机器人对用户投诉意向的理解与预测,是本领域亟待解决的技术问题。In recent years, with the rapid development of artificial intelligence (AI) technology, man-machine dialogue is widely used in various scenarios, such as telephone sales scenarios, intelligent customer service scenarios, and so on. In the human-machine dialogue, due to the deviation of the understanding ability of the robot, it is easy to cause poor user experience and cause complaints. How to improve the robot's understanding and prediction of the user's complaint intention is an urgent technical problem in this field.

发明内容Contents of the invention

本申请实施例的目的在于提供一种投诉预测方法、装置、电子设备及存储介质,用以实现在人机对话中预测用户投诉意向的技术效果。The purpose of the embodiment of the present application is to provide a complaint prediction method, device, electronic equipment and storage medium, so as to achieve the technical effect of predicting the user's complaint intention in the man-machine dialogue.

本申请实施例第一方面提供了一种投诉预测方法,应用于人机对话场景,所述方法包括:The first aspect of the embodiment of the present application provides a complaint prediction method, which is applied to a man-machine dialogue scenario, and the method includes:

获取预设的用于表征用户的静态特征、以及用于表征所述用户当前发言的动态特征;Obtain preset static features used to characterize the user and dynamic features used to characterize the user's current speech;

根据所述静态特征与所述动态特征确定用户特征;determining user characteristics according to the static characteristics and the dynamic characteristics;

将所述用户特征输入已训练的投诉预测模型,获取在所述当前发言下所述用户的投诉概率。Inputting the user characteristics into the trained complaint prediction model to obtain the complaint probability of the user under the current speech.

在上述实现过程中,静态特征用于表征用户,是用户的固有属性。动态特征用于表征当前发言,与当前发言相关。由于某一用户在一次人机对话中产生投诉的概率与该用户本身相关,也与对话中用户的每一次发言相关,因此在预测过程中,将用户本身的固有属性以及用户当前发言的情况一并考虑在内,从多个维度、多个特征来进行投诉预测,能将对投诉产生影响的各种因素均考虑在内,从而提高了投诉概率的预测准确性。In the above implementation process, static features are used to characterize users and are inherent attributes of users. Dynamic features are used to characterize the current utterance and are related to the current utterance. Since the probability of a user complaining in a man-machine dialogue is related to the user himself and each speech of the user in the conversation, in the prediction process, the inherent attributes of the user itself and the current situation of the user’s speech are combined And taking it into account, predicting complaints from multiple dimensions and features can take into account various factors that affect complaints, thereby improving the accuracy of the prediction of complaint probability.

进一步地,所述静态特征包括以下一种或多种特征:用户年龄、性别、地理位置;Further, the static features include one or more of the following features: user age, gender, geographic location;

所述动态特征包括以下一种或多种特征:所述当前发言的意图、语速、对话总时长、对话间隔。The dynamic feature includes one or more of the following features: the intention of the current speech, the speech rate, the total duration of the dialogue, and the dialogue interval.

在上述实现过程中,考虑到用户的年龄、性别、地理位置、以及当前发言的意图、语速、对话总时长、对话间隔与某一用户在一次人机对话中产生投诉的概率相关,因此在预测过程中,将上述特征一并考虑在内,从多个维度、多个特征来进行投诉预测,能将对投诉产生影响的各种因素均考虑在内,从而提高了投诉概率的预测准确性。In the above implementation process, considering the user's age, gender, geographical location, and the current speaking intention, speech rate, total duration of the dialogue, and dialogue interval are related to the probability of a user complaining in a man-machine dialogue, so in During the forecasting process, the above characteristics are taken into consideration, and complaint prediction is made from multiple dimensions and features, and various factors that affect complaints can be taken into account, thereby improving the prediction accuracy of complaint probability .

进一步地,所述投诉预测模型包括决策树层与线性回归层;所述将所述用户特征输入已训练的投诉预测模型,获取在所述当前发言下所述用户的投诉概率,包括:Further, the complaint prediction model includes a decision tree layer and a linear regression layer; the input of the user characteristics into the trained complaint prediction model to obtain the complaint probability of the user under the current speech includes:

将所述用户特征输入所述决策树层;inputting said user characteristics into said decision tree layer;

将所述决策树层的叶子节点所提取的特征输入所述线性回归层;The features extracted by the leaf nodes of the decision tree layer are input into the linear regression layer;

获取所述线性回归层输出的投诉概率。Obtain the complaint probability output by the linear regression layer.

在上述实现过程中,利用包括决策树层与线性回归层的投诉预测模型进行投诉概率预测,实现了在人机对话中预测用户投诉意向的技术效果。In the above implementation process, the complaint prediction model including the decision tree layer and the linear regression layer is used to predict the probability of complaints, and the technical effect of predicting the user's complaint intention in the man-machine dialogue is realized.

进一步地,所述方法还包括:Further, the method also includes:

从所述决策树层中获取所述用户特征中的每个特征的特征重要性;Obtaining the feature importance of each feature in the user features from the decision tree layer;

针对特征重要性大于重要性阈值的目标特征,当所述用户的用户特征与所述目标特征匹配,采取所述目标特征对应的目标措施。For a target feature whose feature importance is greater than an importance threshold, when the user feature of the user matches the target feature, a target measure corresponding to the target feature is taken.

在上述实现过程中,通过从决策树层中获取每个特征的特征重要性来分析投诉产生的原因,当用户特征与目标特征匹配时则采取相应的目标措施来避免投诉的产生,增加人机对话的智能性,避免投诉产生。In the above implementation process, the cause of complaints is analyzed by obtaining the feature importance of each feature from the decision tree layer, and when the user features match the target features, corresponding target measures are taken to avoid complaints and increase man-machine The intelligence of dialogue avoids complaints.

进一步地,所述方法还包括:Further, the method also includes:

若所述投诉概率大于预设概率阈值,执行预设的预警措施。If the complaint probability is greater than a preset probability threshold, a preset early warning measure is executed.

在上述实现过程中,通过投诉概率来判断是否采取预警措施。在投诉概率较大的情况下,通过在产生投诉前采取预警措施来避免投诉的产生,从而增加人机对话的智能性。In the above implementation process, the complaint probability is used to judge whether to take early warning measures. In the case of a high probability of complaints, the occurrence of complaints can be avoided by taking early warning measures before complaints are generated, thereby increasing the intelligence of man-machine dialogue.

进一步地,所述方法还包括:Further, the method also includes:

获取所述当前发言的文本序列;Acquiring the text sequence of the current speech;

对所述文本序列进行关键词匹配和/或情感分析的处理;performing keyword matching and/or sentiment analysis processing on the text sequence;

若根据处理结果,确定在所述当前发言下所述用户表现投诉意向,执行所述预警措施。If it is determined according to the processing result that the user shows an intention to complain under the current speech, the early warning measures are executed.

在上述实现过程中,通过关键词匹配和/或情感分析技术,进一步分析用户是否有表现投诉意向,并执行预警措施,从而提高预警准确度。In the above implementation process, through keyword matching and/or sentiment analysis technology, it is further analyzed whether the user has the intention to express complaints, and early warning measures are implemented, thereby improving the accuracy of early warning.

进一步地,在所述将所述用户特征输入已训练的投诉预测模型之前,执行所述关键词匹配和/或情感分析的处理;Further, before inputting the user characteristics into the trained complaint prediction model, performing the processing of keyword matching and/or sentiment analysis;

若根据所述处理结果,确定在所述当前发言下所述用户未表现投诉意向,执行所述将所述用户特征输入已训练的投诉预测模型的步骤。If it is determined according to the processing result that the user has no complaint intention under the current utterance, the step of inputting the user characteristics into the trained complaint prediction model is performed.

在上述实现过程中,在利用投诉预测模型进行投诉预测时,首先对当前发言的文本序列进行关键词匹配和/或情感分析的处理,并根据处理结果执行预警措施。相比于预测投诉概率,关键词匹配结果以及情感分析结果更能准确快速地反映用户的投诉意向,因此先进行关键词匹配和/或情感分析的处理能快速判断是否执行预警措施,避免投诉的产生。In the above implementation process, when using the complaint prediction model to predict complaints, firstly, the text sequence of the current speech is processed by keyword matching and/or sentiment analysis, and early warning measures are executed according to the processing results. Compared with predicting the probability of complaints, keyword matching results and sentiment analysis results can more accurately and quickly reflect users' complaint intentions. Therefore, performing keyword matching and/or sentiment analysis first can quickly determine whether to implement early warning measures and avoid complaints. produce.

本申请实施例第二方面提供了一种投诉预测装置,应用于人机对话场景,所述装置包括:The second aspect of the embodiment of the present application provides a complaint prediction device, which is applied to a man-machine dialogue scenario, and the device includes:

获取模块,用于获取预设的用于表征用户的静态特征、以及用于表征所述用户当前发言的动态特征;An acquisition module, configured to acquire preset static features used to characterize the user, and dynamic features used to characterize the user's current speech;

确定模块,用于根据所述静态特征与所述动态特征确定用户特征;A determination module, configured to determine user characteristics according to the static characteristics and the dynamic characteristics;

预测模块,用于将所述用户特征输入已训练的投诉预测模型,获取在所述当前发言下所述用户的投诉概率。A prediction module, configured to input the user characteristics into a trained complaint prediction model to obtain the complaint probability of the user under the current utterance.

本申请实施例第三方面提供了一种电子设备,所述电子设备包括:The third aspect of the embodiment of the present application provides an electronic device, and the electronic device includes:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器调用所述可执行指令时实现第一方面任一所述方法的操作。Wherein, when the processor invokes the executable instruction, the operation of any one of the methods in the first aspect is implemented.

本申请实施例第四方面提供了一种计算机可读存储介质,其上存储有计算机指令,所述计算机指令被处理器执行时实现第一方面任一所述方法的步骤。The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings that need to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, so It should not be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings according to these drawings without creative work.

图1为本申请实施例提供的一种投诉预测方法的流程示意图;FIG. 1 is a schematic flowchart of a complaint prediction method provided in an embodiment of the present application;

图2为本申请实施例提供的另一种投诉预测方法的流程示意图;FIG. 2 is a schematic flowchart of another complaint prediction method provided in the embodiment of the present application;

图3为本申请实施例提供的另一种投诉预测方法的流程示意图;FIG. 3 is a schematic flowchart of another complaint prediction method provided in the embodiment of the present application;

图4为本申请实施例提供的另一种投诉预测方法的流程示意图;FIG. 4 is a schematic flowchart of another complaint prediction method provided in the embodiment of the present application;

图5为本申请实施例提供的另一种投诉预测方法的流程示意图;FIG. 5 is a schematic flowchart of another complaint prediction method provided in the embodiment of the present application;

图6为本申请实施例提供的一种投诉预测装置的结构框图;FIG. 6 is a structural block diagram of a complaint prediction device provided in an embodiment of the present application;

图7为本申请实施例提供的一种电子设备的硬件结构图。FIG. 7 is a hardware structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

近年来随着人工智能(Artificial Intelligence,AI)技术的迅速发展,人机对话广泛应用在各种场景中,如电话销售场景、物流、银行等智能客服场景等等。在人机对话中,由于机器人的理解能力偏差,容易导致用户体验较差从而产生投诉。尤其在电话销售场景中,若产生了客诉,会给业务发展带来严重的负面影响。因此如何提高机器人对用户投诉意向的理解与预测,是本领域亟待解决的技术问题。In recent years, with the rapid development of artificial intelligence (AI) technology, man-machine dialogue is widely used in various scenarios, such as telemarketing scenarios, logistics, banking and other intelligent customer service scenarios. In the human-machine dialogue, due to the deviation of the understanding ability of the robot, it is easy to cause poor user experience and cause complaints. Especially in the telemarketing scenario, if a customer complaint occurs, it will have a serious negative impact on business development. Therefore, how to improve the robot's understanding and prediction of the user's complaint intention is a technical problem to be solved urgently in this field.

为此,本申请提出了一种投诉预测方法,应用于人机对话场景。如图1所述,该方法包括步骤:For this reason, this application proposes a complaint prediction method, which is applied to the scene of man-machine dialogue. As shown in Figure 1, the method comprises the steps of:

步骤110:获取预设的用于表征用户的静态特征、以及用于表征所述用户当前发言的动态特征;Step 110: Obtain preset static features used to characterize the user and dynamic features used to characterize the user's current speech;

步骤120:根据所述静态特征与所述动态特征确定用户特征;Step 120: Determine user characteristics according to the static characteristics and the dynamic characteristics;

步骤130:将所述用户特征输入已训练的投诉预测模型,获取在所述当前发言下所述用户的投诉概率。Step 130: Input the user characteristics into the trained complaint prediction model, and obtain the complaint probability of the user under the current utterance.

在人机对话场景中,用户与机器人以一问一答的形式进行对话。用户的每一次发言可以是对机器人的发问或者是对机器人的应答。一次人机对话包括一次或一次以上的用户发言。也即在一次人机对话过程中,用户会进行至少一次发言,通常来说是多次发言。而针对用户的每一次发言,均通过执行步骤110-步骤130来预测在当前发言中用户的投诉概率。In the human-machine dialogue scenario, the user and the robot have a dialogue in the form of a question and an answer. Each speech of the user can be a question to the robot or a response to the robot. A man-machine dialogue includes one or more user speeches. That is, during a man-machine dialogue, the user will make at least one speech, generally speaking, several speeches. For each utterance of the user, step 110 to step 130 are performed to predict the user's complaint probability in the current utterance.

用户特征用于预测投诉概率。用户特征包括静态特征与动态特征。其中,静态特征用于表征用户,是用户的固有属性;动态特征用于表征用户的当前发言。在同一用户的每次发言中,静态特征是相同的,但动态特征是不相同的。也即静态特征只与用户本人相关,与用户的发言无关;而动态特征则与用户的发言相关。因此在一次人机对话中,只需从数据库中获取一次静态特征。而在每次发言中,都需要重新获取当前发言的动态特征。随后根据静态特征与动态特征确定用户特征。User characteristics are used to predict complaint probability. User features include static features and dynamic features. Among them, the static feature is used to represent the user and is an inherent attribute of the user; the dynamic feature is used to represent the user's current speech. In each utterance of the same user, the static features are the same, but the dynamic features are different. That is to say, the static feature is only related to the user himself, and has nothing to do with the user's speech; while the dynamic feature is related to the user's speech. Therefore, in a man-machine dialogue, only one static feature needs to be obtained from the database. In each speech, it is necessary to reacquire the dynamic features of the current speech. User characteristics are then determined based on the static and dynamic characteristics.

例如,可以将静态特征与动态特征按照预设顺序进行组合得到用户特征。又例如,可以将静态特征与动态特征相加求和得到用户特征。For example, static features and dynamic features may be combined in a preset order to obtain user features. For another example, static features and dynamic features may be added and summed to obtain user features.

随后,将用户特征输入已训练的投诉预测模型,投诉预测模型利用用户特征可以输出在当前发言下用户的投诉概率。Then, input the user characteristics into the trained complaint prediction model, and the complaint prediction model can output the user's complaint probability under the current speech by using the user characteristics.

在本实施例中,用于进行投诉预测的用户特征包括两个维度的特征:静态特征与动态特征。静态特征用于表征用户,是用户的固有属性。动态特征用于表征当前发言,与当前发言相关。由于某一用户在一次人机对话中产生投诉的概率与该用户本身相关,也与对话中用户的每一次发言相关,因此在预测过程中,将用户本身的固有属性以及用户当前发言的情况一并考虑在内,从多个维度、多个特征来进行投诉预测,能将对投诉产生影响的各种因素均考虑在内,从而提高了投诉概率的预测准确性。In this embodiment, the user features used for complaint prediction include features of two dimensions: static features and dynamic features. Static features are used to characterize users and are inherent attributes of users. Dynamic features are used to characterize the current utterance and are related to the current utterance. Since the probability of a user complaining in a man-machine dialogue is related to the user himself and each speech of the user in the conversation, in the prediction process, the inherent attributes of the user itself and the current situation of the user’s speech are combined And taking it into account, predicting complaints from multiple dimensions and features can take into account various factors that affect complaints, thereby improving the accuracy of the prediction of complaint probability.

关于表征用户的静态特征,如上所述,静态特征是用户的固有属性,只与用户本人相关,与用户的发言无关。在一些实施例中,静态特征可以包括用户年龄、性别、地理位置中的一种或多种。其中,地理位置可以是用户所在的地理区域,例如华东、华南、华北等;也可以是用户所在的省份、市区等等。With regard to the static features characterizing the user, as mentioned above, the static features are the inherent attributes of the user, which are only related to the user himself and have nothing to do with the user's speech. In some embodiments, static features may include one or more of user age, gender, and geographic location. Wherein, the geographic location may be the geographical area where the user is located, such as East China, South China, North China, etc.; it may also be the province, urban area, etc. where the user is located.

由于用户产生投诉的概率可能与年龄、性别、地理位置相关,因此在本实施例中静态特征包括用户年龄、性别、地理位置中的一种或多种。Since the probability of a user generating a complaint may be related to age, gender, and geographic location, the static feature includes one or more of the user's age, gender, and geographic location in this embodiment.

其中,上述各种用户资料,包括年龄、性别、地理位置等,均在具备合法性基础上获取以及进行处理。例如征得用户同意,或者为履行合同所必需等。且上述各种用户资料仅会在规定或者约定的范围内进行处理。Among them, the above-mentioned various user data, including age, gender, geographical location, etc., are obtained and processed on the basis of legality. For example, to obtain the user's consent, or to perform a contract, etc. And the above-mentioned various user data will only be processed within the prescribed or agreed scope.

关于表征用户当前发言的动态特征,如上所述,动态特征与用户的发言相关。在用户的不同发言中,对应的动态特征并不相同。在一些实施例中,动态特征可以包括当前发言的意图、语速、对话总时长、对话间隔中的一种或多种。Regarding the dynamic feature characterizing the user's current utterance, as described above, the dynamic feature is related to the user's utterance. In different utterances of the user, the corresponding dynamic features are not the same. In some embodiments, the dynamic feature may include one or more of the current speaking intention, speech rate, total duration of the dialogue, and dialogue interval.

其中,当前发言的意图根据当前发言的发言内容进行预测。示例性地,可以预先建立有意图库或意图集合,其中包含了用户可能表现的所有意图。例如,意图可以包括但不限于结束对话意图、兴趣意图、询问意图、拒绝意图等等。随后,作为例子,可以利用意图识别模型对当前发言的内容进行语义分析,意图识别模型可以输出当前发言所表现的意图类型,从而获取到当前发言的意图。作为另一个例子,不同的意图对应不同的关键词。例如结束对话意图对应的关键词包括但不限于“忙”、“没时间”、“上班”等等;兴趣意图对应的关键词包括但不限于“介绍”、“具体”等等。如此,可以对当前发言进行关键词匹配来预测其意图。若当前发言与关键词匹配,则确定当前发言的意图是其所匹配的关键词对应的意图。Wherein, the intention of the current speech is predicted according to the speech content of the current speech. Exemplarily, an intention library or an intention set may be pre-established, which contains all possible intentions expressed by the user. For example, intents may include, but are not limited to, end-conversation intents, interest intents, inquiry intents, decline intents, and the like. Subsequently, as an example, the intent recognition model can be used to perform semantic analysis on the content of the current speech, and the intent recognition model can output the type of intent expressed by the current speech, so as to obtain the intent of the current speech. As another example, different intents correspond to different keywords. For example, the keywords corresponding to the intention of ending the dialogue include but not limited to "busy", "no time", "go to work" and so on; the keywords corresponding to the intention of interest include but not limited to "introduction", "specific" and so on. In this way, keyword matching can be performed on the current utterance to predict its intent. If the current utterance matches the keyword, it is determined that the intent of the current utterance is the intent corresponding to the matched keyword.

当前发言的语速是指用户在当前发言中说话的快慢。若语速较快,用户当前心情较为着急或愤怒,那么产生投诉的概率会相对较大。The speech rate of the current speech refers to the speed at which the user speaks in the current speech. If the speaking speed is fast and the user is currently in a state of anxiety or anger, the probability of complaints will be relatively high.

对话总时长是指用户在本次人机对话中的对话总时长。在电话销售场景中,若对话总时长较长,说明用户可能对销售商品有一定兴趣,因此产生投诉的概率相对较小。但在智能客服场景中,例如快递智能客服,若对话总时长较长,说明花费了较长的时间来解决用户提出的问题,满足用户需要,那么用户体验可能较差,因此产生投诉的概率相对较大。The total conversation duration refers to the total conversation duration of the user in this man-machine conversation. In the telemarketing scenario, if the total duration of the conversation is long, it means that the user may be interested in selling the product, so the probability of complaints is relatively small. However, in smart customer service scenarios, such as express delivery smart customer service, if the total conversation time is long, it means that it took a long time to solve the problems raised by the user and meet the needs of the user, then the user experience may be poor, so the probability of complaints is relatively low. larger.

对话间隔是指同一用户的上一次人机对话至本次人机对话的时间间隔,也即上次呼叫距离本次呼叫时间。若对话间隔较短,用户可能会感到厌烦,因此产生投诉的概率相对较大。The dialogue interval refers to the time interval from the last man-machine dialogue to the current man-machine dialogue of the same user, that is, the time from the last call to this call. If the dialogue interval is short, users may feel bored, so the probability of complaints is relatively high.

在本实施例中,考虑到用户的年龄、性别、地理位置、以及当前发言的意图、语速、对话总时长、对话间隔与某一用户在一次人机对话中产生投诉的概率相关,因此在预测过程中,将上述特征一并考虑在内,从多个维度、多个特征来进行投诉预测,能将对投诉产生影响的各种因素均考虑在内,从而提高了投诉概率的预测准确性。In this embodiment, considering that the user's age, gender, geographic location, and current speaking intention, speech rate, total duration of the dialogue, and dialogue interval are related to the probability that a certain user generates a complaint in a man-machine dialogue, so in During the forecasting process, the above characteristics are taken into consideration, and complaint prediction is made from multiple dimensions and features, and various factors that affect complaints can be taken into account, thereby improving the prediction accuracy of complaint probability .

在一些实施例中,投诉预测模型包括决策树层与线性回归层。示例性地,决策树层可以是梯度提升决策树(Gradient Boost Decision Tree,GBDT)。线性回归层为线性回归模型(Logistic Regression。LR)。在决策树层中,每个叶子节点的输出结果以独热编码(one-hot编码)输入到线性回归层中进行分类。如此,上述步骤130可以包括如图2所示的步骤:In some embodiments, the complaint prediction model includes a decision tree layer and a linear regression layer. Exemplarily, the decision tree layer may be a Gradient Boost Decision Tree (Gradient Boost Decision Tree, GBDT). The linear regression layer is a linear regression model (Logistic Regression. LR). In the decision tree layer, the output of each leaf node is input into the linear regression layer with one-hot encoding for classification. In this way, the above step 130 may include steps as shown in FIG. 2:

步骤131:将所述用户特征输入所述决策树层;Step 131: Input the user characteristics into the decision tree layer;

步骤132:将所述决策树层的叶子节点所提取的特征输入所述线性回归层;Step 132: Input the features extracted by the leaf nodes of the decision tree layer into the linear regression layer;

步骤133:获取所述线性回归层输出的投诉概率。Step 133: Obtain the complaint probability output by the linear regression layer.

用户特征包括静态特征与动态特征。而静态特征与动态特征又分别包括不同的特征,因此用户特征包括多个特征。在决策树层中,从根节点到叶子节点的路径相当于是不同特征进行的特征组合,用叶子节点可以唯一地表示这条路径。如此,当用户特征输入决策树层后,最终用户特征会落在某叶子节点上。根据用户特征在叶子节点的落入情况,可以得到叶子节点所提取的特征,并以one-hot编码的形式输入至线性回归层中。最后,线性回归层可以输出投诉概率。User features include static features and dynamic features. The static feature and the dynamic feature respectively include different features, so the user feature includes multiple features. In the decision tree layer, the path from the root node to the leaf node is equivalent to a feature combination of different features, and the leaf node can uniquely represent this path. In this way, when the user features are input into the decision tree layer, the final user features will fall on a certain leaf node. According to the fall of user features in the leaf nodes, the features extracted by the leaf nodes can be obtained and input into the linear regression layer in the form of one-hot encoding. Finally, a linear regression layer can output complaint probabilities.

其中,投诉预测模型是通过有监督训练得到的。样本数据包括历史投诉数据与历史非投诉数据。其中,历史投诉数据携带第一标签,历史非投诉数据携带第二标签。Among them, the complaint prediction model is obtained through supervised training. The sample data includes historical complaint data and historical non-complaint data. Among them, the historical complaint data carries the first label, and the historical non-complaint data carries the second label.

当然,本申请中投诉预测模型并不限于上述的GBDT-LR模型,在相关技术中其他能实现投诉概率输出的模型皆可作为本申请的投诉预测模型。Of course, the complaint prediction model in this application is not limited to the above-mentioned GBDT-LR model, and other models capable of outputting complaint probability in related technologies can be used as the complaint prediction model in this application.

进一步地,在人机对话场景中,除了需要预测出用户的投诉概率以外,当发现用户有投诉倾向时,若能在产生投诉前及时采取相应的安抚措施或补救措施则能避免产生投诉。Furthermore, in the man-machine dialogue scenario, in addition to predicting the user’s complaint probability, when it is found that the user has a tendency to complain, if the corresponding appeasement or remedial measures can be taken in time before the complaint occurs, the complaint can be avoided.

如上所述,投诉概率与多种特征相关,产生投诉的原因也有多种。可以理解是,不同特征对投诉概率的贡献程度并不相同,也就是说每种特征的特征重要度均不相同。根据特征重要程度,可以辅助分析产生投诉的原因。而特征重要度可以从决策树层中提取。如此,上述方法还包括如图3所示的步骤:As mentioned above, the probability of complaints is related to various characteristics, and there are many reasons for complaints. It can be understood that the contribution of different features to the complaint probability is not the same, that is to say, the feature importance of each feature is not the same. According to the importance of features, it can assist in analyzing the cause of complaints. And the feature importance can be extracted from the decision tree layer. In this way, the above method also includes the steps shown in Figure 3:

步骤141:从所述决策树层中获取所述用户特征中的每个特征的特征重要性;Step 141: Obtain the feature importance of each feature in the user features from the decision tree layer;

步骤142:针对特征重要性大于重要性阈值的目标特征,当所述用户的用户特征与所述目标特征匹配,采取所述目标特征对应目标措施。Step 142: For the target feature whose feature importance is greater than the importance threshold, when the user feature of the user matches the target feature, take the target measure corresponding to the target feature.

以用户特征包括用户年龄、性别、地理位置、当前发言的意图、语速、对话总时长、对话间隔为例,用户特征包括多个特征。从决策树层中可以获取上述每个特征的特征重要性。根据特征重要性的取值大小,可以分析产生投诉的原因。Taking user characteristics including user age, gender, geographical location, current speaking intention, speech rate, total conversation duration, and conversation interval as an example, user characteristics include multiple characteristics. The feature importance of each of the above features can be obtained from the decision tree layer. According to the value of the importance of the feature, the cause of the complaint can be analyzed.

作为例子,若用户年龄的特征重要性最大,或者大于预设的重要性阈值,说明年龄因素是导致产生投诉的原因之一。满足一定年龄条件的用户会倾向于进行投诉。例如在一些场景中,年龄较大的用户可能跟不上智能客服的语速,由于听不清智能客服的对话内容从而产生投诉。在这种情况下,用户年龄为目标特征。当某一用户的用户特征与该目标特征匹配时,例如某一用户的年龄大于预设年龄阈值,则采取与用户年龄对应的目标措施。用户年龄对应的目标措施包括多种,例如包括采用语速较慢的对话模式与该用户进行对话,又例如包括为该用户转接人工服务。As an example, if the feature of user age is the most important, or is greater than a preset importance threshold, it means that the age factor is one of the reasons for the complaint. Users who meet certain age criteria tend to make complaints. For example, in some scenarios, older users may not be able to keep up with the speaking speed of the smart customer service, and complain because they cannot hear the content of the conversation of the smart customer service clearly. In this case, user age is the target feature. When the user feature of a certain user matches the target feature, for example, the age of a certain user is greater than a preset age threshold, a target measure corresponding to the user's age is taken. The target measures corresponding to the user's age include multiple types, for example, including adopting a dialogue mode with a slow speaking speed to have a dialogue with the user, and for example, including transferring the user to a human service.

如此,在开始人机对话时,获取用户的静态特征,包括用户年龄。若用户年龄大于预设的年龄阈值,则采用语速较慢的对话模式与该用户进行对话,又或者直接为该用户转接人工服务。In this way, the user's static characteristics, including the user's age, are acquired when the man-machine dialogue is started. If the user's age is greater than the preset age threshold, a dialogue mode with a slower speech rate will be used to have a dialogue with the user, or the user will be directly transferred to a manual service.

作为例子,若当前发言的意图的特征重要性最大,或者大于预设的重要性阈值,说明意图因素是导致产生投诉的原因之一。表现出某种或某些意图的用户会倾向于进行投诉。例如在电话推销场景中,对于表现出结束对话意图的用户,若智能客服依然坚持推销商品,则用户可能产生投诉。在这种情况下,意图是目标特征。当用户特征中的意图特征与该目标特征匹配时,则采取与意图对应的目标措施,例如结束对话,表明下次再访等等。As an example, if the feature of the intention of the current speech has the greatest importance, or is greater than a preset importance threshold, it indicates that the intention factor is one of the reasons for the complaint. Users who show some intent or intentions tend to make complaints. For example, in a telemarketing scenario, for a user who shows the intention to end the conversation, if the intelligent customer service still insists on selling the product, the user may complain. In this case, intent is the target feature. When the intent feature in the user profile matches the target feature, the target measure corresponding to the intent is taken, such as ending the conversation, indicating the next visit, and so on.

如此,在人机对话过程中,获取用户的动态特征,包括当前发言的意图。若当前发言的意图为预设的意图类型,如结束对话意图,则主动与用户结束对话。值得注意的是,在这种情况下,就算投诉预测模型输出的投诉概率较小,但为了保证避免投诉产生,执行目标特征对应的目标措施。In this way, during the man-machine dialogue, the user's dynamic characteristics, including the current speaking intention, are acquired. If the current speaking intention is a preset intention type, such as the intention to end the dialogue, actively end the dialogue with the user. It is worth noting that in this case, even if the complaint probability output by the complaint prediction model is small, in order to ensure that complaints are avoided, the target measures corresponding to the target characteristics are implemented.

例如,若对话总时长的特征重要性最大,或者大于预设的重要性阈值,说明对话总时长是导致产生投诉的原因之一。例如在快递智能客服场景中,当对话总时长大于预设的时间阈值时,说明花费了较长的时间来解决用户提出的问题,从而导致用户进行投诉。在这种情况下,对话总时长为目标特征。当某一用户的用户特征与该目标特征匹配时,例如某一用户的对话总时长大于时间阈值时,则采取与对话总时长对应的目标措施。例如包括自动转接人工坐席为用户服务等等。For example, if the characteristic of the total duration of the conversation is the most important, or is greater than a preset importance threshold, it indicates that the total duration of the conversation is one of the reasons for the complaint. For example, in the smart customer service scenario of express delivery, when the total conversation time is longer than the preset time threshold, it means that it takes a long time to solve the problems raised by users, which leads to complaints from users. In this case, the total duration of the dialogue is the target feature. When the user characteristics of a certain user match the target characteristics, for example, when the total conversation duration of a certain user is greater than the time threshold, the target measure corresponding to the total conversation duration is taken. For example, it includes automatically transferring artificial agents to serve users and so on.

在本实施例中,通过从决策树层中获取每个特征的特征重要性来分析投诉产生的原因,在这种情况下,不管预测的投诉概率值如何,当用户特征与目标特征匹配时则采取相应的目标措施来避免投诉的产生,增加人机对话的智能性,避免投诉产生。In this embodiment, the cause of the complaint is analyzed by obtaining the feature importance of each feature from the decision tree layer. In this case, regardless of the predicted complaint probability value, when the user feature matches the target feature, then Take corresponding targeted measures to avoid complaints, increase the intelligence of man-machine dialogue, and avoid complaints.

在一些实施例中,上述方法还包括:In some embodiments, the above method also includes:

步骤150:若投诉概率大于预设概率阈值,执行预设的预警措施。Step 150: If the complaint probability is greater than the preset probability threshold, execute preset early warning measures.

在步骤130中,投诉预测模型输出在当前发言下用户的投诉概率后,可以进一步对比投诉概率与概率阈值的大小。若投诉概率大于预设概率阈值,说明用户投诉倾向性较高,由此可以执行预设的预警措施。In step 130, after the complaint prediction model outputs the complaint probability of the user under the current speech, the complaint probability may be further compared with the probability threshold. If the complaint probability is greater than the preset probability threshold, it indicates that the user has a high tendency to complain, and thus the preset early warning measures can be implemented.

例如,预警措施可以包括向人工坐席输出投诉预警信息,以提示人工坐席主动介入对话,为用户提供服务。又例如,预警措施可以包括主动询问用户是否需要人工坐席服务等等。For example, the early warning measures may include outputting complaint warning information to the artificial agent, so as to prompt the artificial agent to actively intervene in the dialogue and provide services for the user. For another example, the early warning measures may include proactively asking the user whether a human agent service is required, and the like.

在本实施例中,通过投诉概率来判断是否采取预警措施。在投诉概率较大的情况下,通过在产生投诉前采取预警措施来避免投诉的产生,从而增加人机对话的智能性。In this embodiment, it is judged whether to take early warning measures based on the complaint probability. In the case of a high probability of complaints, the occurrence of complaints can be avoided by taking early warning measures before complaints are generated, thereby increasing the intelligence of man-machine dialogue.

进一步地,为了提高预警准确度,在一些实施例中,上述方法还包括如图4所示的步骤:Further, in order to improve the accuracy of early warning, in some embodiments, the above method also includes the steps shown in Figure 4:

步骤161:获取所述当前发言的文本序列;Step 161: Obtain the text sequence of the current speech;

步骤162:对所述文本序列进行关键词匹配和/或情感分析的处理;Step 162: Perform keyword matching and/or sentiment analysis on the text sequence;

步骤163:若根据处理结果,确定在所述当前发言下所述用户表现投诉意向,执行所述预警措施。Step 163: If it is determined according to the processing result that the user shows an intention to complain under the current utterance, execute the early warning measures.

在人机对话中,可以获取用户当前发言的语音数据。通过ASR(Automatic SpeechRecognition,自动语音识别)技术可以将语音数据转换为文本,得到当前发言的文本序列。In the man-machine dialogue, the voice data of the user's current speech can be obtained. The voice data can be converted into text through the ASR (Automatic Speech Recognition, automatic speech recognition) technology, and the text sequence of the current speech can be obtained.

随后可以对文本序列进行关键词匹配和/或情感分析处理,根据处理结果判断是否执行预警措施。Then, keyword matching and/or sentiment analysis can be performed on the text sequence, and whether to implement early warning measures can be judged according to the processing results.

其中,在关键词匹配处理中,可以根据历史投诉数据收集产生投诉的关键词,比如表达不满、攻击的关键词,预先建立关键词库。随后将文本序列与关键词库进行关键词匹配,若匹配成功,则确定当前发言下用户表现投诉意向,执行上述任意预警措施。Among them, in the keyword matching process, keywords that generate complaints, such as keywords expressing dissatisfaction and attacks, can be collected according to historical complaint data, and a keyword library can be established in advance. Then match the text sequence with the keyword database. If the match is successful, it is determined that the user expresses the intention to complain under the current speech, and any of the above-mentioned early warning measures are executed.

在情感分析处理中,可以利用已训练的情感分析模型分析文本序列所携带的情感信息。例如情感信息可以包括积极情感、负面情感、无情感。可选地,情感分析模型可以包括但不限于深度学习模型,例如TextCNN(Convolutional Neural Networks,卷积神经网络)。若分析文本序列携带负面情感,则确定当前发言下用户表现投诉意向,执行上述任意预警措施。In sentiment analysis processing, a trained sentiment analysis model can be used to analyze the sentiment information carried in the text sequence. For example, sentiment information may include positive sentiment, negative sentiment, and no sentiment. Optionally, the sentiment analysis model may include but not limited to a deep learning model, such as TextCNN (Convolutional Neural Networks, Convolutional Neural Networks). If the analyzed text sequence carries negative emotions, it is determined that the user expresses the intention to complain under the current speech, and any of the above-mentioned early warning measures are implemented.

在本实施例中,通过关键词匹配和/或情感分析技术,进一步分析用户是否有表现投诉意向,并执行预警措施。In this embodiment, through keyword matching and/or sentiment analysis technology, it is further analyzed whether the user expresses a complaint intention, and early warning measures are implemented.

进一步地,在一些实施例中,投诉概率预测、关键词匹配、以及情感分析没有先后执行顺序,也可以同步执行。只要满足投诉概率大于概率阈值、关键词匹配成功、情感分析结果为负面情感中的一种或多种条件,即执行预警措施。Further, in some embodiments, the complaint probability prediction, keyword matching, and sentiment analysis are not executed sequentially, and may also be executed synchronously. As long as one or more of the conditions that the complaint probability is greater than the probability threshold, the keyword matching is successful, and the sentiment analysis result is negative, the early warning measures are implemented.

在另一些实施例中,关键词匹配和/或情感分析的处理可以在投诉概率预测之前进行。也即首先对用户的当前发言进行关键词匹配和/或情感分析,根据处理结果确定在当前发言下用户未表现投诉意向后,在预测在当前发言下用户的投诉概率。In some other embodiments, keyword matching and/or sentiment analysis may be performed before complaint probability prediction. That is, firstly, keyword matching and/or sentiment analysis are performed on the user's current utterance, and after determining that the user has no intention of complaining under the current utterance according to the processing results, the user's complaint probability under the current utterance is predicted.

示例性地,如图5所示,在人机对话中,获取用户当前发言的文本序列(步骤S1)。随后,利用预先建立的关键词库,对文本序列进行关键词匹配(步骤S2),并判断是否匹配成功(步骤S3)。若匹配成功,则执行预警措施(步骤S4);若未匹配成功,则对文本序列进行情感分析处理(步骤S5)。根据情感分析的处理结果,判断文本序列是否携带负面情感(步骤S6)。若是则执行预警措施(步骤S4);若否则获取用户的静态特征与动态特征,得到用户特征,并将用户特征输入投诉预测模型,获取当前发言的投诉概率(步骤S7)。随后,判断投诉概率是否大于预设的概率阈值。若是,执行预警措施(步骤S4);若否,获取用户的下一次发言作为当前发言,并返回执行步骤S1,直到结束人机对话。Exemplarily, as shown in FIG. 5 , in the man-machine dialogue, the text sequence of the user's current speech is obtained (step S1 ). Subsequently, use the pre-established keyword library to perform keyword matching on the text sequence (step S2), and judge whether the matching is successful (step S3). If the matching is successful, an early warning measure is executed (step S4); if the matching is not successful, sentiment analysis is performed on the text sequence (step S5). According to the processing result of sentiment analysis, it is judged whether the text sequence carries negative emotion (step S6). If so, execute early warning measures (step S4); otherwise, obtain the user's static and dynamic features to obtain user characteristics, and input the user characteristics into the complaint prediction model to obtain the complaint probability of the current speech (step S7). Subsequently, it is judged whether the complaint probability is greater than a preset probability threshold. If yes, execute early warning measures (step S4); if not, acquire the user's next utterance as the current utterance, and return to step S1 until the man-machine dialogue ends.

在本实施例中,在利用投诉预测模型进行投诉预测时,首先对当前发言的文本序列进行关键词匹配和/或情感分析的处理,只要关键词匹配成功或者情感分析结果为负面情感,即执行预警措施。相比于预测投诉概率,关键词匹配结果以及情感分析结果更能准确快速地反映用户的投诉意向,因此先进行关键词匹配和/或情感分析的处理能快速判断是否执行预警措施,避免投诉的产生。In this embodiment, when using the complaint prediction model for complaint prediction, first perform keyword matching and/or sentiment analysis processing on the text sequence of the current speech, as long as the keyword matching is successful or the sentiment analysis result is a negative emotion, that is, execute Early warning measures. Compared with predicting the probability of complaints, keyword matching results and sentiment analysis results can more accurately and quickly reflect users' complaint intentions. Therefore, performing keyword matching and/or sentiment analysis first can quickly determine whether to implement early warning measures and avoid complaints. produce.

基于上述任一实施例提供的一种投诉预测方法,本申请还提供了一种投诉预测装置,如图6所示,该装置600包括:Based on the complaint prediction method provided in any of the above embodiments, the present application also provides a complaint prediction device, as shown in FIG. 6 , the device 600 includes:

获取模块610,用于获取预设的用于表征用户的静态特征、以及用于表征所述用户当前发言的动态特征;An acquisition module 610, configured to acquire preset static features used to characterize the user and dynamic features used to characterize the user's current speech;

确定模块620,用于根据所述静态特征与所述动态特征确定用户特征;A determining module 620, configured to determine user characteristics according to the static characteristics and the dynamic characteristics;

预测模块630,用于将所述用户特征输入已训练的投诉预测模型,获取在所述当前发言下所述用户的投诉概率。The prediction module 630 is configured to input the user characteristics into the trained complaint prediction model, and obtain the complaint probability of the user under the current utterance.

在一些实施例中,所述静态特征包括以下一种或多种特征:用户年龄、性别、地理位置;In some embodiments, the static features include one or more of the following features: user age, gender, geographic location;

所述动态特征包括以下一种或多种特征:所述当前发言的意图、语速、对话总时长、对话间隔。The dynamic feature includes one or more of the following features: the intention of the current speech, the speech rate, the total duration of the dialogue, and the dialogue interval.

在一些实施例中,所述投诉预测模型包括决策树层与线性回归层;预测模块630具体用于:In some embodiments, the complaint prediction model includes a decision tree layer and a linear regression layer; the prediction module 630 is specifically used for:

将所述用户特征输入所述决策树层;inputting said user characteristics into said decision tree layer;

将所述决策树层的叶子节点所提取的特征输入所述线性回归层;The features extracted by the leaf nodes of the decision tree layer are input into the linear regression layer;

获取所述线性回归层输出的投诉概率。Obtain the complaint probability output by the linear regression layer.

在一些实施例中,预测模块630还用于:In some embodiments, prediction module 630 is also used to:

从所述决策树层中获取所述用户特征中的每个特征的特征重要性;Obtaining the feature importance of each feature in the user features from the decision tree layer;

针对特征重要性大于重要性阈值的目标特征,当所述用户的用户特征与所述目标特征匹配,采取所述目标特征对应的目标措施。For a target feature whose feature importance is greater than an importance threshold, when the user feature of the user matches the target feature, a target measure corresponding to the target feature is taken.

在一些实施例中,装置600还包括:In some embodiments, device 600 also includes:

预警模块,用于若所述投诉概率大于预设概率阈值,执行预设的预警措施。An early warning module, configured to execute preset early warning measures if the complaint probability is greater than a preset probability threshold.

在一些实施例中,装置600还包括处理模块,用于:In some embodiments, the device 600 also includes a processing module for:

获取所述当前发言的文本序列;Acquiring the text sequence of the current speech;

对所述文本序列进行关键词匹配和/或情感分析的处理;performing keyword matching and/or sentiment analysis processing on the text sequence;

若根据处理结果,确定在所述当前发言下所述用户表现投诉意向,执行所述预警措施。If it is determined according to the processing result that the user shows an intention to complain under the current speech, the early warning measures are executed.

在一些实施例中,在所述将所述用户特征输入已训练的投诉预测模型之前,执行所述关键词匹配和/或情感分析的处理;In some embodiments, before said inputting said user features into the trained complaint prediction model, performing said keyword matching and/or sentiment analysis processing;

若根据所述处理结果,确定在所述当前发言下所述用户未表现投诉意向,执行所述将所述用户特征输入已训练的投诉预测模型的步骤。If it is determined according to the processing result that the user has no complaint intention under the current utterance, the step of inputting the user characteristics into the trained complaint prediction model is performed.

上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each module in the above-mentioned device, please refer to the implementation process of the corresponding steps in the above-mentioned method for details, and details will not be repeated here.

基于上述任意实施例所述的一种投诉预测方法,本申请还提供了如图7所示的一种电子设备的结构示意图。如图7,在硬件层面,该电子设备包括处理器、内部总线、网络接口、内存以及非易失性存储器,当然还可能包括其他业务所需要的硬件。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,以实现上述任意实施例所述的一种投诉预测方法。Based on the complaint prediction method described in any of the above embodiments, the present application also provides a schematic structural diagram of an electronic device as shown in FIG. 7 . As shown in Figure 7, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required by other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, so as to realize a complaint prediction method described in any of the above embodiments.

本申请还提供了一种计算机存储介质,存储介质存储有计算机程序,计算机程序被处理器执行时可用于执行上述任意实施例所述的一种投诉预测方法。The present application also provides a computer storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, it can be used to implement a complaint prediction method described in any of the above embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functions and possible implementations of devices, methods and computer program products according to multiple embodiments of the present application. operate. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

以上所述仅为本申请的实施例而已,并不用于限制本申请的保护范围,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above descriptions are only examples of the present application, and are not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and changes may be made to the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the protection scope of this application. It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

Claims (10)

1. A complaint prediction method applied to a human-computer conversation scenario, the method comprising:
acquiring preset static characteristics used for representing a user and preset dynamic characteristics used for representing the current speech of the user;
determining user characteristics according to the static characteristics and the dynamic characteristics;
and inputting the user characteristics into the trained complaint prediction model, and acquiring the complaint probability of the user under the current speech.
2. The method of claim 1, wherein the static features comprise one or more of the following: user age, gender, geographic location;
the dynamic characteristics include one or more of the following: the current speaking intention, the speaking speed, the total conversation duration and the conversation interval.
3. The method of claim 1, wherein the complaint prediction model comprises a decision tree layer and a linear regression layer; the inputting the user characteristics into the trained complaint prediction model to obtain the complaint probability of the user under the current speech includes:
inputting the user features into the decision tree layer;
inputting the features extracted from the leaf nodes of the decision tree layer into the linear regression layer;
and obtaining the complaint probability output by the linear regression layer.
4. The method of claim 3, further comprising:
obtaining feature importance of each of the user features from the decision tree layer;
and aiming at the target features with feature importance larger than an importance threshold, when the user features of the user are matched with the target features, taking target measures corresponding to the target features.
5. The method of claim 1, further comprising:
and if the complaint probability is greater than a preset probability threshold, executing a preset early warning measure.
6. The method of claim 5, further comprising:
acquiring a text sequence of the current speech;
processing keyword matching and/or emotion analysis on the text sequence;
and if the user shows the complaint intention under the current speech according to the processing result, executing the early warning measure.
7. The method of claim 6, wherein said keyword matching and/or emotion analysis processing is performed prior to said inputting said user features into said trained complaint prediction model;
and if the user does not express the complaint intention under the current speech according to the processing result, executing the step of inputting the user characteristics into the trained complaint prediction model.
8. A complaint prediction apparatus, applied to a human-machine conversation scenario, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring preset static characteristics used for representing a user and preset dynamic characteristics used for representing the current speech of the user;
a determining module for determining a user characteristic according to the static characteristic and the dynamic characteristic;
and the prediction module is used for inputting the user characteristics into the trained complaint prediction model and acquiring the complaint probability of the user under the current speech.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor, when invoking the executable instructions, implements the operations of any of the methods of claims 1-7.
10. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method of any one of claims 1 to 7.
CN202211643794.4A 2022-12-20 2022-12-20 Complaint prediction method and device, electronic equipment and storage medium Pending CN115775052A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211643794.4A CN115775052A (en) 2022-12-20 2022-12-20 Complaint prediction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211643794.4A CN115775052A (en) 2022-12-20 2022-12-20 Complaint prediction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115775052A true CN115775052A (en) 2023-03-10

Family

ID=85392652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211643794.4A Pending CN115775052A (en) 2022-12-20 2022-12-20 Complaint prediction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115775052A (en)

Similar Documents

Publication Publication Date Title
CN111028827B (en) Interaction processing method, device, equipment and storage medium based on emotion recognition
CN110825879B (en) Decide a case result determination method, device, equipment and computer readable storage medium
CN109582793B (en) Model training method, customer service system and data labeling system, readable storage medium
CN111105782B (en) Session interaction processing method and device, computer equipment and storage medium
CN110689881B (en) Speech recognition method, speech recognition device, computer equipment and storage medium
CN105874530B (en) Predicting phrase recognition quality in an automatic speech recognition system
CN111212190B (en) Conversation management method, device and system based on conversation strategy management
US7966171B2 (en) System and method for increasing accuracy of searches based on communities of interest
JP5831951B2 (en) Dialog system, redundant message elimination method, and redundant message elimination program
WO2020181808A1 (en) Text punctuation prediction method and apparatus, and computer device and storage medium
US11580299B2 (en) Corpus cleaning method and corpus entry system
CN110942326A (en) User satisfaction prediction method and device and server
CN111260102A (en) User satisfaction prediction method and device, electronic equipment and storage medium
US11553085B2 (en) Method and apparatus for predicting customer satisfaction from a conversation
CN113297365B (en) User intention judging method, device, equipment and storage medium
CN111597818A (en) Call quality inspection method, call quality inspection device, computer equipment and computer readable storage medium
CN113111157B (en) Question-answer processing method, device, computer equipment and storage medium
US10068567B1 (en) System, method, and computer program for automatic management of intent classification
US11297183B2 (en) Method and apparatus for predicting customer behavior
CN118194880A (en) A method, device, storage medium and electronic device for recommending speech based on a large model
CN113158052A (en) Chat content recommendation method and device, computer equipment and storage medium
CN115775052A (en) Complaint prediction method and device, electronic equipment and storage medium
CN111970311B (en) Session segmentation method, electronic device and computer readable medium
CN114048283A (en) User portrait generation method and device, electronic equipment and storage medium
CN113094487A (en) Method and device for recommending dialect, electronic equipment and storage medium

Legal Events

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