Knowledge graph rendering method, device, equipment and product under large-scale data

By dividing the knowledge graph into data blocks and rendering node data on demand, the problem of slow rendering of knowledge graphs under large-scale data is solved, and faster page loading and higher user experience is achieved.

CN120216606AActive Publication Date: 2025-06-27BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510663558.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-06-27
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

When processing knowledge graphs under large-scale data, the rendering speed is slow, causing page loading to stutter, blank, or even crash.

Method used

By dividing the knowledge graph into different data blocks according to its ontology structure, and querying and rendering the node data of the target knowledge graph as needed when the client responds to the display operation. The method includes determining the layout information and rendering priority of the node data, and then rendering.

Benefits of technology

This method reduces the memory pressure of the client, improves the query speed of node data and the rendering speed of knowledge graphs, improves the page loading speed, avoids page crashes, and improves the user experience and knowledge retrieval efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216606A_ABST
    Figure CN120216606A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph rendering method, device, equipment and product under large-scale data, and relates to the field of knowledge graphs, big data processing and artificial intelligence, and the method comprises the steps: carrying out the data query in a data block corresponding to a target knowledge graph, and obtaining node data for rendering; determining layout information and rendering priority of the node data; and rendering the node data at least according to the layout information, the entity type and the rendering priority of the node data to obtain a target knowledge graph. The node data is queried as required in the data block corresponding to the target knowledge graph, and the node data is gradually rendered according to the rendering priority, so that the query speed of the node data and the rendering speed of the knowledge graph under large-scale data can be improved, the page loading speed is improved, the page crash is avoided, and the user experience is improved. Therefore, when knowledge retrieval is carried out on the rendered knowledge graph, the knowledge retrieval efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of knowledge graphs, big data processing, and artificial intelligence. Specifically, it relates to a method, apparatus, device, and product for rendering a knowledge graph under large-scale data. Background Art

[0002] A knowledge graph is a commonly used technical means in the field of knowledge governance. Due to its structured data form, knowledge can form a knowledge graph in the shape of an arbitrary network composed of points (entities) and edges (relationships), which can clearly represent the complex relationships between knowledge, support semantic search and knowledge reasoning, and has strong knowledge integration and association capabilities, as well as scalability capabilities.

[0003] However, when processing a knowledge graph under large-scale data, it takes a lot of time to query all node data of the knowledge graph under large-scale data and perform graph rendering. The rendering speed is slow, the page loading is stuck or blank, and it may even cause the page to crash. Summary of the Invention

[0004] This Summary of the Invention section is provided to introduce concepts in a brief form, which will be described in detail in the subsequent Detailed Implementation section. This Summary of the Invention section is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a method for rendering a knowledge graph under large-scale data. The method for rendering a knowledge graph includes: In response to a knowledge graph display operation on a client, perform data query in a data block corresponding to a target knowledge graph to obtain node data for rendering, where the data block is obtained by dividing the target knowledge graph according to the ontology structure of the target knowledge graph, and each node data in a data block corresponds to the same entity type in the ontology structure; Determine layout information of the node data, where the layout information at least characterizes the position of the node corresponding to the node data in the client display interface; Determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and a preset rendering priority, where the preset rendering priority is used to characterize the rendering priority of a first specific entity type and a second specific entity type having a specific connection relationship; Render the node data at least according to the layout information, the entity type, and the rendering priority of the node data to obtain the target knowledge graph.

[0006] In a second aspect, the present disclosure provides a knowledge graph rendering device under large-scale data. The knowledge graph rendering device includes: A query module, configured to perform data query in a data block corresponding to a target knowledge graph in response to a knowledge graph display operation on a client, so as to obtain node data for rendering. Wherein, the data block is obtained by dividing the target knowledge graph according to the ontology structure of the target knowledge graph, and each node data in one data block corresponds to the same entity type in the ontology structure; A first determination module, configured to determine layout information of the node data, where the layout information at least characterizes the position of the node corresponding to the node data in the display interface of the client; A second determination module, configured to determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and a preset rendering priority. Wherein, the preset rendering priority is used to characterize the rendering priority of a first specific entity type and a second specific entity type with a specific connection relationship; A rendering module, configured to render the node data at least according to the layout information, the entity type, and the rendering priority of the node data, so as to obtain the target knowledge graph.

[0007] In a third aspect, the present disclosure provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processing device, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, the present disclosure provides an electronic device, including: A storage device, on which a computer program is stored; A processing device, configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] Through the above technical solution, the target knowledge graph can be divided into different data blocks according to the ontology structure of the target knowledge graph, so as to query the node data required for rendering the target knowledge graph according to the data blocks, and then determine the layout information of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and the preset rendering priority. Finally, at least according to the layout information, entity type, and rendering priority of the node data, the node data is rendered to obtain the target knowledge graph. By using this method, it is not necessary to query all the node data of the knowledge graph under a large amount of data at one time and perform graph rendering, but to locate the corresponding data blocks of the target knowledge graph and query the node data on demand for graph rendering. This can not only reduce the memory pressure on the client side, but also improve the query speed of the node data and the rendering speed of the knowledge graph under a large amount of data, thereby improving the page loading speed and avoiding page crashes. In addition, the node data can be gradually rendered according to the rendering priority, improving the page response speed, avoiding blank pages, and improving the user experience. Furthermore, when performing knowledge retrieval on the rendered knowledge graph, the knowledge retrieval efficiency can be improved.

[0011] Other features and advantages of the present disclosure will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In combination with the accompanying drawings and with reference to the following specific implementation, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a schematic flowchart of a method for rendering a knowledge graph under a large amount of data according to an exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of the process of a method for rendering a knowledge graph under a large amount of data according to an exemplary embodiment of the present disclosure; Figure 3 is a display schematic diagram of a configuration page according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of the process of a graph rendering according to an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of setting the display of a knowledge graph according to an exemplary embodiment of the present disclosure; Figure 6 is a display schematic diagram of a knowledge graph re-rendering according to an exemplary embodiment of the present disclosure; Figure 7It is a display schematic diagram of a knowledge graph list display shown according to an exemplary embodiment of the present disclosure; Figure 8 It is a structural schematic diagram of a knowledge graph rendering device under large-scale data shown according to an exemplary embodiment of the present disclosure; Figure 9 It is a structural schematic diagram of an electronic device shown according to an exemplary embodiment of the present disclosure. Detailed implementation manners

[0013] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0014] It should be understood that the various steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0015] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0016] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions executed by these devices, modules or units or their interdependent relationships.

[0017] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly stated otherwise in the context, it should be understood as "one or more".

[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0019] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users and the authorization of users should be obtained through appropriate means in accordance with relevant laws and regulations.

[0020] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application program, server, or storage medium that performs the operations of the technical solutions of the present disclosure based on the prompt message.

[0021] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window. The prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manner of the present disclosure. Other manners that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0023] At the same time, it is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.

[0024] When processing knowledge graphs with large-scale data, performance bottlenecks may be faced, which are mainly manifested in: 1. Poor query and reasoning performance of graph data under large-scale data: Firstly, the knowledge graph under large-scale data contains a vast amount of entity and relationship data. Storing and processing these data require a large amount of memory and disk space. Retrieving relevant information from such a huge amount of data during query requires a large amount of time to locate and read the data. In addition, the data sources in the knowledge graph are extensive and in various formats, including structured, semi-structured, and unstructured data. Integrating and processing these different types of data requires additional overhead, increasing the complexity of query and reasoning.

[0025] Second, in the graph structure of the knowledge graph, there are complex multi-hop relationships between entities. When performing queries and inferences, it may be necessary to traverse a large number of nodes and edges to find paths or relationships that meet the conditions, resulting in an exponential growth of the search space and thus reducing performance. Additionally, the structure of the knowledge graph is often irregular, with significant differences in the node degrees and connection densities in different regions, making it inefficient for rule-based or statistical query and inference algorithms to process, and prone to problems such as data skew, which affects the overall performance.

[0026] Third, the inference tasks of the knowledge graph usually require the use of complex logical rules and algorithms, such as description logic-based inference, rule-based inference, etc. When dealing with large-scale data, these algorithms need to perform a large number of logical judgments and derivations, resulting in low inference speed.

[0027] Fourth, in order to process the knowledge graph under large-scale data, a distributed storage and computing architecture is usually adopted. However, data communication and coordination in a distributed system will bring additional overhead, affecting the performance of queries and inferences. Operations such as data transmission, task scheduling, and synchronization between different nodes may all lead to increased latency.

[0028] 2. The graph data cannot be queried layer by layer: The knowledge graph is a complex network structure, where entities are interconnected through various types of relationships and there is no strict hierarchical relationship. An entity may be associated with multiple entities of different types, and this many-to-many relationship makes it difficult to determine a clear hierarchical order for hierarchical rendering. Moreover, the knowledge graph is usually dynamic, with new entities and relationships constantly being added to the graph. New information may change the relationships between existing entities or introduce entirely new relationship paths, making it difficult to pre-determine a stable hierarchical structure. Additionally, the relationships in the knowledge graph have rich semantic information, and different relationship types represent different semantic meanings. These semantic information are crucial for understanding and processing the knowledge graph, but also increase the complexity of rendering.

[0029] 3. The rendering and loading of the knowledge graph under large-scale data are slow or even cause the page to crash: First, the knowledge graph under large-scale data contains a vast amount of node data and edge data. During network transmission, it takes a long time to transfer the data from the server to the client. If the network condition is poor, the transmission time will be further extended, resulting in the page being in the loading state for a long time.

[0030] Second, when downloading the knowledge graph data under large-scale data with low network bandwidth, it will be restricted. For example, during the download process, data interruption or extremely slow download speed may occur, which will not only extend the loading time but also may lead to incomplete data, thereby affecting the graph rendering.

[0031] Thirdly, knowledge graphs are usually presented in a graphical manner, and complex layout calculations are required to determine the positions of each node and edge on the page. For knowledge graphs with large-scale data, the complexity of layout calculations will increase exponentially, consuming a large amount of processor time, thereby affecting the efficiency of responding to user operations. In addition, rendering a knowledge graph requires drawing a large number of nodes and edges, and these graphical elements will occupy a large amount of browser memory. When the number of graphical elements is too large, the rendering performance of the browser will be severely affected, resulting in jams or even crashes. In addition, during the drawing process, it is also necessary to process the styles, colors, interaction effects, etc. of the graphics, further increasing the complexity and time consumption of rendering.

[0032] Fourthly, due to the limitations of the performance of the client computer, the rendering calculation amount of the knowledge graph under large-scale data is huge, which may cause the processor to reach a saturated state, resulting in a slowdown in the browser response speed or even an unresponsive situation. In addition, the available memory of the client is limited, and various objects, textures, etc. generated during the rendering of the knowledge graph data under large-scale data need to occupy memory. When the memory occupancy exceeds the memory limit, a memory overflow will occur, resulting in a page crash.

[0033] In related technologies, the knowledge graph data is compressed on the server side and then decompressed on the client side. Although it can speed up the network transmission speed, it takes a lot of time to wait for the transmission and decompression of the data compression package, and the user experience is not good. Or the knowledge graph data is distributed to the content delivery network, and the data is obtained from the node closest to the user and sent to the user's client. It highly depends on the related services of the content delivery network and has high requirements for basic equipment, so it cannot be widely promoted and applied on a large scale. Or use the acceleration function of the browser to improve the rendering ability, but this method has high requirements for the hardware equipment of the client or the software of the browser, and it also cannot be widely promoted and applied on a large scale.

[0034] In view of this, the present disclosure provides a method, device, equipment and product for rendering a knowledge graph under large-scale data to solve the above technical problems.

[0035] The following further explains the embodiments of the present disclosure with reference to the accompanying drawings.

[0036] Figure 1 is a flowchart of a method for rendering a knowledge graph under large-scale data shown according to an exemplary embodiment of the present disclosure. Referring to Figure 1 , the method for rendering the knowledge graph may include the following steps: S101: In response to a knowledge graph display operation on the client, perform a data query in the data block corresponding to the target knowledge graph to obtain node data for rendering.

[0037] Among them, the data blocks are obtained by partitioning the target knowledge graph according to the ontology structure of the target knowledge graph, and the node data in one data block correspond to the same entity type in the ontology structure.

[0038] It should be noted that large-scale data refers to data with a data volume greater than a preset data volume threshold, such as a data volume of millions, tens of millions, hundreds of millions, or hundreds of billions, etc., and the present disclosure does not limit this.

[0039] In a possible way, the data blocks are obtained by the following method: determining the ontology structure of the target knowledge graph and the entity types included in the ontology structure, and using the entity type with the largest scope in the ontology structure as the initial target entity type, and performing the following process: according to the data creation time, dividing every third data belonging to the target entity type in the target knowledge graph into one data block until all the data belonging to the target entity type are divided into data blocks, and using the next entity type connected to the target entity type in the ontology structure as the new target entity type until all the data in the target knowledge graph are divided into data blocks.

[0040] In this embodiment, the ontology structure of the knowledge graph is used to define the framework structure of the knowledge graph. Taking the professional course knowledge graph as an example, the ontology structure may include professional entity types, the professional entity types include professional direction entity types, the professional direction entity types include course entity types, and the course entity types include knowledge point entity types, which can be specifically defined according to the actual business scenario, and the present disclosure does not limit this.

[0041] Of course, the knowledge graph can be other knowledge graphs of business scenarios in addition to the above professional course knowledge graph, and the present disclosure does not limit this.

[0042] Exemplarily, taking the above professional course knowledge graph as an example, first sort the data of the professional entity type according to the data creation time, divide the first number of data of the professional entity type into the first data block, and then continue to divide the first number of data of the professional entity type from the remaining data of the professional entity type into the second data block, and so on, until all the data of the professional entity type are divided into data blocks. Subsequently, continue to divide the data blocks of the professional direction entity type, which will not be elaborated herein. Among them, the first number can be set according to requirements, and the present disclosure does not limit this.

[0043] Such as Figure 2As shown, the data of the knowledge graph under large-scale data can be pre-block stored according to certain rules, which is convenient for obtaining corresponding node data from the corresponding data blocks as needed when rendering the target knowledge graph later, avoiding loading all node data of the knowledge graph under large-scale data at one time, improving the query efficiency of node data, and the data transmission efficiency from the server to the client. Even in the case of low network bandwidth, it can ensure the integrity of the node data required for rendering the target knowledge graph. Among them, the chunking rule can be chunking according to entity types of different functional modules and different services, which can be specifically set according to requirements, and the present disclosure does not limit this.

[0044] S102: Determine the layout information of the node data.

[0045] Among them, the layout information at least represents the position of the node corresponding to the node data in the client display interface.

[0046] Exemplarily, as Figure 2 shown, after obtaining the node data as needed, the node data can be summarized, and the layout information of the node data can be calculated. For example, determine the coordinates of the display position of the node in the client display interface, and the correlation clustering statistics between the nodes corresponding to different node data, etc., which can be specifically set according to requirements, and the present disclosure does not limit this.

[0047] S103: Determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and the preset rendering priority.

[0048] Among them, the preset rendering priority is used to represent the rendering priority of the first specific entity type and the second specific entity type with a specific connection relationship.

[0049] In a possible way, the preset rendering priority is configured as follows: On the client display configuration page, where the ontology structure of the target knowledge graph and preset configuration items are displayed on the configuration page. The preset configuration items include a first configuration item for configuring the first specific entity type, a second configuration item for configuring the second specific entity type, a third configuration item for configuring the specific connection relationship between the first specific entity type and the second specific entity type, and a fourth configuration item for configuring the rendering priority; in response to the configuration operations on the preset configuration items on the configuration page, the preset rendering priority is obtained.

[0050] In this embodiment, as Figure 3As shown, a configuration page is displayed on the client side. On this configuration page, the ontology structure of the knowledge graph can be created, connection relationships can be created for different entity types, and the rendering priorities of different entity types can be configured, etc. The present disclosure places no restrictions on this.

[0051] Exemplarily, the connection relationship and rendering priority between any two entity types can be configured. For example, the first specific entity type can be selected by dropping down in the first configuration item, the second specific entity type can be selected by dropping down in the second configuration item, and the connection relationship between the two can be set in the third configuration item. Furthermore, the corresponding rendering priority can be set in the fourth configuration item. It can be as Figure 3 the steps shown by the dashed line x1 in, to display the corresponding configuration between the selected entity type nodes. Furthermore, as Figure 3 the steps shown by the dashed line x2 in, to display the specific information of the connection relationship between the two, including the relationship name and relationship priority, where the relationship priority is the rendering priority and can be specifically set according to requirements. The present disclosure places no restrictions on this.

[0052] Furthermore, for example, the entity type corresponding to node data A is Figure 3 the professional direction entity type in, and the entity type corresponding to node data B is Figure 3 the course entity type in. For example, if the relationship priority between the professional direction entity type and the major entity type is set to be higher than the relationship priority between the professional direction entity type and the course entity type, then the rendering priority of node data A is higher than the rendering priority of node data B. Thus, when rendering the knowledge graph, it is possible to perform step-by-step rendering according to the rendering priorities of the node data.

[0053] Exemplarily, the rendering priority of the entity type with a high degree of importance can be set to a high priority, and the rendering priority of the entity type with a low degree of importance can be set to a low priority. In this way, the node data with a high degree of importance can be rendered first, facilitating the display of the node data with a high degree of importance to the user first. Subsequently, the node data with a low degree of importance can be gradually rendered. This can not only improve the page response speed and avoid a blank page, but also help the user quickly obtain important knowledge and improve the user experience.

[0054] In addition, it is also possible to set to perform rendering in batches according to a certain quantity under the same priority, which can be specifically set according to requirements. The present disclosure places no restrictions on this.

[0055] By classifying and storing the knowledge graph data under large-scale data in a hierarchical and block-based manner, it is convenient to perform hierarchical and step-by-step queries and rendering on the data nodes of the knowledge graph under large-scale data, simplify the rendering complexity, and improve the rendering efficiency of the knowledge graph under large-scale data.

[0056] S104: Render the node data based on at least the layout information, entity type, and rendering priority of the node data to obtain the target knowledge graph.

[0057] By adopting this method, instead of querying all the node data of the knowledge graph under a large amount of data at one time and performing graph rendering, it locates the data blocks corresponding to the target knowledge graph and queries the node data on demand for graph rendering. This can not only reduce the memory pressure on the client side, but also improve the query speed of node data and the rendering speed of the knowledge graph under a large amount of data, thereby improving the page loading speed and avoiding page crashes. In addition, the node data can be gradually rendered according to the rendering priority, improving the page response speed, avoiding blank pages, and enhancing the user experience. Furthermore, when performing knowledge retrieval on the rendered knowledge graph, the knowledge retrieval efficiency can be improved.

[0058] In this embodiment, since only a part of the knowledge graph in the knowledge graph under a large amount of data is queried and rendered on demand, the data volume is greatly reduced. On this basis, even if different types of node data are integrated and processed, the required computational overhead is small, and the complexity of subsequent data querying and reasoning is reduced. And during the process of querying and reasoning, there is no need to traverse a large number of nodes, which is convenient for efficiently running rule-based or statistical query and reasoning algorithms, reducing the amount of calculation, and improving the query and reasoning speed. In addition, it does not rely on a distributed system storage and computing architecture, further enhancing the performance of querying and reasoning, and does not rely on additional hardware or software optimization, which is convenient for popularization and application.

[0059] In a possible way, rendering the node data based on at least the layout information, entity type, and rendering priority of the node data to obtain the target knowledge graph includes: according to the layout information and rendering priority corresponding to the node data, drawing the node data as a canvas element to obtain the knowledge graph nodes corresponding to the node data; in response to the completion of the drawing of the node data, rendering the edges between the knowledge graph nodes according to the entity type and rendering priority of the node data, and adding scalable vector elements and / or hypertext markup language elements to the knowledge graph nodes according to the interaction events associated with the node data to obtain the target knowledge graph.

[0060] In this embodiment, the knowledge graph can be divided into different layers, such as a background layer, a node layer, an edge layer, etc., and rendered separately, so as to be able to render the graph layout of the knowledge graph layer by layer, improve the page drawing efficiency, improve the page response speed, avoid blank pages, and thus enhance the user experience.

[0061] Exemplarily, such as Figure 4As shown, the knowledge graph nodes can be rendered first according to the position coordinates of the node data in the page in the order of decreasing rendering priority, and the corresponding knowledge graph nodes can be obtained. Then, the edges between the knowledge graph nodes can be rendered in the order of decreasing rendering priority, and they can also be rendered according to the entity type. For example, the node styles and edge styles of different entity types are different, which can be specifically set according to requirements, and the present disclosure does not limit this. By rendering the graph layout of the knowledge graph in layers, the page drawing efficiency can be improved, and then the page loading efficiency can be improved, avoiding page freezing or crashing. In addition, when performing knowledge retrieval on the rendered knowledge graph, the knowledge retrieval efficiency can be improved.

[0062] Exemplarily, for the page elements that need to be interacted with, such as the knowledge graph nodes corresponding to the node data associated with interaction events, scalable vector elements and / or hypertext markup language elements can be added to the knowledge graph nodes to implement the node interaction function, thereby obtaining the target knowledge graph with interaction events.

[0063] Since users usually browse the knowledge graph first and then perform page interaction, by first rendering the nodes and edges of the knowledge graph and then rendering the interaction events of the nodes, it can help users quickly obtain the graph content of the knowledge graph and facilitate users to interact with the knowledge graph.

[0064] In a possible way, there are multiple pieces of node data. At least according to the layout information, entity type, and rendering priority of the node data, the node data is rendered to obtain the target knowledge graph, including: storing multiple pieces of node data into the processing queue according to the reading order of the multiple pieces of node data; reading the first number of pieces of node data from the processing queue according to the storage order of the multiple pieces of node data, and respectively performing rendering processing on the first number of pieces of node data through the first number of worker processes, where the rendering processing is used to render the node data at least according to the layout information, entity type, and rendering priority of the node data; in response to the target worker process in the first number of worker processes completing the rendering processing of a piece of node data, reading a new piece of node data from the processing queue again, and performing rendering processing on the new piece of node data through the target worker process until all the node data in the processing queue is rendered, obtaining the target knowledge graph.

[0065] Exemplarily, there are multiple pieces of node data. Especially when rendering and processing the knowledge graph under a large amount of data, it takes a lot of rendering time. Therefore, as Figure 2 shown, multiple worker processes can be used to perform rendering processing on multiple pieces of node data in parallel. Among them, the first number can be set according to requirements, and the present disclosure does not limit this.

[0066] Assume the number of worker processes is N, where N is a positive integer. Multiple node data can be stored in the processing queue in the reading order, and then N node data can be read from the processing queue in the storage order of the node data, so that N worker processes can perform parallel rendering processing on the N node data respectively. Furthermore, if a worker process completes the rendering processing of a node data, it continues to read a new node data from the processing queue for rendering processing until all the node data in the processing queue are rendered, and the target knowledge graph is obtained. By performing graph rendering in parallel with multiple processes, the graph rendering efficiency can be improved, thereby improving the page loading speed and avoiding page crashes. Furthermore, when performing knowledge retrieval on the rendered knowledge graph, the knowledge retrieval efficiency can be improved.

[0067] In a possible way, in response to a knowledge graph display operation on the client, data query is performed in the data block corresponding to the target knowledge graph to obtain node data for rendering, including: in response to a display operation on at least one node in the target knowledge graph on the client, determining the node data identifiers corresponding to the at least one node, and sending the node data identifiers to the server, where the server stores the data block corresponding to the target knowledge graph, and the server is used to perform data query in the data block corresponding to the target knowledge graph according to the node data identifiers to obtain node data for rendering, and determining the layout information of the node data, and sending the node data and the layout information to the client; receiving the node data for rendering sent by the server. Determining the layout information of the node data includes: receiving the layout information of the node data sent by the server.

[0068] In this embodiment, one or more nodes to be displayed can be determined. For example, one or more nodes in the existing knowledge graph can be triggered as the nodes to be displayed, or the nodes to be displayed can be determined through search operations or configuration operations, etc. The present disclosure does not limit this.

[0069] Exemplarily, as Figure 5 shown, the target knowledge graph to be displayed can be determined by configuring configuration items such as the display range, query conditions, and filtering conditions, so as to determine the graph nodes to be queried. This configuration page can be displayed by responding to a trigger operation on the query control on the knowledge graph display page, such as Figure 6 the control 61 in. The specific display range, query conditions, and filtering conditions can be set according to requirements. For example, the display range is a certain entity type, the query condition is a certain entity attribute, and the filtering condition is to filter individual nodes, etc. The present disclosure does not limit this. Thus, the corresponding knowledge graph can be displayed according to the user's needs, improving the user experience.

[0070] Exemplarily, the node data identifier corresponding to the node to be displayed is sent to the server. The server queries the corresponding node data from the corresponding data block based on the node data identifier and returns the node data to the client. Compared with the method of transmitting all the node data of the complete knowledge graph to the client and then the client queries the node data of the node to be displayed, it can reduce the network transmission pressure between the server and the client and reduce the data query and data processing pressure of the client.

[0071] Furthermore, the layout calculation of the node data can also be performed by the server, such as the display position of the node on the client page, the aggregation statistics of the node relationships, etc., and the layout information of the node data is returned to the client. The client can directly perform rendering according to the layout information, thereby further reducing the calculation pressure of the client.

[0072] It should be understood that the processing capacity and available memory of the processor of the client are limited, and the rendering calculation amount of the knowledge graph under large-scale data is huge and requires a large amount of memory. By the server executing the query of the node data and the calculation of the layout information, it can reduce the data processing pressure and memory pressure of the client, thereby improving the page rendering speed, further improving the page response speed, and avoiding situations such as non-response (such as a blank page). In addition, it can also prevent memory overflow and avoid situations such as page crashes.

[0073] In this embodiment, when the server queries the node data, it can query the node data corresponding to the node data identifier, and can also continue to query the node data associated with the node data corresponding to the node data identifier according to the requirements and return it to the client together, such as the node data of the next hop or the next two hops of the node data corresponding to the node data identifier, etc., which can be specifically set according to the requirements, and the present disclosure does not limit this. It can display the node data corresponding to the node data identifier and other associated node data to the user, and also ensure the data integrity for subsequent data query and reasoning.

[0074] In a possible way, in response to the knowledge graph display operation on the client, data query is performed in the data block corresponding to the target knowledge graph to obtain the node data for rendering, including: displaying the target knowledge graph and a filtering input box on the client, where the filtering input box is used to filter nodes in the target knowledge graph for display; in response to the input operation in the filtering input box, determining the filtering keyword corresponding to the input operation; querying in the data block corresponding to the target knowledge graph the first node data whose node name includes the filtering keyword and the second node data having a second number of hop connection relationships with the first node data to obtain the node data for rendering.

[0075] Exemplarily, such as Figure 6As shown, the target knowledge graph and the filtering input box can be displayed on the client side. The nodes in the target knowledge graph are displayed according to the layout information. For example, the clustering effects between different nodes are different, so as to intuitively reflect the tightness of the association relationship between the nodes. In addition, Figure 6 Q1 and Q2 in it represent the number of currently displayed nodes, which are positive integers.

[0076] Exemplarily, in response to the input operation in the filtering input box, the corresponding filtering keywords are determined. For example, Figure 6 the "P" in it, so that the first node data whose node name includes "P" and the second node data with a second number of hop connection relationships can be queried from the corresponding data block of the target knowledge graph. Among them, the second number can be set according to requirements, and the present disclosure does not limit this. This process can be executed by the server, and the present disclosure does not limit this.

[0077] In this embodiment, Figure 6 the number of nodes displayed in the shown target knowledge graph is limited. For example, only a certain node and the next-hop node of a certain node may be displayed. When the user queries a certain node, other associated nodes can be further drilled down and displayed, which is convenient for the user to obtain the node information of other nodes related to this node, and is also convenient for combining this node and its associated nodes for data query and reasoning.

[0078] Exemplarily, the nodes corresponding to the first node data and the second node data may not exist in the original knowledge graph, or the association relationship or the clustering effect of the page between the nodes corresponding to the first node data and the second node data is different from that of the original knowledge graph. Therefore, it is necessary to recalculate the layout information for the first node data and the second node data, and re-render the knowledge graph according to the first node data, the second node data, and the corresponding layout information, to obtain a new knowledge graph as shown in Figure 6 so as to be able to intuitively display the node information of the newly obtained nodes and their associated nodes to the user, as well as the association relationships between the nodes.

[0079] It should be understood that in addition to the need to re-obtain node data and perform layout calculations for search operations, for example, when the knowledge graph is zoomed in or out by dragging the mouse to display a new knowledge graph, node data can also be re-obtained and layout calculations can be performed. For example, when the user zooms in on the node P shown in Figure 6 the node data associated with the node P is gradually obtained and the layout is recalculated, and then the node data related to the node P is re-rendered. Since the node data of the entire knowledge graph is not obtained, it is equivalent to zooming in and out of the subgraph, and the amount of data to be processed is greatly reduced, which can ensure that the page does not freeze during the operation, and during the process of zooming in or out of the knowledge graph, the default zoom ratio of the graph can be adapted to ensure that the entire graph is clearly visible.

[0080] In possible ways, the knowledge graph rendering method under large-scale data further includes: in response to a detail viewing operation on a target knowledge graph, displaying a data list corresponding to the target knowledge graph, where the client displays the fourth number of rows of data in the data list, and the fourth number of rows of data is rendered and displayed by the fifth number of document object model elements; in response to a sliding operation on the data list, determining the first data to be displayed in the data list and the second data that has not been swiped away in the fourth number of rows of data according to the sliding distance and sliding direction corresponding to the sliding operation; rendering the first data and the second data based on the fifth number of document object model elements to display a new fourth number of rows of data on the display screen of the client.

[0081] As Figure 7 shown, the list display of the knowledge graph can be implemented based on document object model elements. For example, the detail information of the target knowledge graph can be displayed in a list form. It should be understood that due to the performance limitations of the client, the more document object model elements are rendered on the page, the slower the rendering speed. A fixed number of document object model elements can be set according to user requirements and performance limitations to implement graph rendering, avoiding too many document object model elements to be rendered, thereby improving the page rendering speed. Among them, the fifth number can be set according to requirements, and the present disclosure does not limit this.

[0082] Exemplarily, as Figure 7 shown, assume that the data list includes Y rows of data, and the number of document object model elements can render X rows of data, where Y is greater than X, and X and Y are positive integers. Then, X rows of data can be fixedly rendered on the page. In response to a sliding operation on the data list, determine the first data to be displayed and the second data that has not been swiped away in the originally displayed X rows of data, and then render the first data and the second data based on the fifth number of document object model elements, that is, re-render the page to display a new X rows of data on the display screen of the client. Thus, the display of large-scale data is realized with limited document object model elements, avoiding being limited by the performance limitations of the client and improving the page rendering performance.

[0083] In other possible implementation ways, the network requests sent by the client to the server can be optimized. For example, a reasonable request quantity limit can be set according to the client performance and network performance, and the network requests for requesting a small amount of node data can be merged, thereby reducing the number of requests and reducing the additional overhead of each request.

[0084] In other possible implementations, a data caching policy can also be set. For example, the requested node data can be cached on the client side, and a certain caching time can be set. If the node data has not been updated after the expiration, the node data can be postponed, such as increasing the data validity period of the node data. In this way, when the user requests the node data for the second time, the node data can be obtained from the local, avoiding repeated requests to the server, reducing the number of requests, and improving the query efficiency of the node data and the rendering efficiency of the graph, thereby improving the performance of data query and reasoning.

[0085] In addition, when rendering a knowledge graph with a large amount of data, some unnecessary node information and interaction capabilities can be omitted to further improve the graph rendering efficiency and avoid blank or crashed pages. For example, according to historical interaction information, unused node information and interaction capabilities can be optimized, which can be specifically set according to requirements, and the present disclosure does not limit this.

[0086] Based on the same concept, an embodiment of the present disclosure also provides a knowledge graph rendering device for a large amount of data, as Figure 8 shown. The knowledge graph rendering device 800 may include: A query module 801, configured to perform a data query in a data block corresponding to a target knowledge graph in response to a knowledge graph display operation on the client, so as to obtain node data for rendering, where the data block is obtained by dividing the target knowledge graph according to the ontology structure of the target knowledge graph, and each node data in one data block corresponds to the same entity type in the ontology structure; A first determination module 802, configured to determine the layout information of the node data, where the layout information at least represents the position of the node corresponding to the node data in the client display interface; A second determination module 803, configured to determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and a preset rendering priority, where the preset rendering priority is used to represent the rendering priority of a first specific entity type and a second specific entity type having a specific connection relationship; A rendering module 804, configured to render the node data at least according to the layout information, the entity type, and the rendering priority of the node data to obtain the target knowledge graph.

[0087] Optionally, the rendering module 804 is configured to: Draw the node data as a canvas element according to the layout information corresponding to the node data and the rendering priority, to obtain a knowledge graph node corresponding to the node data; In response to the completion of drawing the node data, edges between the knowledge graph nodes are rendered according to the entity type and the rendering priority of the node data, and scalable vector elements and / or hypertext markup language elements are added to the knowledge graph nodes according to the interaction events associated with the node data, to obtain the target knowledge graph.

[0088] Optionally, there are multiple pieces of the node data, and the rendering module 804 is configured to: Store the multiple pieces of node data into a processing queue in the reading order of the multiple pieces of node data; Read a first number of node data from the processing queue in the storage order of the multiple pieces of node data, and respectively perform rendering processing on the first number of node data through the first number of worker processes, where the rendering processing is used to render the node data at least according to the layout information, the entity type, and the rendering priority of the node data; In response to a target worker process in the first number of worker processes completing the rendering processing of a piece of node data, read a new piece of node data from the processing queue again, and perform rendering processing on the new piece of node data through the target worker process until all the node data in the processing queue are rendered, to obtain the target knowledge graph.

[0089] Optionally, the query module 801 is configured to: In response to a display operation on at least one node in the target knowledge graph at the client, determine a node data identifier corresponding to the at least one node, and send the node data identifier to the server, where the server stores data blocks corresponding to the target knowledge graph, and the server is configured to perform data query in the data blocks corresponding to the target knowledge graph according to the node data identifier, obtain node data for rendering, and determine layout information of the node data, and send the node data and the layout information to the client; Receive the node data for rendering sent by the server; The first determination module 802 is configured to: Receive the layout information of the node data sent by the server.

[0090] Optionally, the query module 801 is configured to: Display the target knowledge graph and a filtering input box at the client, where the filtering input box is used to filter nodes in the target knowledge graph for display; In response to an input operation in the filtering input box, determine a filtering keyword corresponding to the input operation; Query the first node data whose node name includes the filtering keyword and the second node data having a second - quantity hop connection relationship with the first node data in the data block corresponding to the target knowledge graph to obtain the node data for rendering.

[0091] Optionally, the data block is obtained by the following method: Determine the ontology structure of the target knowledge graph and the entity types included in the ontology structure, and use the entity type with the largest scope in the ontology structure as the initial target entity type, and perform the following process: According to the data creation time, divide every third - quantity data belonging to the target entity type in the target knowledge graph into a data block until all the data belonging to the target entity type are divided into data blocks, and use the next entity type connected to the target entity type in the ontology structure as the new target entity type until all the data in the target knowledge graph are divided into data blocks.

[0092] Optionally, the knowledge graph rendering device 800 further includes a viewing module, and the viewing module is used for: In response to the detailed viewing operation of the target knowledge graph, display the data list corresponding to the target knowledge graph, where the client displays the fourth - quantity rows of data in the data list, and the fourth - quantity rows of data are rendered and displayed by the fifth - quantity document object model elements; In response to the sliding operation of the data list, determine the first data to be displayed in the data list and the second data that has not been swiped away in the fourth - quantity rows of data according to the sliding distance and sliding direction corresponding to the sliding operation; Render the first data and the second data based on the fifth - quantity document object model elements to display new fourth - quantity rows of data on the display screen of the client.

[0093] Optionally, the preset rendering priority is configured by the following method: Display a configuration page on the client, where the ontology structure of the target knowledge graph and preset configuration items are displayed in the configuration page. The preset configuration items include a first configuration item for configuring a first specific entity type, a second configuration item for configuring a second specific entity type, a third configuration item for configuring a specific connection relationship between the first specific entity type and the second specific entity type, and a fourth configuration item for configuring the rendering priority; In response to the configuration operations on the preset configuration items in the configuration page, obtain the preset rendering priority.

[0094] Based on the same concept, an embodiment of the present disclosure also provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of any of the above knowledge graph rendering methods under large-scale data are implemented.

[0095] Based on the same concept, an embodiment of the present disclosure also provides an electronic device, which may include: A storage device, on which a computer program is stored; A processing device, configured to execute the computer program in the storage device to implement the steps of any of the above knowledge graph rendering methods under large-scale data.

[0096] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above knowledge graph rendering methods under large-scale data are implemented.

[0097] Next, refer to Figure 9 , which shows a schematic structural diagram of an electronic device 900 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiment of the present disclosure.

[0098] As Figure 9 shown, the electronic device 900 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0099] Generally, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or wiredly to exchange data. AlthoughFigure 9 An electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0100] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0101] It should be noted that the above-mentioned computer-readable medium in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0102] In some embodiments, communication can be performed using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0103] The above computer-readable medium may be included in the above electronic device; or may exist separately without being assembled into the electronic device.

[0104] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: in response to a knowledge graph display operation at the client, perform a data query in the data block corresponding to the target knowledge graph to obtain node data for rendering, where the data block is obtained by dividing the target knowledge graph according to the ontology structure of the target knowledge graph, and each node data in the data block corresponds to the same entity type in the ontology structure; determine the layout information of the node data, where the layout information at least characterizes the position of the node corresponding to the node data in the client display interface; determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between entity types in the ontology structure, and a preset rendering priority, where the preset rendering priority is used to characterize the rendering priority of a first specific entity type and a second specific entity type having a specific connection relationship; render the node data at least according to the layout information, the entity type, and the rendering priority of the node data to obtain the target knowledge graph.

[0105] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute 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 type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0107] The modules described in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0108] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and the like.

[0109] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, 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.

[0110] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0111] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0112] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

Claims

1. A knowledge graph rendering method for large-scale data, characterized in that: The knowledge graph rendering method comprises: In response to a knowledge graph display operation on a client, a data query is performed in a data block corresponding to a target knowledge graph to obtain node data for rendering, wherein the data block is obtained by dividing the target knowledge graph according to an ontology structure of the target knowledge graph, and each node data in the data block corresponds to the same entity type in the ontology structure; Determine layout information of the node data, wherein the layout information at least represents a position of a node corresponding to the node data in the client display interface; Determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between the entity types in the body structure, and a preset rendering priority, wherein the preset rendering priority is used to characterize the rendering priority of a first specific entity type and a second specific entity type having a specific connection relationship; The node data is rendered at least according to the layout information of the node data, the entity type and the rendering priority to obtain the target knowledge graph.

2. The knowledge graph rendering method under large-scale data according to claim 1 is characterized in that: The step of rendering the node data at least according to the layout information of the node data, the entity type and the rendering priority to obtain the target knowledge graph includes: According to the layout information corresponding to the node data and the rendering priority, the node data is drawn as a canvas element to obtain a knowledge graph node corresponding to the node data; In response to the completion of drawing the node data, the edges between the knowledge graph nodes are rendered according to the entity type and the rendering priority of the node data, and scalable vector elements and / or hypertext markup language elements are added to the knowledge graph nodes according to the interactive events associated with the node data to obtain the target knowledge graph.

3. The knowledge graph rendering method under large-scale data according to claim 1 is characterized in that: The node data is multiple, and the node data is rendered at least according to the layout information, the entity type and the rendering priority of the node data to obtain the target knowledge graph, including: According to the reading order of the plurality of node data, the plurality of node data are stored in a processing queue; Reading a first number of node data from the processing queue according to the storage order of the plurality of node data, and performing rendering processing on the first number of node data respectively through the first number of working processes, wherein the rendering processing is used to render the node data at least according to the layout information of the node data, the entity type and the rendering priority; In response to the target work process among the first number of work processes completing the rendering processing of the node data, a new node data is read from the processing queue again, and the new node data is rendered through the target work process until all the node data in the processing queue are rendered and processed to obtain the target knowledge graph.

4. The knowledge graph rendering method under large-scale data according to claim 1 is characterized in that: In response to the knowledge graph display operation on the client, data query is performed in the data block corresponding to the target knowledge graph to obtain node data for rendering, including: In response to a display operation of at least one node in a target knowledge graph on a client, a node data identifier corresponding to the at least one node is determined, and the node data identifier is sent to a server, wherein the server stores a data block corresponding to the target knowledge graph, and the server is used to perform a data query in the data block corresponding to the target knowledge graph according to the node data identifier, obtain node data for rendering, and determine layout information of the node data, and send the node data and the layout information to the client; Receiving node data for rendering sent by the server; The determining the layout information of the node data includes: Receive the layout information of the node data sent by the server.

5. The knowledge graph rendering method under large-scale data according to claim 1 is characterized in that: In response to the knowledge graph display operation on the client, data query is performed in the data block corresponding to the target knowledge graph to obtain node data for rendering, including: Displaying a target knowledge graph and a filter input box on the client, wherein the filter input box is used to filter nodes in the target knowledge graph for display; In response to an input operation in the filter input box, determining a filter keyword corresponding to the input operation; In the data block corresponding to the target knowledge graph, the node name includes the first node data of the screening keyword and the second node data having a second number of jump connection relationships with the first node data, to obtain the node data for rendering.

6. The knowledge graph rendering method under large-scale data according to any one of claims 1 to 5, characterized in that: The data blocks are divided in the following manner: Determine the ontology structure of the target knowledge graph and the entity types included in the ontology structure, and use the entity type with the largest range in the ontology structure as the initial target entity type, and perform the following process: According to the data creation time, every third number of data belonging to the target entity type in the target knowledge graph is divided into a data block, until all the data belonging to the target entity type are divided into data blocks, and the next entity type connected to the target entity type in the ontology structure is used as the new target entity type, until all the data in the target knowledge graph are divided into data blocks.

7. The knowledge graph rendering method under large-scale data according to any one of claims 1 to 5, characterized in that: The knowledge graph rendering method further includes: In response to a detail viewing operation on the target knowledge graph, a data list corresponding to the target knowledge graph is displayed, wherein the client displays a fourth number of rows of data in the data list, and the fourth number of rows of data is rendered and displayed by a fifth number of document object model elements; In response to a sliding operation on the data list, determining first data to be displayed in the data list and second data in the fourth number of rows of data that have not been slid away according to a sliding distance and a sliding direction corresponding to the sliding operation; The first data and the second data are rendered based on the fifth number of document object model elements to display a fourth number of new rows of data on a display screen of the client.

8. The knowledge graph rendering method under large-scale data according to any one of claims 1 to 5, characterized in that: The preset rendering priority is configured as follows: Displaying a configuration page on the client, wherein the configuration page displays an ontology structure of the target knowledge graph and preset configuration items, wherein the preset configuration items include a first configuration item for configuring a first specific entity type, a second configuration item for configuring a second specific entity type, a third configuration item for configuring a specific connection relationship between the first specific entity type and the second specific entity type, and a fourth configuration item for configuring a rendering priority; In response to configuration operations on the preset configuration items respectively in the configuration page, the preset rendering priority is obtained.

9. A knowledge graph rendering device for large-scale data, characterized in that: The knowledge graph rendering device comprises: A query module, for performing a data query in a data block corresponding to a target knowledge graph in response to a knowledge graph display operation on a client, and obtaining node data for rendering, wherein the data block is obtained by dividing the target knowledge graph according to an ontology structure of the target knowledge graph, and each node data in the data block corresponds to the same entity type in the ontology structure; A first determination module is used to determine layout information of the node data, wherein the layout information at least represents the position of the node corresponding to the node data in the client display interface; a second determination module, configured to determine the entity type of the data block to which the node data belongs as the entity type of the node data, and determine the rendering priority of the node data according to the entity type of the node data, the connection relationship between the entity types in the body structure, and a preset rendering priority, wherein the preset rendering priority is used to characterize the rendering priority of a first specific entity type and a second specific entity type having a specific connection relationship; A rendering module is used to render the node data at least according to the layout information of the node data, the entity type and the rendering priority to obtain the target knowledge graph.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Knowledge graph display method and device, computer device and readable storage medium

    CN112035708A

  • Page data processing method and device, equipment, medium and computer program product

    CN112784200A

  • Front-end rendering method and system of knowledge graph, electronic equipment and storage medium

    CN112988950A

  • Target node determination method and device

    CN115242613A

  • Dynamic sorting of virtual nodes

    US20060143205A1