WO2022142006A1 - Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium - Google Patents

Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022142006A1
WO2022142006A1 PCT/CN2021/090170 CN2021090170W WO2022142006A1 WO 2022142006 A1 WO2022142006 A1 WO 2022142006A1 CN 2021090170 W CN2021090170 W CN 2021090170W WO 2022142006 A1 WO2022142006 A1 WO 2022142006A1
Authority
WO
WIPO (PCT)
Prior art keywords
call
intent
model
recognition
training
Prior art date
Application number
PCT/CN2021/090170
Other languages
French (fr)
Chinese (zh)
Inventor
南海顺
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022142006A1 publication Critical patent/WO2022142006A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/374Thesaurus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

A semantic recognition-based verbal skill recommendation method and apparatus, a device, and a storage medium, relating to a natural language processing technology in the technical field of artificial intelligence. The method comprises: performing semantic recognition on training language materials; classifying the training language material to obtain positive samples and negative samples; randomly combining the positive samples and the negative samples to obtain a training sample set; training a preset initial intention recognition model by means of the training sample set to obtain a call intention model; importing the call content of a current call into the call intention model, and outputting a call intention; and finally importing the call intention into a pre-trained verbal skill recommendation model to obtain a target verbal skill matching the call intention. The present application further relates to blockchain technology, and the current call content can be stored in a blockchain. The customer intention is identified to obtain a valid tag, and the reply content corresponding to the valid tag is recommended, so that the user experience is improved.

Description

基于语义识别的话术推荐方法、装置、设备及存储介质Method, apparatus, device and storage medium for speech recommendation based on semantic recognition
本申请要求于2020年12月30日提交中国专利局、申请号为202011607652.3,发明名称为“基于语义识别的话术推荐方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 30, 2020 with the application number 202011607652.3 and the title of the invention is "Method, Apparatus, Equipment and Storage Medium for Speech Recommendation Based on Semantic Recognition", the entire contents of which are Incorporated herein by reference.
技术领域technical field
本申请属于人工智能技术领域,具体涉及一种基于语义识别的话术推荐方法、装置、设备及存储介质。The present application belongs to the technical field of artificial intelligence, and specifically relates to a method, apparatus, device and storage medium for speech recommendation based on semantic recognition.
背景技术Background technique
人工智能(AI)语言是一类适应于人工智能和知识工程领域的、具有符号处理和逻辑推理能力的计算机程序设计语言。能够用它来编写程序求解非数值计算、知识处理、推理、规划、决策等具有智能的各种复杂问题。人工智能(AI)语言是一类适应于人工智能和知识工程领域的、具有符号处理和逻辑推理能力的计算机程序设计语言。能够用它来编写程序求解非数值计算、知识处理、推理、规划、决策等具有智能的各种复杂问题,典型的人工智能语言主要有LISP、Prolog、Smalltalk、C++等。Artificial intelligence (AI) language is a kind of computer programming language with symbolic processing and logical reasoning capabilities suitable for artificial intelligence and knowledge engineering. It can be used to write programs to solve various complex problems with intelligence, such as non-numerical computing, knowledge processing, reasoning, planning, and decision-making. Artificial intelligence (AI) language is a kind of computer programming language with symbolic processing and logical reasoning capabilities suitable for artificial intelligence and knowledge engineering. It can be used to write programs to solve various complex problems with intelligence such as non-numerical computing, knowledge processing, reasoning, planning, decision-making, etc. The typical artificial intelligence languages mainly include LISP, Prolog, Smalltalk, C++, etc.
目前,对于人工智能(AI)语言应用最广泛的就是通话机器人了,而对于通话机器人来说,对话流程的设计是整个对话流程中的关键,一个好的对话流程可以让通话机器人在对话中从客户的回答中得到有效标签,使客户体验好,更能接近人工的表现。但是在对目前在业界的话术推荐方案研究的过程中,发明人意识到对于任务型对话,往往是用对话节点,根据固定的标签进行流转,对话流程的设计不够灵活,客户体验差。At present, the most widely used artificial intelligence (AI) language is the call robot, and for the call robot, the design of the dialogue process is the key to the entire dialogue process. A good dialogue process can make the call robot in the dialogue from The customer's answer is effectively labeled, so that the customer experience is better and closer to the manual performance. However, in the process of researching the current discourse recommendation scheme in the industry, the inventor realized that for task-based dialogue, dialogue nodes are often used to flow according to fixed labels, and the design of the dialogue process is not flexible enough, and the customer experience is poor.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的在于提出一种基于语义识别的话术推荐方法、装置、计算机设备及存储介质,以解决现有话术推荐方案采用固定的标签进行流转,对话流程的设计不够灵活,客户体验差的技术问题。The purpose of the embodiments of the present application is to propose a speech recommendation method, device, computer equipment and storage medium based on semantic recognition, so as to solve the problem that the existing speech recommendation scheme uses fixed tags for circulation, the design of the dialogue flow is not flexible enough, and the customer experience Bad technical issues.
为了解决上述技术问题,本申请实施例提供一种基于语义识别的话术推荐方法,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiments of the present application provide a method for recommending speech based on semantic recognition, which adopts the following technical solutions:
一种基于语义识别的话术推荐方法,包括:A word recommendation method based on semantic recognition, including:
从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Obtain the training corpus from the preset historical corpus, perform semantic recognition on the training corpus, and obtain the semantic recognition result of the training corpus, wherein the training corpus is the voice information generated during the communication between the user and the talking robot stored in the historical corpus;
基于语义识别结果对训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition results to obtain positive samples and negative samples;
对正样本和负样本进行随机组合,得到训练样本集和验证数据集;Randomly combine positive samples and negative samples to obtain training sample sets and validation data sets;
通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;The preset initial intent recognition model is trained through the training sample set, and the trained call intent model is verified through the verification data set, and the verified call intent model is obtained;
接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图;Import the call content of the current call into the verified call intent model, and output the call intent matching the current call content;
将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。Import the call intent into the pre-trained speech recommendation model, and get the target speech that matches the call intent.
进一步地,从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果的步骤,具体包括:Further, the steps of obtaining the training corpus from the preset historical corpus, and performing semantic recognition on the training corpus to obtain the semantic recognition result of the training corpus, specifically include:
从预设历史语料库中获取训练语料,并对训练语料进行预处理;Obtain the training corpus from the preset historical corpus, and preprocess the training corpus;
基于预设的词典库对预处理后的训练语料进行语义识别,得到训练语料的语义识别结果。Semantic recognition is performed on the preprocessed training corpus based on a preset dictionary library, and the semantic recognition result of the training corpus is obtained.
进一步地,对正样本和负样本进行随机组合,得到训练样本集和验证数据集的步骤,具体包括:Further, the steps of randomly combining positive samples and negative samples to obtain a training sample set and a verification data set include:
分别对正样本和负样本进行标注;Label the positive and negative samples respectively;
对标注后的正样本和负样本进行随机组合,得到训练样本集和验证数据集,并将训练样本集和验证数据集存储在预设历史语料库中。The labeled positive samples and negative samples are randomly combined to obtain a training sample set and a verification data set, and the training sample set and the verification data set are stored in a preset historical corpus.
进一步地,通过训练样本集对预设的初始意图识别模型进行训练的步骤,具体包括:Further, the steps of training the preset initial intent recognition model through the training sample set specifically include:
将训练样本集导入预设的初始意图识别模型,对训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;Import the training sample set into the preset initial intent recognition model, perform word segmentation processing on the training corpus in the training sample set, and perform vector feature conversion processing on the training corpus after word segmentation to obtain word vectors;
对词向量进行卷积运算,提取词向量对应的特征数据;Perform a convolution operation on the word vector to extract the feature data corresponding to the word vector;
计算特征数据与预设意图标签之间的相似度,并基于相似度计算结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity between the feature data and the preset intent label is calculated, and the initial intent recognition model is iteratively updated based on the similarity calculation result until the model is fitted, and the trained call intent model is output.
进一步地,计算特征数据与预设意图标签之间的相似度,并基于相似度计算结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型的步骤,具体包括:Further, the steps of calculating the similarity between the feature data and the preset intent label, and iteratively updating the initial intent recognition model based on the similarity calculation result until the model is fitted, and outputting the trained call intent model, specifically including:
计算特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为训练语料对应的意图识别结果;Calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;Based on the intent recognition result and the preset standard result, the back-propagation algorithm is used for fitting to obtain the recognition error;
将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;Compare the recognition error with the preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The call intent model with the recognition error less than or equal to the preset threshold is used as the trained call intent model, and the trained call intent model is output.
进一步地,在将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型的步骤之后,还包括:Further, after the step of outputting the trained call intent model by using the call intent model with the recognition error less than or equal to the preset threshold as the trained call intent model, the method further includes:
获取验证数据集中的验证样本,并将验证样本导入训练完成的通话意图模型,获取模型验证结果;Obtain the verification samples in the verification data set, import the verification samples into the trained call intent model, and obtain the model verification results;
将模型验证结果与验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。Compare the model verification results with the labels of the verification samples, and verify the trained call intent model according to the comparison results.
进一步地,将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术的步骤,具体包括:Further, the steps of importing the call intention into the pre-trained speech recommendation model to obtain the target speech matching the call intention include:
对通话意图进行标注,得到当前通话的意图标签;Label the call intent to get the intent label of the current call;
确定与当前通话具有关联关系的所有历史通话,并获取所有历史通话对应的意图标签;Determine all historical calls associated with the current call, and obtain the intent labels corresponding to all historical calls;
基于预设排序规则对当前通话的意图标签和所有历史通话对应的意图标签进行排序,得到意图标签序列;Sort the intent tags of the current call and the intent tags corresponding to all historical calls based on the preset sorting rules to obtain the intent tag sequence;
将意图标签序列导入到预先训练好的话术推荐模型,输出与意图标签序列相匹配的的目标话术。Import the intent label sequence into the pre-trained speech recommendation model, and output the target speech matching the intent label sequence.
为了解决上述技术问题,本申请实施例还提供一种基于语义识别的话术推荐装置,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiments of the present application also provide a device for recommending speech based on semantic recognition, which adopts the following technical solutions:
一种基于语义识别的话术推荐装置,包括:A word recommendation device based on semantic recognition, comprising:
语义识别模块,用于从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息;The semantic recognition module is used to obtain the training corpus from the preset historical corpus, perform semantic recognition on the training corpus, and obtain the semantic recognition result of the training corpus. generated voice information;
语料分类模块,用于基于语义识别结果对训练语料进行分类,得到正样本和负样本;The corpus classification module is used to classify the training corpus based on the semantic recognition results to obtain positive samples and negative samples;
样本组合模块,用于对正样本和负样本进行随机组合,得到训练样本集和验证数据集;The sample combination module is used to randomly combine positive samples and negative samples to obtain training sample sets and validation data sets;
模型训练模块,用于通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;The model training module is used to train the preset initial intent recognition model through the training sample set, and verify the trained call intent model through the verification data set, and obtain the verified call intent model;
指令接收模块,用于接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容;The instruction receiving module is used to receive the intention recognition instruction, and obtain the call content of the current call corresponding to the intention recognition instruction;
意图识别模块,用于将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图;The intent recognition module is used to import the call content of the current call into the verified call intent model, and output the call intent matching the current call content;
话术生成模块,用于将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。The speech generation module is used to import the call intention into the pre-trained speech recommendation model, and obtain the target speech that matches the call intention.
为了解决上述技术问题,本申请实施例还提供一种计算机设备,采用了如下所述的技术方案:In order to solve the above-mentioned technical problems, the embodiment of the present application also provides a computer device, which adopts the following technical solutions:
一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,处理器执行计算机可读指令时实现如下的基于语义识别的话术推荐方法:A computer device includes a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the following semantic recognition-based vocabulary recommendation method is implemented:
从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Obtain the training corpus from the preset historical corpus, perform semantic recognition on the training corpus, and obtain the semantic recognition result of the training corpus, wherein the training corpus is the voice information generated during the communication between the user and the talking robot stored in the historical corpus;
基于语义识别结果对训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition results to obtain positive samples and negative samples;
对正样本和负样本进行随机组合,得到训练样本集和验证数据集;Randomly combine positive samples and negative samples to obtain training sample sets and validation data sets;
通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;The preset initial intent recognition model is trained through the training sample set, and the trained call intent model is verified through the verification data set, and the verified call intent model is obtained;
接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图;Import the call content of the current call into the verified call intent model, and output the call intent matching the current call content;
将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。Import the call intent into the pre-trained speech recommendation model, and get the target speech that matches the call intent.
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,采用了如下所述的技术方案:In order to solve the above technical problems, the embodiments of the present application also provide a computer-readable storage medium, which adopts the following technical solutions:
一种计算机可读存储介质,计算机可读存储介质上存储有计算机可读指令,计算机可读指令被处理器执行时实现如下的基于语义识别的话术推荐方法:A computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the following speech recommendation method based on semantic recognition is implemented:
从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Obtain the training corpus from the preset historical corpus, perform semantic recognition on the training corpus, and obtain the semantic recognition result of the training corpus, wherein the training corpus is the voice information generated during the communication between the user and the talking robot stored in the historical corpus;
基于语义识别结果对训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition results to obtain positive samples and negative samples;
对正样本和负样本进行随机组合,得到训练样本集和验证数据集;Randomly combine positive samples and negative samples to obtain training sample sets and validation data sets;
通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;The preset initial intent recognition model is trained through the training sample set, and the trained call intent model is verified through the verification data set, and the verified call intent model is obtained;
接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图;Import the call content of the current call into the verified call intent model, and output the call intent matching the current call content;
将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。Import the call intent into the pre-trained speech recommendation model, and get the target speech that matches the call intent.
与现有技术相比,本申请实施例主要有以下有益效果:Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
本申请公开了一种基于语义识别的话术推荐方法、装置、设备及存储介质,属于人工智能技术领域,所述方法通过对训练语料进行语义识别,得到训练语料的语义识别结果, 通过语义识别来判断训练样本的属性,基于语义识别结果对训练语料进行分类,得到正样本和负样本,其中,正样本为有效通话,负样本为无效通话,通过正负样本组成的训练样本集,并训练一个通话意图模型,通话意图模型可以识别通话意图,最后将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。本申请能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。The present application discloses a method, device, equipment and storage medium for speech recommendation based on semantic recognition, which belong to the technical field of artificial intelligence. Determine the attributes of the training samples, classify the training corpus based on the semantic recognition results, and obtain positive samples and negative samples, where the positive samples are valid calls, and the negative samples are invalid calls. The training sample set composed of positive and negative samples is used to train a Call intention model, the call intention model can identify the call intention, and finally import the call intention into the pre-trained vocabulary recommendation model to obtain the target vocabulary that matches the call intention. The present application enables the call robot to identify the customer's intention to obtain a valid intent label, and recommends the reply content corresponding to the valid intention label, so that the reply content of the call robot can be closer to the performance of human customer service, and the user experience is improved.
附图说明Description of drawings
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the solutions in the present application more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments of the present application. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1示出了本申请可以应用于其中的示例性系统架构图;FIG. 1 shows an exemplary system architecture diagram to which the present application can be applied;
图2示出了根据本申请的基于语义识别的话术推荐方法的一个实施例的流程图;FIG. 2 shows a flow chart of an embodiment of a speech recommendation method based on semantic recognition according to the present application;
图3示出了根据本申请的基于语义识别的话术推荐装置的一个实施例的结构示意图;FIG. 3 shows a schematic structural diagram of an embodiment of a speech recommendation device based on semantic recognition according to the present application;
图4示出了根据本申请的计算机设备的一个实施例的结构示意图。FIG. 4 shows a schematic structural diagram of an embodiment of a computer device according to the present application.
具体实施方式Detailed ways
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of this application; the terms used herein in the specification of the application are for the purpose of describing specific embodiments only It is not intended to limit the application; the terms "comprising" and "having" and any variations thereof in the description and claims of this application and the above description of the drawings are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the description and claims of the present application or the above drawings are used to distinguish different objects, rather than to describe a specific order.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , and 103 , a network 104 and a server 105 . The network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 . The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and the like. Various communication client applications may be installed on the terminal devices 101 , 102 and 103 , such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, and the like.
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。The terminal devices 101, 102, and 103 can be various electronic devices that have a display screen and support web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) Players, Laptops and Desktops, etc.
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的页面提供支持的后台服务器。The server 105 may be a server that provides various services, such as a background server that provides support for the pages displayed on the terminal devices 101 , 102 , and 103 .
需要说明的是,本申请实施例所提供的基于语义识别的话术推荐方法一般由服务器执行,相应地,基于语义识别的话术推荐装置一般设置于服务器中。It should be noted that the method for recommending terms based on semantic recognition provided by the embodiments of the present application is generally executed by a server, and accordingly, a device for recommending terms based on semantic recognition is generally set in the server.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
继续参考图2,示出了根据本申请的基于语义识别的话术推荐的方法的一个实施例的流程图。所述的基于语义识别的话术推荐方法,包括以下步骤:Continuing to refer to FIG. 2 , a flowchart of one embodiment of a method for speech recommendation based on semantic recognition according to the present application is shown. The speech recommendation method based on semantic recognition includes the following steps:
S201,从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息。S201, acquiring training corpus from a preset historical corpus, and performing semantic recognition on the training corpus to obtain a semantic recognition result of the training corpus, wherein the training corpus is the voice information stored in the historical corpus during the communication between the user and the talking robot. .
具体的,从预设历史语料库中获取训练语料,并通过预先构建的词典库对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息。Specifically, the training corpus is obtained from a preset historical corpus, and semantic recognition is performed on the training corpus through a pre-built dictionary base to obtain a semantic recognition result of the training corpus, wherein the training corpus is the user and the calling robot stored in the historical corpus. Voice messages generated during communication.
S202,基于语义识别结果对训练语料进行分类,得到正样本和负样本。S202: Classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples.
具体的,基于语义识别结果对训练语料进行分类,得到正样本和负样本。其中,在本申请具体的实施例中,正样本为有效通话,负样本为无效通话。例如,在产品推荐场景中,一个训练语料的内容如下:Specifically, the training corpus is classified based on the semantic recognition results to obtain positive samples and negative samples. Among them, in the specific embodiment of the present application, positive samples are valid calls, and negative samples are invalid calls. For example, in a product recommendation scenario, the content of a training corpus is as follows:
“-通话机器人:请问您对于这个产品有什么看法呢?"-Talking Robot: What do you think about this product?
-用户:我觉得不错!”-User: I think it's good! "
针对于上述训练语料进行语义识别后,得到用户对于通话机器人提到的产品是存在一定的兴趣的,且从语义识别结果中可以看出用户对本次通过满意度较高,在本申请中,将满意度较高的训练语料作为正样本,即有效通话,为上述训练语料标注上正样本标签。又如,另一个训练语料的内容如下:After performing semantic recognition on the above training corpus, it is found that the user has a certain interest in the products mentioned by the talking robot, and it can be seen from the semantic recognition results that the user has a high degree of satisfaction with this pass. In this application, The training corpus with high satisfaction is used as a positive sample, that is, an effective call, and the positive sample label is marked for the above training corpus. For another example, the content of another training corpus is as follows:
“-通话机器人:请问您对于这个产品有什么看法呢?"-Talking Robot: What do you think about this product?
-用户:对不起,我没兴趣!别再给我推荐了。”-User: Sorry, I'm not interested! Stop recommending me. "
针对于上述训练语料进行语义识别后,得到用户对于通话机器人提到的产品是不感兴趣的,且从语义识别结果中可以看出用户对本次通过满意度很低。在本申请中,将满意度低的训练语料作为负样本,即无效通话,为上述训练语料标注上负样本标签。After performing semantic recognition on the above training corpus, it is found that the user is not interested in the products mentioned by the talking robot, and it can be seen from the semantic recognition results that the user's satisfaction with this pass is very low. In this application, the training corpus with low satisfaction is regarded as a negative sample, that is, an invalid call, and the above-mentioned training corpus is marked with a negative sample label.
在本申请中,基于语义识别结果对所有训练语料进行分类,将所有训练语料分为正样本和负样本,通过正、负样本随机组成的训练样本集用于训练通话意图模型,该通话意图模型识可以识别输入的通话内容对应的通话意图。例如,针对产品推荐场景,可以从通话内容中识别出用户对推荐的产品是否有购买意愿。In this application, all training corpora are classified based on the semantic recognition results, and all training corpora are divided into positive samples and negative samples, and a training sample set randomly composed of positive and negative samples is used to train a call intent model. The call intent model It can identify the call intent corresponding to the input call content. For example, for a product recommendation scenario, whether the user is willing to purchase the recommended product can be identified from the content of the call.
S203,对正样本和负样本进行随机组合,得到训练样本集和验证数据集。S203, randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set.
具体的,可以将正样本和负样本进行随机组合,得到语料样本集,对语料样本集进行随机分组,得到训练样本集和验证数据集。训练样本集用于初始意图识别模型的模型训练,验证数据集用于对训练好的通话意图模型进行验证。Specifically, positive samples and negative samples can be randomly combined to obtain a corpus sample set, and the corpus sample set can be randomly grouped to obtain a training sample set and a verification data set. The training sample set is used for model training of the initial intent recognition model, and the validation dataset is used to verify the trained call intent model.
S204,通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型。S204 , train the preset initial intent recognition model by using the training sample set, and verify the trained call intent model by using the verification data set, and obtain the verified call intent model.
其中,预设的初始意图识别模型可以采用CNN深度卷积神经网络模型,卷积神经网络(Convolutional Neural Networks,CNN)是一类包含卷积计算且具有深度结构的前馈神经网络(Feedforward Neural Networks),是深度学习(deep learning)的代表算法之一。卷积神经网络具有表征学习(representation learning)能力,能够按其阶层结构对输入信息进行平移不变分类(shift-invariant classification),因此也被称为“平移不变人工神经网络”。卷积神经网络仿造生物的视知觉(visual perception)机制构建,可以进行监督学习和非监督学习,其卷积层内的卷积核参数共享和层间连接的稀疏性使得卷积神经网络能够以较小的计算量对格点化(grid-like topology)特征,例如像素和音频进行学习,有稳定的效果且对数据没有额外的特征工程要求。Among them, the preset initial intent recognition model can use the CNN deep convolutional neural network model, and the convolutional neural network (Convolutional Neural Networks, CNN) is a kind of feedforward neural network (Feedforward Neural Networks) that includes convolution calculation and has a deep structure. ), which is one of the representative algorithms of deep learning. Convolutional neural network has the ability of representation learning and can perform shift-invariant classification of input information according to its hierarchical structure, so it is also called "shift-invariant artificial neural network". Convolutional neural network is constructed by imitating the visual perception mechanism of biology, which can perform supervised learning and unsupervised learning. Small computational effort to learn grid-like topology features, such as pixels and audio, with stable results and no additional feature engineering requirements on the data.
具体的,得到训练样本集和验证数据集后,利用得到训练样本集中的训练样本对预设的初始意图识别模型进行训练,得到通话意图模型。在通话意图模型完成训练后,通过验证数据集对训练完成的通话意图模型进行验证,得到验证通过的通话意图模型。通话意图模型用于在通话机器人和用户的通话过程中识别用户的意图,如业务办理场景中,识别用户的办理业务的意愿。Specifically, after the training sample set and the verification data set are obtained, the training samples in the obtained training sample set are used to train the preset initial intention recognition model to obtain the call intention model. After the training of the call intent model is completed, the trained call intent model is verified through the verification data set, and the verified call intent model is obtained. The call intent model is used to identify the user's intent during the call between the calling robot and the user, for example, in a business handling scenario, to identify the user's willingness to handle business.
S205,接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容。S205: Receive the intent identification instruction, and acquire the call content of the current call corresponding to the intent identification instruction.
具体的,当存在意图识别需求时,接收意图识别指令,实时获取与意图识别指令对应的当前通话的通话录音,并对当前通话的通话录音进行音转文处理,得到当前通话的通话文本,对当前通话的通话文本进行预处理,得到当前通话的通话内容,其中,预处理包括纠错、去重、去除标点符号等等。Specifically, when there is an intention recognition requirement, the intention recognition instruction is received, the call recording of the current call corresponding to the intention recognition instruction is acquired in real time, and the audio-to-text processing is performed on the call recording of the current call to obtain the call text of the current call. The call text of the current call is preprocessed to obtain the call content of the current call, wherein the preprocessing includes error correction, deduplication, punctuation removal, and the like.
在本实施例中,基于语义识别的话术推荐方法运行于其上的电子设备(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式接收意图识别指令。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。In this embodiment, the electronic device (eg, the server shown in FIG. 1 ) on which the semantic recognition-based vocabulary recommendation method runs may receive the intent recognition instruction through a wired connection or a wireless connection. It should be pointed out that the above wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
S206,将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图。S206, import the call content of the current call into the verified call intent model, and output a call intent matching the current call content.
具体的,当用户拨打电话与通话机器人进行语音交流时,通话机器人实时将通话内容送入通话意图模型中进行用户意图识别,通过分析通话内容,获取通话意图识别结果。Specifically, when the user makes a call to communicate with the call robot, the call robot sends the call content into the call intent model in real time to identify the user's intent, and obtains the call intent recognition result by analyzing the call content.
S207,将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。S207, import the call intention into the pre-trained speech recommendation model, and obtain a target speech matching the call intention.
其中,话术推荐模型可以是一个针对意图标签序列进行识别并输出与意图标签序列相匹配的话术生成模型。在推荐话术时,可以将用户的历史通话的通话意图和相应人工坐席或者通话机器人的回复话术一起作为序列输入话术推荐模型,让话术生成能综合考虑到历史通话的通话意图。在本身具体的实施例中,话术推荐模型可以是RNN模型或者LSTM模型等等。The speech recommendation model may be a speech generation model that recognizes the intent label sequence and outputs a speech matching the intent label sequence. When recommending words, the call intention of the user's historical calls and the reply words of the corresponding human agents or call robots can be input into the speech recommendation model together as a sequence, so that the words can generate call intentions that can comprehensively consider the historical calls. In its own specific embodiment, the speech recommendation model may be an RNN model or an LSTM model or the like.
具体的,在训练话术推荐模型时,可以将客户多次来电的通话意图和人工坐席的回复话术做标注,对标注后该用户的多次来电的通话意图按照通话时间进行排序组成的意图标签序列,将意图标签序列与对应的人工坐席的回复话术进行映射,组合意图标签序列与映射成功的人工坐席的回复话术形成话术推荐模型的训练样本,将训练样本输入到初始话术推荐模型,得到训练好的话术推荐模型。使用时,将通话意图导入到预先训练好的话术推荐模型,获取得到与通话意图相匹配的目标话术。Specifically, when training the speech recommendation model, the call intention of the customer's multiple calls and the reply speech of the artificial agent can be marked, and the call intention of the user's multiple calls after the labeling can be sorted according to the call time. Label sequence, map the intent label sequence with the corresponding artificial agent's reply speech, combine the intent label sequence and the successfully mapped artificial agent's reply speech to form the training sample of the speech recommendation model, and input the training sample into the initial speech Recommendation model, get the trained vocabulary recommendation model. When in use, import the call intent into the pre-trained speech recommendation model, and obtain the target speech that matches the call intent.
目前,对于通话机器人来说,对话流程的设计是整个对话流程中的关键,一个好的对话流程可以让通话机器人在对话中从客户的回答中得到有效信息,并根据有效信息进行回复,使客户体验感更好。但是目前在业界中,对于任务型对话,通话机器人往往是使用对话节点,根据固定的标签进行流转,对话流程的设计不够灵活,客户体验差。At present, for the call robot, the design of the dialogue process is the key to the entire dialogue process. A good dialogue process can allow the call robot to obtain effective information from the customer's answer in the dialogue, and respond according to the effective information, so that the customer can The experience is better. However, in the current industry, for task-based conversations, call bots often use conversation nodes to circulate according to fixed labels. The design of the conversation process is not flexible enough, and the customer experience is poor.
基于上述技术问题,本申请公开了一种基于语义识别的话术推荐方法,属于人工智能技术领域,所述方法通过对训练语料进行语义识别,得到训练语料的语义识别结果,通过语义识别来判断训练样本的属性,基于语义识别结果对训练语料进行分类,得到正样本和负样本,其中,正样本为有效通话,负样本为无效通话,通过正负样本组成的训练样本集,并训练一个通话意图模型,通话意图模型可以识别通话意图,最后将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。本申请能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。Based on the above technical problems, the present application discloses a method for recommending vocabulary based on semantic recognition, which belongs to the technical field of artificial intelligence. The method obtains the semantic recognition result of the training corpus by performing semantic recognition on the training corpus, and judges the training through the semantic recognition. The attributes of the samples, classify the training corpus based on the semantic recognition results, and obtain positive samples and negative samples, where the positive samples are valid calls, and the negative samples are invalid calls. The training sample set composed of positive and negative samples is used to train a call intent. The call intention model can identify the call intention, and finally import the call intention into the pre-trained vocabulary recommendation model to obtain the target vocabulary that matches the call intention. The present application enables the call robot to identify the customer's intention to obtain a valid intent label, and recommends the reply content corresponding to the valid intention label, so that the reply content of the call robot can be closer to the performance of human customer service, and the user experience is improved.
进一步地,从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果的步骤,具体包括:Further, the steps of obtaining the training corpus from the preset historical corpus, and performing semantic recognition on the training corpus to obtain the semantic recognition result of the training corpus, specifically include:
从预设历史语料库中获取训练语料,并对训练语料进行预处理;Obtain the training corpus from the preset historical corpus, and preprocess the training corpus;
基于预设的词典库对预处理后的训练语料进行语义识别,得到训练语料的语义识别结果。Semantic recognition is performed on the preprocessed training corpus based on a preset dictionary library, and the semantic recognition result of the training corpus is obtained.
具体的,从预设历史语料库中获取训练语料,并对训练语料进行预处理,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息。基于预设的词典库对预处理后的训练语料进行语义识别,得到训练语料的语义识别结果。Specifically, the training corpus is obtained from a preset historical corpus, and the training corpus is preprocessed, wherein the training corpus is the voice information stored in the historical corpus during the communication between the user and the calling robot. Semantic recognition is performed on the preprocessed training corpus based on a preset dictionary library, and the semantic recognition result of the training corpus is obtained.
在上述实施例中,本申请通过预先建立一个词典库,该词典库中包含训练语料库的所有词语,每个词语对应一个唯一识别编号,利用one-hot文本表示,通过文本映射的方式获得训练语料的语义识别结果。In the above embodiment, the present application pre-establishes a dictionary base, which contains all the words in the training corpus, each word corresponds to a unique identification number, and uses one-hot text representation to obtain the training corpus through text mapping. semantic recognition results.
进一步地,对正样本和负样本进行随机组合,得到训练样本集和验证数据集的步骤,具体包括:Further, the steps of randomly combining positive samples and negative samples to obtain a training sample set and a verification data set include:
分别对正样本和负样本进行标注;Label the positive and negative samples respectively;
对标注后的正样本和负样本进行随机组合,得到训练样本集和验证数据集,并将训练样本集和验证数据集存储在预设历史语料库中。The labeled positive samples and negative samples are randomly combined to obtain a training sample set and a verification data set, and the training sample set and the verification data set are stored in a preset historical corpus.
具体的,分别对正样本和负样本进行标注,将标注后的正样本和负样本进行随机组合,得到语料样本集。如将语料样本集中的训练语料随机分为10等份的样本子集,其中,随机组合9样本子集作为训练样本集,将剩余的样本子集作为验证数据集。将训练样本集导入到初始意图识别模型中进行模型训练,得到训练好的通话意图模型,通过验证数据集对训练好的通话意图模型进行验证,输出验证通过的通话意图模型。在上述实施例,通过构建训练样本集和验证数据集,并分别通过训练样本集和验证数据集对初始识别模型进行训练和验证,可以快速获得用户意图识别模型。Specifically, the positive samples and negative samples are marked respectively, and the marked positive samples and negative samples are randomly combined to obtain a corpus sample set. For example, the training corpus in the corpus sample set is randomly divided into 10 equal sample subsets, wherein 9 sample subsets are randomly combined as the training sample set, and the remaining sample subsets are used as the validation data set. Import the training sample set into the initial intent recognition model for model training to obtain a trained call intent model, verify the trained call intent model through the verification data set, and output the verified call intent model. In the above embodiment, by constructing a training sample set and a verification data set, and respectively training and verifying the initial recognition model through the training sample set and the verification data set, the user intent recognition model can be quickly obtained.
进一步地,通过训练样本集对预设的初始意图识别模型进行训练的步骤,具体包括:Further, the steps of training the preset initial intent recognition model through the training sample set specifically include:
将训练样本集导入预设的初始意图识别模型,对训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;Import the training sample set into the preset initial intent recognition model, perform word segmentation processing on the training corpus in the training sample set, and perform vector feature conversion processing on the training corpus after word segmentation to obtain word vectors;
对词向量进行卷积运算,提取词向量对应的特征数据;Perform a convolution operation on the word vector to extract the feature data corresponding to the word vector;
计算特征数据与预设意图标签之间的相似度,并基于相似度计算结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity between the feature data and the preset intent label is calculated, and the initial intent recognition model is iteratively updated based on the similarity calculation result until the model is fitted, and the trained call intent model is output.
具体的,预设的初始意图识别模型包括输入层、卷积层和输出层。将训练样本集导入CNN模型后,首先在CNN的输入层对训练样本集的训练语料进行分词处理和向量特征转换处理,得到训练语料中每一个分词对应的词向量,然后将训练语料中每一个分词对应的词向量分别输入到CNN的卷积层进行特征提取,获得每一个分词的特征数据,最后在CNN的输出层计算特征数据与预设意图标签之间的相似度,并输出相似度最大的识别结果作为训练语料对应的意图识别结果,基于似度最大的识别结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。Specifically, the preset initial intent recognition model includes an input layer, a convolution layer and an output layer. After the training sample set is imported into the CNN model, firstly, the training corpus of the training sample set is subjected to word segmentation and vector feature conversion processing at the input layer of the CNN to obtain the word vector corresponding to each word segmentation in the training corpus, and then each word vector in the training corpus is obtained. The word vector corresponding to the word segmentation is input to the convolution layer of CNN for feature extraction, and the feature data of each word segmentation is obtained. Finally, the similarity between the feature data and the preset intent label is calculated in the output layer of CNN, and the maximum similarity is output. The recognition result of 1 is taken as the intent recognition result corresponding to the training corpus, and the initial intent recognition model is iteratively updated based on the recognition result with the largest similarity until the model is fitted, and the trained call intent model is output.
在本申请具体的实施例中,识别结果通过softmax函数输出,以实现意图分类。在构建初始识别模型时,设置相应的损失函数,其中,损失函数为交叉熵损失函数,在通话意图模型训练时,通过训练的通话意图模型进行迭代更新,得到拟合的通话意图模型。其中,通话意图模型的建立及训练均可以在Python中的tensorflow库完成。In a specific embodiment of the present application, the recognition result is output through a softmax function to implement intent classification. When building the initial recognition model, set the corresponding loss function, where the loss function is the cross-entropy loss function. During the training of the call intent model, the trained call intent model is iteratively updated to obtain the fitted call intent model. Among them, the establishment and training of the call intent model can be completed in the tensorflow library in Python.
进一步地,计算特征数据与预设意图标签之间的相似度,并基于相似度计算结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型的步骤,具体包括:Further, the steps of calculating the similarity between the feature data and the preset intent label, and iteratively updating the initial intent recognition model based on the similarity calculation result until the model is fitted, and outputting the trained call intent model, specifically including:
计算特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为训练语料对应的意图识别结果;Calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;Based on the intent recognition result and the preset standard result, the back-propagation algorithm is used for fitting to obtain the recognition error;
将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;Compare the recognition error with the preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The call intent model with the recognition error less than or equal to the preset threshold is used as the trained call intent model, and the trained call intent model is output.
其中,反向传播算法,即误差反向传播算法(Backpropagation algorithm,BP算法)适合于多层神经元网络的一种学习算法,它建立在梯度下降法的基础上,用于深度学习网络的误差计算。BP网络的输入、输出关系实质上是一种映射关系:一个n输入m输出的BP神经网络所完成的功能是从n维欧氏空间向m维欧氏空间中一有限域的连续映射,这一映射具有高度非线性。BP算法的学习过程由正向传播过程和反向传播过程组成。在正向传播过程中,输入信息通过输入层经隐含层,逐层处理并传向输出层,并转入反向传播,逐层求出目标函数对各神经元权值的偏导数,构成目标函数对权值向量的梯量,以作为修改权值的依据。Among them, the backpropagation algorithm, that is, the error backpropagation algorithm (Backpropagation algorithm, BP algorithm) is a learning algorithm suitable for multi-layer neuron networks. It is based on the gradient descent method and is used for the error of deep learning networks. calculate. The input and output relationship of BP network is essentially a mapping relationship: the function completed by a BP neural network with n input and m output is a continuous mapping from n-dimensional Euclidean space to a finite field in m-dimensional Euclidean space. A map is highly nonlinear. The learning process of BP algorithm consists of forward propagation process and back propagation process. In the process of forward propagation, the input information is processed layer by layer through the hidden layer through the input layer and transmitted to the output layer, and then transferred to the back propagation, and the partial derivative of the objective function to the weight of each neuron is obtained layer by layer, which constitutes The gradient of the objective function to the weight vector is used as the basis for modifying the weight.
具体的,从预设的数据库中获取训练样本集,将训练样本集导入到初始识别模型进行模型训练,输出训练语料对应的意图识别结果,基于意图识别结果与预设标准结果,使用反向传播算法进行拟合计算,获取识别误差,将识别误差与预设误差阈值进行比较,若识别误差大于预设误差阈值,则基于通话意图模型的损失函数对训练完成的通话意图模型进行迭代更新,直到识别误差小于或等于预设误差阈值为止,获取验证通过的通话意图模型。其中,预设标准结果和预设误差阈值可以提前设定。在上述实施例中,通过反向传播算法对训练完成的通话意图模型进行迭代,得到输出拟合的通话意图模型。Specifically, the training sample set is obtained from a preset database, the training sample set is imported into the initial recognition model for model training, the intent recognition result corresponding to the training corpus is output, and back propagation is used based on the intent recognition result and the preset standard result. The algorithm performs fitting calculation, obtains the recognition error, and compares the recognition error with the preset error threshold. If the recognition error is greater than the preset error threshold, the trained call intent model is iteratively updated based on the loss function of the call intent model, until Until the recognition error is less than or equal to the preset error threshold, the verified call intent model is obtained. The preset standard result and the preset error threshold may be set in advance. In the above-mentioned embodiment, the trained call intent model is iterated through the back-propagation algorithm to obtain the output fitted call intent model.
进一步地,在将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型的步骤之后,还包括:Further, after the step of outputting the trained call intent model by using the call intent model with the recognition error less than or equal to the preset threshold as the trained call intent model, the method further includes:
获取验证数据集中的验证样本,并将验证样本导入训练完成的通话意图模型,获取模型验证结果;Obtain the verification samples in the verification data set, import the verification samples into the trained call intent model, and obtain the model verification results;
将模型验证结果与验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。Compare the model verification results with the labels of the verification samples, and verify the trained call intent model according to the comparison results.
具体的,在通话意图模型完成迭代后,从预设历史语料库的验证数据集中获取验证样本,并将验证样本导入训练完成的通话意图模型,获取模型验证结果,将模型验证结果与验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证,如果模型验证结果与验证样本的标签相互匹配,则通话意图模型的性能符合需求,否则,需要重新对正样本和负样本重新进行组合,形成新的训练样本集,并通过新的训练样本集对初始意图识别模型进行训练。Specifically, after the iteration of the call intent model is completed, a verification sample is obtained from the verification data set of the preset historical corpus, and the verification sample is imported into the trained call intent model, the model verification result is obtained, and the model verification result is compared with the label of the verification sample. Compare and verify the trained call intent model according to the comparison result. If the model verification result matches the label of the verification sample, the performance of the call intent model meets the requirements. Otherwise, it is necessary to re-run the positive and negative samples Combine to form a new training sample set, and train the initial intent recognition model through the new training sample set.
进一步地,将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术的步骤,具体包括:Further, the steps of importing the call intention into the pre-trained speech recommendation model to obtain the target speech matching the call intention include:
对通话意图进行标注,得到当前通话的意图标签;Label the call intent to get the intent label of the current call;
确定与当前通话具有关联关系的所有历史通话,并获取所有历史通话对应的意图标签;Determine all historical calls associated with the current call, and obtain the intent labels corresponding to all historical calls;
基于预设排序规则对当前通话的意图标签和所有历史通话对应的意图标签进行排序,得到意图标签序列;Sort the intent tags of the current call and the intent tags corresponding to all historical calls based on the preset sorting rules to obtain the intent tag sequence;
将意图标签序列导入到预先训练好的话术推荐模型,输出与意图标签序列相匹配的的目标话术。Import the intent label sequence into the pre-trained speech recommendation model, and output the target speech matching the intent label sequence.
具体的,基于通话时间对当前通话的意图标签和所有历史通话对应的意图标签进行排序,得到意图标签序列。例如,在贷款催收场景中,用户5次通话的意图标签序列为“接受还款、无法还款、接受还款、接受还款、无法还款”,按照预设编码规则对上述意图标签序列中的意图标签进行编码,如将“接收还款”编码为“1”,将“无法还款”编码为“0”,则上述意图标签序列编码后可以表示为“10110”,将意图标签序列的编码结果“10110”导入到预先训练好的话术推荐模型,输出与意图标签序列的编码结果“10110”相匹配的的目标话术。通过将用户的历史通话的通话意图和当前通话的通话意图组合形成意图标签序列作为序列输入话术推荐模型,让本次对话推荐时能考虑到历史通话的通话意图。Specifically, the intent tags of the current call and the intent tags corresponding to all historical calls are sorted based on the call time to obtain the intent tag sequence. For example, in the loan collection scenario, the intent label sequence of the user's five calls is "accept repayment, unable to repay, accept repayment, accept repayment, unable to repay", according to the preset coding rules, the above intent label sequence For example, "receive repayment" is encoded as "1", and "unable to repay" is encoded as "0", the above-mentioned intent tag sequence can be expressed as "10110" after encoding. The encoding result "10110" is imported into the pre-trained vocabulary recommendation model, and the target vocabulary matching the encoding result "10110" of the intent label sequence is output. By combining the call intention of the user's historical calls and the call intention of the current call to form an intention label sequence as the sequence input speech recommendation model, the call intention of the historical call can be taken into account when recommending this dialogue.
在本申请具体的实施例中,例如,当在催收客户还款时,客户当前通话表现为不配合还款的场景,并且客户在历史通话中未曾出现过类似情况时,根据客服的不同回答的可能会有不同的效果:In the specific embodiment of the present application, for example, when the customer is being charged for repayment, the customer's current call is shown as a scene of uncooperative repayment, and the customer has never had a similar situation in the historical calls, according to the different answers of the customer service. May have different effects:
(1)基于当前通话的通话意图推荐与当前通话的通话意图相符合的回复话术:客户无意愿还款,推荐与无意愿还款相关的固定话术,如:(1) Based on the call intention of the current call, recommend a reply technique that is consistent with the call intention of the current call: if the customer is not willing to repay, recommend a fixed technique related to the unwilling repayment, such as:
“-用户:我最近没钱,没法还。"- User: I have no money recently and can't pay it back.
-通话机器人:您抓紧时间想想办法,否则会影响您的征信。”-Calling robot: you should hurry up and think of a way, otherwise it will affect your credit report. "
(2)基于意图标签序列推荐与意图标签序列相符合的回复话术:客户当前无意愿还款,但用户历史还款意愿高,信用较好,推荐与意图标签序列相匹配的组合话术,如:(2) Recommending reply phrases that match the intent tag sequence based on the intent tag sequence: The customer is currently unwilling to repay, but the user has a high historical repayment willingness and good credit, and recommends a combination phrase that matches the intent tag sequence, like:
“-用户:我最近没钱,没法还。"- User: I have no money recently and can't pay it back.
-通话机器人:我知道您之前还款的情况,您的信用一直很好。- Talking bot: I know about your previous repayments and your credit has been good.
-通话机器人:您最近是否遇到了一些困难?- Talking Bot: Have you had some difficulties recently?
-通话机器人:您是否需要申请延期还款?- Talking Bot: Do you need to apply for a deferment of repayment?
-通话机器人:不要因为还款逾期影响您一直保持的良好信用呀!-Calling robot: Don't affect your good credit due to overdue repayment!
……” …”
在上述实施例中,通过将用户的历史通话的通话意图和当前通话的通话意图组合形成意图标签序列作为序列输入话术推荐模型,让本次对话推荐时能考虑到历史通话的通话意图,能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。In the above embodiment, by combining the call intention of the user's historical calls and the call intention of the current call to form an intention label sequence as the sequence input speech recommendation model, the call intention of the historical call can be taken into account when recommending this dialogue, and it is possible to Let the call robot identify the customer's intention to obtain the effective intent label, and recommend the reply content corresponding to the effective intent label, so that the reply content of the call robot can be closer to the performance of human customer service, and improve the user experience.
需要强调的是,为进一步保证上述当前通话内容的私密和安全性,上述当前通话内容还可以存储于一区块链的节点中。It should be emphasized that, in order to further ensure the privacy and security of the above-mentioned current call content, the above-mentioned current call content may also be stored in a node of a blockchain.
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. , when the computer-readable instructions are executed, the processes of the above-mentioned method embodiments may be included. Wherein, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of the accompanying drawings are sequentially shown in the order indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order and may be performed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution sequence is also It does not have to be performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of sub-steps or stages of other steps.
进一步参考图3,作为对上述图2所示方法的实现,本申请提供了一种基于语义识别的话术推荐装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 3 , as an implementation of the method shown in FIG. 2 above, the present application provides an embodiment of a speech recommendation device based on semantic recognition, and the device embodiment corresponds to the method embodiment shown in FIG. 2 , Specifically, the device can be applied to various electronic devices.
如图3所示,本实施例所述的基于语义识别的话术推荐装置包括:As shown in FIG. 3 , the apparatus for recommending words based on semantic recognition described in this embodiment includes:
语义识别模块301,用于从预设历史语料库中获取训练语料,并对训练语料进行语义识别,得到训练语料的语义识别结果,其中,训练语料为存储在历史语料库中的用户与通话机器人沟通过程中产生的语音信息;The semantic recognition module 301 is used for acquiring training corpus from a preset historical corpus, and performing semantic recognition on the training corpus to obtain a semantic recognition result of the training corpus, wherein the training corpus is the communication process between the user and the calling robot stored in the historical corpus voice information generated in the
语料分类模块302,用于基于语义识别结果对训练语料进行分类,得到正样本和负样本;The corpus classification module 302 is used to classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples;
样本组合模块303,用于对正样本和负样本进行随机组合,得到训练样本集和验证数据集;The sample combination module 303 is used to randomly combine positive samples and negative samples to obtain a training sample set and a verification data set;
模型训练模块304,用于通过训练样本集对预设的初始意图识别模型进行训练,并通过验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;The model training module 304 is configured to train the preset initial intent recognition model through the training sample set, and verify the trained call intent model through the verification data set, and obtain the verified call intent model;
指令接收模块305,用于接收意图识别指令,获取与意图识别指令对应的当前通话的通话内容;an instruction receiving module 305, configured to receive an intent identification instruction, and obtain the call content of the current call corresponding to the intent identification instruction;
意图识别模块306,用于将当前通话的通话内容导入验证通过的通话意图模型,输出与当前通话内容相匹配的通话意图; Intent recognition module 306, for importing the call content of the current call into the verified call intention model, and outputting the call intention matching the current call content;
话术生成模块307,用于将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。The speech generation module 307 is used for importing the call intention into the pre-trained speech recommendation model to obtain the target speech matching the call intention.
进一步地,语义识别模块301具体包括:Further, the semantic recognition module 301 specifically includes:
语料预处理单元,用于从预设历史语料库中获取训练语料,并对训练语料进行预处理;The corpus preprocessing unit is used to obtain the training corpus from the preset historical corpus and preprocess the training corpus;
语义识别单元,用于基于预设的词典库对预处理后的训练语料进行语义识别,得到训练语料的语义识别结果。The semantic recognition unit is used to perform semantic recognition on the preprocessed training corpus based on a preset dictionary library, and obtain the semantic recognition result of the training corpus.
进一步地,样本组合模块303具体包括:Further, the sample combination module 303 specifically includes:
样本标注单元,用于分别对正样本和负样本进行标注;The sample labeling unit is used to label positive samples and negative samples respectively;
样本组合单元,用于对标注后的正样本和负样本进行随机组合,得到训练样本集和验证数据集,并将训练样本集和验证数据集存储在预设历史语料库中。The sample combination unit is used to randomly combine the labeled positive samples and negative samples to obtain a training sample set and a verification data set, and store the training sample set and the verification data set in a preset historical corpus.
进一步地,模型训练模块304具体包括:Further, the model training module 304 specifically includes:
特征转换单元,用于将训练样本集导入预设的初始意图识别模型,对训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;The feature conversion unit is used to import the training sample set into the preset initial intention recognition model, perform word segmentation processing on the training corpus in the training sample set, and perform vector feature transformation processing on the training corpus after word segmentation to obtain word vectors;
卷积运算单元,用于对词向量进行卷积运算,提取词向量对应的特征数据;The convolution operation unit is used to perform the convolution operation on the word vector to extract the feature data corresponding to the word vector;
相似度计算单元,用于计算特征数据与预设意图标签之间的相似度,并基于相似度计算结果对初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity calculation unit is used to calculate the similarity between the feature data and the preset intent label, and based on the similarity calculation result, iteratively updates the initial intent recognition model until the model is fitted, and outputs the trained call intent model.
进一步地,相似度计算单元具体包括:Further, the similarity calculation unit specifically includes:
相似度计算子单元,用于计算特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为训练语料对应的意图识别结果;The similarity calculation subunit is used to calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
拟合子单元,用于基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;The fitting subunit is used to perform fitting based on the intent recognition result and the preset standard result using the back-propagation algorithm to obtain the recognition error;
迭代子单元,用于将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;an iterative subunit, configured to compare the recognition error with a preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
模型输出子单元,用于将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The model output subunit is used for taking the call intent model with the recognition error less than or equal to the preset threshold as the trained call intent model, and outputting the trained call intent model.
进一步地,模型训练模块304还包括:Further, the model training module 304 also includes:
模型验证子单元,用于获取验证数据集中的验证样本,并将验证样本导入训练完成的通话意图模型,获取模型验证结果;The model verification subunit is used to obtain the verification samples in the verification data set, and import the verification samples into the trained call intent model to obtain the model verification results;
验证比对子单元,用于将模型验证结果与验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。The verification and comparison subunit is used to compare the model verification result with the label of the verification sample, and verify the trained call intent model according to the comparison result.
进一步地,话术生成模块307具体包括:Further, the speech generation module 307 specifically includes:
意图标注单元,用于对通话意图进行标注,得到当前通话的意图标签;The intent labeling unit is used to label the call intent and obtain the intent label of the current call;
关联单元,用于确定与当前通话具有关联关系的所有历史通话,并获取所有历史通话对应的意图标签;an association unit, used to determine all historical calls that are associated with the current call, and obtain intent labels corresponding to all historical calls;
排序单元,用于基于预设排序规则对当前通话的意图标签和所有历史通话对应的意图标签进行排序,得到意图标签序列;a sorting unit, configured to sort the intent tags of the current call and the intent tags corresponding to all historical calls based on a preset sorting rule, to obtain an intent tag sequence;
话术生成单元,用于将意图标签序列导入到预先训练好的话术推荐模型,输出与意图标签序列相匹配的的目标话术。The speech generation unit is used to import the intent label sequence into the pre-trained speech recommendation model, and output the target speech matching the intent label sequence.
本申请公开了一种基于语义识别的话术推荐装置,属于人工智能技术领域,本申请通过对训练语料进行语义识别,得到训练语料的语义识别结果,通过语义识别来判断训练样本的属性,基于语义识别结果对训练语料进行分类,得到正样本和负样本,其中,正样本为有效通话,负样本为无效通话,通过正负样本组成的训练样本集,并训练一个通话意图模型,通话意图模型可以识别通话意图,最后将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。本申请能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。The present application discloses a vocabulary recommendation device based on semantic recognition, which belongs to the technical field of artificial intelligence. The present application obtains the semantic recognition result of the training corpus by performing semantic recognition on the training corpus, and judges the attributes of the training samples through the semantic recognition. The recognition results classify the training corpus to obtain positive samples and negative samples. The positive samples are valid calls, and the negative samples are invalid calls. Through the training sample set composed of positive and negative samples, a call intent model is trained. The call intent model can Identify the call intention, and finally import the call intention into the pre-trained vocabulary recommendation model to obtain the target vocabulary matching the call intention. The present application enables the call robot to identify the customer's intention to obtain a valid intent label, and recommends the reply content corresponding to the valid intention label, so that the reply content of the call robot can be closer to the performance of human customer service, and the user experience is improved.
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图4,图4为本实施例计算机设备基本结构框图。To solve the above technical problems, the embodiments of the present application also provide computer equipment. Please refer to FIG. 4 for details. FIG. 4 is a block diagram of a basic structure of a computer device according to this embodiment.
所述计算机设备4包括通过系统总线相互通信连接存储器41、处理器42、网络接口43。需要指出的是,图中仅示出了具有组件41-43的计算机设备4,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that communicate with each other through a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure, but it should be understood that it is not required to implement all of the shown components, and more or less components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, special-purpose Integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。The computer equipment may be a desktop computer, a notebook computer, a palmtop computer, a cloud server and other computing equipment. The computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touch pad or a voice control device.
所述存储器41至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器41可以是所述计算机设备4的内部存储单元,例如该计算机设备4的硬盘或内存。在另一些实施例中,所述存储器41也可以是所述计算机设备4的外部存储设备,例如该计算机设备4上配备的插接式硬盘,智能存储卡(Smart MediaCard,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器41还可以既包括所述计算机设备4的内部存储单元也包括其外部存储设备。本实施例中,所述存储器41通常用于存储安装于所述计算机设备4的操作系统和各类应用软件,例如基于语义识别的话术推荐方法的计算机可读指令等。此外,所述存储器41还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), Magnetic Memory, Magnetic Disk, Optical Disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4 , such as a hard disk or a memory of the computer device 4 . In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital ( Secure Digital, SD) card, flash memory card (Flash Card), etc. Of course, the memory 41 may also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4 , such as computer-readable instructions for a method of speech recommendation based on semantic recognition. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
所述处理器42在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器42通常用于控制所述计算机设备4的总体操作。本实施例中,所述处理器42用于运行所述存储器41中存储的计算机可读指令或者处理数据,例如运行所述基于语义识别的话术推荐方法的计算机可读指令。The processor 42 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. This processor 42 is typically used to control the overall operation of the computer device 4 . In this embodiment, the processor 42 is configured to execute computer-readable instructions stored in the memory 41 or process data, for example, computer-readable instructions for executing the semantic recognition-based term recommendation method.
所述网络接口43可包括无线网络接口或有线网络接口,该网络接口43通常用于在所述计算机设备4与其他电子设备之间建立通信连接。The network interface 43 may include a wireless network interface or a wired network interface, and the network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
本申请公开了一种设备,属于人工智能技术领域,通过对训练语料进行语义识别,得到训练语料的语义识别结果,本申请通过语义识别来判断训练样本的属性,基于语义识别结果对训练语料进行分类,得到正样本和负样本,其中,正样本为有效通话,负样本为无效通话,通过正负样本组成的训练样本集,并训练一个通话意图模型,通话意图模型可以识别通话意图,最后将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。本申请能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。The present application discloses a device belonging to the technical field of artificial intelligence. The semantic recognition result of the training corpus is obtained by performing semantic recognition on the training corpus. The present application judges the attributes of the training samples through the semantic recognition, and performs the training corpus based on the semantic recognition result. Classify, get positive samples and negative samples, where positive samples are valid calls, and negative samples are invalid calls. Through the training sample set composed of positive and negative samples, a call intent model is trained. The call intent model can identify the call intent, and finally the The call intention is imported into the pre-trained vocabulary recommendation model, and the target vocabulary matching the call intention is obtained. The present application enables the call robot to identify the customer's intention to obtain a valid intent label, and recommends the reply content corresponding to the valid intention label, so that the reply content of the call robot can be closer to the performance of human customer service, and the user experience is improved.
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如上述的基于语义识别的话术推荐方法的步骤。The present application also provides another implementation manner, that is, to provide a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and the computer-readable storage medium stores Computer readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the semantic recognition-based vocabulary recommendation method as described above.
本申请公开了一种存储介质,属于人工智能技术领域,本申请通过对训练语料进行语义识别,得到训练语料的语义识别结果,通过语义识别来判断训练样本的属性,基于语义识别结果对训练语料进行分类,得到正样本和负样本,其中,正样本为有效通话,负样本为无效通话,通过正负样本组成的训练样本集,并训练一个通话意图模型,通话意图模型可以识别通话意图,最后将通话意图导入到预先训练好的话术推荐模型,得到与通话意图相匹配的目标话术。本申请能够让通话机器人识别客户意图以获得有效意图标签,并推荐与有效意图标签相对应的答复内容,使通话机器人的答复内容更能接近人工客服的表现,提高用户体验。The present application discloses a storage medium, which belongs to the technical field of artificial intelligence. The present application obtains the semantic recognition result of the training corpus by performing semantic recognition on the training corpus, judges the attributes of the training sample through the semantic recognition, and analyzes the training corpus based on the semantic recognition result. Classify to get positive samples and negative samples, where the positive samples are valid calls and the negative samples are invalid calls. Through the training sample set composed of positive and negative samples, a call intent model is trained. The call intent model can identify the call intent, and finally Import the call intent into the pre-trained speech recommendation model, and get the target speech that matches the call intent. The present application enables the call robot to identify the customer's intention to obtain a valid intent label, and recommends the reply content corresponding to the valid intention label, so that the reply content of the call robot can be closer to the performance of human customer service, and the user experience is improved.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The accompanying drawings show the preferred embodiments of the present application, but do not limit the scope of the patent of the present application. This application may be embodied in many different forms, rather these embodiments are provided so that a thorough and complete understanding of the disclosure of this application is provided. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. . Any equivalent structure made by using the contents of the description and drawings of the present application, which is directly or indirectly used in other related technical fields, is also within the scope of protection of the patent of the present application.

Claims (20)

  1. 一种基于语义识别的话术推荐方法,包括:A speech recommendation method based on semantic recognition, including:
    从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果,其中,所述训练语料为存储在所述历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Acquire training corpus from a preset historical corpus, perform semantic recognition on the training corpus, and obtain a semantic recognition result of the training corpus, wherein the training corpus is the communication between the user and the calling robot stored in the historical corpus Voice information generated during the process;
    基于所述语义识别结果对所述训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples;
    对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集;Randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set;
    通过所述训练样本集对预设的初始意图识别模型进行训练,并通过所述验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;Train a preset initial intent recognition model by using the training sample set, and verify the trained call intent model by using the verification data set, and obtain a verified call intent model;
    接收意图识别指令,获取与所述意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
    将所述当前通话的通话内容导入验证通过的所述通话意图模型,输出与当前通话内容相匹配的通话意图;importing the call content of the current call into the verified call intent model, and outputting a call intent matching the current call content;
    将所述通话意图导入到预先训练好的话术推荐模型,得到与所述通话意图相匹配的目标话术。The call intention is imported into a pre-trained speech recommendation model, and a target speech matching the call intention is obtained.
  2. 如权利要求1所述的基于语义识别的话术推荐方法,其中,所述从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果的步骤,具体包括:The speech recommendation method based on semantic recognition according to claim 1, wherein the step of acquiring training corpus from a preset historical corpus, performing semantic recognition on the training corpus, and obtaining a semantic recognition result of the training corpus , including:
    从预设历史语料库中获取训练语料,并对所述训练语料进行预处理;Obtain training corpus from a preset historical corpus, and preprocess the training corpus;
    基于预设的词典库对预处理后的所述训练语料进行语义识别,得到所述训练语料的语义识别结果。Perform semantic recognition on the preprocessed training corpus based on a preset dictionary library to obtain a semantic recognition result of the training corpus.
  3. 如权利要求1所述的基于语义识别的话术推荐方法,其中,所述对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集的步骤,具体包括:The speech recommendation method based on semantic recognition according to claim 1, wherein the step of randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set specifically includes:
    分别对所述正样本和所述负样本进行标注;label the positive samples and the negative samples respectively;
    对标注后的所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集,并将所述训练样本集和所述验证数据集存储在所述预设历史语料库中。The labeled positive samples and the negative samples are randomly combined to obtain a training sample set and a verification data set, and the training sample set and the verification data set are stored in the preset historical corpus.
  4. 如权利要求1所述的基于语义识别的话术推荐方法,其中,所述通过所述训练样本集对预设的初始意图识别模型进行训练的步骤,具体包括:The speech recommendation method based on semantic recognition according to claim 1, wherein the step of training a preset initial intent recognition model by using the training sample set specifically includes:
    将所述训练样本集导入预设的初始意图识别模型,对所述训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;Importing the training sample set into a preset initial intent recognition model, performing word segmentation processing on the training corpus in the training sample set, and performing vector feature conversion processing on the training corpus after word segmentation to obtain word vectors;
    对所述词向量进行卷积运算,提取所述词向量对应的特征数据;Perform a convolution operation on the word vector to extract feature data corresponding to the word vector;
    计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity between the feature data and the preset intent label is calculated, and the initial intent recognition model is iteratively updated based on the similarity calculation result until the model is fitted, and the trained call intent model is output.
  5. 如权利要求4所述的基于语义识别的话术推荐方法,其中,所述计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型的步骤,具体包括:The speech recommendation method based on semantic recognition according to claim 4, wherein the calculation of the similarity between the feature data and the preset intention label, and the iteration of the initial intention recognition model based on the similarity calculation result The steps of updating until the model is fitted and outputting the trained call intent model include:
    计算所述特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为所述训练语料对应的意图识别结果;Calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
    基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;Based on the intent recognition result and the preset standard result, the back-propagation algorithm is used for fitting to obtain the recognition error;
    将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;Compare the recognition error with the preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
    将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The call intent model with the recognition error less than or equal to the preset threshold is used as the trained call intent model, and the trained call intent model is output.
  6. 如权利要求5所述的基于语义识别的话术推荐方法,其中,在所述将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型的步骤之后,还包括:The speech recommendation method based on semantic recognition according to claim 5, wherein, in the step of outputting the trained calling intent model by using the calling intent model with the recognition error less than or equal to a preset threshold as the trained calling intent model After that, also include:
    获取所述验证数据集中的验证样本,并将所述验证样本导入训练完成的通话意图模型,获取模型验证结果;Obtaining the verification samples in the verification data set, and importing the verification samples into the trained call intent model, to obtain the model verification result;
    将所述模型验证结果与所述验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。The model verification result is compared with the label of the verification sample, and the trained call intent model is verified according to the comparison result.
  7. 如权利要求1至6任意一项所述的基于语义识别的话术推荐方法,其中,所述将所述通话意图导入到预先训练好的话术推荐模型,得到与所述通话意图相匹配的目标话术的步骤,具体包括:The speech recommendation method based on semantic recognition according to any one of claims 1 to 6, wherein the calling intention is imported into a pre-trained speech recommendation model to obtain a target speech matching the calling intention The steps of the technique include:
    对所述通话意图进行标注,得到所述当前通话的意图标签;Labeling the call intention to obtain the intention label of the current call;
    确定与所述当前通话具有关联关系的所有历史通话,并获取所述所有历史通话对应的意图标签;Determine all historical calls that are associated with the current call, and acquire intent labels corresponding to all historical calls;
    基于预设排序规则对所述当前通话的意图标签和所述所有历史通话对应的意图标签进行排序,得到意图标签序列;Sorting the intent tags of the current call and the intent tags corresponding to all historical calls based on a preset sorting rule, to obtain an intent tag sequence;
    将所述意图标签序列导入到所述预先训练好的话术推荐模型,输出与意图标签序列相匹配的的目标话术。The intent label sequence is imported into the pre-trained speech recommendation model, and the target speech matching the intent label sequence is output.
  8. 一种基于语义识别的话术推荐装置,包括:A word recommendation device based on semantic recognition, comprising:
    语义识别模块,用于从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果,其中,所述训练语料为存储在所述历史语料库中的用户与通话机器人沟通过程中产生的语音信息;A semantic recognition module, used for acquiring training corpus from a preset historical corpus, and performing semantic recognition on the training corpus to obtain a semantic recognition result of the training corpus, wherein the training corpus is stored in the historical corpus The voice information generated during the communication between the user and the call robot;
    语料分类模块,用于基于所述语义识别结果对所述训练语料进行分类,得到正样本和负样本;A corpus classification module, configured to classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples;
    样本组合模块,用于对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集;a sample combination module for randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set;
    模型训练模块,用于通过所述训练样本集对预设的初始意图识别模型进行训练,并通过所述验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;A model training module, configured to train a preset initial intent recognition model through the training sample set, and verify the trained call intent model through the verification data set, and obtain a verified call intent model;
    指令接收模块,用于接收意图识别指令,获取与所述意图识别指令对应的当前通话的通话内容;an instruction receiving module, configured to receive an intent identification instruction, and obtain the call content of the current call corresponding to the intent identification instruction;
    意图识别模块,用于将所述当前通话的通话内容导入验证通过的所述通话意图模型,输出与当前通话内容相匹配的通话意图;an intention identification module, used for importing the call content of the current call into the call intention model that has passed the verification, and outputting a call intention matching the current call content;
    话术生成模块,用于将所述通话意图导入到预先训练好的话术推荐模型,得到与所述通话意图相匹配的目标话术。The speech generation module is used for importing the call intention into a pre-trained speech recommendation model to obtain a target speech matching the call intention.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的基于语义识别的话术推荐方法:A computer device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the processor implements the following method for recommending vocabulary based on semantic recognition:
    从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果,其中,所述训练语料为存储在所述历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Acquire training corpus from a preset historical corpus, perform semantic recognition on the training corpus, and obtain a semantic recognition result of the training corpus, wherein the training corpus is the communication between the user and the calling robot stored in the historical corpus Voice information generated during the process;
    基于所述语义识别结果对所述训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples;
    对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集;Randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set;
    通过所述训练样本集对预设的初始意图识别模型进行训练,并通过所述验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;Train a preset initial intent recognition model by using the training sample set, and verify the trained call intent model by using the verification data set, and obtain a verified call intent model;
    接收意图识别指令,获取与所述意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
    将所述当前通话的通话内容导入验证通过的所述通话意图模型,输出与当前通话内容相匹配的通话意图;importing the call content of the current call into the verified call intent model, and outputting a call intent matching the current call content;
    将所述通话意图导入到预先训练好的话术推荐模型,得到与所述通话意图相匹配的目标话术。The call intention is imported into a pre-trained speech recommendation model, and a target speech matching the call intention is obtained.
  10. 如权利要求9所述的计算机设备,其中,所述从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果的步骤,具体包括:The computer device according to claim 9, wherein the step of acquiring training corpus from a preset historical corpus, and performing semantic recognition on the training corpus to obtain a semantic recognition result of the training corpus, specifically includes:
    从预设历史语料库中获取训练语料,并对所述训练语料进行预处理;Obtain training corpus from a preset historical corpus, and preprocess the training corpus;
    基于预设的词典库对预处理后的所述训练语料进行语义识别,得到所述训练语料的语义识别结果。Perform semantic recognition on the preprocessed training corpus based on a preset dictionary library to obtain a semantic recognition result of the training corpus.
  11. 如权利要求9所述的计算机设备,其中,所述对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集的步骤,具体包括:The computer device according to claim 9, wherein the step of randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set specifically includes:
    分别对所述正样本和所述负样本进行标注;Label the positive samples and the negative samples respectively;
    对标注后的所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集,并将所述训练样本集和所述验证数据集存储在所述预设历史语料库中。The labeled positive samples and the negative samples are randomly combined to obtain a training sample set and a verification data set, and the training sample set and the verification data set are stored in the preset historical corpus.
  12. 如权利要求9所述的计算机设备,其中,所述通过所述训练样本集对预设的初始意图识别模型进行训练的步骤,具体包括:The computer device according to claim 9, wherein the step of training a preset initial intent recognition model by using the training sample set specifically includes:
    将所述训练样本集导入预设的初始意图识别模型,对所述训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;Importing the training sample set into a preset initial intention recognition model, performing word segmentation processing on the training corpus in the training sample set, and performing vector feature conversion processing on the training corpus after word segmentation to obtain a word vector;
    对所述词向量进行卷积运算,提取所述词向量对应的特征数据;Perform a convolution operation on the word vector to extract feature data corresponding to the word vector;
    计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity between the feature data and the preset intent label is calculated, and the initial intent recognition model is iteratively updated based on the similarity calculation result until the model is fitted, and the trained call intent model is output.
  13. 如权利要求12所述的计算机设备,其中,所述计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型的步骤,具体包括:The computer device according to claim 12, wherein the calculation of the similarity between the feature data and the preset intent label, and based on the similarity calculation result, the initial intent recognition model is iteratively updated until the model fits Combined, the steps of outputting the trained call intent model include:
    计算所述特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为所述训练语料对应的意图识别结果;Calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
    基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;Based on the intent recognition result and the preset standard result, the back-propagation algorithm is used for fitting to obtain the recognition error;
    将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;Compare the recognition error with the preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
    将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The call intent model with the recognition error less than or equal to the preset threshold is used as the trained call intent model, and the trained call intent model is output.
  14. 如权利要求13所述的计算机设备,其中,在所述将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型的步骤之后,还包括:The computer device according to claim 13, wherein, after the step of outputting the trained call intent model by using the call intent model whose identification error is less than or equal to a preset threshold as the trained call intent model, the method further comprises:
    获取所述验证数据集中的验证样本,并将所述验证样本导入训练完成的通话意图模型,获取模型验证结果;Obtaining the verification samples in the verification data set, and importing the verification samples into the trained call intent model, to obtain the model verification result;
    将所述模型验证结果与所述验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。The model verification result is compared with the label of the verification sample, and the trained call intent model is verified according to the comparison result.
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的基于语义识别的话术推荐方法:A computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, implement the following method for recommending vocabulary based on semantic recognition:
    从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果,其中,所述训练语料为存储在所述历史语料库中的用户与通话机器人沟通过程中产生的语音信息;Acquire training corpus from a preset historical corpus, perform semantic recognition on the training corpus, and obtain a semantic recognition result of the training corpus, wherein the training corpus is the communication between the user and the calling robot stored in the historical corpus Voice information generated during the process;
    基于所述语义识别结果对所述训练语料进行分类,得到正样本和负样本;Classify the training corpus based on the semantic recognition result to obtain positive samples and negative samples;
    对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集;Randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set;
    通过所述训练样本集对预设的初始意图识别模型进行训练,并通过所述验证数据集对完成训练的通话意图模型进行验证,获取验证通过的通话意图模型;Train a preset initial intent recognition model by using the training sample set, and verify the trained call intent model by using the verification data set, and obtain a verified call intent model;
    接收意图识别指令,获取与所述意图识别指令对应的当前通话的通话内容;Receive the intent recognition instruction, and obtain the call content of the current call corresponding to the intent recognition instruction;
    将所述当前通话的通话内容导入验证通过的所述通话意图模型,输出与当前通话内容相匹配的通话意图;Import the call content of the current call into the call intention model that has passed the verification, and output the call intention matching the current call content;
    将所述通话意图导入到预先训练好的话术推荐模型,得到与所述通话意图相匹配的目标话术。The call intention is imported into a pre-trained speech recommendation model, and a target speech matching the call intention is obtained.
  16. 如权利要求15所述的计算机可读存储介质,其中,所述从预设历史语料库中获取训练语料,并对所述训练语料进行语义识别,得到所述训练语料的语义识别结果的步骤,具体包括:The computer-readable storage medium according to claim 15, wherein the step of acquiring training corpus from a preset historical corpus and performing semantic recognition on the training corpus to obtain a semantic recognition result of the training corpus, specifically include:
    从预设历史语料库中获取训练语料,并对所述训练语料进行预处理;Obtain training corpus from a preset historical corpus, and preprocess the training corpus;
    基于预设的词典库对预处理后的所述训练语料进行语义识别,得到所述训练语料的语义识别结果。Perform semantic recognition on the preprocessed training corpus based on a preset dictionary library to obtain a semantic recognition result of the training corpus.
  17. 如权利要求15所述的计算机可读存储介质,其中,所述对所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集的步骤,具体包括:The computer-readable storage medium according to claim 15, wherein the step of randomly combining the positive samples and the negative samples to obtain a training sample set and a verification data set specifically includes:
    分别对所述正样本和所述负样本进行标注;Label the positive samples and the negative samples respectively;
    对标注后的所述正样本和所述负样本进行随机组合,得到训练样本集和验证数据集,并将所述训练样本集和所述验证数据集存储在所述预设历史语料库中。The labeled positive samples and the negative samples are randomly combined to obtain a training sample set and a verification data set, and the training sample set and the verification data set are stored in the preset historical corpus.
  18. 如权利要求15所述的计算机可读存储介质,其中,所述通过所述训练样本集对预设的初始意图识别模型进行训练的步骤,具体包括:The computer-readable storage medium according to claim 15, wherein the step of training a preset initial intent recognition model by using the training sample set specifically includes:
    将所述训练样本集导入预设的初始意图识别模型,对所述训练样本集中的训练语料进行分词处理,并对分词后的训练语料进行向量特征转换处理,得到词向量;Importing the training sample set into a preset initial intention recognition model, performing word segmentation processing on the training corpus in the training sample set, and performing vector feature conversion processing on the training corpus after word segmentation to obtain a word vector;
    对所述词向量进行卷积运算,提取所述词向量对应的特征数据;Perform a convolution operation on the word vector to extract feature data corresponding to the word vector;
    计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型。The similarity between the feature data and the preset intent label is calculated, and the initial intent recognition model is iteratively updated based on the similarity calculation result until the model is fitted, and the trained call intent model is output.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述计算所述特征数据与预设意图标签之间的相似度,并基于相似度计算结果对所述初始意图识别模型进行迭代更新,直至模型拟合,输出训练完成的通话意图模型的步骤,具体包括:The computer-readable storage medium of claim 18, wherein the calculating the similarity between the feature data and the preset intent label, and iteratively updating the initial intent recognition model based on the similarity calculation result, Until the model is fitted, the steps of outputting the trained call intent model include:
    计算所述特征数据与预设意图标签之间的相似度,输出相似度最大的识别结果作为所述训练语料对应的意图识别结果;Calculate the similarity between the feature data and the preset intent label, and output the recognition result with the largest similarity as the intent recognition result corresponding to the training corpus;
    基于意图识别结果与预设标准结果,使用反向传播算法进行拟合,获取识别误差;Based on the intent recognition result and the preset standard result, the back-propagation algorithm is used for fitting to obtain the recognition error;
    将识别误差与预设阈值进行比较,若识别误差大于预设阈值,则对通话意图模型进行迭代更新,直到识别误差小于或等于预设阈值为止;Compare the recognition error with the preset threshold, and if the recognition error is greater than the preset threshold, iteratively update the call intent model until the recognition error is less than or equal to the preset threshold;
    将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型。The call intent model with the recognition error less than or equal to the preset threshold is used as the trained call intent model, and the trained call intent model is output.
  20. 如权利要求19所述的计算机可读存储介质,其中,在所述将识别误差小于或等于预设阈值的通话意图模型作为训练完成的通话意图模型,输出训练完成的通话意图模型的步骤之后,还包括:The computer-readable storage medium according to claim 19, wherein, after the step of outputting the trained call intent model by using the call intent model with the recognition error less than or equal to a preset threshold as the trained call intent model, Also includes:
    获取所述验证数据集中的验证样本,并将所述验证样本导入训练完成的通话意图模型,获取模型验证结果;Obtaining the verification samples in the verification data set, and importing the verification samples into the trained call intent model, to obtain the model verification result;
    将所述模型验证结果与所述验证样本的标签进行比对,根据比对结果对训练完成的通话意图模型进行验证。The model verification result is compared with the label of the verification sample, and the trained call intent model is verified according to the comparison result.
PCT/CN2021/090170 2020-12-30 2021-04-27 Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium WO2022142006A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011607652.3 2020-12-30
CN202011607652.3A CN112732911B (en) 2020-12-30 2020-12-30 Semantic recognition-based speaking recommendation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022142006A1 true WO2022142006A1 (en) 2022-07-07

Family

ID=75610111

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090170 WO2022142006A1 (en) 2020-12-30 2021-04-27 Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112732911B (en)
WO (1) WO2022142006A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129878A (en) * 2022-08-31 2022-09-30 支付宝(杭州)信息技术有限公司 Conversation service execution method, device, storage medium and electronic equipment
CN115810345A (en) * 2022-11-23 2023-03-17 北京伽睿智能科技集团有限公司 Intelligent speech technology recommendation method, system, equipment and storage medium
CN116312968A (en) * 2023-02-09 2023-06-23 广东德澳智慧医疗科技有限公司 Psychological consultation and healing system based on man-machine conversation and core algorithm
CN116662522A (en) * 2023-07-28 2023-08-29 阿里巴巴达摩院(杭州)科技有限公司 Question answer recommendation method, storage medium and electronic equipment

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240438A (en) * 2021-05-11 2021-08-10 京东数字科技控股股份有限公司 Intention recognition method, device, storage medium and program product
CN113380238A (en) * 2021-06-09 2021-09-10 阿波罗智联(北京)科技有限公司 Method for processing audio signal, model training method, apparatus, device and medium
CN113268580B (en) * 2021-07-15 2021-11-09 中国平安人寿保险股份有限公司 Session subject migration path mining method and device, computer equipment and medium
CN113705248B (en) * 2021-07-21 2022-09-30 上海原圈网络科技有限公司 Method and device for processing tactical training data based on result evaluation
CN114416941B (en) * 2021-12-28 2023-09-05 北京百度网讯科技有限公司 Knowledge graph-fused dialogue knowledge point determination model generation method and device
CN114528386A (en) * 2022-01-14 2022-05-24 北京健康之家科技有限公司 Robot outbound control method, device, storage medium and terminal
CN114218424B (en) * 2022-02-22 2022-05-13 杭州一知智能科技有限公司 Voice interaction method and system for tone word insertion based on wav2vec

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287283A (en) * 2019-05-22 2019-09-27 中国平安财产保险股份有限公司 Intent model training method, intension recognizing method, device, equipment and medium
CN111259132A (en) * 2020-01-16 2020-06-09 中国平安财产保险股份有限公司 Method and device for recommending dialect, computer equipment and storage medium
US20200242486A1 (en) * 2019-01-29 2020-07-30 Ricoh Company, Ltd. Method and apparatus for recognizing intention, and non-transitory computer-readable recording medium
CN111611383A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 User intention recognition method and device, computer equipment and storage medium
CN112131890A (en) * 2020-09-15 2020-12-25 北京慧辰资道资讯股份有限公司 Method, device and equipment for constructing intelligent recognition model of conversation intention

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415939B (en) * 2018-01-25 2021-04-16 北京百度网讯科技有限公司 Dialog processing method, device and equipment based on artificial intelligence and computer readable storage medium
US11061954B2 (en) * 2018-09-21 2021-07-13 Salesforce.Com, Inc. Intent classification system
CN111368040B (en) * 2018-12-25 2021-01-26 马上消费金融股份有限公司 Dialogue processing method, model training method and related equipment
KR102204740B1 (en) * 2019-02-28 2021-01-19 네이버 주식회사 Method and system for processing unclear intention query in conversation system
CN110334201B (en) * 2019-07-18 2021-09-21 中国工商银行股份有限公司 Intention identification method, device and system
CN111191016B (en) * 2019-12-27 2023-06-02 车智互联(北京)科技有限公司 Multi-round dialogue processing method and device and computing equipment
CN111339278B (en) * 2020-02-28 2023-03-31 支付宝(杭州)信息技术有限公司 Method and device for generating training speech generating model and method and device for generating answer speech
CN111897929B (en) * 2020-08-04 2021-05-14 腾讯科技(深圳)有限公司 Method and device for processing multiple rounds of questions, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200242486A1 (en) * 2019-01-29 2020-07-30 Ricoh Company, Ltd. Method and apparatus for recognizing intention, and non-transitory computer-readable recording medium
CN110287283A (en) * 2019-05-22 2019-09-27 中国平安财产保险股份有限公司 Intent model training method, intension recognizing method, device, equipment and medium
CN111259132A (en) * 2020-01-16 2020-06-09 中国平安财产保险股份有限公司 Method and device for recommending dialect, computer equipment and storage medium
CN111611383A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 User intention recognition method and device, computer equipment and storage medium
CN112131890A (en) * 2020-09-15 2020-12-25 北京慧辰资道资讯股份有限公司 Method, device and equipment for constructing intelligent recognition model of conversation intention

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129878A (en) * 2022-08-31 2022-09-30 支付宝(杭州)信息技术有限公司 Conversation service execution method, device, storage medium and electronic equipment
CN115129878B (en) * 2022-08-31 2022-12-27 支付宝(杭州)信息技术有限公司 Conversation service execution method, device, storage medium and electronic equipment
CN115810345A (en) * 2022-11-23 2023-03-17 北京伽睿智能科技集团有限公司 Intelligent speech technology recommendation method, system, equipment and storage medium
CN115810345B (en) * 2022-11-23 2024-04-30 北京伽睿智能科技集团有限公司 Intelligent speaking recommendation method, system, equipment and storage medium
CN116312968A (en) * 2023-02-09 2023-06-23 广东德澳智慧医疗科技有限公司 Psychological consultation and healing system based on man-machine conversation and core algorithm
CN116662522A (en) * 2023-07-28 2023-08-29 阿里巴巴达摩院(杭州)科技有限公司 Question answer recommendation method, storage medium and electronic equipment
CN116662522B (en) * 2023-07-28 2023-12-12 阿里巴巴达摩院(杭州)科技有限公司 Question answer recommendation method, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112732911A (en) 2021-04-30
CN112732911B (en) 2023-10-10

Similar Documents

Publication Publication Date Title
WO2022142006A1 (en) Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium
CN111368996B (en) Retraining projection network capable of transmitting natural language representation
CN109101537B (en) Multi-turn dialogue data classification method and device based on deep learning and electronic equipment
CN111444340B (en) Text classification method, device, equipment and storage medium
CN111695415B (en) Image recognition method and related equipment
CN112231569B (en) News recommendation method, device, computer equipment and storage medium
CN112069302A (en) Training method of conversation intention recognition model, conversation intention recognition method and device
CN112632244A (en) Man-machine conversation optimization method and device, computer equipment and storage medium
CN110750523A (en) Data annotation method, system, computer equipment and storage medium
CN113553510B (en) Text information recommendation method and device and readable medium
CN112418059A (en) Emotion recognition method and device, computer equipment and storage medium
CN112101042A (en) Text emotion recognition method and device, terminal device and storage medium
CN113420212A (en) Deep feature learning-based recommendation method, device, equipment and storage medium
CN115730597A (en) Multi-level semantic intention recognition method and related equipment thereof
CN115510186A (en) Instant question and answer method, device, equipment and storage medium based on intention recognition
WO2022105118A1 (en) Image-based health status identification method and apparatus, device and storage medium
CN114117048A (en) Text classification method and device, computer equipment and storage medium
CN112995414B (en) Behavior quality inspection method, device, equipment and storage medium based on voice call
Ouamane et al. Deep Reinforcement Learning Applied to NLP: A Brief Survey
CN114548242A (en) User tag identification method, device, electronic equipment and computer readable storage medium
CN113886539A (en) Method and device for recommending dialect, customer service equipment and storage medium
CN112395979B (en) Image-based health state identification method, device, equipment and storage medium
CN114238574B (en) Intention recognition method based on artificial intelligence and related equipment thereof
CN117521674B (en) Method, device, computer equipment and storage medium for generating countermeasure information
Bharadi Sentiment Analysis of Twitter Data Using Named Entity Recognition

Legal Events

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

Ref document number: 21912769

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912769

Country of ref document: EP

Kind code of ref document: A1