A knowledge graph hypergraph visualization method

By mapping the triple data of the knowledge graph to the hypergraph model, the hypergraph method solves the problem of entity point display in the existing technology, realizes the uniform distribution of entity points and clear display of relationships, and solves the visualization difficulties when the number of entities is large and the relationships are complex.

CN115905631BActive Publication Date: 2026-07-03SUZHOU AEROSPACE INFORMATION RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU AEROSPACE INFORMATION RES INST
Filing Date
2022-12-09
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

When dealing with a large number of entities and complex relationships, existing knowledge graph platforms often suffer from convergence of points and lines due to conventional graph visualization methods, making it difficult to provide a clear display of information.

Method used

The hypergraph visualization method based on knowledge graphs is adopted to map triple data into a hypergraph model, use hyperedges to represent relationships, and achieve the aggregation of entity points and clear display of relationships by constructing a two-dimensional planar bounded region and a uniform distribution model of entity points.

Benefits of technology

It solves the problem of point-line convergence in ordinary graph visualization, and achieves uniform distribution of entity points and convergence of entity points with similar relationships into the same area, providing a clear visualization effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905631B_ABST
    Figure CN115905631B_ABST
Patent Text Reader

Abstract

This invention discloses a hypergraph visualization method for knowledge graphs. It constructs knowledge graph triples and a knowledge graph hypergraph model, using targets in network attacks as entities and subordinate information as relations. A general knowledge graph based on triple data is constructed, mapping all nodes of the knowledge graph triple relations to a set of entity points in the hypergraph. All relations of the knowledge graph triple relations are mapped to hyperedges of the hypergraph according to their categories. Simultaneously, entities containing a relation are placed within the hyperedge, with the relation as the core. A two-dimensional planar bounded region entity point uniform distribution model is constructed, converging entity points with similar orders of relation at one point, resulting in a knowledge hypergraph model with circular hyperedges for visualization. This invention solves the problem of large-scale point and line aggregation in the visualization model of ordinary graphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graphs, and more specifically to a hypergraph visualization method for knowledge graphs. Background Technology

[0002] Knowledge graph (KG) is a technology proposed by Google in 2012 to enhance its search engine. Its initial purpose was to deepen the connection between search and display, giving Google's search results a complete knowledge system. Based on the concept of semantic networks, knowledge graphs enhance the relationships between entities, visualizing these connections. They possess powerful knowledge representation and reasoning capabilities, connecting different nodes within knowledge ontologies based on their existing relationships to form a standardized, shared format that clearly and thoroughly represents knowledge in a machine-readable way.

[0003] Knowledge graphs typically represent knowledge information using a triple structure <h, r, e>, where h and e are entities in the knowledge graph, and r is a relation. The construction of a knowledge graph involves extracting knowledge information from unstructured text, formally representing it as structured knowledge, and then fusing the knowledge to generate a visualized knowledge graph. Knowledge extraction allows for the identification and representation of knowledge information from specific text data, and the effective storage of knowledge through graph construction rules generates a rich, structured semantic knowledge base.

[0004] Existing knowledge graph platforms typically use a standard graph visualization method for node and relationship visualization. Each entity is represented by a node, and other entity nodes are connected by straight lines, with the relationship category indicated on the lines. This standard graph visualization method is very practical when dealing with a small number of entities and simple relationships. However, when the number of entities is too large and the relationships between entities are complex (especially hierarchical relationships), standard graph visualization results in a large number of points and lines converging, making it difficult to provide users with clear information. At the same time, hierarchical relationships require entity jumps to display entities and relationships. Summary of the Invention

[0005] The purpose of this invention is to propose a hypergraph visualization method for knowledge graphs to address the shortcomings of ordinary graph visualization when the number of entities is too large and the relationships between entities are complex (especially hierarchical relationships).

[0006] The technical solution to achieve the purpose of this invention is: a hypergraph visualization method for knowledge graphs, which uses the knowledge hypergraph visualization method to visualize network attack activities, including the following steps:

[0007] Step 1: Construct knowledge graph triples and knowledge graph hypergraph models. Using the target in the network attack as the entity and subordinate information as the relation, construct a general knowledge graph under the triple data. Map all nodes of the knowledge graph triple relation to the hypergraph entity point set. Map all relations of the knowledge graph triple relation to the hypergraph hyperedge according to the type. At the same time, put the entity containing the relation into the hyperedge with the relation as the core.

[0008] Step 2: Construct a two-dimensional planar bounded region entity point uniform distribution model, gather entity points with similar relationships of order k in one place, and obtain a knowledge hypergraph model with a circle as the hyperedge for visualization.

[0009] Further, in step 1, construct the knowledge graph triples and the knowledge graph hypergraph model. Map all nodes of the knowledge graph triple relations to the hypergraph entity point set, and map all relations of the knowledge graph triple relations to hyperedges of the hypergraph according to their types. At the same time, with the relation as the core, place the entities containing the relation into the hyperedges. The specific method is as follows:

[0010] 1) Constructing the triplet data <h,r,e> for the knowledge graph:

[0011]

[0012] Where name is the name of the entity or relation, id is the sequence number of the entity or relation, which is unique in the data, that is, the id of the same node is unique, the id of the same relation is unique, m is the number of relations, n is the total number of entities, and h, r, e refer to all data [h i ,r i-j ,h j A set of entities, where h and e are two different entities from an entity database, denoted by h and e to distinguish them. i ,r i-j ,h j The description information is that entity i is linked to entity r. i-j The down pointer points to entity j;

[0013] 2) Construct the hypergraph H = (V, E):

[0014]

[0015] Where: V is the set of entity points in the hypergraph, with the number of entity points being the same as the number of mapping triples, which is n; E is the set of hyperedges, with the number of hyperedges being the same as the number of mapping triple relations, which is m; and the i-th data in the hypergraph is specifically represented as:

[0016]

[0017] Where: x i ,y iLet eV be the coordinates of the i-th entity point. i Let eL be the set of the i-th hyperedge. i Let i be the equation of the i-th hyperedge;

[0018] Hyperedge set: A set of entities containing a certain relation is enclosed by a hyperedge, forming a class of entities. Mathematically, it is represented as:

[0019] eV i ={v1,v2,…,v k}(4)

[0020] Hyperedge equation: In 2D visualization, hyperedges on the plane are represented by curve equations. The curve equation of the i-th hyperedge is expressed as:

[0021] eL i (x,y)=f eLi (x,y)(5)

[0022] Accordingly, all nodes of the knowledge graph ternary relation are mapped to the set of entity points in the hypergraph, all relations of the knowledge graph ternary relation are mapped to the hyperedges of the hypergraph according to their types, and entities containing the relation are placed in the hyperedges with the relation as the core. Finally, two-dimensional coordinates are added to the entity points of the hypergraph, and curve equations are assigned to the hyperedges.

[0023] 3) Hypergraph model constraints:

[0024] Constraint 1: Hyperedges must exist and contain at least one entity point, i.e., the set of hyperedges cannot be empty;

[0025]

[0026] Constraint 2: All hyperedges must contain all entity points of the knowledge graph triple data, that is, the entity point mapping must be all entities;

[0027]

[0028] Constraint 3: The curve equation of the hyperedge is a closed convex smooth curve;

[0029]

[0030] Further, in step 2, a uniformly distributed model of entity points in a two-dimensional planar bounded region is constructed. Entity points with similar relationships of order k are grouped together to obtain a knowledge hypergraph with a circle as the hyperedge, which is then visualized. The specific method is as follows:

[0031] Step 2.1: Construct a uniformly distributed model of entity points in a two-dimensional planar bounded region;

[0032] In a two-dimensional plane, there is a bounded region P, and a point p within that region. j(x, y), the set of points is as follows:

[0033] P = {p1(x,y),p2(x,y),…,p} j (x,y),…,p n (x,y)}(9)

[0034] In a two-dimensional plane, for a point within a bounded region P, the random variables X and Y with respect to the x and y coordinates are:

[0035]

[0036] x pi y pi (i = 1, ..., n) represents the coordinates of a point within a bounded region P, and n is the number of entity points;

[0037] The above two-dimensional bounded region P contains n points. If the area of ​​the bounded region P is A, and the joint probability density function of the random variables X and Y of the x and y coordinates of the n points is:

[0038]

[0039] Then the n points are uniformly distributed in the two-dimensional bounded region P;

[0040] Step 2.2: When visualizing entities with a proximity relationship of order k, they need to be grouped together in one place, and the proximity relationship of the entities is represented by the distance ratio between the points.

[0041] The set of entity points {v1, v2, ..., v} with jump relationships k In the context of}, the mathematical representation of the order proximity relationship between any two entity points is as follows:

[0042]

[0043] Where r ij For entity point v i and v j The similarity correlation coefficient is calculated as follows: from entity point v i The superedge eV i Starting from r nearest hyperedges, finally reaching hyperedge eV. j Super-edge eV j Contains entity point v j When entity point v i and v j When there are multiple similar hyperedge numbers, the minimum value is taken as the similarity relation number between the two entity points;

[0044] The distance between entity points is directly proportional to the proximity coefficient between them. The smaller the proximity coefficient, the smaller the distance between the two entities, and the more convergent the entity points. Let parameter d0 represent the optimal unit distance for visualization. Then, in two-dimensional visualization, entity point v i ={name i ,id i ,x i ,y i} and v j ={name j ,id j ,x j ,y j The convergence distance between them is:

[0045] dr i,j =r ij *d0(13)

[0046] The two-dimensional visualization distance of the entity point is:

[0047]

[0048] The convergence distance between two points is a critical value for the actual two-dimensional visualization distance, satisfying the following constraints:

[0049] d i,j ≥dr i,j (15)

[0050] Step 2.3: Construct a knowledge hypergraph with circle hyperedges;

[0051] Assuming the two-dimensional planar hyperedge model is a circle, the knowledge hypergraph hyperedge model is as follows:

[0052] e i L(x,y)=(xx i ) 2 +(yy i ) 2 -R i 2 (16)

[0053] Clearly, the hyperedge model is a closed convex smooth curve, and the parameters of the circle model are:

[0054] o i ={x i ,y i ,R i}, i = 1, 2, ..., m (17)

[0055] Where x i y i and R i Let x be the x-coordinate of the center, y-coordinate of the center, and radius of the i-th hypercircle;

[0056] For the superedge e i (i=1,2,…,m)={v1,v2,…,v g ,…,v G The distance from the point to the superedge is:

[0057]

[0058] After visualization, all entity points are within the hyperedge of the knowledge hypergraph.

[0059]

[0060] The objective function of the knowledge hypergraph for the hyperedge-circle model

[0061]

[0062] in, The average convergence metric from entity points to hyperedges. The average proximity measure between entity points is as follows:

[0063]

[0064] α-hypergraph convergence weight parameters, β-hypergraph proximity relation parameters.

[0065] A hypergraph visualization system for knowledge graphs, based on the aforementioned hypergraph visualization method for knowledge graphs, realizes hypergraph visualization of knowledge graphs.

[0066] A computer device 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 performs hypergraph visualization of the knowledge graph based on the aforementioned hypergraph visualization method.

[0067] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it realizes the hypergraph visualization of a knowledge graph based on the aforementioned hypergraph visualization method.

[0068] Compared with existing technologies, the significant advantages of this invention are: 1) By mapping the triples <h,r,e> of the knowledge graph to a hypergraph H=(V,E), a hypergraph visualization model is formed, providing a hypergraph-based visualization model for knowledge graphs and solving the problem of large-scale point and line convergence in the visualization model of ordinary graphs. 2) A method for uniform distribution and convergence of entity points is proposed. When constructing a knowledge hypergraph with circular hyperedges, this method enables entity points to be uniformly distributed in a two-dimensional plane, allowing entity points with similar relationships to be close in distance after visualization, and entity points with the same relationship to converge in the same region. Attached Figure Description

[0069] Figure 1 Flowchart of a knowledge hypergraph visualization method based on uniform distribution and convergence of entity points to construct hyperedges as circles

[0070] Figure 2 It is a knowledge graph visualization diagram that implements the common graph model of use cases.

[0071] Figure 3 It is a knowledge graph visualization of the implementation use case hypergraph model. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0073] A hypergraph visualization model for knowledge graphs includes two stages:

[0074] Phase 1 maps the triples <h,r,e> of the knowledge graph to a hypergraph H=(V,E), forming a knowledge hypergraph visualization model. This provides a hypergraph-based visualization model for knowledge graphs and solves the problem of excessive point and line convergence in ordinary graph visualization models. The innovation of this step is that it proposes a mapping method from a triple data model to a hypergraph model. This mapping method effectively transforms the knowledge data structure, enriches the knowledge graph model data structure, and provides a new data structure for knowledge graph hypergraph visualization. The specific operation process includes:

[0075] a) Represent the knowledge graph triplet model using a mathematical model;

[0076] b) Represent the knowledge graph hypergraph model using a mathematical model;

[0077] c) Mapping between the knowledge graph triplet model and the knowledge graph hypergraph model: node-entity point mapping, relation-hyperedge mapping;

[0078] d) Construction of mathematical constraint equations for the generation of hyperedges in the knowledge graph hypergraph model;

[0079] Phase 2 constructs a knowledge hypergraph with circular hyperedges based on a method for uniform distribution and aggregation of entity points. This enables the visualization of the knowledge graph hypergraph to show that entities with similar relationships are grouped by distance, and entities with the same relationship are grouped into the same region. The innovation of this step is: it proposes a method for constructing a hypergraph with circular hyperedges. This method effectively achieves uniform distribution of entity points in knowledge graph visualization and effectively achieves aggregation of entity points with the same features. It provides a construction method for knowledge graph hypergraph visualization and implements the constraint relationship between uniform distribution and aggregation of entity points. The specific operation process includes:

[0080] a) The coordinates of points in a two-dimensional bounded region are uniformly distributed and satisfy a two-dimensional uniform joint probability distribution.

[0081] b) Convergence rules for entities with similar relationships: Convergence distance constraints based on the similarity relationships of entity points;

[0082] c) Construct a mathematical model of the knowledge hypergraph with circle hyperedges, including the objective function and constraints;

[0083] 1. The process of mapping the triples <h,r,e> of the knowledge graph in Stage 1 to the hypergraph model H=(V,E) is as follows:

[0084] In Phase 1, the triples <h,r,e> of the knowledge graph are mapped to a hypergraph H=(V,E) to form a hypergraph visualization model. This hypergraph visualization model is used to solve the problem of a large number of points and lines converging in the visualization model of ordinary graphs.

[0085] Step 1: Operation objects: Mathematical representation of knowledge graph triple model and knowledge graph hypergraph model

[0086] 1) Triple data for constructing knowledge graphs <h,r,e>:

[0087]

[0088] Where name is the name of the entity or relation, id is the sequence number of the entity or relation, which is unique in the data, that is, the id of the same node is unique, the id of the same relation is unique, m is the number of relations, n is the total number of entities, and h, r, e generally refer to all data [h i ,r i-j ,h j A set of entities, where h and e are two different entities from an entity database, denoted by h and e to distinguish them. i ,r i-j ,h j The description information is that entity i is linked to entity r. i-j The down pointer points to entity j;

[0089] 2) Mathematical representation of the knowledge hypergraph model: H = (V, E):

[0090]

[0091] Where: V is the set of entity points in the hypergraph, with the number of entity points being the same as the number of mapping triples, which is n; E is the set of hyperedges, with the number of hyperedges being the same as the number of mapping triple relations, which is m; and the i-th data in the hypergraph is specifically represented as:

[0092]

[0093] Where: x i ,y i Let eV be the coordinates of the i-th entity point. i Let eL be the set of the i-th hyperedge. i Let be the equation of the i-th hyperedge.

[0094] Hyperedge set: A set of entities containing a certain relation is enclosed by a hyperedge, forming a class of entities. Mathematically, it is represented as:

[0095] eV i ={v1,v2,…,v k}(4)

[0096] Hyperedge equation: In 2D visualization, hyperedges on the plane are represented by curve equations. The curve equation of the i-th hyperedge is expressed as:

[0097] eL i (x,y)=f eLi (x,y)(5)

[0098] Step 2: Operational methods and results: Mapping method between knowledge graph triple model and knowledge graph hypergraph model

[0099] 1) Node-to-entity point mapping

[0100] Map all nodes of the knowledge graph ternary relation to the hypergraph entity point set:

[0101] The triple data <h,r,e> of the knowledge graph are used to count the different entity points to form an entity point set: {s1,s2,…,s i ,…,s n};

[0102] Map the set of entity points to the set of entity points V of the knowledge hypergraph model in the order of the points;

[0103] Operation result: Generate 2D coordinates of hypergraph entity points

[0104] First, randomly generate different coordinate points on the two-dimensional canvas, and assign initial coordinate points to the hypergraph entity point set V.

[0105] 2) Relationship-Hyperedge Mapping

[0106] Map all relations of the knowledge graph's ternary relations to hyperedges of the hypergraph according to their categories:

[0107] The triple data <h,r,e> in the knowledge graph are used to form a relation set: {r1,r2,…,r i ,…,r m};

[0108] Map the relation sets to the hypergraph relation set E = {e1, e2, ..., e} in the knowledge hypergraph model according to the order of relation importance. i ,…,e m};

[0109] Operation result: Generate hyperedge curve equation:

[0110] On a 2D canvas, assign an initial closed curve to the hypergraph relation according to the selected hyperedge curve equation (hyperedge model).

[0111] The above operational methods and results can be summarized as follows: all nodes of the knowledge graph ternary relation are mapped to the set of entity points in the hypergraph; all relations of the knowledge graph ternary relation are mapped to the hyperedges of the hypergraph according to their types; at the same time, entities containing the relation are placed in the hyperedges with the relation as the core; finally, two-dimensional coordinates are added to the entity points of the hypergraph, and curve equations are assigned to the hyperedges.

[0112] Step 3: Operational Constraints: Constraints on the Knowledge Graph Hypergraph Model

[0113] Step 3.1: The hyperedge must exist and contain at least one entity point, meaning the set of hyperedges cannot be empty.

[0114]

[0115] Step 3.2: All hyperedges must contain all entity points of the knowledge graph triple data; that is, the entity point mapping must be all entities.

[0116]

[0117] Step 3.3: In 2D visualization, the hyperedge on the plane is represented by a curve equation, which is a closed convex smooth curve:

[0118]

[0119] 2. The process of constructing a knowledge hypergraph model with circle hyperedges in Stage 2 based on a method of uniform distribution and convergence of entity points is as follows:

[0120] The flowchart of a knowledge hypergraph visualization method based on uniform distribution and convergence of entity points is shown below. Figure 3 As shown, the main components include step 1, a two-dimensional planar bounded region point uniform distribution model; step 2, a method for converging similar entity points; and step 3, a knowledge hypergraph that constructs a hyperedge-circle model.

[0121] Step 1: Uniform distribution model of solid points in a two-dimensional planar bounded region

[0122] In practical engineering, when visualizing hyperedges composed of a large number of entity points and their complex relationships in a two-dimensional plane, to avoid the problem of a large number of points converging, it is necessary to ensure that the nodes representing entity points are evenly distributed in the two-dimensional plane. The specific implementation method is as follows:

[0123] Step 1.1 Set of entity points in a two-dimensional planar bounded region

[0124] In a two-dimensional plane, there is a bounded region P, and a point p within that region. j (x, y), the set of points is as follows:

[0125] P = {p1(x,y),p2(x,y),…,p} j (x,y),…,p n (x,y)}(9)

[0126] In a two-dimensional plane, for a point within a bounded region P, the random variables X and Y with respect to the x and y coordinates are:

[0127]

[0128] Step 1.2 Uniform distribution of points in a two-dimensional planar bounded region

[0129] The above two-dimensional bounded region P contains n points, and the area of ​​the bounded region P is A. The joint probability density function of the random variables X and Y of the x and y coordinates of the n points is:

[0130]

[0131] Then the n points are uniformly distributed in the two-dimensional bounded region P.

[0132] Step 2: Method for converging entities with similar relationships

[0133] In knowledge graphs of ordinary graph models, the jump order method is used to realize the mathematical expression of the hierarchical relationship between entities. However, knowledge hypergraphs directly display entities and their relationships to users. When visualizing tender documents, entity points with k-order similarity relationships need to be gathered in one place, that is, the number of similarity relationships between entities is represented by the distance ratio between the points.

[0134] Step 2.1: Number of proximity relationships between entity points

[0135] The set of entity points {v1, v2, ..., v} with jump relationships k In the context of}, the mathematical representation of the order proximity relationship between any two entity points is as follows:

[0136]

[0137] Where r ij For entity point v i and v j The similarity correlation coefficient is calculated as follows: from entity point v i The superedge eV i Starting from r nearest hyperedges, finally reaching hyperedge eV. j Super-edge eV j Contains entity point v j When entity point v i and v j When there are multiple similar hyperedge numbers, the minimum value is taken as the similarity relation number between the two entity points.

[0138] Step 2.2: Distance between entity points

[0139] The distance between entity points is directly proportional to the proximity coefficient between them. The smaller the proximity coefficient, the smaller the distance between the two entities, and the more convergent the entity points. The parameter d0 represents the optimal unit distance for visualization. Therefore, in 2D visualization, entity point v i ={name i ,id i ,x i ,y i} and v j ={name j ,id j ,x j ,y j The convergence distance between them is:

[0140] dr i,j =r ij *d0 (13)

[0141] The two-dimensional visualization distance of the entity point is:

[0142]

[0143] Because data errors are significant in practice, making the convergence distance equal to the 2D visualization distance would impose too strong a constraint on the model, potentially causing the algorithm to fail to converge. Generally, the convergence distance between two points is considered the critical value of the actual 2D visualization distance, meaning that the following constraint must be satisfied:

[0144] d i,j ≥dr i,j (15)

[0145] Step 3: Knowledge Hypergraph of the Hyperedge-Circle Model

[0146] Step 3.1: Define the 2D planar hyperedge model as a circle. The knowledge hypergraph hyperedge model is as follows:

[0147] e i L(x,y)=(xx i ) 2 +(yy i ) 2 -R i 2 (16)

[0148] Clearly, the hyperedge model satisfies Formula 8 and is a closed convex smooth curve. The parameters of the circular model are:

[0149] o i ={x i ,y i ,R i}, i = 1, 2, ..., m (17)

[0150] Where x i y i and R i Let x be the x-coordinate of the center of the i-th hypercircle, y be the x-coordinate of the center, and y be the radius.

[0151] Step 3.2: Distance from a point inside the same hyperedge to the hyperedge.

[0152] For the superedge e i (i=1,2,…,m)={v1,v2,…,v g ,…,v G The distance from the point to the superedge is:

[0153]

[0154] Step 3.3: Constraints on points within hyperedges: After visualization, all entity points are within the hyperedges of the knowledge hypergraph.

[0155]

[0156] Step 3.4: Objective function of the hypergraph model

[0157]

[0158] in, The average convergence metric from entity points to hyperedges. The average proximity measure between entity points is as follows:

[0159]

[0160] α-hypergraph convergence weight parameters, β-hypergraph proximity relation parameters.

[0161] Through Phase 1 and Phase 2, a knowledge hypergraph model with circle hyperedges is constructed from a general knowledge graph model.

[0162] Example

[0163] To verify the effectiveness of the present invention, the following experiment was conducted.

[0164] Use case: Select 10 attackers as entities in a cyberattack campaign and choose 4 commonly used relationships (refer to the definition of cyber intelligence threat entities and their relationships in the OpenCTI white paper).

[0165] The entity IDs {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} represent attack_pattern, campaign, malware, course_of_action, domain_name, intrusion_set, identity, ipv4_addr, location, and url, respectively.

[0166] r1, r2, r3, and r4 represent four types of relations: created_by, target, source, and object_marking, respectively.

[0167] Typical attack campaign data (in JSON format) looks like this:

[0168]

[0169]

[0170] In Phase 1, the triples <h,r,e> of the knowledge graph are mapped to a hypergraph H=(V,E), forming the results of each step in the hypergraph visualization model.

[0171] Step 1 Result:

[0172] The triplet <h,r,e> data structure of the use case knowledge graph is as follows:

[0173]

[0174] The knowledge graph visualization results of the above implementation use case ordinary graph model are as follows: Figure 2 As shown.

[0175] The hypergraph H = (V, E) data structure of the use case knowledge graph is as follows:

[0176]

[0177] The set of superedges is:

[0178]

[0179] The hyperedge equation is:

[0180] eL1(x,y)=f eL1 (x,y)=(x) 2 +(y) 2 -4(25)

[0181] eL2(x,y)=f eL2 (x,y)=(x-0.5) 2 +(y-4) 2 -16

[0182] eL3(x,y)=f eL3 (x,y)=(x-2) 2 +(y-1.5) 2 -12.25

[0183] eL4(x,y)=f eL4 (x,y)=(x-4.5) 2 +(y-4) 2 -4

[0184] Step 2 Results

[0185] Operational method: Mapping method between knowledge graph triple model and knowledge graph hypergraph model

[0186] 1) Node-to-entity point mapping

[0187] Map all nodes of the knowledge graph ternary relation to the hypergraph entity point set:

[0188] Triples in a use case knowledge graph<h,r,e> The data structure is mapped to the set of hypergraph entity points as follows: V

[0189] Operation result: Generated 2D coordinates of hypergraph entity points: Randomly generated coordinates of 10 points from V = {1,2,3,4,5,6,7,8,9,10}

[0190] 2) Relationship-Hyperedge Mapping

[0191] Map all the relationships of the triple relationships in the knowledge graph to the hyperedges of the hypergraph according to the types:

[0192] The triple <h, r, e> data structure of the use case knowledge graph is mapped to the hypergraph relationship set as: E = {e1, e2, e3, e4}

[0193] Operation result: Generate the hyperedge curve equation: The selected model is the circle model, and the final hyperedge curve equation is shown in Formula 25;

[0194] Result of Step 3

[0195] Step 3.1: The hyperedge must exist and contain at least one entity point, that is, the hyperedge set cannot be empty:

[0196]

[0197] Step 3.2: All hyperedges must contain all the entity points of the knowledge graph triple data, that is, the entity point mapping must be all entities:

[0198] eV1 ∪ eV2 ∪ eV3 ∪ eV4 = V (27)

[0199] Step 3.3: In two-dimensional visualization, represent the hyperedge on the plane with a curve equation, and the curve equation is a closed convex smooth curve:

[0200]

[0201] 2. Results of each step of constructing a knowledge hypergraph with a circle model as the hyperedge based on a method of uniform distribution of entity points and aggregation of entity points in Phase 2

[0202] Result of uniform distribution of entity points in a bounded region of the two-dimensional plane in Step 1

[0203] Step 1.1 Set of entity points in a bounded region of the two-dimensional plane

[0204] The use case has 4 bounded regions:

[0205] (1) The bounded region P is the point set of eV1 = {1, 2, 7} as follows:

[0206] P = {p1(-0.1, 1.0), p2(0.8, -0.7), p7(-1, -1)} (29) Then in the two-dimensional plane, for a point in a bounded region, the random variables X and Y for the horizontal and vertical coordinates are:

[0207]

[0208] Result of uniform distribution of points in the bounded region of the two-dimensional plane of this bounded region:

[0209] The joint probability density function of the random variables X and Y with x and y coordinates of points within the region is:

[0210]

[0211] Then the points within the region are uniformly distributed in the two-dimensional bounded region P.

[0212] (2) The bounded region P is the set of points eV2={1,4,5,8,9,10} as follows:

[0213]

[0214] In a two-dimensional plane, for a point within a bounded region, the random variables X and Y with respect to the x and y coordinates are:

[0215]

[0216] The result of uniform point distribution in the two-dimensional planar bounded region is as follows:

[0217] The joint probability density function of the random variables X and Y with x and y coordinates of points within the region is:

[0218]

[0219] Then the points within the region are uniformly distributed in the two-dimensional bounded region P.

[0220] (3) The bounded region P is a set of points eV3 = {1, 2, 3, 5, 9} as follows:

[0221]

[0222] In a two-dimensional plane, for a point within a bounded region, the random variables X and Y with respect to the x and y coordinates are:

[0223]

[0224] The result of uniform point distribution in the two-dimensional planar bounded region is as follows:

[0225] The joint probability density function of the random variables X and Y with x and y coordinates of points within the region is:

[0226]

[0227] Then the points within the region are uniformly distributed in the two-dimensional bounded region P.

[0228] (4) The bounded region P is the set of points eV4 = {5, 6, 10} as follows:

[0229] P={p5(3.6,3.4),p6(5.5,4.4),p 10 (3.5,5.1)} (38)

[0230] In a two-dimensional plane, for a point within a bounded region, the random variables X and Y with respect to the x and y coordinates are:

[0231]

[0232] The result of uniform point distribution in the two-dimensional planar bounded region is as follows:

[0233] The joint probability density function of the random variables X and Y with x and y coordinates of points within the region is:

[0234]

[0235] Then the points within the region are uniformly distributed in the two-dimensional bounded region P.

[0236] Step 2: Method for converging entities with similar relationships

[0237] Step 2.1: Number of proximity relationships between entity points: The number of proximity relationships between entity points in the use case is shown in Table 1.

[0238] Table 1. Similarity Relationship Table

[0239] 1 2 3 4 5 6 7 8 9 10 1 1 1 1 1 2 1 1 1 2 2 1 2 1 2 1 2 1 2 3 2 1 2 2 2 1 2 4 1 2 2 1 1 1 5 1 3 1 1 1 6 3 2 2 1 7 2 2 3 8 1 1 9 1 10

[0240] Step 2.2: Distance between entity points

[0241] For 2D visualization of entity point distances in use cases, see the 2D visualization distance table for entity points.

[0242]

[0243]

[0244] Due to significant data errors in practice, the convergence distance and the 2D visualization distance cannot be perfectly equal. It is generally considered that the convergence distance between two points is the critical value for the actual 2D visualization distance, and the optimal unit distance for visualization is taken as 2.0: that is, satisfying the following constraints:

[0245] d i,j ≥dr i,j (41)

[0246] Step 3: Knowledge Hypergraph of the Hyperedge-Circle Model

[0247] Step 3.1: Define the 2D planar hyperedge model as a circle, and the use case knowledge hypergraph hyperedge model is as shown in Formula 25:

[0248] Step 3.2: Distance from a point inside the same hyperedge to the hyperedge.

[0249] Given a set of hyperedges eV1 = {1, 2, 7}, the distances from each vertex to the hyperedge are:

[0250]

[0251] Given the set of hyperedges eV2 = {1, 4, 5, 8, 9, 10}, the distances from each vertex to the hyperedge are:

[0252]

[0253] Given the set of hyperedges eV3 = {1, 2, 3, 5, 9}, the distances from each vertex to the hyperedge are:

[0254]

[0255] Given the set of hyperedges eV4 = {5, 6, 10}, the distances from each vertex to the hyperedges are:

[0256]

[0257] Step 3.3: Constraints on points within hyperedges: After visualization, all use case entity points are within the hyperedges of the knowledge hypergraph.

[0258]

[0259] Step 3.4: The objective function value of the knowledge hypergraph of the hyperedge-circle model.

[0260]

[0261] in, The calculated average convergence metric from the entity point to the hyperedge is 2.486. The average proximity metric between entity points is calculated to be 1.834. The α-hypergraph convergence weight is set to 1, the β-hypergraph proximity metric is set to 1, and the objective function value is 2.904. The knowledge graph visualization results of the implemented use case hypergraph model are as follows: Figure 3 As shown.

[0262] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0263] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for hypergraph visualization of a knowledge graph, characterized in that, Using the knowledge hypergraph visualization method to visualize network attack activities includes the following steps: Step 1: Construct knowledge graph triples and knowledge graph hypergraph models. Using the target in the network attack as the entity and subordinate information as the relation, construct a general knowledge graph under the triple data. Map all nodes of the knowledge graph triple relation to the hypergraph entity point set. Map all relations of the knowledge graph triple relation to the hypergraph hyperedge according to the type. At the same time, put the entity containing the relation into the hyperedge with the relation as the core. Step 2, construct a two-dimensional plane bounded region entity point uniform distribution model, with The entity points with similar relationship of order are converged at one place, and a hyperedge-circular knowledge hypergraph model is obtained for visual display; in: Step 2, construct the two-dimensional plane bounded region entity point uniform distribution model, with The entity points with similar relationship of order are converged at one place, and the knowledge hypergraph of the hyper-edge as a circle model is obtained for visual display, and the specific method is as follows: Step 2.1: Construct a uniformly distributed model of entity points in a two-dimensional planar bounded region; In a two-dimensional plane, there is a bounded region , the points in the region are , the point set is as follows: ; Then, in a two-dimensional plane, there is a bounded region. Points within, with respect to random variables on the x and y coordinates , for: ; For a bounded region The coordinates of the points inside, The number of entity points; The above two-dimensional bounded region Memory exists A point, if a bounded region Area is ,and Random variables of x and y coordinates of points , The joint probability density function is: ; but A point in a two-dimensional bounded region It is a uniform distribution; Step 2.2, with When visualizing entities with similar order, they need to be grouped together and the number of similarity between entities is represented by the ratio of the distance between the points. A set of entity points with jump relationships In this context, the mathematical representation of the order proximity relationship between any two entity points is as follows: ; in For entity points and The similarity correlation coefficient is calculated by starting from the entity point. Superedge Departure The two similar hyperedges eventually reach the hyperedge. Super-edge Includes entity points When entity point and When there are multiple similar hyperedge numbers, the minimum value is taken as the similarity relation number between the two entity points; The distance between entity points is directly proportional to the proximity coefficient between them. The smaller the proximity coefficient, the smaller the distance between the two entities, and the more convergent the entity points. This can be expressed using parameters. Indicating the optimal unit distance for visualization, the entity points in 2D visualization... and The convergence distance is: ; The two-dimensional visualization distance of the entity point is: ; The convergence distance between two points is a critical value for the actual two-dimensional visualization distance, satisfying the following constraints: ; Step 2.3: Construct a knowledge hypergraph with circle hyperedges; Assuming the two-dimensional planar hyperedge model is a circle, the knowledge hypergraph hyperedge model is as follows: ; Clearly, the hyperedge model is a closed convex smooth curve, and the parameters of the circle model are: ; in , as well as For the first The x-coordinate of the center, y-coordinate of the center, and radius of each hypercircle; For superedge The distance from the point to the superedge is: ; After visualization, all entity points are within the hyperedge of the knowledge hypergraph. ; The objective function of the knowledge hypergraph for the hyperedge-circle model ; in, The average convergence metric from entity points to hyperedges. The average proximity measure between entity points is as follows: ; Hypergraph aggregation weight parameters, Hypergraph proximity parameters.

2. The hypergraph visualization method for knowledge graphs according to claim 1, characterized in that, Step 1: Construct the knowledge graph triples and the knowledge graph hypergraph model. Map all nodes of the knowledge graph triples to the hypergraph entity point set. Map all relations of the knowledge graph triples to hyperedges of the hypergraph according to their types. At the same time, place the entities containing the relation into the hyperedges, with the relation as the core. The specific method is as follows: 1) Triple data for constructing knowledge graphs : ; in, The name of the entity or relation. This is the sequence number of the entity or relation, which must be unique within the data, meaning it exists within the same node. Unique, same relationship only, Let be the number of relation types. For the total number of entities, Refers to all data The set of, where For two different entities from the entity database, to distinguish between the different entities... express, Description information is an entity In the link relationship Downward pointing to entity ; 2) Constructing a hypergraph : ; in: Let the set of entity points in the hypergraph be the same as the number of mapping triples. , Let be a set of hyperedges, the number of which is the same as the number of mapping triple relations. Supergraph The data is specifically represented as follows: ; in: For the first The coordinates of the location of each entity point For the first A set of superedges For the first One hyperedge equation; Hyperedge set: A set of entities containing a certain relation is enclosed by a hyperedge, forming a class of entities. Mathematically, it is represented as: ; Hyperedge equation: In 2D visualization, a hyperedge on a plane is represented by a curve equation. The equations of the hyperedge curves are expressed as follows: ; Accordingly, all nodes of the knowledge graph ternary relation are mapped to the set of entity points in the hypergraph, all relations of the knowledge graph ternary relation are mapped to the hyperedges of the hypergraph according to their types, and entities containing the relation are placed in the hyperedges with the relation as the core. Finally, two-dimensional coordinates are added to the entity points of the hypergraph, and curve equations are assigned to the hyperedges. 3) Hypergraph model constraints: Constraint 1: Hyperedges must exist and contain at least one entity point, i.e., the set of hyperedges cannot be empty; ; Constraint 2: All hyperedges must contain all entity points of the knowledge graph triple data, that is, the entity point mapping must be all entities; ; Constraint 3: The curve equation of the hyperedge is a closed convex smooth curve; 。 3. A hypergraph visualization system for knowledge graphs, characterized in that, Based on the hypergraph visualization method for knowledge graphs according to any one of claims 1-2, hypergraph visualization of knowledge graphs is realized.

4. A computer device, comprising 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, it realizes hypergraph visualization of the knowledge graph based on the hypergraph visualization method of any one of claims 1-2.

5. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it realizes hypergraph visualization of a knowledge graph based on a hypergraph visualization method for a knowledge graph according to any one of claims 1-2.