Method, device, equipment and medium for constructing knowledge graph from multiple business perspectives
Through a construction method with a multi-business perspective, the data field is constructed and potential relationships are determined, and the problems of low complexity and scalability of knowledge graph construction in the existing technology are solved, and the rapid construction and efficient index of knowledge graphs are achieved.
Patent Information
- Application Number
- CN202410296082.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-03-14
AI Technical Summary
When building large-scale knowledge graphs, existing knowledge graph construction methods are difficult to meet the needs of multi-business perspectives, and the logical paradigm design is complex, resulting in low scalability and reduced storage, indexing and retrieval efficiency.
Using a multi-business perspective construction method, by pre-defining multiple business perspective surfaces, building a data field and writing to entity and relational data surfaces, determining empty nodes and potential structures, increasing potential relationships, forming a knowledge graph of multi-business perspectives, and reducing The complexity of logical paradigm design is improved and data storage and retrieval efficiency is improved.
It realizes rapid construction and efficient indexing of knowledge graphs, reduces business understanding costs, is suitable for a variety of business application scenarios, and improves the scalability of the graph.
Smart Images

Figure CN118153682B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method, device, equipment and medium for constructing a knowledge graph from multiple business perspectives. Background Art
[0002] With the continuous advancement and iteration of technologies such as artificial intelligence, natural language processing, and data mining in recent years, knowledge graphs have been widely used and have become the basic component of various intelligent applications. In search engine applications, knowledge graphs can provide more accurate and rich search results; in intelligent assistant applications, knowledge graphs can help answer users' questions and provide personalized suggestions; in recommendation systems, knowledge graphs can understand users' interests and needs and provide more accurate recommendations; in industry applications, knowledge graphs can help industry users assist in research and decision-making.
[0003] The construction, maintenance, and application of knowledge graphs is a complex task. Especially when building large-scale knowledge graphs and providing business support on top of them, the key issues that need to be addressed are: (1) knowledge representation and modeling. Knowledge graphs need to design appropriate entity and relationship types and define the semantic associations between them. (2) Scalability and efficiency. Building large-scale knowledge graphs requires processing massive amounts of data and entities. During the application process, a certain degree of scalability must be ensured while being able to efficiently complete operations such as storage, indexing, and retrieval. Summary of the invention
[0004] In order to better realize the construction of large-scale knowledge graphs from a multi-business perspective, the embodiments of the present application provide a method, device, equipment and medium for constructing a knowledge graph from a multi-business perspective.
[0005] In a first aspect, an embodiment of the present application provides a method for constructing a knowledge graph from a multi-business perspective, the method comprising:
[0006] Constructing a data field consisting of multiple business perspectives; the multiple business perspectives include predefined business perspectives and empty business perspectives; the data field can store a graph structure constituting a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data faces corresponding to the multiple business perspectives, and each relationship in the relationship set has multiple relationship data faces corresponding to the multiple business perspectives;
[0007] In the data field, for each predefined business perspective, obtaining each entity type corresponding to each business data under the business perspective;
[0008] According to the entity type corresponding to each of the business data under each of the business perspectives, the business data is written into the corresponding entity data plane of the entity, and the corresponding relationship data plane of the relationship between the entities is constructed to obtain an initial knowledge graph of multiple business perspectives;
[0009] Determine an empty node under each business perspective; wherein the empty node is an entity whose entity data plane under the predefined business perspective is empty;
[0010] Traversing all the empty nodes and entities that have a relationship with the empty nodes to determine all potential structures; the potential structure represents a structure consisting of two entities that have a relationship with the empty node and the empty node under any business perspective;
[0011] According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph from the multi-business perspective to obtain a knowledge graph from the multi-business perspective; the potential relationship represents an association relationship between two entities in the potential structure that have a relationship with the empty node.
[0012] In one or some optional implementations of the embodiment of the present application, according to all the potential structures, before adding corresponding potential relationships to the initial knowledge graph of the multi-business perspective, the method further includes:
[0013] Determine whether each potential structure meets the preset blocking rules;
[0014] If not, then according to the potential structure, the corresponding potential relationship is added to the initial knowledge graph of the multi-business perspective.
[0015] In one or some optional implementations of the embodiment of the present application, after obtaining the knowledge graph from multiple business perspectives, graph data is added in the following manner:
[0016] Deleting all potential relationships in the knowledge graph from multiple business perspectives to obtain a knowledge graph to be updated;
[0017] According to each entity type under each business perspective in the knowledge graph to be updated, the newly added graph data is written into the corresponding entity data plane of the entity, and the corresponding relationship data plane of the relationship between the entities is constructed to obtain the updated knowledge graph;
[0018] Determine the empty nodes under each business perspective;
[0019] Traversing all the empty nodes and entities having relationships with the empty nodes to determine all potential structures;
[0020] According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph from the multi-business perspective to obtain a knowledge graph from the multi-business perspective after the newly added data.
[0021] In one or some optional implementations of the embodiment of the present application, after obtaining the knowledge graph from multiple business perspectives, the graph data is retrieved in the following manner:
[0022] When retrieving graph data through an agreed business perspective, determine the business perspective to be retrieved, retrieve all graph data under the business perspective to be retrieved, and return the search results according to the search requirements;
[0023] When retrieving graph data from a full perspective, all graph data in the knowledge graph of the multi-business perspective is retrieved, and the search results are returned according to the search requirements.
[0024] In one or some optional implementations of the embodiment of the present application, after obtaining the knowledge graph from multiple business perspectives, a visual knowledge graph is constructed in the following manner:
[0025] Dividing data layers in the data field according to preset types of entities, and setting all entities in the knowledge graph from multiple business perspectives in corresponding data layers;
[0026] For each business perspective, each entity and relationship in the data layer under the business perspective is mapped to a preset business perspective plane to obtain a visualized knowledge graph under each business perspective.
[0027] In one or some optional implementations of the embodiment of the present application, before obtaining the visualized knowledge graph under each business perspective, the following steps are also included:
[0028] For each data layer, according to the set center of the ellipse, the major axis and the minor axis of the ellipse are determined according to the length and width of the business perspective plane, an ellipse is drawn as the mapped data layer, and entities are distributed and arranged on the edge of the ellipse according to a preset distance; wherein the center of the ellipse is obtained by the following method:
[0029] Draw a central auxiliary line passing through the center of gravity of the business perspective plane and perpendicular to the data layer;
[0030] Determining the intersection line between the data layer and the business perspective plane map;
[0031] The intersection point of the central auxiliary line and the intersection line is taken as the center of the ellipse.
[0032] In a second aspect, an embodiment of the present application provides a knowledge graph construction device for multiple business perspectives, the device comprising:
[0033] A construction module, used to construct a data field composed of multiple business perspectives; the multiple business perspectives include pre-defined business perspectives and empty business perspectives; the data field can store a graph structure constituting a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data faces corresponding to the multiple business perspectives, and each relationship in the relationship set has multiple relationship data faces corresponding to the multiple business perspectives;
[0034] An acquisition module, used for acquiring, in the data field, for each predefined business perspective, each entity type corresponding to each business data under the business perspective;
[0035] A writing module, used to write the business data into the corresponding entity data plane of the entity according to the entity type corresponding to each business data under each business perspective plane, construct the corresponding relationship data plane of the relationship between the entities, and obtain the initial knowledge graph of multiple business perspectives;
[0036] A first determination module is used to determine an empty node under each business perspective; wherein the empty node is an entity whose entity data plane under the predefined business perspective is empty;
[0037] A second determination module is used to traverse all the empty nodes and entities that have a relationship with the empty nodes to determine all potential structures; the potential structure represents a structure composed of two entities that have a relationship with the empty node and the empty node under any business perspective;
[0038] The third determination module is used to add corresponding potential relationships in the initial knowledge graph of the multi-business perspective according to all the potential structures to obtain a knowledge graph of the multi-business perspective; the potential relationship represents the association relationship between two entities in the potential structure that have a relationship with the empty node.
[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the above-mentioned method for constructing a knowledge graph from a multi-business perspective.
[0040] In a fourth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for constructing a knowledge graph from a multi-business perspective as described above is implemented.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a computer device, the computer device executes the above-mentioned method for constructing a knowledge graph from a multi-business perspective.
[0042] In a sixth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the above-mentioned method for constructing a knowledge graph from a multi-business perspective.
[0043] The beneficial effects of the above technical solution provided by the embodiment of the present application include at least:
[0044] The method for constructing a knowledge graph for multiple business perspectives provided in the embodiment of the present application constructs a data field composed of multiple business perspectives, and predefines multiple business perspectives. According to the entity type corresponding to each business data under each business perspective, the business data is written into the corresponding entity data surface of the entity, and the corresponding relationship data surface of the relationship between the entities is constructed to obtain the initial knowledge graph for multiple business perspectives. Then, according to each empty node determined under each business perspective, all potential structures are determined, thereby adding corresponding potential relationships to the initial knowledge graph, and finally obtaining the knowledge graph for multiple business perspectives. This method improves the efficiency of business data storage by constructing a data field to write business data into entities and relationships in a spatial graph structure for different business perspectives, and realizes the construction of a knowledge graph based on the relevance and potential relationships of business data. It does not require complex logical paradigm design of the knowledge graph, and can be applied to complex scenarios of multiple business applications. Moreover, by defining empty nodes, the potential relationships that may exist between different entities are obtained. The knowledge graph constructed by this method reduces the business understanding costs of different technical R&D personnel in the actual operation process, realizes the rapid construction of knowledge graphs in complex scenarios, and can achieve efficient indexing and retrieval. The knowledge graph has strong scalability, which is not only convenient for adding new business data under the corresponding business perspective, but also for expanding new business perspectives on the empty business perspective.
[0045] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.
[0046] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings:
[0048] Figure 1 A schematic diagram of the process of constructing a knowledge graph from a multi-business perspective provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of a prism-shaped data field provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of entities and relationships in a prism form provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of n entity data planes of an entity and n relationship data planes of a relationship provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of a process for adding graph data after obtaining a knowledge graph from multiple business perspectives provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of a process for constructing a visual knowledge graph after obtaining a knowledge graph from multiple business perspectives, provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of a visual knowledge graph provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of the structure of a knowledge graph construction device for multiple business perspectives provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0057] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0059] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0060] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0061] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0062] It should be understood that the size of the serial numbers of the steps in the following embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0063] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0064] The inventors found that in the prior art, the knowledge graph construction method has high requirements and difficulty in defining the knowledge graph logic paradigm. It is necessary to deeply understand the meaning of the data and fully understand the business application scenarios before customizing the graph according to the actual business needs. When the knowledge graph logic paradigm is simple in design, it can only meet a single application scenario, and the graph needs to be rebuilt when the scenario is expanded; when the knowledge graph logic paradigm is complex in design, although it can meet the needs of complex scenarios, the scalability is low. As the complexity increases, the storage, indexing and retrieval efficiency also decreases.
[0065] In the actual production process, knowledge graphs, as important data support elements, need to meet the requirements of easy understanding, efficient retrieval, and easy expansion. Based on this, the inventors have made this application after further research and development, providing a knowledge graph construction method, device, equipment and medium for multiple business perspectives.
[0066] Embodiment 1
[0067] This application embodiment provides a knowledge graph construction method for multiple business perspectives. Figure 1 As shown, the method includes the following steps S101 to S106:
[0068] S101: Construct a data field consisting of multiple business perspectives.
[0069] Among them, the multiple business perspective aspects include pre-defined business perspective aspects and empty business perspective aspects; the data field can store a graph structure that constitutes a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data aspects corresponding to the multiple business perspective aspects, and each relationship in the relationship set has multiple relationship data aspects corresponding to the multiple business perspective aspects.
[0070] S102: In the data field, for each predefined business perspective, obtain each entity type corresponding to each business data under the business perspective.
[0071] S103: According to the entity type corresponding to each business data under each business perspective, the business data is written into the corresponding entity data plane of the entity, and the corresponding relationship data plane of the relationship between the entities is constructed to obtain an initial knowledge graph of multiple business perspectives.
[0072] S104: Determine the empty nodes under each business perspective.
[0073] The empty node is an entity whose entity data plane is empty under the predefined business perspective.
[0074] S105: Traverse all the empty nodes and entities having relationships with the empty nodes to determine all potential structures.
[0075] The potential structure represents a structure consisting of two entities that have a relationship with the empty node and the empty node under any business perspective.
[0076] S106: According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph from the multi-business perspective to obtain a knowledge graph from the multi-business perspective.
[0077] The potential relationship represents an association relationship between two entities in the potential structure that have a relationship with the empty node.
[0078] The method for constructing a knowledge graph for multiple business perspectives provided in the embodiment of the present application constructs a data field composed of multiple business perspectives, and predefines multiple business perspectives. According to the entity type corresponding to each business data under each business perspective, the business data is written into the corresponding entity data surface of the entity, and the corresponding relationship data surface of the relationship between the entities is constructed to obtain the initial knowledge graph for multiple business perspectives. Then, according to each empty node determined under each business perspective, all potential structures are determined, thereby adding corresponding potential relationships to the initial knowledge graph, and finally obtaining the knowledge graph for multiple business perspectives. This method improves the efficiency of business data storage by constructing a data field to write business data into entities and relationships in a spatial graph structure for different business perspectives, and realizes the construction of a knowledge graph based on the relevance and potential relationships of business data. It does not require complex logical paradigm design of the knowledge graph, and can be applied to complex scenarios of multiple business applications. Moreover, by defining empty nodes, the potential relationships that may exist between different entities are obtained. The knowledge graph constructed by this method reduces the business understanding costs of different technical R&D personnel in the actual operation process, realizes the rapid construction of knowledge graphs in complex scenarios, and can achieve efficient indexing and retrieval. The knowledge graph has strong scalability, which is not only convenient for adding new business data under the corresponding business perspective, but also for expanding new business perspectives on the empty business perspective.
[0079] In the embodiment of the present application, a knowledge graph with a spatial graph structure is established by introducing a spatial perspective. The knowledge graph with a spatial graph structure is composed of data fields, entities and relationships, which can realize the rapid connection of various types of data to build a complex knowledge graph and meet the application needs of different scenarios. The following first explains the definitions of data fields, entities and relationships in the embodiment of the present application:
[0080] In the embodiment of the present application, the definition of the data field may be as follows:
[0081] The data field K is the logical area where the knowledge graph data is stored, that is, K = (N, Q, G). Among them, N represents the set of business perspectives, Q represents the set of data layers, and G represents the graph structure that constitutes the knowledge graph in the data field. G = (V, E), among which V represents the set of graph entities, referred to as the entity set, and E represents the set of graph relationships, referred to as the relationship set.
[0082] In one embodiment, Figure 2 As shown, the data field can be represented by a prism with infinite width, and the n sides of the n-prism correspond to n business viewing angles, that is, n business viewing angle planes.
[0083] Business perspectives include predefined business perspectives and empty business perspectives. The empty business perspectives are several business perspectives reserved when the graph is constructed to meet the scalability requirements of later business perspectives. Business perspective set N = {N1, N2, ..., N n}, i = {1, 2, ..., n}, wherein Ni represents the ith business perspective of the data field. It should be noted that the description of the execution steps under the business perspective in the embodiment of the present application is a description of the predefined business perspective.
[0084] In such Figure 2 In the data field shown, the bottom surface of the prism and the surface parallel to the bottom surface of the prism are called data layers, and the data layer set Q = {Q1, Q2, ..., Q m}, j = {1, 2, ..., m}, where Q j Represents the jth data layer.
[0085] In the embodiment of the present application, the definition of the entity may be as follows:
[0086] Entity is the basic component of knowledge graph. in, d represents the general attribute label of the entity, q represents the data layer attribute of the entity, ω represents the entity data, ω={(v1,v2,....,v n )|v i ∈N i},v i Indicates the entity from the business perspective i If the entity is in the business perspective N i If it is meaningless, you can use v i = indicates.
[0087] In one embodiment, Figure 3 As shown, an entity can be represented by a prism corresponding to each business perspective surface in the data field, and each side of the prism corresponds to an entity data surface, that is, each entity has multiple entity data surfaces corresponding to multiple business perspective surfaces.
[0088] In the embodiment of the present application, the definition of the relationship can be as follows:
[0089] A relationship represents a link between any two entities. The relationship τ={(θ,(ω,ω′))|ω≠ω′}, where τ∈E and θ represents the attributes of the relationship. If the relationship is meaningless from the business perspective Ni, it can be expressed as For any two entities, if there is a relationship in the data field, then there is a relationship between the entities from at least one business perspective, that is,
[0090] In one embodiment, Figure 4 As shown, it is a schematic diagram of n entity data planes of an entity and n relationship data planes of a relationship. The relationship can also be represented by a prism corresponding to each business perspective plane in the data field, and each side of the prism corresponds to a relationship data plane, that is, each relationship has multiple relationship data planes corresponding to multiple business perspective planes.
[0091] In the embodiment of the present application, through the definition of the above-mentioned entity data planes and relationship data planes, it is possible to quickly connect various types of data, thereby constructing a complex knowledge graph to meet the application needs of different scenarios.
[0092] In the above step S101, when constructing a data field composed of multiple business perspectives, it is necessary to define the business perspectives in advance. In the definition process, the division of business perspectives is generally based on the needs of the graph and the types of upper-level businesses served. For example, in the process of constructing the industry-university-research graph, since the upper-level business needs to be oriented towards a variety of industry-university-research businesses, it can be divided into three business perspectives, namely the industry perspective, the teaching perspective and the research perspective. Correspondingly, three business perspective aspects can be defined, namely the industry perspective aspect, the teaching perspective aspect and the research perspective aspect. By dividing different business perspective aspects to construct a knowledge graph, the business understanding costs of different technical R&D personnel in the actual operation process can be reduced.
[0093] In the embodiment of the present application, when constructing the data field after defining each business perspective, several empty business perspectives can be reserved to facilitate the expansion of new business perspectives.
[0094] In the above step S102, in order to facilitate technical R&D personnel to understand and build knowledge graphs and reduce the data abstraction process, entity types can be pre-defined for each pre-defined business perspective based on actual business data.
[0095] For example, in the process of constructing the industry-university-research map, industrial entities, personnel entities and industrial chain entities can be defined from the industrial perspective, research entities, achievement entities and personnel entities can be defined from the academic perspective, and educational entities, achievement entities and personnel entities can be defined from the teaching perspective.
[0096] In the above step S103, for each business perspective, after obtaining the entity type corresponding to each business data under the business perspective, the business data is imported according to the entity type defined in the business perspective, and the relationship between entities is written, that is, the business data is written to the corresponding entity data plane of the entity under the business perspective, and the corresponding relationship data plane of the relationship between entities is constructed. When each business perspective is written with business data in the above manner, the initial knowledge graph of multiple business perspectives is obtained.
[0097] In the above step S104, for each business perspective, an entity whose corresponding entity data plane is empty under the business perspective is considered to be an empty node under the business perspective, that is, an empty node refers to an entity node that is meaningless under a certain business perspective. It can also be said that an empty node is an entity whose entity data plane is empty under a pre-defined business perspective.
[0098] For example, from an academic perspective, there are three types of entity nodes: people, articles, and research directions. From an academic perspective, "Zhang San" published a paper titled "xx research based on xxxx" to study "artificial intelligence", so there are three entity nodes from an academic perspective. However, from an industrial perspective, article entities have no practical significance, so the entity node corresponding to the paper "xx research based on xxxx" is an empty node from an industrial perspective.
[0099] In the embodiment of the present application, two structural features of the transitivity of empty nodes and the blocking of empty relationships are defined for the knowledge graph structure in the data field. The definitions of the two structural features of the transitivity of empty nodes and the blocking of empty relationships in the embodiment of the present application are first explained below:
[0100] In the embodiment of the present application, the definition of the transitive structural characteristics of the empty node can be as follows:
[0101] In any business perspective, when the empty node a1 has a relationship with any two entities a2 and a3, then a2 and a3 must have a relationship in the business perspective, that is, Will This type of relationship is defined as a potential relationship. Represents the potential relationship, and defines the relationship structure composed of a1, a2 and a3 as the potential structure. This transitive structural feature can effectively retain the potential graph relationship.
[0102] For example, from an academic perspective, "Zhang San" published a paper titled "xx research based on xxxx" to study "artificial intelligence". From an industrial perspective, the entity node corresponding to the paper "xx research based on xxxx" is an empty node. From an industrial perspective, "Zhang San" is associated with "artificial intelligence" through the empty node. The relationship between "Zhang San" and "artificial intelligence" from an industrial perspective is a potential relationship.
[0103] In the embodiment of the present application, the blocking structural feature of the empty relationship can be defined as follows:
[0104] When there is a potential relationship between two entities but the potential relationship is invalid for the actual business, a blocking rule can be preset to block the potential relationship between the two entities. i , and in the preset blocking rules Then entities a1 and a2 must not have a relationship under business perspective i. This blocking feature can effectively avoid invalid data associations caused by multi-perspective mode and reduce the business understanding costs of different technical R&D personnel in actual operations.
[0105] For example, A published a paper A1 that studied X, and B published a paper B1 that also studied X. From a certain business perspective, X is an empty node. Based on the transitivity of the empty node, it can be concluded that A1 and B1 have a potential relationship. Although the two papers do have a potential relationship, it is invalid for actual business. Therefore, the blocking property of the empty relationship can be introduced. This can be done by pre-defining that there is an empty relationship between A1 and B1, that is, by pre-setting a blocking rule to block it.
[0106] In the above step S105, all empty nodes and entities having relationships with empty nodes in the data field are traversed, and the traversal may be performed in a random walk manner until all potential structures in the data field are determined.
[0107] In the prior art, knowledge graphs are generally constructed through business orientation, that is, first determine the business, and then design the graph data structure. The entire construction process is relatively complex and not very scalable. However, in the embodiment of the present application, by defining empty nodes as described above, the potential relationships that may exist between different entities are obtained, and the association graph of data is constructed based on the relevance and potential relationships of the data, that is, the knowledge graph is constructed through data orientation, which can realize the rapid construction of knowledge graphs in complex scenarios, and has strong scalability, which is not only convenient for adding new business data under the corresponding business perspective, but also for expanding new business perspectives on the empty business perspective.
[0108] In the above step S106, according to all the potential structures, before adding corresponding potential relationships to the initial knowledge graph of the multi-business perspective, the method further includes:
[0109] Determine whether each potential structure meets the preset blocking rules;
[0110] If not, adding corresponding potential relationships in the initial knowledge graph of the multi-business perspective according to the potential structure;
[0111] If so, the potential relationship is not added.
[0112] In the above step S106, when adding corresponding potential relationships according to the potential structure, it is necessary to first judge the potential structure or potential relationship. For the potential relationship pre-defined as an empty relationship in the preset blocking rule, it is not necessary to add it in the data field. Until all potential structures are processed, a knowledge graph with multiple business perspectives is finally obtained.
[0113] In the embodiment of the present application, after obtaining the knowledge graph from multiple business perspectives, operations such as adding, modifying, retrieving graph data, and retrieving graph relationships in the knowledge graph can also be performed.
[0114] Among them, Figure 5 As shown, after obtaining the knowledge graph from multiple business perspectives, graph data can be added through the following steps S201 to S205:
[0115] S201: Delete all potential relationships in the knowledge graph from multiple business perspectives to obtain the knowledge graph to be updated.
[0116] S202: According to each entity type under each business perspective in the knowledge graph to be updated, write the newly added graph data into the corresponding entity data plane of the entity, construct the corresponding relationship data plane of the relationship between the entities, and obtain the updated knowledge graph.
[0117] S203: Determine the empty nodes under each business perspective.
[0118] S204: Traverse all the empty nodes and entities having relationships with the empty nodes to determine all potential structures.
[0119] S205: According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph from the multi-business perspective to obtain a knowledge graph from the multi-business perspective after the newly added data.
[0120] In an embodiment of the present application, when adding new graph data to the constructed knowledge graph from a multi-business perspective, all potential relationships in the knowledge graph can be deleted at one time, and then the graph data to be added can be written into the entity data plane and the relationship data plane to obtain an updated knowledge graph. Then, the potential relationships determined by traversing empty nodes and entities that have relationships with empty nodes are added to the updated knowledge graph to obtain a knowledge graph from a multi-business perspective after the new data is added. The specific implementation process of the above steps S202 to S205 can refer to steps S103 to S106, which will not be repeated here.
[0121] In the embodiment of the present application, after obtaining the knowledge graph from multiple business perspectives, the graph data can also be retrieved in the following manner:
[0122] When retrieving graph data through an agreed business perspective, determine the business perspective to be retrieved, retrieve all graph data under the business perspective to be retrieved, and return the search results according to the search requirements;
[0123] When retrieving graph data from a full perspective, all graph data in the knowledge graph from multiple business perspectives are retrieved, and the search results are returned according to the search requirements.
[0124] In the embodiment of the present application, when searching for data in a knowledge graph from multiple business perspectives, whether searching for graph data or graph relationships, the search can be performed through the agreed business perspective to improve the efficiency of the search.
[0125] When retrieving graph data through an agreed business perspective, only the entity data surface under the agreed business perspective is retrieved, and the search results are returned according to the search requirements; when retrieving graph relationships through an agreed business perspective, only the relationship data surface under the agreed business perspective is retrieved, and the search results are returned according to the search requirements.
[0126] When searching graph data through the full perspective, all graph data in the entire knowledge graph from a multi-business perspective are searched, that is, all entity data surfaces of each entity are traversed, and results are returned according to the search requirements; when searching graph relationships through the full perspective, all graph relationships in the entire knowledge graph from a multi-business perspective are searched, that is, all relationship data surfaces of each relationship are traversed, and results are returned according to the search requirements.
[0127] In the embodiment of the present application, after obtaining the knowledge graph from the multi-business perspective, the graph data can also be modified. The modification can be performed in the manner of reconstructing the graph, that is, deleting all data in the data field, and then re-performing the above steps S102 to S106 to reconstruct and obtain a modified knowledge graph.
[0128] In the present application embodiment, Figure 6 As shown, after obtaining the knowledge graph from multiple business perspectives, a visual knowledge graph can also be constructed through the following steps S301 to S302:
[0129] S301: Divide data layers in the data field according to preset types of entities, and set all entities in the knowledge graph from multiple business perspectives in corresponding data layers;
[0130] S302: For each business perspective, map each entity and relationship in the data layer under the business perspective to a preset business perspective plane to obtain a visualized knowledge graph under each business perspective.
[0131] In actual business, the visualization of knowledge graphs is generally the visualization of the graph structure from a certain specific business perspective. Therefore, when constructing a visualized knowledge graph, each business perspective can be visualized separately.
[0132] In one embodiment, in order to more conveniently visualize the graph structure, data layers can be divided in the data field. The data layers can be divided according to the preset types of entities, and entities of the same type are distributed in one data layer, for example, entities of the personnel type are divided into one data layer.
[0133] When visualizing a business perspective, establish a mapping of each data layer to the business perspective. According to the number of data layers and entities, a rectangular area that can loosely accommodate all entities can be preset as the business perspective plane. All non-empty relationships and all entities under the business perspective are mapped to the preset business perspective plane, and the entity nodes are dispersed in the rectangular area according to the preset placement rules.
[0134] In one embodiment, before obtaining the visualized knowledge graph under each business perspective, the method further includes:
[0135] For each data layer, according to the set center of the ellipse, the major axis and minor axis of the ellipse are determined according to the length and width of the business perspective plane, an ellipse is drawn as the mapped data layer, and the entities are distributed on the edge of the ellipse according to the preset distance; wherein the center of the ellipse is obtained by the following method:
[0136] Draw a central auxiliary line passing through the center of gravity of the business perspective plane and perpendicular to the data layer;
[0137] Determine the intersection of the data layer and the business perspective plane;
[0138] The intersection point of the central auxiliary line and the intersection line is taken as the center of the ellipse.
[0139] Specifically, the major axis and the minor axis of the ellipse are determined according to the length and the width of the business perspective plane diagram, which can be achieved by the following steps:
[0140] The width of the business perspective plane is used as the major axis of the ellipse;
[0141] According to the length of the business perspective plane and the number of data layers divided in the data field, the minor axis of the ellipse is calculated based on the following formula: M / (K+1), where M is the length of the business perspective plane and K is the number of data layers.
[0142] For each data layer, Figure 7 As shown, the preset placement rules can be as follows:
[0143] The size of the business view plane is preset to be an M×N rectangle. The length of the K intersection lines between the K data layers and the business view plane is N, which are represented by line1, line2, …, line K Indicates that a central auxiliary line perpendicular to the data layer is drawn with the center point of the business perspective plane as the center, and the K intersection points of the central auxiliary line and the K intersection lines are recorded as ct1, ct2, ..., ct KThen, for each data layer, the corresponding intersection point is taken as the center of the ellipse, the width N of the business perspective plane is taken as the major axis length of the ellipse, and the length M of the business perspective plane divided by (K+1) is taken as the minor axis length of the ellipse to draw the ellipse, and the mapping of the data of each spatial data layer to the corresponding elliptical plane is established. Finally, the entity nodes of the data layer are distributed on the edge of the elliptical data layer according to the preset distance.
[0144] Repeat the above operation of mapping to the business perspective plane through the preset placement rules for each data layer until all entities and relationships are mapped. In order to reduce the difficulty of understanding the visual knowledge graph, the relationship distribution can also be optimized according to the relationship between multiple data layers, reducing the occurrence of relationship intersections, and finally obtaining a visual knowledge graph.
[0145] Embodiment 2
[0146] Based on the same inventive concept, the present application embodiment also provides a knowledge graph construction device for multiple business perspectives, referring to Figure 8 As shown, the device comprises:
[0147] A construction module 101 is used to construct a data field composed of multiple business perspectives; the multiple business perspectives include pre-defined business perspectives and empty business perspectives; the data field can store a graph structure constituting a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data faces corresponding to the multiple business perspectives, and each relationship in the relationship set has multiple relationship data faces corresponding to the multiple business perspectives;
[0148] An acquisition module 102, configured to acquire, in the data field, for each predefined business perspective, each entity type corresponding to each business data under the business perspective;
[0149] A writing module 103 is used to write the business data into the corresponding entity data plane of the entity according to the entity type corresponding to each business data under each business perspective plane, construct the corresponding relationship data plane of the relationship between the entities, and obtain an initial knowledge graph of multiple business perspectives;
[0150] A first determination module 104 is used to determine an empty node under each business perspective; wherein the empty node is an entity whose entity data plane under the predefined business perspective is empty;
[0151] The second determination module 105 is used to traverse all the empty nodes and entities that have a relationship with the empty nodes to determine all potential structures; the potential structure represents a structure composed of two entities that have a relationship with the empty node and the empty node under any business perspective;
[0152] The third determination module 106 is used to add corresponding potential relationships in the initial knowledge graph of the multi-business perspective according to all the potential structures to obtain a knowledge graph of the multi-business perspective; the potential relationship represents the association relationship between two entities in the potential structure that have a relationship with the empty node.
[0153] The modules 101 to 106 described above may execute the processes of steps S101 to S106 of the first embodiment, and the repetitive parts of the above processes will not be described again here.
[0154] Embodiment 3
[0155] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements the knowledge graph construction method for multiple business perspectives as described in the above embodiment one.
[0156] Embodiment 4
[0157] Based on the same inventive concept, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the knowledge graph construction method for multiple business perspectives as described in the above-mentioned embodiment 1.
[0158] Embodiment 5
[0159] Based on the same inventive concept, an embodiment of the present application also provides a computer program product comprising instructions. When the computer program product runs on a computer device, the computer device executes the knowledge graph construction method for multiple business perspectives as described in the above embodiment 1.
[0160] Embodiment 6
[0161] Based on the same inventive concept, an embodiment of the present application also provides a chip, the chip includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run computer programs or instructions to implement the knowledge graph construction method for multiple business perspectives as described in the above embodiment one.
[0162] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0163] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0166] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for constructing a knowledge graph from multiple business perspectives, characterized in that: include: Construct a data field composed of multiple business perspectives; the multiple business perspectives include pre-defined business perspectives and empty business perspectives; the data field can store a graph structure of actual business data for industry-university-research business that constitutes a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data faces corresponding to the multiple business perspectives, and each relationship in the relationship set has multiple relationship data faces corresponding to the multiple business perspectives; for each pre-defined business perspective, pre-define an entity type according to the actual business data for industry-university-research business; for any two entities, if there is a relationship in the data field, there is a relationship between the entities under at least one business perspective; In the data field, for each predefined business perspective for industry-university-research business, obtaining each entity type corresponding to each business data under the business perspective; According to the entity type corresponding to each of the business data under each of the business perspectives for the industry-university-research business, the business data is written into the corresponding entity data plane of the entity, and the corresponding relationship data plane of the relationship between the entities is constructed to obtain an initial knowledge graph of multiple business perspectives for the industry-university-research business; the entity types include industry entities, personnel entities and industrial chain entities defined in the industry perspective, research entities, achievement entities and personnel entities defined in the academic perspective, and education entities, achievement entities and personnel entities defined in the teaching perspective; For each business perspective of the industry-university-research business, determine an entity whose corresponding entity data plane is empty under the business perspective as an empty node; wherein the empty node is an entity whose entity data plane is empty under the predefined business perspective; Traversing all the empty nodes and entities that have a relationship with the empty nodes, if under any business perspective, the empty node has a relationship with any two entities whose corresponding entity data planes are not empty, then determining the structure composed of the two entities and the empty node as a potential structure, and determining all potential structures; the potential structure represents a structure composed of the two entities that have a relationship with the empty node and the empty node under any business perspective; According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph of the multi-business perspective oriented towards industry-university-research business to obtain a knowledge graph of the multi-business perspective oriented towards industry-university-research business; the potential relationship represents the association relationship between two entities in the potential structure that have a relationship with the empty node.
2. The method according to claim 1, characterized in that According to all the potential structures, before adding corresponding potential relationships to the initial knowledge graph of the multi-business perspective for industry-university-research business, the method further includes: Determine whether each potential structure meets the preset blocking rules; If not, then according to the potential structure, the corresponding potential relationship is added to the initial knowledge graph of the multi-business perspective for industry-university-research business.
3. The method according to claim 1, characterized in that Also includes: After obtaining the multi-business perspective knowledge graph for industry-university-research business, add graph data in the following ways: Deleting all potential relationships in the knowledge graph from the multi-business perspective of industry-university-research business to obtain the knowledge graph to be updated; According to each entity type under each business perspective in the knowledge graph to be updated, the newly added graph data is written into the corresponding entity data plane of the entity, and the corresponding relationship data plane of the relationship between the entities is constructed to obtain the updated knowledge graph; Determine the empty nodes under each business perspective; Traversing all the empty nodes and entities having relationships with the empty nodes to determine all potential structures; According to all the potential structures, corresponding potential relationships are added to the initial knowledge graph from the multi-business perspective to obtain a knowledge graph from the multi-business perspective for industry-university-research business after the newly added data.
4. The method according to claim 1, characterized in that Also includes: After obtaining the multi-business perspective knowledge graph for industry-university-research business, the graph data is retrieved in the following way: When retrieving graph data through an agreed business perspective, determine the business perspective to be retrieved, retrieve all graph data under the business perspective to be retrieved, and return the search results according to the search requirements; When retrieving graph data from a full perspective, all graph data in the knowledge graph from multiple business perspectives are retrieved, and the search results are returned according to the search requirements.
5. The method according to claim 1, characterized in that Also includes: After obtaining the knowledge graph from multiple business perspectives, a visual knowledge graph is constructed in the following way: Dividing data layers in the data field according to preset types of entities, and setting all entities in the knowledge graph from multiple business perspectives in corresponding data layers; For each business perspective, each entity and relationship in the data layer under the business perspective is mapped to a preset business perspective plane to obtain a visualized knowledge graph under each business perspective.
6. The method according to claim 5, characterized in that Before obtaining the visual knowledge graph for each business perspective, it also includes: For each data layer, according to the set center of the ellipse, the major axis and the minor axis of the ellipse are determined according to the length and width of the business perspective plane, an ellipse is drawn as the mapped data layer, and entities are distributed and arranged on the edge of the ellipse according to a preset distance; wherein the center of the ellipse is obtained by the following method: Draw a central auxiliary line passing through the center of gravity of the business perspective plane and perpendicular to the data layer; Determining the intersection line between the data layer and the business perspective plane map; The intersection point of the central auxiliary line and the intersection line is taken as the center of the ellipse.
7. A knowledge graph construction device for multiple business perspectives, characterized in that: include: A construction module is used to construct a data field composed of multiple business perspectives; the multiple business perspectives include pre-defined business perspectives and empty business perspectives; the data field can store a graph structure of actual business data for industry-university-research business that constitutes a knowledge graph, wherein the graph structure includes an entity set and a relationship set, each entity in the entity set has multiple entity data faces corresponding to the multiple business perspectives, and each relationship in the relationship set has multiple relationship data faces corresponding to the multiple business perspectives; for each pre-defined business perspective, an entity type is pre-defined according to the actual business data for industry-university-research business; for any two entities, if there is a relationship in the data field, there is a relationship between the entities under at least one business perspective; An acquisition module, used for acquiring, in the data field, for each predefined business perspective for industry-university-research business, each entity type corresponding to each business data under the business perspective; A writing module is used to write the business data into the corresponding entity data plane of the entity according to the entity type corresponding to each business data under each business perspective plane for industry-university-research business, construct the corresponding relationship data plane of the relationship between entities, and obtain the initial knowledge graph of multiple business perspectives for industry-university-research business; the entity types include industry entities, personnel entities and industrial chain entities defined in the industry perspective plane, research entities, achievement entities and personnel entities defined in the academic perspective plane, and education entities, achievement entities and personnel entities defined in the teaching perspective plane; A first determination module is used to determine, for each business perspective facet facing the industry-university-research business, an entity whose corresponding entity data facet is empty under the business perspective facet as an empty node; wherein the empty node is an entity whose entity data facet is empty under the predefined business perspective facet; A second determination module is used to traverse all the empty nodes and entities that have a relationship with the empty nodes. If, under any business perspective, the empty node has a relationship with any two entities whose corresponding entity data planes are not empty, then determine that the structure composed of the two entities and the empty node is a potential structure, and determine all potential structures; the potential structure represents a structure composed of the two entities that have a relationship with the empty node and the empty node under any business perspective; The third determination module is used to add corresponding potential relationships in the initial knowledge graph of the multi-business perspective oriented towards industry-university-research business according to all the potential structures, so as to obtain a knowledge graph of the multi-business perspective oriented towards industry-university-research business; the potential relationship represents the association relationship between two entities in the potential structure that have a relationship with the empty node.
8. A computer-readable storage medium, in which a computer program is stored. When the program is executed by a processor, the processor executes the method for constructing a knowledge graph from a multi-business perspective as described in any one of claims 1 to 6.
9. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the knowledge graph construction method for multiple business perspectives as described in any one of claims 1 to 6.
10. A computer program product comprising instructions, which, when executed on a computer device, enables the computer device to execute the method for constructing a knowledge graph from a multi-business perspective as described in any one of claims 1 to 6.
