WO2021218087A1 - 基于人工智能的意图识别的方法、装置、计算机设备 - Google Patents

基于人工智能的意图识别的方法、装置、计算机设备 Download PDF

Info

Publication number
WO2021218087A1
WO2021218087A1 PCT/CN2020/125065 CN2020125065W WO2021218087A1 WO 2021218087 A1 WO2021218087 A1 WO 2021218087A1 CN 2020125065 W CN2020125065 W CN 2020125065W WO 2021218087 A1 WO2021218087 A1 WO 2021218087A1
Authority
WO
WIPO (PCT)
Prior art keywords
input information
knowledge
knowledge graph
words
graphs
Prior art date
Application number
PCT/CN2020/125065
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 WO2021218087A1 publication Critical patent/WO2021218087A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based intention recognition method, device, and computer equipment.
  • Intention recognition is to classify sentences or queries we often call into corresponding intention types through classification. For example, if I want to listen to Jay Chou’s song, the intention of this query is the intention of music, and I want to listen to Guo Degang’s cross talk is the intention of the radio station.
  • the existing mainstream methods of intent recognition include three methods: dictionary and template-based rule methods, query click logs, and classification models to determine user intent.
  • the inventor realizes that the biggest difficulty of these three methods is that The acquisition of annotation data, and the acquisition of annotation data usually comes from two aspects. On the one hand, a dedicated data labeling team labels the data, on the other hand, the label data is automatically generated in a semi-supervised manner, so that there is accuracy when performing intent recognition. The problem is not high, and the scalability is not strong.
  • the embodiments of the present application provide a method, device, and computer equipment for intent recognition based on artificial intelligence, aiming to solve the problems of low accuracy and low scalability when there is an intention recognition in the prior art.
  • an embodiment of the present application provides an artificial intelligence-based intention recognition method, which includes:
  • the multiple knowledge graphs matching the input information are multiple knowledge graphs
  • the multiple knowledge graphs are screened according to a preset screening rule to obtain a target knowledge graph and thereby obtain the user's intention.
  • an artificial intelligence-based intention recognition device which includes:
  • the input information obtaining unit is used to obtain the input information of the user
  • An input information processing unit for processing the input information to obtain words in the input information
  • An obtaining unit configured to obtain a knowledge graph matching the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph includes at least one knowledge graph;
  • the first judging unit is used to judge the number of knowledge graphs matching the input information
  • the first identification unit is configured to, if the number of knowledge graphs matching the input information is 1, determine that the knowledge graphs matching the input information are the target knowledge graphs and obtain the user's information accordingly intention;
  • the second identification unit is configured to, if the knowledge graphs matching the input information are multiple knowledge graphs, filter the multiple knowledge graphs according to preset screening rules to obtain the target knowledge graph and obtain the target knowledge graphs accordingly The user's intention.
  • an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the Perform the following steps in the computer program:
  • the multiple knowledge graphs matching the input information are multiple knowledge graphs
  • the multiple knowledge graphs are screened according to a preset screening rule to obtain a target knowledge graph and thereby obtain the user's intention.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps :
  • the multiple knowledge graphs matching the input information are multiple knowledge graphs
  • the multiple knowledge graphs are screened according to a preset screening rule to obtain a target knowledge graph and thereby obtain the user's intention.
  • the embodiments of the present application solve the problems of low accuracy and low scalability when there is intention recognition in the prior art, and greatly improve the efficiency in the technical field of intention recognition.
  • FIG. 1 is a schematic flowchart of an artificial intelligence-based intention recognition method provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of a sub-flow of an artificial intelligence-based intention recognition method provided by an embodiment of this application;
  • FIG. 3 is a schematic diagram of another sub-flow of the artificial intelligence-based intention recognition method provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of another sub-flow of the artificial intelligence-based intention recognition method provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of another sub-flow of the artificial intelligence-based intention recognition method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another sub-flow of the artificial intelligence-based intention recognition method provided by an embodiment of the application.
  • Fig. 7 is a schematic block diagram of an artificial intelligence-based intention recognition device provided by an embodiment of the application.
  • FIG. 8 is a schematic block diagram of sub-units of the device for intent recognition based on artificial intelligence provided by an embodiment of the application;
  • FIG. 9 is a schematic block diagram of another sub-unit of the artificial intelligence-based intention recognition device provided by an embodiment of the application.
  • FIG. 10 is a schematic block diagram of another sub-unit of the device for intent recognition based on artificial intelligence provided by an embodiment of the application.
  • FIG. 11 is a schematic block diagram of another sub-unit of the artificial intelligence-based intention recognition apparatus provided by an embodiment of the application.
  • FIG. 12 is a schematic block diagram of another sub-unit of the artificial intelligence-based intention recognition apparatus provided by an embodiment of the application.
  • FIG. 13 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 14 is an established knowledge graph of credit card query intentions in the banking field provided by an embodiment of the application.
  • FIG. 15 is an established knowledge graph of credit card limit increase in the banking field provided by an embodiment of the application.
  • FIG. 16 is a dependency relationship diagram of input information provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of an artificial intelligence-based intention recognition method provided by an embodiment of the present application.
  • the artificial intelligence-based intention recognition method is applied to a user terminal, and the method is executed by application software installed in the user terminal.
  • the user terminal is used to execute the artificial intelligence-based intention recognition method to realize input to the user
  • a terminal device for intent identification of information such as a desktop computer, a notebook computer, a tablet computer, or a mobile phone.
  • the method includes steps S110 to S160.
  • the user terminal can obtain user input information through text information entered by the user on the user terminal, or voice information entered by the user on the user terminal.
  • the user terminal only needs to provide the user with a The way in which information can be input, the user terminal can obtain the input information of the user. That is, the user terminal may be a terminal device with a voice collection function and/or a text information collection function, such as a mobile phone, a tablet computer, a car phone, etc.
  • S120 Process the input information to obtain words in the input information.
  • the input information is processed to obtain the words in the input information. Specifically, after obtaining the input information of the user, the user terminal processes the input information to obtain the words in the input information. For example, the user terminal obtains the user's input information as "I want to check the balance of a bank card”, and the user terminal processes the input information, and the words obtained are respectively "I", “I want", “Query”, and "Bank”. "Card”, “ ⁇ ”, “Balance” are the words in the input information.
  • step S120 includes sub-steps S121, S122, and S123.
  • the terminal obtains the user’s input information either as text information or voice information, and the voice information needs to be converted into text information and then processed to obtain the words of the input information in the subsequent steps, so the terminal obtains After the user inputs information, it is necessary to judge the input information of the user to obtain the type of the input information.
  • S122 If the type of the input information is voice input information, convert the voice input information into text information.
  • the terminal can determine that the input information is voice input information, and then can convert the voice input information to obtain the corresponding voice information Text information.
  • S123 Process the text information to obtain words in the input information.
  • the text information is processed to obtain the words in the input information. For example, when the text information is "I want to check the balance of a bank card", the user terminal processes the text information to obtain the words in the input information, and the words are "I” and “I want to”. ", "Inquiry”, “Bank Card”, “of”, “Balance”.
  • step S123 includes sub-steps S1231, S1232, and S1233.
  • the word segmentation processing model is preset in the terminal, and the word segmentation processing model is used to perform word segmentation processing on the text information, so as to obtain a vocabulary of the text information.
  • the attributes of the vocabulary in the text vocabulary and the context connection relationship of the vocabulary in the text vocabulary can be obtained.
  • think, check inquire, silver, line, card, de, surplus, amount ⁇
  • the "I” and "think” in the text vocabulary can be obtained.
  • S1233 Perform analysis processing on the labeled vocabulary to obtain the vocabulary in the input information.
  • the annotated vocabulary is parsed to obtain the vocabulary in the input information. Specifically, after the attributes of the words in the text vocabulary list and the contextual connection relationships of the words in the text vocabulary are obtained, the attributes of the words in the text vocabulary list can be obtained according to the attributes of the words in the text vocabulary list and the text vocabulary list.
  • the context connection relationship of the vocabulary is combined and split to finally obtain the vocabulary in the input information. For example, when the attributes of "I”, “want”, “check”, “inquiry”, “silver”, “xing”, “card”, “ ⁇ ”, “ ⁇ ”, and “amount” in the text vocabulary And after the connection relationship is determined, the words in the input information can be obtained by combining and splitting according to their attributes and connection relationships. Balance".
  • a knowledge graph matching the input information is obtained, wherein the domain knowledge graph includes at least one knowledge graph.
  • a domain knowledge graph is a knowledge graph that has been established in a designated domain.
  • a knowledge graph of the banking domain can be established in the banking domain.
  • the knowledge graph can have a knowledge graph of query intent, or a knowledge graph of increasing quota.
  • the words in the input information and the knowledge factor in the knowledge graph of inquiry intent in the banking field and the knowledge factor in the knowledge graph of increasing quota can be combined. Match to obtain a knowledge graph that matches the input information.
  • step S130 includes sub-steps S131 and S132.
  • the words are words obtained after filtering the input information
  • the knowledge factors refer to the information used to represent the knowledge graph in the established knowledge graph. Matching the words with all knowledge factors in the knowledge graph to obtain a result of whether the knowledge graph matches the input information. Specifically, the words are matched with all knowledge factors in the knowledge graph, and if the word meaning of the word is similar to the word meaning of the knowledge factor, it can also be determined that the word matches the knowledge factor, and then The result of whether the knowledge graph matches the input information is obtained.
  • Figure 14 is a knowledge graph of credit card query intent in the banking field established in the embodiment of the application, where the knowledge factors in the knowledge graph of Figure 14 are money, consumption, customer, query, Credit card, attribute, quota, quantity, according to the words me, query, bank card, balance to find out whether the knowledge graph in Figure 14 contains the same or similar knowledge factors as the words, and then get the figure 14 The result of whether the knowledge graph matches the input information.
  • the meaning of the bank card in the words is similar to the meaning of the credit card in FIG. 14, so it can be determined that the knowledge factor "credit card” in the knowledge graph of FIG. 14 matches the "bank card” in the words.
  • a matching knowledge graph is obtained according to the knowledge factor. Specifically, after the words are matched with the knowledge factors, all knowledge graphs in the field that contain the knowledge factors are acquired. For example, when the input information is "Improve the money I can use", the modifiers "may” and “ ⁇ ” in the input information are removed, and the words are improved, me, use, and money, respectively. The words improve, me, use, and money are used to find whether the knowledge graphs in Figure 14 and Figure 15 contain knowledge factors that are the same or similar to the words.
  • Figure 14 is the established bank in the embodiment of the application.
  • Fig. 15 is the knowledge graph of credit card increase limit in the banking field established in the embodiment of the application; thus, the knowledge graph in Fig. 14 and Fig. 15 matches the input information, And get the knowledge graph in Figure 14 and Figure 15.
  • S140 Determine the number of knowledge graphs matching the input information.
  • the domain knowledge graph includes at least one knowledge graph, and the number of words in the input information is filled into a preset domain knowledge graph to obtain at least one knowledge graph that matches the input information,
  • the intention represented by each knowledge graph in the domain knowledge graph is different. Therefore, it is necessary to judge the number of knowledge graphs obtained from the domain knowledge graph to select the knowledge that best meets the user's intention. Atlas.
  • the knowledge graph matching the input information is determined to be the target knowledge graph and the user's intention is obtained by this.
  • the knowledge graph is the target knowledge graph of the input information, and the information of the input information can be obtained through the target knowledge graph.
  • the user's intention For example, when the words in the input information include "bank card” and "query", the knowledge graph of the credit card inquiry intent in the banking field that has been established as shown in Figure 14 will be obtained, and then the input of the knowledge graph can be determined
  • the target knowledge graph of the information through which the intention of the user who inputs the information can be obtained and entered.
  • the multiple knowledge graphs are screened according to a preset screening rule to obtain a target knowledge graph and thereby obtain the user's intention.
  • the screening rule is rule information used to screen the multiple knowledge graphs to obtain the knowledge graph that best meets the user's intention. Since the intention represented by each knowledge graph in the domain knowledge graph is different, and the knowledge graph that matches the input information obtained through the input information may be multiple knowledge graphs representing different intentions, therefore During the screening of the multiple knowledge graphs, after analyzing the overall semantics of the input information, the multiple knowledge graphs can be screened based on the analysis result to obtain a target knowledge graph conforming to the input information. In order to obtain the user's intention.
  • step S160 includes sub-steps S161 and S162.
  • the target knowledge factor is a knowledge factor matching the word in the knowledge graph.
  • the target knowledge factor is a knowledge factor matching the word in each knowledge graph.
  • the input information is "Improve the money I can use”
  • the acquired knowledge graph is the knowledge graph of query intention and the knowledge graph of increasing quota
  • the number of knowledge factors that match the words in the input information is calculated, so as to calculate that there are 3 knowledge factors in the knowledge graph of query intention that match the words in the input information, and there are 4 knowledge graphs in the knowledge graph that increases the quota
  • the knowledge factor matches the words in the input information.
  • the knowledge graph with the most target knowledge factors is used as the target knowledge graph to obtain the user's intention.
  • the input information is "Improve the money I can use”
  • the number of target factors contained in the knowledge graph of FIG. 14 is 3
  • the number of target knowledge factors contained in the knowledge graph of FIG. 15 The number is 4, so the knowledge graph in Fig. 15 can be used as the target knowledge graph to obtain the user's intention.
  • step S162 includes sub-steps S1621 and S1622.
  • the knowledge graph with the most target knowledge factors may have two or more different types of knowledge graphs, when the number of target knowledge factors in the knowledge graph matches the number of words in the input information When the number is the same, the user's knowledge graph cannot be obtained. For example, when the input information is "I'll check whether the available money in the credit card has increased", the number of target knowledge factors in the knowledge graph of the query intention and the knowledge graph of the increase amount is the same as that in the input information. The number of matching words is the same, that is, the knowledge graphs with the most target knowledge factors are two knowledge graphs.
  • the target knowledge graph is obtained from the plurality of knowledge graphs with the most target knowledge factors according to the dependency syntactic relationship of the words, and the user's knowledge is obtained accordingly. intention.
  • the target knowledge graphs are obtained from the plurality of knowledge graphs with the most target knowledge factors according to the dependency syntactic relationship of the words, and the user's intention is obtained accordingly.
  • syntactic analysis is to analyze the dependency relationship between the words marked in the text vocabulary.
  • the words in the input information are "I”, “Come”, “Inquiry”, “Xia”, “Credit Card”, “Medium”, “Available”, “Of”, “Money”, “Whether In the case of ",” “enhance”, and “le”, the user's intention of the input information can be determined as the knowledge graph conforming to the query intention through the dependency syntactic relationship between the words in the input information, thereby confirming the user's intention as the query intention.
  • the dependence relationship of the input information "I'll check whether the available money in the credit card has increased” is shown in Figure 16.
  • Figure 16 the structural relationship between the words in the input information can be obtained, thereby obtaining The deep semantics of the input information, and then the real intention of the user is obtained.
  • the embodiment of the present application also provides an artificial intelligence-based intention recognition device 100, which is used to perform any embodiment of the aforementioned intention recognition.
  • an artificial intelligence-based intention recognition device 100 which is used to perform any embodiment of the aforementioned intention recognition.
  • FIG. 7 is a schematic block diagram of an artificial intelligence-based intention recognition apparatus 100 provided in an embodiment of the present application.
  • the artificial intelligence-based intention recognition device 100 includes an input information acquisition unit 110, an input information processing unit 120, an acquisition unit 130, a first judgment unit 140, a first recognition unit 150, and a second recognition unit 160.
  • the input information obtaining unit 110 is configured to obtain user input information.
  • the input information processing unit 120 is configured to process the input information to obtain words in the input information.
  • the input information processing unit 120 includes a type determination unit 121, a conversion unit 122 and a text information processing unit 123.
  • the type judgment unit 121 is used to judge the type of the input information.
  • the conversion unit 122 is configured to convert the voice input information into text information if the type of the input information is voice input information.
  • the text information processing unit 123 is configured to process the text information to obtain words in the input information.
  • the text information processing unit 123 includes a text word segmentation unit 1231, a vocabulary labeling unit 1232 and a parsing unit 1333.
  • the text word segmentation unit 1231 is configured to perform word segmentation processing on the text information according to a preset word segmentation processing model to obtain a text vocabulary.
  • the vocabulary labeling unit 1232 is used to label the vocabulary in the text vocabulary to obtain the labelled vocabulary.
  • the parsing unit 1233 is configured to perform parsing processing on the annotated vocabulary to obtain the words in the input information.
  • the obtaining unit 130 is configured to obtain a knowledge graph matching the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph includes at least one knowledge graph.
  • the acquisition unit 130 includes a second judgment unit 131 and a knowledge graph acquisition unit 132.
  • the second judging unit 131 is configured to judge whether the words match the preset knowledge factors in the knowledge graph.
  • the knowledge graph obtaining unit 132 is configured to obtain a matching knowledge graph according to the knowledge factor if the word matches the knowledge factor.
  • the first judging unit 140 is used to judge the number of knowledge graphs matching the input information.
  • the first identification unit 150 is configured to, if the number of knowledge graphs matching the input information is 1, determine the knowledge graph that matches the input information as the target knowledge graph and obtain the user accordingly the purpose.
  • the second identification unit 160 is configured to, if the knowledge graphs matching the input information are multiple knowledge graphs, filter the multiple knowledge graphs according to a preset screening rule to obtain a target knowledge graph, and use this Get the user's intent.
  • the second identification unit 160 includes a calculation unit 161 and a third identification unit 162.
  • the calculating unit 161 is configured to calculate the number of target knowledge factors in each knowledge graph of the plurality of knowledge graphs, where the target knowledge factor is a knowledge factor matching the word in the knowledge graph.
  • the third recognizing unit 162 is configured to use the knowledge graph with the most target knowledge factors as the target knowledge graph and obtain the user's intention from this.
  • the third identifying unit 162 includes a third determining unit 1621 and a fourth identifying unit 1622.
  • the third judging unit 1621 is used to judge whether the number of the knowledge graphs with the most target knowledge factors is greater than one.
  • the fourth recognition unit 1622 is configured to, if the number of the knowledge graphs with the most target knowledge factors is greater than 1, obtain the target knowledge graph from the plurality of knowledge graphs with the most target knowledge factors according to the dependency syntactic relationship of the words And use this to get the user's intentions.
  • FIG. 13 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute an intention recognition method based on artificial intelligence.
  • the processor 502 is used to provide calculation and control capabilities, and support the operation of the entire device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can make the processor 502 execute an artificial intelligence-based intention recognition method.
  • the network interface 505 is used for network communication, such as providing data information transmission.
  • FIG. 13 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the device 500 to which the solution of the present application is applied.
  • the specific device 500 may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor 502 is configured to run a computer program 5032 stored in a memory, so as to implement any embodiment of the above artificial intelligence-based intention recognition method.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors 502, or digital signal processors 502 (Digital Signal Processors, DSPs). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor 502 may be a microprocessor 502 or the processor 502 may also be any conventional processor 502 and the like.
  • the computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium.
  • the computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiment.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the storage medium stores a computer program that, when executed by a processor, implements any embodiment of the artificial intelligence-based intention recognition method.
  • the computer-readable storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk, etc., which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

一种基于人工智能的意图识别的方法、装置、计算机设备,涉及人工智能技术,通过获取用户的输入信息(S110);处理所述输入信息以获得所述输入信息中的词语(S120);根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱(S130);将从所述领域知识图谱中获取的知识图谱的个数进行判断以获得符合所述输入信息的知识图谱并以此获得用户的意图。该方法基于知识图谱技术,解决了现有技术中存在意图识别时出现准确性不高,拓展性不强的问题,提高了在意图识别技术领域中的效率。

Description

基于人工智能的意图识别的方法、装置、计算机设备
本申请要求于2020年04月28日提交中国专利局、申请号为202010351307.1,申请名称为“基于人工智能的意图识别的方法、装置、计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉人工智能技术领域,尤其涉及一种基于人工智能的意图识别的方法、装置、计算机设备。
背景技术
意图识别是通过分类的办法将句子或者我们常说的query分到相应的意图种类。例如,我想听周杰伦的歌,这个query的意图便是属于音乐意图,我想听郭德纲的相声便是属于电台意图。现有的意图识别的主流方法有基于词典以及模板的规则方法、基于查询点击日志、基于分类模型来对用户的意图进行判别三种方法,但发明人意识到目前这三种方法的最大难点在于标注数据的获取,而标注数据的获取通常来自两方面,一方面是专门的数据标注团队对数据进行标注,一方面是通过半监督的方式自动生成标注数据,从而存在进行意图识别时出现准确性不高,拓展性不强的问题。
发明内容
本申请实施例提供了一种基于人工智能的意图识别的方法、装置、计算机设备,旨在解决现有技术中存在意图识别时出现准确性不高,拓展性不强的问题。
第一方面,本申请实施例提供了一种基于人工智能的意图识别的方法,其包括:
获取用户的输入信息;
处理所述输入信息以获得所述输入信息中的词语;
根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
判断与所述输入信息相匹配的知识图谱的个数;
若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
第二方面,本申请实施例提供了一种基于人工智能的意图识别的装置,其包括:
输入信息获取单元,用于获取用户的输入信息;
输入信息处理单元,用于处理所述输入信息以获得所述输入信息中的词语;
获取单元,用于根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
第一判断单元,用于判断与所述输入信息相匹配的知识图谱的个数;
第一识别单元,用于若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
第二识别单元,用于若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
第三方面,本申请实施例又提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:
获取用户的输入信息;
处理所述输入信息以获得所述输入信息中的词语;
根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
判断与所述输入信息相匹配的知识图谱的个数;
若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下步骤:
获取用户的输入信息;
处理所述输入信息以获得所述输入信息中的词语;
根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
判断与所述输入信息相匹配的知识图谱的个数;
若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
本申请实施例解决了现有技术中存在意图识别时出现准确性不高,拓展性不强的问题,极大的提高了在意图识别技术领域中的效率。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的基于人工智能的意图识别的方法的流程示意图;
图2为本申请实施例提供的基于人工智能的意图识别的方法的子流程示意图;
图3为本申请实施例提供的基于人工智能的意图识别的方法的另一子流程示意图;
图4为本申请实施例提供的基于人工智能的意图识别的方法的另一子流程示意图;
图5为本申请实施例提供的基于人工智能的意图识别的方法的另一子流程示意图;
图6为本申请实施例提供的基于人工智能的意图识别的方法的另一子流程示意图;
图7为本申请实施例提供的基于人工智能的意图识别的装置的示意性框图;
图8为本申请实施例提供的基于人工智能的意图识别的装置的子单元意性框图;
图9为本申请实施例提供的基于人工智能的意图识别的装置的另一子单元意性框图;
图10为本申请实施例提供的基于人工智能的意图识别的装置的另一子单元意性框图;
图11为本申请实施例提供的基于人工智能的意图识别的装置的另一子单元意性框图;
图12为本申请实施例提供的基于人工智能的意图识别的装置的另一子单元意性框图;
图13为本申请实施例提供的计算机设备的示意性框图;
图14为本申请实施例提供的已建立的银行领域中信用卡查询意图的知识图谱;
图15为本申请实施例提供的已建立的银行领域中信用卡提升额度的知识图谱;
图16为本申请实施例提供的输入信息的依存关系图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1,图1为本申请实施例提供的基于人工智能的意图识别的方法的流程示意图。该基于人工智能的意图识别的方法应用于用户终端中,该方法通过安装于用户终端中的应用软件进行执行,用户终端即是用于执行基于人工智能的意图识别的方法以实现对用户输入的信息进行意图识别的终端设备,例如台式电脑、笔记本电脑、平板电脑或手机等。
如图1所示,该方法包括步骤S110~S160。
S110、获取用户的输入信息。
获取用户的输入信息。具体的,用户终端既可以通过用户在用户终端输入的文本信息以获取用户的输入信息,也可以通过用户在用户终端上输入的语音信息以获取用户的输入信息,用户终端只需提供给用户一个可输入信息的途径,用户终端便可获取用户的输入信息。即用户终端可以为具有语音采集功能和/或文字信息采集功能的终端设备,如手机、平板电脑、车载电话等。
S120、处理所述输入信息以获得所述输入信息中的词语。
处理所述输入信息以获得所述输入信息中的词语。具体的,在获取用户的输入信息后,用户终端将所述输入信息进行处理便可获得所述输入信息中的词语。例如,用户终端获取用户的输入信息为“我想查询银行卡的余额”,用户终端对所述输入信息进行处理,从而得到的词语分别为“我”、“想”、“查询”、“银行卡”、“的”、“余额”,即为所述输入信息中的词语。
在一实施例中,如图2所示,步骤S120包括子步骤S121、S122和S123。
S121、判断所述输入信息的类型。
判断所述输入信息的类型。具体的,由于终端获取用户的输入信息既可以为文本信息,也可以为语音信息,而语音信息是需要转换成文本信息后进行处理才能得到后续步骤中所述输入信息的词语,因此终端获取到用户的输入信息后需对用户的输入信息进行判断以得到所述输入信息的类型。
S122、若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息。
若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息。具体的,当用户从用户终端处的语音信息采集功能处输入信息时,终端便可判定所述输入信息为语音输入信息,然后便可将该语音输入信息进行转换以得到与该语音信息相对应的文本信息。
S123、处理所述文本信息以获得所述输入信息中的词语。
处理所述文本信息以获得所述输入信息中的词语。例如,当所述文本信息为“我想查询银行卡的余额”时,用户终端对所述文本信息进行处理,从而得到所述输入信息中的词语,所述词语分别为“我”、“想”、“查询”、“银行卡”、“的”、“余额”。
在一实施例中,如图3所示,步骤S123包括子步骤S1231、S1232和S1233。
S1231、根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表。
根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表。具体的,所述分词处理模型预置于终端中,所述分词处理模型用于对所述文本信息进行分词处理,从而得到所述文本信息的词汇表。例如,所述文本信息为“我想查询银行卡的余额”时,所述分词处理模型将所述文本信息进行分词处理,从而得到所述文本词汇表,所述文本词汇表为X={我、想、查、询、银、行、卡、的、余、额}。
S1232、标注所述文本词汇表中的词汇以得到标注后的词汇。
标注所述文本词汇表中的词汇以得到标注后的词汇。具体的,所述文本词汇表被标注后,即可获得所述文本词汇表中的词汇的属性以及所述文本词汇表中的词汇的上下文连接关系。例如,当所述文本词汇表为X={我、想、查、询、银、行、卡、的、余、额}时,即可得到所述文本词汇表中“我”、“想”、“查”、“询”、“银”、“行”、“卡”、“的”、“余”、“额”的属性以及连接关系。
S1233、将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。
将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。具体的,所述文本词汇表中的词汇的属性以及所述文本词汇表中的词汇的上下文连接关系得到后,便可根据所述文本词汇表中的词汇的属性以及所述文本词汇表中的词汇的上下文连接关系进行组合拆分,最终得到所述输入信息中的词语。例如,当所述文本词汇表中“我”、“想”、“查”、“询”、“银”、 “行”、“卡”、“的”、“余”、“额”的属性以及连接关系确定后,根据其属性以及连接关系进行组合拆分便可得到所述输入信息中的词语分别为“我”、“想”、“查询”、“银行卡”、“的”、“余额”。
S130、根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱。
根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱。具体的,领域知识图谱为已在指定领域内建立的知识图谱,其中领域知识图谱中可以存在多个同一领域不同类型的知识图谱,例如,在银行领域中可以建立银行领域的知识图谱,银行领域的知识图谱可以存在查询意图的知识图谱,也可以存在提升额度的知识图谱,将输入信息中的词语与银行领域中查询意图的知识图谱中的知识因子以及提升额度的知识图谱中的知识因子进行匹配以获得与输入信息相匹配的知识图谱。
在一实施例中,如图4所示,步骤S130包括子步骤S131和S132。
S131、判断所述词语与所述知识图谱中的预置的知识因子是否匹配。
判断所述词语与所述知识图谱中的预置的知识因子是否匹配。其中,所述词语为对所述输入信息进行筛选后得到的词语,所述知识因子指的是已经建立好的知识图谱中用于表示知识图谱的信息。将所述词语与所述知识图谱中所有的知识因子进行匹配以得到所述知识图谱与所述输入信息是否匹配的结果。具体的,所述词语与所述知识图谱中所有的知识因子进行匹配,若所述词语的词义与所述知识因子的词义相似,则也可判定所述词语与所述知识因子相匹配,进而得到所述知识图谱与所述输入信息是否匹配的结果。例如,所述输入信息为“我想查询银行卡的余额”时,将所述输入信息中的修饰词语“想”和“的”剔除,则得到所述词语分别为我、查询、银行卡、余额;如图14所示,图14为本申请实施例中已建立的银行领域中信用卡查询意图的知识图谱,其中,图14的知识图谱中的知识因子分别为钱、消费、客户、查询、信用卡、属性、额度、数量,根据所述词语中的我、查询、银行卡、余额来查找例如图14中的知识图谱是否含有与所述词语相同或相似的知识因子,进而得出图14中的知识图谱与所述输入信息是否匹配的结果。其中所述词语中的银行卡的词义与图14中的信用卡的词义相似,因此可判定图14的知识图谱中的知识因子“信用卡”与所述词语中的“银行卡”相匹配。
S132、若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。
若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。具体的,所述词语与所述知识因子相匹配后,则该领域中所有包含有所述知识因子的知识图谱都被获取。例如,当输入信息为“提高我可以使用的钱”时,将所述输入信息中的修饰词语“可以”和“的”剔除,则得到所述词语分别为提高、我、使用、钱,根据所述词语中的提高、我、使用、钱来查找例如图14和图15中的知识图谱是否含有与所述词语相同或相似的知识因子,其中图14为本申请实施例中已建立的银行领域中信用卡查询意图的知识图谱;图15为本申请实施例中已建立的银行领域中信用卡提升额度的知识图谱;从而得出图14和图15中的知 识图谱与所述输入信息相匹配,并获取图14和图15中的知识图谱。
S140、判断与所述输入信息相匹配的知识图谱的个数。
判断与所述输入信息相匹配的知识图谱的个数。具体的,所述领域知识图谱包括至少一个知识图谱,将所述输入信息中的词语填入预置的领域知识图谱中以获取与所述输入信息相匹配的知识图谱的个数至少为一个,而所述领域知识图谱中的每个知识图谱所代表的意图是不相同的,因此,需要对从所述领域知识图谱中获取的知识图谱的个数进行判断以筛选出最符合用户意图的知识图谱。例如,所述输入信息中的词语中包含“银行卡”时,则会获取得到如图14和图15已建立的银行领域中信用卡查询意图的知识图谱和提升额度的知识图谱;当所述输入信息中的词语中包含“银行卡”、“查询”时,则会获取得到如图14已建立的银行领域中信用卡查询意图的知识图谱。
S150、若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图。
若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图。具体的,当所述与所述输入信息相匹配的知识图谱的个数为1时,则可确定该知识图谱为该输入信息的目标知识图谱,通过该目标知识图谱可以获得与输入该信息的用户的意图。例如,当所述输入信息中的词语中包含“银行卡”、“查询”时,则会获取得到如图14已建立的银行领域中信用卡查询意图的知识图谱,则可确定该知识图谱该输入信息的目标知识图谱,通过该目标知识图谱可以获得与输入该信息的用户的意图。
S160、若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。具体的,所述筛选规则为用于对所述多个知识图谱进行筛选以得到最符合用户意图的知识图谱的规则信息。由于所述领域知识图谱中的每个知识图谱所代表的意图是不相同的,而通过所述输入信息获得与所述输入信息相匹配的知识图谱可以为多个代表不同意图的知识图谱,因此在所述多个知识图谱筛选时,可根据所述输入信息的中整体语义进行解析后,通过该解析结果来对所述多个知识图谱进行筛选以获得符合所述输入信息的目标知识图谱并以此获得用户的意图。
另外,也可以计算所述多个知识图谱的每个知识图谱中与所述词语相匹配的知识因子的个数,将该知识因子个数最多的知识图谱作为所述输入信息的目标知识图谱并以此获得用户的意图。
在一实施例中,如图5所示,步骤S160包括子步骤S161和S162。
S161、计算所述多个知识图谱的每个知识图谱中的目标知识因子的数量,其中所述目标知识因子为知识图谱中与所述词语相匹配的知识因子。
计算所述多个知识图谱的每个知识图谱中的目标知识因子的数量,其中所述目标知识因子为知识图谱中与所述词语相匹配的知识因子。具体的,所述目标知识因子为每个知识图谱 中与所述词语相匹配的知识因子。例如,所述输入信息为“提高我可以使用的钱”,获取到的知识图谱为查询意图的知识图谱和提升额度的知识图谱时,分别对查询意图的知识图谱和提升额度的知识图谱中与该输入信息中的词语相匹配的知识因子的个数进行计算,从而计算得到查询意图的知识图谱中有3个知识因子与该输入信息中的词语相匹配,提升额度的知识图谱中有4个知识因子与该输入信息中的词语相匹配。
S162、将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图。
将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图。具体的,所述输入信息为“提高我可以使用的钱”,图14的知识图谱中含有所述目标因子的个数为3个,而图15的知识图谱中含有所述目标知识因子的个数为4个,故可将图15的知识图谱作为目标知识图谱并以此获得用户的意图。
在一实施例中,如图6所示,步骤S162包括子步骤S1621和S1622。
S1621、判断所述具有最多目标知识因子的知识图谱的数量是否大于1。
判断所述具有最多目标知识因子的知识图谱的数量是否大于1。具体的,所述具有最多目标知识因子的知识图谱可以具有两个时或两个以上的不同类型的知识图谱,当该知识图谱中的目标知识因子的个数与输入信息中词语相匹配的个数相同时是无法得出用户的知识图谱的。例如,所述输入信息为“我来查询下信用卡中可使用的钱是否提高了”时,则查询意图的知识图谱和提升额度的知识图谱中的目标知识因子的个数均与该输入信息中词语的匹配个数相同,即所述具有最多目标知识因子的知识图谱为两个知识图谱。
S1622、若所述具有最多目标知识因子的知识图谱的数量大于1,根据所述词语的依存句法关系从多个所述具有最多目标知识因子的知识图谱中获取目标知识图谱并以此获得用户的意图。
若所述具有最多目标知识因子的知识图谱的数量大于1,根据所述词语的依存句法关系从多个所述具有最多目标知识因子的知识图谱中获取目标知识图谱并以此获得用户的意图。具体的,句法分析即为分析文本词汇表中标注后的词语之间的依存关系。例如,所述输入信息中的词语分别为“我”、“来”、“查询”、“下”、“信用卡”、“中”、“可使用”、“的”、“钱”、“是否”、“提高”、“了”时,通过输入信息中词语间的依存句法关系可以确定该输入信息的用户的意图是符合查询意图的知识图谱,从而确定了用户的意图为查询意图。其中,所述输入信息“我来查询下信用卡中可使用的钱是否提高了”的其依存关系如图16,通过图16可以得出所述输入信息中的词语之间的结构关系,从而获得所述输入信息的深层次语义,进而得出用户的真实意图。
本申请实施例还提供了一种基于人工智能的意图识别的装置100,该装置用于执行前述意图识别的任一实施例。具体地,请参阅图7,图7是本申请实施例提供的基于人工智能的意图识别的装置100的示意性框图。
如图7所示,基于人工智能的意图识别的装置100包括输入信息获取单元110、输入信息处理单元120、获取单元130、第一判断单元140、第一识别单元150、第二识别单元160。
输入信息获取单元110,用于获取用户的输入信息。
输入信息处理单元120,用于处理所述输入信息以获得所述输入信息中的词语。
在其他申请实施例中,如图8所示,所述输入信息处理单元120包括类型判断单元121、转换单元122和文本信息处理单元123。
类型判断单元121,用于判断所述输入信息的类型。
转换单元122,用于若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息。
文本信息处理单元123,用于处理所述文本信息以获得所述输入信息中的词语。
在其他申请实施例中,如图9所示,文本信息处理单元123包括文本分词单元1231、词汇标注单元1232和解析单元1333。
文本分词单元1231,用于根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表。
词汇标注单元1232,用于标注所述文本词汇表中的词汇以得到标注后的词汇。
解析单元1233,用于将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。
获取单元130,用于根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱。
在其他申请实施例中,如图10所示,所述获取单元130包括第二判断单元131和知识图谱获取单元132。
第二判断单元131,用于判断所述词语与所述知识图谱中的预置的知识因子是否匹配。
知识图谱获取单元132,用于若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。
第一判断单元140,用于判断与所述输入信息相匹配的知识图谱的个数。
第一识别单元150,用于若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图。
第二识别单元160,用于若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
在其他申请实施例中,如图11所示,所述第二识别单元160包括计算单元161和第三识别单元162。
计算单元161,用于计算所述多个知识图谱的每个知识图谱中的目标知识因子的数量,其中所述目标知识因子为知识图谱中与所述词语相匹配的知识因子。
第三识别单元162,用于将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图。
在其他申请实施例中,如图12所示,所述第三识别单元162包括第三判断单元1621和第四识别单元1622。
第三判断单元1621,用于判断所述具有最多目标知识因子的知识图谱的数量是否大于1。
第四识别单元1622,用于若所述具有最多目标知识因子的知识图谱的数量大于1,根据所述词语的依存句法关系从多个所述具有最多目标知识因子的知识图谱中获取目标知识图谱 并以此获得用户的意图。
请参阅图13,图13是本申请实施例提供的计算机设备的示意性框图。
参阅图13,该设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行基于人工智能的意图识别的方法。该处理器502用于提供计算和控制能力,支撑整个设备500的运行。该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行基于人工智能的意图识别的方法。该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的设备500的限定,具体的设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述基于人工智能的意图识别的方法的任一实施例。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器502、数字信号处理器502(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器502可以是微处理器502或者该处理器502也可以是任何常规的处理器502等。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质可以为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。
因此,本申请还提供了一种计算机可读存储介质。该计算机可读存储介质可以是非易失性,也可以是易失性。该存储介质存储有计算机程序,该计算机程序当被处理器执行时实现上述基于人工智能的意图识别的方法的任一实施例。
该计算机可读存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。 因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种基于人工智能的意图识别的方法,其中,包括:
    获取用户的输入信息;
    处理所述输入信息以获得所述输入信息中的词语;
    根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
    判断与所述输入信息相匹配的知识图谱的个数;
    若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
    若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
  2. 根据权利要求1所述的基于人工智能的意图识别的方法,其中,所述处理所述输入信息以获得所述输入信息中的词语,包括:
    判断所述输入信息的类型;
    若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息;
    处理所述文本信息以获得所述输入信息中的词语。
  3. 根据权利要求2所述的基于人工智能的意图识别的方法,其中,所述处理所述文本信息以获得所述输入信息中的词语,包括:
    根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表;
    标注所述文本词汇表中的词汇以得到标注后的词汇;
    将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。
  4. 根据权利要求1所述的基于人工智能的意图识别的方法,其中,所述根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,包括:
    判断所述词语与所述知识图谱中的预置的知识因子是否匹配;
    若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。
  5. 根据权利要求1所述的基于人工智能的意图识别的方法,其中,所述判断与所述输入信息相匹配的知识图谱的个数,包括:
    通过获取预置的领域知识图谱中知识图谱的个数来判断与所述输入信息相匹配的知识图谱的个数。
  6. 根据权利要求1所述的基于人工智能的意图识别的方法,其中,所述根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图,包括:
    计算所述多个知识图谱的每个知识图谱中的目标知识因子的数量,其中所述目标知识因子为知识图谱中与所述词语相匹配的知识因子;
    将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图。
  7. 根据权利要求6所述的基于人工智能的意图识别的方法,其中,所述将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图,包括:
    判断所述具有最多目标知识因子的知识图谱的数量是否大于1;
    若所述具有最多目标知识因子的知识图谱的数量大于1,根据所述词语的依存句法关系从多个所述具有最多目标知识因子的知识图谱中获取目标知识图谱并以此获得用户的意图。
  8. 一种基于人工智能的意图识别的装置,其中,包括:
    输入信息获取单元,用于获取用户的输入信息;
    输入信息处理单元,用于处理所述输入信息以获得所述输入信息中的词语;
    获取单元,用于根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
    第一判断单元,用于判断与所述输入信息相匹配的知识图谱的个数;
    第一识别单元,用于若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
    第二识别单元,用于若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
  9. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时执行以下步骤:
    获取用户的输入信息;
    处理所述输入信息以获得所述输入信息中的词语;
    根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
    判断与所述输入信息相匹配的知识图谱的个数;
    若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
    若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
  10. 根据权利要求9所述的计算机设备,其中,所述处理所述输入信息以获得所述输入信息中的词语,包括:
    判断所述输入信息的类型;
    若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息;
    处理所述文本信息以获得所述输入信息中的词语。
  11. 根据权利要求10所述的计算机设备,其中,所述处理所述文本信息以获得所述输入信息中的词语,包括:
    根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表;
    标注所述文本词汇表中的词汇以得到标注后的词汇;
    将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。
  12. 根据权利要求9所述的计算机设备,其中,所述根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,包括:
    判断所述词语与所述知识图谱中的预置的知识因子是否匹配;
    若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。
  13. 根据权利要求9所述的计算机设备,其中,所述判断与所述输入信息相匹配的知识图谱的个数,包括:
    通过获取预置的领域知识图谱中知识图谱的个数来判断与所述输入信息相匹配的知识图谱的个数。
  14. 根据权利要求9所述的计算机设备,其中,所述根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图,包括:
    计算所述多个知识图谱的每个知识图谱中的目标知识因子的数量,其中所述目标知识因子为知识图谱中与所述词语相匹配的知识因子;
    将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图。
  15. 根据权利要求14所述的计算机设备,其中,所述将具有最多目标知识因子的知识图谱作为目标知识图谱并以此获得用户的意图,包括:
    判断所述具有最多目标知识因子的知识图谱的数量是否大于1;
    若所述具有最多目标知识因子的知识图谱的数量大于1,根据所述词语的依存句法关系从多个所述具有最多目标知识因子的知识图谱中获取目标知识图谱并以此获得用户的意图。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行以下步骤:
    获取用户的输入信息;
    处理所述输入信息以获得所述输入信息中的词语;
    根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;
    判断与所述输入信息相匹配的知识图谱的个数;
    若所述与所述输入信息相匹配的知识图谱的个数为1,则确定所述与所述输入信息相匹配的知识图谱为目标知识图谱并以此获得用户的意图;
    若所述与所述输入信息相匹配的知识图谱为多个知识图谱,根据预设的筛选规则对所述多个知识图谱进行筛选以获得目标知识图谱并以此获得用户的意图。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述处理所述输入信息以获得所述输入信息中的词语,包括:
    判断所述输入信息的类型;
    若所述输入信息的类型为语音输入信息,将所述语音输入信息转换为文本信息;
    处理所述文本信息以获得所述输入信息中的词语。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述处理所述文本信息以获得所述输入信息中的词语,包括:
    根据预置的分词处理模型对所述文本信息进行分词处理以获得文本词汇表;
    标注所述文本词汇表中的词汇以得到标注后的词汇;
    将所述标注后的词汇进行解析处理以得到所述输入信息中的词语。
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,包括:
    判断所述词语与所述知识图谱中的预置的知识因子是否匹配;
    若所述词语与所述知识因子相匹配,根据所述知识因子获取相匹配的知识图谱。
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述判断与所述输入信息相匹配的知识图谱的个数,包括:
    通过获取预置的领域知识图谱中知识图谱的个数来判断与所述输入信息相匹配的知识图谱的个数。
PCT/CN2020/125065 2020-04-28 2020-10-30 基于人工智能的意图识别的方法、装置、计算机设备 WO2021218087A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010351307.1A CN111680507A (zh) 2020-04-28 2020-04-28 基于人工智能的意图识别的方法、装置、计算机设备
CN202010351307.1 2020-04-28

Publications (1)

Publication Number Publication Date
WO2021218087A1 true WO2021218087A1 (zh) 2021-11-04

Family

ID=72452295

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125065 WO2021218087A1 (zh) 2020-04-28 2020-10-30 基于人工智能的意图识别的方法、装置、计算机设备

Country Status (2)

Country Link
CN (1) CN111680507A (zh)
WO (1) WO2021218087A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143193A (zh) * 2021-12-07 2022-03-04 天翼物联科技有限公司 网络配置方法、装置、计算机设备及存储介质
CN114676691A (zh) * 2022-05-27 2022-06-28 深圳市人马互动科技有限公司 一种识别方法、系统、设备以及计算机可读存储介质
CN115982352A (zh) * 2022-12-12 2023-04-18 北京百度网讯科技有限公司 文本分类方法、装置以及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034780A1 (en) * 2017-07-31 2019-01-31 Microsoft Technology Licensing, Llc Knowledge Graph For Conversational Semantic Search
CN110704641A (zh) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 一种万级意图分类方法、装置、存储介质及电子设备
CN110795528A (zh) * 2019-09-05 2020-02-14 腾讯科技(深圳)有限公司 一种数据查询方法、装置、电子设备及存储介质
CN110909159A (zh) * 2019-09-29 2020-03-24 珠海格力电器股份有限公司 一种用户意图识别方法、装置、终端及存储介质
CN111678057A (zh) * 2020-06-05 2020-09-18 卢小玲 一种帐篷用便携式照明设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034780A1 (en) * 2017-07-31 2019-01-31 Microsoft Technology Licensing, Llc Knowledge Graph For Conversational Semantic Search
CN110795528A (zh) * 2019-09-05 2020-02-14 腾讯科技(深圳)有限公司 一种数据查询方法、装置、电子设备及存储介质
CN110909159A (zh) * 2019-09-29 2020-03-24 珠海格力电器股份有限公司 一种用户意图识别方法、装置、终端及存储介质
CN110704641A (zh) * 2019-10-11 2020-01-17 零犀(北京)科技有限公司 一种万级意图分类方法、装置、存储介质及电子设备
CN111678057A (zh) * 2020-06-05 2020-09-18 卢小玲 一种帐篷用便携式照明设备

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143193A (zh) * 2021-12-07 2022-03-04 天翼物联科技有限公司 网络配置方法、装置、计算机设备及存储介质
CN114143193B (zh) * 2021-12-07 2024-02-20 天翼物联科技有限公司 网络配置方法、装置、计算机设备及存储介质
CN114676691A (zh) * 2022-05-27 2022-06-28 深圳市人马互动科技有限公司 一种识别方法、系统、设备以及计算机可读存储介质
CN114676691B (zh) * 2022-05-27 2022-09-09 深圳市人马互动科技有限公司 一种识别方法、系统、设备以及计算机可读存储介质
CN115982352A (zh) * 2022-12-12 2023-04-18 北京百度网讯科技有限公司 文本分类方法、装置以及设备
CN115982352B (zh) * 2022-12-12 2024-04-02 北京百度网讯科技有限公司 文本分类方法、装置以及设备

Also Published As

Publication number Publication date
CN111680507A (zh) 2020-09-18

Similar Documents

Publication Publication Date Title
WO2021218087A1 (zh) 基于人工智能的意图识别的方法、装置、计算机设备
CN107818781B (zh) 智能交互方法、设备及存储介质
US10664660B2 (en) Method and device for extracting entity relation based on deep learning, and server
US20190034543A1 (en) Analyzing Concepts Over Time
TWI729472B (zh) 特徵詞的確定方法、裝置和伺服器
CN107992585B (zh) 通用标签挖掘方法、装置、服务器及介质
US9971967B2 (en) Generating a superset of question/answer action paths based on dynamically generated type sets
US9037615B2 (en) Querying and integrating structured and unstructured data
CN108027814B (zh) 停用词识别方法与装置
WO2021135603A1 (zh) 意图识别方法、服务器及存储介质
WO2020143186A1 (zh) 推荐系统训练方法、装置、计算机设备及存储介质
EP2757493A2 (en) Natural language processing method and system
AU2017216520A1 (en) Common data repository for improving transactional efficiencies of user interactions with a computing device
WO2020233360A1 (zh) 一种产品测评模型的生成方法及设备
CN110362601A (zh) 元数据标准的映射方法、装置、设备及存储介质
CN110569289A (zh) 基于大数据的列数据处理方法、设备及介质
CN111666372B (zh) 解析查询词query的方法、装置、电子设备和可读存储介质
US20220067591A1 (en) Machine learning model selection and explanation for multi-dimensional datasets
TW201905734A (zh) 語意分析裝置、方法及其電腦程式產品
CN112069267A (zh) 一种数据处理方法和装置
CN112541357B (zh) 实体识别方法、装置及智能设备
CN115438718A (zh) 情感识别方法、装置、计算机可读存储介质及终端设备
WO2021098491A1 (zh) 知识图谱的生成方法、装置、终端以及存储介质
CN111401034B (zh) 文本的语义分析方法、语义分析装置及终端
CN114971833A (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: 20934118

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: 20934118

Country of ref document: EP

Kind code of ref document: A1