Artificial intelligence-based intention recognition method and device, and computer equipment

文档序号:1170286 发布日期:2020-09-18 浏览:8次 中文

阅读说明:本技术 基于人工智能的意图识别的方法、装置、计算机设备 (Artificial intelligence-based intention recognition method and device, and computer equipment ) 是由 范灿华 胡宏伟 马骏 王少军 于 2020-04-28 设计创作,主要内容包括:本发明涉及人工智能技术,公开了一种基于人工智能的意图识别的方法、装置、计算机设备,通过获取用户的输入信息;处理所述输入信息以获得所述输入信息中的词语;根据所述输入信息中的词语以及预置的领域知识图谱获取与所述输入信息相匹配的知识图谱,其中,所述领域知识图谱包括至少一个知识图谱;将从所述领域知识图谱中获取的知识图谱的个数进行判断以获得符合所述输入信息的知识图谱并以此获得用户的意图。本发明基于知识图谱技术,解决了现有技术中存在意图识别时出现准确性不高,拓展性不强的问题,极大的提高了在意图识别技术领域中的效率。(The invention relates to artificial intelligence technology, and discloses an intention identification method, device and computer equipment based on artificial intelligence, which comprises the steps of obtaining input information of a user; processing the input information to obtain words in the input information; acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph; and judging the number of the knowledge graphs acquired from the domain knowledge graph to acquire the knowledge graph according with the input information so as to acquire the intention of the user. The method is based on knowledge graph technology, solves the problems of low accuracy and low expansibility during intention identification in the prior art, and greatly improves the efficiency in the technical field of intention identification.)

1. A method for artificial intelligence based intent recognition, comprising:

acquiring input information of a user;

processing the input information to obtain words in the input information;

acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph;

judging the number of the knowledge maps matched with the input information;

if the number of the knowledge maps matched with the input information is 1, determining the knowledge map matched with the input information as a target knowledge map and obtaining the intention of the user according to the target knowledge map;

and if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

2. The artificial intelligence based intent recognition method of claim 1, wherein the processing the input information to obtain words in the input information comprises:

judging the type of the input information;

if the type of the input information is voice input information, converting the voice input information into text information;

the text information is processed to obtain words in the input information.

3. The artificial intelligence based intent recognition method of claim 2, wherein the processing the textual information to obtain words in the input information comprises:

performing word segmentation processing on the text information according to a preset word segmentation processing model to obtain a text vocabulary;

labeling the vocabulary in the text vocabulary to obtain the labeled vocabulary;

and analyzing the marked words to obtain words in the input information.

4. The artificial intelligence based intention recognition method of claim 1, wherein the obtaining a knowledge graph matching the input information according to words in the input information and a preset domain knowledge graph comprises:

judging whether the words are matched with preset knowledge factors in the knowledge graph or not;

and if the words are matched with the knowledge factors, acquiring a matched knowledge graph according to the knowledge factors.

5. The artificial intelligence based intention recognition method of claim 1, wherein the screening the knowledge-graphs according to preset screening rules to obtain target knowledge-graphs and thereby obtain the intention of the user comprises:

calculating the number of target knowledge factors in each knowledge graph of the plurality of knowledge graphs, wherein the target knowledge factors are knowledge factors matched with the words in the knowledge graphs;

and taking the knowledge graph with the most target knowledge factors as a target knowledge graph to obtain the intention of the user.

6. The artificial intelligence based intention recognition method of claim 5, wherein taking the knowledge-graph with the most target knowledge factors as a target knowledge-graph and obtaining the user's intention therefrom comprises:

judging whether the number of the knowledge graphs with the most target knowledge factors is more than 1;

and if the number of the knowledge graphs with the most target knowledge factors is more than 1, acquiring a target knowledge graph from a plurality of knowledge graphs with the most target knowledge factors according to the dependency syntax relation of the words, and acquiring the intention of the user according to the target knowledge graph.

7. An apparatus for artificial intelligence based intent recognition, comprising:

an input information acquisition unit for acquiring input information of a user;

an input information processing unit for processing the input information to obtain words in the input information;

the acquisition unit is used for acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph;

the first judging unit is used for judging the number of the knowledge maps matched with the input information;

the first identification unit is used for determining the knowledge graph matched with the input information as a target knowledge graph and obtaining the intention of the user according to the target knowledge graph if the number of the knowledge graphs matched with the input information is 1;

and the second identification unit is used for screening the knowledge maps according to a preset screening rule to obtain a target knowledge map and obtain the intention of the user if the knowledge map matched with the input information is a plurality of knowledge maps.

8. The artificial intelligence based intent recognition apparatus of claim 7, wherein the

A type judgment unit for judging the type of the input information;

the conversion unit is used for converting the voice input information into text information if the type of the input information is the voice input information;

and the text information processing unit is used for processing the text information to obtain words in the input information.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the artificial intelligence based intent recognition method according to any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the method for artificial intelligence based intention recognition according to any one of claims 1 to 6.

Technical Field

The invention relates to the technical field of artificial intelligence, in particular to an intention identification method, an intention identification device and computer equipment based on artificial intelligence.

Background

The intention recognition is to classify sentences or query commonly spoken by us into corresponding intention categories by means of classification. For example, i want to listen to the song of Zhou Jieren, the intent of this query is to belong to the musical intent, and i want to listen to the phase sound of Guo Dege is to belong to the station intent. The main methods of the existing intention recognition include a rule method based on a dictionary and a template, a rule method based on a query click log and a method of distinguishing the intention of a user based on a classification model, the biggest difficulty of the three methods is the acquisition of marked data, the acquisition of the marked data generally comes from two aspects, on one hand, a special data marking team marks the data, on the other hand, the marked data are automatically generated in a semi-supervision mode, and therefore the problems of low accuracy and poor expansibility exist in the process of intention recognition.

Disclosure of Invention

The embodiment of the invention provides an intention identification method, an intention identification device and computer equipment based on artificial intelligence, and aims to solve the problems of low accuracy and low expansibility during intention identification in the prior art.

In a first aspect, an embodiment of the present invention provides an artificial intelligence-based intention recognition method, which includes:

acquiring input information of a user;

processing the input information to obtain words in the input information;

acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph;

judging the number of the knowledge maps matched with the input information;

if the number of the knowledge maps matched with the input information is 1, determining the knowledge map matched with the input information as a target knowledge map and obtaining the intention of the user according to the target knowledge map;

and if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

In a second aspect, an embodiment of the present invention provides an apparatus for artificial intelligence based intention recognition, which includes:

an input information acquisition unit for acquiring input information of a user;

an input information processing unit for processing the input information to obtain words in the input information;

the acquisition unit is used for acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph;

the first judging unit is used for judging the number of the knowledge maps matched with the input information;

the first identification unit is used for determining the knowledge graph matched with the input information as a target knowledge graph and obtaining the intention of the user according to the target knowledge graph if the number of the knowledge graphs matched with the input information is 1;

and the second identification unit is used for screening the knowledge maps according to a preset screening rule to obtain a target knowledge map and obtain the intention of the user if the knowledge map matched with the input information is a plurality of knowledge maps.

In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the method for artificial intelligence based intention recognition as described in the first aspect.

In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method for artificial intelligence based intention recognition according to the first aspect.

The embodiment of the invention provides an intention identification method, device and computer equipment based on artificial intelligence, which comprises the steps of obtaining input information of a user; processing the input information to obtain words in the input information; acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph; and judging the number of the knowledge graphs acquired from the domain knowledge graph to acquire the knowledge graph according with the input information so as to acquire the intention of the user. By the method, the problems of low accuracy and low expansibility during intention identification in the prior art are solved, and the efficiency in the technical field of intention identification is greatly improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a schematic flow chart of a method for artificial intelligence based intention recognition according to an embodiment of the present invention;

FIG. 2 is a sub-flow diagram of a method for artificial intelligence based intent recognition according to an embodiment of the present invention;

FIG. 3 is a schematic view of another sub-flow of a method for artificial intelligence based intention recognition according to an embodiment of the present invention;

FIG. 4 is a schematic view of another sub-flow of a method for artificial intelligence based intention recognition according to an embodiment of the present invention;

FIG. 5 is a schematic view of another sub-flow chart of the artificial intelligence based intention recognition method according to the embodiment of the present invention;

FIG. 6 is a schematic view of another sub-flow of a method for artificial intelligence based intention recognition according to an embodiment of the present invention;

FIG. 7 is a schematic block diagram of an apparatus for artificial intelligence based intent recognition provided by an embodiment of the present invention;

FIG. 8 is a block diagram illustrating sub-units of an artificial intelligence based intent recognition apparatus according to an embodiment of the present invention;

FIG. 9 is a schematic block diagram of another sub-unit of an artificial intelligence based intention recognition apparatus provided by an embodiment of the present invention;

FIG. 10 is a schematic block diagram of another sub-unit of an artificial intelligence based intention recognition apparatus provided by an embodiment of the present invention;

FIG. 11 is a schematic block diagram of another sub-unit of an artificial intelligence based intention recognition apparatus provided by an embodiment of the present invention;

FIG. 12 is another schematic block diagram of sub-units of an artificial intelligence based intention recognition apparatus provided by an embodiment of the present invention;

FIG. 13 is a schematic block diagram of a computer apparatus provided by an embodiment of the present invention;

FIG. 14 is a knowledge graph of credit card inquiry intents in the banking domain as established according to an embodiment of the present invention;

FIG. 15 is a diagram of knowledge of credit card promotion in the banking domain, according to an embodiment of the present invention;

fig. 16 is a dependency graph of input information according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

Referring to fig. 1, fig. 1 is a schematic flow chart of an artificial intelligence-based intention recognition method according to an embodiment of the present invention. The method for identifying the intention based on the artificial intelligence is applied to a user terminal, and is executed through application software installed in the user terminal, namely, the user terminal is a terminal device, such as a desktop computer, a notebook computer, a tablet computer or a mobile phone, for executing the method for identifying the intention based on the artificial intelligence so as to identify the intention of information input by a user.

As shown in fig. 1, the method includes steps S110 to S160.

And S110, acquiring input information of a user.

Input information of a user is acquired. Specifically, the user terminal may obtain the input information of the user through text information input by the user at the user terminal, or may obtain the input information of the user through voice information input by the user at the user terminal. That is, the user terminal may be a terminal device having a voice collecting function and/or a text information collecting function, such as a mobile phone, a tablet computer, a car phone, and the like.

And S120, processing the input information to obtain words in the input information.

The input information is processed to obtain words in the input information. Specifically, after the input information of the user is obtained, the user terminal processes the input information to obtain the words in the input information. For example, the user terminal obtains the input information of the user as "i want to inquire the balance of the bank card", and the user terminal processes the input information, so that the obtained terms are "i", "want", "inquire", "bank card", "balance", respectively, which are the terms in the input information.

In an embodiment, as shown in fig. 2, step S120 includes sub-steps S121, S122 and S123.

And S121, judging the type of the input information.

And judging the type of the input information. Specifically, the input information of the user acquired by the terminal may be text information or voice information, and the voice information is a word that needs to be converted into text information and then processed to obtain the input information in the subsequent steps, so that the terminal needs to judge the input information of the user after acquiring the input information of the user to obtain the type of the input information.

And S122, if the type of the input information is voice input information, converting the voice input information into text information.

And if the type of the input information is voice input information, converting the voice input information into text information. Specifically, when a user inputs information from a voice information collecting function at a user terminal, the terminal may determine that the input information is voice input information, and may convert the voice input information to obtain text information corresponding to the voice information.

And S123, processing the text information to obtain words in the input information.

The text information is processed to obtain words in the input information. For example, when the text information is "i want to query the balance of the bank card", the user terminal processes the text information to obtain the words in the input information, where the words are "i", "want", "query", "bank card", "balance", respectively.

In one embodiment, as shown in fig. 3, step S123 includes sub-steps S1231, S1232, and S1233.

And S1231, performing word segmentation processing on the text information according to a preset word segmentation processing model to obtain a text vocabulary.

And performing word segmentation processing on the text information according to a preset word segmentation processing model to obtain a text vocabulary. Specifically, the word segmentation processing model is preset in the terminal, and the word segmentation processing model is used for performing word segmentation processing on the text information, so as to obtain a vocabulary of the text information. For example, when the text information is "i want to inquire the balance of the bank card", the word segmentation processing model performs word segmentation processing on the text information to obtain the text vocabulary, and the text vocabulary is X ═ i, i want, i ask, silver, line, card, remainder, and amount }.

And S1232, marking the vocabulary in the text vocabulary to obtain the marked vocabulary.

And labeling the vocabulary in the text vocabulary to obtain the labeled vocabulary. Specifically, after the text vocabulary is labeled, the attribute of the vocabulary in the text vocabulary and the context connection relationship of the vocabulary in the text vocabulary can be obtained. For example, when the text vocabulary is X ═ i, i.

And S1233, analyzing the marked words to obtain words in the input information.

And analyzing the marked words to obtain words in the input information. Specifically, after the attribute of the vocabulary in the text vocabulary and the context connection relationship of the vocabulary in the text vocabulary are obtained, the vocabulary in the text vocabulary can be combined and split according to the attribute of the vocabulary in the text vocabulary and the context connection relationship of the vocabulary in the text vocabulary, and finally the words in the input information are obtained. For example, after the attributes and connection relations of "i", "want", "search", "query", "bank", "line", "card", "remaining", "amount" in the text vocabulary are determined, the words in the input information are obtained by combining and splitting according to the attributes and connection relations, and the words are "i", "want", "query", "bank card", "remaining" and "remaining amount", respectively.

S130, acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph.

And acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph. Specifically, the domain knowledge graph is a knowledge graph established in a specified domain, wherein the domain knowledge graph may have a plurality of knowledge graphs of different types in the same domain, for example, a knowledge graph in a bank domain may be established, a knowledge graph in the bank domain may have a knowledge graph of an inquiry intention, or a knowledge graph of an elevated amount, and words in the input information are matched with knowledge factors in the knowledge graph of the inquiry intention in the bank domain and knowledge factors in the knowledge graph of the elevated amount to obtain a knowledge graph matched with the input information.

In one embodiment, as shown in fig. 4, step S130 includes sub-steps S131 and S132.

S131, judging whether the words are matched with preset knowledge factors in the knowledge graph or not.

And judging whether the words are matched with preset knowledge factors in the knowledge graph. The term is obtained by screening the input information, and the knowledge factor refers to information used for representing a knowledge graph in the established knowledge graph. And matching the words with all knowledge factors in the knowledge graph to obtain a result of whether the knowledge graph is matched with the input information. Specifically, the word is matched with all knowledge factors in the knowledge graph, and if the word senses of the word are similar to the word senses of the knowledge factors, the word can be judged to be matched with the knowledge factors, so that a result of whether the knowledge graph is matched with the input information is obtained. For example, when the input information is "i want to inquire the balance of the bank card", the modifying terms "want" and "in the input information are removed, and the terms are obtained as i, inquiry, the bank card and the balance respectively; as shown in fig. 14, fig. 14 is a knowledge graph of credit card query intentions in the banking field, which is established in an embodiment of the present invention, wherein knowledge factors in the knowledge graph of fig. 14 are money, consumption, customers, queries, credit cards, attributes, amounts, and quantities, respectively, and according to me, query, bank card, and balance in the terms, for example, whether the knowledge graph of fig. 14 contains knowledge factors identical or similar to the terms is found, so as to obtain a result of whether the knowledge graph of fig. 14 matches the input information. Where the word senses of the bank card in the words are similar to the word senses of the credit card in fig. 14, it may be determined that the knowledge factor "credit card" in the knowledge graph of fig. 14 matches the "bank card" in the words.

And S132, if the words are matched with the knowledge factors, acquiring a matched knowledge graph according to the knowledge factors.

And if the words are matched with the knowledge factors, acquiring a matched knowledge graph according to the knowledge factors. Specifically, after the words are matched with the knowledge factors, all knowledge maps containing the knowledge factors in the field are obtained. For example, when the input information is "improve money that can be used by me", the modifying terms "can" and "in the input information are removed, and the terms are respectively improved, me, use and money, and whether the knowledge graph in fig. 14 and 15 contains the same or similar knowledge factors as the terms or not is searched according to the improved, me, use and money in the terms, wherein fig. 14 is the established knowledge graph of the credit card query intention in the bank field in the embodiment of the present invention; FIG. 15 is a diagram illustrating an established knowledge graph of credit card credit line increases in the banking domain in accordance with an embodiment of the present invention; thereby obtaining the knowledge-graph of fig. 14 and 15 to match the input information and obtaining the knowledge-graph of fig. 14 and 15.

And S140, judging the number of the knowledge graphs matched with the input information.

And judging the number of the knowledge maps matched with the input information. Specifically, the domain knowledge graph includes at least one knowledge graph, the number of words in the input information filled into a preset domain knowledge graph to obtain a knowledge graph matched with the input information is at least one, and the intentions represented by each knowledge graph in the domain knowledge graph are different, so that the number of knowledge graphs obtained from the domain knowledge graph needs to be judged to screen out the knowledge graph which best meets the intentions of the user. For example, when the words in the input information include "bank card", the knowledge graph of the credit card query intention and the knowledge graph of the promotion amount in the bank field established as shown in fig. 14 and fig. 15 are obtained; when the words in the input information include "bank card" and "inquiry", a knowledge map of the credit card inquiry intention in the banking field is obtained as established in fig. 14.

S150, if the number of the knowledge graphs matched with the input information is 1, determining the knowledge graph matched with the input information as a target knowledge graph, and obtaining the intention of the user according to the target knowledge graph.

And if the number of the knowledge graphs matched with the input information is 1, determining the knowledge graph matched with the input information as a target knowledge graph and obtaining the intention of the user according to the target knowledge graph. Specifically, when the number of the knowledge graph matched with the input information is 1, the knowledge graph can be determined to be a target knowledge graph of the input information, and the intention of the user who inputs the information can be obtained through the target knowledge graph. For example, when the words in the input information include "bank card" and "inquiry", a knowledge graph of the credit card inquiry intention in the bank domain is obtained as set up in fig. 14, and a target knowledge graph of the input information can be determined, and the intention of the user who inputs the information can be obtained through the target knowledge graph.

And S160, if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

And if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user. Specifically, the screening rule is rule information for screening the knowledge graphs to obtain the knowledge graph which best meets the user intention. Because the intention represented by each knowledge graph in the domain knowledge graph is different, and the knowledge graph matched with the input information obtained through the input information can be a plurality of knowledge graphs representing different intentions, when the knowledge graphs are screened, the knowledge graphs can be screened through the analysis result after being analyzed according to the middle overall semantics of the input information, so that the target knowledge graph conforming to the input information can be obtained, and the intention of the user can be obtained.

In addition, the number of knowledge factors matching the words in each of the plurality of knowledge maps may be calculated, and the knowledge map with the largest number of knowledge factors may be used as the target knowledge map of the input information to obtain the intention of the user.

In one embodiment, as shown in fig. 5, step S160 includes sub-steps S161 and S162.

S161, calculating the number of target knowledge factors in each knowledge graph of the knowledge graphs, wherein the target knowledge factors are knowledge factors matched with the words in the knowledge graphs.

And calculating the number of target knowledge factors in each knowledge graph of the plurality of knowledge graphs, wherein the target knowledge factors are knowledge factors matched with the words in the knowledge graphs. Specifically, the target knowledge factor is a knowledge factor matched with the words in each knowledge graph. For example, when the input information is 'improve money that can be used by me', and the acquired knowledge graphs are the knowledge graph of the query intention and the knowledge graph of the promotion amount, the number of the knowledge factors matched with the words in the input information in the knowledge graph of the query intention and the knowledge graph of the promotion amount is calculated respectively, so that 3 knowledge factors in the knowledge graph of the query intention are calculated to be matched with the words in the input information, and 4 knowledge factors in the knowledge graph of the promotion amount are matched with the words in the input information.

And S162, taking the knowledge graph with the most target knowledge factors as a target knowledge graph to obtain the intention of the user.

And taking the knowledge graph with the most target knowledge factors as a target knowledge graph to obtain the intention of the user. Specifically, the input information is "increase money that i can use", the number of the target factors contained in the knowledge graph of fig. 14 is 3, and the number of the target factors contained in the knowledge graph of fig. 15 is 4, so that the knowledge graph of fig. 15 can be used as a target knowledge graph to obtain the intention of the user.

In one embodiment, as shown in fig. 6, step S162 includes sub-steps S1621 and S1622.

S1621, judging whether the number of the knowledge graphs with the most target knowledge factors is larger than 1.

And judging whether the number of the knowledge-graphs with the most target knowledge factors is more than 1. Specifically, the knowledge graph with the most target knowledge factors may have two or more different types of knowledge graphs, and when the number of the target knowledge factors in the knowledge graph is the same as the number of words in the input information, the knowledge graph of the user cannot be obtained. For example, if the input information is "i inquire whether money available in the credit card is increased", the number of the target knowledge factors in the knowledge graph inquiring the intention and the knowledge graph promoting the amount is the same as the matching number of the terms in the input information, that is, the knowledge graph with the most target knowledge factors is two knowledge graphs.

S1622, if the number of the knowledge graphs with the most target knowledge factors is larger than 1, acquiring a target knowledge graph from the knowledge graphs with the most target knowledge factors according to the dependency syntax relationship of the words, and obtaining the intention of the user.

And if the number of the knowledge graphs with the most target knowledge factors is more than 1, acquiring a target knowledge graph from a plurality of knowledge graphs with the most target knowledge factors according to the dependency syntax relation of the words, and acquiring the intention of the user according to the target knowledge graph. Specifically, the syntactic analysis is to analyze the dependency relationship between words labeled in the text vocabulary. For example, when the terms in the input information are "i", "come", "query", "down", "credit card", "middle", "usable", "money", "whether", "raise", "changed", respectively, it can be determined that the user's intention of the input information is a knowledge graph conforming to the query intention by the dependency syntax relationship between the terms in the input information, thereby determining that the user's intention is the query intention. The dependency relationship of the input information "i inquire whether money available in the credit card is increased" is as shown in fig. 16, and the structural relationship between terms in the input information can be obtained through fig. 16, so that the deep semantics of the input information is obtained, and the real intention of the user is obtained.

The embodiment of the invention also provides an artificial intelligence-based intention recognition device 100, which is used for executing any embodiment of the intention recognition. Specifically, referring to fig. 7, fig. 7 is a schematic block diagram of an apparatus 100 for artificial intelligence based intention recognition according to an embodiment of the present invention.

As shown in fig. 7, the artificial intelligence based intention recognition apparatus 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 acquisition unit 110 is used to acquire input information of a user.

The user terminal can obtain the input information of the user through the text information input by the user at the user terminal, and also can obtain the input information of the user through the voice information input by the user at the user terminal.

The input information processing unit 120 is configured to process the input information to obtain words in the input information.

After the input information of the user is obtained, the user terminal processes the input information to obtain words in the input information.

In other inventive embodiments, as shown in fig. 8, the input information processing unit 120 includes a type judgment unit 121, a conversion unit 122, and a text information processing unit 123.

The type judgment unit 121 is used for judging the type of the input information.

The input information of the user acquired by the terminal can be text information or voice information, and the voice information is a word which needs to be converted into text information and then processed to obtain the input information in the subsequent steps, so that the input information of the user needs to be judged to obtain the type of the input information after the terminal acquires the input information of the user.

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.

When a user inputs information from a voice information collecting function at a user terminal, the terminal can judge that the input information is voice input information, and then the voice input information can be converted to obtain text information corresponding to the voice information.

The text information processing unit 123 is configured to process the text information to obtain words in the input information.

In other embodiments of the invention, as shown in fig. 9, the text information processing unit 123 includes a text segmentation unit 1231, a vocabulary labeling unit 1232, and an analysis 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 word segmentation processing model is preset in the terminal and is used for carrying out word segmentation processing on the text information so as to obtain a vocabulary of the text information.

The vocabulary labeling unit 1232 is configured to label the vocabulary in the text vocabulary to obtain a labeled vocabulary.

After the text vocabulary is labeled, the attribute of the vocabulary in the text vocabulary and the context connection relation of the vocabulary in the text vocabulary can be obtained.

The analyzing unit 1233 is configured to analyze the labeled vocabulary to obtain a word in the input information.

After the attributes of the vocabularies in the text vocabulary table and the context connection relations of the vocabularies in the text vocabulary table are obtained, the vocabularies in the text vocabulary table can be combined and split according to the attributes of the vocabularies in the text vocabulary table and the context connection relations of the vocabularies in the text vocabulary table, and finally the words in the input information are obtained.

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, where the domain knowledge graph includes at least one knowledge graph.

The domain knowledge graph is a knowledge graph established in a specified domain, wherein a plurality of knowledge graphs of different types in the same domain can exist in the domain knowledge graph,

in other inventive embodiments, as shown in fig. 10, the obtaining unit 130 includes a second judging unit 131 and a knowledge-graph obtaining unit 132.

The second judging unit 131 is configured to judge whether the word is matched with a preset knowledge factor in the knowledge graph.

The words are obtained after the input information is screened, and the knowledge factors refer to information used for representing the knowledge graph in the established knowledge graph. And matching the words with all knowledge factors in the knowledge graph to obtain a result of whether the knowledge graph is matched with the input information. Specifically, the word is matched with all knowledge factors in the knowledge graph, and if the word senses of the word are similar to the word senses of the knowledge factors, the word can be judged to be matched with the knowledge factors, so that a result of whether the knowledge graph is matched with the input information is obtained.

The knowledge graph obtaining unit 132 is configured to obtain a matched knowledge graph according to the knowledge factor if the word is matched with the knowledge factor.

The words are obtained by screening the input information and removing modifiers in the input information, and after the words are matched with the knowledge factors, all knowledge maps containing the knowledge factors in the field are obtained.

The first judging unit 140 is configured to judge the number of the knowledge-graphs matching the input information.

The domain knowledge graph comprises at least one knowledge graph, words in the input information are filled into a preset domain knowledge graph to obtain at least one knowledge graph matched with the input information, and the intentions represented by all knowledge graphs in the domain knowledge graph are different, so that the number of the knowledge graphs obtained from the domain knowledge graph needs to be judged so as to be convenient for screening out the knowledge graph which best meets the intentions of a user.

The first identification unit 150 is configured to determine the knowledge graph matching the input information as a target knowledge graph and obtain the user's intention based on the determination result if the number of the knowledge graphs matching the input information is 1.

Specifically, when the number of the knowledge graph matched with the input information is 1, the knowledge graph can be determined to be a target knowledge graph corresponding to the input information, and the intention of the user who inputs the information can be obtained through the target knowledge graph.

The second identifying unit 160 is configured to, if the knowledge graph matching the input information is a plurality of knowledge graphs, filter the plurality of knowledge graphs according to a preset filtering rule to obtain a target knowledge graph, and thus obtain the intention of the user.

When the knowledge graphs are screened, after the analysis is carried out according to the middle overall semantics of the input information, the knowledge graphs are screened according to the analysis result to obtain the knowledge graph which accords with the input information, and therefore the intention of the user is obtained. In addition, the number of knowledge factors matching the words in each of the plurality of knowledge maps may be calculated, and the knowledge map with the largest number of knowledge factors may be used as the target knowledge map of the input information to obtain the intention of the user.

In another embodiment of the present invention, as shown in fig. 11, the second recognition unit 160 includes a calculation unit 161 and a third recognition unit 162.

The calculating unit 161 is configured to calculate the number of target knowledge factors in each of the knowledge graphs, where the target knowledge factor is a knowledge factor in a knowledge graph that matches the word.

Specifically, the target knowledge factor is a knowledge factor matched with the words in each knowledge graph. And each knowledge graph in the plurality of knowledge graphs matched with the input information has at least one knowledge factor matched with the words, and the knowledge graph which best meets the user intention is determined by the number of the knowledge factors matched with the words contained in each knowledge graph in the plurality of knowledge graphs.

The third recognition 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.

In another embodiment of the present invention, as shown in fig. 12, the third identifying unit 162 includes a third determining unit 1621 and a fourth identifying unit 1622.

The third judging unit 1621 is configured to judge whether the number of knowledge-maps with the most target knowledge factors is greater than 1.

The knowledge graph with the maximum target knowledge factors can have two or more than two different types of knowledge graphs, and when the number of the target knowledge factors in the knowledge graph is the same as the number of words matched in the input information, the knowledge graph of the user cannot be obtained.

The fourth identifying unit 1622 is configured to, if the number of the knowledge graphs with the most target knowledge factors is greater than 1, obtain a target knowledge graph from the knowledge graphs with the most target knowledge factors according to the dependency syntax relationship of the words, and obtain the user's intention.

The syntactic analysis refers to analyzing the grammatical function of words in a sentence so as to judge the deep semantics in the sentence.

The device 100 for identifying an intention based on artificial intelligence provided by the embodiment of the invention is used for executing the method for identifying an intention based on artificial intelligence, and the input information of a user is acquired; processing the input information to obtain words in the input information; acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph; judging the number of the knowledge maps matched with the input information; if the number of the knowledge maps matched with the input information is 1, determining the knowledge map matched with the input information as a target knowledge map and obtaining the intention of the user according to the target knowledge map; and if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

Referring to fig. 13, fig. 13 is a schematic block diagram of a computer device according to an embodiment of the present invention.

Referring to fig. 13, the device 500 includes a processor 502, memory, and a network interface 505 connected by 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 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, can cause the processor 502 to perform a method for artificial intelligence based intent recognition.

The processor 502 is used to provide computing and control capabilities that support the operation of the overall device 500.

The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to perform a method of artificial intelligence based intention recognition.

The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 13 is a block diagram of only a portion of the configuration associated with aspects of the present invention and does not constitute a limitation of the apparatus 500 to which aspects of the present invention may be applied, and that a particular apparatus 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following functions: acquiring input information of a user; processing the input information to obtain words in the input information; acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph; judging the number of the knowledge maps matched with the input information; if the number of the knowledge maps matched with the input information is 1, determining the knowledge map matched with the input information as a target knowledge map and obtaining the intention of the user according to the target knowledge map; and if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

Those skilled in the art will appreciate that the embodiment of the apparatus 500 shown in fig. 13 does not constitute a limitation on the specific construction of the apparatus 500, and in other embodiments, the apparatus 500 may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the apparatus 500 may only include the memory and the processor 502, and in such embodiments, the structure and function of the memory and the processor 502 are the same as those of the embodiment shown in fig. 13, and are not repeated herein.

It should be understood that in the present embodiment, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors 502, a Digital Signal Processor 502 (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general-purpose processor 502 may be a microprocessor 502 or the processor 502 may be any conventional processor 502 or the like.

In another embodiment of the present invention, a computer storage medium is provided. The storage medium may be a non-volatile computer-readable storage medium. The storage medium stores a computer program 5032, wherein the computer program 5032 when executed by the processor 502 performs the steps of: acquiring input information of a user; acquiring input information of a user; processing the input information to obtain words in the input information; acquiring a knowledge graph matched with the input information according to the words in the input information and a preset domain knowledge graph, wherein the domain knowledge graph comprises at least one knowledge graph; judging the number of the knowledge maps matched with the input information; if the number of the knowledge maps matched with the input information is 1, determining the knowledge map matched with the input information as a target knowledge map and obtaining the intention of the user according to the target knowledge map; and if the knowledge graph matched with the input information is a plurality of knowledge graphs, screening the knowledge graphs according to a preset screening rule to obtain a target knowledge graph and obtain the intention of the user.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a device 500 (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.

While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:文本的处理方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!