WO2021003819A1 - 基于知识图谱的人机对话方法及人机对话装置 - Google Patents

基于知识图谱的人机对话方法及人机对话装置 Download PDF

Info

Publication number
WO2021003819A1
WO2021003819A1 PCT/CN2019/103243 CN2019103243W WO2021003819A1 WO 2021003819 A1 WO2021003819 A1 WO 2021003819A1 CN 2019103243 W CN2019103243 W CN 2019103243W WO 2021003819 A1 WO2021003819 A1 WO 2021003819A1
Authority
WO
WIPO (PCT)
Prior art keywords
knowledge graph
neural network
layer
convolutional
network model
Prior art date
Application number
PCT/CN2019/103243
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 WO2021003819A1 publication Critical patent/WO2021003819A1/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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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

Definitions

  • This application relates to the field of big data, and in particular to a human-machine dialogue method based on a knowledge graph, a human-machine dialogue device, computer equipment and a readable storage medium.
  • the intelligent question answering system accurately locates the question knowledge required by users in the form of one question and one answer, and provides users with personalized information services through interaction with users.
  • the traditional human-machine dialogue system is mainly based on the sequence to sequence (seq2seq) model.
  • sequence to sequence (seq2seq) model the sequence to sequence (seq2seq) model.
  • the inventor realizes that such models are trained based on historical corpus data to make immediate responses based on dialogue, but they cannot provide users with relevant knowledge answers.
  • This solution attempts to realize a man-machine dialogue system through the combination of a knowledge graph and a task-based dialogue model.
  • this application provides a method for man-machine dialogue based on a knowledge graph, and the method includes:
  • the knowledge graph is searched, and the content corresponding to the relationship in the knowledge graph is output, so as to realize a man-machine dialogue.
  • this application also provides a human-machine dialogue device, including:
  • the acquisition module is used to acquire the sentence input by the user
  • Input module used to input processing results into the convolutional neural network model
  • a recognition module used to recognize the intention of the sentence by using the convolutional neural network model
  • the prediction module is used to perform slot prediction on the words in the sentence
  • the input module is also used to input the intention and slot prediction results into the knowledge graph
  • the determining module is used to determine the corresponding relationship of the words according to the corresponding relationship between entities in the knowledge graph.
  • the dialogue module is used for searching the knowledge graph and outputting the content corresponding to the relationship in the knowledge graph, so as to realize the man-machine dialogue.
  • the present application also provides a computer device, the computer device memory, a processor, and computer-readable instructions stored on the memory and running on the processor, the computer readable When the instruction is executed by the processor, the following steps are implemented:
  • the knowledge graph is searched, and the content corresponding to the relationship in the knowledge graph is output, so as to realize a man-machine dialogue.
  • the present application also provides a non-volatile computer-readable storage medium in which computer-readable instructions are stored, and the computer-readable instructions can be at least Executed by one processor, so that the at least one processor executes the following steps:
  • the knowledge graph is searched, and the content corresponding to the relationship in the knowledge graph is output, so as to realize a man-machine dialogue.
  • the human-machine dialogue method, human-machine dialogue device, computer equipment, and non-volatile computer-readable storage medium provided by the present application are based on the knowledge graph.
  • the convolutional neural network model is established and the acquired corpus data is used to control the convolutional neural
  • the network model is trained, and then the sentence input by the user is processed by word vector, and the word vector processing result is input into the trained convolutional neural network model to obtain the intent of the sentence and slot the words in the sentence Prediction, inputting the intention and slot prediction results into the established knowledge graph to determine the corresponding relationship of the words, and outputting the content corresponding to the relationship in the knowledge graph to realize a human-machine dialogue.
  • This application can answer common sense and open field questions, and can initiate dialogues on the initiative.
  • Figure 1 is a flow chart of the steps of the human-machine dialogue method based on the knowledge graph of the first application
  • FIG. 2 is a schematic diagram of the hardware architecture of the human-machine dialogue device of the second application
  • Figure 3 is a schematic diagram of the program modules of the man-machine dialogue system of the third application.
  • FIG. 1 shows a flowchart of the steps of the human-machine dialogue method based on the knowledge graph of the first application of the present application. It can be understood that the flowchart in this method embodiment is not used to limit the order of execution of the steps. It should be noted that, in this embodiment, the human-machine dialogue device 2 is used as the execution subject for exemplary description. details as follows:
  • Step S100 Obtain the sentence input by the user.
  • Step S102 Perform word vector processing on the sentence.
  • Step S104 input the processing result into the convolutional neural network model.
  • the sentence when a sentence input by the user is obtained, the sentence is subjected to word segmentation processing, and then the word segmentation processing result is input into the word2vector model to generate a corresponding word vector, and then the word vector is input to the convolutional nerve In the network model.
  • the convolutional neural network model needs to be established before obtaining the sentence input by the user. Firstly, two convolutional layers are established, and convolution kernels of sizes 1, 3, and 5 are set to extract features; on the basis of the two convolutional layers, a pooling layer and a connection layer are constructed and passed Softmax function output to achieve intent classification. For example: if the question entered by the user is "how much is the insurance premium for life insurance", after the intention classification, the intention is identified as "insurance cost inquiry”.
  • slot filling refers to extracting key information related to the task from the user dialogue.
  • the dialogue system needs to make restaurant recommendations based on the location and price provided by the user.
  • the information needed by the dialogue system such as location and price is slot information
  • the slot filling task is to extract from the user's dialogue
  • Slot filling is usually modeled as a sequence labeling task, and many sequence labeling methods are used for slot filling.
  • the performance of slot filling has a very important influence on the quality of the dialogue system.
  • slot prediction is performed on the dialogue information to mark the words in the dialogue information.
  • the present application implements slot recognition through the convolutional neural network model, which has a higher recognition rate than the sequence model, and can achieve approximate accuracy in sequence labeling.
  • the convolutional neural network model After establishing the convolutional neural network model, first obtain corpus data, perform word segmentation processing on the corpus data to obtain corresponding words, input the words into the word2vector model, and generate corresponding word vectors; Words are slot-labeled, and the labels include the slot labels of the words and the intent labels of the words; the labeling results are input into the convolutional neural network model, so that the convolutional neural network model is The intention and the attributes are used to train the convolutional neural network model.
  • Step S106 using the convolutional neural network model to identify the intention of the sentence.
  • the human-machine dialogue device 2 presets the intention type. If the convolutional neural network model obtains the user’s sentence "A, what is the cost of the insurance product?" The dialogue device 2 classifies the question by intention to compare the question with the intention category. The result of the comparison is that the question is consistent with the intention of the “insurance cost inquiry” in the intention category, and the user’s intention is identified. The intent is "insurance cost inquiry”.
  • Step S108 Perform slot prediction on the words in the sentence.
  • the human-machine dialogue device 2 is preset with a word and label correspondence table. If the sentence of the convolutional neural network model is "A, what is the cost of the insurance product?" "Product” is matched with the word and label correspondence table, and the "Insurance Product” label is matched, and then "A Insurance Product” is marked with the “Insurance Product” label, then the slot prediction result of "A Insurance Product” is "Insurance” product". Wherein, the matching includes partial matching and complete matching.
  • Step S110 input the intention and slot prediction result into the knowledge graph.
  • the user's intent according to the question and answer data is also obtained, and the entity in the question and answer data and the entity And establish a knowledge graph based on the entity and the annotation result to establish the corresponding relationship of the entity. For example, if the user labels the entity “A insurance product” and the entity "20,000”, and the corresponding relationship is “expense”, the establishment of the corresponding relationship between the entity "A insurance product” and the entity "20,000” is “expense”.
  • Step S112 Determine the corresponding relationship of the words according to the corresponding relationship between the entities in the knowledge graph.
  • Step S114 searching the knowledge graph, and outputting the content corresponding to the relationship in the knowledge graph, so as to realize a man-machine dialogue.
  • the knowledge graph stores the sub-graph structure of the "A insurance product", In the sub-graph where the "A insurance product” is located, the entity whose corresponding relationship is "cost” is "20,000”, then 20,000 is output to realize the man-machine dialogue.
  • the server sends the corresponding result to the slot To the user terminal, and obtain the entity corresponding to the slot from the user terminal, and output the corresponding content by searching the knowledge graph.
  • FIG. 2 shows a schematic diagram of the hardware architecture of the second human-machine dialogue device of the present application.
  • the human-machine dialogue device 2 includes, but is not limited to, a memory 21, a processing 22, and a network interface 23 that can communicate with each other through a system bus.
  • FIG. 2 only shows the human-machine dialogue device 2 with components 21-23, but it should be understood Yes, it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 21 includes at least one type of readable storage medium, 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 memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 21 may be an internal storage unit of the human-machine dialogue device 2, such as a hard disk or a memory of the human-machine dialogue device 2.
  • the memory may also be an external storage device of the human-machine dialogue device 2, for example, a plug-in hard disk or a smart memory card (Smart Media Card, SMC) equipped on the human-machine dialogue device 2. , Secure Digital (SD) card, Flash Card, etc.
  • the memory 21 may also include both the internal storage unit of the human-machine dialogue device 2 and its external storage device.
  • the memory 21 is generally used to store the operating system and various application software installed in the human-machine dialogue device 2, such as the program code of the human-machine dialogue system 20.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 22 is generally used to control the overall operation of the human-machine dialogue device 2.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the human-machine dialogue system 20.
  • the network interface 23 may include a wireless network interface or a wired network interface.
  • the network interface 23 is usually used to establish a communication connection between the human-machine dialogue device 2 and other electronic devices.
  • the network interface 23 is used to connect the human-machine dialogue device 2 with an external terminal through a network, and establish a data transmission channel and a communication connection between the human-machine dialogue device 2 and the external terminal.
  • the network may be Intranet, Internet, Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G Network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
  • FIG. 3 shows a schematic diagram of program modules of the man-machine dialogue system of the third application of the present application.
  • the human-machine dialogue system 20 may include or be divided into one or more program modules.
  • the one or more program modules are stored in a storage medium and executed by one or more processors to complete
  • This application can realize the above-mentioned human-machine dialogue method based on the knowledge graph.
  • the program module referred to in this application refers to a series of computer-readable instruction segments that can complete specific functions, and is more suitable for describing the execution process of the human-machine dialogue system 20 in the storage medium than the program itself.
  • the following description will specifically introduce the functions of each program module in this embodiment:
  • the obtaining module 201 is used to obtain sentences input by the user.
  • the processing module 202 is configured to perform word vector processing on the sentence.
  • the input module 203 is used to input the processing result into the convolutional neural network model.
  • the processing module 202 when the acquisition module 201 acquires the sentence input by the user, the processing module 202 performs word segmentation processing on the sentence, and then the input module 203 inputs the word segmentation processing result into the word2vector model to generate corresponding Finally, the input module 203 inputs the word vector into the convolutional neural network model.
  • the establishment module 208 before the acquisition module 201 acquires the sentence input by the user, the establishment module 208 also needs to establish the convolutional neural network model. First, two convolutional layers are established, and convolution kernels with sizes 1, 3, and 5 are set to extract features. Then, on the basis of the two convolutional layers, a pooling layer and a connection layer are constructed. And output through the softmax function to achieve intent classification. For example: if the question entered by the user is "how much is the insurance premium for life insurance", after the intention classification, the intention is identified as "insurance cost inquiry”.
  • the establishment module 208 After the establishment module 208 establishes two convolutional layers, and sets the convolution kernels with lengths of 1, 3, and 5 to perform feature extraction, the establishment module 208 performs the feature extraction on the two convolutional layers. On the basis of this, a new convolutional layer is added, wherein the newly added convolutional layer and the two-layer convolutional layer form a full convolutional network to realize the slot prediction of words, and the result of the slot prediction Is the attribute of the word. For example, if the user’s question contains "A insurance product", the slot prediction is used, and the result is "insurance product".
  • slot filling refers to extracting key information related to the task from the user dialogue.
  • the dialogue system needs to make restaurant recommendations based on the location and price provided by the user.
  • the information needed by the dialogue system such as location and price is the slot information
  • the slot filling task is to extract from the user dialogue
  • Slot filling is usually modeled as a sequence labeling task, and many sequence labeling methods are used for slot filling.
  • the performance of slot filling has a very important influence on the quality of the dialogue system.
  • slot prediction is performed on the dialogue information to mark the words in the dialogue information.
  • the present application implements slot recognition through the convolutional neural network model, which has a higher recognition rate than the sequence model, and can achieve approximate accuracy in sequence labeling.
  • the training module 209 trains the convolutional neural network model. First, obtain corpus data, perform word segmentation processing on the corpus data to obtain corresponding words, input the words into the word2vector model, and generate corresponding word vectors. Then, a slot label is performed on the word, and the label includes the slot label of the word and the intention label of the word. Finally, the labeling result is input into the convolutional neural network model, so that the convolutional neural network model trains the convolutional neural network model according to the intention and the attribute.
  • the recognition module 204 is configured to use the convolutional neural network model to recognize the intention of the sentence.
  • the type of intention is preset in the human-machine dialogue device 2. If the convolutional neural network model obtains the user's sentence "A, what is the cost of the insurance product", the recognition module 204 The question is classified by intention to compare the question with the intention category. The result of the comparison is that the question is consistent with the intention of the “insurance cost inquiry” in the intention category, and the user’s intention is identified as "Insurance Cost Inquiry”.
  • the prediction module 205 is used to perform slot prediction on the words in the sentence.
  • the human-machine dialogue device 2 is preset with a word and label correspondence table, and if the sentence of the convolutional neural network model is "A, what is the cost of the insurance product", the prediction module 205 Match "A insurance product” with the word and label correspondence table, match out the "insurance product” label, and then mark “A insurance product” with the "insurance product” label, then the slot of "A insurance product” The forecast result is an "insurance product”.
  • the matching includes partial matching and complete matching.
  • the input module 203 is also used to input the intent and slot prediction results into the knowledge graph.
  • the establishment module 208 before the input module 203 inputs the intention and slot prediction results into the knowledge graph, the establishment module 208 also obtains the user's intention according to the question and answer data, The entity in the question and answer data and the annotation result of the relationship between the entities are described, and a knowledge graph is established according to the entity and the annotation result to establish the corresponding relationship of the entities. For example, if the user labels the entity "A insurance product” and the entity "20,000”, and the corresponding relationship is "expense", the establishment module 208 establishes the corresponding relationship between the entity "A insurance product” and the entity "20,000” as " cost”.
  • the determining module 206 is configured to determine the corresponding relationship of the words according to the corresponding relationship between entities in the knowledge graph.
  • the determining module 206 determines that the phrase “what is the cost of insurance product A” and the word “cost” that has a corresponding relationship with "insurance product A” is "20,000".
  • the dialogue module 207 is used for searching the knowledge graph and outputting content corresponding to the relationship in the knowledge graph, so as to realize a man-machine dialogue.
  • the recognition module 204 recognizes that the user’s intention is "insurance cost inquiry", and the "insurance product” slot is “A insurance product”
  • the knowledge graph stores the "A insurance product” In the sub-graph structure of “A insurance product”, the entity whose corresponding relationship is “expense” in the sub-graph where the “A insurance product” is located is “20,000”, then the dialogue module 207 outputs 20,000 to realize a man-machine dialogue.
  • the human-machine dialogue system 20 sends The question corresponding to the slot is sent to the user terminal, and the entity corresponding to the slot is obtained from the user terminal, and the corresponding content is output by searching the knowledge graph.
  • This application also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including independent servers, or more A server cluster composed of two servers), etc.
  • the computer device in this embodiment at least includes, but is not limited to: a memory, a processor, etc. that can be communicatively connected to each other through a system bus.
  • This embodiment also provides a non-volatile computer-readable storage medium, such as 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, server, App application mall, etc., on which storage There are computer-readable instructions, and the corresponding functions are realized when the program is executed by the processor.
  • the non-volatile computer-readable storage medium of this embodiment is used to store the human-machine dialogue system 20, and when executed by a processor, the following steps are implemented:
  • the knowledge graph is searched, and the content corresponding to the relationship in the knowledge graph is output, so as to realize a man-machine dialogue.

Abstract

一种基于知识图谱的人机对话方法,包括:获取用户输入的语句(S100);对所述语句进行词向量处理(S102);将处理结果输入至卷积神经网络模型中(S104);利用所述卷积神经网络模型,识别所述语句的意图(S106);对所述语句中的词语进行槽位预测(S108);将所述意图及槽位预测结果输入至知识图谱中(S110);根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系(S112);搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话(S114)。该方法能够对常识和开放领域的问题进行回答,并能主动发起对话。

Description

基于知识图谱的人机对话方法及人机对话装置
本申请要求于2019年7月5日提交中国专利局,专利名称为“基于知识图谱的人机对话方法及人机对话装置”,申请号为201910606169.4的发明专利的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及大数据领域,尤其涉及一种基于知识图谱的人机对话方法、人机对话装置、计算机设备及可读存储介质。
背景技术
智能问答系统以一问一答形式,精确的定位用户所需要的提问知识,通过与用户进行交互,为用户提供个性化的信息服务。
传统的人机对话系统主要基于序列到序列(Sequence to Sequence,seq2seq)模型。然而,发明人意识到此类模型根据历史语料数据进行训练以根据对话做出即时反应,但是无法为用户提供相关知识解答。本方案尝试通过知识图谱与任务型对话模型的结合,实现人机对话系统。
发明内容
有鉴于此,有必要提供一种基于知识图谱的人机对话方法、人机对话装置、计算机设备及非易失性计算机可读存储介质,能够对常识和开放领域的问题进行回答,并能主动发起对话。
为实现上述目的,本申请提供了一种基于知识图谱的人机对话方法,所述方法包括:
获取用户输入的语句;
对所述语句进行词向量处理;
将处理结果输入至卷积神经网络模型中;
利用所述卷积神经网络模型,识别所述语句的意图;
对所述语句中的词语进行槽位预测;
将所述意图及槽位预测结果输入至知识图谱中;
根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
为实现上述目的,本申请还提供了一种人机对话装置,包括:
获取模块,用于获取用户输入的语句;
处理模块,用于对所述语句进行词向量处理;
输入模块,用于将处理结果输入至卷积神经网络模型中;
识别模块,用于利用所述卷积神经网络模型,识别所述语句的意图;
预测模块,用于对所述语句中的词语进行槽位预测;
所述输入模块,还用于将所述意图及槽位预测结果输入至知识图谱中;
确定模块,用于根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
对话模块,用于搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
为实现上述目的,本申请还提供了一种计算机设备,所述计算机设备存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
获取用户输入的语句;
对所述语句进行词向量处理;
将处理结果输入至卷积神经网络模型中;
利用所述卷积神经网络模型,识别所述语句的意图;
对所述语句中的词语进行槽位预测;
将所述意图及槽位预测结果输入至知识图谱中;
根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
为实现上述目的,本申请还提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行如下步骤:
获取用户输入的语句;
对所述语句进行词向量处理;
将处理结果输入至卷积神经网络模型中;
利用所述卷积神经网络模型,识别所述语句的意图;
对所述语句中的词语进行槽位预测;
将所述意图及槽位预测结果输入至知识图谱中;
根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
本申请提供的基于知识图谱的人机对话方法、人机对话装置、计算机设备及非易失性计算机可读存储介质,通过建立卷积神经网络模型并通过获取的语料数据对所述卷积神经网络模型进行训练,然后将用户输入的语句进行词向量处理,将词向量处理结果输入至训练完成的卷积神经网络模型中以获 取所述语句的意图并对所述语句中的词语进行槽位预测,将意图及槽位预测结果输入至建立的知识图谱中,以确定所述词语的对应关系,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。本申请能够对常识和开放领域的问题进行回答,并能主动发起对话。
附图说明
图1为本申请一之基于知识图谱的人机对话方法的步骤流程图;
图2为本申请二之人机对话装置的硬件架构示意图;
图3为本申请三之人机对话系统的程序模块示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
实施例一
参阅图1,示出了本申请一之基于知识图谱的人机对话方法的步骤流程图。可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。需要说明是,本实施例以人机对话装置2为执行主体进行示例性描述。具体如下:
步骤S100,获取用户输入的语句。
步骤S102,对所述语句进行词向量处理。
步骤S104,将处理结果输入至卷积神经网络模型中。
具体实施例中,当获取到用户输入的语句时,将所述语句进行分词处理,然后将分词处理结果输入至word2vector模型中,生成相应的词向量,然后将所述词向量输入至卷积神经网络模型中。
在一较佳实施例中,在获取用户输入的语句之前,还需建立所述卷积神经网络模型。首先建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取;在所述两层卷积层的基础之上,构建池化层与连接层,并通过softmax函数输出,以实现意图分类。例如:若用户输入的问题为“人寿保险的保险费多少”,经过意图分类,识别出意图为“保险费用查询”。
在建立两层卷积层,并设置卷积核长度为别为1、3及5的卷积核进行特征的提取之后,还包括:在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,其中所述槽位预测的结果为所述词语的属性。例如:例如:用户的问题中包含“A保险产品”,则通过槽位预测,结果为“保险产品”。
需要说明的是,槽填充是指从用户对话中抽取与任务相关的关键信息。例如:在面向餐馆推荐的对话系统中,对话系统需要基于用户提供的地点、价位等信息来进行餐馆推荐,地点、价位等对话系统需要的信息就是槽信息, 槽填充任务就是从用户对话中提取这些槽信息。槽填充通常被建模为序列标注任务,很多序列标注方法都用于槽填充。槽填充的性能对对话系统的质量有非常重要的影响。当获取用户对话信息时,对所述对话信息进行槽位预测,以对所述对话信息中的词语进行标注。本申请通过所述卷积神经网络模型实现槽位识别,其识别速率相比序列模型更高,并且在序列标注上能够实现近似精度。
在建立所述卷积神经网络模型之后,首先获取语料数据,对所述语料数据进行分词处理以获取相应的词语,将所述词语输入至word2vector模型中,并生成相应的词向量;对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注;将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
需要说明的是,当所述卷积神经网络模型的建立完成之后,设置相应的损失函数,其中,所述损失函数为交叉熵,并通过ADAM优化算法对所述卷积神经网络模型进行训练,其中,所述卷积神经网络模型的建立及训练均通过Python中的tensorflow库实现。
步骤S106,利用所述卷积神经网络模型,识别所述语句的意图。
在一较佳实施例中,所述人机对话装置2中预设有意图种类,若所述卷积神经网络模型获取到用户的语句为“A保险产品的费用是多少”,所述人机对话装置2将所述问题经过意图分类,以将所述问题与所述意图种类进行对比,对比结果为所述问题与意图种类中的“保险费用查询”意图一致,则识别出所述用户的意图为“保险费用查询”。
步骤S108,对所述语句中的词语进行槽位预测。
在一较佳实施例中,所述人机对话装置2中预设有词语与标签对应表, 若所述卷积神经网络模型的语句为“A保险产品的费用是多少”,将“A保险产品”与所述词语与标签对应表进行匹配,匹配出“保险产品”标签,然后将“A保险产品”打上“保险产品”的标签,则“A保险产品”的槽位预测结果为“保险产品”。其中,所述匹配包括部分匹配及完全匹配。
步骤S110,将所述意图及槽位预测结果输入至知识图谱中。
可选地,在一较佳实施例中,在将所述意图及槽位预测结果输入至知识图谱中之前,还获取用户根据问答数据的意图,对所述问答数据中的实体及所述实体间关系的标注结果,并根据所述实体及所述标注结果建立知识图谱,以建立所述实体的对应关系。例如,用户标注实体“A保险产品”与实体“2万”,且其对应关系为“费用”,则建立实体“A保险产品”与实体“2万”的对应关系为“费用”。
步骤S112,根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系。
示例性地,若用户根据问答数据识别出的意图为“保险费用查询”,槽位预测结果为“保险产品”,知识图谱中实体“A保险产品”的“费用”对应关系的实体为“2万”,则确定语句为“A保险产品的费用是多少”中与“A保险产品”具有对应关系“费用”的词语为“2万”。
步骤S114,搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
示例性地,当识别出用户的意图为“保险费用查询”,且“保险产品”槽位为“A保险产品”时,所述知识图谱存储有所述“A保险产品”的子图结构,所述“A保险产品”所在的子图中对应关系为“费用”的实体为“2万”,则将2万输出以实现人机对话。
在另一较佳实施例中,若识别出用户的意图及获取槽位预测结果,根据 知识图谱,分析出还缺少一个槽位才能确定对应的结果,此时所述服务器发送与该槽位对应的问题至用户终端,并从所述用户终端获取该槽位对应的实体,通过查找所述知识图谱以将对应的内容输出。例如,识别出用户语句“A保险产品的费用是多少”的意图为“保险费用查询”,“A保险产品”槽位预测结果为“保险产品”,由于知识图谱中与实体“A保险产品”具有“费用”的对应关系的实体包括“2万”“B保险公司”,则服务器输出“您需要购买哪一家保险公司的呢”以确定“保险公司槽位”,并根据用户的回答“B保险公司”,将“2万”输出。
通过本申请,能够对常识和开放领域的问题进行回答,并能主动发起对话。
实施例二
请参阅图2,示出了本申请二之人机对话装置的硬件架构示意图。人机对话装置2包括,但不仅限于,可通过系统总线相互通信连接存储器21、处理22以及网络接口23,图2仅示出了具有组件21-23的人机对话装置2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
所述存储器21至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述人机对话装置2的内部存储单元,例如该人机对话装置2的硬盘或内存。在另一些实施例中,所述存储器也可以是所述人机对话装置2的外部存储设备,例如 该人机对话装置2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述人机对话装置2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述人机对话装置2的操作系统和各类应用软件,例如人机对话系统20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述人机对话装置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等无线或有线网络。
实施例三
请参阅图3,示出了本申请三之人机对话系统的程序模块示意图。在本实施例中,人机对话系统20可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完 成本申请,并可实现上述基于知识图谱的人机对话方法。本申请所称的程序模块是指能够完成特定功能的一系列计算机可读指令段,比程序本身更适合于描述人机对话系统20在存储介质中的执行过程。以下描述将具体介绍本实施例各程序模块的功能:
获取模块201,用于获取用户输入的语句。
处理模块202,用于对所述语句进行词向量处理。
输入模块203,用于将处理结果输入至卷积神经网络模型中。
具体实施例中,当所述获取模块201获取到用户输入的语句时,所述处理模块202将所述语句进行分词处理,然后所述输入模块203将分词处理结果输入至word2vector模型中,生成相应的词向量,最后所述输入模块203将所述词向量输入至卷积神经网络模型中。
在一较佳实施例中,在所述获取模块201获取用户输入的语句之前,建立模块208还需建立所述卷积神经网络模型。首先建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取,然后,在所述两层卷积层的基础之上,构建池化层与连接层,并通过softmax函数输出,以实现意图分类。例如:若用户输入的问题为“人寿保险的保险费多少”,经过意图分类,识别出意图为“保险费用查询”。
所述建立模块208建立两层卷积层,并设置卷积核长度为别为1、3及5的卷积核进行特征的提取之后,所述建立模块208在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,其中所述槽位预测的结果为所述词语的属性。例如:用户的问题中包含“A保险产品”,则通过槽位预测,结果为“保险产品”。
需要说明的是,槽填充是指从用户对话中抽取与任务相关的关键信息。 例如:在面向餐馆推荐的对话系统中,对话系统需要基于用户提供的地点、价位等信息来进行餐馆推荐,地点、价位等对话系统需要的信息就是槽信息,槽填充任务就是从用户对话中提取这些槽信息。槽填充通常被建模为序列标注任务,很多序列标注方法都用于槽填充。槽填充的性能对对话系统的质量有非常重要的影响。当获取用户对话信息时,对所述对话信息进行槽位预测,以对所述对话信息中的词语进行标注。本申请通过所述卷积神经网络模型实现槽位识别,其识别速率相比序列模型更高,并且在序列标注上能够实现近似精度。
在所述建立模块208建立所述卷积神经网络模型之后,训练模块209对所述卷积神经网络模型进行训练。首先,获取语料数据,对所述语料数据进行分词处理以获取相应的词语,将所述词语输入至word2vector模型中,并生成相应的词向量。然后,对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注。最后,将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
需要说明的是,当所述卷积神经网络模型的建立完成之后,设置相应的损失函数,其中,所述损失函数为交叉熵,并通过ADAM优化算法对所述卷积神经网络模型进行训练,其中,所述卷积神经网络模型的建立及训练均通过Python中的tensorflow库实现。
识别模块204,用于利用所述卷积神经网络模型,识别所述语句的意图。
在一较佳实施例中,所述人机对话装置2中预设有意图种类,若所述卷积神经网络模型获取到用户的语句为“A保险产品的费用是多少”,所述识别模块204将所述问题经过意图分类,以将所述问题与所述意图种类进行对比,对比结果为所述问题与意图种类中的“保险费用查询”意图一致,则识别出 所述用户的意图为“保险费用查询”。
预测模块205,用于对所述语句中的词语进行槽位预测。
在一较佳实施例中,所述人机对话装置2中预设有词语与标签对应表,若所述卷积神经网络模型的语句为“A保险产品的费用是多少”,所述预测模块205将“A保险产品”与所述词语与标签对应表进行匹配,匹配出“保险产品”标签,然后将“A保险产品”打上“保险产品”的标签,则“A保险产品”的槽位预测结果为“保险产品”。其中,所述匹配包括部分匹配及完全匹配。
所述输入模块203,还用于将所述意图及槽位预测结果输入至知识图谱中。
可选地,在一较佳实施例中,在所述输入模块203将所述意图及槽位预测结果输入至知识图谱中之前,所述建立模块208还获取用户根据问答数据的意图,对所述问答数据中的实体及所述实体间关系的标注结果,并根据所述实体及所述标注结果建立知识图谱,以建立所述实体的对应关系。例如,用户标注实体“A保险产品”与实体“2万”,且其对应关系为“费用”,则所述建立模块208建立实体“A保险产品”与实体“2万”的对应关系为“费用”。
确定模块206,用于根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系。
示例性地,若用户根据问答数据识别出的意图为“保险费用查询”,槽位预测结果为“保险产品”,知识图谱中实体“A保险产品”的“费用”对应关系的实体为“2万”,则确定模块206确定语句为“A保险产品的费用是多少”中与“A保险产品”具有对应关系“费用”的词语为“2万”。
对话模块207,用于搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
示例性地,当所述识别模块204识别出用户的意图为“保险费用查询”, 且“保险产品”槽位为“A保险产品”时,所述知识图谱存储有所述“A保险产品”的子图结构,所述“A保险产品”所在的子图中对应关系为“费用”的实体为“2万”,则所述对话模块207将2万输出以实现人机对话。
在另一较佳实施例中,若识别出用户的意图及获取槽位预测结果,根据知识图谱,分析出还缺少一个槽位才能确定对应的结果,此时所述人机对话系统20发送与该槽位对应的问题至用户终端,并从所述用户终端获取该槽位对应的实体,通过查找所述知识图谱以将对应的内容输出。例如,识别出用户语句“A保险产品的费用是多少”的意图为“保险费用查询”,“A保险产品”槽位预测结果为“保险产品”,由于知识图谱中与实体“A保险产品”具有“费用”的对应关系的实体包括“2万”“B保险公司”,则服务器输出“您需要购买哪一家保险公司的呢”以确定“保险公司槽位”,并根据用户的回答“B保险公司”,将“2万”输出。
通过本申请,能够对常识和开放领域的问题进行回答,并能主动发起对话。
本申请还提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备至少包括但不限于:可通过系统总线相互通信连接的存储器、处理器等。
本实施例还提供一种非易失性计算机可读存储介质,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机可读指令,程序被处理器执 行时实现相应功能。本实施例的非易失性计算机可读存储介质用于存储人机对话系统20,被处理器执行时实现如下步骤:
获取用户输入的语句;
对所述语句进行词向量处理;
将处理结果输入至卷积神经网络模型中;
利用所述卷积神经网络模型,识别所述语句的意图;
对所述语句中的词语进行槽位预测;
将所述意图及槽位预测结果输入至知识图谱中;
根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
上述本申请序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于知识图谱的人机对话方法,包括:
    获取用户输入的语句;
    对所述语句进行词向量处理;
    将处理结果输入至卷积神经网络模型中;
    利用所述卷积神经网络模型,识别所述语句的意图;
    对所述语句中的词语进行槽位预测;
    将所述意图及槽位预测结果输入至知识图谱中;
    根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
    搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
  2. 如权利要求1所述的基于知识图谱的人机对话方法,所述将处理结果输入至卷积神经网络模型中的步骤之前,还包括步骤:
    建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取;
    在所述两层卷积层的基础之上,构建池化层与连接层;及
    通过softmax函数输出,以实现意图分类。
  3. 如权利要求2所述的基于知识图谱的人机对话方法,所述建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取的步骤之后,还包括步骤:
    在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,所述槽位预测的结果为所述词语的属性,以完成所述卷积神经网络模型的建立。
  4. 如权利要求3所述的基于知识图谱的人机对话方法,所述在所述两层卷积层的基础之上,新增卷积层的步骤之后,还包括步骤:
    获取语料数据;
    对所述语料数据进行分词处理以获取相应的词语;
    将所述词语输入至word2vector模型中,并生成相应的词向量;
    对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注;及
    将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
  5. 如权利要求1所述的基于知识图谱的人机对话方法,所述将所述意图及槽位预测结果输入至知识图谱中的步骤之前,还包括步骤:
    获取所述用户根据问答数据的意图,对所述问答数据中的实体及所述实体间的关系的标注结果;及
    根据所述实体及所述标注结果建立所述知识图谱,以建立所述对应关系。
  6. 一种人机对话装置,包括:
    获取模块,用于获取用户输入的语句;
    处理模块,用于对所述语句进行词向量处理;
    输入模块,用于将处理结果输入至卷积神经网络模型中;
    识别模块,用于利用所述卷积神经网络模型,识别所述语句的意图;
    预测模块,用于对所述语句中的词语进行槽位预测;
    所述输入模块,还用于将所述意图及槽位预测结果输入至知识图谱中;
    确定模块,用于根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
    对话模块,用于搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
  7. 如权利要求6所述的人机对话装置,还包括建立模块,用于:
    建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取;
    在所述两层卷积层的基础之上,构建池化层与连接层;及
    通过softmax函数输出,以实现意图分类。
  8. 如权利要求7所述的人机对话装置,所述建立模块还用于:
    在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,所述槽位预测的结果为所述词语的属性,以完成所述卷积神经网络模型的建立。
  9. 如权利要求8所述的人机对话装置,还包括训练模块,用于:
    获取语料数据;
    对所述语料数据进行分词处理以获取相应的词语;
    将所述词语输入至word2vector模型中,并生成相应的词向量;
    对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注;及
    将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
  10. 如权利要求6所述的人机对话装置,所述建立模块,还用于:
    获取所述用户根据问答数据的意图,对所述问答数据中的实体及所述实体间的关系的标注结果;及
    根据所述实体及所述标注结果建立所述知识图谱,以建立所述对应关系。
  11. 一种计算机设备,所述计算机设备存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
    获取用户输入的语句;
    对所述语句进行词向量处理;
    将处理结果输入至卷积神经网络模型中;
    利用所述卷积神经网络模型,识别所述语句的意图;
    对所述语句中的词语进行槽位预测;
    将所述意图及槽位预测结果输入至知识图谱中;
    根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
    搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
  12. 如权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取;
    在所述两层卷积层的基础之上,构建池化层与连接层;及
    通过softmax函数输出,以实现意图分类。
  13. 如权利要求12所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,所述槽位预测的结果为所述词语的属性,以完成所述卷积神经网络模型的建立。
  14. 如权利要求13所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    获取语料数据;
    对所述语料数据进行分词处理以获取相应的词语;
    将所述词语输入至word2vector模型中,并生成相应的词向量;
    对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注;及
    将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
  15. 如权利要求11所述的计算机设备,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    获取所述用户根据问答数据的意图,对所述问答数据中的实体及所述实体间的关系的标注结果;及
    根据所述实体及所述标注结果建立所述知识图谱,以建立所述对应关系。
  16. 一种非易失性计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
    获取用户输入的语句;
    对所述语句进行词向量处理;
    将处理结果输入至卷积神经网络模型中;
    利用所述卷积神经网络模型,识别所述语句的意图;
    对所述语句中的词语进行槽位预测;
    将所述意图及槽位预测结果输入至知识图谱中;
    根据所述知识图谱中实体间的对应关系,确定所述词语的对应关系;及
    搜索所述知识图谱,并将所述知识图谱中与所述关系对应的内容输出,以实现人机对话。
  17. 如权利要求11所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    建立两层卷积层,并设置大小分别为1、3及5的卷积核进行特征的提取;
    在所述两层卷积层的基础之上,构建池化层与连接层;及
    通过softmax函数输出,以实现意图分类。
  18. 如权利要求17所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    在所述两层卷积层的基础之上,新增卷积层,其中,所述新增卷积层与所述两层卷积层构成全卷积网络,以实现对词语的槽位预测,所述槽位预测的结果为所述词语的属性,以完成所述卷积神经网络模型的建立。
  19. 如权利要求18所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    获取语料数据;
    对所述语料数据进行分词处理以获取相应的词语;
    将所述词语输入至word2vector模型中,并生成相应的词向量;
    对所述词语进行槽位标注,所述标注包括所述词语的槽位标注及所述词语的意图标注;及
    将标记结果输入至所述卷积神经网络模型中,以使所述卷积神经网络模型根据所述意图及所述属性训练所述卷积神经网络模型。
  20. 如权利要求16所述的非易失性计算机可读存储介质,所述计算机可读指令被所述处理器执行时还实现以下步骤:
    获取所述用户根据问答数据的意图,对所述问答数据中的实体及所述实体间的关系的标注结果;及
    根据所述实体及所述标注结果建立所述知识图谱,以建立所述对应关系。
PCT/CN2019/103243 2019-07-05 2019-08-29 基于知识图谱的人机对话方法及人机对话装置 WO2021003819A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910606169.4 2019-07-05
CN201910606169.4A CN110502608B (zh) 2019-07-05 2019-07-05 基于知识图谱的人机对话方法及人机对话装置

Publications (1)

Publication Number Publication Date
WO2021003819A1 true WO2021003819A1 (zh) 2021-01-14

Family

ID=68585963

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103243 WO2021003819A1 (zh) 2019-07-05 2019-08-29 基于知识图谱的人机对话方法及人机对话装置

Country Status (2)

Country Link
CN (1) CN110502608B (zh)
WO (1) WO2021003819A1 (zh)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801492A (zh) * 2021-01-22 2021-05-14 中国平安人寿保险股份有限公司 基于知识阶层的数据质检的方法、装置及计算机设备
CN112965603A (zh) * 2021-03-26 2021-06-15 南京阿凡达机器人科技有限公司 一种人机交互的实现方法和系统
CN112989046A (zh) * 2021-03-18 2021-06-18 中国平安人寿保险股份有限公司 实时话术预判方法、装置、计算机设备和存储介质
CN113010780A (zh) * 2021-03-11 2021-06-22 北京三快在线科技有限公司 一种模型训练以及点击率预估方法及装置
CN113010660A (zh) * 2021-04-22 2021-06-22 国网信息通信产业集团有限公司 一种基于知识图谱的智能问答方法及装置
CN113190668A (zh) * 2021-05-19 2021-07-30 平安国际智慧城市科技股份有限公司 基于多轮对话的人机交互方法、装置、设备及存储介质
CN113468307A (zh) * 2021-06-30 2021-10-01 网易(杭州)网络有限公司 文本处理方法、装置、电子设备及存储介质
CN113515611A (zh) * 2021-06-22 2021-10-19 镁佳(北京)科技有限公司 一种任务型多意图对话的意图识别方法和识别系统
CN113609827A (zh) * 2021-08-09 2021-11-05 海南大学 基于意图驱动的dikw的内容处理方法及系统
CN113641807A (zh) * 2021-07-28 2021-11-12 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质
CN113836320A (zh) * 2021-11-26 2021-12-24 北京世纪好未来教育科技有限公司 练习题推荐方法、装置、存储介质和电子设备
CN116774569A (zh) * 2023-07-25 2023-09-19 博纯材料股份有限公司 基于人工智能的氧氩分离设备运行系统更新方法及系统

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026842B (zh) * 2019-11-29 2023-09-12 微民保险代理有限公司 自然语言处理方法、自然语言处理装置及智能问答系统
CN111191000B (zh) * 2019-12-20 2023-08-18 北京淇瑀信息科技有限公司 一种智能语音机器人的对话管理方法、装置和系统
CN111125309A (zh) * 2019-12-23 2020-05-08 中电云脑(天津)科技有限公司 自然语言处理方法、装置及计算设备、存储介质
CN111143561B (zh) * 2019-12-26 2023-04-07 北京百度网讯科技有限公司 意图识别模型训练方法、装置及电子设备
CN111341308B (zh) * 2020-02-12 2023-07-21 百度在线网络技术(北京)有限公司 用于输出信息的方法和装置
CN111339770B (zh) * 2020-02-18 2023-07-21 百度在线网络技术(北京)有限公司 用于输出信息的方法和装置
CN111460124B (zh) * 2020-04-21 2023-08-25 文思海辉智科科技有限公司 智能交互方法、装置及机器人
CN111651988B (zh) * 2020-06-03 2023-05-19 北京百度网讯科技有限公司 用于训练模型的方法、装置、设备以及存储介质
CN113742480A (zh) * 2020-06-18 2021-12-03 北京汇钧科技有限公司 客服应答方法和装置
CN111737432A (zh) * 2020-06-22 2020-10-02 四川长虹电器股份有限公司 一种基于联合训练模型的自动对话方法和系统
CN111737990B (zh) * 2020-06-24 2023-05-23 深圳前海微众银行股份有限公司 一种词槽填充方法、装置、设备及存储介质
CN111738016B (zh) * 2020-06-28 2023-09-05 中国平安财产保险股份有限公司 多意图识别方法及相关设备
CN111949787B (zh) * 2020-08-21 2023-04-28 平安国际智慧城市科技股份有限公司 基于知识图谱的自动问答方法、装置、设备及存储介质
CN112328808A (zh) * 2020-11-03 2021-02-05 四川长虹电器股份有限公司 基于知识图谱的问答方法、装置、电子设备及存储介质
CN113157939A (zh) * 2021-03-26 2021-07-23 联想(北京)有限公司 一种信息处理方法及装置
CN113326367B (zh) * 2021-06-30 2023-06-16 四川启睿克科技有限公司 基于端到端文本生成的任务型对话方法和系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160378851A1 (en) * 2015-06-25 2016-12-29 International Business Machines Corporation Knowledge Canvassing Using a Knowledge Graph and a Question and Answer System
CN109033305A (zh) * 2018-07-16 2018-12-18 深圳前海微众银行股份有限公司 问题回答方法、设备及计算机可读存储介质
CN109063035A (zh) * 2018-07-16 2018-12-21 哈尔滨工业大学 一种面向出行领域的人机多轮对话方法
CN109063221A (zh) * 2018-11-02 2018-12-21 北京百度网讯科技有限公司 基于混合策略的查询意图识别方法和装置
CN109635117A (zh) * 2018-12-26 2019-04-16 零犀(北京)科技有限公司 一种基于知识图谱识别用户意图方法及装置
CN109947916A (zh) * 2019-03-01 2019-06-28 河北尚云信息科技有限公司 基于气象领域知识图谱的问答系统装置及问答方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10372743B2 (en) * 2016-07-20 2019-08-06 Baidu Usa Llc Systems and methods for homogeneous entity grouping
CN108446286B (zh) * 2017-02-16 2023-04-25 阿里巴巴集团控股有限公司 一种自然语言问句答案的生成方法、装置及服务器
CN107688614B (zh) * 2017-08-04 2018-08-10 平安科技(深圳)有限公司 意图获取方法、电子装置及计算机可读存储介质
CN109241524B (zh) * 2018-08-13 2022-12-20 腾讯科技(深圳)有限公司 语义解析方法及装置、计算机可读存储介质、电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160378851A1 (en) * 2015-06-25 2016-12-29 International Business Machines Corporation Knowledge Canvassing Using a Knowledge Graph and a Question and Answer System
CN109033305A (zh) * 2018-07-16 2018-12-18 深圳前海微众银行股份有限公司 问题回答方法、设备及计算机可读存储介质
CN109063035A (zh) * 2018-07-16 2018-12-21 哈尔滨工业大学 一种面向出行领域的人机多轮对话方法
CN109063221A (zh) * 2018-11-02 2018-12-21 北京百度网讯科技有限公司 基于混合策略的查询意图识别方法和装置
CN109635117A (zh) * 2018-12-26 2019-04-16 零犀(北京)科技有限公司 一种基于知识图谱识别用户意图方法及装置
CN109947916A (zh) * 2019-03-01 2019-06-28 河北尚云信息科技有限公司 基于气象领域知识图谱的问答系统装置及问答方法

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801492A (zh) * 2021-01-22 2021-05-14 中国平安人寿保险股份有限公司 基于知识阶层的数据质检的方法、装置及计算机设备
CN112801492B (zh) * 2021-01-22 2023-07-25 中国平安人寿保险股份有限公司 基于知识阶层的数据质检的方法、装置及计算机设备
CN113010780B (zh) * 2021-03-11 2022-07-15 北京三快在线科技有限公司 一种模型训练以及点击率预估方法及装置
CN113010780A (zh) * 2021-03-11 2021-06-22 北京三快在线科技有限公司 一种模型训练以及点击率预估方法及装置
CN112989046A (zh) * 2021-03-18 2021-06-18 中国平安人寿保险股份有限公司 实时话术预判方法、装置、计算机设备和存储介质
CN112989046B (zh) * 2021-03-18 2023-07-21 中国平安人寿保险股份有限公司 实时话术预判方法、装置、计算机设备和存储介质
CN112965603A (zh) * 2021-03-26 2021-06-15 南京阿凡达机器人科技有限公司 一种人机交互的实现方法和系统
CN113010660A (zh) * 2021-04-22 2021-06-22 国网信息通信产业集团有限公司 一种基于知识图谱的智能问答方法及装置
CN113190668A (zh) * 2021-05-19 2021-07-30 平安国际智慧城市科技股份有限公司 基于多轮对话的人机交互方法、装置、设备及存储介质
CN113515611B (zh) * 2021-06-22 2022-04-26 镁佳(北京)科技有限公司 一种任务型多意图对话的意图识别方法和识别系统
CN113515611A (zh) * 2021-06-22 2021-10-19 镁佳(北京)科技有限公司 一种任务型多意图对话的意图识别方法和识别系统
CN113468307B (zh) * 2021-06-30 2023-06-30 网易(杭州)网络有限公司 文本处理方法、装置、电子设备及存储介质
CN113468307A (zh) * 2021-06-30 2021-10-01 网易(杭州)网络有限公司 文本处理方法、装置、电子设备及存储介质
CN113641807A (zh) * 2021-07-28 2021-11-12 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质
CN113609827A (zh) * 2021-08-09 2021-11-05 海南大学 基于意图驱动的dikw的内容处理方法及系统
CN113609827B (zh) * 2021-08-09 2023-05-26 海南大学 基于意图驱动的dikw的内容处理方法及系统
CN113836320A (zh) * 2021-11-26 2021-12-24 北京世纪好未来教育科技有限公司 练习题推荐方法、装置、存储介质和电子设备
CN116774569A (zh) * 2023-07-25 2023-09-19 博纯材料股份有限公司 基于人工智能的氧氩分离设备运行系统更新方法及系统
CN116774569B (zh) * 2023-07-25 2024-04-05 博纯材料股份有限公司 基于人工智能的氧氩分离设备运行系统更新方法及系统

Also Published As

Publication number Publication date
CN110502608B (zh) 2023-10-10
CN110502608A (zh) 2019-11-26

Similar Documents

Publication Publication Date Title
WO2021003819A1 (zh) 基于知识图谱的人机对话方法及人机对话装置
CN108491433B (zh) 聊天应答方法、电子装置及存储介质
CN108897867B (zh) 用于知识问答的数据处理方法、装置、服务器和介质
CN109635117B (zh) 一种基于知识图谱识别用户意图方法及装置
US11392775B2 (en) Semantic recognition method, electronic device, and computer-readable storage medium
CN107481720B (zh) 一种显式声纹识别方法及装置
WO2019169756A1 (zh) 产品推荐方法、装置及存储介质
US20190066696A1 (en) Method and apparatus for verifying information
WO2020073530A1 (zh) 客服机器人会话文本分类方法及装置、电子设备、计算机可读存储介质
CN111191000B (zh) 一种智能语音机器人的对话管理方法、装置和系统
CN108628830B (zh) 一种语义识别的方法和装置
CN110276023B (zh) Poi变迁事件发现方法、装置、计算设备和介质
WO2021051517A1 (zh) 基于卷积神经网络的信息检索方法、及其相关设备
US10854189B2 (en) Techniques for model training for voice features
CN112328761B (zh) 一种意图标签设置方法、装置、计算机设备及存储介质
US20200311071A1 (en) Method and system for identifying core product terms
CN113157863A (zh) 问答数据处理方法、装置、计算机设备及存储介质
WO2020073532A1 (zh) 客服机器人对话状态识别方法及装置、电子设备、计算机可读存储介质
CN113051362A (zh) 数据的查询方法、装置和服务器
WO2020233381A1 (zh) 基于语音识别的服务请求方法、装置及计算机设备
CN110633475A (zh) 基于计算机场景的自然语言理解方法、装置、系统和存储介质
CN112836521A (zh) 问答匹配方法、装置、计算机设备及存储介质
WO2019041528A1 (zh) 新闻情感方向判断方法、电子设备及计算机可读存储介质
CN112446209A (zh) 一种意图标签的设置方法、设备、装置及存储介质
CN115935344A (zh) 一种异常设备的识别方法、装置及电子设备

Legal Events

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

Ref document number: 19937151

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19937151

Country of ref document: EP

Kind code of ref document: A1