Supply chain risk knowledge graph scale compression method based on community division
Through the community-based division method, the risk knowledge graph is scaled to compress the problem of high complexity of multi-hop correlation search in large-scale maps, and the effect of reducing the scale of the graph and reducing the search complexity is achieved.
Patent Information
- Application Number
- CN202411920980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-22
AI Technical Summary
When the risk knowledge graph is large, the complexity of multi-hop correlation search will increase exponentially, resulting in excessive search costs, especially when large nodes with high connectivity become bottlenecks in the search process.
A community-based division method is adopted to construct topological structure diagrams and graph neural network models, community division and edge prediction are carried out, edge removal is reduced, map scale is reduced, and the complexity of multi-hop correlation search is reduced.
The purpose of reducing the overall scale of the map is achieved, while reducing edge removal, reducing the complexity of multi-hop association search, ensuring that the size of each subgraph is also reduced accordingly.
Smart Images

Figure CN119862242A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and in particular to a supply chain risk knowledge graph scale compression method based on community division. Background Art
[0002] A risk knowledge graph is a knowledge structure used to represent and manage risk-related data and information. It usually contains entities (such as individuals, organizations, events, assets, etc.) and the relationships between these entities (such as ownership, influence, responsibility, etc.). Risk knowledge graphs can be applied to multiple fields such as finance, insurance, network security, and supply chain management to help organizations better understand and manage risks, as well as develop corresponding risk mitigation strategies. By analyzing the entities and relationships in the risk knowledge graph, potential risk points can be identified. For example, the loss or damage of a key asset may affect multiple business processes. Based on the results of the risk assessment, risk mitigation measures can be developed, such as strengthening security controls, performing backups, and purchasing insurance. Real-time monitoring of changes in the risk knowledge graph can promptly detect new risk points or changes and issue early warnings.
[0003] In theory, the larger the risk knowledge graph, the better. However, when the risk knowledge graph is large, the multi-hop association search it supports (i.e., exploring the multi-step relationship between two entities or nodes) may encounter problems due to the high search cost. This problem is mainly affected by two factors: first, the large scale of the graph leads to the formation of a huge topological structure, which makes the complexity of association search increase exponentially with the increase of hops; second, there are some large nodes with high connectivity, which are easy to become bottlenecks in the search process. Due to their numerous connections, this further increases the complexity of the search. Summary of the invention
[0004] To solve the above problems, the present invention provides a supply chain risk knowledge graph scale compression method based on community division, which uses community division to compress the scale of the graph and regards the risk knowledge graph as a network. The compression goal is to reduce the overall scale of the graph while minimizing the removal of edges and reducing the complexity of multi-hop association search.
[0005] The present invention provides a supply chain risk knowledge graph scale compression method based on community division, and the specific technical solution is as follows:
[0006] S1: Obtain the relationship between target entities and build a risk knowledge graph;
[0007] S2: Export the data of the risk knowledge graph and construct a topological structure graph;
[0008] S3: Based on the obtained topological structure graph, the risk knowledge graph is divided into communities to obtain the divided graph and the blocked edge set;
[0009] S4: Build a link prediction model based on the graph neural network, and train the model based on the remaining graph data after partitioning;
[0010] S5: Predict the blocked edges using the trained link prediction model;
[0011] S6: Filter based on the prediction results to obtain the filtered edge set and complete the graph scale compression.
[0012] Furthermore, the topology diagram construction process is as follows:
[0013] S201: Extract the nodes and relationships of the risk knowledge graph to obtain the corresponding node set ε and relationship set
[0014] S202: Based on the node set ε and the relationship set Constructing topological structure diagram And define the optimal modularity
[0015] Furthermore, in step S3, the specific process of community division is as follows:
[0016] S301: judging whether there is an edge according to the topological structure diagram, if so, executing step S302, if not, executing S306;
[0017] S302: Calculate the edge betweenness of each edge;
[0018] S303: Delete the corresponding edge with the largest edge betweenness according to the calculation result;
[0019] S304: Calculate the modularity of the graph after deleting the corresponding edge with the largest edge betweenness And update to get the current maximum module degree
[0020] S305: Save the edge set currently deleted;
[0021] S306: Obtain the current maximum modularity and will The corresponding deleted edge set is used as the blocking edge set Output.
[0022] Furthermore, the modularity It is the ratio of the number of edges within the community to the total number of edges in the entire network minus an expected value.
[0023] Furthermore, in step S304, the modularity is calculated as follows:
[0024]
[0025] Among them, Q represents modularity, m represents the sum of degrees in a network, v and w represent nodes, and A vw Indicates whether there is a connection between node v and node w, δ(c v ,c w ) is an indicator function, indicating that node v and node w are in the same community.
[0026] Furthermore, in step S6, the screening based on the prediction results is specifically to remove the edges representing the key features of the graph in the prediction results.
[0027] The beneficial effects of the present invention are as follows:
[0028] The present invention regards the risk knowledge graph as a network, constructs a topological structure diagram based on the graph data, adopts the GN algorithm to perform community division, obtains the graph data after division and the deleted edge set corresponding to the maximum modularity, and uses it as the blocked edge set, and uses the remaining graph data after division to train the link prediction model, and predicts the blocked edges through the trained link prediction model, and then removes the edges representing the key features of the graph in the prediction results, thereby achieving the compression purpose of reducing the overall scale of the graph, while reducing the removal of edges and ensuring that the scale of each subgraph is also reduced accordingly, thereby reducing the complexity of multi-hop association search. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the overall process of the method of the present invention.
[0030] Figure 2 It is a schematic diagram of the community division process of the present invention. DETAILED DESCRIPTION
[0031] The following description clearly and completely describes the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In the description of the embodiments of the present invention, it should be noted that the indicated orientation or positional relationship is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the invention product is usually placed when in use, or the orientation or positional relationship commonly understood by those skilled in the art, or the orientation or positional relationship in which the invention product is usually placed when in use, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first" and "second" are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0033] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0034] Example 1
[0035] Embodiment 1 of the present invention discloses a supply chain risk knowledge graph scale compression method based on community division, such as Figure 1 As shown, the specific steps are as follows:
[0036] S1: Obtain the relationship between target entities and build a risk knowledge graph;
[0037] S2: Export the data of the risk knowledge graph and construct a topological structure graph;
[0038] As a preferred embodiment, the topology diagram construction process is as follows:
[0039] S201: Extract the nodes and relationships of the risk knowledge graph to obtain the corresponding node set ε and relationship set
[0040] S202: Based on the node set ε and the relationship set Constructing topological structure diagram And define the optimal modularity
[0041] S3: Based on the obtained topological structure graph, the risk knowledge graph is divided into communities to obtain the divided graph and the blocked edge set;
[0042] There are some implicit community structures (subgraphs) in the network, where the number of shortest paths between these communities is large, while the number of shortest paths within the community is small. By continuously identifying and removing edges with high betweenness, the network can be gradually decomposed into multiple independent subgraphs; where edge betweenness refers to the number of shortest paths through an edge.
[0043] As a preferred embodiment, Figure 2 As shown, the specific process of community division is as follows:
[0044] S301: judging whether there is an edge according to the topological structure diagram, if so, executing step S302, if not, executing S306;
[0045] S302: Calculate the edge betweenness of each edge;
[0046] S303: Delete the corresponding edge with the largest edge betweenness according to the calculation result;
[0047] S304: Calculate the modularity of the graph after deleting the corresponding edge with the largest edge betweenness And update to get the current maximum module degree
[0048] Specifically, in the process of community division, modularity The calculation formula is the ratio of the number of edges within the community (subgraph) to the total number of edges in the entire network minus an expected value.
[0049] The proportion of the community interior (subgraph) to the total number of edges in the network is calculated as follows:
[0050]
[0051] Among them, v and w represent nodes, A vw Indicates whether there is a connection between node v and node w, δ(c v ,c w ) is the indicator function, indicating that node v and node w are in the same community, and m represents the sum of degrees in a network. Because the degree is divided into in-degree and out-degree, calculating all nodes will result in repeated calculations, so the result needs to be divided by 2m.
[0052] A vw The representation is as follows:
[0053]
[0054] The expected value can be considered as the ratio of the number of edges in a community to the total number of edges in the network after randomly shuffling the edges in the network. That is, if the partitioning effect is not good, then the expected value is close to the actual value, and the modularity is will be small;
[0055] The expected value is calculated as follows:
[0056]
[0057] Among them, k v Represents the degree of node v in the graph.
[0058] In summary, the modularity The calculation is expressed as follows:
[0059]
[0060] S305: Save the edge set currently deleted;
[0061] S306: Obtain the current maximum modularity Will The corresponding deleted edge set is used as the blocking edge set Output.
[0062] S4: Build a supply chain risk graph link prediction model based on graph neural network (GCN), and train the model based on the remaining graph data after division;
[0063] S5: Predict the blocked edges through the trained graph neural network link prediction model;
[0064] S6: Perform screening based on the prediction results, remove the important edges in the prediction results (these edges are the key features of the graph), obtain the screened edge set, and complete the graph scale compression.
[0065] The present invention is not limited to the above-mentioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.
Claims
1. A supply chain risk knowledge graph scale compression method based on community division, characterized in that: include: S1: Obtain the relationship between target entities and build a risk knowledge graph; S2: Export the data of the risk knowledge graph and construct a topological structure graph; S3: Based on the obtained topological structure graph, the risk knowledge graph is divided into communities to obtain the divided graph and the blocked edge set; S4: Build a link prediction model based on the graph neural network, and train the model based on the remaining graph data after partitioning; S5: Predict the blocked edges using the trained link prediction model; S6: Filter based on the prediction results to obtain the filtered edge set and complete the graph scale compression.
2. The supply chain risk knowledge graph scale compression method based on community division according to claim 1 is characterized in that: The construction process of the topology diagram is as follows: S201: Extract the nodes and relationships of the risk knowledge graph to obtain the corresponding node set ε and relationship set S202: Based on the node set ε and the relationship set Constructing topological structure diagram And define the optimal modularity 3. The supply chain risk knowledge graph scale compression method based on community division according to claim 2 is characterized in that: In step S3, the specific process of community division is as follows: S301: judging whether there is an edge according to the topological structure diagram, if so, executing step S302, if not, executing S306; S302: Calculate the edge betweenness of each edge; S303: Delete the corresponding edge with the largest edge betweenness according to the calculation result; S304: Calculate the modularity of the graph after deleting the corresponding edge with the largest edge betweenness And update to get the current maximum module degree S305: Save the edge set currently deleted; S306: Obtain the current maximum modularity Will The corresponding deleted edge set is used as the blocking edge set Output.
4. The supply chain risk knowledge graph scale compression method based on community division according to claim 3 is characterized in that: The modularity It is the ratio of the number of edges within the community to the total number of edges in the entire network minus an expected value.
5. The supply chain risk knowledge graph scale compression method based on community division according to claim 4 is characterized in that: In step S304, the modularity The calculation is as follows: Among them, Q represents modularity, m represents the sum of degrees in a network, v and w represent nodes, and A vw Indicates whether there is a connection between node v and node w, δ(c v ,c w ) is an indicator function, indicating that node v and node w are in the same community.
6. The supply chain risk knowledge graph scale compression method based on community division according to claim 1 is characterized in that: In step S6, the screening based on the prediction results is specifically to remove the edges representing the key features of the graph in the prediction results.