A knowledge graph presentation method, an electronic device, and a storage medium

By acquiring key nodes, dividing them into grid cells, and calculating area distribution scores, the node layout of the knowledge graph is optimized, solving the problem of confusion caused by traditional layout algorithms and achieving a clear knowledge graph presentation.

CN120821879BActive Publication Date: 2025-12-05HANGZHOU YSCREDIT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511344456.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-12-05
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Traditional force-directed layout algorithms are prone to causing layout chaos, loss of focus, and overcrowding or scattering of edge nodes in large-scale and complex knowledge graphs, making it difficult to achieve clear visualization.

Method used

By acquiring key nodes, dividing the grid into units, calculating the area distribution score, and adjusting the node positions, the node layout is optimized using a force-directed layout algorithm to ensure that key nodes are reasonably distributed in the central area and non-key nodes are reasonably presented in local areas.

Benefits of technology

It achieves a reasonable layout of the knowledge graph, with a reasonable distribution of key and non-key nodes, improving the clarity of presentation and space utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821879B_ABST
    Figure CN120821879B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, in particular to a knowledge graph presentation method, an electronic device and a storage medium, the method comprises the following steps: acquiring a plurality of key nodes from a given knowledge graph, dividing a preset presentation page into an initial node grid containing a plurality of grid units and acquiring a corresponding grid unit of each key node in the initial node grid, calculating an area allocation score corresponding to each key node, adjusting the area of the corresponding grid unit of each key node in the initial node grid based on the area allocation score corresponding to each key node, obtaining a target node grid, adjusting the presentation positions of each key node and non-key node based on the target node grid, and obtaining a target knowledge graph finally presented; the application can optimize the node positions in the knowledge graph, realize reasonable layout of the presentation page, and make the presented knowledge graph clearer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a knowledge graph presentation method, electronic device, and storage medium. Background Technology

[0002] With the development of information technology, knowledge graphs, as an efficient knowledge representation and reasoning technology, have been widely used in various fields such as search engines, intelligent question answering, and big data analysis. Knowledge graphs typically contain a large number of nodes and edges, and their visual presentation is crucial for users to intuitively understand the graph structure and discover potential relationships.

[0003] Currently, common knowledge graph visualization methods mainly employ force-directed layout algorithms. These algorithms automatically calculate node positions by simulating physical mechanics, such as repulsive forces between nodes and attractive forces between edges, thus presenting a clear community structure. However, when the graph is large and complex, traditional force-directed layout algorithms may lead to problems such as chaotic layout, loss of focus, and overcrowded or scattered edge nodes.

[0004] Therefore, there is an urgent need to provide a knowledge graph presentation method that has a reasonable layout and can make the presented knowledge graph clearer. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a knowledge graph presentation method, electronic device, and storage medium, which can optimize the node positions in the knowledge graph, achieve a reasonable layout of the presentation page, and make the presented knowledge graph clearer.

[0006] According to a first aspect of the present invention, a knowledge graph presentation method is provided, comprising the following steps:

[0007] S100, Obtain several key nodes from the given knowledge graph; the key nodes refer to nodes in the given knowledge graph whose number of corresponding neighbor nodes is not less than n.

[0008] S200, based on the number of key nodes, divides the preset presentation page into an initial node grid containing several grid units and obtains the grid unit corresponding to each key node in the initial node grid.

[0009] S300: Based on the number of neighboring nodes of different preset entity types connected to each key node and the preset presentation area corresponding to each preset entity type node, calculate the area allocation score corresponding to each key node.

[0010] S400 adjusts the area of ​​the grid cell corresponding to each key node in the initial node grid based on the area allocation score of each key node to obtain the target node grid.

[0011] S500, based on the target node grid, adjusts the presentation positions of each key node and non-key node to obtain the final presented target knowledge graph; where a non-key node refers to any node in the given knowledge graph other than key nodes.

[0012] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the knowledge graph presentation method described above.

[0013] According to a third aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0014] The present invention has at least the following beneficial effects:

[0015] This invention provides a knowledge graph presentation method. First, several key nodes are obtained from a given knowledge graph. Based on the number of key nodes, a preset presentation page is divided into an initial node grid containing several grid units. The corresponding grid unit for each key node in the initial node grid is obtained, achieving a distributed layout of key nodes. Key nodes with more connected nodes are preferentially allocated towards the center of the initial node grid, making the presentation position of each key node more reasonable. Next, the area allocation score corresponding to each key node is calculated. Based on the area allocation score, the area of ​​the grid unit corresponding to each key node in the initial node grid is adjusted to obtain the target node grid. Finally, based on the target node grid, the presentation positions of each key node and non-key node are adjusted. This ensures that key nodes do not leave their corresponding cells, while also ensuring that strongly related non-key nodes are reasonably presented in a preset local area near the key nodes, achieving a reasonable layout of the presentation page and making the presented knowledge graph clearer. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart of a knowledge graph presentation method provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] This invention provides a knowledge graph presentation method, such as... Figure 1 As shown, the method includes the following steps:

[0020] S100, Obtain several key nodes from the given knowledge graph; the key nodes refer to nodes in the given knowledge graph whose number of corresponding neighbor nodes is not less than n; it can be understood as: nodes whose number of connected neighbor nodes exceeds a certain threshold are used as the main position adjustment nodes.

[0021] Specifically, a given knowledge graph refers to nodes that include several predefined entity types. For example, when constructing a knowledge graph of corporate financing relationships or bidding relationships, there are two predefined entity types: enterprises and legal persons.

[0022] S200, based on the number of key nodes, divides the preset presentation page into an initial node grid containing several grid units and obtains the grid unit corresponding to each key node in the initial node grid; it can be understood that the preset presentation page refers to a page that is pre-built to present a given knowledge graph.

[0023] Specifically, dividing the preset presentation page into an initial node grid containing several grid units includes the following steps:

[0024] S201, Calculate the aspect ratio R of the preset page.

[0025] S202, set the number of rows and columns of the initial node grid as a and b respectively, traverse all values ​​of a from 1 to L, and calculate the value of b for each value; where b = roundup(L / a), roundup() is the round-up function, and L is the number of key nodes.

[0026] S203, obtain the values ​​of a and b that have the smallest absolute difference between the mesh aspect ratio b / a and R, so as to obtain the initial node mesh after division; this can be understood as: taking the values ​​of a and b that have the smallest absolute difference between the mesh aspect ratio b / a and R as the number of rows and columns of the initial node mesh after division.

[0027] As mentioned above, when dividing the preset presentation page, the number of grid units was guaranteed to ensure that all key nodes could be assigned to the corresponding grid units. In addition, aspect ratio calculation was introduced to make the aspect ratio of the divided grid units as close as possible to the aspect ratio of the preset presentation page, thereby making the divided grid units more reasonable and improving the space utilization of the preset presentation page.

[0028] Furthermore, obtaining the corresponding mesh cell for each key node in the initial node mesh includes the following steps:

[0029] S210, calculate the association strength between every two key nodes and construct an association matrix. Those skilled in the art are familiar with how to calculate the association strength between any two nodes, so it will not be elaborated here.

[0030] S220, based on the aforementioned correlation matrix, a force-directed layout algorithm is used to calculate the two-dimensional coordinates corresponding to each key node. Those skilled in the art will understand the specific implementation steps for calculating the two-dimensional coordinates of nodes using the force-directed layout algorithm, and will not be elaborated upon here.

[0031] S230 normalizes the two-dimensional coordinates of each key node to the coordinate space of the initial node grid, and obtains the grid cell corresponding to each key node in the initial node grid; this can be understood as: assigning each key node to the grid cell where its normalized coordinates are located.

[0032] As described above, the grid cell that matches each key node is found by calculating the correlation strength between each pair of key nodes. The presentation positions of key nodes are distributed based on maximizing the use of the preset presentation page. Since key nodes are nodes with a large number of neighboring nodes, the presentation position of each key node is more reasonable by distributing the key node positions. Furthermore, key nodes with more connected nodes are preferentially assigned to the center of the initial node grid, thus optimizing the presentation layout of the knowledge graph.

[0033] S300: Based on the number of neighboring nodes of different preset entity types connected to each key node and the preset presentation area corresponding to each preset entity type node, calculate the area allocation score corresponding to each key node.

[0034] In one implementation, the preset display area corresponding to the node of the preset entity type is proportional to the importance of the preset entity type; this can be understood as: assigning importance to each preset entity type, the higher the importance, the larger the corresponding preset display area, and the preset display area corresponding to the node is generally a solid circle.

[0035] In another implementation, the preset display area corresponding to the node of the preset entity type is proportional to the average number of characters in the name of the node corresponding to the preset entity type. For example, company names are generally longer, while legal person names are generally shorter, so a larger preset display area is set for the node corresponding to the company.

[0036] Preferably, the area allocation score corresponding to the key node meets the following conditions:

[0037] Where Q represents the area allocation score corresponding to any key node, m is the number of preset entity types, and S i N represents the preset rendering area corresponding to the i-th preset entity type node. i The number of nodes of the i-th preset entity type connected to the key node.

[0038] As mentioned above, when calculating the area allocation score of key nodes, since the preset presentation area corresponding to different preset entity types is inconsistent, the proportion of the preset presentation area corresponding to each preset entity type and the number of nodes connecting different preset entity types are introduced to make the obtained area allocation score more reasonable. That is, the more nodes with larger preset presentation areas, the larger the corresponding area allocation score, which is conducive to optimizing the overall page layout.

[0039] S400 adjusts the area of ​​the grid cell corresponding to each key node in the initial node grid based on the area allocation score of each key node to obtain the target node grid.

[0040] In one specific embodiment, step S400 includes the following steps:

[0041] S401, for any key node, calculate the proportion of the area allocation score corresponding to the key node to the total area allocation score of all key nodes.

[0042] S402, the product of the total rendering area of ​​the initial node mesh and the aforementioned ratio is used as the area of ​​the mesh cell corresponding to the key node, thereby adjusting the area of ​​the mesh cell corresponding to the key node in the initial node mesh to obtain the target node mesh. In one embodiment, during adjustment, the key node closest to the center of the initial node mesh is used as the adjustment reference. While keeping the center of the mesh cell corresponding to the key unchanged, the area of ​​the mesh cell is expanded, and the area of ​​each mesh cell is adjusted by sequentially expanding outward. The center point of the outer mesh can be shifted outward accordingly, and the shift distance decreases sequentially according to a preset shift distance. It should be noted that mesh cell overlap may occur during the adjustment process.

[0043] As mentioned above, since the larger the area allocation score of the key node, the more neighboring nodes the key node has, it should be allocated a larger display cell. This is beneficial for the subsequent setting of the preset local area, so that when optimizing the position of key nodes and non-key nodes, it can ensure that the key node does not leave its corresponding cell, and that strongly related non-key nodes are reasonably displayed in the preset local area near the key node.

[0044] S500, based on the target node grid, adjusts the presentation positions of each key node and non-key node to obtain the final presented target knowledge graph; where a non-key node refers to any node in the given knowledge graph other than key nodes.

[0045] In a specific embodiment, step S500 includes the following steps:

[0046] S501: For any critical node, based on the average coordinates of several neighboring nodes connected to the critical node, the critical node is moved within its own grid cell in the direction of the average coordinates with a preset offset step size. This can be understood as: the average coordinates of the neighboring nodes connected to the critical node refer to the centroids of the several neighboring nodes connected to the critical node. Those skilled in the art can set the preset offset step size according to actual needs, which will not be elaborated here.

[0047] S502: Each non-critical node is initially assigned to a preset local area containing a critical node with the highest correlation strength with itself. A force-directed layout algorithm is then used, centered on the corresponding critical node, to calculate the local position of each non-critical node. It should be noted that a global repulsive force is applied during the calculation to prevent overlap between non-critical nodes in different local areas, and edge constraints are applied to ensure that all nodes are within the preset rendering page.

[0048] S503, iteratively execute the above steps S501 and S502 until the average position change of all nodes is less than the preset change threshold or the maximum number of iterations is reached, and obtain the final presentation positions of key nodes and non-key nodes; it can be understood that the average position change can be the average of several position change distances.

[0049] As described above, with the positions of key nodes already preliminarily determined, the connection strength between each non-key node and the key node, as well as the distribution center of neighboring nodes, are then considered to fine-tune the positions of key and non-key nodes, making the final knowledge graph more reasonable and clear.

[0050] Furthermore, after updating the target knowledge graph, since the target knowledge graph contains a large amount of data, and the collection time or source is different, in order to avoid the same entity appearing repeatedly in the knowledge graph with the same name or different names, the method further includes the following steps:

[0051] P100, based on the acquired first entity to be analyzed, second entity to be analyzed, and the preset attribute parameter set corresponding to each entity to be analyzed, calculates the data similarity between the preset attribute parameter sets corresponding to the first entity to be analyzed and the second entity to be analyzed, respectively. This can be understood as: extracting parameter values ​​corresponding to several preset attribute indicators from each preset attribute feature text corresponding to the first and second entities to be analyzed. For example, when the entity to be analyzed is a legal person or a platform user, several preset attribute indicators include, but are not limited to, basic personal information such as height, gender, education level, graduating institution, date of birth, and zodiac sign. Data similarity can be understood as semantic data similarity.

[0052] Specifically, the first entity to be analyzed and the second entity to be analyzed are entities corresponding to any two nodes of the target entity type among several preset entity types.

[0053] Preferably, the first and second texts to be analyzed are obtained through the following steps:

[0054] P101, based on the preset attribute parameter set corresponding to each preset entity in the target knowledge graph, transform each preset attribute parameter set into a corresponding attribute parameter vector; this can be understood as: the preset entity is any entity belonging to the target type in the target knowledge graph in the preset database. For example, when the target knowledge graph includes information such as company name and legal person name, the preset entity is any legal person name.

[0055] On page 102, a pre-defined clustering model is used to cluster several attribute parameter vectors to obtain several attribute parameter vector clusters. For example, a k-means clustering model or an adaptive iterative clustering model can be used. Those skilled in the art are familiar with the specific implementation methods of these two clustering models, and will not be described in detail here.

[0056] P103, take any two attribute parameter vectors in any attribute parameter vector cluster as the first entity to be analyzed and the second entity to be analyzed.

[0057] As mentioned above, since there may be cases in the target knowledge graph where the same entity has different names due to different data acquisition sources, it is necessary to identify the same entity. However, through the clustering process described above, entities with similar information can be grouped into a cluster. Only entities within the same cluster need to be analyzed, without having to judge whether an entity is the same as all other entities, which greatly reduces the amount of data computation.

[0058] P200, if the name data corresponding to the first entity to be analyzed is the same as the name data corresponding to the second entity to be analyzed, and the data similarity is greater than a first preset similarity threshold, then the first entity to be analyzed and the second entity to be analyzed are determined to be the same entity. Those skilled in the art can set the first preset similarity threshold according to actual needs, for example, 90%.

[0059] As mentioned above, since a node is usually used to represent an entity or object in a knowledge graph, when the name data of two entities to be analyzed are the same, it indicates that there is a certain probability that they are the same entity. However, in order to avoid coincidences, further judgment is required. Based on this, a comparison of the data similarity and threshold of the preset attribute parameter set is introduced. When the data similarity is high, the two entities to be analyzed are considered to be the same entity, which improves the accuracy of the judgment results.

[0060] P300, when the data similarity is not greater than a first preset similarity threshold but greater than a second preset similarity threshold, the historical activity areas and corresponding historical activity time periods of the first and second entities to be analyzed within a preset time period before the current moment are crawled from the given platform. For example, historical activity areas and historical activity time periods are searched from web pages or a given information platform. The historical activity area can be specific location information such as the address of an office building of a company, a hotel, or a factory. Those skilled in the art can set the second preset similarity threshold according to actual needs.

[0061] As mentioned above, when the obtained preset attribute parameter information is incomplete or the data changes due to different data uploaded at different times, there may be cases where the data similarity is not high enough. In this case, further judgment is required, which improves the reliability of the judgment result.

[0062] Furthermore, the method also includes:

[0063] When the data similarity is not greater than the second preset similarity threshold, it is determined that the first entity to be analyzed and the second entity to be analyzed are not the same entity.

[0064] P400, obtain the first target device set of the first entity to be analyzed in the corresponding historical activity area and the corresponding historical activity period, and the second target device set of the second entity to be analyzed in the corresponding historical activity area and the corresponding historical activity period.

[0065] When acquiring target devices in historical activity areas and historical activity periods, the system obtains all devices that were in the historical activity area during the historical activity period based on the anonymous location information uploaded by the devices.

[0066] As mentioned above, since the location information of the entity to be analyzed cannot be directly obtained, when the historical activity area and historical activity period are known, the first target device set contains the device corresponding to the first entity to be analyzed, and the second target device set contains the device corresponding to the second entity to be analyzed. By determining whether there is a device in the same set, another possibility can be provided for determining the same entity while ensuring privacy.

[0067] P500, if it is determined that some first target devices in the first target device set and some second target devices in the second target device set have the same devices, then the first entity to be analyzed and the second entity to be analyzed are determined to be the same entity.

[0068] In a preferred embodiment, the process for determining whether there are identical devices among a plurality of first target devices in the first target device set and a plurality of second target devices in the second target device set is as follows:

[0069] P501, based on the unique identification codes corresponding to the first target device and the second target device respectively, if there is a common unique identification code between the first target device and the second target device, output the judgment result that there are several first target devices and several second target devices with the same unique identification code. For example, the unique identification code is any one of IMEI identification code, OAID identifier, and IDFV identifier, and the types of the unique identification codes corresponding to the first target device and the second target device are the same.

[0070] P502, when no judgment result is obtained indicating that several first target devices and several second target devices have the same device, the trajectory data of each first target device and each second target device in a preset historical time period is obtained. For example, due to insufficient permissions, it is impossible to obtain the unique identification code of all devices, or due to different systems, the unique identification code is displayed in a different way.

[0071] P503, calculate the similarity between the trajectory data of each first target device in the preset historical time period and the trajectory data of each second target device in the preset historical time period, and generate a trajectory similarity matrix.

[0072] The similarity calculation of trajectory data includes the following steps:

[0073] P5031, calculate the spatial distance between the location points at corresponding time points of two trajectory data.

[0074] P5032, Based on the time series of the spatial distance, calculate the trajectory similarity between the two trajectory data. For example, the trajectory similarity between the two trajectories can be calculated using a dynamic time warping algorithm or a Fraser distance algorithm.

[0075] P504, based on a preset first trajectory similarity threshold, select target device pairs from the trajectory similarity matrix whose trajectory similarity is higher than the first trajectory similarity threshold; the first trajectory similarity threshold is set according to the duration of a preset historical period and the average device density corresponding to the preset historical period.

[0076] When setting the first trajectory similarity threshold, considering that the shorter the preset historical period (i.e., the observation time), the more likely the two trajectories are to be similar, the higher the probability of similarity, the more likely the first trajectory similarity threshold should be. Therefore, the first trajectory similarity threshold should be inversely proportional to the preset historical period. In densely populated areas such as city centers or train stations, the probability of two devices sharing the same trajectory is higher. To reduce the possibility of misjudgment, the first trajectory similarity threshold should be increased. Therefore, the first trajectory similarity threshold should be directly proportional to the average device density. Thus, normalization and other methods can be used to convert the duration of the preset historical period and the average device density to the same data volume, and then a weighted sum can be calculated based on the weights corresponding to the duration of the preset historical period and the average device density to obtain the first trajectory similarity threshold.

[0077] P505 divides a preset historical period into preset time windows. If the trajectory similarity of the first target device and the second target device in a target device pair is greater than a preset second trajectory similarity threshold within each time window, the system outputs a judgment result indicating that several first target devices and several second target devices have the same device. Those skilled in the art can set the second trajectory similarity threshold according to actual needs, which will not be elaborated here.

[0078] As described above, when determining whether the same device exists in different areas at different times, the first consideration is to accurately identify the unique identification code of the device. If not all unique identification codes of the devices can be identified, another method is used, namely the trajectory data reported by the device. Device pairs with high trajectory similarity are first filtered out, and then the trajectory is segmented and the similarity of each small segment is compared separately. This improves the accuracy of trajectory similarity calculation and thus improves the reliability of the judgment result. Since the probability that the device trajectory is continuously similar to the activity location and activity time of a certain entity is very low, the identified identical devices are considered to be devices corresponding to two entities to be analyzed, which improves the credibility that the two entities to be analyzed are the same entity.

[0079] Furthermore, the confidence level of the judgment result output by step P505 is lower than that of the judgment result output by step P501. Staff can decide whether to conduct further verification based on the accuracy requirements. By identifying two entities to be analyzed that have the same judgment result, a data basis is also provided for further verification.

[0080] In another embodiment, the method further includes the following steps:

[0081] P10, if the name data corresponding to the first entity to be analyzed is different from the name data corresponding to the second entity to be analyzed, and the semantics of the preset attribute parameter set corresponding to the first entity to be analyzed and the preset attribute parameter set corresponding to the second entity to be analyzed are completely consistent, then the first entity to be analyzed and the second entity to be analyzed are determined to be the same entity.

[0082] P20, when the semantics of two preset attribute parameter sets are not completely consistent and the data similarity between the two preset attribute parameter sets is greater than the first preset similarity threshold, crawl the historical activity areas and corresponding historical activity periods of the first entity to be analyzed and the second entity to be analyzed within the preset time before the current time from the given platform.

[0083] Furthermore, the method also includes:

[0084] When the data similarity between the preset attribute parameter set corresponding to the first entity to be analyzed and the preset attribute parameter set corresponding to the second entity to be analyzed is not greater than the first preset similarity threshold, it is determined that the first entity to be analyzed and the second entity to be analyzed are not the same entity.

[0085] P30, obtain the first set of target devices of the first entity to be analyzed in the corresponding historical activity area and the corresponding historical activity period, and the second set of target devices of the second entity to be analyzed in the corresponding historical activity area and the corresponding historical activity period.

[0086] P40, if it is determined that some first target devices in the first target device set and some second target devices in the second target device set have the same devices, then the first entity to be analyzed and the second entity to be analyzed are determined to be the same entity.

[0087] The above analysis addresses the case where the names of two entities are different. When they are different, the probability of them belonging to the same entity is relatively low. Therefore, this increases the strictness of the judgment condition compared to the case where the names are the same, ensuring the reliability of the judgment result.

[0088] Furthermore, the method also includes the following steps:

[0089] P1. If the first entity to be analyzed and the second entity to be analyzed are the same entity, retrieve several objects that have connections with the first entity to be analyzed and the second entity to be analyzed from the target knowledge graph stored in the preset database. These objects include multiple types, and the first entity to be analyzed and the second entity to be analyzed are objects of the same type.

[0090] P2 will associate and integrate several objects that are connected to the first entity to be analyzed and several objects that are connected to the second entity to be analyzed, and store them in a preset database.

[0091] By finding and storing related data for the same entity, positive effects have been achieved on updating the target knowledge graph and managing the statistical data.

[0092] Based on this, the method further includes the following steps:

[0093] P3, set the association integration result in a preset hidden box in the preset presentation page; the association integration result includes several objects that are connected to the first entity to be analyzed, several objects that are connected to the second entity to be analyzed, and an association identifier.

[0094] P4, when it receives a user's instruction to click on the preset hidden box, will display the associated and integrated results according to the preset display area.

[0095] As mentioned above, when identifying entities with the same name or different names in the target knowledge graph as the same entity, while ensuring an intuitive display effect, the data complexity of the knowledge graph displayed on the page is limited and constrained by spatial arrangement. Therefore, it is not necessary to convert two entities into one entity on the page and connect the objects connecting the two entities to the converted entity. It is only necessary to store the relationship and pre-set it in a preset hidden box so that users can query according to their needs. This not only obtains the related data but also ensures the page presentation effect and user convenience.

[0096] In another embodiment, accurately and comprehensively identifying the potential objects associated with each node before acquiring a given knowledge graph is crucial for the accurate construction of the knowledge graph and subsequent data analysis. Based on this, the method further includes the following steps:

[0097] F100, based on the information of the object to be processed uploaded by the server to be processed, obtains the parameter value corresponding to each of a preset set of parameters to be processed; this can be understood as: the server to be processed is the server corresponding to the object to be processed. For example, the object to be processed can be an enterprise or a platform.

[0098] Specifically, the parameters to be processed include several technical capability parameters and several preset basic information parameters.

[0099] In practical implementation, when the target is an enterprise, the technical capability information includes the number of technical documents generated by the enterprise annually, and the preset basic information includes average education level, average salary, office space, years of establishment, and number of employees covered by social security. When the target is a platform, the technical capability information includes the number of technical documents generated by the platform annually, and the preset basic information includes the total number of target users corresponding to the platform identifier, the number of target users annually, the average usage period of target users, and the longest usage period. The number of technical documents can be the number of authorized patent documents.

[0100] Furthermore, the parameter values ​​corresponding to several technical capability parameters include the total number of technical texts generated by the object to be processed, the technical text quality score, the technical development trend score within a preset time period, and the current degree of influence in the technical community; this can be understood as: the current degree of influence in the technical community refers to the current degree of influence in the same technical field or the same industry. Those skilled in the art can set the preset time period according to actual needs, such as 5-10 years.

[0101] In one specific embodiment, the evaluation dimensions of the technical text quality score include the total number of patent application texts and the authorization rate. For example, the total number of patent application texts is normalized to a range of 0-1, and the technical text quality score is obtained by weighted summation using preset weights corresponding to the total number of patent application texts and the authorization rate.

[0102] In a specific embodiment, the technological development trend score within a preset time period is obtained through the following steps:

[0103] F101, obtain the number of technical documents per year within a preset time period, and determine the fluctuation of the number of technical documents; the fluctuation can be any one of rising, falling, stable, and wave-like.

[0104] F102, based on the fluctuations in the number of technical texts, determines several preset fitting curve models corresponding to the fluctuations, and selects the model with the lowest dispersion among these preset fitting curve models as the target fitting curve model; this can be understood as: a preset database stores several preset fitting curve models corresponding to each fluctuation. Each preset fitting curve model is used to fit the number of technical texts to obtain the preset fitting curve model with the lowest dispersion.

[0105] F103 determines the preset importance level corresponding to the target fitted curve model; the preset importance level decreases sequentially from high to low according to the development trend of the characterization technology. For example, when the target fitted curve model is a power function, it indicates a high level of technological development, and the corresponding preset importance level is also higher.

[0106] F104 preprocesses the data on the preset importance level and the total number of technical texts within a preset time period corresponding to the target fitted curve model, and calculates the technology development trend score by combining the preset weights corresponding to the preset importance level and the total number of technical texts. Data preprocessing refers to normalizing the preset importance level and the total number of technical texts to values ​​of the same order of magnitude, such as both being between 0 and 1.

[0107] As mentioned above, the technological development trend score of the object to be processed can characterize the development capability of the object. When calculating the technological development trend score, the most accurate target fitting curve model is selected by analyzing the fluctuation of the number of technical texts. The technological development trend score is obtained by comprehensively considering the importance of the target fitting curve model and the total number of technical texts. This makes the obtained technological development trend score more reasonable and accurate, which is conducive to accurately evaluating the development capability of the object to be processed.

[0108] In a specific embodiment, the current level of influence of the object to be processed in the technical community is obtained through the following steps:

[0109] F110 extracts technical keywords from each technical text within a preset time period and forms a first keyword vector.

[0110] During implementation, to avoid having too many keywords, core keywords that meet preset conditions are extracted based on semantics, or keywords that are consistent with business operations are selected from the extracted keywords.

[0111] F120 retrieves the second keyword vector corresponding to each preset object in the preset database; it can be understood that the second keyword vector is obtained in the same way as the first keyword vector, so it will not be elaborated here.

[0112] Specifically, the preset object refers to any object whose attribute tag has a similarity greater than a preset similarity threshold with the attribute tag of the object to be processed. For example, when the object to be processed is a company, the attribute tag is any industry category tag to which the object to be processed belongs.

[0113] F130 performs clustering on the first keyword vector and several second keyword vectors, and obtains the first target cluster corresponding to the object to be processed based on the clustering result; it can be understood that the first target cluster is the cluster where the object to be processed belongs. In specific implementations, the k-means clustering algorithm can be used.

[0114] F140, based on the distance between the object to be processed and the centroid of the first target cluster and the maximum distance corresponding to the first target cluster, calculate the current influence level S of the object to be processed in the technical community; the current influence level S meets the following conditions:

[0115] S = 1 - (d / r), where d is the distance between the object to be processed and the centroid of the first target cluster, and r is the maximum distance corresponding to the first target cluster.

[0116] As described above, calculating the current influence of the object to be processed in the technical community can characterize the importance of the object in this technical field. When calculating the current influence, the object to be processed is clustered with several preset objects with the same attribute labels. Objects clustered into a cluster indicate that they are objects with similar development potential or scale. Since the total distance from the cluster centroid to each vector is optimal, and the closer the distance to the cluster centroid, the higher the importance of the object, the current influence of the object to be processed in the technical community obtained by the above method is more reliable.

[0117] Furthermore, the preset basic information parameters include several parameters used to characterize the scale and resource configuration of the object to be processed. In one implementation, the preset basic information parameters may be values ​​obtained by performing data standardization processing on any of the aforementioned preset basic information parameters.

[0118] F200 merges the parameter values ​​corresponding to each parameter to be processed and transforms them into feature vectors corresponding to the objects to be processed. It then clusters these feature vectors with the feature vectors corresponding to each preset object obtained from the preset database. Based on the clustering results, it determines the reference objects corresponding to the objects to be processed.

[0119] Preferably, the reference object corresponding to the object to be processed is determined through the following steps:

[0120] F201 standardizes both the feature vector corresponding to the object to be processed and the feature vector corresponding to the preset object, so that each feature in the feature vector is on the same scale. For example, the Z-score standardization algorithm or the Min-Max normalization method can be used. Those skilled in the art are familiar with the specific implementation of the above two standardization methods, and will not be described in detail here.

[0121] F202 clusters several standardized feature vectors based on a preset number of clusters K, and determines the second target cluster corresponding to the object to be processed from the K clusters obtained.

[0122] In one implementation, those skilled in the art can set the K value according to actual needs, for example, K can be set to 3 based on the importance of high, medium and low, or the K value can be obtained by using the profile coefficient method. Those skilled in the art are familiar with the implementation of the profile coefficient method, and it will not be described in detail here.

[0123] F203 uses the Z preset objects whose feature vectors within the second target cluster are closest to the feature vectors of the object to be processed as reference objects.

[0124] Preferably, Z is proportional to the number of samples in the second target cluster.

[0125] As described above, by obtaining the parameter values ​​of the object to be processed under multiple indicators and merging them into a feature vector, the overall situation of the object to be processed can be reflected. Then, by clustering the feature vectors of preset objects with the same type of label, several preset objects similar to the overall situation of the object to be processed can be accurately obtained.

[0126] F300 retrieves several key objects associated with the reference object from a preset database, and retrieves the feature labels corresponding to the reference object and each key object respectively. It can be understood that the key object and the reference object refer to the relationship that meets the preset requirements. For example, when it is necessary to find the investment object of the object to be processed, the key object can be the object that has been obtained after investing in the reference object.

[0127] Specifically, the step of retrieving several key objects associated with the reference object from the preset database includes the following steps:

[0128] F301, based on the target knowledge graph stored in the preset database, uses several objects that are connected to the reference object from the target knowledge graph as initial objects; it can be understood that the target knowledge graph is a pre-built knowledge graph that includes a large number of objects and the relationships between them.

[0129] F302 retrieves the type of each initial object and designates the initial object whose type matches that of the reference object as the key object. For example, when the reference object is a company, the initial object of type company is designated as the key object. If the reference object also connects to legal entity information, then the legal entity information is not designated as a key object.

[0130] As mentioned above, since the reference objects are selected objects that are similar to the overall situation of the object to be processed, the key objects that are associated with the reference objects can also be considered to have a strong relationship with the object to be processed. This is conducive to expanding the associated tags of the object to be processed, finding more potential objects or potential users that are related to the object to be processed, and improving the reliability of the potential objects or potential users found.

[0131] F400 inputs several feature labels corresponding to the reference object and each key object, along with several feature labels of the pre-acquired objects to be processed, into a pre-trained large model to obtain several expanded feature labels corresponding to the objects to be processed. This expanded feature label list is then used to obtain the target object list corresponding to the objects to be processed. This can be understood as: when expanding feature labels using the pre-trained large model, semantic expansion of the labels is also included. These feature labels include technical field labels and business labels, etc.

[0132] For ease of understanding, an example is provided below: The original feature tags of the object to be processed include: lithium battery, energy storage system; the feature tags of the reference object and the key object include: lithium battery, power battery, automotive industry, battery materials and recycling. The expanded output tags include: lithium battery, energy storage system, power battery, battery production equipment, automotive industry, battery materials and recycling.

[0133] Specifically, obtaining the target object list corresponding to the object to be processed based on the expanded feature labels includes the following steps:

[0134] F401, obtain several feature labels corresponding to each preset object.

[0135] F402: For any preset object, if several feature labels corresponding to the preset object have the same labels as the expanded several feature labels, the preset object will be used as the target object corresponding to the object to be processed.

[0136] F403 integrates several target objects to obtain a list of target objects corresponding to the objects to be processed.

[0137] As mentioned above, since both reference objects and key objects are potential objects that are highly related to the object to be processed, by integrating and expanding the feature tags of the three, we can find more and more reliable potential objects of the object to be processed from the database based on the expanded tags, providing reliable data references for subsequent operations of the object to be processed.

[0138] Furthermore, the method also includes the following steps:

[0139] F10 retrieves several original objects associated with the object to be processed from the target knowledge graph stored in the preset database.

[0140] F20, compare the consistency of several target objects in the target object list corresponding to the object to be processed with several original objects associated with the object to be processed, and identify target objects that are different from each original object from the several target objects.

[0141] S30: The identified target object is associated with the object to be processed in the target knowledge graph in order to update the target knowledge graph.

[0142] As described above, when the associated objects corresponding to the object to be processed are obtained, updating the associated objects of the object to be processed in the target knowledge graph ensures the timeliness and availability of the data, so that there is a more accurate and comprehensive data foundation for the next calculation, and ensures the reliability of the calculation results.

[0143] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.

[0144] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0145] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A knowledge graph presentation method, characterized in that, The method comprises the following steps: S100, obtaining a plurality of key nodes from a given knowledge graph; the key nodes refer to nodes in the given knowledge graph whose number of corresponding neighbor nodes is not less than n; S200, dividing a preset presentation page into an initial node grid comprising a plurality of grid units based on the number of key nodes, and obtaining a grid unit corresponding to each key node in the initial node grid; S300, calculating an area allocation score corresponding to each key node according to the number of neighbor nodes of different preset entity types connected by each key node and a preset presentation area corresponding to each preset entity type node, respectively; wherein the area allocation score corresponding to the key node meets the following conditions: wherein Q represents an area allocation score corresponding to any key node, m is the number of preset entity types, S i is a preset presentation area corresponding to the i-th preset entity type of the node, N i is the number of neighbor nodes of the i-th preset entity type connected by the key node. S400, adjusting the area of the grid unit corresponding to each key node in the initial node grid based on the area allocation score corresponding to each key node, to obtain a target node grid; Wherein, the step S400 comprises the following steps: S401, for any key node, calculating the proportion of the area allocation score corresponding to the key node in the total sum of the area allocation scores of all key nodes; S402, taking the product of the total presentation area of the initial node grid and the proportion as the area of the grid unit corresponding to the key node, to adjust the area of the grid unit corresponding to the key node in the initial node grid, and obtain the target node grid; S500, adjusting the presentation position of each key node and non-key node based on the target node grid to obtain a final presentation target knowledge graph; wherein the non-key node refers to any node in the given knowledge graph other than the key node. 2.The knowledge graph presentation method of claim 1, wherein, In the step S200, the preset presentation page is divided into an initial node grid comprising a plurality of grid units, comprising the following steps: S201, calculating the aspect ratio R of the preset presentation page; S202, setting the number of rows and columns of the initial node grid as a and b, respectively, iterating all a values from 1 to L, and calculating the value of b respectively; wherein b = roundup(L / a), roundup() is a rounding up function, and L is the number of key nodes; S203, obtaining the a value and b value with the minimum absolute difference between the grid aspect ratio b / a and R, to obtain the divided initial node grid. 3.The knowledge graph presentation method of claim 1, wherein, In the step S200, the grid unit corresponding to each key node in the initial node grid is obtained, comprising the following steps: S210, calculating the association strength between each two key nodes to construct an association matrix; S220, calculating the two-dimensional coordinates corresponding to each key node based on the association matrix using a force-directed layout algorithm; S230, normalizing the two-dimensional coordinates corresponding to each key node to the coordinate space of the initial node grid to obtain the grid unit corresponding to each key node in the initial node grid. 4.The knowledge graph presentation method of claim 1, wherein, The preset presentation area corresponding to the preset entity type node is proportional to the importance of the preset entity type; or The preset presentation area corresponding to the preset entity type node is proportional to the average number of characters in the name of the node corresponding to the preset entity type.

5. The knowledge graph presentation method of claim 1, wherein, The step S500 comprises the following steps: S501, for any key node, based on the average coordinates of several neighbor nodes connected by the key node, moving the key node in its own grid unit in the direction of the average coordinates with a preset offset step; S502, initially assigning each non-key node to a preset local area where the key node with the highest association strength with the non-key node itself is located, and using a force-directed layout algorithm to calculate the local position of each non-key node with the corresponding key node as the center; S503, iteratively performing the above steps S501 and S502 until the average position change of all nodes is less than a preset change threshold or the maximum number of iterations is reached, to obtain the final presentation position of the key nodes and non-key nodes.

6. The knowledge graph presentation method of claim 1, wherein, The method further comprises the following steps: P100, based on the obtained first and second entities to be analyzed and the preset attribute parameter set corresponding to each entity to be analyzed, calculating the data similarity between the preset attribute parameter sets corresponding to the first and second entities to be analyzed respectively; The first and second entities to be analyzed are entities corresponding to any two nodes belonging to a target entity type in a plurality of preset entity types; P200, if the name data corresponding to the first entity to be analyzed is the same as the name data corresponding to the second entity to be analyzed, and the data similarity is greater than a first preset similarity threshold, determining that the first and second entities to be analyzed are the same entity. 7.A non-transitory computer readable storage medium having stored therein at least one instruction or at least one piece of program, characterized in that, The at least one instruction or the at least one program is loaded and executed by the processor to implement the knowledge graph presentation method according to any one of claims 1-6.

8. An electronic device, comprising: The processor and the non-transitory computer readable storage medium of claim 7 are included.

Citation Information

Patent Citations

  • Graph embedding-based relational graph key personnel analysis method and system

    WO2023207013A1

  • Industrial knowledge graph display method, device, medium, and product

    WO2024016112A1