WO2021086221A1 - Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies - Google Patents

Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies Download PDF

Info

Publication number
WO2021086221A1
WO2021086221A1 PCT/RU2019/000779 RU2019000779W WO2021086221A1 WO 2021086221 A1 WO2021086221 A1 WO 2021086221A1 RU 2019000779 W RU2019000779 W RU 2019000779W WO 2021086221 A1 WO2021086221 A1 WO 2021086221A1
Authority
WO
WIPO (PCT)
Prior art keywords
subject
predicate
knowledge graph
response
module
Prior art date
Application number
PCT/RU2019/000779
Other languages
French (fr)
Russian (ru)
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 федеральное государственное автономное образовательное учреждение высшего образования "Московский физико-технический институт (национальный исследовательский университет)"
Priority to PCT/RU2019/000779 priority Critical patent/WO2021086221A1/en
Publication of WO2021086221A1 publication Critical patent/WO2021086221A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation

Definitions

  • the present technical solution relates to the field of computing, in particular, to a method for maintaining the consistency of a dialogue based on the knowledge graph and checking statements for contradictions.
  • Bots are known from the prior art - Mitsuku from Pandorabots, Inc., Voice Assistant Alice from Yandex - which can maintain dialogues with the user.
  • Known information source CN 107562863 A disclosing the automatic generation of a chat bot response, where keywords are extracted in the operator entered by the user, the search is carried out using keywords as indexes, and the corresponding question-answer pair is in the knowledge base; if a matching question-answer pair is found, the play suggestion in the question-answer pair is accepted as the response operator for input; if no matching question-answer pair is found, the operator entered by the user enters a response generation module.
  • the closest analogue is the source of information US 2019/0138595 A1, which discloses a method of argumentation in a text, where text containing fragments is accessed on a computing device.
  • the application creates a discourse tree from text.
  • the discourse tree includes nodes, each nonterminal node representing a rhetorical relationship between two fragments, and each leaf node of the nodes of the discourse tree is associated with one of the fragments.
  • the application matches each fragment that has a verb with the signature of the verb, thereby creating a tree of communicative discourse.
  • the application determines whether the tree of communicative discourse represents text that includes affective argumentation, applying a classification model trained to detect affective argumentation in a tree of communicative discourse.
  • the technical problem to be solved by the claimed technical solution is the creation of a chatbot architecture that allows it to have memory in the form of a knowledge graph and to check statements for contradictions.
  • a special feature is that the bot's knowledge base, collected in the form of dialogues, can be checked for contradictions in the bot's personality and contradictory statements can be removed (all but one). Thus, only clearly consistent statements remain in the database.
  • the present invention is aimed at providing a computer-implemented method for maintaining the consistency of a dialogue based on the knowledge graph and checking statements for contradictions, which is characterized in the independent claim. Additional embodiments of the present invention are presented in the dependent claims.
  • the technical result consists in the possibility of checking the statement for contradictions.
  • a computer-implemented method for maintaining the consistency of a dialogue based on a knowledge graph and checking statements for contradictions, including the stages at which, by means of a processor: the user's statement is obtained and transmitted to the response generation module; the response generation module generates a candidate response; in this case, the candidate answer is checked for contradictions, where: the object in the statement is selected from the candidate answer; in the module for extracting the subject-subject-predicate, the subject and predicate are searched for in the phrase; search for the subject and predicate in the knowledge graph; in the verification module with respect to the graph, contradictions are found if two subjects or two predicates in the phrase and in the base are different; make a new record in the knowledge graph if the subject or predicate in the phrase is included or does not contradict the concept of the subject or predicate in the base; and give a response to the user.
  • the response generation module is based on ranking or generative or Open-Domain Question Answering (OD
  • the check in the module relative to the knowledge graph is implemented using MQL / SparkQL queries by finding or not finding an answer.
  • FIG. 1 illustrates a flow diagram of a method
  • FIG. 2 illustrates a block diagram of a computing device.
  • a knowledge graph is a way of organizing information in a database.
  • the knowledge graph is built on the basis of a base graph (for example wikidata) + a set of reference texts and dialogues (for example, a description of the personality of a bot with its relation to objects).
  • a contradictory statement is determined, where for one pair of object-subject there is a different predicate or for one pair of object-predicate there is a different subject.
  • the candidate answer is checked for each of these conditions, and if at least one of them is inconsistent, the answer will be rejected.
  • exceptions are specified by a list of subject-predicate relations and a list of subject-predicate exceptions. Also, the list of inclusions is supplemented with subjects or predicates clearly from the same class and contradicting each other, for example, "I love", “I hate”.
  • the specified lists are in the module for checking against the knowledge graph.
  • a list of subject relationships or predicates can be implemented as an ontology. At the same time, being on the same branch of the tree allows us to say that there is no contradiction. For example, the subject "apples” is part of the "fruit” so there will be no contradiction.
  • the conditions for this list are:
  • FIG. 1 characterizes the way of maintaining a consistent dialogue based on the knowledge graph and checking statements for contradictions.
  • the claimed method is performed on a computing device.
  • the user's phrase is delivered to the computing device through any available graphical or voice interface. Then the phrase enters the system to generate a response. A candidate answer is being formed. The candidate answer is checked for inconsistencies in the knowledge graph.
  • the key module is the "relationship check module”. This module can be expressed by the following modules:
  • Entity extraction module This module searches for entities relative to the knowledge graph. If the entity retrieval module was unable to retrieve, then the check is considered successful.
  • Extraction module object-subject-predicate. This module searches for predicates, objects and subjects, within the found entity in the entity extraction module, relative to the knowledge graph.
  • the module is based on methods for extracting entities, for example, working with a catalog or various Named-Entity Recognition (NER) models (deeppavlov.ai).
  • Directory Entity Extraction also called gazeteer
  • NER Named-Entity Recognition
  • NER Directory Entity Extraction
  • NER uses neural network architectures to define entities and their boundaries in the text (for example, http://docs.deeppaylov.ai/en/master/features/models/ner.html).
  • the data in the database can be generated relative to previous responses and according to the description of the bot's personality or in another way.
  • Bot identity is a textual description of the bot's identity. It is presented as a list of sentences in natural language listing facts that characterize the individual characteristics of the bot (what it likes, dislikes, what interests it, and other affilations).
  • the response generation system is a ranking model (for example, based on the similarity of embeddings) or a generative model, or an ODQA (phrase extraction from text) model. Using one of these models, a candidate response is generated for the entered phrase.
  • a ranking model for example, based on the similarity of embeddings
  • a generative model for example, based on the similarity of embeddings
  • ODQA phrase extraction from text
  • the candidate answer is checked for inconsistencies in the knowledge graph.
  • the entity is searched for, to which the statement belongs.
  • a classifier of important entities is, for example, a CNN model for classification pre-trained on a known dataset regarding important entities (descriptions of a bot's personality, attitudes towards politics, attitudes towards music, ethical values). Classifies either to a certain class of important entities or says that there are no such entities.
  • the subject-subject-predicate is searched for the predicate in the candidate response and transformed into a time-sensitive form. Then the predicate is searched in the database.
  • search for the subject and the object is carried out, also in the candidate answer and in the database.
  • the response generation system generates a candidate response: "I love red apples.”
  • a predicate is searched for, it is "love”, and it is also searched for in the database - "love”.
  • the subject and object are searched for in the phrase and in the database, one object is found - "apples”, both in the candidate response and in the database.
  • the predicate is "has a color”.
  • a search for a subject and an object is carried out in the candidate answer and in the database.
  • the subject “red” of the predicate has a color” was found in the candidate answer.
  • the subject “green” of the predicate has color” was found in the database.
  • the system generates the following candidate answer: "I love red pears.”
  • a predicate is searched for, it is "love”, and it is also searched for in the database - "love”.
  • the search for the subject and the object in the candidate answer b and in the database the subject in the candidate answer is “pears”, and the found subject in the database is “fruit”.
  • the candidate answer "I love red pears" is written to the database as a new branch of the graph.
  • FIG. 2 a general diagram of a computing device (200) that provides data processing necessary for the implementation of the claimed solution will be presented below.
  • the device (200) contains such components as: one or more processors (201), at least one memory (202), data storage means (203), input / output interfaces (204), I / O means ( 205), networking tools (206).
  • processors 201
  • memory 202
  • data storage means 203
  • input / output interfaces 204
  • I / O means 205
  • networking tools 206
  • the processor (201) of the device performs the basic computational operations necessary for the operation of the device (200) or the functionality of one or more of its components.
  • the processor (201) executes the necessary computer readable instructions contained in the main memory (202).
  • Memory (202) is made in the form of RAM and contains the necessary program logic that provides the required functionality.
  • the data storage medium (203) can be performed in the form of HDD, SSD disks, raid array, network storage, flash memory, optical information storage devices (CD, DVD, MD, Blue-Ray disks), etc.
  • the means (203) allows performing long-term storage of various types of information, for example, the aforementioned files with user data sets, a database containing records of time intervals measured for each user, user identifiers, etc.
  • Interfaces (204) are standard means for connecting and working with the server side, for example, USB, RS232, RJ45, LPT, COM, HDMI, PS / 2, Lightning, FireWire, etc.
  • interfaces (204) depends on the specific implementation of the device (200), which can be a personal computer, mainframe, server cluster, thin client, smartphone, laptop, etc.
  • a keyboard should be used.
  • the hardware design of the keyboard can be any known: it can be either a built-in keyboard used on a laptop or netbook, or a stand-alone device connected to a desktop computer, server or other computer device. Connection in this case, it can be either wired, in which the connecting cable of the keyboard is connected to the PS / 2 or USB port located on the system unit of the desktop computer, or wireless, in which the keyboard exchanges data via a wireless communication channel, for example, a radio channel, with the base station, which, in turn, is directly connected to the system unit, for example, to one of the USB ports.
  • I / O data can also include: joystick, display (touch screen), projector, touchpad, mouse, trackball, light pen, speakers, microphone, etc.
  • Networking means (206) are selected from a device that provides network reception and transmission of data, for example, Ethernet card, WLAN / Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc.
  • the means (205) provide the organization of data exchange via a wired or wireless data transmission channel, for example, WAN, PAN, LAN, Intranet, Internet, WLAN, WMAN or GSM.
  • the components of the device (200) are interfaced through a common data bus (210).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for checking statements for inconsistencies with the aid of a knowledge graph. The present method includes steps in which a user's statement is received and transferred to a response-generating module. The response-generating module formulates a candidate response, and the candidate response is checked for inconsistencies. An object in a statement is extracted from the candidate response. In an object-subject-predicate extraction module, a search is carried out for a subject and predicate in a phrase, and a search is carried out for subject and predicate in the knowledge graph. In a graph-checking module, an inconsistency is identified if the two subjects or two predicates differ in the phrase and in the knowledge base. A new entry is made in the knowledge graph if the subject or predicate in the phrase is included in or does not contradict the concept of the subject or predicate in the base, and the response is issued to the user. This ensures a statement is checked for inconsistencies.

Description

СПОСОБ ПОДДЕРЖАНИЯ КОНСИСТЕНТНОСТИ ДИАЛОГА НА БАЗЕ ГРАФА ЗНАНИЙ И ПРОВЕРКИ ВЫСКАЗЫВАНИЙ НА ПРОТИВОРЕЧИЯ METHOD FOR MAINTAINING CONSISTENCY OF DIALOGUE BASED ON KNOWLEDGE GRAPH AND CHECKING REPORTS FOR CONTRADICTIONS
ОБЛАСТЬ ТЕХНИКИ FIELD OF TECHNOLOGY
Настоящее техническое решение относится к области вычислительной техники, в частности, к способу поддержания консистентности диалога на базе графа знаний и проверки высказываний на противоречия. The present technical solution relates to the field of computing, in particular, to a method for maintaining the consistency of a dialogue based on the knowledge graph and checking statements for contradictions.
УРОВЕНЬ ТЕХНИКИ LEVEL OF TECHNOLOGY
Из уровня техники известны боты - Mitsuku от компании Pandorabots, Inc., Голосовой помощник Алиса от компании Яндекс - которые могут поддерживать диалоги с пользователем. Bots are known from the prior art - Mitsuku from Pandorabots, Inc., Voice Assistant Alice from Yandex - which can maintain dialogues with the user.
Однако, недостатком данных ботов является то, что во время диалога боты могут допускать противоречия в своих высказываниях. However, the disadvantage of these bots is that during the dialogue bots can make contradictions in their statements.
Известен источник информации CN 107562863 А, раскрывающий автоматическую генерацию ответа чат-бота, где извлекают ключевые слова в операторе, вводимом пользователем, поиск проводится по ключевым словам в качестве индексов, и соответствующая пара вопрос-ответ находится в базе знаний; если соответствующая пара вопрос-ответ найдена, предложение воспроизведения в паре вопрос-ответ принимается в качестве оператора ответа для ввода; если соответствующая пара вопрос-ответ не найдена, оператор, введенный пользователем, вводит модуль генерации ответа. Known information source CN 107562863 A, disclosing the automatic generation of a chat bot response, where keywords are extracted in the operator entered by the user, the search is carried out using keywords as indexes, and the corresponding question-answer pair is in the knowledge base; if a matching question-answer pair is found, the play suggestion in the question-answer pair is accepted as the response operator for input; if no matching question-answer pair is found, the operator entered by the user enters a response generation module.
Недостатком указанно решения является то, что проверка не ведется относительно противоречивости высказываний самого бота. Для ответа на похожие вопросы и обеспечения консистентности используется метрика похожести вопросов (симиларити) что не позволяет в полной мере обеспечить консистентность, так как по-разному переформулированные вопросы могут по этой метрике быть отнесены к разным ответам. The disadvantage of this solution is that the check is not carried out regarding the inconsistency of the statements of the bot itself. To answer similar questions and ensure consistency, the question similarity metric (similarity) is used, which does not fully ensure consistency, since differently reformulated questions can be attributed to different answers according to this metric.
Наиболее близким аналогом является источник информации US 2019/0138595 А1, раскрывающий способ аргументации в тексте, где на вычислительном устройстве, получают доступ к тексту, содержащему фрагменты. Приложение создает дискурсивное дерево из текста. Дерево дискурса включает в себя узлы, каждый нетерминальный узел, представляющий риторические отношения между двумя фрагментами, и каждый конечный узел узлов дерева дискурса связан с одним из фрагментов. Приложение сопоставляет каждый фрагмент, имеющий глагол, с сигнатурой глагола, создавая тем самым дерево коммуникативного дискурса. Приложение определяет, представляет ли дерево коммуникативного дискурса текст, который включает в себя аффективную аргументацию, применяя классификационную модель, обученную обнаружению аффективной аргументации, в дереве коммуникативного дискурса. The closest analogue is the source of information US 2019/0138595 A1, which discloses a method of argumentation in a text, where text containing fragments is accessed on a computing device. The application creates a discourse tree from text. The discourse tree includes nodes, each nonterminal node representing a rhetorical relationship between two fragments, and each leaf node of the nodes of the discourse tree is associated with one of the fragments. The application matches each fragment that has a verb with the signature of the verb, thereby creating a tree of communicative discourse. The application determines whether the tree of communicative discourse represents text that includes affective argumentation, applying a classification model trained to detect affective argumentation in a tree of communicative discourse.
Недостатком данного решения является то, что используют дерево для детекции аргументации и связано с глаголами действия (в узлах) и не используется для прямой задачи детекции противоречий в ответе бота. The disadvantage of this solution is that it uses a tree for detecting argumentation and is associated with action verbs (in nodes) and is not used for the direct task of detecting contradictions in a bot's response.
СУЩНОСТЬ ИЗОБРЕТЕНИЯ SUMMARY OF THE INVENTION
Технической проблемой, на решение которой направлено заявленное техническое решение, является создание архитектуры чат-бота, позволяющего иметь тому память в виде графа знаний и проверять высказывания на противоречия. Особенностью является то, что база знаний бота, собранная в виде диалогов, может быть проверена на противоречия в личности бота и противоречивые высказывания могут быть убраны (все кроме одного). Таким образом в базе данных остаются только явно непротиворечивые высказывания. Настоящее изобретение направлено на обеспечение компьютерно-реализованного способа поддержания консистентности диалога на базе графа знаний и проверки высказываний на противоречия, который охарактеризован в независимом пункте формулы. Дополнительные варианты реализации настоящего изобретения представлены в зависимых пунктах изобретения. The technical problem to be solved by the claimed technical solution is the creation of a chatbot architecture that allows it to have memory in the form of a knowledge graph and to check statements for contradictions. A special feature is that the bot's knowledge base, collected in the form of dialogues, can be checked for contradictions in the bot's personality and contradictory statements can be removed (all but one). Thus, only clearly consistent statements remain in the database. The present invention is aimed at providing a computer-implemented method for maintaining the consistency of a dialogue based on the knowledge graph and checking statements for contradictions, which is characterized in the independent claim. Additional embodiments of the present invention are presented in the dependent claims.
Технический результат заключается в возможности проверки высказывания на противоречия. The technical result consists in the possibility of checking the statement for contradictions.
В предпочтительном варианте реализации заявлен компьютерно-реализованный способ поддержания консистентности диалога на базе графа знаний и проверки высказываний на противоречия включающий этапы, на которых посредством процессора: получают высказывание пользователя и передают его в модуль генерации ответа; модуль генерации ответа формирует кандидатный ответ; при этом кандидатный ответ проверяют на противоречия, где: из кандидатного ответа выделяют объект в высказывании; в модуле извлечения объекта-субъекта-предиката производят поиск субъекта и предиката во фразе; производят поиск субъекта и предиката в графе знаний; в модуле проверки относительно графа находят противоречия если два субъекта или два предиката во фразе и в базе различны; производят новую запись в граф знаний, если субъект или предикат во фразе включен или не противоречит понятию субъекта или предиката в базе; и выдают ответ пользователю. В частном варианте модуль генерации ответа выполнен на базе ранжирующей или генеративной, или Open-Domain Question Answering (ODQA) моделей. In a preferred embodiment, a computer-implemented method is claimed for maintaining the consistency of a dialogue based on a knowledge graph and checking statements for contradictions, including the stages at which, by means of a processor: the user's statement is obtained and transmitted to the response generation module; the response generation module generates a candidate response; in this case, the candidate answer is checked for contradictions, where: the object in the statement is selected from the candidate answer; in the module for extracting the subject-subject-predicate, the subject and predicate are searched for in the phrase; search for the subject and predicate in the knowledge graph; in the verification module with respect to the graph, contradictions are found if two subjects or two predicates in the phrase and in the base are different; make a new record in the knowledge graph if the subject or predicate in the phrase is included or does not contradict the concept of the subject or predicate in the base; and give a response to the user. In a particular version, the response generation module is based on ranking or generative or Open-Domain Question Answering (ODQA) models.
В другом частном варианте проверка в модуле относительно графа знаний реализована с помощью MQL/SparkQL запросов путем нахождения или не нахождения ответа. In another particular version, the check in the module relative to the knowledge graph is implemented using MQL / SparkQL queries by finding or not finding an answer.
ОПИСАНИЕ ЧЕРТЕЖЕЙ DESCRIPTION OF DRAWINGS
Реализация изобретения будет описана в дальнейшем в соответствии с прилагаемыми чертежами, которые представлены для пояснения сути изобретения и никоим образом не ограничивают область изобретения. К заявке прилагаются следующие чертежи: The implementation of the invention will be described in the following in accordance with the accompanying drawings, which are presented to explain the essence of the invention and in no way limit the scope of the invention. The following drawings are attached to the application:
Фиг. 1 иллюстрирует блок-схему способа; FIG. 1 illustrates a flow diagram of a method;
Фиг. 2 иллюстрирует блок-схему вычислительного устройства. FIG. 2 illustrates a block diagram of a computing device.
ДЕТАЛЬНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯ DETAILED DESCRIPTION OF THE INVENTION
В приведенном ниже подробном описании реализации изобретения приведены многочисленные детали реализации, призванные обеспечить отчетливое понимание настоящего изобретения. Однако, квалифицированному в предметной области специалисту, будет очевидно каким образом можно использовать настоящее изобретение, как с данными деталями реализации, так и без них. В других случаях хорошо известные методы, процедуры и компоненты не были описаны подробно, чтобы не затруднять излишне понимание особенностей настоящего изобретения. In the following detailed description of an implementation of the invention, numerous implementation details are set forth in order to provide a thorough understanding of the present invention. However, it will be obvious to those skilled in the art how the present invention can be used, with or without these implementation details. In other instances, well-known techniques, procedures, and components have not been described in detail so as not to obscure the details of the present invention.
Кроме того, из приведенного изложения будет ясно, что изобретение не ограничивается приведенной реализацией. Многочисленные возможные модификации, изменения, вариации и замены, сохраняющие суть и форму настоящего изобретения, будут очевидными для квалифицированных в предметной области специалистов. In addition, from the above presentation it will be clear that the invention is not limited to the above implementation. Numerous possible modifications, changes, variations and substitutions, while retaining the spirit and form of the present invention, will be apparent to those skilled in the art.
Граф знаний является способом организации информации в базе данных. Граф знаний построен на базе базового графа (например wikidata) + набора эталонных текстов и диалогов (например описание личности бота с его отношением к объектам). A knowledge graph is a way of organizing information in a database. The knowledge graph is built on the basis of a base graph (for example wikidata) + a set of reference texts and dialogues (for example, a description of the personality of a bot with its relation to objects).
В заявленном способе определяют противоречивое высказывание, где для одной пары объект-субъект существует разный предикат или для одной пары объект-предикат существует разный субъект. Кандидатный ответ проверяется по каждому из этих условий и если хотя бы в одном из них будет противоречие, то ответ будет отклонен. In the claimed method, a contradictory statement is determined, where for one pair of object-subject there is a different predicate or for one pair of object-predicate there is a different subject. The candidate answer is checked for each of these conditions, and if at least one of them is inconsistent, the answer will be rejected.
Для каждого условия задаются некоторые исключения списком отношений субъектов и предикатов и списком исключений субъектов и предикатов. Также дополнен список включений субъектами или предикатами явно из одного класса и противоречащими друг другу например «люблю», «ненавижу». Указанные списки находятся в модуле проверки относительно графа знаний. Список отношений субъектов или предикатов может быть реализован как онтология. При этом нахождение на одной ветке дерева позволяет говорить, что противоречия нет. Например, субъект «яблоки» входят в состав «фрукты» поэтому не будет противоречием. Условиями для данного списка являются: For each condition, some exceptions are specified by a list of subject-predicate relations and a list of subject-predicate exceptions. Also, the list of inclusions is supplemented with subjects or predicates clearly from the same class and contradicting each other, for example, "I love", "I hate". The specified lists are in the module for checking against the knowledge graph. A list of subject relationships or predicates can be implemented as an ontology. At the same time, being on the same branch of the tree allows us to say that there is no contradiction. For example, the subject "apples" is part of the "fruit" so there will be no contradiction. The conditions for this list are:
1) субъект или предикат включен в понятие; 1) the subject or predicate is included in the concept;
2) субъект или предикат противоречит понятию; 2) the subject or predicate contradicts the concept;
3) субъект или предикат не противоречит понятию. 3) the subject or predicate does not contradict the concept.
Под списком исключений субъектов и предикатов подразумевается список непротиворечивых предикатов или субъектов, то есть не связанные между собой предикаты или субъекты, которые не противоречат друг другу. Например, «цвет» «размер»: «Я люблю большие яблоки» и «Я люблю желтые яблоки». By the list of exclusion of subjects and predicates is meant a list of consistent predicates or subjects, that is, unrelated predicates or subjects that do not contradict each other. For example, “color” “size” is “I like big apples” and “I like yellow apples”.
Фиг. 1 характеризует способ поддержания консистентного диалога на базе графа знаний и проверки высказываний на противоречия. FIG. 1 characterizes the way of maintaining a consistent dialogue based on the knowledge graph and checking statements for contradictions.
Заявленный способ выполняется на вычислительном устройстве. The claimed method is performed on a computing device.
Фраза пользователя поступает на вычислительное устройство посредством любого доступного графического или голосового интерфейса. Далее фраза поступает в систему для генерации ответа. Формируется кандидатный ответ. Кандидатный ответ проверяют на наличие противоречий в графе знаний. Для реализации способа ключевым модулем является «модуль проверки отношений». Данный модуль может быть выражен следующими модулями: The user's phrase is delivered to the computing device through any available graphical or voice interface. Then the phrase enters the system to generate a response. A candidate answer is being formed. The candidate answer is checked for inconsistencies in the knowledge graph. For the implementation of the method, the key module is the "relationship check module". This module can be expressed by the following modules:
1) Модуль извлечения сущностей. В данном модуле происходит поиск сущностей относительно графа знаний. Если модуль извлечения сущностей не смог извлечь, то проверка считается успешной. 1) Entity extraction module. This module searches for entities relative to the knowledge graph. If the entity retrieval module was unable to retrieve, then the check is considered successful.
2) Модуль извлечения объект-субъект-предикат. В данном модуле происходит поиск предикатов, объектов и субъектов, в рамках найденной сущности в модуле извлечения сущностей, относительно графа знаний. Модуль основан на методах извлечения сущностей, например работа по каталогу или различных Named-Entity Recognition (NER) моделях (deeppavlov.ai). Извлечение сущностей по каталогу (также называется gazeteer) анализирует текст и сопоставляет каждый элемент сегмент текста с сущностями в каталоге. При совпадении сегмента текста и элемента каталога модуль маркирует сегмент как сущность. При использовании методов NER в модуле использует нейросетевые архитектуры для определения сущностей и их границ в тексте (например, http://docs.deeppaylov.ai/en/master/features/models/ner.html). 3) Проверка относительно графа знаний. В данном модуле сопоставляют возможный список доступных связей объектов и предикатов. Проверяют на несоответствие относительно сформированной схемы. 2) Extraction module object-subject-predicate. This module searches for predicates, objects and subjects, within the found entity in the entity extraction module, relative to the knowledge graph. The module is based on methods for extracting entities, for example, working with a catalog or various Named-Entity Recognition (NER) models (deeppavlov.ai). Directory Entity Extraction (also called gazeteer) parses the text and matches each element of the text segment with the entities in the directory. If a segment of text and a catalog item match, the module marks the segment as an entity. When using NER methods in a module, it uses neural network architectures to define entities and their boundaries in the text (for example, http://docs.deeppaylov.ai/en/master/features/models/ner.html). 3) Checking against the knowledge graph. In this module, a possible list of available object and predicate relationships is matched. Check for discrepancy with respect to the generated circuit.
Если противоречий нет, то высказывание записывается в базу данных как новая ветвь графа и выдается ответ, если есть - проверяют следующий релевантный ответ. If there are no contradictions, then the statement is recorded in the database as a new branch of the graph and the answer is given, if there is, the next relevant answer is checked.
Данные в базе данных могут быть сформированы относительно предыдущих ответов и согласно описанию личности бота или другим способом. The data in the database can be generated relative to previous responses and according to the description of the bot's personality or in another way.
Под личностью бота подразумевается текстовое описание личности бота. Представляется как список предложений на естественном языке перечисляющих факты- характеризующие индивидуальные особенности бота (что он любит, не любит, что его интересует и прочие афилляции). Bot identity is a textual description of the bot's identity. It is presented as a list of sentences in natural language listing facts that characterize the individual characteristics of the bot (what it likes, dislikes, what interests it, and other affilations).
Система генерации ответа представляет собой ранжирующую модель (например, на базе similarity эмбеддингов) или генеративную модель, или модель ODQA (извлечения фраз из текста). При помощи одной из этих моделей генерируется кандидатный ответ на поступившую фразу. The response generation system is a ranking model (for example, based on the similarity of embeddings) or a generative model, or an ODQA (phrase extraction from text) model. Using one of these models, a candidate response is generated for the entered phrase.
Кандидатный ответ проверяется на противоречия в графе знаний. The candidate answer is checked for inconsistencies in the knowledge graph.
Сначала при помощи классификатора важных сущностей ищется сущность, к которой относится высказывание. First, using the classifier of important entities, the entity is searched for, to which the statement belongs.
Классификатор важных сущностей представляет собой, например, CNN модель для классификации предобученную на известном датасете относительно важных сущностей (описания личности бота, отношения к политике, отношения к музыке, этических ценностей). Классифицирует либо к определенному классу важных сущностей или говорит, что таких сущностей нет. A classifier of important entities is, for example, a CNN model for classification pre-trained on a known dataset regarding important entities (descriptions of a bot's personality, attitudes towards politics, attitudes towards music, ethical values). Classifies either to a certain class of important entities or says that there are no such entities.
После выделения сущностей из модуля извлечения объект-субъект-предикат осуществляют поиск предиката в кандидатном ответе и преобразуют его в форму с учетом времени. Затем осуществляют поиск предиката в базе данных. After extracting the entities from the extraction module, the subject-subject-predicate is searched for the predicate in the candidate response and transformed into a time-sensitive form. Then the predicate is searched in the database.
Далее осуществляют поиск субъекта и объекта, также в кандидатном ответе и в базе данных. Further, the search for the subject and the object is carried out, also in the candidate answer and in the database.
После извлечения сущностей, объекта, субъекта и предиката, сопоставляют связи и проверяют их относительно графа знаний. В графе знаний заранее фиксируются типы возможных отношений, например, “год рождения, работа, люблю и т.д.”. По отношениям иного типа поиск не производится. Граф обновляется только извлечением пары объектов для указанного типа отношений. Поисковые запросы могут быть сформированы на языке MQL/SparkQL. Проверка относительно графа знаний реализована с помощью MQL/SparkQL запросов путем нахождения или не нахождения ответа. Если найдено противоречие данный, то кандидатный ответ отвергается, и система приступает к анализу следующего кандидатного ответа пока не найдет подходящий или не исчерпает все ответы. After extracting the entities, object, subject and predicate, relationships are compared and checked against the knowledge graph. In the knowledge column, the types of possible relationships are fixed in advance, for example, “year of birth, work, love, etc.”. No search is performed for relations of any other type. The graph is updated only by retrieving a pair of objects for the specified type of relationship. Search queries can be generated in the MQL / SparkQL language. Checking against the knowledge graph is implemented using MQL / SparkQL queries by finding or not finding an answer. If a given contradiction is found, then the candidate answer is rejected, and the system proceeds to analyze the next candidate answer until it finds a suitable one or exhausts all the answers.
Если противоречий не найдено, то новое высказывание, выраженное кандидатным ответом, записывается в граф знаний, после чего ответ выдается пользователю. If no contradictions are found, then a new statement, expressed by the candidate answer, is written into the knowledge graph, after which the answer is given to the user.
Рассмотрим пример. Let's look at an example.
Пользователь вводит фразу «Ты любишь яблоки?». Фраза передается на сервер, в базе данных есть два утверждения: The user enters the phrase "Do you like apples?" The phrase is passed to the server, there are two statements in the database:
Я (любить н.в.) фрукты. I am (love n.v.) fruit.
Я (любить н.в) яблоки (цвет) зеленые. I (love nv) apples (color) green.
Система генерации ответа генерирует кандидатный ответ: «Я люблю красные яблоки». The response generation system generates a candidate response: "I love red apples."
Далее в классификаторе важных сущностей выделяется важная сущность, ей является «Я». Further, in the classifier of important entities, an important entity is highlighted, it is "I".
В кандидатном ответе ищется предикат, им является «люблю», а также ищется в базе данных - «любить». Кроме того, ищется субъект и объект во фразе и в базе, найден один объект - «яблоки», как в кандидатном ответе, так и базе данных. In the candidate answer, a predicate is searched for, it is "love", and it is also searched for in the database - "love". In addition, the subject and object are searched for in the phrase and in the database, one object is found - "apples", both in the candidate response and in the database.
Далее проходит обработка относительно объекта «яблоки». Поиск важных сущностей - важной сущностью являются «яблоки». Further processing takes place relative to the "apples" object. Finding Essential Entities - Apples are an important entity.
Поиск предикатов в кандидатном ответе и в базе, предикатом является «имеет цвет». Осуществляется поиск субъекта и объекта в кандидатном ответе и в базе. В кандидатном ответе найден субъект «красный» предиката «имеет цвет». В базе данных найден субъект «зеленый» предиката «имеет цвет». Search for predicates in the candidate answer and in the base, the predicate is "has a color". A search for a subject and an object is carried out in the candidate answer and in the database. The subject "red" of the predicate "has a color" was found in the candidate answer. The subject "green" of the predicate "has color" was found in the database.
Так как субъект «красный» кандидатного ответа и субъект «зеленый» ответа в базе данных явялются разными субъектами, то кандидатный ответ «Я люблю красные яблоки» отклоняется, и система начинает анализ следующего кандидатного ответа. Анализ проходит до тех пор, пока не будет найден подходящий кандидатный ответ или пока не исчерпаеются все возможные кандидатные овтеты. Данный пример иллюстрирует условие, когда пара объект-предикат имеет разный субъект. Since the subject "red" of the candidate answer and the subject "green" of the answer in the database are different subjects, the candidate answer "I love red apples" is rejected and the system starts analyzing the next candidate answer. The analysis continues until a suitable candidate answer is found or until all possible candidate answers have been exhausted. This example illustrates the condition when a pair of predicate object has a different subject.
Система генерирует следующий кандидатный ответ: «Я люблю красные груши».The system generates the following candidate answer: "I love red pears."
В классификаторе важных сущностей выделяется важная сущность (объект), ей является «Я». In the classifier of important entities, an important entity (object) is highlighted, it is "I".
В кандидатном ответе ищется предикат, им является «люблю», а также ищется в базе данных - «любить». Кроме того, проходит поиск субъекта и объекта в кандидатном ответе б и в базе, субъект в кандидатном ответе - «груши», а найденным субъектом в базе данных является «фрукты». In the candidate answer, a predicate is searched for, it is "love", and it is also searched for in the database - "love". In addition, the search for the subject and the object in the candidate answer b and in the database, the subject in the candidate answer is “pears”, and the found subject in the database is “fruit”.
Так как субъект «груши» является подмножеством субъекта «фрукты», то противоречия нет, поиск заканчивается. Since the subject of "pear" is a subset of the subject "fruit", there is no contradiction, the search ends.
Кандидатный ответ «Я люблю красные груши» записывается в базу данных, как новая ветвь графа. The candidate answer "I love red pears" is written to the database as a new branch of the graph.
На Фиг. 2 далее будет представлена общая схема вычислительного устройства (200), обеспечивающего обработку данных, необходимую для реализации заявленного решения. FIG. 2, a general diagram of a computing device (200) that provides data processing necessary for the implementation of the claimed solution will be presented below.
В общем случае устройство (200) содержит такие компоненты, как: один или более процессоров (201), по меньшей мере одну память (202), средство хранения данных (203), интерфейсы ввода/вывода (204), средство В/В (205), средства сетевого взаимодействия (206). In general, the device (200) contains such components as: one or more processors (201), at least one memory (202), data storage means (203), input / output interfaces (204), I / O means ( 205), networking tools (206).
Процессор (201) устройства выполняет основные вычислительные операции, необходимые для функционирования устройства (200) или функциональности одного или более его компонентов. Процессор (201) исполняет необходимые машиночитаемые команды, содержащиеся в оперативной памяти (202). The processor (201) of the device performs the basic computational operations necessary for the operation of the device (200) or the functionality of one or more of its components. The processor (201) executes the necessary computer readable instructions contained in the main memory (202).
Память (202), как правило, выполнена в виде ОЗУ и содержит необходимую программную логику, обеспечивающую требуемый функционал. Memory (202), as a rule, is made in the form of RAM and contains the necessary program logic that provides the required functionality.
Средство хранения данных (203) может выполняться в виде HDD, SSD дисков, рейд массива, сетевого хранилища, флэш-памяти, оптических накопителей информации (CD, DVD, MD, Blue-Ray дисков) и т.п. Средство (203) позволяет выполнять долгосрочное хранение различного вида информации, например, вышеупомянутых файлов с наборами данных пользователей, базы данных, содержащих записи измеренных для каждого пользователя временных интервалов, идентификаторов пользователей и т.п. The data storage medium (203) can be performed in the form of HDD, SSD disks, raid array, network storage, flash memory, optical information storage devices (CD, DVD, MD, Blue-Ray disks), etc. The means (203) allows performing long-term storage of various types of information, for example, the aforementioned files with user data sets, a database containing records of time intervals measured for each user, user identifiers, etc.
Интерфейсы (204) представляют собой стандартные средства для подключения и работы с серверной частью, например, USB, RS232, RJ45, LPT, COM, HDMI, PS/2, Lightning, FireWire и т.п. Interfaces (204) are standard means for connecting and working with the server side, for example, USB, RS232, RJ45, LPT, COM, HDMI, PS / 2, Lightning, FireWire, etc.
Выбор интерфейсов (204) зависит от конкретного исполнения устройства (200), которое может представлять собой персональный компьютер, мейнфрейм, серверный кластер, тонкий клиент, смартфон, ноутбук и т.п. The choice of interfaces (204) depends on the specific implementation of the device (200), which can be a personal computer, mainframe, server cluster, thin client, smartphone, laptop, etc.
В качестве средств В/В данных (205) в любом воплощении системы, реализующей описываемый способ, должна использоваться клавиатура. Аппаратное исполнение клавиатуры может быть любым известным: это может быть, как встроенная клавиатура, используемая на ноутбуке или нетбуке, так и обособленное устройство, подключенное к настольному компьютеру, серверу или иному компьютерному устройству. Подключение при этом может быть, как проводным, при котором соединительный кабель клавиатуры подключен к порту PS/2 или USB, расположенному на системном блоке настольного компьютера, так и беспроводным, при котором клавиатура осуществляет обмен данными по каналу беспроводной связи, например, радиоканалу, с базовой станцией, которая, в свою очередь, непосредственно подключена к системному блоку, например, к одному из USB- портов. Помимо клавиатуры, в составе средств В/В данных также может использоваться: джойстик, дисплей (сенсорный дисплей), проектор, тачпад, манипулятор мышь, трекбол, световое перо, динамики, микрофон и т.п. As means of I / O data (205) in any embodiment of a system that implements the described method, a keyboard should be used. The hardware design of the keyboard can be any known: it can be either a built-in keyboard used on a laptop or netbook, or a stand-alone device connected to a desktop computer, server or other computer device. Connection in this case, it can be either wired, in which the connecting cable of the keyboard is connected to the PS / 2 or USB port located on the system unit of the desktop computer, or wireless, in which the keyboard exchanges data via a wireless communication channel, for example, a radio channel, with the base station, which, in turn, is directly connected to the system unit, for example, to one of the USB ports. In addition to the keyboard, I / O data can also include: joystick, display (touch screen), projector, touchpad, mouse, trackball, light pen, speakers, microphone, etc.
Средства сетевого взаимодействия (206) выбираются из устройства, обеспечивающий сетевой прием и передачу данных, например, Ethernet карту, WLAN/Wi- Fi модуль, Bluetooth модуль, BLE модуль, NFC модуль, IrDa, RFID модуль, GSM модем и т.п. С помощью средств (205) обеспечивается организация обмена данными по проводному или беспроводному каналу передачи данных, например, WAN, PAN, ЛВС (LAN), Интранет, Интернет, WLAN, WMAN или GSM. Networking means (206) are selected from a device that provides network reception and transmission of data, for example, Ethernet card, WLAN / Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc. The means (205) provide the organization of data exchange via a wired or wireless data transmission channel, for example, WAN, PAN, LAN, Intranet, Internet, WLAN, WMAN or GSM.
Компоненты устройства (200) сопряжены посредством общей шины передачи данных (210). The components of the device (200) are interfaced through a common data bus (210).
В настоящих материалах заявки было представлено предпочтительное раскрытие осуществление заявленного технического решения, которое не должно использоваться как ограничивающее иные, частные воплощения его реализации, которые не выходят за рамки испрашиваемого объема правовой охраны и являются очевидными для специалистов в соответствующей области техники. In the present application materials, the preferred disclosure of the implementation of the claimed technical solution has been presented, which should not be used as limiting other, particular embodiments of its implementation, which do not go beyond the scope of the claimed scope of legal protection and are obvious to specialists in the relevant field of technology.

Claims

Формула Formula
1. Компьютерно-реализованный способ проверки высказываний на противоречия при помощи графа знаний, включающий этапы, на которых посредством процессора: получают высказывание пользователя и передают его в модуль генерации ответа; модуль генерации ответа формирует кандидатный ответ; при этом кандидатный ответ проверяют на противоречия, где: из кандидатного ответа выделяют объект в высказывании; в модуле извлечения объекта-субъекта-предиката производят поиск субъекта и предиката во фразе; производят поиск субъекта и предиката в графе знаний; в модуле проверки относительно графа находят противоречия если два субъекта или два предиката во фразе и в базе различны; производят новую запись в граф знаний, если субъект или предикат во фразе включен или не противоречит понятию субъекта или предиката в базе; и выдают ответ пользователю. 1. A computer-implemented method for checking statements for contradictions using a knowledge graph, which includes the stages at which, by means of a processor: the user’s statement is received and transmitted to the response generation module; the response generation module generates a candidate response; in this case, the candidate answer is checked for contradictions, where: the object in the statement is selected from the candidate answer; in the module for extracting the subject-subject-predicate, the subject and predicate are searched for in the phrase; search for the subject and predicate in the knowledge graph; in the verification module with respect to the graph, contradictions are found if two subjects or two predicates in the phrase and in the base are different; make a new record in the knowledge graph if the subject or predicate in the phrase is included or does not contradict the concept of the subject or predicate in the base; and give a response to the user.
2. Способ по п.1 , отличающийся тем, что модуль генерации ответа выполнен на базе ранжирующей или генеративной, или ODQA моделей. 2. The method according to claim 1, characterized in that the response generation module is based on ranking or generative or ODQA models.
3. Способ по п.1 , отличающийся тем, что проверка в модуле относительно графа знаний реализована с помощью MQL/SparkQL запросов путем нахождения или не нахождения ответа. 3. The method according to claim 1, characterized in that the check in the module relative to the knowledge graph is implemented using MQL / SparkQL queries by finding or not finding an answer.
9 nine
ЗАМЕНЯЮЩИЙ ЛИСТ (ПРАВИЛО 26) SUBSTITUTE SHEET (RULE 26)
PCT/RU2019/000779 2019-10-31 2019-10-31 Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies WO2021086221A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/RU2019/000779 WO2021086221A1 (en) 2019-10-31 2019-10-31 Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/RU2019/000779 WO2021086221A1 (en) 2019-10-31 2019-10-31 Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies

Publications (1)

Publication Number Publication Date
WO2021086221A1 true WO2021086221A1 (en) 2021-05-06

Family

ID=75714541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/RU2019/000779 WO2021086221A1 (en) 2019-10-31 2019-10-31 Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies

Country Status (1)

Country Link
WO (1) WO2021086221A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832055A (en) * 2017-12-11 2018-03-23 安徽科大国创云网科技有限公司 A kind of MQL language translations are the method for sql like language
US20190272323A1 (en) * 2017-05-10 2019-09-05 Oracle International Corporation Enabling chatbots by validating argumentation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190272323A1 (en) * 2017-05-10 2019-09-05 Oracle International Corporation Enabling chatbots by validating argumentation
CN107832055A (en) * 2017-12-11 2018-03-23 安徽科大国创云网科技有限公司 A kind of MQL language translations are the method for sql like language

Similar Documents

Publication Publication Date Title
US10586155B2 (en) Clarification of submitted questions in a question and answer system
US9558264B2 (en) Identifying and displaying relationships between candidate answers
US10769552B2 (en) Justifying passage machine learning for question and answer systems
US10102254B2 (en) Confidence ranking of answers based on temporal semantics
US10891321B2 (en) Systems and methods for performing a computer-implemented prior art search
US10339453B2 (en) Automatically generating test/training questions and answers through pattern based analysis and natural language processing techniques on the given corpus for quick domain adaptation
US9621601B2 (en) User collaboration for answer generation in question and answer system
US9754207B2 (en) Corpus quality analysis
JP7153004B2 (en) COMMUNITY Q&A DATA VERIFICATION METHOD, APPARATUS, COMPUTER DEVICE, AND STORAGE MEDIUM
US9760828B2 (en) Utilizing temporal indicators to weight semantic values
US9720962B2 (en) Answering superlative questions with a question and answer system
US10628749B2 (en) Automatically assessing question answering system performance across possible confidence values
US10282678B2 (en) Automated similarity comparison of model answers versus question answering system output
CN109101551B (en) Question-answer knowledge base construction method and device
US10586161B2 (en) Cognitive visual debugger that conducts error analysis for a question answering system
US20180190140A1 (en) System and method for augmenting answers from a qa system with additional temporal and geographic information
KR102126911B1 (en) Key player detection method in social media using KeyplayerRank
WO2021086221A1 (en) Method for maintaining dialogue consistency using a knowledge graph and checking statements for inconsistencies
US11068376B2 (en) Analytics engine selection management
Yıldırım et al. Identifying Topics from Micropost Collections using Linked Open Data
WO2023211304A1 (en) System and method for collecting and processing news from the internet
EA044489B1 (en) SYSTEM AND METHOD FOR COLLECTING AND PROCESSING NEWS ON THE INTERNET

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022107945

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19951121

Country of ref document: EP

Kind code of ref document: A1