Multi-modal knowledge graph construction method and device, computer equipment and readable storage medium

By defining knowledge ontology and extraction models and processing multi-modal data, it solves the problem of traditional knowledge graphs being unable to fully utilize multi-modal data, improves the integrity and accuracy of knowledge graphs, and provides richer knowledge support for intelligent applications. .

CN118690843AInactive Publication Date: 2024-09-24DMAI (GUANGZHOU) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410785788.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional knowledge graphs are mostly constructed based on single-modal data, making it difficult to make full use of the rich information in multi-modal data, resulting in insufficient completeness and accuracy of knowledge graphs.

Method used

By defining the knowledge ontology and storing it in a relational database, the pre-trained extraction model is obtained and put on the shelf, the multi-modal data set to be extracted is obtained and stored, and the target extraction model in the model warehouse is called to perform multi-modal data extraction in the independent storage space. Extract, obtain the extraction results to be reviewed and store them in a distributed database. If the results are valid, store the entity data and attribute information in the distributed database, store the relationship network in the graph database, and finally build the target multi-modal knowledge graph.

Benefits of technology

It achieves the fusion of multi-modal data and knowledge expression, improves the integrity and accuracy of the knowledge graph, and provides richer and more comprehensive knowledge support for intelligent applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690843A
    Figure CN118690843A
Patent Text Reader

Abstract

The invention discloses a multi-modal knowledge graph construction method and device, computer equipment and a readable storage medium. The method comprises the following steps: firstly, defining and storing a knowledge ontology, obtaining and racking a pre-trained extraction model, and obtaining and storing a multi-modal to-be-extracted data set; and extracting the multi-modal data in the independent storage space by calling a target extraction model in the model warehouse to obtain a to-be-audited extraction result, and storing the to-be-audited extraction result. Under the condition that the result is valid, the entity data and the attribute information are stored in a distributed database, and the relational network is stored in a graph database. And finally, constructing a target multi-modal knowledge graph based on the information, and realizing fusion and knowledge expression of multi-modal data. Through the design, the integrity and accuracy of the knowledge graph are improved, and richer and more comprehensive knowledge support is provided for intelligent application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment and readable storage medium for constructing a multimodal knowledge graph. Background Art

[0002] With the rapid development of Internet technology and the advent of the big data era, knowledge graphs, as an effective way to organize and express knowledge, have been widely used in many fields such as intelligent question answering, recommendation systems, and semantic search. However, traditional knowledge graphs are mostly built based on single-modal data, making it difficult to fully utilize the rich information in multimodal data. Summary of the invention

[0003] The object of the present invention is to provide a method, device, computer equipment and readable storage medium for constructing a multimodal knowledge graph.

[0004] In a first aspect, an embodiment of the present invention provides a method for constructing a multimodal knowledge graph, comprising:

[0005] Defining a knowledge ontology and storing it in a relational database, wherein the knowledge ontology includes entities and relationships;

[0006] Obtain the pre-trained extraction model and upload it to the model warehouse;

[0007] Obtain a multimodal data set to be extracted and store it in a preset independent storage space;

[0008] Extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtaining the extraction results to be reviewed determined based on the knowledge ontology, and storing the extraction results to be reviewed in a distributed database;

[0009] If the extraction result to be reviewed is determined to be valid, the entity data and attribute information corresponding to the extraction result to be reviewed are stored in the distributed database, and the relationship network corresponding to the extraction result to be reviewed is stored in the graph database;

[0010] Based on the entity data, the attribute information and the relationship network, a target multimodal knowledge graph is constructed.

[0011] In a possible implementation, defining the knowledge ontology and storing it in a relational database includes:

[0012] defining the entity name of the entity, the relationship name of the relationship, and other attributes;

[0013] The entity name, the relationship name and the other attributes are stored in a relational database.

[0014] In a possible implementation, obtaining a pre-trained extraction model and uploading it to a model warehouse includes:

[0015] Get a pre-trained extraction model;

[0016] Define the model name, model modality and model domain of the extraction model, where the model modality includes text, picture, video and voice;

[0017] Importing the extracted model into the model warehouse based on breakpoint resume mode;

[0018] Calling preset sample data to verify the model effect of the extraction model;

[0019] When the model effect is higher than a preset model effect threshold, the extracted model is uploaded to the model warehouse.

[0020] In a possible implementation, the step of obtaining a multimodal data set to be extracted includes:

[0021] Acquire a data modality type of the multimodal data set to be extracted, wherein the data modality type includes text, picture, video, and voice;

[0022] Based on the data modality type, the acquired multimodal data set to be extracted is stored in a preset independent storage space in an asynchronous breakpoint-resume manner.

[0023] In a possible implementation, extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtaining the extraction result to be reviewed determined based on the knowledge ontology, and storing the extraction result to be reviewed in a distributed database includes:

[0024] Create multiple extraction tasks, each of which includes a target modality type, a target domain type, and a task priority;

[0025] Calling the target extraction model corresponding to each extraction task from the model repository according to the target modality type and the target domain type, and acquiring the target multimodal data set to be extracted corresponding to each extraction task from the independent storage space;

[0026] According to the task priority corresponding to each extraction task, each extraction task is asynchronously and concurrently executed to obtain the extraction result to be reviewed corresponding to each extraction task;

[0027] The extracted results to be reviewed are stored in the Mongodb database.

[0028] In a possible implementation, when the extraction result to be reviewed is determined to be valid, the entity data and attribute information corresponding to the extraction result to be reviewed are stored in the distributed database, and the relationship network corresponding to the extraction result to be reviewed is stored in the graph database, including:

[0029] When the audit pass rate of the extraction results to be audited is higher than the preset pass rate threshold, the corresponding entity data and attribute information corresponding to the valid data of the extraction results to be audited are stored in the distributed database, and the relationship network corresponding to the extraction results to be audited is stored in the graph database, and the invalid data of the extraction results to be audited is used as feedback data of the target extraction model.

[0030] In a possible implementation, the method further includes:

[0031] When the audit pass rate of the extraction results to be reviewed is lower than the preset pass rate threshold, the extraction results to be reviewed will be invalidated, and the step of extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse will be re-executed.

[0032] In a second aspect, an embodiment of the present invention provides a multimodal knowledge graph construction device, comprising:

[0033] A definition module, used to define a knowledge ontology and store it in a relational database, wherein the knowledge ontology includes entities and relationships;

[0034] A shelf module is used to obtain a pre-trained extraction model and upload it to a model warehouse, the model warehouse;

[0035] An acquisition module is used to acquire a multimodal data set to be extracted and store it in a preset independent storage space;

[0036] An extraction module, configured to extract the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtain the extraction result to be reviewed determined based on the knowledge ontology, and store the extraction result to be reviewed in a distributed database;

[0037] A storage module, used for storing the entity data and attribute information corresponding to the extraction result to be reviewed in the distributed database, and storing the relationship network corresponding to the extraction result to be reviewed in the graph database when the extraction result to be reviewed is determined to be valid;

[0038] A construction module is used to construct a target multimodal knowledge graph based on the entity data, the attribute information and the relationship network.

[0039] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device executes the method described in at least one possible implementation of the first aspect.

[0040] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, wherein the readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the method described in at least one possible implementation manner of the first aspect.

[0041] Compared with the prior art, the beneficial effects provided by the present invention include: adopting a multimodal knowledge graph construction method, device, computer equipment and readable storage medium disclosed in the present invention, by defining and storing knowledge ontology, obtaining and putting on the shelf a pre-trained extraction model, and obtaining and storing a multimodal data set to be extracted. By calling the target extraction model in the model warehouse, the multimodal data in the independent storage space is extracted to obtain and store the extraction results to be reviewed. When the results are valid, the entity data and attribute information are stored in a distributed database, and the relationship network is stored in a graph database. Finally, a target multimodal knowledge graph is constructed based on this information to achieve the fusion of multimodal data and knowledge expression. Such a design improves the integrity and accuracy of the knowledge graph and provides richer and more comprehensive knowledge support for intelligent applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.

[0043] Figure 1 A schematic diagram of the steps of a method for constructing a multimodal knowledge graph is provided for an embodiment of the present invention;

[0044] Figure 2 A schematic block diagram of the structure of a multimodal knowledge graph construction device provided in an embodiment of the present invention;

[0045] Figure 3 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0047] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0048] In order to solve the technical problems in the aforementioned background technology, Figure 1 A flowchart of a multimodal knowledge graph construction method provided in an embodiment of the present disclosure is provided below, and the multimodal knowledge graph construction method is introduced in detail.

[0049] Step S201, defining a knowledge ontology and storing it in a relational database, wherein the knowledge ontology includes entities and relationships;

[0050] Step S202, obtaining a pre-trained extraction model and uploading it to the model warehouse;

[0051] Step S203, obtaining a multimodal data set to be extracted and storing it in a preset independent storage space;

[0052] Step S204, extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtaining an extraction result to be reviewed determined based on the knowledge ontology, and storing the extraction result to be reviewed in a distributed database;

[0053] Step S205, when the extraction result to be reviewed is determined to be valid, the entity data and attribute information corresponding to the extraction result to be reviewed are stored in the distributed database, and the relationship network corresponding to the extraction result to be reviewed is stored in the graph database;

[0054] Step S206: construct a target multimodal knowledge graph based on the entity data, the attribute information and the relationship network.

[0055] In an embodiment of the present invention, illustratively, taking the film field as an example, we first define the knowledge ontology related to movies, such as entities such as movies, directors, actors, types, and the relationships between them, such as the "directed" relationship between "director" and "movie". These definitions are stored in a relational database to form a structured knowledge framework. The server obtains a pre-trained natural language processing model from an external resource, which is specifically used to extract entities and relationships from text. The server puts this model on the internal model warehouse for subsequent use. The server collects a large amount of multimodal data such as text, pictures and videos about movies from multiple sources (such as movie review websites, social media, etc.). These data are sorted and stored in an independent storage space of the server, waiting for subsequent processing. The server calls the previously put on the shelf extraction model from the model warehouse to process the multimodal data stored in the independent storage space. The model automatically identifies and extracts entities (such as movie names, director names, etc.) and relationships (such as which director directed which movie, etc.) in the data, and temporarily stores these extraction results in a distributed database. The server will review the extraction results in the distributed database to confirm their accuracy and completeness. Once approved, these entity data (such as the name of the movie, the name of the director, etc.) and attribute information (such as the release year of the movie, the director's nationality, etc.) will be permanently stored in the distributed database. At the same time, the extracted relationship network (such as the relationship between the movie and the director, the actor, etc.) will be stored in the graph database for subsequent graph query and analysis. Finally, the server will use the entity data, attribute information stored in the distributed database and the relationship network in the graph database to build a complete multimodal knowledge graph. This graph can intuitively show the relationship between entities in the film field, such as which directors directed which movies, which actors starred in which movies, etc. This graph can not only be used in application scenarios such as movie recommendations and data analysis, but also provide valuable reference information for film production, marketing, etc.

[0056] In the embodiment of the present invention, the aforementioned step S201 can be implemented through the following example execution.

[0057] defining the entity name of the entity, the relationship name of the relationship, and other attributes;

[0058] The entity name, the relationship name and the other attributes are stored in a relational database.

[0059] In an embodiment of the present invention, exemplarily, when constructing a knowledge graph in the field of movies, the server first defines the names of various entities. For example, "Movie" is defined as an entity, and the entity name is assigned to it as "Movie". Similarly, entities such as "Director", "Actor", and "Producer" are also defined, and they are named respectively, such as "Director", "Actor", and "Producer". After defining the entities, the server will continue to define the relationships between these entities and name these relationships. For example, the relationship between Movie and Director is defined as "Directed_by", indicating that a certain movie is directed by a certain director. Similarly, the relationship between Movie and Actor can also be defined as "Starring", indicating that a certain movie is starred by certain actors. In addition to entities and relationships, the server will also define other attributes related to the entity. For example, for the Movie entity, its attributes can be defined to include "Title", "Release Date", "Genre", etc. These attributes will provide richer information for the subsequent knowledge graph construction. After completing the above definitions, the server will store these entity names (such as Movie, Director, Actor, etc.), relationship names (such as Directed_by, Starring, etc.) and other attributes (such as Title, Release Date, Genre, etc.) in a relational database. In the database, these definitions will be organized into tables to facilitate subsequent data query, update and management. In this way, the server establishes a structured knowledge framework, laying a solid foundation for building a multimodal knowledge graph.

[0060] In the embodiment of the present invention, the aforementioned step S202 may be implemented through the following example execution.

[0061] Get a pre-trained extraction model;

[0062] Define the model name, model modality and model domain of the extraction model, where the model modality includes text, picture, video and voice;

[0063] Importing the extracted model into the model warehouse based on breakpoint resume mode;

[0064] Calling preset sample data to verify the model effect of the extraction model;

[0065] When the model effect is higher than a preset model effect threshold, the extracted model is uploaded to the model warehouse.

[0066] In an embodiment of the present invention, illustratively, the server obtains a pre-trained multimodal data extraction model from a cooperative research institution or model provider. This model has been trained on a large number of data sets and has the ability to extract key information from multiple modal data such as text, pictures, and videos. The server defines a clear model name for the obtained extraction model, such as "MM-Extractor" (multimodal extractor). At the same time, the modal support range of the model is determined, including text, pictures, videos, and voice, which means that the model can process these different types of data. In addition, the applicable fields of the model are also clarified. For example, in this example, the model is applicable to multimodal data extraction in the field of movies. When importing the model to the warehouse, the server uses the breakpoint resume technology. This technology allows when transmitting large files, if a network interruption or other problems cause the transmission to fail, the transmission can be continued from the last interruption instead of starting over. In this way, the server ensures that the "MM-Extractor" model file can be uploaded to the model warehouse stably and efficiently. After the model is uploaded to the warehouse, the server calls a set of preset sample data to verify the extraction effect of the model. These data include text reviews, movie poster images, movie trailer videos and other multi-modal data in the film field. The server evaluated the accuracy and performance of "MM-Extractor" by running the model and comparing the extraction results with the preset correct answers. After verification, the server found that the extraction accuracy of "MM-Extractor" on the preset sample data exceeded the preset model effect threshold (for example, 90% accuracy). This shows that the model can reliably extract the required information from multimodal data in practical applications. Therefore, the server decided to officially put "MM-Extractor" on the model warehouse for use in the subsequent knowledge graph construction process.

[0067] In the embodiment of the present invention, the aforementioned step S203 can be implemented through the following example execution.

[0068] Acquire a data modality type of the multimodal data set to be extracted, wherein the data modality type includes text, picture, video, and voice;

[0069] Based on the data modality type, the acquired multimodal data set to be extracted is stored in a preset independent storage space in an asynchronous breakpoint-resume manner.

[0070] In an embodiment of the present invention, exemplarily, in the process of constructing a knowledge graph in the field of movies, the server needs to obtain multimodal data from multiple sources. First, the server determines the data modality type to be collected, which includes text (such as movie reviews, plot synopsis), pictures (such as movie posters, stills), videos (such as movie trailers, clips) and voice (such as movie soundtracks, director or actor interview recordings). These data modality types will provide rich and diverse information for the knowledge graph. After determining the data modality type to be collected, the server begins to asynchronously obtain this data from various channels. For example, crawl text data from movie review websites, download movie trailers from video platforms, and obtain movie posters from photo libraries. During data transmission, the server adopts asynchronous breakpoint transmission, which means that even if a data transmission is interrupted, it can continue to be transmitted from the breakpoint without restarting. This method improves the efficiency and stability of data transmission. After the server obtains the multimodal data, it classifies the data according to different modality types and stores them in a preset independent storage space. This independent storage space may be a cloud storage service or a local high-performance storage system. When storing, the server will ensure that each type of modality has a separate storage area for data processing and management. For example, text data may be stored in a relational database for text analysis and entity relationship extraction; image and video data may be stored on a dedicated media server for visual feature extraction and recognition; and voice data may be converted to text or stored after extracting key voice features for subsequent voice analysis and processing.

[0071] In the embodiment of the present invention, the aforementioned step 204 may be implemented through the following example execution.

[0072] Create multiple extraction tasks, each of which includes a target modality type, a target domain type, and a task priority;

[0073] Calling the target extraction model corresponding to each extraction task from the model repository according to the target modality type and the target domain type, and acquiring the target multimodal data set to be extracted corresponding to each extraction task from the independent storage space;

[0074] According to the task priority corresponding to each extraction task, each extraction task is asynchronously and concurrently executed to obtain the extraction result to be reviewed corresponding to each extraction task;

[0075] The extracted results to be reviewed are stored in the Mongodb database.

[0076] In an embodiment of the present invention, exemplarily, the server creates three new extraction tasks according to demand. The target modality type of task A is text, the target domain type is movie review, and the task priority is high; the target modality type of task B is picture, the target domain type is movie poster, and the task priority is medium; the target modality type of task C is video, the target domain type is movie trailer, and the task priority is low. According to the setting of task A, the server calls the extraction model applicable to the text modality and movie review domain from the model warehouse, and obtains the corresponding movie review text data set from the independent storage space. Similarly, the extraction model applicable to the picture modality and movie poster domain is called for task B, and the movie poster picture data set is obtained; the extraction model applicable to the video modality and movie trailer domain is called for task C, and the movie trailer video data set is obtained. According to the task priority, the server first asynchronously and concurrently executes the extraction work of task A. Since task A has the highest priority, the server will give priority to this task and extract information such as entities, relationships, and attributes from the movie review text data set. At the same time, the server will also execute Task B and Task C concurrently, but will allocate different processing resources according to priority. In this way, the server can efficiently handle multiple extraction tasks and ensure that high-priority tasks are processed in a timely manner. When each extraction task is completed, the server will store the obtained extraction results to be reviewed in the Mongodb database. Mongodb is a distributed database that is very suitable for storing unstructured data and large-scale data sets. In the database, the server will create an independent collection for each extraction task to facilitate subsequent data query, analysis, and review. In this way, the server can efficiently manage and utilize the extraction results, providing strong support for building a multimodal knowledge graph.

[0077] In the embodiment of the present invention, the aforementioned step S205 can be implemented through the following example execution.

[0078] When the audit pass rate of the extraction results to be audited is higher than the preset pass rate threshold, the corresponding entity data and attribute information corresponding to the valid data of the extraction results to be audited are stored in the distributed database, and the relationship network corresponding to the extraction results to be audited is stored in the graph database, and the invalid data of the extraction results to be audited is used as feedback data of the target extraction model.

[0079] In an embodiment of the present invention, illustratively, after the server completes the multimodal data extraction, a batch of extraction results to be reviewed are generated. These results include entities, attributes and relationship information extracted from modal data such as text, pictures, and videos. First, the server will review the extraction results to be reviewed. The review process may include checking the consistency, accuracy and relevance of the data with other known data. For example, the server may verify whether the extracted entity actually exists, whether the attribute information is accurate, and whether the relationship network is logical. Assuming that the preset review pass rate is 90%, the server finds that the review pass rate of the extraction results to be reviewed is 92%, which is higher than the preset pass rate threshold. This means that most of the extraction results are valid. Next, the server will store the entity data and attribute information that have passed the review in a distributed database. For example, if the extraction result contains information about a movie, including attributes such as the movie name, director, actor, and release time, this information will be stored in the corresponding table of the distributed database. The high scalability and high performance characteristics of the distributed database enable the server to efficiently process a large amount of entity data and attribute information. At the same time, the server will also store the relationship network in the extraction results to be reviewed in a graph database. A graph database is a database specifically designed for storing and querying graph-structured data, and is very suitable for representing the relationship network between entities. For example, the relationship between a movie and its director, the relationship between a movie and its actors, etc., will all be stored in the form of a graph in the graph database. For data that has not passed the review, that is, invalid data, the server will provide it as feedback data to the target extraction model. This feedback data can help the model to be further optimized and improved, and improve the accuracy and efficiency of future extractions. For example, if certain specific types of entities or relationships often have errors during the extraction process, these feedback data can be used to make targeted adjustments to the model.

[0080] In the embodiments of the present invention, the following implementation modes are also provided.

[0081] When the audit pass rate of the extraction results to be reviewed is lower than the preset pass rate threshold, the extraction results to be reviewed will be invalidated, and the step of extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse will be re-executed.

[0082] In an embodiment of the present invention, exemplarily, after the server audits the extraction results to be reviewed, it is found that the audit pass rate is only 75%, which is lower than the preset pass rate threshold of 90%. This means that there are more inaccurate or invalid data in the extraction results, which cannot meet the quality requirements of knowledge graph construction. In this case, the server will decide to invalidate this batch of extraction results to be reviewed and not include them in the construction of the knowledge graph. At the same time, in order to improve the extraction quality, the server will re-execute the extraction step. Specifically, the server will call the corresponding target extraction model from the model warehouse again, which has been selected and configured according to the data modality type (text, picture, video, etc.) and the target domain type (such as the movie domain). Then, the server will re-acquire the target multimodal dataset to be extracted from the independent storage space, which contains text comments, movie poster pictures, movie trailer videos, etc. used in the previous extraction process. When re-executing the extraction step, the server may adjust the parameters of the model or adopt other optimization strategies to improve the accuracy and effectiveness of the extraction. For example, the training data of the model can be increased, the algorithm of the model can be optimized, or the hyperparameters of the model can be adjusted. After the re-extraction is completed, the server will review the extraction results to be reviewed again. If the review pass rate is still lower than the preset threshold, the server may continue to adjust the extraction strategy or seek other solutions to ensure that the final knowledge graph is of high quality and accuracy. If the review pass rate reaches or exceeds the preset threshold, the server will store the valid entity data, attribute information, and relationship network in the distributed database and graph database respectively for subsequent knowledge graph application and analysis.

[0083] In order to more clearly describe the solution provided by the embodiments of the present application, a relatively complete implementation scheme is provided below.

[0084] The present invention implements a dynamic knowledge ontology definition mechanism, allowing system users to define and update knowledge ontology in a modular and plug-in manner. By providing a visual interface combined with an API interface, users can easily create or adjust the ontology structure, including adding new entities, attributes, and relationships. The system automatically maps these changes to the underlying data model and storage structure to ensure the consistency and accuracy of the knowledge graph.

[0085] The multimodal data unit is responsible for receiving and preprocessing data from different sources. The unit can identify and synchronize data streams of different modalities and perform necessary format conversion and standardization for subsequent knowledge extraction.

[0086] The system includes a knowledge extraction model library, where users can upload pre-trained models and call and manage them through a series of standardized APIs. These models can be general or customized for specific fields, covering various data parsing, entity recognition, and relationship extraction functions. The system also provides model performance evaluation tools to help users choose the most appropriate model for knowledge extraction.

[0087] In the knowledge extraction stage, this patent uses a series of optimization algorithms to improve extraction efficiency. First, the system uses a distributed computing framework to process large-scale data in parallel. Second, machine learning and deep learning algorithms are applied to automatically identify and classify entities and relationships. In addition, the system can self-optimize based on the feedback of the extraction results to continuously improve the extraction quality.

[0088] The knowledge review unit verifies and corrects the extracted knowledge through manual review, which ensures the accuracy and reliability of the knowledge graph and provides a feedback mechanism to continuously optimize the performance of the knowledge extraction model.

[0089] In order to efficiently store and manage the extracted knowledge, this patent designs a hybrid knowledge storage system. The system combines the advantages of graph database and distributed database to achieve fast query and efficient storage of structured knowledge. The graph database is responsible for storing complex relationship networks, while the distributed database is used to store entities and their attribute information. This hybrid storage structure not only improves access efficiency, but also ensures the scalability of the system.

[0090] The method and system for efficiently producing knowledge graphs proposed in this patent not only significantly improves the overall efficiency of constructing knowledge graphs from raw data, but also achieves high-quality knowledge extraction and flexible knowledge management through continuous self-learning and optimization, meeting the requirements for real-time and accuracy of knowledge graphs in modern rapidly changing data environments.

[0091] To clearly describe the embodiments of the present invention, some of the terms involved in the embodiments of the present invention are explained as follows:

[0092] Multimodal data: including text sets, picture sets, audio sets, and video sets. Sets represent collections of various types of data.

[0093] Model: trained model for data extraction from various modalities.

[0094] Entity: Usually considered as the most basic category or concept in an ontology. They represent objects in the real world, such as people, places, or events. These entities are defined as classes in an ontology, with their own properties and methods. For example, in object-oriented programming, "Person" can be an entity class, with properties such as name, age, etc.

[0095] Relationships: Relationships define how entities interact with each other. In an ontology, this is usually achieved by defining different relationship types, such as "friend", "located in", etc. These relationships help describe the complex connections between entities and are represented as edges in the knowledge graph.

[0096] Attributes: Attributes are used to describe the characteristics of entities or relationships, such as the "creation time" and "color" of entities, or the "duration" of relationships, etc. Attributes usually exist in the form of key-value pairs to provide richer information for entities and relationships.

[0097] Ontology: Ontology is a formalized, shared conceptual model that provides a clear framework for a certain field. Ontology includes not only the definition of entities and relationships, but also attributes and their constraints, ensuring the consistency and accuracy of knowledge. The development of ontology is an iterative process that needs to be constantly adjusted and improved according to specific application scenarios.

[0098] The processing steps of each unit of this invention are as follows:

[0099] Step 1, define the knowledge ontology. To build an effective knowledge graph, it is necessary to clearly define the entities and relationships in the ontology, as well as the attributes of the entities and relationships, and follow a series of construction methods and principles. These principles guide us how to conceptualize things in a specific field and establish a formal representation that can be processed by computers. The specific operations are as follows: 1. Create a new ontology for knowledge extraction. 2. Define entities in the defined ontology. The entity name is a required item. Other attributes of the entity can be customized. For example, when defining an enterprise entity, in addition to the required name of the enterprise, you can also define the address, legal person, and turnover of the enterprise in the past year. 3. After defining multiple entities, you can select 2 entities to define the relationship between the entities. For example, if you define the [Enterprise] entity and the [Personnel] entity, you can draw a line between the two entities to define the relationship. The name of the relationship is a required item. For example, the relationship between the enterprise and the personnel is called [Employment]. You can also continue to add new attributes to the relationship, such as [Importance], and so on, to establish the entity and relationship network that needs to be extracted. Traditionally, the ontology definitions for constructing knowledge graphs are built in graph databases, while this patent stores the ontology definitions in relational databases, such as MySQL, to facilitate subsequent index queries and statistical analysis of large numbers of ontologies.

[0100] Step 2, put the model on the model warehouse. Users can upload pre-trained models to the library and call and manage them through a series of standardized APIs. These models can be general or customized for specific fields, covering various functions such as data parsing, entity recognition and relationship extraction. The system also provides model performance evaluation tools to help users choose the most suitable model for knowledge extraction. The operation steps here are as follows: 1. Create a new model and define the name, modality and domain of the model; the modality field corresponds to the data type, which is text, picture, video and voice; the domain field distinguishes whether it is applicable to general knowledge extraction or specific domain extraction. 2. Import the model and support breakpoint continuation of model files. 3. Model verification, for the model that has been uploaded, use sample data to verify the output effect of the model, and decide whether to put the model on the shelf based on the verification situation. 4. Model listing, put the model that has been verified on the shelf for subsequent knowledge extraction selection model use. What is different from other systems here is that this patent can dynamically put various knowledge extraction models on the shelf to meet the needs of multimodal data extraction.

[0101] Step 3, upload the data set to be extracted in the multimodal data unit. The specific steps are as follows: 1. Create a new data set and enter the data set type, supporting text, pictures, videos, voice, etc. 2. Upload data files according to the data set type, supporting asynchronous breakpoint resumption of large files. 3. Preview, update, statistics, etc. can be performed based on the uploaded files. The difference between here and other systems is that 1. Multimodal data is managed, 2. Source data can be reused when extracting knowledge, and 3. It is independent of other units. Data is retrieved from the data unit only when the extraction unit needs to create a new extraction task. The same data set can be called by different extraction models, and different entities and relationships can be obtained to form different knowledge graphs.

[0102] Step 4, extraction task. In the knowledge extraction stage, this patent uses a series of optimization algorithms to improve the extraction efficiency. First, the system uses a distributed computing framework to process large-scale data in parallel. Secondly, machine learning and deep learning algorithms are applied to automatically identify and classify entities and relationships. In addition, the system can self-optimize according to the feedback of the extraction results and continuously improve the extraction quality. The specific operation steps of this example are as follows: 1. Create a new extraction task, select the extracted data source, the source of the data source is the multimodal data uploaded in step 3; select the extraction model, the model source is the model uploaded in step 2; configure the task execution time, or execute it immediately. The system will adjust the task priority according to the usage of hardware resources. 2. Check the progress of the extraction, such as the number of extractions. 3. If the extraction time is very long and the extraction has not been completed, you can manually set a pause or continue to execute. 4. The extracted data is stored in a distributed database. This example uses mongodb. The difference here with other systems is that multiple extraction tasks can be executed concurrently, the extraction of large amounts of data can be executed asynchronously, and the execution of tasks can be dynamically adjusted according to the task priority. At the same time, you can decide whether to reselect the extraction model and extract the same batch of data again based on the satisfaction of the extraction results.

[0103] Step 5, knowledge audit, audit the entity and relationship data of the completed extraction task to see if they meet the extraction requirements. Most of the data that do not meet the extraction requirements will be discarded, and the model training needs to be readjusted; when a small part of the extracted data does not meet the requirements, the wrong extracted data will be fed back to the model service so that the model service can optimize the algorithm or model; for the data that meets the extraction requirements, the knowledge storage unit service is directly called to store the knowledge data to form a knowledge graph. The specific operation steps of this example are as follows: 1. Set the audit pass rate. If it exceeds the extraction ratio, the extraction is valid and the data that passes the extraction will be stored in the warehouse. For the extracted data that fails, the extraction entity, the extracted erroneous data, and the used extraction model must be submitted to the extraction model service in step 2. If it is lower than the extraction ratio, the extraction task will be invalid and need to be rejected and re-extracted in step 4. 2. Check whether the data is correct one by one according to the data of the extraction task. 3. Submit the final audit result of the extraction task.

[0104] Step 6, knowledge storage. In order to efficiently store and manage the extracted knowledge, this patent designs a hybrid knowledge storage system. The system combines the advantages of graph databases and distributed databases to achieve fast query and efficient storage of structured knowledge. The graph database is responsible for storing complex relationship networks, while the distributed database is used to store entities and their attribute information. This hybrid storage structure not only improves access efficiency, but also ensures the scalability of the system. The storage of graph data supports single-node solutions and cluster node solutions. For example, this instance currently supports single-node graph libraries using neo4j and cluster node graph libraries using hugegraph. This unit is an independent design that can expand other graph databases without affecting the upper-level extraction business. This is also a design that distinguishes it from other graph systems, switching different graph library components according to the needs of the user's actual scenario. For example, when the user's data volume is relatively small and the server resources are limited, you can switch to a single-node graph library. If the user has a large amount of knowledge to produce and the server is sufficient, you can use the cluster version of the graph library.

[0105] In summary, the present invention decouples modules at each stage of multi-module knowledge graph production, so that each module can complete its own function and provide module capabilities to the outside world. It can not only ensure the independent operation of the modules, but also enhance the operating efficiency of the entire system at the same time, and the entire system will not change due to changes in a certain module. It has good support for the scalability, robustness, reusability, and portability of the system.

[0106] Please refer to Figure 2 , Figure 2 An embodiment of the present invention provides a multimodal knowledge graph construction device 110, including:

[0107] A definition module 1101 is used to define a knowledge ontology and store it in a relational database, wherein the knowledge ontology includes entities and relationships;

[0108] The uploading module 1102 is used to obtain the pre-trained extraction model and upload it to the model warehouse, the model warehouse;

[0109] The acquisition module 1103 is used to acquire the multimodal data set to be extracted and store it in a preset independent storage space;

[0110] The extraction module 1104 is used to extract the target multimodal to-be-extracted data set obtained from the independent storage space based on the target extraction model called from the model warehouse, obtain the to-be-extracted extraction result determined based on the knowledge ontology, and store the to-be-extracted extraction result in a distributed database;

[0111] The storage module 1105 is used to store the entity data and attribute information corresponding to the extraction result to be reviewed in the distributed database, and store the relationship network corresponding to the extraction result to be reviewed in the graph database when the extraction result to be reviewed is determined to be valid;

[0112] The construction module 1106 is used to construct a target multimodal knowledge graph based on the entity data, the attribute information and the relationship network.

[0113] It should be noted that the implementation principle of the aforementioned multimodal knowledge graph construction device 110 can refer to the implementation principle of the aforementioned multimodal knowledge graph construction method, which will not be repeated here. It should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the multimodal knowledge graph construction device 110 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the multimodal knowledge graph construction device 110. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in a processor element or an instruction in software form.

[0114] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0115] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned multimodal knowledge graph construction device 110. Figure 3 As shown, Figure 3 This is a structural block diagram of a computer device 100 provided in an embodiment of the present invention. The computer device 100 includes a multimodal knowledge graph construction device 110, a memory 111, a processor 112 and a communication unit 113.

[0116] To achieve data transmission or interaction, the memory 111, processor 112 and communication unit 113 are electrically connected to each other directly or indirectly. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The multimodal knowledge graph construction device 110 includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or solidified in the operating system (OS) of the computer device 100. The processor 112 is used to execute the multimodal knowledge graph construction device 110 stored in the memory 111, such as the software function modules and computer programs included in the multimodal knowledge graph construction device 110.

[0117] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the aforementioned multimodal knowledge graph construction method.

[0118] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.

Claims

1. A method for constructing a multimodal knowledge graph. It is characterized in that include: Defining a knowledge ontology and storing it in a relational database, wherein the knowledge ontology includes entities and relationships; Obtain the pre-trained extraction model and upload it to the model warehouse; Obtain a multimodal data set to be extracted and store it in a preset independent storage space; Extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtaining the extraction results to be reviewed determined based on the knowledge ontology, and storing the extraction results to be reviewed in a distributed database; If the extraction result to be reviewed is determined to be valid, the entity data and attribute information corresponding to the extraction result to be reviewed are stored in the distributed database, and the relationship network corresponding to the extraction result to be reviewed is stored in the graph database; Based on the entity data, the attribute information and the relationship network, a target multimodal knowledge graph is constructed.

2. The method according to claim 1, It is characterized in that Defining the knowledge ontology and storing it in a relational database includes: defining the entity name of the entity, the relationship name of the relationship, and other attributes; The entity name, the relationship name and the other attributes are stored in a relational database.

3. The method according to claim 1, It is characterized in that The step of obtaining a pre-trained extraction model and uploading it to a model repository includes: Get a pre-trained extraction model; Define the model name, model modality and model domain of the extraction model, where the model modality includes text, picture, video and voice; Importing the extracted model into the model warehouse based on breakpoint-resume mode; Calling preset sample data to verify the model effect of the extraction model; When the model effect is higher than a preset model effect threshold, the extracted model is uploaded to the model warehouse.

4. The method according to claim 3, It is characterized in that The step of obtaining a multimodal data set to be extracted includes: Acquire a data modality type of the multimodal data set to be extracted, wherein the data modality type includes text, picture, video, and voice; Based on the data modality type, the acquired multimodal data set to be extracted is stored in a preset independent storage space in an asynchronous breakpoint-resume manner.

5. The method according to claim 4, It is characterized in that The target multimodal to-be-extracted data set obtained from the independent storage space is extracted based on the target extraction model called from the model warehouse to obtain the to-be-extracted extraction result determined based on the knowledge ontology, and the to-be-extracted extraction result is stored in a distributed database, including: Create multiple extraction tasks, each of which includes a target modality type, a target domain type, and a task priority; Calling the target extraction model corresponding to each extraction task from the model repository according to the target modality type and the target domain type, and acquiring the target multimodal data set to be extracted corresponding to each extraction task from the independent storage space; According to the task priority corresponding to each extraction task, each extraction task is asynchronously and concurrently executed to obtain the extraction result to be reviewed corresponding to each extraction task; The extracted results to be reviewed are stored in the Mongodb database.

6. The method according to claim 1, It is characterized in that When the extraction result to be reviewed is determined to be valid, the entity data and attribute information corresponding to the extraction result to be reviewed are stored in the distributed database, and the relationship network corresponding to the extraction result to be reviewed is stored in the graph database, including: When the audit pass rate of the extraction results to be audited is higher than the preset pass rate threshold, the corresponding entity data and attribute information corresponding to the valid data of the extraction results to be audited are stored in the distributed database, and the relationship network corresponding to the extraction results to be audited is stored in the graph database, and the invalid data of the extraction results to be audited is used as feedback data of the target extraction model.

7. The method according to claim 6, It is characterized in that The method further comprises: When the audit pass rate of the extraction results to be reviewed is lower than the preset pass rate threshold, the extraction results to be reviewed will be invalidated, and the step of extracting the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse will be re-executed.

8. A multimodal knowledge graph construction device, It is characterized in that include: A definition module, used to define a knowledge ontology and store it in a relational database, wherein the knowledge ontology includes entities and relationships; A shelf module is used to obtain a pre-trained extraction model and upload it to a model warehouse, the model warehouse; An acquisition module is used to acquire a multimodal data set to be extracted and store it in a preset independent storage space; An extraction module, configured to extract the target multimodal data set to be extracted obtained from the independent storage space based on the target extraction model called from the model warehouse, obtain the extraction result to be reviewed determined based on the knowledge ontology, and store the extraction result to be reviewed in a distributed database; A storage module, used for storing the entity data and attribute information corresponding to the extraction result to be reviewed in the distributed database, and storing the relationship network corresponding to the extraction result to be reviewed in the graph database when the extraction result to be reviewed is determined to be valid; A construction module is used to construct a target multimodal knowledge graph based on the entity data, the attribute information and the relationship network.

9. A computer device, It is characterized in that The computer device comprises a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the method according to any one of claims 1 to 7.

10. A readable storage medium, It is characterized in that The readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information processing method and device, computer storage medium and terminal

    CN111428473A

  • Model deployment system, method and device and storage medium

    CN113961199A

  • Multi-modal electric power knowledge graph construction method and device, equipment and storage medium

    CN114064926A

  • Archive knowledge graph construction method based on multi-modal semantic features

    CN116450834A

  • Wind driven generator multi-modal process map modeling method based on multi-source heterogeneous data

    CN116541533A