CN114925221B - Knowledge graph processing method, device, electronic device and medium - Google Patents
Knowledge graph processing method, device, electronic device and medium Download PDFInfo
- Publication number
- CN114925221B CN114925221B CN202210599585.8A CN202210599585A CN114925221B CN 114925221 B CN114925221 B CN 114925221B CN 202210599585 A CN202210599585 A CN 202210599585A CN 114925221 B CN114925221 B CN 114925221B
- Authority
- CN
- China
- Prior art keywords
- target
- entities
- grid
- visual
- target entities
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/34—Browsing; Visualisation therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/38—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/387—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Library & Information Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Computational Linguistics (AREA)
- User Interface Of Digital Computer (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure relates to a processing method, a device, electronic equipment and a medium of a knowledge graph, wherein the method comprises the steps of obtaining original data of the knowledge graph, wherein the original data comprise at least two target entities and structural relations between the at least two target entities, determining graph grid data based on the at least two target entities and the structural relations between the at least two target entities, the graph grid data are obtained by conducting grid processing on the at least two target entities, and displaying a visual view corresponding to the knowledge graph based on the graph grid data, wherein the visual view comprises a visual thumbnail view or a visual local view, and the visual local view corresponds to the visual thumbnail view. According to the embodiment of the disclosure, large-scale quantity map data can be displayed, the visualization degree is high, and the user browsability is effectively improved.
Description
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a knowledge graph processing method, a knowledge graph processing device, electronic equipment and a medium.
Background
Knowledge maps, which may be referred to as knowledge domain visualization or knowledge domain mapping maps, can display a series of various graphs of knowledge development processes and structural relationships, and can describe knowledge resources and their carriers, mine, analyze, build, draw, and display knowledge and their interrelationships using visualization techniques.
In the prior art, the visual display of the knowledge graph is mainly realized through a force guide graph, and is used for displaying the relation nodes and the connection relations among the knowledge.
However, for a knowledge graph of a large data volume, the display of the force-directed graph is visually cluttered and has poor browsability.
Disclosure of Invention
In order to solve the technical problems, the disclosure provides a knowledge graph processing method, a knowledge graph processing device, electronic equipment and a medium.
In a first aspect, the present disclosure provides a method for processing structured data, including:
Acquiring the original data of a knowledge graph, wherein the original data comprises at least two target entities and the structural relationship between the at least two target entities;
Determining map grid data based on at least two target entities and a structural relation between the at least two target entities, wherein the map grid data is obtained by gridding the at least two target entities;
Based on the map grid data, displaying a visual view corresponding to the knowledge map, wherein the visual view comprises a visual thumbnail view or a visual local view, and the visual local view corresponds to the visual thumbnail view.
Optionally, determining the atlas grid data based on the at least two objective entities and the structural relationship between the at least two objective entities includes:
Determining the position coordinates of at least two target entities in a coordinate area constructed by a preset coordinate system;
gridding the coordinate area to obtain at least two primary grids;
Based on the existence quantity of target entities in at least two primary grids, carrying out grid division on the at least two primary grids to obtain at least two secondary grids;
The method comprises the steps of determining map grid data based on the existence quantity of target entities in at least two primary grids, the existence quantity of target entities in at least two secondary grids, position coordinates of at least two target entities, structural relations between at least two target entities and label information of at least two target entities, wherein the label information is determined according to attribute information of the target entities.
Optionally, before determining the map grid data based on the number of existence of the target entities in the at least two primary grids, the number of existence of the target entities in the at least two secondary grids, the position coordinates of the at least two target entities, the structural relationship between the at least two target entities, and the tag information of the at least two target entities, the method further includes:
determining that the number of target entities in each secondary grid is less than a preset number threshold.
Optionally, displaying a visual view corresponding to the knowledge graph based on the graph grid data, including:
based on the existence quantity of the target entities in at least two primary grids, displaying the visual thumbnail view corresponding to the knowledge graph by using the target entities corresponding to different label information in the primary grids.
Optionally, the method further comprises:
Responding to triggering operation of a target position in the visual thumbnail view, and determining a target grid corresponding to the target position, wherein the target grid is a primary grid or a secondary grid;
And determining that the existence quantity of the target entities in the target grid is smaller than a preset quantity threshold, and displaying the visual local view corresponding to the target grid based on all the target entities included in the target grid and the structural relation among the target entities.
Optionally, the method further comprises:
And displaying the visual local views corresponding to other grids connected with the target grid in response to the sliding operation of the visual local views corresponding to the target grid.
Optionally, the method further comprises:
and updating the map grid data based on a preset updating rule.
In a second aspect, the present disclosure provides a knowledge graph processing apparatus, including:
the acquisition module is used for acquiring the original data of the knowledge graph, wherein the original data comprises at least two target entities and the structural relationship between the at least two target entities;
The determining module is used for determining map grid data based on at least two target entities and the structural relation between the at least two target entities, wherein the map grid data are obtained by carrying out gridding processing on the at least two target entities;
the display module is used for displaying visual views corresponding to the knowledge graph based on the graph grid data, wherein the visual views comprise visual thumbnail views or visual local views, and the visual local views correspond to the visual thumbnail views.
Optionally, the determining module is specifically configured to:
Determining the position coordinates of at least two target entities in a coordinate area constructed by a preset coordinate system;
gridding the coordinate area to obtain at least two primary grids;
Based on the existence quantity of target entities in at least two primary grids, carrying out grid division on the at least two primary grids to obtain at least two secondary grids;
The method comprises the steps of determining map grid data based on the existence quantity of target entities in at least two primary grids, the existence quantity of target entities in at least two secondary grids, position coordinates of at least two target entities, structural relations between at least two target entities and label information of at least two target entities, wherein the label information is determined according to attribute information of the target entities.
Optionally, the determining module is further configured to determine that the number of target entities in each secondary grid is less than a preset number threshold.
Optionally, the display module is specifically configured to:
based on the existence quantity of the target entities in at least two primary grids, displaying the visual thumbnail view corresponding to the knowledge graph by using the target entities corresponding to different label information in the primary grids.
Optionally, the determining module is further configured to determine a target grid corresponding to the target position in response to a triggering operation on the target position in the visual thumbnail view, where the target grid is a primary grid or a secondary grid;
the display module is further used for determining that the existence quantity of the target entities in the target grid is smaller than a preset quantity threshold value, and displaying the visual local view corresponding to the target grid based on all the target entities included in the target grid and the structural relation among the target entities.
Optionally, the display module is further configured to display the visual local view corresponding to the other grid connected to the target grid in response to a sliding operation on the visual local view corresponding to the target grid.
Optionally, the system also comprises an updating module;
And the updating module is used for updating the map grid data based on a preset updating rule.
In a third aspect, the present disclosure also provides an electronic device, including:
One or more processors;
storage means for storing one or more programs,
When the one or more programs are executed by the one or more processors, the one or more processors implement a method for processing a knowledge graph according to any one of the embodiments of the present invention.
In a fourth aspect, the present disclosure further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for processing a knowledge-graph according to any one of the embodiments of the present invention.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
The method comprises the steps of carrying out gridding on at least two target entities and structural relations among the at least two target entities in the acquired knowledge graph to obtain graph grid data, and displaying a visual view corresponding to the knowledge graph based on the graph grid data, wherein the visual view comprises a visual thumbnail view or a visual local view, and the visual local view corresponds to the visual thumbnail view, so that large-scale quantity of graph data can be displayed, the visual degree is higher, and the user browsability is effectively improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flow chart of a knowledge graph processing method according to an embodiment of the disclosure;
fig. 2 is a schematic storage diagram of knowledge-graph raw data according to an embodiment of the present disclosure;
FIG. 3 is a diagram of a meshing storage of maps provided in an embodiment of the present disclosure;
Fig. 4 is a schematic structural diagram of a knowledge graph processing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein, and it is apparent that the embodiments in the specification are only some, rather than all, of the embodiments of the present disclosure.
In the related art, the visualization processing of the knowledge graph is mainly realized in the following manner.
In the related art, a large-scale knowledge graph is visualized through a Label Propagation Algorithm (LPA), for example, knowledge graph data are obtained, wherein the knowledge graph data comprise entities and relations among the entities, unique labels are marked for each entity in the knowledge graph data, all the entities in the knowledge graph data are traversed, label propagation is performed on all the entities in the knowledge graph data until a suspension condition is met, a label set formed by labels of the entities is obtained based on label results of each entity after the label propagation is finished, and visual display is performed on the graph data according to the relations among the entities and label construction graph data in the label set.
However, the first technology only can show the relationships between communities fused by entities, fails to show the original entities and the original relationships thereof, and cannot support deep detailed analysis of the original data in the ultra-large-scale knowledge graph.
The related technology II realizes a large-scale knowledge graph visualization method through a particle system, and comprises the steps of rendering of massive knowledge graphs, the particle system, particle materials, a proxy server (Service Worker) and client performance optimization.
The rendering of the massive knowledge graphs can provide a visual knowledge graph interface for a user, when the user searches one node, the related relation nodes of the node can be rendered on a page, and the rendered graphs can be stored; and the client starts an asynchronous multithreading queue to carry out loading rendering, optimizes performance, and adopts d3-force oriented graph layout and WebGL rendering for selection.
The particle system uses the Points class, the Points object can only be rendered by a renderer, if the particles when the renderer renders are needed to be realized by Canvas, the Canvas is converted into textures by one step, and the textures are loaded by Map attributes.
Each particle texture graph is created, typically by creating a Canvas depiction or by loading a picture to format the particles, and one client uses a Service Worker offline resource cache.
However, the second technique shows that the visualization after a large amount of data is compressed into the particle object model data cannot fully reflect the original entity and the original relationship thereof, and cannot support deep detailed analysis of the original data in the ultra-large-scale knowledge graph.
In the related technology III, the visualization of the knowledge graph is realized through force guidance, such as the extraction of knowledge graph data, the construction of graph data structures, the layout of a force guidance algorithm, the visual presentation of an operation flow, and the visual interaction can be realized through the final knowledge graph, so that a user can operate the nodes and the relations through a mouse by binding monitoring events for each node and each relation.
However, in the third technology, mass knowledge graph data is increased, the large-scale knowledge graph data is simply displayed by using a force-oriented graph, visual confusion is easy to appear, the browser performance is difficult to support, and deep detailed analysis of the original data in the ultra-large-scale knowledge graph cannot be supported.
In the related technology IV, knowledge graph storage and multi-granularity visualization are realized through large-scale operation and maintenance, such as using an X-Engine Engine as a history data storage core, knowledge graph data storage of mass entities, attributes and relations is completed, knowledge graph data are clustered according to an LPA algorithm, entities with larger similarity are fused into groups or communities, operation of query processing and data request is performed on the intelligent operation and maintenance knowledge graph at a server according to query conditions of users, multi-granularity graph rendering is performed at a terminal according to results, and the results are displayed.
However, the fourth technique only displays the relationships between groups (or communities), or only displays the relationships inside groups (or communities), and the original relationships among entities which are mistakenly divided into different communities are not easily reflected due to randomness of the LPA algorithm due to the fact that the division result is not stable enough, so that deep detailed analysis of the original data in the ultra-large-scale knowledge graph cannot be supported.
Fig. 1 is a flow chart of a knowledge graph processing method according to an embodiment of the disclosure. The method of the embodiment can be executed by a processing device of the knowledge graph, and the device can be realized in a hardware/software mode and can be configured in electronic equipment. The knowledge graph processing method of any embodiment of the application can be realized. As shown in fig. 1, the method specifically includes the following steps:
s110, acquiring the original data of the knowledge graph, wherein the original data comprises at least two target entities and the structural relation between the at least two target entities.
Taking a knowledge graph as an example for illustrating an attack graph of massive safety logs, information and other data, the original data can be historical attack resources, victims and attack relations extracted from the massive safety logs within 1 year, the extracted information is stored in a graph database for storage, and a storage schematic diagram of the original data of the knowledge graph can be exemplarily shown in fig. 2.
The history attack resource and the victim are two target entities, and the attack relationship is a structural relationship between the two target entities.
Specifically, based on the information of attack resource organization, attack resource relationship, victim unit, victim industry and the like, attack relationships (such as various attack relationships, domain name resolution relationships and the like) among the attack resources, various entities of the victim (network protocol addresses, domain names, uniform resource locators, samples, mailboxes and the like) and the entities thereof can be formed.
S120, determining map grid data based on at least two target entities and structural relations between the at least two target entities.
The map grid data are obtained by performing grid processing on at least two target entities, and can effectively represent the position information of each entity, the result relationship among each entity, the existence quantity of each entity in grid division and the like.
In this embodiment, optionally, determining the map mesh data based on the at least two target entities and the structural relationship between the at least two target entities includes:
Determining the position coordinates of at least two target entities in a coordinate area constructed by a preset coordinate system;
gridding the coordinate area to obtain at least two primary grids;
Based on the existence quantity of target entities in at least two primary grids, carrying out grid division on the at least two primary grids to obtain at least two secondary grids;
The method comprises the steps of determining map grid data based on the existence quantity of target entities in at least two primary grids, the existence quantity of target entities in at least two secondary grids, position coordinates of at least two target entities, structural relations between at least two target entities and label information of at least two target entities, wherein the label information is determined according to attribute information of the target entities.
The coordinate area can be determined by four points (0, 0), (X, Y) and (0, Y) in the coordinate system, and the position coordinates of each target entity are randomly initialized in the coordinate area and stored in the graph database.
Before the at least two primary grids are subjected to grid division based on the existence quantity of the target entities in the at least two primary grids to obtain at least two secondary grids, determining that the existence quantity of the target entities in the primary grids is larger than a preset quantity threshold.
The coordinate area determined by four points (0, 0), (X, Y), (0, Y) in the coordinate system can be divided into n×n top grids (primary grids) based on the position coordinates of each target entity in the graph database, the existence number of target entities contained in each primary grid is calculated, and if the existence number of target entities in the primary grid exceeds M, the primary grid can be continuously divided into a plurality of secondary grids.
In combination with the above example, based on the position coordinates of the initialized target entities in the graph database, the coordinate area determined by four points (0, 0), (1000,0), (1000 ) and (0,1000) in the coordinate system is divided into 10×10 primary grids, the number of the target entities in each primary grid is calculated, if there is a primary grid with the number of the target entities exceeding 500 (the value of M mentioned above), the sub-area corresponding to the primary grid is further divided into 10×10 secondary grids, the number of the target entities in each secondary grid is calculated, until the number of the target entities in the newly divided grids does not exceed 500, the grid data such as the number of the target entities, the primary grid, the region coordinates, the center coordinates and the like of each grid are calculated and stored in the database.
The number of target entities in the at least two primary grids, the number of target entities in the at least two secondary grids, the position coordinates of the at least two target entities, the structural relationship between the at least two target entities, the label information of the at least two target entities, the center coordinates and other information can be stored in a graph database, so that graph meshing storage is realized, and a meshing storage schematic diagram can be exemplarily shown in fig. 3.
It should be noted that, based on the stored multi-stage gridding data, the total amount of target entities and the number of entities of various labels in each divided grid (primary grid or secondary grid) can be provided, the display of each level of thumbnail of the large-scale map is supported, the relation of upper and lower grids is provided, the progressive down from the top grid to each level of grids is supported, the coordinate information of each grid is provided, the display of the original entities and the relation in the local original graph in the bottommost grid is supported, and the coordinates of the original entities are combined, and the nearby entities and the relation thereof are displayed through the smooth movement of the local original graph.
In this embodiment, optionally, before determining the atlas grid data, the method may further include:
determining that the number of target entities in each secondary grid is less than a preset number threshold.
And determining that the existence quantity of the target entities in each secondary grid is smaller than a preset quantity threshold value, and not dividing the secondary grids, thereby realizing multistage effective division of the map data.
In addition, if it is determined that the number of the target entities in the secondary grid is greater than or equal to the preset number threshold, the secondary grid may be further divided to obtain a plurality of tertiary grids until the number of the target entities included in each tertiary grid is less than the preset number threshold.
Wherein, optionally, after determining the atlas grid data, the method further comprises:
and updating the map grid data based on a preset updating rule.
The method comprises the steps of setting coordinates of an extended entity for existing data, supplementing labels of the extended entity, and adding refined grid data.
The method comprises the steps of acquiring newly-expanded knowledge graph data, extracting main attribute values of the newly-expanded entities to form entity labels, storing the entity labels in a graph database, initializing coordinates of the newly-expanded entities to be geometric centers related to the coordinates of the existing entities based on relationships among the entities in the knowledge graph, and randomly initializing the coordinates of the entities in a region determined by four points (0, 0), (X, Y) and (0, Y) in a coordinate system aiming at the newly-expanded entities which are not related to the existing entities.
In the area determined by four points (0, 0), (X, Y) and (0, Y) in the coordinate system, calculating the coordinates of the newly-expanded entity by utilizing a force guiding algorithm, updating the coordinates of the newly-expanded entity into a graph database, updating the existing grid data of the graph based on the coordinates of the entity after expansion in the graph database, if the number of the entity exceeds a grid with a certain threshold value M, continuously dividing the subarea corresponding to the grid into N multiplied N lower grids, calculating the number of the entity in the new grid until the number of the entity in the newly-divided grid does not exceed M, and finally calculating the grid data such as the number of the entity, the number of the sub-label containing entity, the upper grid, the area coordinates, the center coordinates and the like of each level of grids, and storing the grid data into the database to realize grid storage of the graph.
In combination with the above example, the attack resource, the victim, the attack relation and the like are extracted from the security log of the previous day at regular time every day, based on the information of the attack resource group, the attack resource relation, the victim unit, the victim industry and the like, various entities of the attack resource and the victim and the relation thereof are formed, the main attribute values of the attack resource organization, the attack event year, the attack event type, the entity type, the victim unit, the victim industry and the like are extracted to form entity labels, the entity labels are stored in the graph database together, the coordinates of new entities in the daily newly-added data are set as the geometric centers of the related existing entity coordinates, and the daily newly-added entity coordinates are randomly initialized in the area determined by four points (0, 0), (1000,0), (1000 ) and 0,1000) in the coordinate system aiming at the daily newly-added entities which are not related to the existing entities.
After the new daily entities and relations are stored in the graph database, in the areas determined by four points (0, 0), (1000,0), (1000 ) and (0,1000) in the coordinate system, calculating the coordinates of the new daily entities by using a force guiding algorithm every day and updating the coordinates into the graph database, after the coordinate information of the new daily entities is updated in the graph database, updating the existing grid data of the graph every day, if grids with the number of the entities exceeding 500 exist, continuing dividing the subareas corresponding to the grids into 10 multiplied by 10 lower grids and calculating the number of the entities in the new grids until the number of the entities in the newly divided grids does not exceed 500, and storing the new grid data of the graph into the database.
And S130, displaying a visual view corresponding to the knowledge graph based on the graph grid data.
The visual views comprise visual thumbnail views or visual partial views, and the visual partial views correspond to the visual thumbnail views.
The method comprises the steps that a visual thumbnail view corresponding to the knowledge graph or a visual local view corresponding to the visual thumbnail view can be displayed on a front-end interface, the visual thumbnail is used for displaying the whole world, the original entity and the original relation thereof in the knowledge graph in the local area are displayed on the basis of the visual local view by means of coordinate position positioning, and deep detailed analysis of the original data in the ultra-large-scale knowledge graph is carried out.
Specifically, for the visual thumbnail view, searching and displaying can be performed based on the map grid data, and for the visual local view, the knowledge map in the local area can be displayed in the local original map based on the positioning coordinates in the visual thumbnail.
According to the knowledge graph processing method, the obtained knowledge graph is subjected to meshing on the target entities through the at least two target entities and the structural relation between the at least two target entities, graph mesh data are obtained, and visual views corresponding to the knowledge graph are displayed based on the graph mesh data, wherein the visual views comprise visual thumbnail views or visual local views, and the visual local views correspond to the visual thumbnail views, so that large-scale quantity of graph data can be displayed, the visual degree is high, and the user browsability is effectively improved.
Based on the description of the foregoing embodiment, in this embodiment, optionally, based on the graph grid data, displaying a visual view corresponding to the knowledge graph includes:
based on the existence quantity of the target entities in at least two primary grids, displaying the visual thumbnail view corresponding to the knowledge graph by using the target entities corresponding to different label information in the primary grids.
The number of target entities contained in each label in each primary grid can be obtained based on the primary grid data (and the labels selected by the user), different label information in each primary grid is displayed in the visual thumbnail view in the form of entities, and the number of target entities contained in the labels represents the size of the entities in the visual thumbnail view.
In combination with the above example, the attack graph that may be displayed on the front-end interface includes a visual thumbnail view and a visual local view (local original view), based on the primary grid data (and the tags selected by the user, such as attack resource organization, year of attack event, type of attack event, entity type, victim unit, victim industry, etc.), the number of target entities included in each tag in each primary grid is obtained, and different tags in each primary grid are displayed in the visual thumbnail view in the form of entities, where the number of target entities included in the tag represents the size of the entity target in the visual thumbnail view.
Therefore, based on the multi-level gridding data, the multi-level visual thumbnail is provided, and the problem that a single thumbnail cannot display too many entities in a certain area of the knowledge graph under the condition that the number of local entities in the super-large-scale knowledge graph is too large is solved.
In this embodiment, optionally, the method may further include:
Responding to triggering operation of a target position in the visual thumbnail view, and determining a target grid corresponding to the target position, wherein the target grid is a primary grid or a secondary grid;
And determining that the existence quantity of the target entities in the target grid is smaller than a preset quantity threshold, and displaying the visual local view corresponding to the target grid based on all the target entities included in the target grid and the structural relation among the target entities.
The user can click any coordinate position in the visual thumbnail view to trigger the display of the visual local view corresponding to the coordinate position, so that the user can watch detailed data conveniently.
Specifically, by means of the region coordinates of the target grid, all the entities and relationships thereof meeting the conditions in the region can be screened out from the graph database, and all the entities and relationships thereof meeting the conditions in the grid coverage area are displayed in the visual local view.
In addition, when the existence number of the target entities in the target grids is determined to be greater than or equal to a preset number threshold, the lower grids (such as the second grid and the third grid) of the first grid can be drilled down, the number of the target entities contained in each label in each lower grid is obtained, different labels in each lower grid are displayed in a visual thumbnail view in the form of entities in a map, and the existence number of the target entities in the lower grids is found to be smaller than the preset number threshold.
In this embodiment, optionally, the method may further include:
And displaying the visual local views corresponding to other grids connected with the target grid in response to the sliding operation of the visual local views corresponding to the target grid.
In the visual local view corresponding to the target grid, sliding can be supported to view other entities and structural relations near the target grid, the nearby entities and the relations thereof can be displayed step by step smoothly, and the detailed analysis capability of the original map crossing different grids is realized.
Therefore, in the visualized local view, based on the coordinate information of the grids and the entities, the nearby entities and the relations thereof are gradually displayed through the smooth movement of the visualized local view, so that the analysis of the atlas of the original entities and the relations thereof crossing different grids is supported, and the deep detailed analysis of the original data in the ultra-large-scale knowledge atlas is facilitated.
According to the embodiment of the disclosure, multiple levels of grids can be divided based on each entity coordinate, the entity number of each grid (including an upper level grid and a lower level grid) is calculated, the grid data including the entity number, the upper level grid, the region coordinate, the center coordinate and the like are contained in the sub-label, and the grid data are stored in the database, so that the grid storage of the map is realized.
And the method can provide the total amount of entities and the number of entities of various labels in each grid based on stored multi-level gridding data, realize the display of each level of thumbnail of a large-scale map, support the progressive drilling from the top grid to the lower grid, realize the display of original entities and relations in local original diagrams in the bottommost grid by providing the coordinate information of each grid, display nearby entities and relations by combining the coordinates of the original entities through the smooth movement of the local original diagrams, describe the whole world and determine analysis key points according to the multi-level thumbnail generated by the grid data, display the original entities and relations depending on the local original diagrams defined by the single grid coordinate area, support the smooth movement of the local knowledge map based on the coordinate position, and quickly and effectively support the deep detailed analysis of the knowledge map.
Fig. 4 is a schematic structural diagram of a knowledge graph processing apparatus according to an embodiment of the present disclosure, where the apparatus is configured in an electronic device, so as to implement a knowledge graph processing method according to any embodiment of the present disclosure. The device specifically comprises the following steps:
the obtaining module 410 is configured to obtain raw data of a knowledge graph, where the raw data includes at least two target entities and a structural relationship between the at least two target entities;
A determining module 420, configured to determine, based on at least two target entities and a structural relationship between the at least two target entities, graph grid data, where the graph grid data is obtained by performing a meshing process on the at least two target entities;
the display module 430 is configured to display, based on the graph grid data, a visual view corresponding to the knowledge graph, where the visual view includes a visual thumbnail view or a visual local view, and the visual local view corresponds to the visual thumbnail view.
In this embodiment, the optional determining module 420 is specifically configured to:
Determining the position coordinates of at least two target entities in a coordinate area constructed by a preset coordinate system;
gridding the coordinate area to obtain at least two primary grids;
Based on the existence quantity of target entities in at least two primary grids, carrying out grid division on the at least two primary grids to obtain at least two secondary grids;
The method comprises the steps of determining map grid data based on the existence quantity of target entities in at least two primary grids, the existence quantity of target entities in at least two secondary grids, position coordinates of at least two target entities, structural relations between at least two target entities and label information of at least two target entities, wherein the label information is determined according to attribute information of the target entities.
In this embodiment, the determining module 420 is further configured to determine that the number of target entities in each secondary grid is less than a preset number threshold.
In this embodiment, the optional display module 430 is specifically configured to:
based on the existence quantity of the target entities in at least two primary grids, displaying the visual thumbnail view corresponding to the knowledge graph by using the target entities corresponding to different label information in the primary grids.
In this embodiment, optionally, the determining module 420 is further configured to determine, in response to a triggering operation on a target position in the visual thumbnail view, a target grid corresponding to the target position, where the target grid is a primary grid or a secondary grid;
The display module 430 is further configured to determine that the number of target entities in the target grid is less than a preset number threshold, and display a visual local view corresponding to the target grid based on all target entities included in the target grid and a structural relationship between the target entities.
In this embodiment, optionally, the display module 430 is further configured to display the visualized partial view corresponding to the other grid connected to the target grid in response to a sliding operation on the visualized partial view corresponding to the target grid.
In this embodiment, optionally, the apparatus of this embodiment further includes an update module;
And the updating module is used for updating the map grid data based on a preset updating rule.
According to the knowledge graph processing device, the obtained knowledge graph is subjected to meshing on the target entities through the at least two target entities and the structural relation between the at least two target entities, so that graph mesh data are obtained, and visual views corresponding to the knowledge graph are displayed based on the graph mesh data, wherein the visual views comprise visual thumbnail views or visual local views, and the visual local views correspond to the visual thumbnail views, so that large-scale quantity of graph data can be displayed, the visual degree is high, and the user browsability is effectively improved.
The knowledge graph processing device provided by the embodiment of the invention can execute the knowledge graph processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
The present disclosure also provides an electronic device comprising a processor for executing a computer program stored in a memory, which when executed by the processor implements the steps of the above-described method embodiments.
Fig. 5 is a schematic structural diagram of an electronic device provided in the present disclosure, and fig. 5 shows a block diagram of an exemplary electronic device suitable for implementing the embodiment of the present invention. The electronic device shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to, one or more processors 16, a system memory 28, and a bus 18 that connects the various system components, including the system memory 28 and the processors 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any medium that is accessible by electronic device 12 and includes both volatile and non-volatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (commonly referred to as a "hard disk drive"). Disk drives for reading from and writing to removable nonvolatile magnetic disks (e.g., a "floppy disk"), and optical disk drives for reading from and writing to removable nonvolatile optical disks (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The processor 16 executes various functional applications and information processing, such as implementing method embodiments provided by embodiments of the present invention, by running at least one of a plurality of programs stored in the system memory 28.
The present disclosure also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described method embodiments.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The present disclosure also provides a computer program product which, when run on a computer, causes the computer to perform the steps of implementing the above-described method embodiments.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The above is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. The knowledge graph processing method is characterized by comprising the following steps of:
Acquiring original data of a knowledge graph, wherein the original data comprises at least two target entities and structural relations between the at least two target entities, the at least two target entities comprise historical attack resources and victims, and the structural relations between the two target entities are attack relations;
determining map grid data based on at least two target entities and structural relations among the at least two target entities, wherein the map grid data are obtained by carrying out gridding processing on the at least two target entities, and are used for showing position information of each target entity, result relations among each target entity and the existence quantity of each target entity in network division;
And displaying a visual view corresponding to the knowledge graph based on the graph grid data, wherein the visual view comprises a visual thumbnail view or a visual local view, and the visual local view corresponds to the visual thumbnail view.
2. The method of claim 1, wherein determining atlas grid data based on at least two objective entities and structural relationships between at least two of the objective entities, comprises:
Determining the position coordinates of at least two target entities in a coordinate area constructed by a preset coordinate system;
gridding the coordinate area to obtain at least two primary grids;
based on the existence quantity of the target entities in the at least two primary grids, carrying out grid division on the at least two primary grids to obtain at least two secondary grids;
Determining map grid data based on the existence quantity of the target entities in at least two primary grids, the existence quantity of the target entities in at least two secondary grids, the position coordinates of at least two target entities, the structural relation between at least two target entities and the label information of at least two target entities, wherein the label information is determined according to the attribute information of the target entities.
3. The method of claim 2, wherein prior to determining the atlas grid data based on the number of occurrences of the objective entity in the at least two primary grids, the number of occurrences of the objective entity in the at least two secondary grids, the location coordinates of the at least two objective entities, the structural relationship between the at least two objective entities, and the label information of the at least two objective entities, further comprising:
and determining that the existence quantity of the target entities in each secondary grid is smaller than a preset quantity threshold value.
4. A method according to claim 3, wherein displaying a visual view corresponding to a knowledge-graph based on graph grid data, comprises:
Based on the existence quantity of the target entities in at least two primary grids, displaying the visual thumbnail view corresponding to the knowledge graph by using the target entities corresponding to different label information in the primary grids.
5. The method as recited in claim 4, further comprising:
responding to triggering operation of a target position in the visual thumbnail view, and determining a target grid corresponding to the target position, wherein the target grid is a primary grid or a secondary grid;
and determining that the existence quantity of the target entities in the target grid is smaller than a preset quantity threshold, and displaying the visual local view corresponding to the target grid based on all the target entities included in the target grid and the structural relation among the target entities.
6. The method as recited in claim 5, further comprising:
and displaying the visual local views corresponding to other grids connected with the target grid in response to the sliding operation of the visual local views corresponding to the target grid.
7. The method as recited in claim 2, further comprising:
updating the map grid data based on a preset updating rule.
8. A knowledge graph processing apparatus, comprising:
The acquisition module is used for acquiring the original data of the knowledge graph, wherein the original data comprises at least two target entities and structural relations between the at least two target entities, the at least two target entities comprise history attack resources and victims, and the structural relations between the two target entities are attack relations;
The determining module is used for determining map grid data based on at least two target entities and the structural relation between the at least two target entities, wherein the map grid data are obtained by carrying out gridding processing on the at least two target entities, and the map grid data are used for showing the position information of each target entity, the result relation between each target entity and the existence quantity of each target entity in network division;
The display module is used for displaying visual views corresponding to the knowledge graph based on graph grid data, wherein the visual views comprise visual thumbnail views or visual local views, and the visual local views correspond to the visual thumbnail views.
9. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs,
When the one or more programs are executed by the one or more processors, the one or more processors implement the knowledge-graph processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method for processing a knowledge-graph according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210599585.8A CN114925221B (en) | 2022-05-30 | 2022-05-30 | Knowledge graph processing method, device, electronic device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210599585.8A CN114925221B (en) | 2022-05-30 | 2022-05-30 | Knowledge graph processing method, device, electronic device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114925221A CN114925221A (en) | 2022-08-19 |
CN114925221B true CN114925221B (en) | 2025-03-28 |
Family
ID=82812372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210599585.8A Active CN114925221B (en) | 2022-05-30 | 2022-05-30 | Knowledge graph processing method, device, electronic device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114925221B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666319A (en) * | 2019-03-07 | 2020-09-15 | 腾讯科技(深圳)有限公司 | Data display method and device, electronic equipment and computer readable storage medium |
CN112686226A (en) * | 2021-03-12 | 2021-04-20 | 深圳市安软科技股份有限公司 | Big data management method and device based on gridding management and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9874995B2 (en) * | 2014-06-25 | 2018-01-23 | Oracle International Corporation | Maintaining context for maximize interactions on grid-based visualizations |
-
2022
- 2022-05-30 CN CN202210599585.8A patent/CN114925221B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666319A (en) * | 2019-03-07 | 2020-09-15 | 腾讯科技(深圳)有限公司 | Data display method and device, electronic equipment and computer readable storage medium |
CN112686226A (en) * | 2021-03-12 | 2021-04-20 | 深圳市安软科技股份有限公司 | Big data management method and device based on gridding management and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114925221A (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9811234B2 (en) | Parallel display of multiple graphical indicators representing differing search criteria evaluated across a plurality of events | |
JP4821000B2 (en) | Object display processing device, object display processing method, and object display processing program | |
EP3916584A1 (en) | Information processing method and apparatus, electronic device and storage medium | |
CN111931097A (en) | Information display method and device, electronic equipment and storage medium | |
CN113190670A (en) | Information display method and system based on big data platform | |
CN102907069A (en) | Method and system for executing a graphics application | |
US20090271369A1 (en) | Computer method and system of visual representation of external source data in a virtual environment | |
CN111339213A (en) | Visual display method, electronic device and medium based on knowledge graph | |
JP7242994B2 (en) | Video event identification method, apparatus, electronic device and storage medium | |
CN112016326B (en) | A method, device, electronic device and storage medium for identifying map area words | |
CN111124371A (en) | Game-based data processing method, device, equipment and storage medium | |
JP2012038303A (en) | Three-dimensional tag clouds for visualizing federated cross-system tags, and method, system, and computer program for the same (3d tag clouds for visualizing federated cross-system tags) | |
CN114090155B (en) | Robot flow automatic interface element positioning method, device and storage medium | |
CN113127574A (en) | Service data display method, system, equipment and medium based on knowledge graph | |
CN113656533A (en) | Tree control processing method and device and electronic equipment | |
CN108885644B (en) | Method and computer readable medium for data item conversion | |
CN108961079A (en) | Insurance family identification method, device storage medium and electronic equipment | |
WO2014176182A1 (en) | Auto-completion of partial line pattern | |
CN106599241B (en) | Visual management method for big data in GIS software | |
CN114925221B (en) | Knowledge graph processing method, device, electronic device and medium | |
CN115168471A (en) | Data report generation method, device, computer equipment and storage medium | |
CN112463844B (en) | Data processing method and device, electronic equipment and storage medium | |
CN104243201B (en) | Network equipment detection use-case corresponds to the storage method and system of topological diagram | |
CN116304079A (en) | Timing-based profile data management method, apparatus, and readable storage medium | |
CN118193601A (en) | Model pre-training for user interface navigation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |