Large model and knowledge graph based generative dialogue method, system and medium

By combining large models and knowledge graphs to generate dialogues, the problems of lack of common sense, poor interpretability, and data bias in generated dialogue systems are solved, resulting in more accurate, personalized, and interpretable dialogue responses and improving user experience.

CN117235215BActive Publication Date: 2026-07-10ZHEJIANG CHUANGLIN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG CHUANGLIN TECH CO LTD
Filing Date
2023-08-28
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing generative dialogue systems based on large models suffer from problems such as lack of common sense, lack of interpretability, data bias, and semantic misleading.

Method used

By combining large models and knowledge graphs, user input information is preprocessed and intelligently analyzed to determine whether graph retrieval is necessary. Dialogues are generated using knowledge graph databases and large models, and the knowledge base is built and updated to achieve accuracy and interpretability of the dialogues.

Benefits of technology

It improves content matching and semantic understanding capabilities, reduces data bias, enhances common sense and background knowledge, provides comprehensive real-time information, and improves user experience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235215B_ABST
    Figure CN117235215B_ABST
Patent Text Reader

Abstract

The application discloses a dialogue system and method based on a large model and a knowledge graph, and relates to the technical field of computers.The method comprises obtaining input information of a user;preprocessing and intelligently analyzing the obtained input information to determine whether to perform graph retrieval;when graph retrieval is performed, generating a query statement based on the intelligent analysis result and a first large model, determining constraint information corresponding to the input information from a knowledge graph database based on the query statement; and generating a dialogue based on the input information, the constraint information and a second large model.The application can improve content matching degree, correct data bias and improve generalization ability, enhance common sense and background knowledge, enhance the explainability of the decision-making process, reduce semantic deviation and misguidance, provide comprehensive real-time information, improve user experience and satisfaction, and provide highly reliable dialogue support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a method for generating dialogues based on large models and knowledge graphs. Background Technology

[0002] Generative dialogue systems utilize natural language processing and artificial intelligence technologies to understand user-posed questions in a human-like manner and provide accurate and useful answers through search, reasoning, or other methods. Such systems typically consist of several key components: Language Understanding – Intelligent question-answering systems need to understand and parse the natural language input by users, including tasks such as lexical analysis, syntactic analysis, and semantic understanding, to extract key information and intent from the question; Knowledge Representation and Storage – Intelligent question-answering systems require a knowledge base or knowledge graph to store structured and semi-structured knowledge data, which can include facts, relationships, entity attributes, etc., to support accurate answers to questions; Retrieval and Reasoning – To answer user questions, the system can use information retrieval techniques to find relevant information from large-scale text data. Furthermore, reasoning and logical inference can be applied to the question parsing and answer generation process to introduce higher-level reasoning capabilities; Answer Generation and Ranking – Based on the results of understanding and reasoning, intelligent question-answering systems can generate candidate answers, score and rank these answers, and select the best answer to present to the user.

[0003] Large models refer to machine learning or deep learning models with a massive number of parameters and computational resource requirements. These models typically consist of billions to tens of billions or even more trainable parameters, far exceeding the scale of traditional models. The emergence of large models is due to two main factors: first, the growth in data scale. With the widespread adoption of the internet and improved data collection capabilities, vast amounts of training data have become available. More data can help large models learn more complex and accurate feature representations, thereby improving their performance; second, the development of computing resources. With the continuous advancement of hardware technologies, such as graphics processing units (GPUs), tensor processing units (TPUs), and distributed computing, the training and inference of large models have become more feasible. These technologies provide powerful computing capabilities, enabling large models to be trained and deployed within a reasonable timeframe.

[0004] AI agent technology refers to agent systems that use artificial intelligence to simulate and execute specific tasks, behaviors, or decisions. These agent systems possess a certain degree of autonomy and intelligence, capable of perceiving the environment, analyzing information, making decisions, and executing actions. Its development benefits from advancements in machine learning, natural language processing, computer vision, and reinforcement learning. This technology can play a role in various fields and applications, such as: Game agents—In games, AI agents can play virtual roles and interact with players. They can automatically learn and adapt to game rules and adopt strategies to complete game tasks, providing challenging opponents or partners; Intelligent robots—AI agents can be embedded in robotic systems, enabling them to perceive their surroundings, process voice and visual input, and perform physical actions. This allows robots to exhibit intelligent behavior in different tasks and environments, such as autonomous navigation, interactive dialogue, and object grasping; Personal assistants—AI agents can be part of personal assistant applications, using natural language processing and machine learning technologies to understand user needs and provide corresponding services and suggestions. They can help users manage schedules, answer questions, provide recommendations, etc.; Smart IoT devices—AI agents can be integrated into IoT devices, giving them intelligent functions.

[0005] Knowledge graph technology is a set of methods and tools for representing and organizing structured knowledge. It models real-world entities (such as people, places, and times) and their relationships in graphical form, creating a knowledge network rich in semantic information. It typically consists of three core elements: entities—representing concrete objects or abstract concepts in the real world, such as people, places, and products; each entity has a unique identifier and can be connected to other entities; attributes—primarily describing the characteristics, properties, or related information of the entity; for example, for the entity "person," attributes could include name, age, and occupation. Attributes help us describe and understand the entity in more detail; and relationships—representing the connections or interactions between entities, describing the associations or dependencies between them; for example, there can be an employment relationship between a person and a company, or a birthplace relationship between a person and a place. The goal of this technology is to capture and organize knowledge in a structured way to facilitate machine understanding and reasoning. It can be widely applied in many fields, such as natural language processing, intelligent search, recommendation systems, question-answering systems, and artificial intelligence assistants.

[0006] Large-model-based intelligent question-answering systems often suffer from the following illusions: Trust in generative answers: While large-model intelligent question-answering systems can generate seemingly accurate and fluent answers, this doesn't mean they are always correct. The system may use complex language patterns to mask its lack of actual understanding or flawed reasoning. Lack of common sense and contextual understanding: Despite having vast amounts of training data, large models are still susceptible to data bias and limitations, making it difficult for the system to understand common sense, contextual information, or implicit meanings, thus providing answers inconsistent with human intuition. Lack of interpretability: Large models are often black-box models, making it difficult to explain their decision-making processes and reasoning logic. This makes it difficult for users to understand why they received a particular answer and limits the review and correction of the system's output. Data bias and discrimination: The training data of large models may reflect social biases and stereotypes, causing the system to exhibit bias or discrimination when answering questions. This can lead to unfair results and further reinforce existing inequalities. Citing low-quality and erroneous information: During training, large models may be exposed to textual data containing errors or low-quality information, which may cause the system to cite inaccurate or misleading information when answering questions, or even spread false information. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method and system for generating dialogues based on large models and knowledge graphs, in order to solve problems such as lack of common sense, lack of interpretability, data bias, semantic misleading and deviation in existing technologies.

[0008] On the one hand, a method for generating dialogues based on large models and knowledge graphs is provided, including:

[0009] Obtain user input information;

[0010] The acquired input information is preprocessed and intelligently analyzed to determine whether graph retrieval should be performed.

[0011] When performing graph retrieval, a query statement is generated based on the intelligent analysis results and the first major model. Based on the query statement, constraint information corresponding to the input information is determined from the knowledge graph database.

[0012] Based on the input information, the constraint information, and the second major model, a dialogue is generated.

[0013] Preferably, the method also includes generating a dialogue based on the input information and the second major model when graph retrieval is not performed.

[0014] Preferably, the system also includes a pre-built knowledge graph database, which comprises:

[0015] Obtain the dataset, perform text recognition on the dataset, and obtain the text dataset;

[0016] Entity relations are extracted from the text dataset;

[0017] A graph model is constructed based on the extracted data, and the constructed graph model is stored in a knowledge graph database.

[0018] As a preferred option, it also includes:

[0019] The generated dialogues are embedded into a knowledge graph database using the first major model;

[0020] The processing procedure for the current input information is updated in the knowledge base to facilitate preprocessing and intelligent analysis of subsequent input information.

[0021] Preferably, the acquired input information is preprocessed and intelligently analyzed to determine whether graph retrieval should be performed, including:

[0022] Preprocess the acquired input information;

[0023] The preprocessed input information is subjected to a first intelligent analysis, which includes question word segmentation and question entity recognition.

[0024] The preprocessed input information is subjected to a second intelligent analysis, which includes knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference.

[0025] The decision on whether to perform a graph search is based on the results of the second analysis.

[0026] On the other hand, a generative dialogue system based on large models and knowledge graphs is provided, including:

[0027] The acquisition module is used to acquire user input information;

[0028] The AI ​​analysis module preprocesses and intelligently analyzes the acquired input information to determine whether to perform graph retrieval.

[0029] The graph retrieval module is used to generate a query statement based on the intelligent analysis results and the first major model when performing graph retrieval, and to determine the constraint information corresponding to the input information from the knowledge graph database based on the query statement.

[0030] The dialogue module is used to generate a dialogue based on the input information, the constraint information, and the second major model.

[0031] Preferably, the dialogue module is also used for:

[0032] Without performing graph retrieval, a dialogue is generated based on the input information and the second major model.

[0033] Preferably, a database construction module is also included, the database construction module being used for:

[0034] Obtain the dataset, perform text recognition on the dataset, and obtain the text dataset;

[0035] Entity relations are extracted from the text dataset;

[0036] A graph model is constructed based on the extracted data, and the constructed graph model is stored in a knowledge graph database.

[0037] Preferably, the system also includes a knowledge update module, which is used for:

[0038] The generated dialogues are embedded into a knowledge graph database using the first major model;

[0039] The processing procedure for the current input information is updated in the knowledge base of the AI ​​analysis module.

[0040] Preferably, the AI ​​analysis module is specifically used for:

[0041] Preprocess the acquired input information;

[0042] The preprocessed input information is subjected to a first intelligent analysis, which includes question word segmentation and question entity recognition.

[0043] The preprocessed input information is subjected to a second intelligent analysis, which includes knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference.

[0044] The decision on whether to perform a graph search is based on the results of the second analysis.

[0045] The beneficial effects of this invention are reflected in:

[0046] 1. Improve content matching accuracy and semantic understanding capabilities:

[0047] It can improve content matching accuracy, break through the limitations of relying solely on statistical methods, achieve a more comprehensive understanding and accurate grasp of the meaning of text, better understand user intent during dialogue, and thus provide more appropriate and precise responses.

[0048] 2. Enhance generalization ability and eliminate bias.

[0049] By combining large-scale training data with the rich information of knowledge graphs, it can reduce the bias in the data during dialogue and demonstrate stronger generalization ability. It can balance knowledge from different fields and cultural backgrounds and avoid unfair or erroneous biases caused by data imbalance.

[0050] 3. Enhance general knowledge and background information

[0051] By integrating extensive common sense and background knowledge, the system enables complex logical reasoning and inference. It leverages the rich information in knowledge graphs, combined with the reasoning capabilities of large models, to provide more in-depth and insightful dialogue responses.

[0052] 4. Enhance the explainability of the decision-making process

[0053] It provides a higher degree of interpretability of the decision-making process. Through the generation process of dialogue responses, it can explain to users the reasons and reasoning behind their decisions, enabling users to have a better understanding and trust in the system's answers.

[0054] 5. Provides comprehensive real-time information

[0055] It has the ability to update the knowledge graph, thus providing comprehensive information on the latest developments and trends. Whether it is news, technology, medical or other fields, information can be obtained and provided to users in a timely manner, keeping the conversation process real-time and practical.

[0056] 6. Improve user experience and satisfaction:

[0057] Provide more accurate and personalized responses, and engage in conversations with users in a more natural and fluent manner to enhance user experience and increase user satisfaction and engagement. Attached Figure Description

[0058] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0059] Figure 1 A flowchart of a method for generating dialogues based on a large model and knowledge graph is provided for embodiments of the present invention;

[0060] Figure 2 This invention provides a schematic diagram of the structure of a generative dialogue system based on a large model and knowledge graph. Detailed Implementation

[0061] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0062] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0063] Example 1

[0064] like Figure 1 As shown, this embodiment of the invention provides a method for generating dialogue based on a large model and a knowledge graph, including: acquiring user input information; preprocessing and intelligently analyzing the acquired input information to determine whether to perform graph retrieval; when performing graph retrieval, generating a query statement based on the intelligent analysis results and a first large model, and determining constraint information corresponding to the input information from a knowledge graph database based on the query statement; and generating a dialogue based on the input information, the constraint information, and a second large model.

[0065] This embodiment provides a dialogue generation method based on a large model and knowledge graph. By intelligently analyzing and preprocessing user input information, the system can quickly determine whether to perform graph retrieval, avoiding unnecessary computation and improving the efficiency and accuracy of information acquisition. By retrieving constraint information corresponding to the user input from the knowledge graph database through query statements, it can provide more accurate and comprehensive knowledge in the dialogue. By inputting detailed constraints and input information into a second large model, it can generate more natural, coherent, and intelligent dialogue responses. This invention can improve content matching, correct data bias and enhance generalization ability, strengthen common sense and background knowledge, enhance the interpretability of the decision-making process, reduce semantic bias and misleading information, provide comprehensive real-time information, improve user experience and satisfaction, and provide highly reliable dialogue support. It is more valuable and effective in practical applications, providing users with better services and experiences.

[0066] In an embodiment of the present invention, the method further includes: generating a dialogue based on the input information and the second major model when graph retrieval is not performed.

[0067] In this embodiment of the invention, a knowledge graph database is pre-built. The pre-built knowledge graph database includes: acquiring a dataset, performing text recognition on the dataset to obtain a text dataset; extracting entity relationships from the text dataset; constructing a graph model based on the extracted data; and storing the constructed graph model in the knowledge graph database.

[0068] Specifically, first, datasets are acquired from various sources, such as public datasets, web crawling data, and business data. The data formats include structured data, semi-structured data, and unstructured data. Then, the acquired datasets are preprocessed, including noise removal, error correction, and data standardization, to ensure data quality. Natural language processing techniques are then used to analyze the text data, including tasks such as word segmentation, part-of-speech tagging, and entity recognition, to extract useful entity, relation, and attribute information. Finally, the entity, relation, and attribute information in the text data is organized into a graph structure to construct a knowledge graph database.

[0069] By constructing a knowledge graph database, structured, semi-structured, and unstructured data can be transformed into a knowledge base containing entity, relation, and attribute information, providing rich and organized knowledge content.

[0070] In this embodiment of the invention, the method further includes: embedding the generated dialogue into a knowledge graph database using a first model; and updating the processing procedure of the current input information to the knowledge base to facilitate preprocessing and intelligent analysis of subsequent input information.

[0071] By embedding the generated dialogue responses into a knowledge graph database, real-time updates to the database content can be achieved, providing the latest knowledge content and answers and maintaining the timeliness of knowledge. By updating the processing of current input information and entity relationships to the knowledge base, it helps to optimize and improve processing capabilities and answer quality, continuously improving the efficiency and performance of the dialogue.

[0072] In this embodiment of the invention, the acquired input information is preprocessed and intelligently analyzed to determine whether to perform graph retrieval, including: preprocessing the acquired input information; performing a first intelligent analysis on the preprocessed input information, the first intelligent analysis including question segmentation and question entity recognition; performing a second intelligent analysis on the preprocessed input information, the second intelligent analysis including knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference; and determining whether to perform graph retrieval based on the second analysis result.

[0073] Specifically, preprocessing includes word segmentation of the acquired input information, dividing sentences into word sequences, and applying entity recognition technology to identify and label entities such as people, places, and times from the segmented sentences. The first intelligent analysis package performs question segmentation on the preprocessed input information, further dividing the questions within the sentences; it also uses entity recognition technology to analyze and identify entities within the questions and label them. The second intelligent analysis includes: using semantic matching algorithms to semantically match the preprocessed input information with relevant information in the knowledge base to determine its matching degree; and using semantic reasoning technology to perform semantic reasoning and logical inference on the preprocessed input information to further understand the meaning and purpose of the user's question. Graph retrieval includes: after the second intelligent analysis, determining whether to perform graph retrieval based on the analysis results. If the second intelligent analysis results indicate the need to further retrieve constraint information from the knowledge graph, the graph retrieval module executes a query operation to retrieve the corresponding constraint information from the knowledge graph database.

[0074] Through technologies such as semantic understanding and entity recognition, it is possible to efficiently and accurately identify the user's input intent and key information, and infer the user's true purpose and needs. Through preprocessing and intelligent analysis, it is possible to extract the constraints that need to be retrieved from the knowledge graph from the user's questions, such as the relationships between specific entities and attribute information, which helps to provide more accurate and personalized dialogue responses.

[0075] Example 2

[0076] As shown in Figure 2, this embodiment of the invention provides a generative dialogue system based on a large model and a knowledge graph, comprising: an acquisition module 100 for acquiring user input information; an AI analysis module 200 for preprocessing and intelligently analyzing the acquired input information to determine whether to perform graph retrieval; a graph retrieval module 300 for generating a query statement based on the intelligent analysis results and a first large model when performing graph retrieval, and determining constraint information corresponding to the input information from a knowledge graph database based on the query statement; and a dialogue module 400 for generating a dialogue based on the input information, the constraint information, and the second large model.

[0077] In an embodiment of the present invention, the dialogue module is further configured to: generate a dialogue based on the input information and the second major model when graph retrieval is not performed.

[0078] In this embodiment of the invention, a database construction module is also included, which is used to: acquire a dataset, perform text recognition on the dataset to obtain a text dataset; extract entity relationships from the text dataset; construct a graph model based on the extracted data; and store the constructed graph model in a knowledge graph database.

[0079] In this embodiment of the invention, a knowledge update module is also included, which is used to: embed the generated dialogue into a knowledge graph database using the first model; and update the processing of the current input information to the knowledge base of the AI ​​analysis module.

[0080] In this embodiment of the invention, the AI ​​analysis module is specifically used for: preprocessing the acquired input information; performing a first intelligent analysis on the preprocessed input information, the first intelligent analysis including question segmentation and question entity recognition; performing a second intelligent analysis on the preprocessed input information, the second intelligent analysis including knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference; and determining whether to perform graph retrieval based on the second analysis result.

[0081] It should be understood that the generative dialogue system based on large models and knowledge graphs provided in this embodiment of the invention and the generative dialogue method based on large models and knowledge graphs provided in the above embodiments are based on the same inventive concept. Regarding this invention...

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A dialog generation method based on large models and knowledge graphs, characterized in that, include: Obtain user input information; The acquired input information is preprocessed and intelligently analyzed to determine whether graph retrieval should be performed. When performing graph retrieval, a query statement is generated based on the intelligent analysis results and the first major model. Based on the query statement, constraint information corresponding to the input information is determined from the knowledge graph database. Based on the input information, the constraint information, and the second major model, a dialogue is generated. The generated dialogues are embedded into a knowledge graph database using the first major model; The processing procedure for the current input information is updated in the knowledge base to facilitate preprocessing and intelligent analysis of subsequent input information; The method for generating dialogue also includes: Without performing graph retrieval, a dialogue is generated based on the input information and the second major model; The acquired input information is preprocessed and intelligently analyzed to determine whether graph retrieval should be performed, including: Preprocess the acquired input information; The preprocessed input information is subjected to a first intelligent analysis, which includes question word segmentation and question entity recognition. The preprocessed input information is subjected to a second intelligent analysis, which includes knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference. The decision on whether to perform a graph search is based on the results of the second analysis.

2. The dialog generation method based on large models and knowledge graphs according to claim 1, characterized in that, It also includes a pre-built knowledge graph database, which includes: Obtain the dataset, perform text recognition on the dataset, and obtain the text dataset; Entity relations are extracted from the text dataset; A graph model is constructed based on the extracted data, and the constructed graph model is stored in a knowledge graph database.

3. A generative dialogue system based on large models and knowledge graphs, characterized in that: include: The acquisition module is used to acquire user input information; The AI ​​analysis module preprocesses and intelligently analyzes the acquired input information to determine whether to perform graph retrieval. The graph retrieval module is used to generate a query statement based on the intelligent analysis results and the first major model when performing graph retrieval, and to determine the constraint information corresponding to the input information from the knowledge graph database based on the query statement. The dialogue module is used to generate a dialogue based on the input information, the constraint information, and the second major model. The knowledge update module is used to embed the generated dialogue into the knowledge graph database using the first major model; and to update the processing of the current input information to the knowledge base of the AI ​​analysis module. The dialogue module is also used for: Without performing graph retrieval, a dialogue is generated based on the input information and the second major model; The AI ​​analysis module is specifically used for: Preprocess the acquired input information; The preprocessed input information is subjected to a first intelligent analysis, which includes question word segmentation and question entity recognition. The preprocessed input information is subjected to a second intelligent analysis, which includes knowledge base information retrieval, semantic matching, semantic reasoning, and logical inference. The decision on whether to perform a graph search is based on the results of the second analysis.

4. The generative dialogue system based on large models and knowledge graphs according to claim 3, characterized in that, It also includes a database construction module, which is used for: Obtain the dataset, perform text recognition on the dataset, and obtain the text dataset; Entity relations are extracted from the text dataset; A graph model is constructed based on the extracted data, and the constructed graph model is stored in a knowledge graph database.