Knowledge graph model construction method and device, electronic device and storage medium
By acquiring and verifying the knowledge graph model information, the problem of insufficient model reuse capability in the existing technology is solved, and the rapid construction and collaborative construction of the knowledge graph model is realized, thereby improving the construction efficiency and reuse capability.
Patent Information
- Application Number
- CN202310636549.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
The existing knowledge graph model construction method has weak reuse capabilities, resulting in complex construction operations and low efficiency, making it difficult to achieve collaborative construction of different business departments.
By obtaining user permissions, obtaining existing knowledge graph model information, forming a list of models to be selected, obtaining the model selected by the user, displaying entity concepts and relationship type information, performing verification and filling the model canvas, ensuring that the model does not conflict and completes construction.
It realizes the rapid construction and reuse of knowledge graph models, improves construction efficiency, and supports collaborative construction and model push of different business departments.
Smart Images

Figure CN119066204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and specifically, to a knowledge graph model construction method, device, electronic device and storage medium. Background Art
[0002] Knowledge graph is one of the important application fields of artificial intelligence. It belongs to the category of cognitive intelligence and is a representative of symbolism. In terms of its technical development stage, knowledge graph technology originated from the semantic network in the 1950s. After more than half a century of development, Google proposed Google Knowledge Graph in 2012, and the "knowledge graph" was officially named, which also meant that knowledge graph technology entered a period of prosperity. Knowledge graph is an interdisciplinary field that intersects with machine learning, natural language processing, databases, machine vision, Internet of Things and other technologies. At the same time, it also has its own clear technical elements and research boundaries. Knowledge representation, storage, extraction, fusion, reasoning and other technologies are its typical technical connotations.
[0003] The current knowledge graph model construction method has basically reached a consensus on graphic visualization and drag-and-drop methods, but the ability to reuse all or part of the model is weak, which leads to complex construction operations and reduced efficiency. Summary of the invention
[0004] In view of this, the purpose of an embodiment of the present invention is to provide a reuse processing of a knowledge graph model to achieve rapid model construction and facilitate the collaborative construction of knowledge graphs of different business departments.
[0005] A first aspect of the present invention provides a method for constructing a knowledge graph model, the method comprising:
[0006] Obtain existing knowledge graph model information based on user permissions and form a list of models to be selected;
[0007] Acquire a selected model determined by a user from the list of models to be selected, display entity concepts and relationship type information contained in the selected model, and form a list of items to be selected;
[0008] Pull the corresponding entity concept or relationship type information according to the user selected item and verify it, and fill the first knowledge graph model canvas according to the verification result; the verification includes determining whether there is a conflict between the user selected item and the first knowledge graph model; filling the first knowledge graph model canvas according to the verification result includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then pull the user selected item and fill it into the first knowledge graph model canvas, and complete the construction of the first knowledge graph model.
[0009] Preferably, the step of pulling corresponding entity concepts or relationship type information according to the user selected item and performing verification, and filling the first knowledge graph model canvas according to the verification result, includes:
[0010] Determine whether there is any item content in the first knowledge graph model. If there is no content in the first knowledge graph model, no verification is required, and the item selected by the user is pulled and filled into the first knowledge graph model canvas;
[0011] If there is content in the first knowledge graph model, the first knowledge graph model is verified; the verification of the first knowledge graph model includes entity concept verification and relationship type verification.
[0012] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition;
[0013] The items of the relationship type verification include name, attribute name, and attribute value type;
[0014] The method further comprises: pulling corresponding entity concepts or relationship type information according to the user selected items and performing verification, and filling the first knowledge graph model canvas according to the verification results.
[0015] If the verification items are partially or completely consistent, it is regarded as a model conflict, the conflicting item content is displayed, and the user is prompted to reselect; the conflicting item content is the item that is consistent in the verification.
[0016] A second aspect of the present invention provides a method for constructing a knowledge graph model, the method comprising:
[0017] Obtain existing knowledge graph model information based on user permissions and form a list of models to be selected;
[0018] Get the model selected by the user and the knowledge graph model to be pushed;
[0019] Check whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fill the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; if the project content of the knowledge graph model to be pushed and the selected model are all inconsistent, the models are deemed to be non-conflicting, then fill the project content of the knowledge graph model to be pushed into the selected model canvas to complete the construction of the knowledge graph model.
[0020] Preferably, the checking whether the selected model conflicts with the knowledge graph model to be pushed includes:
[0021] The entity concepts and relationship types contained in the selected model are verified with the entity concepts and relationship types already in the knowledge graph model to be pushed; the verification includes entity concept verification and relationship type verification.
[0022] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition; the items of relationship type verification include name, attribute name, and attribute value type;
[0023] The step of verifying whether there is a conflict between the selected model and the knowledge graph model to be pushed, and filling the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result, further includes:
[0024] If the verification items are partially or completely consistent, it is considered a model conflict, the conflicting item content is displayed, and the user is prompted to modify the selected model or reselect another model before pushing.
[0025] A third aspect of the present invention provides a knowledge graph model construction device, the device comprising:
[0026] The acquisition module obtains the existing knowledge graph model information according to the user's permissions and forms a list of models to be selected;
[0027] A selection module, which obtains a selected model determined by a user from a list of candidate models, displays entity concepts and relationship type information contained in the selected model, and forms a list of candidate items;
[0028] The verification and construction module pulls the corresponding entity concept or relationship type information according to the user's selected items and performs verification, and fills the first knowledge graph model canvas according to the verification results; the verification includes determining whether there is a conflict between the user's selected items and the first knowledge graph model; the filling of the first knowledge graph model canvas according to the verification results includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then the user's selected items are pulled and filled into the first knowledge graph model canvas, and the construction of the first knowledge graph model is completed.
[0029] A fourth aspect of the present invention provides a knowledge graph model construction device, the device comprising:
[0030] The acquisition module obtains the existing knowledge graph model information according to the user's permissions and forms a list of models to be selected;
[0031] A selection module is used to obtain the selected model determined by the user from the list of candidate models and the knowledge graph model to be pushed;
[0032] The verification and construction module verifies whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fills the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; among them, if the project content of the knowledge graph model to be pushed and the selected model are all inconsistent, the models are deemed to be non-conflicting, then the project content of the knowledge graph model to be pushed is filled into the selected model canvas to complete the construction of the knowledge graph model.
[0033] In addition, the fifth aspect of the present invention provides an electronic device, which includes: one or more processors, and a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the knowledge graph model construction method described in the first aspect or the second aspect above.
[0034] In addition, the sixth aspect of the present invention provides a storage medium, which stores a computer program; the program is loaded and executed by a processor to implement the steps of the knowledge graph model construction method described in the first aspect or the second aspect above.
[0035] In the scheme of the present invention, by obtaining the existing knowledge graph model information according to the user's authority, a list of models to be selected is formed; the selected model determined by the user from the list of models to be selected is obtained, and the entity concept and relationship type information contained in the selected model are displayed to form a list of items to be selected; the corresponding entity concept or relationship type information is pulled and verified according to the user's selected item, and the first knowledge graph model canvas is filled according to the verification result; the verification includes determining whether there is a conflict between the user's selected item and the first knowledge graph model; if all the verified items are inconsistent, it is deemed that the model does not conflict, then the user's selected item is pulled and filled into the first knowledge graph model canvas, and the first knowledge graph model is built. Compared with the existing technology, it can help new users quickly build models and understand all the elements and element specifications of the model; improve the efficiency of model construction, make model reuse and step-by-step construction possible; provide a way for teams to collaboratively build models, and different business departments can draw knowledge graph models in their fields separately, and then push them to the overall model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 It is a flowchart of the knowledge graph model construction method disclosed in Example 1 of the present invention;
[0038] Figure 2 It is a flowchart of the knowledge graph model construction method disclosed in Example 2 of the present invention;
[0039] Figure 3 It is a schematic diagram of the structure of the knowledge graph model building device disclosed in Example 3 of the present invention;
[0040] Figure 4 It is a schematic diagram of the structure of the knowledge graph model building device disclosed in Example 4 of the present invention. DETAILED DESCRIPTION
[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0042] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0043] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0044] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0045] It should be noted that the “plurality” mentioned in this article refers to two or more.
[0046] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0047] Knowledge graph is a structured semantic knowledge base used to quickly describe concepts and their relationships in the physical world. Through knowledge graph, information, data and link relationships on the Web can be aggregated into knowledge, making information resources easier to calculate, understand and evaluate, and enabling rapid response and reasoning of knowledge. Knowledge graph is a symbolic expression of the real world, describing some concepts that exist in the real world and the connections between them. Specifically, it is a network knowledge base formed by entities with attributes connected by relationships.
[0048] Generally speaking, there are three types of raw data in knowledge graphs (which are also the three types of raw data on the Internet): structured data, such as relational databases and linked data; semi-structured data, such as XML, JSON and encyclopedias; and unstructured data, such as pictures, audio and video.
[0049] Building a knowledge graph is an iterative updating process. According to the logic of knowledge acquisition, each round of iteration includes three stages: Information extraction: extracting entities, attributes and the relationships between entities from various types of data sources, and forming ontological knowledge expressions on this basis. Knowledge fusion: after acquiring new knowledge, it is necessary to integrate it to eliminate contradictions and ambiguities. For example, some entities may have multiple expressions, and a specific title may correspond to multiple different entities. Knowledge processing: for the new knowledge that has been integrated, it needs to undergo quality assessment (some of which requires manual participation in identification) before the qualified parts can be added to the knowledge base to ensure the quality of the knowledge base.
[0050] Example 1
[0051] like Figure 1 The figure shows a flow chart of a knowledge graph model construction method according to an embodiment of the present invention. The method can be applied to the initial step or process of knowledge graph model construction. The model construction adopts the pull method. The knowledge graph model construction method includes the following steps:
[0052] S101, obtaining existing knowledge graph model information according to user permissions to form a list of models to be selected;
[0053] Specifically, in this embodiment, all models that can be obtained within the scope of the permission are pulled according to the user's permission. The obtained model information includes: model name, creator, last revision time, and application map status.
[0054] S102, obtaining a selected model determined by a user from a list of models to be selected, displaying entity concepts and relationship type information contained in the selected model, and forming a list of items to be selected;
[0055] Specifically, in this embodiment, the entity concept or relationship type to be pulled is selected. The user selects one of the models from the list of optional models, and the system lists the specific entity concepts and relationship type information contained in the model for the user to select. Among them, the entity concept information includes: name, number of attributes; the relationship type information includes: name, number of attributes. The user selects the entity concept or relationship type to be pulled.
[0056] S103, according to the user selected item, pull the corresponding entity concept or relationship type information and verify it, and fill the first knowledge graph model canvas according to the verification result; the verification includes determining whether there is a conflict between the user selected item and the first knowledge graph model; the filling of the first knowledge graph model canvas according to the verification result includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then the user selected item is pulled and filled into the first knowledge graph model canvas, and the construction of the first knowledge graph model is completed.
[0057] Specifically, in this embodiment, model adaptation and filling are further required. The purpose of model adaptation is to check whether the selected content conflicts with the existing content of the model, and filling refers to filling the current model canvas with the selected model content.
[0058] Preferably, the step of pulling corresponding entity concepts or relationship type information according to the user selected item and performing verification, and filling the first knowledge graph model canvas according to the verification result, includes:
[0059] Determine whether there is any item content in the first knowledge graph model. If there is no content in the first knowledge graph model, no verification is required, and the item selected by the user is pulled and filled into the first knowledge graph model canvas;
[0060] If there is content in the first knowledge graph model, the first knowledge graph model is verified; the verification of the first knowledge graph model includes entity concept verification and relationship type verification.
[0061] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition;
[0062] In this embodiment, in the project of entity concept verification, the name refers to the name of the entity concept, which is generally an abstract concept that expresses a collection of a certain type of specific things. Its granularity depends on the specific situation of the project. For example, movies, Chinese movies, Hollywood movies, etc. can all be used as the name of the entity concept;
[0063] Attribute name refers to the attribute name of the entity concept. An entity concept can contain several attributes. In the scope of knowledge graph, attributes are described and defined by dimensions such as name, type, and search conditions. The attribute name describes a certain characteristic of the entity concept. For example, if the entity concept is "movie", its attributes (i.e., attribute name) may include director, actor, country of production, release time, etc.
[0064] The attribute value type refers to the data type of the data representing the attribute, including int64, bool, string, fixed_string, double, int32, int16, int8, float, date, time, datetime, timestamp, geography, geography (point), geography (linestring), geography (polygon), duration, etc.
[0065] The search condition refers to whether the attribute is allowed to be searched, as well as the searchable conditions. For example, the attribute "release time" of the entity concept "movie" can be set to allow search, and the search condition can be set to release time in 2023, or release time after 2000, etc.;
[0066] Furthermore, the relationship type verification items include name, attribute name, and attribute value type.
[0067] In this embodiment, in the relationship type verification items, the name refers to the name of the relationship type, which indicates the relationship between two entity concepts. For example, the entity concepts "movie" and "actor" may have a relationship type "participation";
[0068] Attribute name refers to the attribute name of the relationship type. A relationship type can contain several attributes, which represent a certain characteristic of a relationship between two entity concepts. For example, in the above example, "participation" can contain attributes such as shooting time and remuneration.
[0069] The attribute value type refers to the data type of the data representing the attribute, including int64, bool, string, fixed_string, double, int32, int16, int8, float, date, time, datetime,
[0070] timestamp, geography, geography(point), geography(linestring), geography(polygon), duration, etc.
[0071] The method of pulling corresponding entity concepts or relationship type information according to the user selected items and verifying them, and filling the first knowledge graph model canvas according to the verification results, also includes: if the verified items are partially or completely consistent, it is regarded as a model conflict, the conflicting item content is displayed, and the user is prompted to reselect; the conflicting item content is the verified consistent item.
[0072] Specifically, in this embodiment, the model verification is also called model adaptation, which is mainly to verify whether the selected content conflicts with the existing content of the model, and specifically includes:
[0073] If you select model pull at the beginning of model building, and there is no content in the current model, no verification is required. All the content selected by the user is pulled to the current canvas to complete the entire process of model pull.
[0074] If you choose to pull a model during model building, and entity concepts or entity concepts and relationship types already exist in the current model, you need to verify the model content.
[0075] In some embodiments, entity concept verification items include: name, attribute name, attribute value type, and search conditions; relationship type verification items include: name, attribute name, and attribute value type.
[0076] If all the verification items are inconsistent, all the content selected by the user is pulled to the current canvas to complete the whole process of model pulling. If the verification items are partially or completely consistent, it is considered a model conflict, and the system lists the conflicting content and prompts the user to reselect, and then the user selects and repeats step S103.
[0077] Example 2
[0078] This embodiment provides a method for constructing a knowledge graph model. Figure 2 As shown, the method includes:
[0079] S201, obtaining existing knowledge graph model information according to user permissions to form a list of models to be selected;
[0080] Specifically, in this embodiment, all models that can be obtained within the scope of the permission are pulled according to the user's permission. The obtained model information includes: model name, creator, last revision time, and application map status.
[0081] S202, obtaining the model selected by the user and the knowledge graph model to be pushed;
[0082] Specifically, in this embodiment, the user selects one of the models from the list of optional models. The knowledge graph model to be pushed can be the user's model in the current system, and the selected model can be the model that needs to be pushed by the user to be merged into the selected model, so as to realize the merging and reuse of knowledge graph models across departments.
[0083] S203, verify whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fill the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; wherein, if the project contents of the knowledge graph model to be pushed and the selected model are all inconsistent, it is deemed that the models do not conflict, then the project content of the knowledge graph model to be pushed is filled into the selected model canvas to complete the construction of the knowledge graph model.
[0084] Preferably, the verification of whether there is a conflict between the selected model and the knowledge graph model to be pushed includes: verifying the entity concepts and relationship types contained in the selected model with the entity concepts and relationship types already in the knowledge graph model to be pushed; the verification includes entity concept verification and relationship type verification.
[0085] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition; the items of relationship type verification include name, attribute name, and attribute value type;
[0086] In this embodiment, in the project of entity concept verification, the name refers to the name of the entity concept, which is generally an abstract concept that expresses a collection of a certain type of specific things. Its granularity depends on the specific situation of the project. For example, movies, Chinese movies, Hollywood movies, etc. can all be used as the name of the entity concept;
[0087] Attribute name refers to the attribute name of the entity concept. An entity concept can contain several attributes. In the scope of knowledge graph, attributes are described and defined by dimensions such as name, type, and search conditions. The attribute name describes a certain characteristic of the entity concept. For example, if the entity concept is "movie", its attributes (i.e., attribute name) may include director, actor, country of production, release time, etc.
[0088] The attribute value type refers to the data type of the data representing the attribute, including int64, bool, string, fixed_string, double, int32, int16, int8, float, date, time, datetime, timestamp, geography, geography (point), geography (linestring), geography (polygon), duration, etc.
[0089] The search condition refers to whether the attribute is allowed to be searched, as well as the searchable conditions. For example, the attribute "release time" of the entity concept "movie" can be set to allow search, and the search condition can be set to release time in 2023, or release time after 2000, etc.;
[0090] Furthermore, in this embodiment, in the relationship type verification items, the name refers to the name of the relationship type, which indicates the relationship between two entity concepts. For example, the entity concepts "movie" and "actor" may have a relationship type "participation";
[0091] Attribute name refers to the attribute name of the relationship type. A relationship type can contain several attributes, which represent a certain characteristic of a relationship between two entity concepts. For example, in the above example, "participation" can contain attributes such as shooting time and remuneration.
[0092] The attribute value type refers to the data type of the data representing the attribute, including int64, bool, string, fixed_string, double, int32, int16, int8, float, date, time, datetime, timestamp, geography, geography (point), geography (linestring), geography (polygon), duration, etc.
[0093] The method of pulling corresponding entity concepts or relationship type information according to the user selected items and verifying them, and filling the first knowledge graph model canvas according to the verification results, also includes: if the verified items are partially or completely consistent, it is regarded as a model conflict, the conflicting item content is displayed, and the user is prompted to reselect; the conflicting item content is the verified consistent item.
[0094] The method of verifying whether there is a conflict between the selected model and the knowledge graph model to be pushed, and filling the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result, also includes: if the verification items are partially or completely consistent, it is regarded as a model conflict, the conflicting project content is displayed, and the user is prompted to modify the selected model or reselect other models before pushing.
[0095] Specifically, in this embodiment, after determining the model selected by the user and the knowledge graph model to be pushed, model adaptation and filling are required. The purpose of model adaptation is to verify whether the content to be pushed conflicts with the existing content of the selected model, and filling means filling the current model content into the selected model canvas. The specific method is:
[0096] Verify the entity concepts and relationship types contained in the current model with the entity concepts and relationship types already in the pushed model. Verification includes entity concept verification and relationship type verification; entity concept verification items: name, attribute name, attribute value type, search condition; relationship type verification items: name, attribute name, attribute value type. If all verification items are inconsistent, push the current model content to the selected model canvas to complete the entire model push process. If the verification items are partially or completely consistent, it is considered a model conflict. The system lists the conflicting content and prompts the user to modify the current model before pushing or select another model for push.
[0097] Example 3
[0098] This embodiment also provides a knowledge graph model construction device, such as Figure 3 As shown, the device comprises:
[0099] Acquisition module 301, acquires existing knowledge graph model information according to user permissions and forms a list of models to be selected;
[0100] The selection module 302 obtains the selected model determined by the user from the list of models to be selected, displays the entity concepts and relationship type information contained in the selected model, and forms a list of items to be selected;
[0101] The verification and construction module 303 pulls the corresponding entity concept or relationship type information according to the user selected item and verifies it, and fills the first knowledge graph model canvas according to the verification result; the verification includes determining whether there is a conflict between the user selected item and the first knowledge graph model; the filling of the first knowledge graph model canvas according to the verification result includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then the user selected item is pulled and filled into the first knowledge graph model canvas, and the construction of the first knowledge graph model is completed.
[0102] Preferably, the verification and construction module 303 is also used to determine whether there is any project content in the first knowledge graph model. If there is no content in the first knowledge graph model, no verification is required, and the project selected by the user is pulled and filled into the first knowledge graph model canvas;
[0103] If there is content in the first knowledge graph model, the first knowledge graph model is verified; the verification of the first knowledge graph model includes entity concept verification and relationship type verification.
[0104] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition;
[0105] The items of the relationship type verification include name, attribute name, and attribute value type;
[0106] The method of pulling corresponding entity concepts or relationship type information according to the user selected items and verifying them, and filling the first knowledge graph model canvas according to the verification results, also includes: if the verified items are partially or completely consistent, it is regarded as a model conflict, the conflicting item content is displayed, and the user is prompted to reselect; the conflicting item content is the verified consistent item.
[0107] Example 4
[0108] This embodiment also provides a knowledge graph model construction device, such as Figure 4 As shown, the device comprises:
[0109] Acquisition module 401, acquires existing knowledge graph model information according to user permissions and forms a list of models to be selected;
[0110] The selection module 402 obtains the selected model determined by the user from the list of models to be selected, and the knowledge graph model to be pushed;
[0111] The verification and construction module 403 verifies whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fills the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; if the project content of the knowledge graph model to be pushed is completely inconsistent with that of the selected model, the models are deemed to be non-conflicting, and the project content of the knowledge graph model to be pushed is filled into the selected model canvas to complete the construction of the knowledge graph model.
[0112] The verification and construction module 403 is also used to verify the entity concepts and relationship types contained in the selected model with the entity concepts and relationship types already in the knowledge graph model to be pushed; the verification includes entity concept verification and relationship type verification.
[0113] Preferably, the items of entity concept verification include name, attribute name, attribute value type, and search condition; the items of relationship type verification include name, attribute name, and attribute value type;
[0114] The method of verifying whether there is a conflict between the selected model and the knowledge graph model to be pushed, and filling the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result, also includes: if the verification items are partially or completely consistent, it is regarded as a model conflict, the conflicting project content is displayed, and the user is prompted to modify the selected model or reselect other models before pushing.
[0115] In addition, this embodiment also provides an electronic device, which includes: one or more processors, and a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the knowledge graph model construction method described in Example 1 or Example 2 above.
[0116] In addition, this embodiment also provides a storage medium, which stores a computer program; the program is loaded and executed by a processor to implement the steps of the knowledge graph model construction method described in Example 1 or Example 2 above.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0118] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0119] The units described as separate components may or may not be physically separated. As a unit, it can be appreciated by those skilled in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a grid device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0122] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for constructing a knowledge graph model, characterized in that: The method comprises: Obtain existing knowledge graph model information based on user permissions and form a list of models to be selected; Acquire a selected model determined by a user from the list of models to be selected, display entity concepts and relationship type information contained in the selected model, and form a list of items to be selected; Pull the corresponding entity concept or relationship type information according to the user selected item and verify it, and fill the first knowledge graph model canvas according to the verification result; the verification includes determining whether there is a conflict between the user selected item and the first knowledge graph model; filling the first knowledge graph model canvas according to the verification result includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then pull the user selected item and fill it into the first knowledge graph model canvas, and complete the construction of the first knowledge graph model.
2. The method for constructing a knowledge graph model according to claim 1, characterized in that: The step of pulling corresponding entity concepts or relationship type information according to the user selected item and performing verification, and filling the first knowledge graph model canvas according to the verification result, includes: Determine whether there is any item content in the first knowledge graph model. If there is no content in the first knowledge graph model, no verification is required, and the item selected by the user is pulled and filled into the first knowledge graph model canvas; If there is content in the first knowledge graph model, the first knowledge graph model is verified; the verification of the first knowledge graph model includes entity concept verification and relationship type verification.
3. The method for constructing a knowledge graph model according to claim 2, characterized in that: The items of entity concept verification include name, attribute name, attribute value type, and search condition; The items of the relationship type verification include name, attribute name, and attribute value type; The method further comprises: pulling corresponding entity concepts or relationship type information according to the user selected items and performing verification, and filling the first knowledge graph model canvas according to the verification results. If the verification items are partially or completely consistent, it is regarded as a model conflict, the conflicting item content is displayed, and the user is prompted to reselect; the conflicting item content is the item that is consistent in the verification.
4. A method for constructing a knowledge graph model, characterized in that: The method comprises: Obtain existing knowledge graph model information based on user permissions and form a list of models to be selected; Get the model selected by the user and the knowledge graph model to be pushed; Check whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fill the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; if the project content of the knowledge graph model to be pushed and the selected model are all inconsistent, the models are deemed to be non-conflicting, then fill the project content of the knowledge graph model to be pushed into the selected model canvas to complete the construction of the knowledge graph model.
5. The method for constructing a knowledge graph model according to claim 4, characterized in that: The checking whether the selected model conflicts with the knowledge graph model to be pushed includes: The entity concepts and relationship types contained in the selected model are verified with the entity concepts and relationship types already in the knowledge graph model to be pushed; the verification includes entity concept verification and relationship type verification.
6. The method for constructing a knowledge graph model according to claim 5, characterized in that: The items of entity concept verification include name, attribute name, attribute value type, and search condition; the items of relationship type verification include name, attribute name, and attribute value type; The step of verifying whether there is a conflict between the selected model and the knowledge graph model to be pushed, and filling the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result, further includes: If the verification items are partially or completely consistent, it is considered a model conflict, the conflicting item content is displayed, and the user is prompted to modify the selected model or reselect another model before pushing.
7. A knowledge graph model construction device, characterized in that: The device comprises: The acquisition module obtains the existing knowledge graph model information according to the user's permissions and forms a list of models to be selected; A selection module, which obtains a selected model determined by a user from a list of candidate models, displays entity concepts and relationship type information contained in the selected model, and forms a list of candidate items; The verification and construction module pulls the corresponding entity concept or relationship type information according to the user's selected items and performs verification, and fills the first knowledge graph model canvas according to the verification results; the verification includes determining whether there is a conflict between the user's selected items and the first knowledge graph model; the filling of the first knowledge graph model canvas according to the verification results includes: if all the verified items are inconsistent, it is deemed that the model does not conflict, then the user's selected items are pulled and filled into the first knowledge graph model canvas, and the construction of the first knowledge graph model is completed.
8. A knowledge graph model construction device, characterized in that: The device comprises: The acquisition module obtains the existing knowledge graph model information according to the user's permissions and forms a list of models to be selected; A selection module is used to obtain the selected model determined by the user from the list of candidate models and the knowledge graph model to be pushed; The verification and construction module verifies whether there is any conflict between the selected model and the knowledge graph model to be pushed, and fills the project content of the knowledge graph model to be pushed into the selected model canvas according to the verification result; among them, if the project content of the knowledge graph model to be pushed and the selected model are all inconsistent, the models are deemed to be non-conflicting, then the project content of the knowledge graph model to be pushed is filled into the selected model canvas to complete the construction of the knowledge graph model.
9. An electronic device, comprising: One or more processors, a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the knowledge graph model construction method as described in any one of claims 1-6.
10. A storage medium storing a computer program; the program is loaded and executed by a processor to implement the steps of the knowledge graph model construction method as described in any one of claims 1 to 6.
