Deep learning-based question and answer knowledge graph construction method and system
Through deep learning-based methods, collect and process Q&A data from multiple data sources, identify knowledge entities and their relationships, and build a structured knowledge graph, solving the problem of single data and insufficient semantic understanding ability in traditional Q&A systems, and improving knowledge Graph construction efficiency and application capabilities of intelligent question-and-answer systems.
Patent Information
- Application Number
- CN202411834030.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional Q&A systems rely on static knowledge bases and face the problems of single data source, insufficient noise information processing, limited semantic understanding ability, and low efficiency in building knowledge graphs.
Using deep learning-based methods, collect Q&A data from multiple data sources, clean and standardize, use deep learning models for semantic analysis, identify knowledge entities and their relationships, build a structured Q&A knowledge graph, and assign uniqueness to nodes. Identifier.
It significantly improves the efficiency of knowledge graph construction and semantic understanding capabilities, and promotes the application of intelligent question-and-answer systems in complex scenarios.
Smart Images

Figure CN119323251A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of knowledge graph technology, and in particular to a method and system for constructing a question-and-answer knowledge graph based on deep learning. Background Art
[0002] With the rapid development of information technology, especially the continuous advancement of artificial intelligence and deep learning technologies, knowledge graphs, as a structured information representation method, have gradually become an important part of natural language processing (NLP) and intelligent question-answering systems. Knowledge graphs can effectively organize and represent entities and their relationships, providing strong support for tasks such as information retrieval, semantic understanding, and intelligent question-answering. However, traditional question-answering systems mostly rely on static knowledge bases, facing problems such as a single data source, insufficient processing of noise information, limited semantic understanding capabilities, and low efficiency in knowledge graph construction. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for constructing a question-answering knowledge graph based on deep learning to address the deficiencies in the prior art. The method can utilize a deep learning model for semantic analysis to automatically identify knowledge entities and their relationships, thereby generating a structured question-answering knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question-answering systems in complex scenarios.
[0004] An embodiment of the present application provides a method for constructing a question-answer knowledge graph based on deep learning, the method comprising: Collect multi-dimensional question-and-answer data in the target field from multiple data sources, and clean and standardize the question-and-answer data to eliminate noise information and generate a preliminary data set; Performing semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; identifying knowledge entities and relationships between entities from the context embedding representation, and constructing preliminary knowledge triples; Based on the knowledge triples, a preliminary question-answering knowledge graph is constructed using the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question-answering knowledge graph to generate a structured question-answering knowledge graph.
[0005] Optionally, the using a deep learning model to perform semantic analysis on the question and answer data to generate a context embedding representation of each question and answer text in the question and answer data includes: Constructing a corresponding graph pattern for each question-answer text, wherein the nodes in the graph pattern represent specific key concepts in the question-answer text, and the edges in the graph pattern represent the relationship between the specific key concepts; Using a deep learning-based node embedding algorithm, each node in the graph pattern is converted into a corresponding node embedding vector; The node embedding vectors are weighted, and each weighted node embedding vector is used to perform context aggregation to obtain a comprehensive question-answer context embedding vector.
[0006] Optionally, identifying knowledge entities and relationships between entities from the context embedding representation and constructing preliminary knowledge triples includes: The context embedding representation of each question and answer text is input into a pre-trained entity recognition model, and potential knowledge entities in each question and answer text are identified through the context understanding ability of the entity recognition model, wherein the entity recognition model is BERT, RoBERTa or BiLSTM-CRF; Using a pre-trained relationship detection model to classify each pair of knowledge entities, and output the relationship and relationship type between the knowledge entity pairs, wherein the relationship detection model is a CNN or RNN; Knowledge triples are generated based on the identified knowledge entities and their corresponding relationships.
[0007] Optionally, based on the knowledge triples, constructing a preliminary question-answer knowledge graph with the identified entities and relationships, and assigning a unique identifier to each node in the preliminary question-answer knowledge graph to generate a structured question-answer knowledge graph, including: Take the entities of each knowledge triple as nodes, the relationships between entities as edges, and the relationship types between entities as edge attributes to construct a directed graph of the knowledge graph as a preliminary question-answering knowledge graph. Assign a corresponding globally unique identifier to each node in the directed graph of the knowledge graph, and save the directed graph of the knowledge graph in a structured data format to obtain a structured question-and-answer knowledge graph.
[0008] Another embodiment of the present application provides a question-answering knowledge graph construction system based on deep learning, the system comprising: A collection module, used to collect multi-dimensional question-and-answer data in the target field from multiple data sources, and to clean and standardize the question-and-answer data to eliminate noise information and generate a preliminary data set; An analysis module, configured to perform semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; A recognition module, used to identify knowledge entities and relationships between entities from the context embedding representation, and construct preliminary knowledge triples; A construction module is used to construct a preliminary question-answering knowledge graph based on the knowledge triples, using the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answering knowledge graph to generate a structured question-answering knowledge graph.
[0009] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0010] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.
[0011] Compared with the prior art, the present invention provides a method for constructing a question-and-answer knowledge graph based on deep learning, which collects multi-dimensional question-and-answer data in a target field from multiple data sources, cleans and standardizes the question-and-answer data to eliminate noise information and generate a preliminary data set; uses a deep learning model to perform semantic analysis on the question-and-answer data to generate a contextual embedding representation of each question-and-answer text in the question-and-answer data; identifies knowledge entities and relationships between entities from the contextual embedding representation to construct preliminary knowledge triples; based on the knowledge triples, constructs a preliminary question-and-answer knowledge graph with the identified entities and relationships, and assigns a unique identifier to each node in the preliminary question-and-answer knowledge graph to generate a structured question-and-answer knowledge graph, so that a deep learning model can be used for semantic analysis to automatically identify knowledge entities and their relationships, thereby generating a structured question-and-answer knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question-and-answer systems in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A hardware structure block diagram of a computer terminal for a method for constructing a question-answer knowledge graph based on deep learning provided by an embodiment of the present invention; Figure 2 A flowchart of a method for constructing a question-answer knowledge graph based on deep learning provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a question-and-answer knowledge graph construction system based on deep learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0014] The embodiment of the present invention first provides a method for constructing a question-answer knowledge graph based on deep learning. The method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, etc.
[0015] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a method for constructing a question-answer knowledge graph based on deep learning provided by an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0016] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can enable the processor to execute any method for constructing a question-answering knowledge graph based on deep learning.
[0017] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0018] The internal memory provides an environment for the operation of computer programs in non-volatile storage media. When the computer program is executed by the processor, the processor can execute any method for constructing a question-and-answer knowledge graph based on deep learning.
[0019] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0020] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0021] See also Figure 2, an embodiment of the present invention provides a method for constructing a question-answer knowledge graph based on deep learning, which may include the following steps: S201, collecting multi-dimensional question-and-answer data in a target field from multiple data sources, and cleaning and standardizing the question-and-answer data to eliminate noise information and generate a preliminary data set; In the first step of the present invention, multi-dimensional question-and-answer data of the target field are first collected from a variety of data sources. These data sources may include online question-and-answer platforms, social media discussions, professional knowledge websites, document libraries, and user-generated content. By integrating data from different sources, not only can richer and more comprehensive question-and-answer information be obtained, but also the diversity and representativeness of the data can be ensured. After the collected data is initially screened, it is cleaned and standardized to eliminate noise information. This process includes removing duplicate content, correcting spelling errors, unifying formats, and annotating the relevance and credibility of data. Through these processes, a preliminary data set is finally generated, laying a solid foundation for subsequent semantic analysis and knowledge graph construction.
[0022] This step plays a vital role in the entire process of building the question-answering knowledge graph, mainly reflected in the improvement of data quality and the effectiveness of knowledge mining. By collecting question-answering data from multiple data sources, the system can make full use of knowledge and information in different fields, making the generated knowledge graph more comprehensive and in-depth. By performing data cleaning and standardization, noise and redundancy in the data are effectively eliminated, and the accuracy and consistency of the data are improved. This not only helps to improve the performance of subsequent deep learning models, but also provides a good foundation for the accurate identification of knowledge entities and relationships, and ultimately promotes the effectiveness of intelligent question-answering systems in practical applications.
[0023] In specific implementation, distributed data collection tools can be used to automatically crawl question and answer data from multiple online platforms through web crawler technology. After the data is crawled, the collected raw data is initially filtered and preprocessed using text processing tools. For example, regular expressions and natural language processing techniques can be used to remove stop words, punctuation marks, and irrelevant content. If necessary, a manual review mechanism can also be introduced to ensure the quality of data cleaning. In the standardization processing stage, data format conversion tools can be used to unify data in different formats into a specific format (such as JSON or CSV), and classify and annotate the data. Finally, the system stores the sorted question and answer data in a database to form a preliminary data set that can be used for subsequent analysis, laying a good foundation for the training of deep learning models and the construction of knowledge graphs.
[0024] S202, performing semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; The deep learning model is used to perform semantic analysis on the question and answer data to generate a contextual embedding representation of each question and answer text. This embedding representation not only retains the word information in the text, but also understands the words through context information, thereby obtaining richer semantic features. Specifically, the deep learning model learns the relationship and global semantics between words through a multi-layer neural network structure, thereby providing a high-dimensional semantic space for the subsequent identification of knowledge entities and relationships.
[0025] The significance of this step is to transform the traditional bag-of-words model-based text representation method into a context-based embedding representation. This transformation enables the model to better understand the different meanings and usages of the same word in different sentences, significantly improving the accuracy of semantic analysis. By generating high-quality contextual embedding representations, the system can lay a solid foundation for subsequent knowledge entity recognition and relationship detection, thereby improving the effectiveness and reliability of the entire question-answering knowledge graph construction.
[0026] Specifically, a corresponding graph model may be constructed for each question-answer text, wherein the nodes in the graph model represent specific key concepts in the question-answer text, and the edges in the graph model represent the relationships between the specific key concepts; In this process, for each question-answer text, specific key concepts in the text are first identified, such as "climate change", "artificial intelligence", "machine learning", etc., and these concepts are used as nodes in the graph model. At the same time, by analyzing the relationships between these key concepts (such as causal relationships, synergistic relationships, etc.), edges are established to connect these nodes. The construction of the graph model helps to present text information in a structured form, making subsequent processing more intuitive and systematic. The graph model is a structured data representation used to describe objects and the relationships between them. In this context, the graph model consists of nodes and edges, where nodes represent specific key concepts and edges represent the relationships between these key concepts. The graph model allows important information to be extracted from complex texts and organized and displayed in a graphical structure. In this way, the interaction between different concepts can be more clearly understood, promoting knowledge acquisition and reasoning.
[0027] The purpose of building a graph model is to provide a more operational input form for deep learning models. This structured representation can not only improve the efficiency of subsequent analysis, but also more clearly reflect the relationship between concepts in the text, helping the model to better understand semantic information. In addition, the establishment of a graph model provides an important foundation for subsequent node embedding and context aggregation, which helps to improve the quality of knowledge graph construction.
[0028] In the specific implementation, you can use natural language processing tool libraries (such as SpaCy or NLTK) to extract key concepts from question and answer texts. Identify key concepts by performing word segmentation and dependency analysis on sentences. Use graph databases (such as Neo4j) or graph processing tools (such as NetworkX) to build graph models, with nodes representing key concepts and edges representing the relationships between these concepts, forming a structured graph that can be processed in subsequent steps.
[0029] Using a deep learning-based node embedding algorithm, each node in the graph pattern is converted into a corresponding node embedding vector; In this step, each node in the constructed graph model is embedded by applying deep learning-based node embedding algorithms, such as Node2Vec or GraphSAGE. These node embedding vectors can capture the characteristics and semantic information between nodes in the graph, thus providing a sufficient semantic basis for subsequent analysis.
[0030] The role of node embedding is to convert complex graph structure information into low-dimensional vectors, making subsequent calculations and analysis more efficient. Through this embedded representation, the system can more intuitively compare and cluster different nodes while retaining the semantic relationship between nodes. This provides the necessary semantic basis for subsequent aggregation and context understanding, which is conducive to improving the quality of knowledge graph construction.
[0031] In specific implementation, you can use open source graph embedding frameworks (such as PyTorch Geometric or DGL) to embed nodes. First, extract node information from the constructed graph pattern and generate the node adjacency matrix. Then, use embedding algorithms such as Node2Vec or GraphSAGE to train the adjacency matrix and finally generate the embedding vectors corresponding to each node. These vectors will then be used in the context aggregation step.
[0032] The node embedding vectors are weighted, and each weighted node embedding vector is used to perform context aggregation to obtain a comprehensive question-answer context embedding vector.
[0033] In this step, the embedding vectors of each node are first weighted, and the weights can be designed according to the importance or contextual relevance of the node in the graph pattern. Then, the weighted embedding vectors of each node are aggregated, and a comprehensive question-answer context embedding vector is obtained by summing, averaging, or max pooling. This vector effectively integrates the information of all key concepts in the graph pattern.
[0034] The significance of context aggregation is to form a more comprehensive representation by integrating the embedded information of multiple nodes, capturing the overall semantics of the entire question and answer text. Such an aggregation method can effectively improve the accuracy of subsequent knowledge entity recognition and relationship detection, and ensure the high consistency of the generated knowledge graph with the real context.
[0035] In the specific implementation, weights can be assigned according to the importance of each node. For each question and answer text, the weighted sum of all node embedding vectors is calculated, and finally a comprehensive and unified question and answer context embedding vector is obtained. This vector will be used in the subsequent knowledge entity and relationship identification steps to ensure clear semantic expression and accurate information extraction.
[0036] S203, identifying knowledge entities and relationships between entities from the context embedding representation, and constructing preliminary knowledge triples; The process of identifying knowledge entities and the relationships between entities from the contextual embedding representation and constructing preliminary knowledge triples involves identifying potential knowledge entities and their relationships in each question and answer text. By inputting the contextual embedding vector into the pre-trained entity recognition model, the model uses its contextual understanding ability to conduct an in-depth analysis of the text and extract relevant knowledge entities from it. Then, for the identified entity pairs, the relationship between them is classified through the relationship detection model, and finally a knowledge triple (entity-relationship-entity structure) is generated.
[0037] The significance of this process is to achieve a structured representation of question-answering data, making it suitable for the subsequent construction of a knowledge graph. By identifying knowledge entities and their relationships, the semantic features and logical associations of information can be effectively captured, thereby providing important basic data for the knowledge graph. This structured form not only improves the availability of information, but also lays a solid foundation for subsequent data analysis, reasoning, and the accuracy of the question-answering system, and promotes the sharing and reuse of knowledge.
[0038] Specifically, the context embedding representation of each question and answer text can be input into a pre-trained entity recognition model, and the potential knowledge entities in each question and answer text can be identified through the context understanding ability of the entity recognition model, wherein the entity recognition model is BERT, RoBERTa or BiLSTM-CRF; In this step, the context is embedded into the representation input model for processing through a pre-trained entity recognition model (such as BERT, RoBERTa, or BiLSTM-CRF), and the model analyzes the text based on its contextual understanding ability. This process can effectively extract potential knowledge entities from the question and answer text, such as names of people, places, and organizations, to ensure the accuracy and comprehensiveness of recognition. In addition, the model can identify the polysemy of different entities in different contexts based on contextual information.
[0039] The significance of this step is to transform the unstructured question-answer text into structured knowledge information, and improve the efficiency and accuracy of entity recognition through automated methods. This not only enables the knowledge graph to be updated and expanded quickly, but also provides data support for subsequent knowledge reasoning and application, enhancing the intelligence and practicality of the knowledge graph.
[0040] In specific implementation, you can use a pre-trained entity recognition model, such as BERT. Such models should be trained on large-scale corpora and have good versatility. Input the contextual embedding representation of the question and answer text into the model, and use the output of the model to mark whether each word is a knowledge entity and identify its category. The identified knowledge entities will be aggregated into a set of candidate entities for use in subsequent steps.
[0041] Using a pre-trained relationship detection model to classify each pair of knowledge entities, and output the relationship and relationship type between the knowledge entity pairs, wherein the relationship detection model is a CNN or RNN; In this step, each pair of identified knowledge entities will be used as input and analyzed by a pre-trained relationship detection model (such as CNN or RNN). The model will use contextual information and embedding representation to identify the type of relationship between knowledge entities, such as "belongs to", "affects", "is located in", etc. This process involves not only simple label classification, but may also cover complex semantic understanding, thereby more accurately identifying multi-level relationships between entities.
[0042] The importance of this step lies in establishing the semantic connection between entities in the knowledge graph, which provides a key foundation for the formation of knowledge triples. Through efficient and accurate relationship identification, the information integrity and richness of the knowledge graph can be improved, thereby enhancing the practicality of the graph in applications such as knowledge reasoning and question-answering systems. The intelligent application of this process helps to automate knowledge updating and maintenance, ensuring the synchronization of the knowledge graph with the dynamic world.
[0043] In the specific implementation, the relationship detection model should be trained on a domain-specific annotated dataset to improve the model's ability to identify relationships in the target domain. The identified knowledge entities are paired and input into the model, which combines contextual locations and semantic features to predict the type of relationship between entity pairs. The output results will form a relationship list, providing necessary information for the subsequent generation of knowledge triples.
[0044] Knowledge triples are generated based on the identified knowledge entities and their corresponding relationships.
[0045] In this step, the system will combine the knowledge entities and corresponding relationships identified in the first two steps to construct knowledge triples. Each knowledge triple is represented in the form of "entity 1-relationship-entity 2", reflecting the specific relationship between the two entities. This construction process needs to ensure the logical consistency between entities and relationships to ensure the accuracy and validity of the data finally generated.
[0046] The significance of this step is to structure the identified information to form knowledge triples that can be queried and reasoned. This structured knowledge representation not only makes the information clearer and easier to use, but also lays the foundation for the subsequent construction of the knowledge graph. This provides the necessary data architecture for realizing more complex knowledge question-answering and reasoning functions, and helps to build an intelligent question-answering system.
[0047] In the specific implementation, the knowledge triples can be sorted and stored in the format of "entity 1-relationship-entity 2" based on the previous entity recognition results and relationship detection output. The system can use a database or graph database (such as Neo4j) to store these knowledge triples for subsequent retrieval and query applications. At the same time, the uniqueness and integrity of each triple is ensured to maintain the consistency of the knowledge graph.
[0048] S204, based on the knowledge triples, construct a preliminary question-answer knowledge graph with the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answer knowledge graph to generate a structured question-answer knowledge graph.
[0049] The key to constructing a preliminary question-answering knowledge graph based on the identified entities and relationships based on the knowledge triples is to systematically organize the basic units (knowledge triples) that constitute knowledge. The "entity" part of each knowledge triple is regarded as a node in the knowledge graph, while the "relationship" is regarded as the edge connecting these nodes. By inputting the knowledge triples into the framework of the graph one by one, a directed graph structure is formed, which can clearly represent the relationship between entities. In addition, a unique identifier (such as UUID) is assigned to each node in the graph to ensure that each node is unique and clear in the knowledge graph, thereby avoiding information duplication and confusion.
[0050] The significance of this process is that it lays a solid foundation for the construction of knowledge graphs. By presenting knowledge in a systematic and structured form, it helps to improve the efficiency and accessibility of knowledge. Knowledge graphs with clear relationships not only facilitate the storage and retrieval of information, but also provide rich semantic data support for subsequent reasoning, query and analysis. The constructed knowledge graph can achieve more efficient and accurate knowledge discovery in intelligent customer service, question-answering systems and related field applications, thereby improving the intelligence level of artificial intelligence systems.
[0051] Specifically, the entities of each knowledge triplet can be used as nodes, the relationships between entities as edges, and the relationship types between entities as attributes of the edges to construct a directed graph of the knowledge graph as a preliminary question-answering knowledge graph; This step first decomposes the generated knowledge triples to extract the entities and relationships. Each entity will be regarded as a node in the knowledge graph, and the relationship in the triple will be regarded as the edge connecting these nodes. The type or characteristics of the relationship will be assigned to the edge attributes to provide richer semantic information. The resulting directed graph will represent the basic structure of the knowledge graph and can clearly show the interactions and associations between entities.
[0052] The importance of this step is to create a visual knowledge structure, making the organization of information clearer. Through the form of a directed graph, users and systems can intuitively understand knowledge entities and their relationships, thereby providing support for subsequent reasoning, query, and knowledge discovery. As a dynamic data structure, the knowledge graph is also easy to expand and update, and can quickly adapt to the addition of new knowledge.
[0053] In the specific implementation, we first need to extract entities and relationships from each knowledge triple. Then, using a graph database or a custom data structure, we add each entity as a node to the graph and create edges using the relationships between entities. These edges will be marked with the corresponding relationship type as an additional attribute. The construction of the graph should remain structured to facilitate subsequent access and operation of the knowledge graph.
[0054] In knowledge triples, each triple is of the form (entity 1, relationship, entity 2), which means there is a relationship from entity 1 to entity 2. This directionality can be naturally represented in a directed graph. Relationships are inherently directed, such as "founded by", "located in", etc., which usually clearly indicate the starting entity and the target entity. Directed graphs can clearly represent the hierarchy and dependencies between entities. For example, in a "parent-child" relationship, the directed edges clearly indicate who is the parent and who is the child. Undirected graphs cannot easily show such a clear hierarchical relationship.
[0055] Assign a corresponding globally unique identifier to each node in the directed graph of the knowledge graph, and save the directed graph of the knowledge graph in a structured data format to obtain a structured question-and-answer knowledge graph.
[0056] In this step, in order to ensure the uniqueness and traceability of each node in the knowledge graph, a globally unique identifier (such as UUID) will be assigned to each node. The purpose of this is to prevent information conflicts and duplications and ensure that each knowledge entity has a unique identity in the graph. At the same time, the constructed knowledge graph will be saved in a structured data format (such as RDF, JSON-LD, etc.) for easy system call, storage, and sharing.
[0057] In specific implementation, you can use the existing UUID generation library to generate a unique identifier for each node. In the constructed knowledge graph, associate the identifier with the corresponding node. After that, select a suitable structured data format (such as RDF, JSON-LD) to serialize the entire knowledge graph to facilitate subsequent data storage, transmission and query processing.
[0058] The significance of this step is to improve the manageability and operability of the knowledge graph. By assigning a unique identifier to each node, efficient information retrieval and management can be achieved, avoiding redundancy and confusion. In addition, the use of structured data format for storage enhances the compatibility between the knowledge graph and other systems or applications, making it easier to share and interact with knowledge.
[0059] It can be seen that multi-dimensional question and answer data in the target field are collected from multiple data sources, and the question and answer data are cleaned and standardized to eliminate noise information and generate a preliminary data set; the question and answer data are semantically analyzed using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; knowledge entities and the relationships between entities are identified from the contextual embedding representation to construct preliminary knowledge triples; based on the knowledge triples, a preliminary question and answer knowledge graph is constructed with the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question and answer knowledge graph to generate a structured question and answer knowledge graph, so that semantic analysis can be performed using a deep learning model to automatically identify knowledge entities and their relationships, thereby generating a structured question and answer knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question and answer systems in complex scenarios.
[0060] Another embodiment of the present invention provides a question-answering knowledge graph construction system based on deep learning, see Figure 3 , the system may include: The collection module 301 is used to collect multi-dimensional question-and-answer data in the target field from multiple data sources, and clean and standardize the question-and-answer data to eliminate noise information and generate a preliminary data set; An analysis module 302 is used to perform semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; An identification module 303 is used to identify knowledge entities and relationships between entities from the context embedding representation and construct preliminary knowledge triples; The construction module 304 is used to construct a preliminary question-answering knowledge graph based on the knowledge triples, using the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answering knowledge graph to generate a structured question-answering knowledge graph.
[0061] It can be seen that multi-dimensional question and answer data in the target field are collected from multiple data sources, and the question and answer data are cleaned and standardized to eliminate noise information and generate a preliminary data set; the question and answer data are semantically analyzed using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; knowledge entities and the relationships between entities are identified from the contextual embedding representation to construct preliminary knowledge triples; based on the knowledge triples, a preliminary question and answer knowledge graph is constructed with the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question and answer knowledge graph to generate a structured question and answer knowledge graph, so that semantic analysis can be performed using a deep learning model to automatically identify knowledge entities and their relationships, thereby generating a structured question and answer knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question and answer systems in complex scenarios.
[0062] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0063] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps: S201, collecting multi-dimensional question-and-answer data in a target field from multiple data sources, and cleaning and standardizing the question-and-answer data to eliminate noise information and generate a preliminary data set; S202, performing semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; S203, identifying knowledge entities and relationships between entities from the context embedding representation, and constructing preliminary knowledge triples; S204, based on the knowledge triples, construct a preliminary question-answer knowledge graph with the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answer knowledge graph to generate a structured question-answer knowledge graph.
[0064] It can be seen that multi-dimensional question and answer data in the target field are collected from multiple data sources, and the question and answer data are cleaned and standardized to eliminate noise information and generate a preliminary data set; the question and answer data are semantically analyzed using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; knowledge entities and the relationships between entities are identified from the contextual embedding representation to construct preliminary knowledge triples; based on the knowledge triples, a preliminary question and answer knowledge graph is constructed with the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question and answer knowledge graph to generate a structured question and answer knowledge graph, so that semantic analysis can be performed using a deep learning model to automatically identify knowledge entities and their relationships, thereby generating a structured question and answer knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question and answer systems in complex scenarios.
[0065] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0066] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0067] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program: S201, collecting multi-dimensional question-and-answer data in a target field from multiple data sources, and cleaning and standardizing the question-and-answer data to eliminate noise information and generate a preliminary data set; S202, performing semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; S203, identifying knowledge entities and relationships between entities from the context embedding representation, and constructing preliminary knowledge triples; S204, based on the knowledge triples, construct a preliminary question-answer knowledge graph with the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answer knowledge graph to generate a structured question-answer knowledge graph.
[0068] It can be seen that multi-dimensional question and answer data in the target field are collected from multiple data sources, and the question and answer data are cleaned and standardized to eliminate noise information and generate a preliminary data set; the question and answer data are semantically analyzed using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; knowledge entities and the relationships between entities are identified from the contextual embedding representation to construct preliminary knowledge triples; based on the knowledge triples, a preliminary question and answer knowledge graph is constructed with the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question and answer knowledge graph to generate a structured question and answer knowledge graph, so that semantic analysis can be performed using a deep learning model to automatically identify knowledge entities and their relationships, thereby generating a structured question and answer knowledge graph, significantly improving construction efficiency and semantic understanding capabilities, and promoting the application of intelligent question and answer systems in complex scenarios.
[0069] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A method for constructing a question-answering knowledge graph based on deep learning, characterized in that: The method comprises: Collect multi-dimensional question-and-answer data in the target field from multiple data sources, and clean and standardize the question-and-answer data to eliminate noise information and generate a preliminary data set; Performing semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; identifying knowledge entities and relationships between entities from the context embedding representation, and constructing preliminary knowledge triples; Based on the knowledge triples, a preliminary question-answering knowledge graph is constructed using the identified entities and relationships, and a unique identifier is assigned to each node in the preliminary question-answering knowledge graph to generate a structured question-answering knowledge graph.
2. The method according to claim 1, characterized in that The using of a deep learning model to perform semantic analysis on the question and answer data to generate a contextual embedding representation of each question and answer text in the question and answer data includes: Constructing a corresponding graph pattern for each question-answer text, wherein the nodes in the graph pattern represent specific key concepts in the question-answer text, and the edges in the graph pattern represent the relationship between the specific key concepts; Using a deep learning-based node embedding algorithm, each node in the graph pattern is converted into a corresponding node embedding vector; The node embedding vectors are weighted, and each weighted node embedding vector is used to perform context aggregation to obtain a comprehensive question-answer context embedding vector.
3. The method according to claim 2, characterized in that The step of identifying knowledge entities and relationships between entities from the context embedding representation and constructing preliminary knowledge triples includes: The context embedding representation of each question and answer text is input into a pre-trained entity recognition model, and potential knowledge entities in each question and answer text are identified through the context understanding ability of the entity recognition model, wherein the entity recognition model is BERT, RoBERTa or BiLSTM-CRF; Using a pre-trained relationship detection model to classify each pair of knowledge entities, and output the relationship and relationship type between the knowledge entity pairs, wherein the relationship detection model is a CNN or RNN; Knowledge triples are generated based on the identified knowledge entities and their corresponding relationships.
4. The method according to claim 3, characterized in that Based on the knowledge triples, the identified entities and relationships are used to construct a preliminary question-answer knowledge graph, and a unique identifier is assigned to each node in the preliminary question-answer knowledge graph to generate a structured question-answer knowledge graph, including: Take the entities of each knowledge triple as nodes, the relationships between entities as edges, and the relationship types between entities as edge attributes to construct a directed graph of the knowledge graph as a preliminary question-answering knowledge graph. Assign a corresponding globally unique identifier to each node in the directed graph of the knowledge graph, and save the directed graph of the knowledge graph in a structured data format to obtain a structured question-and-answer knowledge graph.
5. A question-answering knowledge graph construction system based on deep learning, characterized in that: The system comprises: A collection module, used to collect multi-dimensional question-and-answer data in the target field from multiple data sources, and to clean and standardize the question-and-answer data to eliminate noise information and generate a preliminary data set; An analysis module, configured to perform semantic analysis on the question and answer data using a deep learning model to generate a contextual embedding representation of each question and answer text in the question and answer data; A recognition module, used to identify knowledge entities and relationships between entities from the context embedding representation, and construct preliminary knowledge triples; A construction module is used to construct a preliminary question-answering knowledge graph based on the knowledge triples, using the identified entities and relationships, and assign a unique identifier to each node in the preliminary question-answering knowledge graph to generate a structured question-answering knowledge graph.
6. The system according to claim 5, characterized in that The analysis module is specifically used for: Constructing a corresponding graph pattern for each question-answer text, wherein the nodes in the graph pattern represent specific key concepts in the question-answer text, and the edges in the graph pattern represent the relationship between the specific key concepts; Using a deep learning-based node embedding algorithm, each node in the graph pattern is converted into a corresponding node embedding vector; The node embedding vectors are weighted, and each weighted node embedding vector is used to perform context aggregation to obtain a comprehensive question-answer context embedding vector.
7. The system according to claim 6, characterized in that The identification module is specifically used for: The context embedding representation of each question and answer text is input into a pre-trained entity recognition model, and potential knowledge entities in each question and answer text are identified through the context understanding ability of the entity recognition model, wherein the entity recognition model is BERT, RoBERTa or BiLSTM-CRF; Using a pre-trained relationship detection model to classify each pair of knowledge entities, and output the relationship and relationship type between the knowledge entity pairs, wherein the relationship detection model is a CNN or RNN; Knowledge triples are generated based on the identified knowledge entities and their corresponding relationships.
8. The system according to claim 7, characterized in that The building blocks are specifically used for: Take the entities of each knowledge triple as nodes, the relationships between entities as edges, and the relationship types between entities as edge attributes to construct a directed graph of the knowledge graph as a preliminary question-answering knowledge graph. Assign a corresponding globally unique identifier to each node in the directed graph of the knowledge graph, and save the directed graph of the knowledge graph in a structured data format to obtain a structured question-and-answer knowledge graph.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 4 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Generative large model modeling method, system and equipment based on knowledge graph
CN117688974A
Large language model question and answer generation method based on knowledge graph enhancement
CN118227769A
Data intelligent question and answer method and system fusing domain knowledge
CN118779438A
Knowledge-graph-embedding-based question answering
US20200242444A1
Cited By
Voice interaction task execution method and device based on large model, equipment and medium
CN120472906A