WO2019080417A1 - 基于海量问题的知识库构建方法、电子装置及存储介质 - Google Patents

基于海量问题的知识库构建方法、电子装置及存储介质

Info

Publication number
WO2019080417A1
WO2019080417A1 PCT/CN2018/076461 CN2018076461W WO2019080417A1 WO 2019080417 A1 WO2019080417 A1 WO 2019080417A1 CN 2018076461 W CN2018076461 W CN 2018076461W WO 2019080417 A1 WO2019080417 A1 WO 2019080417A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
cluster
knowledge base
current
questions
Prior art date
Application number
PCT/CN2018/076461
Other languages
English (en)
French (fr)
Inventor
高祎璠
卢川
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019080417A1 publication Critical patent/WO2019080417A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Definitions

  • the present application relates to the field of knowledge base construction, and relates to a knowledge base construction method, an electronic device and a storage medium based on a massive problem.
  • the technical problem to be solved by the present application is to overcome the problem that the large amount of disordered problems cannot be handled centrally in the prior art, and a knowledge base construction method, an electronic device and a storage medium based on a massive problem are proposed.
  • the disorderly mass problem is classified, and the problems and the corresponding answers are organized and maintained into the knowledge base to solve the problems by using the intelligent customer service robot instead of the manual customer service.
  • a knowledge base construction method based on massive problems comprising the following steps:
  • K-means clustering algorithm is used to classify the reduced-dimensional text, and the text is saved to different clusters corresponding to different categories and output;
  • An electronic device includes a memory and a processor, wherein the memory stores a mass-based knowledge base construction system executable by the processor, and the knowledge base construction system based on the massive problem comprises:
  • a preprocessing module for splitting the original question into a sequence of words consisting of several keywords
  • the clustering module uses the K-means clustering algorithm to classify the reduced-dimensional text, and saves the text to different clusters corresponding to different categories and outputs them;
  • a knowledge base building module that restores all text to the original question and associates the original questions belonging to the same cluster with the same standard question-answer pair and saves them in the knowledge base.
  • a computer readable storage medium storing a knowledge base construction system based on a massive problem, the knowledge base construction system based on a massive problem can be executed by at least one processor to implement the following steps :
  • K-means clustering algorithm is used to classify the reduced-dimensional text, and the text is saved to different clusters corresponding to different categories and output;
  • the positive progress of the application is that the present application realizes the automatic clustering of massive problems to the same kind of problems formed by automatic clustering, and the manual only needs to answer once to form a standard question-answer pair, and the same kind of problem and the standard problem- After the answer is saved to the knowledge base after the association, and then encounter similar problems, you can realize the intelligent customer service instead of the manual customer service to answer.
  • FIG. 1 is a schematic diagram showing the hardware architecture of an embodiment of an electronic device of the present application.
  • FIG. 2 is a schematic diagram of a program module of an embodiment of a knowledge base construction system based on a massive problem in an electronic device of the present application;
  • FIG. 3 is a flowchart of Embodiment 1 of a method for constructing a knowledge base based on a massive problem according to the present application;
  • Embodiment 4 is a flowchart of Embodiment 2 of a knowledge base construction method based on a massive problem in the present application;
  • FIG. 5 is a flowchart of Embodiment 3 of a method for constructing a knowledge base based on a massive problem according to the present application;
  • Embodiment 6 is a flowchart of Embodiment 4 of a knowledge base construction method based on a massive problem in the present application;
  • FIG. 7 is a flowchart of Embodiment 5 of a knowledge base construction method based on a massive problem in the present application
  • FIG. 8 is a flow chart showing Embodiment 6 of the knowledge base construction method based on the massive problem in the present application.
  • the present application proposes an electronic device.
  • the electronic device 2 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the electronic device 2 can be a smartphone, a tablet, a laptop, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including a stand-alone server, or a server cluster composed of multiple servers).
  • the electronic device 2 includes at least, but not limited to, a memory 21, a processor 22, a network interface 23, and a knowledge base construction system 20 based on mass problems. among them:
  • the memory 21 includes at least one type of computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a 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, and the like.
  • the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or a memory of the electronic device 2.
  • the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc.
  • the memory 21 can also include both the internal storage unit of the electronic device 2 and its external storage device.
  • the memory 21 is generally used to store an operating system installed in the electronic device 2 and various types of application software, such as program code of the knowledge base construction system 20 based on the massive problem. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 22 is typically used to control the overall operation of the electronic device 2, such as performing control and processing associated with data interaction or communication with the electronic device 2.
  • the processor 22 is configured to run program code or process data stored in the memory 21, such as running the mass-based problem-based knowledge base construction system 20 and the like.
  • the network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 2 and other electronic devices.
  • the network interface 23 is configured to connect the electronic device 2 to an external terminal through a network, establish a data transmission channel, a communication connection, and the like between the electronic device 2 and an external terminal.
  • the network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network.
  • Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
  • FIG. 1 only shows the electronic device 2 with the components 21-23, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the mass problem-based knowledge base construction system 20 stored in the memory 21 may be divided into one or more program modules, and the one or more program modules are stored in the memory 21, and It can be performed by one or more processors (the processor 22 in this embodiment) to complete the application.
  • FIG. 2 shows a schematic diagram of a program module of the first embodiment of the knowledge base construction system 20 based on the massive problem.
  • the knowledge base construction system 20 based on the massive problem may be divided into a preprocessing module. 201.
  • the dimension reduction module 202, the clustering module 203, and the knowledge base building module 204 The following description will specifically describe the specific functions of the program modules 201-204.
  • the pre-processing module 201 is configured to split the original problem into a word sequence composed of a plurality of keywords; the dimension reduction module 202 uses a topic model algorithm to perform text dimension reduction; and the clustering module 203 adopts a K-means clustering algorithm. Divide the reduced-dimensional text, and save the text to different clusters and output corresponding to different categories; the knowledge base building module 204 is used to restore all the texts to the original problem, and will belong to the original problem in the same cluster Associate the same standard question - the answer is saved to the knowledge base.
  • the system 20 described in this embodiment can automatically classify thousands or more data, and assume that the problem of text restoration in a cluster after categorization is as follows:
  • the present application proposes a knowledge base construction method based on massive problems.
  • the knowledge base construction method based on the massive problem includes the following steps:
  • the platform mentioned here is mainly a message platform, an online customer service system, a customer service mailbox, etc.
  • various problems are received from customers, and these problems are usually irregular, and it is very time-consuming to rely on manual interpretation.
  • the K-means clustering algorithm is used to classify the reduced-dimensional text, and the text is saved to different clusters and output according to different categories.
  • the problem pre-processing specifically includes the following sub-steps:
  • stop words described here refer to words that have no actual meaning.
  • the cluster implementation process is as follows:
  • step S34 it is determined whether there is any remaining text in the current cluster is not saved to the new cluster, if yes, step S32 is performed, otherwise step S35 is performed;
  • step S35 it is determined whether there is still a text in the same cycle as the current cluster belongs to the same cycle, if yes, step S36 is performed, otherwise step S37 is performed;
  • step S36 after the current cluster is reset to the cluster with the text, step S32 is performed;
  • step S37 it is determined whether the number of cycles reaches the upper limit, if yes, step S39 is performed, otherwise step S38 is performed;
  • step S38 the number of loops is increased by 1, the current cluster is reset to a new cluster of a number of new clusters, step S32 is performed;
  • the cluster corresponds to a category, and one cluster is a category. All new clusters finally output refer to dividing thousands or even more problems into minimum scales, that is, the problems in a cluster are pointed to. The answer is the same, and the diversity of questions is only caused by the diversity of language expressions or personal expression habits. Take the following eight seemingly different issues as an example for specific explanation:
  • step S4' parameter adjustment, and specifically includes the following sub-steps:
  • step S41' checking whether the new cluster output meets the classification criteria, if not, executing step S42', and if so, ending.
  • step S42' adjusting an upper limit of the number of loops and a plurality of judgment thresholds corresponding to the number of loops in a progressive relationship, and performing step S31 again.
  • the parameter adjustment described here is mainly realized by manual observation. Usually, the clustering can adjust the parameters several times to achieve a more accurate classification of massive problems.
  • sub-step S33 is disclosed, which is as follows:
  • the current comparison text is temporarily stored, and the current comparison text is deleted from the current cluster.
  • step S335 determining whether the current comparison text is the last text in the remaining text in the current cluster, if yes, executing step S337, if otherwise, performing step S336;
  • the matching rule is: all keywords are divided into three types: professional nouns, common nouns, and verbs, and different weights are assigned to the matching of the three types of words, and the weights are professional from large to small. Nouns, common nouns, and verbs.
  • Text 1 The credit card automatic repayment balance is insufficient; Text 2: Credit card card self-service; Text 3: Debit card has no amount deduction; Centroid text: Debit card has no money to deduct.
  • the specific process is as follows: 1. Use text 1 as the current comparison text. 2. Match the text 1 and the centroid text, and calculate a matching value of 0.8 according to the matching rule. 3. The matching value 0.8 is greater than the judgment threshold 0.75. 4. The text 1 is temporarily taken out from the current cluster. 5. Use text 2 as the current comparison text. 6. Match the text 2 with the centroid text, and calculate a matching value of 0.5 according to the matching rule. 7. The matching value 0.5 is smaller than the judgment threshold 0.75. 8. The text 3 is used as the current comparison text. 9. Match the text 3 with the centroid text, and calculate a matching value of 0.9 according to the matching rule. 10. The matching value 0.9 is greater than the judgment threshold 0.75. 11. The text 3 is temporarily taken out from the current cluster. 12. Save the temporarily stored text 1 and text 3 and the centroid text to a new cluster.
  • the knowledge base construction process is as follows:
  • step S44 determining whether the current cluster is the last new cluster, and if so, ending, if otherwise, performing step S45;
  • the text in each cluster is a keyword sequence containing only keywords, it is necessary to first restore the text to the original question of the customer question, and then save the original question associated with the standard question-answer pair to the knowledge. In the library.
  • the present application is a computer readable storage medium having stored therein a knowledge base construction system 20 based on a massive problem
  • the knowledge base construction system 20 based on the massive problem can be executed by one or more processors
  • the above-described knowledge base construction method based on the massive problem or the operation of the electronic device is implemented.

Abstract

一种基于海量问题的知识库构建方法,属于知识库构建领域。一种基于海量问题的知识库构建方法,包括如下步骤:S1、问题预处理;S2、文本降维;S3、聚类实现;S4、知识库构建。该方法实现了海量问题的自动聚类,避免了人工整理海量问题耗费大量成本的问题,对经过自动聚类形成的同类问题,人工只需解答一次形成标准问题-答案对即可,然后将同类问题与标准问题-答案对关联后保存到知识库中,后续再碰到类似问题,就可以由智能客服代替人工客服进行解答,大大减少人工客服解答问题的工作量。

Description

基于海量问题的知识库构建方法、电子装置及存储介质
本申请申明享有2017年10月26日递交的申请号为201711032456.6、名称为“基于海量问题的知识库构建方法、电子装置及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及知识库构建领域,涉及一种基于海量问题的知识库构建方法、电子装置及存储介质。
背景技术
随着互联网的飞速发展,人们服务意识的提高,网络客服已经普及到各行各业,深入到日常商业服务的各个环节。
目前,常见的网络客户有智能客服机器人、留言平台等,相较于传统的客服方式,这些客服可以全天候服务,分流人工客服负担,从而有效降低企业客服领域的运营成本。
但是随之而来也产生了很多无法解答的新问题,这些问题杂乱无章,数量可达几千上万条,如果要对这些问题一一作答,只能通过人工一条条查看并解答,耗时巨大,效率也不高。而且其中很多问题的意思都是相似的,而答案也都是一样,但是由于没有很好的归类,无法进行集中统一解答。
因此,现在急需对这些杂乱无章的问题进行快速分类,以减少人工解答问题的工作量。
发明内容
本申请要解决的技术问题是为了克服现有技术中无法很好地对杂乱无章的海量问题进行集中处理的问题,提出了一种基于海量问题的知识库构建 方法、电子装置及存储介质,通过将杂乱无章的海量问题进行归类,方便问题和相应答案的关联整理后维护进知识库,以实现使用智能客服机器人代替人工客服对这些问题进行解答。
本申请是通过下述技术方案来解决上述技术问题:
一种基于海量问题的知识库构建方法,包括如下步骤:
S1、问题预处理:将原始问题拆分为若干关键词组成的词序列;
S2、文本降维:将每个预处理后的问题作为一个文本,利用主题模型算法进行文本降维,用多个主题分布来表示每个文本;
S3、聚类实现:采用K-means聚类算法对降维后的文本进行分类,对应不同的类别将文本保存到不同的簇并输出;
S4、知识库构建:将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
一种电子装置,包括存储器和处理器,所述存储器上存储有可被所述处理器执行的基于海量问题的知识库构建系统,所述基于海量问题的知识库构建系统包括:
预处理模块,用于将原始问题拆分为若干关键词组成的词序列;
降维模块,利用主题模型算法进行文本降维;
聚类模块,采用K-means聚类算法对降维后的文本进行分类,且对应不同的类别将文本保存到不同的簇并输出;
知识库构建模块,用于将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
一种计算机可读存储介质,所述计算机可读存储介质内存储有基于海量问题的知识库构建系统,所述基于海量问题的知识库构建系统可被至少一个处理器所执行,以实现以下步骤:
S1、问题预处理:将原始问题拆分为若干关键词组成的词序列;
S2、文本降维:将每个预处理后的问题作为一个文本,利用主题模型算 法进行文本降维,用多个主题分布来表示每个文本;
S3、聚类实现:采用K-means聚类算法对降维后的文本进行分类,对应不同的类别将文本保存到不同的簇并输出;
S4、知识库构建:将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
本申请的积极进步效果在于:本申请实现了海量问题的自动聚类对经过自动聚类形成的同类问题,人工只需解答一次形成标准问题-答案对即可,并将同类问题与标准问题-答案对关联后保存到知识库中,后续再碰到类似问题,就可以实现智能客服代替人工客服进行解答。
附图说明
图1示出了本申请电子装置一实施例的硬件架构示意图;
图2示出了本申请电子装置中基于海量问题的知识库构建系统一实施例的程序模块示意图;
图3示出了本申请基于海量问题的知识库构建方法实施例一的流程图;
图4示出了本申请基于海量问题的知识库构建方法实施例二的流程图;
图5示出了本申请基于海量问题的知识库构建方法实施例三的流程图;
图6示出了本申请基于海量问题的知识库构建方法实施例四的流程图;
图7示出了本申请基于海量问题的知识库构建方法实施例五的流程图;
图8示出了本申请基于海量问题的知识库构建方法实施例六的流程图。
具体实施方式
下面通过实施例的方式进一步说明本申请,但并不因此将本申请限制在所述的实施例范围之中。
首先,本申请提出了一种电子装置。
参阅图1所示,是本申请电子装置一实施例的硬件架构示意图。本实施例中,所述电子装置2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。例如,可以是智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图所示,所述电子装置2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及基于海量问题的知识库构建系统20。其中:
所述存储器21至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述电子装置2的内部存储单元,例如该电子装置2的硬盘或内存。在另一些实施例中,所述存储器21也可以是所述电子装置2的外部存储设备,例如该电子装置2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述电子装置2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述电子装置2的操作系统和各类应用软件,例如所述基于海量问题的知识库构建系统20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述电子装置2的总体操作,例如执行与所述电子装置2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器22 用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的基于海量问题的知识库构建系统20等。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述电子装置2与其他电子装置之间建立通信连接。例如,所述网络接口23用于通过网络将所述电子装置2与外部终端相连,在所述电子装置2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图1仅示出了具有组件21-23的电子装置2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
在本实施例中,存储于存储器21中的所述基于海量问题的知识库构建系统20可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并可由一个或多个处理器(本实施例为处理器22)所执行,以完成本申请。
例如,图2示出了所述基于海量问题的知识库构建系统20第一实施例的程序模块示意图,该实施例中,所述基于海量问题的知识库构建系统20可以被分割为预处理模块201、降维模块202、聚类模块203和知识库构建模块204。以下描述将具体介绍所述程序模块201-204的具体功能。
所述预处理模块201用于将原始问题拆分为若干关键词组成的词序列;所述降维模块202利用主题模型算法进行文本降维;所述聚类模块203采用K-means聚类算法对降维后的文本进行分类,且对应不同的类别将文本保存到不同的簇并输出;所述知识库构建模块204用于将所有文本还原为原始问 题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
本实施例中所述的系统20可以将上千条数据甚至更多的数据进行自动归类,假设经归类后得到一个簇中的文本还原的问题如下:
1、信用卡自动还款余额不足怎么办;2、借记卡里没钱了,那要怎么才能扣款;3、信用卡自动还款还能补扣么;4、信用卡自动还款补扣;5、信用卡自动还款没有金额扣除款项怎样;6、借记卡金额不足扣款;7、借记卡没有金额扣款怎样;8、借记卡没有金额扣除款项怎样。
最终,可以将以上8个属于同类的问题关联到一个标准问题-答案对后保存到知识库中,以后再接收到客户询问上述8个问题或者标准问题中的任意一个问题时,都可以由智能客服从知识库中查询到相同的答案以回答客户。通过此系统20来构建知识库,可以大大节约人工搜集问题的时间,且问题更贴近客户的询问习惯,以方便智能客服更准确的理解客户意图。
其次,本申请提出一种基于海量问题的知识库构建方法。
在实施例一中,如图3所示,所述的基于海量问题的知识库构建方法包括如下步骤:
S0、问题的搜集:将各种平台上历史记录中未回答的问题按统一格式保存到一个文件中。
这里所述平台主要是留言平台、在线客服系统、客服邮箱等,通过这些平台收到客户的各种问题,这些问题通常都没有规律,需要依靠人工一条条地解读,非常费时。
S1、问题预处理:将原始问题拆分为若干关键词组成的词序列。
为方便后续对问题的处理,需要对直接从各种平台上获取的问题进行预处理,主要是为了从问题中获取更清晰的客户意图。
S2、文本降维:将每个预处理后的问题作为一个文本,利用主题模型算 法进行文本降维,用多个主题分布来表示每个文本。
S3、聚类实现:采用K-means聚类算法对降维后的文本进行分类,对应不同的类别将文本保存到不同的簇并输出。
S4、知识库构建:将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
为了提高智能客服的知识储备,最后将所有分类后的问题保存到知识库中,以便下次碰到同样问题时,可以智能客服直接回答,减轻人工客服的压力。
在实施例二中,基于实施例一的基础上,如图4所示,问题预处理具体包括以下分步骤:
S11、将问题拆分成由若干个词组成的词序列。
S12、将词序列中的停用词去掉。
这里所述停用词指的是一些没有实际含义的词。
S13、保存仅包含有关键词的关键词序列。
下面以对问题“借记卡里没钱了,那要怎么才能扣款”的预处理为例,做具体说明:
1、将问题“借记卡里没钱了,那要怎么才能扣款”拆分为词序列“借记卡里没钱了那要怎么才能扣款”。2、将前述词序列中的停用词“里”、“了”、“那”、“要”、“怎么”和“才能”去掉。3、保存仅包含有关键词的关键词序列“借记卡没钱扣款”。
在实施例三中,基于实施例二的基础上,如图5所示,聚类实现的过程具体如下:
S30、预设循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,所述循环次数初始值为1;
S31、将所有文本预设为一个当前簇;
S32、随机获取当前簇中的多个文本中的一个文本作为质心文本,并将该质心文本从前簇中删除;
S33、计算当前簇中其余文本与该质心文本之间的匹配值,取出所有匹配值大于当前循环次数对应的判断阈值的文本和质心文本保存到一个新簇中;
S34、判断当前簇中是否还有剩余文本未保存到新簇中,若是则执行步骤S32,若否则执行步骤S35;
S35、判断是否还有与当前簇属于同一循环的簇中还有文本,若是则执行步骤S36,若否则执行步骤S37;
S36、将当前簇重置为该还有文本的簇后执行步骤S32;
S37、判断循环次数是否达到上限,若是则执行步骤S39,若否则执行步骤S38;
S38、循环次数加1,将当前簇重置为若干新簇中的一个新簇,执行步骤S32;
S39、输出所有新簇。
本实施例中,所述簇与类别相对应,一个簇即一个类别,最终输出的所有新簇指的是将上千条甚至更多的问题划分为最小刻度,即一个簇中的问题所指向的答案为相同的,问题的多样性仅仅是由语言表达的多样性或者个人的表述习惯所造成的。以下面8个看似不同的问题为例做具体说明:
1、信用卡自动还款余额不足怎么办;2、借记卡里没钱了,那要怎么才能扣款;3、信用卡自动还款还能补扣么;4、信用卡自动还款补扣;5、信用卡自动还款没有金额扣除款项怎样;6、借记卡金额不足扣款;7、借记卡没有金额扣款怎样;8、借记卡没有金额扣除款项怎样;
以上8个问题看似不同,但客户提问的意图是一样的,就是想知道“在信用卡自动还款借记卡的余额不足时,要怎么办?”,那么采用上述步骤进 行聚类后,这8个问题将归到一个新簇中,即归为一类。
在实施例四中,为了得到更精细地分类,基于实施例三的基础上,如图6所示,在步骤S4之前还包括:步骤S4’、参数调整,具体包括以下分步骤:
S41’、检查输出的新簇是否符合归类标准,若不符合则执行步骤S42’,若符合则结束。
S42’、调整所述循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,并重新执行步骤S31。
这里所述参数调整主要通过人工观测来实现,通常聚类都会通过几次参数调整后才能实现海量问题的较为准确的分类。
在实施例五中,基于实施例四的基础上,如图7所示,公开了分步骤S33的具体子步骤,具体如下:
S331、获取当前簇中其余文本中的首个文本作为当前比对文本;
S332、将当前比对文本中的关键词与所述质心文本中的关键词进行匹配,并根据匹配规则计算出匹配值;
S333、判断匹配值是否大于当前循环次数对应的判断阈值,若是则执行步骤S334,若否则执行步骤S331;
S334、将该当前比对文本取出暂存,并将该当前比对文本从当前簇中删除;
S335、判断当前比对文本是否为当前簇中其余文本中的最后一个文本,若是则执行步骤S337,若否则执行步骤S336;
S336、将当前比对文本之后的文本重置为新的当前比对文本,执行步骤S332;
S337、将暂存的文本与质心文本保存到一个新簇中。
本实施例中,所述匹配规则为:将所有关键词划分为专业名词、普通名 词和动词三类词,分别给三类词的匹配分配不同的权重,所述权重从大到小依次为专业名词、普通名词和动词。
下面以对下述属于一个当前簇中的3个文本为例做具体说明:
文本1:信用卡自动还款余额不足;文本2:信用卡开卡自助;文本3:借记卡没有金额扣款;质心文本:借记卡没钱扣款。
假设判断阈值为0.75。
具体过程为:1、将文本1作为当前比对文本。2、将文本1与质心文本进行匹配,根据匹配规则计算得到匹配值为0.8。3、匹配值0.8大于判断阈值0.75。4、将文本1从当前簇中取出暂存。5、将文本2作为当前比对文本。6、将文本2与质心文本进行匹配,根据匹配规则计算得到匹配值为0.5。7、匹配值0.5小于判断阈值0.75。8、将文本3作为当前比对文本。9、将文本3与质心文本进行匹配,根据匹配规则计算得到匹配值为0.9。10、匹配值0.9大于判断阈值0.75。11、将文本3从当前簇中取出暂存。12、将暂存的文本1和文本3与质心文本保存到一个新簇中。
在实施例六中,基于实施例五的基础上,如图8所示,知识库构建过程具体如下:
S41、获取首个新簇作为当前簇;
S42、将当前簇中的文本还原为原始问题;
S43、将各个原始问题与同一个标准问题-答案对关联保存到知识库中;
S44、判断当前簇是否为最后一个新簇,若是则结束,若否则执行步骤S45;
S45、将当前簇重置为当前簇之后的一个新簇,执行步骤S42。
本实施例中,由于每个簇中的文本为仅包含关键词的关键词序列,因此需要先将这些文本还原为客户提问的原始问题,然后将原始问题关联标准问题-答案对后保存到知识库中。
接上例,对知识库的构建过程做具体说明:
1、将上例中保存的新簇作为当前簇。2、将文本1“信用卡自动还款余额不足”还原为原始问题“信用卡自动还款余额不足怎么办”,将文本3“借记卡没有金额扣款”还原为原始问题“借记卡没有金额扣款怎样”,将质心文本“借记卡没钱扣款”还原为原始问题“借记卡里没钱了,那要怎么才能扣款”。3、将还原得到的3个原始问题关联到同一个标准问题-答案对保存到知识库中。假设还有其他的新簇,则依照上述3个步骤依次执行。
此外,本申请一种计算机可读存储介质,该计算机可读存储介质内存储有基于海量问题的知识库构建系统20,该基于海量问题的知识库构建系统20可被一个或多个处理器执行时,实现上述基于海量问题的知识库构建方法或电子装置的操作。
虽然以上描述了本申请的具体实施方式,但是本领域的技术人员应当理解,这仅是举例说明,本申请的保护范围是由所附权利要求书限定的。本领域的技术人员在不背离本申请的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,但这些变更和修改均落入本申请的保护范围。

Claims (17)

  1. 一种基于海量问题的知识库构建方法,其特征在于,包括如下步骤:
    S1、问题预处理:将原始问题拆分为若干关键词组成的词序列;
    S2、文本降维:将每个预处理后的问题作为一个文本,利用主题模型算法进行文本降维,用多个主题分布来表示每个文本;
    S3、聚类实现:采用K-means聚类算法对降维后的文本进行分类,对应不同的类别将文本保存到不同的簇并输出;
    S4、知识库构建:将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
  2. 根据权利要求1所述的基于海量问题的知识库构建方法,其特征在于,步骤S1之前还包括:S0、问题的搜集:将各种平台上历史记录中未回答的问题按统一格式保存到一个文件中。
  3. 根据权利要求1所述的基于海量问题的知识库构建方法,其特征在于,步骤S1具体包括以下分步骤:
    S11、将问题拆分成由若干个词组成的词序列;
    S12、将词序列中的停用词去掉;
    S13、保存仅包含有关键词的关键词序列。
  4. 根据权利要求1-3中任一项所述的基于海量问题的知识库构建方法,其特征在于,步骤S3具体包括以下分步骤:
    S30、预设循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,所述循环次数初始值为1;
    S31、将所有文本预设为一个当前簇;
    S32、随机获取当前簇中的多个文本中的一个文本作为质心文本,并将该质心文本从前簇中删除;
    S33、计算当前簇中其余文本与该质心文本之间的匹配值,取出所有匹 配值大于当前循环次数对应的判断阈值的文本和质心文本保存到一个新簇中;
    S34、判断当前簇中是否还有剩余文本未保存到新簇中,若是则执行步骤S32,若否则执行步骤S35;
    S35、判断是否还有与当前簇属于同一循环的簇中还有文本,若是则执行步骤S36,若否则执行步骤S37;
    S36、将当前簇重置为该还有文本的簇后执行步骤S32;
    S37、判断循环次数是否达到上限,若是则执行步骤S39,若否则执行步骤S38;
    S38、循环次数加1,将当前簇重置为若干新簇中的一个新簇,执行步骤S32;
    S39、输出所有新簇。
  5. 根据权利要求4所述的基于海量问题的知识库构建方法,其特征在于,分步骤S33具体包括以下子步骤:
    S331、获取当前簇中其余文本中的首个文本作为当前比对文本;
    S332、将当前比对文本中的关键词与所述质心文本中的关键词进行匹配,并根据匹配规则计算出匹配值;
    S333、判断匹配值是否大于当前循环次数对应的判断阈值,若是则执行步骤S334,若否则执行步骤S331;
    S334、将该当前比对文本取出暂存,并将该当前比对文本从当前簇中删除;
    S335、判断当前比对文本是否为当前簇中其余文本中的最后一个文本,若是则执行步骤S337,若否则执行步骤S336;
    S336、将当前比对文本之后的文本重置为新的当前比对文本,执行步骤S332;
    S337、将暂存的文本与质心文本保存到一个新簇中。
  6. 根据权利要求4所述的基于海量问题的知识库构建方法,其特征在于,步骤S4之前还包括:S4’、参数调整,具体包括以下分步骤:
    S41’、检查输出的新簇是否符合归类标准,若不符合则执行步骤S42’,若符合则结束;
    S42’、调整所述循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,并重新执行步骤S31。
  7. 根据权利要求5所述的基于海量问题的知识库构建方法,其特征在于,所述匹配规则为:将所有关键词划分为专业名词、普通名词和动词三类词,分别给三类词的匹配分配不同的权重,所述权重从大到小依次为专业名词、普通名词和动词。
  8. 根据权利要求4所述的基于海量问题的知识库构建方法,其特征在于,步骤S4具体包括以下分步骤:
    S41、获取首个新簇作为当前簇;
    S42、将当前簇中的文本还原为原始问题;
    S43、将各个原始问题与同一个标准问题-答案对关联保存到知识库中;
    S44、判断当前簇是否为最后一个新簇,若是则结束,若否则执行步骤S45;
    S45、将当前簇重置为当前簇之后的一个新簇,执行步骤S42。
  9. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器上存储有可被所述处理器执行的基于海量问题的知识库构建系统,所述基于海量问题的知识库构建系统包括:
    预处理模块,用于将原始问题拆分为若干关键词组成的词序列;
    降维模块,利用主题模型算法进行文本降维;
    聚类模块,采用K-means聚类算法对降维后的文本进行分类,且对应不同的类别将文本保存到不同的簇并输出;
    知识库构建模块,用于将所有文本还原为原始问题,并将属于同一簇中 的原始问题关联同一个标准问题-答案对后保存到知识库中。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有基于海量问题的知识库构建系统,所述基于海量问题的知识库构建系统可被至少一个处理器所执行,以实现以下步骤:
    S1、问题预处理:将原始问题拆分为若干关键词组成的词序列;
    S2、文本降维:将每个预处理后的问题作为一个文本,利用主题模型算法进行文本降维,用多个主题分布来表示每个文本;
    S3、聚类实现:采用K-means聚类算法对降维后的文本进行分类,对应不同的类别将文本保存到不同的簇并输出;
    S4、知识库构建:将所有文本还原为原始问题,并将属于同一簇中的原始问题关联同一个标准问题-答案对后保存到知识库中。
  11. 根据权利要求10所述的计算机可读存储介质,其特征在于,步骤S1之前还包括:S0、问题的搜集:将各种平台上历史记录中未回答的问题按统一格式保存到一个文件中。
  12. 根据权利要求10所述的计算机可读存储介质,其特征在于,步骤S1具体包括以下分步骤:
    S11、将问题拆分成由若干个词组成的词序列;
    S12、将词序列中的停用词去掉;
    S13、保存仅包含有关键词的关键词序列。
  13. 根据权利要求10-12中任一项所述的计算机可读存储介质,其特征在于,步骤S3具体包括以下分步骤:
    S30、预设循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,所述循环次数初始值为1;
    S31、将所有文本预设为一个当前簇;
    S32、随机获取当前簇中的多个文本中的一个文本作为质心文本,并将该质心文本从前簇中删除;
    S33、计算当前簇中其余文本与该质心文本之间的匹配值,取出所有匹配值大于当前循环次数对应的判断阈值的文本和质心文本保存到一个新簇中;
    S34、判断当前簇中是否还有剩余文本未保存到新簇中,若是则执行步骤S32,若否则执行步骤S35;
    S35、判断是否还有与当前簇属于同一循环的簇中还有文本,若是则执行步骤S36,若否则执行步骤S37;
    S36、将当前簇重置为该还有文本的簇后执行步骤S32;
    S37、判断循环次数是否达到上限,若是则执行步骤S39,若否则执行步骤S38;
    S38、循环次数加1,将当前簇重置为若干新簇中的一个新簇,执行步骤S32;
    S39、输出所有新簇。
  14. 根据权利要求13所述的计算机可读存储介质,其特征在于,分步骤S33具体包括以下子步骤:
    S331、获取当前簇中其余文本中的首个文本作为当前比对文本;
    S332、将当前比对文本中的关键词与所述质心文本中的关键词进行匹配,并根据匹配规则计算出匹配值;
    S333、判断匹配值是否大于当前循环次数对应的判断阈值,若是则执行步骤S334,若否则执行步骤S331;
    S334、将该当前比对文本取出暂存,并将该当前比对文本从当前簇中删除;
    S335、判断当前比对文本是否为当前簇中其余文本中的最后一个文本,若是则执行步骤S337,若否则执行步骤S336;
    S336、将当前比对文本之后的文本重置为新的当前比对文本,执行步骤 S332;
    S337、将暂存的文本与质心文本保存到一个新簇中。
  15. 根据权利要求13所述的计算机可读存储介质,其特征在于,步骤S4之前还包括:S4’、参数调整,具体包括以下分步骤:
    S41’、检查输出的新簇是否符合归类标准,若不符合则执行步骤S42’,若符合则结束;
    S42’、调整所述循环次数的上限和与所述循环次数相对应的若干呈递进关系的判断阈值,并重新执行步骤S31。
  16. 根据权利要求14所述的计算机可读存储介质,其特征在于,所述匹配规则为:将所有关键词划分为专业名词、普通名词和动词三类词,分别给三类词的匹配分配不同的权重,所述权重从大到小依次为专业名词、普通名词和动词。
  17. 根据权利要求13所述的计算机可读存储介质,其特征在于,步骤S4具体包括以下分步骤:
    S41、获取首个新簇作为当前簇;
    S42、将当前簇中的文本还原为原始问题;
    S43、将各个原始问题与同一个标准问题-答案对关联保存到知识库中;
    S44、判断当前簇是否为最后一个新簇,若是则结束,若否则执行步骤S45;
    S45、将当前簇重置为当前簇之后的一个新簇,执行步骤S42。
PCT/CN2018/076461 2017-10-26 2018-02-12 基于海量问题的知识库构建方法、电子装置及存储介质 WO2019080417A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711032456.6 2017-10-26
CN201711032456.6A CN107784105A (zh) 2017-10-26 2017-10-26 基于海量问题的知识库构建方法、电子装置及存储介质

Publications (1)

Publication Number Publication Date
WO2019080417A1 true WO2019080417A1 (zh) 2019-05-02

Family

ID=61432159

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076461 WO2019080417A1 (zh) 2017-10-26 2018-02-12 基于海量问题的知识库构建方法、电子装置及存储介质

Country Status (2)

Country Link
CN (1) CN107784105A (zh)
WO (1) WO2019080417A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015878A (zh) * 2020-09-02 2020-12-01 中国平安财产保险股份有限公司 处理智慧客服未回答问题的方法、装置及计算机设备
CN112597292A (zh) * 2020-12-29 2021-04-02 招联消费金融有限公司 问题回复推荐方法、装置、计算机设备和存储介质
CN113407718A (zh) * 2021-06-08 2021-09-17 北京捷通华声科技股份有限公司 题库的生成方法、装置、计算机可读存储介质及处理器

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804567A (zh) * 2018-05-22 2018-11-13 平安科技(深圳)有限公司 提高智能客服应答率的方法、设备、存储介质及装置
CN109145084B (zh) * 2018-07-10 2022-07-01 创新先进技术有限公司 数据处理方法、数据处理装置和服务器
CN109299241B (zh) * 2018-09-30 2021-06-15 北京小谛机器人科技有限公司 聊天机器人的知识库组织方法及装置
CN109213867A (zh) * 2018-10-26 2019-01-15 湖北大学 一种面向大数据精准预测的海量知识库构建方法
CN110941696A (zh) * 2019-11-12 2020-03-31 北京华宇信息技术有限公司 询问方法、装置及电子设备
CN111143565A (zh) * 2019-12-29 2020-05-12 杭州睿沃科技有限公司 一种k-means自学习系统
CN111667029B (zh) * 2020-07-09 2023-11-10 腾讯科技(深圳)有限公司 一种聚类方法、装置、设备及存储介质
CN111858891A (zh) * 2020-07-23 2020-10-30 平安科技(深圳)有限公司 问答库构建方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804665B2 (en) * 2001-04-18 2004-10-12 International Business Machines Corporation Method and apparatus for discovering knowledge gaps between problems and solutions in text databases
CN103823844A (zh) * 2014-01-26 2014-05-28 北京邮电大学 社区问答服务中基于主客观上下文的问题转发系统和方法
CN105678324A (zh) * 2015-12-31 2016-06-15 上海智臻智能网络科技股份有限公司 基于相似度计算的问答知识库的建立方法、装置及系统
CN106777232A (zh) * 2016-12-26 2017-05-31 上海智臻智能网络科技股份有限公司 问答抽取方法、装置及终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975460A (zh) * 2016-05-30 2016-09-28 上海智臻智能网络科技股份有限公司 问句信息处理方法及装置
CN105955965A (zh) * 2016-06-21 2016-09-21 上海智臻智能网络科技股份有限公司 问句信息处理方法及装置
CN106951498A (zh) * 2017-03-15 2017-07-14 国信优易数据有限公司 文本聚类方法
CN107180075A (zh) * 2017-04-17 2017-09-19 浙江工商大学 文本分类集成层次聚类分析的标签自动生成方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6804665B2 (en) * 2001-04-18 2004-10-12 International Business Machines Corporation Method and apparatus for discovering knowledge gaps between problems and solutions in text databases
CN103823844A (zh) * 2014-01-26 2014-05-28 北京邮电大学 社区问答服务中基于主客观上下文的问题转发系统和方法
CN105678324A (zh) * 2015-12-31 2016-06-15 上海智臻智能网络科技股份有限公司 基于相似度计算的问答知识库的建立方法、装置及系统
CN106777232A (zh) * 2016-12-26 2017-05-31 上海智臻智能网络科技股份有限公司 问答抽取方法、装置及终端

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015878A (zh) * 2020-09-02 2020-12-01 中国平安财产保险股份有限公司 处理智慧客服未回答问题的方法、装置及计算机设备
CN112015878B (zh) * 2020-09-02 2023-07-18 中国平安财产保险股份有限公司 处理智慧客服未回答问题的方法、装置及计算机设备
CN112597292A (zh) * 2020-12-29 2021-04-02 招联消费金融有限公司 问题回复推荐方法、装置、计算机设备和存储介质
CN112597292B (zh) * 2020-12-29 2024-04-26 招联消费金融股份有限公司 问题回复推荐方法、装置、计算机设备和存储介质
CN113407718A (zh) * 2021-06-08 2021-09-17 北京捷通华声科技股份有限公司 题库的生成方法、装置、计算机可读存储介质及处理器

Also Published As

Publication number Publication date
CN107784105A (zh) 2018-03-09

Similar Documents

Publication Publication Date Title
WO2019080417A1 (zh) 基于海量问题的知识库构建方法、电子装置及存储介质
US20200327551A1 (en) Resource transferring monitoring method and device
CN106407190B (zh) 一种事件记录查询方法及装置
WO2019062001A1 (zh) 智能机器人客服方法、电子装置及计算机可读存储介质
EP3540612A1 (en) Cluster processing method and device for questions in automatic question and answering system
US11954577B2 (en) Deep neural network based user segmentation
AU2018206822A1 (en) Simplified tax interview
WO2019037391A1 (zh) 客户购买意向的预测方法、装置、电子设备及介质
US20190392258A1 (en) Method and apparatus for generating information
US10140285B2 (en) System and method for generating phrase based categories of interactions
WO2018202170A1 (zh) 动态语音交互系统及其菜单生成方法
WO2021190379A1 (zh) 实现自动机器学习的方法及装置
US11663250B2 (en) Method for capturing and updating database entries of CRM system based on voice commands
WO2019128514A1 (zh) 推送信息的方法和装置、确定输入默认值的方法和装置
WO2019062078A1 (zh) 智能客服方法、电子装置及计算机可读存储介质
CN110674188A (zh) 一种特征提取方法、装置及设备
US20200349415A1 (en) Method for capturing and storing contact information from a physical medium using machine learning
CN110308946A (zh) 基于人工智能的跑批处理方法、设备、存储介质及装置
WO2021179631A1 (zh) 卷积神经网络模型压缩方法、装置、设备及存储介质
CN112862013A (zh) 一种量化交易策略的问题诊断方法及装置
CN110348669B (zh) 智能规则生成方法、装置、计算机设备及存储介质
CN117036001A (zh) 交易业务的风险识别处理方法、装置、设备及存储介质
CN116795818A (zh) 数据仓库提炼优化方法、装置、设备及其存储介质
CN114581130A (zh) 基于客户画像的银行网点派号方法及装置、存储介质
CN113515528A (zh) 基于大数据和oracle海量数据的资产筛选系统和方法

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.10.2020)

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18871377

Country of ref document: EP

Kind code of ref document: A1