Composite knowledge reasoning method, device, equipment, medium and product

By building a knowledge inference model, combining text vector library, knowledge graph and reasoning machine, the problem that users spend too long in obtaining answers to questions is solved, and fast and accurate knowledge inference and problem solving is achieved.

CN119578554APending Publication Date: 2025-03-07INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411802240.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, users need to spend a lot of time screening and verifying the effectiveness of information when obtaining answers to questions, and online help and professional consultation cannot solve the problem in a timely manner.

Method used

By collecting various types of knowledge source data, a relational database and document database are constructed, a knowledge inference model is generated, including text vector libraries, knowledge graphs and inference machines, and query results are generated based on input problems.

Benefits of technology

It realizes the accuracy and efficiency of knowledge reasoning, can quickly find the content needed by users, reduce users' time and energy consumption in problem investigation, and improve work efficiency and decision-making quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578554A_ABST
    Figure CN119578554A_ABST
Patent Text Reader

Abstract

The invention discloses a compound knowledge reasoning method, device and equipment, a medium and a product, which are applied to the field of large models, and the method comprises the following steps: collecting knowledge base source data, and constructing a database according to the knowledge base source data; a knowledge reasoning large model is generated according to the database, and the knowledge reasoning large model comprises a text vector library, a knowledge graph and an inference engine; and obtaining an input problem, and generating a query result according to the input problem and the knowledge reasoning large model. By integrating data of various types and sources, the comprehensiveness and integrity of the data can be ensured, and a rich basis is provided for subsequent knowledge reasoning. The constructed knowledge reasoning large model integrates a text vector library, a knowledge graph and an inference engine, can perform logical reasoning on specific problems proposed by a user, provides accurate diagnosis suggestions and customized solutions, can help the user quickly find required contents in massive knowledge, and improves the user experience. The time and energy consumption of the user on troubleshooting is reduced, and the working efficiency and the decision-making quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of large models, and in particular to a composite knowledge reasoning method, device, equipment, medium and product. Background Art

[0002] In today's era of information explosion, the management and application of knowledge has become increasingly complex and critical. Effective knowledge utilization plays a decisive role in solving various practical problems, making scientific decisions, and promoting innovation and development.

[0003] In the existing technology, users will get answers to their questions by searching the Internet or seeking help online. The information sources on the Internet are extensive, but lack systematicity and integration. Users often need to spend a lot of time to screen and verify the validity of information. Online help often requires waiting for responses from other users, and professional consultation is limited by service response time and cannot solve problems in a timely manner. Summary of the invention

[0004] The present invention provides a composite knowledge reasoning method, device, equipment, medium and product, which integrates multiple types of knowledge sources to make the content generated by large model diagnosis richer and more accurate.

[0005] According to one aspect of the present invention, a composite knowledge reasoning method is provided, the method comprising:

[0006] Collecting knowledge base source data, and building a database based on the knowledge base source data, wherein the database includes a relational database and a document database;

[0007] Generate a knowledge reasoning model based on the database, wherein the knowledge reasoning model includes a text vector library, a knowledge graph and an inference engine;

[0008] Get input questions and generate query results based on the input questions and the knowledge reasoning model.

[0009] Optionally, knowledge base source data is collected and a database is constructed based on the knowledge base source data, including: constructing a data collection entry and obtaining the knowledge base source data from the data collection entry in accordance with a first specified format; performing data cleansing on the knowledge base source data to generate cleaned knowledge base source data, and determining structured data and unstructured data in the cleaned knowledge base source data; generating a relational database based on the structured data and generating a document database based on the unstructured data.

[0010] Optionally, a knowledge reasoning big model is generated based on a database, including: extracting text data from a document database, and building a text vector library and a knowledge graph based on the text data; extracting code information from a relational database, and converting the code information into a second specified format to generate fact information, wherein the code information includes program logic and error information; obtaining inference rules based on the code information, and building an inference engine based on the inference rules and the fact information; and building a knowledge reasoning big model based on the text vector library, the knowledge graph and the inference engine.

[0011] Optionally, a text vector library and a knowledge graph are constructed based on the text data, including: preprocessing the text data to generate processed text data, and performing feature extraction on the processed text data to generate extracted features, wherein the preprocessing includes removing irrelevant information, stem extraction, word form restoration, segmentation, and adding annotation information; converting each extracted feature into a feature vector, and generating a text vector library based on each feature vector; extracting each entity from the text data through named entity technology, and identifying the entity relationship between each entity; and generating a knowledge graph based on each entity and the corresponding entity relationship.

[0012] Optionally, query results are generated based on the input question and the knowledge reasoning big model, including: extracting key information of the input question based on natural language processing, and converting the key information according to a preset processing format to generate a task chain; inputting the task chain into the knowledge reasoning big model to obtain text vector library results, knowledge graph results and inference engine results; integrating the text vector library results, knowledge graph results and inference engine results to generate query results.

[0013] Optionally, after generating query results based on the input question and the knowledge reasoning big model, the method also includes: obtaining user feedback based on the query results, wherein the user feedback includes positive feedback and negative feedback; using the negative feedback as training data, and adjusting the knowledge reasoning big model based on the training data to generate an adjusted model; and adding the positive feedback to the knowledge base source data.

[0014] According to another aspect of the present invention, a composite knowledge reasoning device is provided, the device comprising:

[0015] A database construction module is used to collect knowledge base source data and construct a database based on the knowledge base source data, wherein the database includes a relational database and a document database;

[0016] A knowledge reasoning big model generation module is used to generate a knowledge reasoning big model based on a database, wherein the knowledge reasoning big model includes a text vector library, a knowledge graph and an inference engine;

[0017] The query result generation module is used to obtain input questions and generate query results based on the input questions and the knowledge reasoning model.

[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0019] at least one processor;

[0020] and a memory communicatively coupled to the at least one processor;

[0021] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a composite knowledge reasoning method described in any embodiment of the present invention.

[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a composite knowledge reasoning method described in any embodiment of the present invention when executed.

[0023] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the computer program implements a composite knowledge reasoning method according to any embodiment of the present invention.

[0024] The technical solution of the embodiment of the present invention can ensure the comprehensiveness and integrity of the data by integrating data of various types and sources, and provide a rich foundation for subsequent knowledge reasoning. The constructed knowledge reasoning model integrates the text vector library, knowledge graph and reasoning engine, and can perform logical reasoning on specific questions raised by users, provide accurate diagnostic suggestions and customized solutions, and help users quickly find the required content in massive knowledge, reduce the time and energy consumed by users in troubleshooting, and improve work efficiency and decision-making quality.

[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a flow chart of a composite knowledge reasoning method provided according to the first embodiment of the present invention;

[0028] Figure 2 is a flow chart of another composite knowledge reasoning method provided according to the first embodiment of the present invention;

[0029] Figure 3 is a flow chart of another composite knowledge reasoning method provided according to the second embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of the structure of a composite knowledge reasoning device provided according to Embodiment 3 of the present invention;

[0031] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing a composite knowledge reasoning method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] Figure 1 A flowchart of a composite knowledge reasoning method is provided for the first embodiment of the present invention. This embodiment is applicable to the Kafka intelligent diagnosis scenario. The method can be executed by a composite knowledge reasoning device. The composite knowledge reasoning device can be implemented in the form of hardware and / or software. The composite knowledge reasoning device can be configured in a computer controller. Figure 1 As shown, the method includes:

[0036] S110 , collecting knowledge base source data, and building a database according to the knowledge base source data, wherein the database includes a relational database and a document database.

[0037] It should be noted that the present invention can be applied to the Kafka intelligent diagnosis scenario. Apache Kafka is an open source stream processing platform, a distributed, fault-tolerant publish-subscribe messaging system that can handle a large amount of real-time data streams. Kafka is designed to process and store massive data streams while ensuring high throughput, low latency and persistence of data. With the surge in demand for big data and real-time data analysis, Apache Kafka, as a high-performance distributed messaging system, is favored for its high throughput, low latency and scalability. However, for developers who are not deeply exposed to Kafka or enterprises that run Kafka clusters in complex environments, facing the huge code base, frequent version updates, complex configuration options and various usage scenarios in open source projects, it is often easy to encounter various difficult-to-solve technical problems, such as performance bottlenecks, data loss, cluster fault recovery, advanced function implementation, etc.

[0038] Among them, the knowledge base source data refers to the original data set based on knowledge reasoning, which comes from various channels, such as the GitHub code repository addresses of various versions of Apache Kafka, official document addresses, Kafka feature design documents, community Jira information URLs and internal corporate documents, etc. It contains rich domain knowledge and can provide data support for the subsequent construction of databases and generation of knowledge reasoning models.

[0039] Optionally, knowledge base source data is collected and a database is constructed based on the knowledge base source data, including: constructing a data collection entry and obtaining the knowledge base source data from the data collection entry in accordance with a first specified format; performing data cleansing on the knowledge base source data to generate cleaned knowledge base source data, and determining structured data and unstructured data in the cleaned knowledge base source data; generating a relational database based on the structured data and generating a document database based on the unstructured data.

[0040] Specifically, the controller can construct adapted data collection portals for different sources. For example, for website data, the collection portal may be constructed through web crawler technology, and crawling rules may be set, such as limiting the scope, depth, and frequency of crawled web pages, to ensure that relevant web page content can be accurately obtained as part of the knowledge base source data; for internal enterprise systems, the collection portal may be constructed through interface docking, so that the system can transmit data for collection in a prescribed manner.

[0041] Among them, the first specified format is to make the acquired data have a unified specification, which is convenient for subsequent processing. For example, data collection can be through the Clone API of various versions of GitHub code bases, storing the project code in a self-built local code base; by generating web page snapshots, the elements in the official documents and feature document web pages are obtained through the HTML analyzer; through the export function of the community Jira, the Jira information of the code changes is also synchronously collected locally. Different data sources may originally have different formats, such as some are plain text formats, and some are formats with specific tags. By setting the first specified format, the data is converted or sorted accordingly when it is collected.

[0042] Specifically, data cleaning is to remove redundant, erroneous and irrelevant information from the source data of the knowledge base and improve data quality. For example, duplicate data can be identified and deleted through deduplication algorithms, such as hash value-based comparison. Data validation rules can be used to compare the format, range and other conditions that the data should meet, and those that do not meet the requirements can be corrected or deleted.

[0043] Among them, structured data refers to data with a clear format and organizational rules, while unstructured data refers to data without a fixed format and organizational rules, such as text files, images, audio, etc. For the part determined as structured data, the controller will split and organize it according to different entities and attributes. Document databases are mainly used to store and manage unstructured data.

[0044] S120. Generate a knowledge reasoning big model based on the database, wherein the knowledge reasoning big model includes a text vector library, a knowledge graph and an inference engine.

[0045] The knowledge reasoning big model refers to a comprehensive model for knowledge reasoning, which integrates a variety of knowledge representation and reasoning tools, including text vector libraries, knowledge graphs, and reasoning engines, and can mine relevant knowledge and generate reasonable query results based on input questions through the synergy of internal components.

[0046] Figure 2 A flowchart of a composite knowledge reasoning method is provided for the first embodiment of the present invention, wherein step S120 mainly includes the following steps S121 to S126:

[0047] S121 . Extracting text data from a document database, preprocessing the text data to generate processed text data, and performing feature extraction on the processed text data to generate extracted features.

[0048] Preprocessing includes removing irrelevant information, stemming, word form restoration, segmentation, and adding annotation information. Irrelevant information refers to the fact that text data may contain a lot of content in its original state that is not really helpful for subsequent analysis and model building, such as advertisements, copyright notices, and navigation bar text in web page text. Irrelevant information is identified and removed through specific rules and algorithms. For example, it can be filtered and deleted according to the format, position, and some common irrelevant vocabulary patterns of the text, so that the remaining text is more focused on the core content and convenient for subsequent processing. Stemming is the process of restoring words to their basic stem form. Different words may have multiple forms due to tense, singular and plural, part of speech changes, etc., but their core meaning is usually carried by the stem. By converting various forms of words in the text into their stem form, it helps to reduce the diversity of vocabulary, pay more attention to the core semantics of words in subsequent analysis, avoid too much differential treatment due to form changes, and also compress the vocabulary to a certain extent and improve processing efficiency. Word form restoration refers to restoring words to their correct dictionary form, which can make the words in the text exist in a more standardized and semantically logical form, further improving the accuracy of subsequent semantic understanding and analysis of the text. Segmentation refers to dividing the natural structure of the text, such as paragraphs and chapters of an article, according to a certain semantic logic. Adding annotation information is to give more identifiable features to the elements in the text, such as annotating the Kafka version, component type, etc. Feature extraction refers to extracting meaningful features from the processed text data. Methods such as bag-of-words model or TF-IDF can be used to represent text.

[0049] S122, converting each extracted feature into a feature vector, and generating a text vector library based on each feature vector.

[0050] Specifically, when converting the extracted features into feature vectors, word embedding techniques such as Word2Vec or FastText can be used to represent each word as a low-dimensional vector, and then the entire text can be represented as the average or weighted average of the word vectors. In the subsequent search of the text vector library, a text similarity calculation algorithm will be used, that is, the text represented by the vector is used to calculate the similarity between texts, such as using indicators such as cosine similarity.

[0051] Furthermore, the collection of feature vectors constitutes a text vector library. In the text vector library, each vector represents a certain feature state of the text. By comparing the distance and angle between different vectors, the feature similarity between different texts can be determined, and then their semantic similarity can be determined.

[0052] S123. Extract entities from text data through named entity technology, identify entity relationships between entities, and generate a knowledge graph based on entities and corresponding entity relationships.

[0053] Among them, named entity technology is a natural language processing technology specifically used to identify specific types of entities in text. Named entity types include Kafka components, error types, and version numbers. By using named entity recognition tools such as NLTK library, Stanford NLP, etc., text data can be scanned, and various entities in the text can be identified according to preset entity type rules and algorithms. Specifically, after extracting each entity, it is necessary to further identify the entity relationship between them, such as dependency relationship, causal relationship, etc. This can be achieved specifically through relationship extraction technology, which analyzes the relationship between entities based on the semantic logic and grammatical structure of the text. The controller will construct nodes and edges based on each entity and the corresponding entity relationship to generate a knowledge graph, that is, each extracted entity is used as a node in the knowledge graph, and then the entity relationship between the identified entities is used as the edge connecting the nodes. The knowledge graph can clearly show the intrinsic connection between knowledge, which is convenient for mining and deducing knowledge along the known relationship path during the reasoning process.

[0054] S124: extracting code information from the relational database, and performing a second specified format conversion on the code information to generate fact information.

[0055] Among them, relational databases store structured data, including code-related information such as program logic and error information. Taking the database of a software development project as an example, there may be a table dedicated to recording the program code logic of different modules, and another table to record the error information that occurs during the code operation. By writing appropriate SQL query statements, according to the structure and field definition of the database table, the required code information can be accurately extracted from the table. For example, to obtain the program logic code of a specific module, you can query the record row corresponding to the module and extract the value of its code field.

[0056] It should be noted that the extracted code information may exist in the original code format or in a format specific to database storage, which is not conducive to direct use in subsequent reasoning and other operations. Therefore, a second specified format conversion is required to represent the extracted program logic and error information as factual information. Facts can be variables, functions, classes, etc. in the program, as well as the relationships between them, which can be represented using first-order logic, description logic and other representation methods.

[0057] S125. Obtain inference rules based on the code information, and construct an inference engine according to the inference rules and factual information.

[0058] Specifically, based on the program logic and error information, the reasoning rules formulated by the user can be obtained. The user refers to the developer who builds the knowledge reasoning model. The rules can be if-else statements, loop statements, etc. in the program, as well as the relationship between them. The rules can be represented by first-order logic, description logic, and other representation methods. Using factual information and reasoning rules, you can build a reasoning engine, that is, an inference engine. The inference engine can reason about given facts and infer unknown factual information and reasoning rules. Reasoning can be achieved using reasoning based on reasoning rules, model-based reasoning, and other methods. In subsequent error troubleshooting, the inference engine will be used to troubleshoot the error information in the program. Based on the existing facts and rules, possible causes of errors and solutions can be inferred.

[0059] S126. Construct a large knowledge reasoning model based on the text vector library, knowledge graph and reasoning engine.

[0060] Among them, the knowledge reasoning model is a composite knowledge reasoning system that achieves efficient knowledge reasoning by integrating the functions of components such as text vector library, knowledge graph and reasoning engine. The text vector library provides a semantic vector representation of text data, which enables the semantic similarity between texts to be quickly judged when dealing with natural language problems, so as to better understand the connotation of the problem. The knowledge graph shows the inherent connection between knowledge and provides rich knowledge paths and relationship clues for reasoning. The reasoning engine performs specific reasoning operations based on reasoning rules and factual information.

[0061] Specifically, when an input question is received, the knowledge reasoning model first uses the text vector library to vectorize the question and obtains the vector representation of the question. Then, by calculating the similarity with the vectors in the text vector library, the closest text content is found and some preliminary knowledge clues are obtained from it. At the same time, the knowledge graph is used to perform knowledge mining along the relevant relationship paths according to the entities and relationships involved in the question to further enrich the knowledge clues. Finally, these knowledge clues and the vector representation of the question are provided to the inference engine. The inference engine conducts in-depth analysis and reasoning on the question based on its own inference algorithm and the inference rules and factual information it relies on, and finally obtains the query result that meets the requirements of the input question.

[0062] S130: Obtain input questions, and generate query results based on the input questions and the knowledge reasoning big model.

[0063] Among them, input questions refer to questions about Kafka entered by users through terminal devices. Input reflects the knowledge and information needs that users want to obtain and is the trigger point for starting the knowledge reasoning process. The knowledge reasoning model will generate corresponding query results based on the input questions. Query results refer to the knowledge content related to the input questions mined by the knowledge reasoning model through the coordinated operation of components such as text vector library, knowledge graph, and reasoning engine based on the input questions to meet the user's knowledge needs and finally return them to the user.

[0064] Optionally, after generating query results based on the input question and the knowledge reasoning big model, the method also includes: obtaining user feedback based on the query results, wherein the user feedback includes positive feedback and negative feedback; using the negative feedback as training data, and adjusting the knowledge reasoning big model based on the training data to generate an adjusted model; and adding the positive feedback to the knowledge base source data.

[0065] Among them, user feedback is the basis for measuring whether the query results output by the knowledge reasoning model meet user needs. When users receive the query results generated based on the input questions, they will give corresponding feedback based on their satisfaction with the results. User feedback includes positive feedback and negative feedback. Positive feedback means that the user is satisfied with the query results and believes that the results accurately, comprehensively and effectively answer their questions. Negative feedback means that the user is dissatisfied with the query results, which may be due to inaccurate or incomplete results, or the failure to understand the true intention of the user's question.

[0066] Furthermore, when users give negative feedback, it indicates that the knowledge reasoning model has deficiencies in handling the corresponding input problems. The specific situations corresponding to these negative feedbacks, such as wrong answers and incomplete answers, become valuable training data. By using negative feedback content as training data and fine-tuning technology to train the knowledge reasoning model, the recognition of "bad information" by the model can be improved. Fine-tuning training can use supervised learning or reinforcement learning methods to adjust the parameters or strategies of the model so that the model can better identify and filter invalid or erroneous information.

[0067] It can be known that positive feedback indicates that users recognize the knowledge content in the query results, and adding it to the knowledge base source data can further enrich and improve the knowledge base, providing more comprehensive and accurate information for future diagnosis and analysis. In summary, the present invention forms a closed-loop optimization system that can continuously improve the quality of knowledge reasoning and query services.

[0068] The technical solution of the embodiment of the present invention can ensure the comprehensiveness and integrity of the data by integrating data of various types and sources, and provide a rich foundation for subsequent knowledge reasoning. The constructed knowledge reasoning model integrates the text vector library, knowledge graph and reasoning engine, and can perform logical reasoning on specific questions raised by users, provide accurate diagnostic suggestions and customized solutions, and help users quickly find the required content in massive knowledge, reduce the time and energy consumed by users in troubleshooting, and improve work efficiency and decision-making quality.

[0069] Embodiment 2

[0070] Figure 3 This is a flowchart of a composite knowledge reasoning method provided in the second embodiment of the present invention. This embodiment adds a specific process of generating query results based on input questions and knowledge reasoning models on the basis of the above-mentioned first embodiment. Among them, the specific contents of steps S210-S220 are roughly the same as steps S110-S120 in the first embodiment, so they will not be repeated in this embodiment. Figure 3 As shown, the method includes:

[0071] S210 , collecting knowledge base source data, and building a database according to the knowledge base source data, wherein the database includes a relational database and a document database.

[0072] Optionally, knowledge base source data is collected and a database is constructed based on the knowledge base source data, including: constructing a data collection entry and obtaining the knowledge base source data from the data collection entry in accordance with a first specified format; performing data cleansing on the knowledge base source data to generate cleaned knowledge base source data, and determining structured data and unstructured data in the cleaned knowledge base source data; generating a relational database based on the structured data and generating a document database based on the unstructured data.

[0073] S220. Generate a knowledge reasoning big model based on the database, wherein the knowledge reasoning big model includes a text vector library, a knowledge graph and an inference engine.

[0074] Optionally, a knowledge reasoning big model is generated based on a database, including: extracting text data from a document database, and building a text vector library and a knowledge graph based on the text data; extracting code information from a relational database, and converting the code information into a second specified format to generate fact information, wherein the code information includes program logic and error information; obtaining inference rules based on the code information, and building an inference engine based on the inference rules and the fact information; and building a knowledge reasoning big model based on the text vector library, the knowledge graph and the inference engine.

[0075] Optionally, a text vector library and a knowledge graph are constructed based on the text data, including: preprocessing the text data to generate processed text data, and performing feature extraction on the processed text data to generate extracted features, wherein the preprocessing includes removing irrelevant information, stem extraction, word form restoration, segmentation, and adding annotation information; converting each extracted feature into a feature vector, and generating a text vector library based on each feature vector; extracting each entity from the text data through named entity technology, and identifying the entity relationship between each entity; and generating a knowledge graph based on each entity and the corresponding entity relationship.

[0076] S230: Obtain an input question, extract key information of the input question based on natural language processing, and convert the key information according to a preset processing format to generate a task chain.

[0077] Specifically, the controller can parse the user's input question to determine the key topics and query intent. Natural language processing technology can be used to parse the input question and extract key information, such as entities, relationships, intents, etc. According to the parsing results, the question is converted into a format suitable for text vector library, knowledge graph and reasoning engine processing, and a task chain is generated. Specifically, a task generation algorithm can be used to generate a task chain, and the search tasks and order are determined according to the type and intent of the question.

[0078] S240, input the task chain into the knowledge reasoning big model to obtain the text vector library results, knowledge graph results and reasoning engine results.

[0079] Specifically, the knowledge reasoning model will perform text vector library query, knowledge graph query and inference engine query based on the task chain. Text vector library query refers to querying the text vector library according to the text vector library query task in the task chain to obtain relevant vector data. Vector library query can be implemented using a vector database or a vector retrieval algorithm. Knowledge graph query refers to querying the knowledge graph according to the knowledge graph query task in the task chain to obtain relevant knowledge data. Knowledge graph query can be implemented using a graph database or a graph algorithm. Inference engine reasoning refers to reasoning the inference engine according to the inference engine reasoning task in the task chain, and inferring the conditions that may have caused the current situation based on the results.

[0080] S250, integrating the text vector library results, the knowledge graph results and the inference engine results to generate query results.

[0081] Finally, the controller will integrate the results of the text vector library, the knowledge graph, and the inference engine to generate query results. For example, the user inputs the question: "How to solve the problem of frequent rebalancing of consumer groups leading to displacement submission failures, and the error message is: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member." The controller can generate a task chain and input the knowledge reasoning model, and can perform query tasks in the text vector library, knowledge graph, and inference engine in turn. The text vector library calculates the text segments similar to the consultation text through vector similarity, and extracts the top 20 text blocks; the controller can use the knowledge graph to query the related entities and connections of "consumer group", "rebalancing", and "displacement submission". The controller can use the inference engine of the inference engine to check the error message "Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member." in the program, and can infer possible causes and solutions based on the facts and rules of the logical conversion of the code, and finally integrate all the output results.

[0082] Furthermore, after obtaining all the searched information, the knowledge reasoning model can also perform secondary screening and fusion of the results to generate relevant diagnostic reports and problem suggestions. Specifically, the most relevant and accurate content can be screened out by conducting a comprehensive analysis of information from different sources, such as using text similarity algorithms, information retrieval algorithms, etc. to screen information, and sort and filter it according to the relevance and accuracy of the information. The screened information can also be integrated to form a complete diagnostic report, such as using information fusion algorithms to integrate information from different sources, and performing weighted averaging or voting based on factors such as the importance and reliability of the information. Based on the analysis results, problem suggestions based on the analysis results can also be proposed to help users solve problems, such as using natural language generation technology to generate problem suggestions, and generating relevant suggestions and solutions based on the analysis results and user needs.

[0083] Optionally, after generating query results based on the input question and the knowledge reasoning big model, the method also includes: obtaining user feedback based on the query results, wherein the user feedback includes positive feedback and negative feedback; using the negative feedback as training data, and adjusting the knowledge reasoning big model based on the training data to generate an adjusted model; and adding the positive feedback to the knowledge base source data.

[0084] The technical solution of the embodiment of the present invention generates a task chain through natural language processing, which facilitates the processing and analysis of subsequent models and improves processing efficiency and accuracy. The text vector library results can quickly provide text matching information related to the problem, the knowledge graph results show the association relationship of knowledge, and the inference engine results give conclusions based on logical reasoning, making full use of the advantages of different modules in the knowledge reasoning model, analyzing and reasoning problems from multiple angles, and providing more comprehensive and in-depth answers. It can better meet the needs of users and improve user satisfaction with query results.

[0085] Embodiment 3

[0086] Figure 4 This is a schematic diagram of the structure of a composite knowledge reasoning device provided in the third embodiment of the present invention. Figure 4 As shown, the device includes: a database construction module 310, which is used to collect knowledge base source data and construct a database according to the knowledge base source data, wherein the database includes a relational database and a document database;

[0087] A knowledge reasoning big model generation module 320 is used to generate a knowledge reasoning big model according to a database, wherein the knowledge reasoning big model includes a text vector library, a knowledge graph and an inference engine;

[0088] The query result generation module 330 is used to obtain an input question and generate a query result according to the input question and the knowledge reasoning model.

[0089] Optionally, the database construction module 310 is specifically used to: construct a data collection entry, obtain knowledge base source data from the data collection entry according to a first specified format; perform data cleansing on the knowledge base source data to generate cleaned knowledge base source data, and determine structured data and unstructured data in the cleaned knowledge base source data; generate a relational database based on the structured data, and generate a document database based on the unstructured data.

[0090] Optionally, the knowledge reasoning big model generation module 320 is specifically used to: extract text data from the document database, and build a text vector library and a knowledge graph based on the text data; extract code information from the relational database, and convert the code information into a second specified format to generate fact information, wherein the code information includes program logic and error information; obtain inference rules based on the code information, and build an inference engine according to the inference rules and fact information; and build a knowledge reasoning big model based on the text vector library, the knowledge graph and the inference engine.

[0091] Optionally, the knowledge reasoning large model generation module 320 specifically includes: a text vector library and a knowledge graph generation unit, which are used to: preprocess the text data to generate processed text data, and perform feature extraction on the processed text data to generate various extracted features, wherein the preprocessing includes removing irrelevant information, stem extraction, word form restoration, segmentation, and adding annotation information; converting each extracted feature into a feature vector, and generating a text vector library based on each feature vector; extracting each entity from the text data through named entity technology, and identifying the entity relationship between each entity; generating a knowledge graph based on each entity and the corresponding entity relationship.

[0092] Optionally, the query result generation module 330 is specifically used to: extract key information of the input question based on natural language processing, and convert the key information according to a preset processing format to generate a task chain; input the task chain into the knowledge reasoning big model to obtain text vector library results, knowledge graph results and inference engine results; integrate the text vector library results, knowledge graph results and inference engine results to generate query results.

[0093] Optionally, the device also includes: a result feedback module, which is used to obtain user feedback based on the query results after generating query results based on the input questions and the knowledge reasoning big model, wherein the user feedback includes positive feedback and negative feedback; using the negative feedback as training data, and adjusting the knowledge reasoning big model based on the training data to generate an adjusted model; and adding the positive feedback to the knowledge base source data.

[0094] The technical solution of the embodiment of the present invention can ensure the comprehensiveness and integrity of the data by integrating data of various types and sources, and provide a rich foundation for subsequent knowledge reasoning. The constructed knowledge reasoning model integrates the text vector library, knowledge graph and reasoning engine, and can perform logical reasoning on specific questions raised by users, provide accurate diagnostic suggestions and customized solutions, and help users quickly find the required content in massive knowledge, reduce the time and energy consumed by users in troubleshooting, and improve work efficiency and decision-making quality.

[0095] A composite knowledge reasoning device provided in an embodiment of the present invention can execute a composite knowledge reasoning method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0096] Embodiment 4

[0097] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0098] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0099] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0100] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a composite knowledge reasoning method.

[0101] In some embodiments, a composite knowledge reasoning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the composite knowledge reasoning method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a composite knowledge reasoning method in any other appropriate manner (e.g., by means of firmware).

[0102] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0103] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0104] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0106] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0107] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0108] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0109] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A composite knowledge reasoning method, characterized in that: include: Collecting knowledge base source data, and building a database based on the knowledge base source data, wherein the database includes a relational database and a document database; Generating a knowledge reasoning model according to the database, wherein the knowledge reasoning model includes a text vector library, a knowledge graph and an inference engine; An input question is obtained, and a query result is generated according to the input question and the knowledge reasoning big model.

2. The method according to claim 1, characterized in that The collecting of knowledge base source data and constructing a database according to the knowledge base source data includes: Constructing a data collection entry, and acquiring knowledge base source data from the data collection entry according to a first specified format; Performing data cleaning on the knowledge base source data to generate cleaned knowledge base source data, and determining structured data and unstructured data in the cleaned knowledge base source data; A relational database is generated according to the structured data, and a document database is generated according to the unstructured data.

3. The method according to claim 2, characterized in that The step of generating a knowledge reasoning model based on the database includes: Extracting text data from the document database, and constructing a text vector library and a knowledge graph based on the text data; Extracting code information from the relational database, and converting the code information into a second specified format to generate fact information, wherein the code information includes program logic and error information; Acquire an inference rule based on the code information, and construct an inference engine according to the inference rule and the fact information; A knowledge reasoning big model is constructed based on the text vector library, the knowledge graph and the reasoning engine.

4. The method according to claim 3, characterized in that The step of constructing a text vector library and a knowledge graph according to the text data includes: Preprocessing the text data to generate processed text data, and extracting features from the processed text data to generate extracted features, wherein the preprocessing includes removing irrelevant information, stemming, word form restoration, segmentation, and adding annotation information; Convert each of the extracted features into a feature vector, and generate a text vector library based on each of the feature vectors; Extracting entities from the text data by using named entity technology, and identifying entity relationships between the entities; A knowledge graph is generated based on each of the entities and the corresponding entity relationships.

5. The method according to claim 1, characterized in that The generating of query results according to the input question and the knowledge reasoning big model includes: Extracting key information of the input question based on natural language processing, and converting the key information according to a preset processing format to generate a task chain; Input the task chain into the knowledge reasoning big model to obtain text vector library results, knowledge graph results and reasoning engine results; The text vector library result, the knowledge graph result and the inference engine result are integrated to generate a query result.

6. The method according to claim 1, characterized in that After generating the query result according to the input question and the knowledge reasoning big model, the method further includes: Obtaining user feedback based on the query result, wherein the user feedback includes positive feedback and negative feedback; Using the negative feedback as training data, and adjusting and training the knowledge reasoning large model based on the training data to generate an adjustment model; The positive feedback is added to the knowledge base source data.

7. A composite knowledge reasoning device, characterized in that: include: A database construction module, used to collect knowledge base source data and construct a database based on the knowledge base source data, wherein the database includes a relational database and a document database; A knowledge reasoning big model generation module, used to generate a knowledge reasoning big model according to the database, wherein the knowledge reasoning big model includes a text vector library, a knowledge graph and an inference engine; The query result generation module is used to obtain an input question and generate a query result according to the input question and the knowledge reasoning model.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Report generation method and device and electronic equipment

    CN121093925A