Communication node connectivity analysis method based on knowledge graph

By applying knowledge graph-based methods in large-scale, dynamic network environments, and using graph databases and breadth-first search algorithms, the problem that traditional methods cannot efficiently analyze the connectivity between communication nodes is solved, and fast and accurate connectivity analysis and dynamic analysis of multiple network topology structures are achieved.

CN119966834AActive Publication Date: 2025-05-09THE 54TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION

Patent Information

Application Number
CN202510443646.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-09
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

Traditional methods cannot efficiently and in real time filter and analyze technical problems of connectivity between communication nodes by time and network type in large-scale, dynamic network environments.

Method used

Using a knowledge graph-based method, graph database storage and management nodes and relationships are used, and the breadth-first search algorithm is combined to achieve efficient connectivity analysis in a large-scale and dynamic network environment.

Benefits of technology

It realizes rapid and accurate analysis of connectivity between communication nodes, improves processing efficiency, is suitable for large-scale and complex communication networks, and supports dynamic analysis of multiple network topology structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966834A_ABST
    Figure CN119966834A_ABST
Patent Text Reader

Abstract

The invention relates to a communication node connectivity analysis method based on a knowledge graph, and relates to the field of communication network analysis. According to the method, the communication nodes and the relationship between the communication nodes are managed through the graph database, and the node relationship is dynamically screened in combination with the time attribute and the communication type. The method comprises the following specific steps of: firstly, acquiring all nodes and relationships meeting a specified time condition, and grouping the nodes and relationships according to communication types; thirdly, constructing a graph for each communication type and identifying connected components by applying a breadth-first search algorithm; and finally, processing the relationship between the nodes according to the attributes of the communication types, and identifying a set of mutually communicated nodes under each communication type. The method aims at efficiently analyzing the connectivity between the nodes in the communication network. The method can efficiently process a large-scale network topology structure, has flexibility, is particularly suitable for a dynamic and real-time changing communication network environment, has wide application value, and is particularly suitable for communication network modeling and analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication network analysis, and in particular to a communication node connectivity analysis method based on a knowledge graph. The method is mainly used in communication networks, especially in complex and dynamically changing network environments, to analyze the connectivity between various communication nodes in different network topologies. Background Art

[0002] With the rapid development of information technology, communication networks are increasingly used in various industries, especially in the fields of military, aviation, and the Internet of Things. The reliability and efficiency of communication networks are crucial to the stable operation of the system. As the scale of the network continues to expand, the network topology becomes increasingly complex. Traditional network topology analysis methods can no longer meet the management and optimization needs of large-scale and highly complex networks.

[0003] In the patent "Inter-provincial power trading path search method, system, device and storage medium" applied by China Electric Power Research Institute Co., Ltd. with authorization announcement number CN115600766B, although it is possible to retrieve the connectivity of each node with other nodes through transmission channel information and form a connectivity matrix, providing a search for the shortest path between nodes, the limitation of this method is that it only focuses on the shortest path between nodes and does not analyze the structure of the entire network from a global perspective. First, the patent focuses on calculating the shortest path between nodes. Although it can provide the optimal path selection for a single node, it does not explore in depth how to form a complete network topology based on the connectivity of nodes on a global scale. This means that it fails to identify all possible connection paths in the network, and thus cannot fully evaluate important characteristics such as clusters, connectivity and redundant paths between different nodes. Secondly, the present invention does not consider the overall network structure between nodes from a global perspective, and cannot form an in-depth analysis of the connectivity and topology of the entire network. Especially in complex power transmission systems, the connectivity between nodes in the network is not just a simple connection of the shortest path, but also involves deeper information such as the topological structure, grouping, and connected components of the network. In summary, although this patent provides an efficient way to select paths between nodes, it has shortcomings in global network structure analysis, dynamic topology changes, and identification of more complex relationships between nodes.

[0004] In the patent "A network detection method and device, electronic device and storage medium" applied by China Mobile (Suzhou) Software Technology Co., Ltd. with authorization announcement number CN114629819B, the connectivity detection between the tested node and the detection node in the network is realized based on the interface information in the message. Although this method can provide connectivity information between nodes and effectively evaluate whether the nodes in the network are interoperable, this method relies on the interface information in the network message for detection and mainly focuses on the message exchange level. Although this method can detect the physical connectivity between nodes, it lacks the analysis of the entire network topology, the deep relationship between nodes and the complexity modeling of the network level. Therefore, it cannot fully reflect the overall structure and topological changes of the network, nor can it reveal redundant connections or potential structural problems between nodes.

[0005] At present, the topological analysis of communication networks mostly relies on traditional database systems or simple algorithms based on graph theory. However, these methods have certain limitations. First, traditional database structures usually cannot fully capture the complex relationships and dynamic changes between nodes in communication networks, especially in multi-dimensional and multi-attribute network environments. Secondly, network analysis based on traditional methods often has difficulty in handling dynamic and real-time changing network states, especially when considering time changes and different network attributes (such as network type, communication quality, etc.), traditional static graphs are difficult to provide effective support. In order to solve the above problems, graph databases, as a solution for graph data storage, are widely used in complex network analysis due to their natural graph structure characteristics. Graph databases can flexibly handle multiple attributes between nodes and relationships, and support efficient graph traversal and query operations. However, although graph databases provide good support in some scenarios, how to efficiently and dynamically analyze the connectivity between nodes in large-scale networks, especially in multi-dimensional networks, by filtering and analyzing attributes such as time and network type, is still a difficult problem that needs to be solved. Summary of the invention

[0006] In view of this, the present invention aims to solve the technical problem that traditional methods cannot efficiently and real-time filter and analyze the connectivity between communication nodes by time and network type in a large-scale and dynamic network environment. A communication node connectivity analysis method based on knowledge graph is proposed, which aims to effectively identify the connected components in each network by dynamically processing the relationship between nodes and network type, combined with time attributes. This method utilizes the powerful storage and query capabilities of the graph database, combined with the breadth-first search algorithm, to achieve efficient connectivity analysis in a large-scale and dynamic network environment, and provides a new technical means for the optimization and troubleshooting of communication networks. Specifically, it includes the following steps.

[0007] A method for analyzing the connectivity of communication nodes based on a knowledge graph comprises the following steps: Step 1: Input the communication node and relationship data and save them as data files for persistent storage; Step 2: Configure graph data connection information and initialize the graph database after connecting to it; store communication nodes and relationship data; Step 3: Back up the information of the original nodes and relationships, and update their timestamps to the specified time value; Step 4: Cut out the relationships that do not meet the communication distance conditions; Step 5: Divide and analyze the connectivity of nodes based on the communication type value; Step 6: Map the node ID to the name to facilitate intuitive understanding of the connectivity analysis results; Step 7: Repeat steps 1 to 6 to complete the connectivity analysis of communication nodes based on the knowledge graph.

[0008] Furthermore, in step 1, the communication nodes and relationship data are input and saved as data files for persistent storage. The specific method is as follows: Step 1-1: Input the information of the communication nodes one by one, including the node label Label and properties. The properties include name, distance position x, azimuth position y and time label time. After completion, save the node information data as the data file nodes.npy; Step 1-2: Enter the relationship between communication nodes one by one, including the label Label of node 1, the attribute name of node 1, the label Label of node 2, the attribute name of node 2, the relationship name and relationship attributes. The relationship attributes include communication distance distance, communication type net and time label time. After completion, save the node relationship data as the data file relationships.npy.

[0009] Furthermore, in step 2, the graph data connection information is configured, and the graph database is initialized after connecting to the graph database, specifically in the following manner: Step 2-1: Create a graph database connection: Provide database connection information, including database address, user name and password, and connect to the Neo4j graph database. After the connection is successful, a graph database driver object will be created, which will be used to perform subsequent database operations; Step 2-2: Initialize the graph database: Clear all existing data in the graph database to avoid data redundancy and ensure that new data will not be affected by old data when it is loaded; Step 2-3: Define the node data storage function: Use Cypher language to build the node data storage function so that the dictionary type data read from nodes.npy can be converted into the node data structure of neo4j and stored in the graph database; Step 2-4: Define the relationship data storage function: Use the Cypher language to build a node data storage function so that the dictionary type data read from relationships.npy can be converted into the neo4j relationship data structure and stored in the graph database; Step 2-5: Data storage: Load the stored node data nodes.npy and relationship data relationships.npy into memory, and then create nodes and relationships in batches based on the loaded data; batch processing is achieved by looping through the array and calling the node data storage function and relationship data storage function methods.

[0010] Furthermore, in step 3, the information of the original nodes and relationships is backed up, and their timestamps are updated to the specified time value, specifically in the following manner: Step 3-1: Traverse each node and create a new node data copy for each node. The timestamp of each node data copy will be updated to the input time_value; Step 3-2: Traverse each relationship data to export, delete the time attribute of the exported relationship data, and then set a new time attribute with the value of time_value; replace the node information in the exported relationship data with the corresponding node data copy in step 3-1, and then put the exported relationship data back into the database to obtain the relationship data copy.

[0011] Furthermore, in step 4, the relationships that do not meet the communication distance condition are cut out, specifically in the following manner: Step 4-1: Query all relational data copies based on time_value; Step 4-2: traverse each relationship data copy, record the node data copy and related attributes corresponding to the relationship data copy, the related attributes include the distance position x1 and azimuth position y1 of node 1, the distance position x2 and azimuth position y2 of node 2, the relationship data copy id generated by the graph database and the communication distance distance in the relationship attribute; Step 4-3: Determine whether to delete the relationship based on the communication distance and node distance relationship; The data is compared with the communication distance in the relationship attribute. If the distance between the nodes is greater than the distance, the relationship data copy is considered to be unqualified and is deleted according to the relationship data copy id.

[0012] Furthermore, in step 5, the connectivity of the nodes is divided and analyzed based on the communication type value, specifically in the following manner: Step 5-1: Under the premise that the relationship attribute time is time_value, extract all different net attribute values ​​and store them in net_types. Use set to ensure that all unique net attribute values ​​are stored in net_types. Step 5-2: Traverse the elements in net_types to obtain different net attribute values; Step 5-3: Use Cypher statements to query all copies of relational data that match the net, traverse each record in the query result, extract nodes a and b, use the id of node a as the key of the dictionary data graph, and store the id of node b as the value of the corresponding key in the list; Step 5-4: Check each node in the dictionary data graph to see if it has been visited. If a node has not been visited, it will be used as the starting node, and the breadth-first search algorithm will be called to find all connected nodes starting from this node, and these connected nodes will be added to the components list as a connected component. Finally, the components list will contain all the connected components of the graph data of the Neo4j graph database, and each connected component is composed of a group of interconnected nodes. Step 5-5: Store the connected components of each net in the connected_components dictionary, where the key is net and the value is a list of connected components of that type; Step 5-6: Repeat steps 5-2 to 5-5 above until all elements in net_types are traversed.

[0013] Furthermore, in step 6, the node id is mapped to the name name to facilitate intuitive understanding of the connectivity analysis results. The specific method is to query the corresponding name relationship of the node id, build a dictionary of node id and name name, and then replace all ids in connected_components with name.

[0014] Due to the adoption of the above technical solution, the present invention has the following beneficial effects compared with the background technology: 1. The present invention can quickly and accurately analyze the connectivity between communication nodes through dynamic screening based on time and network type, thereby improving processing efficiency and being suitable for large-scale and complex communication networks.

[0015] 2. The present invention supports dynamic analysis of various network topologies and can be flexibly adjusted according to different network types and time conditions to meet the needs in real-time network environments.

[0016] 3. The present invention utilizes a graph database to store and manage nodes and relationships, and combines a breadth-first search algorithm to perform connected component analysis, thereby ensuring accurate processing of relationships between nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention.

[0018] Figure 2 This is a knowledge graph node management diagram of an embodiment of the present invention.

[0019] Figure 3 This is a knowledge graph relationship data management diagram of an embodiment of the present invention.

[0020] Figure 4 A graph structure generated for an embodiment of the present invention.

[0021] Figure 5 The graph structure backed up by the embodiment of the present invention.

[0022] Figure 6 This is the structure of the image after trimming according to the embodiment of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0024] A node clustering method based on communication network connectivity analysis, the overall process is as follows Figure 1 The specific steps are as follows.

[0025] Step 1: Communication node and relationship data are input and saved as data files for persistent storage.

[0026] Step 1-1: Enter the information of the communication nodes one by one, including the node label Label and properties. The properties include name name, distance position x, azimuth position y and time label time, such as Figure 2 After completion, save the node information data as a data file nodes.npy, the content is: [{'label': 'node', 'properties': {'name': 'A', 'x': '0', 'y': '3', 'time': '0'}} {'label': 'node', 'properties': {'name': 'B', 'x': '1', 'y': '4', 'time': '0'}} {'label': 'node', 'properties': {'name': 'C', 'x': '2', 'y': '3', 'time': '0'}} {'label': 'node', 'properties': {'name': 'D', 'x': '3', 'y': '1', 'time': '0'}} {'label': 'node', 'properties': {'name': 'F', 'x': '6', 'y': '1', 'time': '0'}} {'label': 'node', 'properties': {'name': 'G', 'x': '5', 'y': '2', 'time': '0'}} {'label': 'node', 'properties': {'name': 'H', 'x': '4', 'y': '4', 'time': '0'}} {'label': 'node', 'properties': {'name': 'E', 'x': '4', 'y': '1', 'time': '0'}} {'label': 'node', 'properties': {'name': 'I', 'x': '5', 'y': '5', 'time': '0'}} {'label': 'node', 'properties': {'name': 'J', 'x': '6', 'y': '4', 'time': '0'}} {'label': 'node', 'properties': {'name': 'K', 'x': '6', 'y': '6', 'time': '0'}}]; Step 1-2: Enter the relationship between the communication nodes one by one, including the label Label of node 1, the attribute name of node 1, the label Label of node 2, the attribute name of node 2, the relationship name and the relationship attributes. The relationship attributes include the communication distance distance, the communication type net and the time label time, such as Figure 3After completion, save the node relationship data as a data file relationships.npy, the content is: [{'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'D'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'H'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'G'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'D'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'D'}, 'properties2': {'name': 'E'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'E'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'E'}, 'properties2': {'name': 'F'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'F'}, 'properties2': {'name': 'E'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'F'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'G'}, 'properties2': {'name': 'F'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'E'}, 'properties2': {'name': 'F'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'F'}, 'properties2': {'name': 'E'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'D'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'G'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'G'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'H'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'F'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'G'}, 'properties2': {'name': 'F'}, 'relationship_properties': {'distance': '3.1', 'net': '2', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'G'}, 'properties2': {'name': 'E'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'E'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '4', 'net': '3', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'H'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'net': '2', 'distance': '3.1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net2', 'properties1': {'name': 'D'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'net': '2', 'distance': '3.1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'G'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'H'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'H'}, 'properties2': {'name': 'I'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'I'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'I'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'K'}, 'properties2': {'name': 'I'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'K'}, 'properties2': {'name': 'I'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'I'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'J'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'K'}, 'properties2': {'name': 'J'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'K'}, 'properties2': {'name': 'J'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'J'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'J'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'H'}, 'properties2': {'name': 'J'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'K'}, 'properties2': {'name': 'J'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'J'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'I'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'K'}, 'properties2': {'name': 'I'}, 'relationship_properties': {'net': '1', 'distance': '1.7', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'K'}, 'properties2': {'name': 'I'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'I'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'J'}, 'properties2': {'name': 'K'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net3', 'properties1': {'name': 'K'}, 'properties2': {'name': 'J'}, 'relationship_properties': {'net': '3', 'distance': '4', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'A'}, 'properties2': {'name': 'B'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'B'}, 'properties2': {'name': 'A'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'A'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'A'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'B'}, 'properties2': {'name': 'A'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'A'}, 'properties2': {'name': 'B'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'C'}, 'properties2': {'name': 'B'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'B'}, 'properties2': {'name': 'C'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'B'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'H'}, 'properties2': {'name': 'B'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'C'}, 'properties2': {'name': 'B'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'B'}, 'properties2': {'name': 'C'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'C'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'C'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'A'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'A'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'C'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'C'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'H'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'H'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'G'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'G'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'E'}, 'properties2': {'name': 'D'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}} {'label1': 'node', 'label2': 'node', 'relationship': 'net1', 'properties1': {'name': 'D'}, 'properties2': {'name': 'E'}, 'relationship_properties': {'distance': '1.7', 'net': '1', 'time': '0'}}].

[0027] Step 2: Configure the graph data connection information, and then initialize the database after connecting to the graph database; Step 2-1: Create a graph database connection Provide database connection information, including database address, username and password, to connect to the Neo4j graph database. After the connection is successful, a graph database driver object will be created, which will be used to perform subsequent database operations. The operation instruction is: GraphDatabase.driver(uri, auth=(user, password)), where uri = "bolt: / / localhost:7687" is the address of Neo4j, user="neo4j" is the username and password="12345678" is the database password; Step 2-2: Initialize the graph database Clear all existing data in the graph database to avoid data redundancy and ensure that new data will not be affected by old data when it is loaded. The command is: query = "MATCH (n) DETACH DELETE n" with self.driver.session() as session: session.run(query); Step 2-3: Define the node data storage function The Cypher language is used to build a node data storage function so that the dictionary type data read from nodes.npy can be converted into the node data structure of neo4j and stored in the graph database. The command is: query = f"CREATE (n:{label} $properties)" with self.driver.session() as session: session.run(query, properties= properties) Where label is the label of the node, and properties are the properties of the node; Step 2-4: Define the relational data storage function The Cypher language is used to construct a node data storage function so that the dictionary type data read from relationships.npy can be converted into the neo4j relational data structure and stored in the graph database. The command is: query = f""" MATCH (a:{label1}), (b:{label2}) WHERE {node1_match} AND {node2_match} CREATE (a)-[r:{relationship} {relationship_properties_query}]->(b) RETURN type(r) """ with self.driver.session() as session: result = session.run(query, **parameters) Among them, parameters are the attribute variables of the relationship; Step 2-5: Data storage Load the stored node and relationship data (nodes.npy and relationships.npy) into memory, and then create nodes and relationships in batches based on the loaded data. nodes.npy contains the label, name, location, and time information of each node, while relationships.npy contains the relationship attributes between each pair of nodes (such as relationship type, communication distance, timestamp, etc.). Batch processing is achieved by looping through the array and calling the node data storage function and relationship data storage function method. The generated graph structure is Figure 4 shown.

[0028] Step 3: Back up the information of the original nodes and relationships, and update their timestamps to the specified time value; Step 3-1: Traverse each node, obtain the node's attributes and other information, and create a new data copy for each node. The timestamp of each node will be updated to the input time_value; Step 3-2: Traverse each relationship data, delete the time attribute of the original relationship, and then set a new time attribute for the new relationship with the value of time_value. Based on the new node generated in step 3-1, create a new relationship copy after matching the new node. The backup graph structure is Figure 5 shown.

[0029] Step 4: Cut out the relationships that do not meet the communication distance conditions; Step 4-1: Query all relationships based on time_value; Step 4-2: Traverse each relationship and record the nodes and relationship attributes corresponding to the relationship. Node attributes include the distance position x1 and azimuth position y1 of node 1, the distance position x2 and azimuth position y2 of node 2, and the relationship id and relationship attributes including the communication distance distance; Step 4-3: Determine whether to delete the relationship based on the relationship between the communication distance and the node distance. Compare it with the communication distance in the relationship attribute. If the distance between the nodes is greater than the distance, the relationship is considered not to meet the requirements and the relationship is deleted according to the relationship id. The trimmed graph structure is as follows: Figure 6 shown.

[0030] Step 5: Divide and analyze the connectivity of nodes based on the communication type value; Step 5-1: Extract all different net attribute values ​​under the premise that the relation attribute time is time_value. Use set to ensure that net_types stores all unique net attribute values, and the values ​​are ['1', '2', '3']; Step 5-2: Traverse the elements in net_types to obtain different net attribute values; Step 5-3: Get the connected components for each net. Use Cypher statements to query all relationships that match the net. Traverse each record in the query result and extract nodes a and b. Use the id of node a as the key of the dictionary data graph, and store the id of node b as the value of the corresponding key in the list; Step 5-4: Find each connected component. Check each node in the dictionary data graph to see if it has been visited. If a node has not been visited, it will be used as the starting node, and the breadth-first search (BFS) algorithm will be called to find all connected nodes starting from this node, and these connected nodes will be added to the components list as a connected component. In the end, the components list will contain all the connected components of the graph data of the Neo4j graph database, and each connected component is composed of a group of interconnected nodes; Step 5-5: Store the connected components of each net in the connected_components dictionary. The key is net and the value is a list of connected components of this type. The list content is {'3': [[13, 58, 14, 39], [26, 69,70]], '2': [[13, 58, 39, 68, 14]], '1': [[13, 69, 26], [14, 68], [33, 34,67]]}.

[0031] Step 6: Map node ids to names to facilitate intuitive understanding of connectivity analysis results. The queried node ids correspond to name relationships, and a dictionary of node ids and names is constructed. Then all ids in connected_components are replaced with names. After replacement, it becomes {'3': [['H', 'G', 'E', 'F'], ['K', 'I', 'J']], '2': [['H','G', 'F', 'D', 'E']], '1': [['H', 'I', 'K'], ['E', 'D'], ['A', 'B', 'C']]}. Taking communication type '3' as an example, ['H', 'G', 'E', 'F'] and ['K', 'I', 'J'] can be connected to each other through communication type '3'. In summary, it can be seen that the method of this patent can realize the connectivity analysis of communication nodes based on the knowledge graph.

[0032] Those skilled in the art will appreciate that the embodiments described are intended to help readers understand the principles of the present invention, and should be understood that the scope of protection of the present invention is not limited to the embodiments described. For those skilled in the art, the present invention may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A communication node connectivity analysis method based on knowledge graph, characterized in that: The following steps are involved: Step 1: Input the communication node and relationship data and save them as data files for persistent storage; Step 2: Configure graph data connection information and initialize the graph database after connecting to it; store communication nodes and relationship data; Step 3: Back up the information of the original nodes and relationships, and update their timestamps to the specified time value; Step 4: Cut out the relationships that do not meet the communication distance conditions; Step 5: Divide and analyze the connectivity of nodes based on the communication type value; Step 6: Map the node ID to the name to facilitate intuitive understanding of the connectivity analysis results; Step 7: Repeat steps 1 to 6 to complete the connectivity analysis of communication nodes based on the knowledge graph.

2. According to the method for analyzing the connectivity of communication nodes based on knowledge graph in claim 1, it is characterized in that: In step 1, input the communication node and relationship data and save them as data files for persistent storage. The specific method is as follows: Step 1-1: Input the information of the communication nodes one by one, including the node label Label and properties. The properties include name, distance position x, azimuth position y and time label time. After completion, save the node information data as the data file nodes.npy; Step 1-2: Enter the relationship between communication nodes one by one, including the label Label of node 1, the attribute name of node 1, the label Label of node 2, the attribute name of node 2, the relationship name and relationship attributes. The relationship attributes include communication distance distance, communication type net and time label time. After completion, save the node relationship data as the data file relationships.npy.

3. According to a method for analyzing the connectivity of communication nodes based on a knowledge graph according to claim 2, it is characterized in that: In step 2, configure the graph data connection information and initialize the graph database after connecting to it. The specific method is as follows: Step 2-1: Create a graph database connection: Provide database connection information, including database address, user name and password, and connect to the Neo4j graph database. After the connection is successful, a graph database driver object will be created, which will be used to perform subsequent database operations. Step 2-2: Initialize the graph database: Clear all existing data in the graph database to avoid data redundancy and ensure that new data will not be affected by old data when it is loaded; Step 2-3: Define the node data storage function: The Cypher language is used to build a node data storage function, so that the dictionary type data read from nodes.npy can be converted into the node data structure of neo4j and stored in the graph database; Step 2-4: Define the relational data storage function: The Cypher language is used to build a node data storage function, so that the dictionary type data read from relationships.npy can be converted into the relational data structure of neo4j and stored in the graph database; Step 2-5: Data storage: The stored node data nodes.npy and relationship data relationships.npy are loaded into the memory, and then nodes and relationships are created in batches according to the loaded data; batch processing is achieved by looping through the array and calling the node data storage function and relationship data storage function method.

4. According to the method for analyzing the connectivity of communication nodes based on knowledge graphs according to claim 3, it is characterized in that: In step 3, the original node and relationship information is backed up and its timestamp is updated to the specified time value. The specific method is as follows: Step 3-1: Traverse each node and create a new node data copy for each node. The timestamp of each node data copy will be updated to the input time_value; Step 3-2: Traverse each relational data to export, delete the time attribute of the exported relational data, and then set a new time attribute with the value of time_value; The node information in the exported relational data is replaced with the corresponding node data copy in step 3-1, and then the exported relational data is put back into the database to obtain the relational data copy.

5. According to the method for analyzing the connectivity of communication nodes based on knowledge graph according to claim 4, it is characterized in that: In step 4, the relationships that do not meet the communication distance condition are cut out as follows: Step 4-1: Query all relational data copies based on time_value; Step 4-2: traverse each relationship data copy, record the node data copy and related attributes corresponding to the relationship data copy, the related attributes include the distance position x1 and azimuth position y1 of node 1, the distance position x2 and azimuth position y2 of node 2, the relationship data copy id generated by the graph database and the communication distance distance in the relationship attribute; Step 4-3: Determine whether to delete the relationship based on the communication distance and node distance relationship; The data is compared with the communication distance in the relationship attribute. If the distance between the nodes is greater than the distance, the relationship data copy is considered to be unqualified and is deleted according to the relationship data copy id.

6. A method for analyzing the connectivity of communication nodes based on a knowledge graph according to claim 5, characterized in that: In step 5, the connectivity of the nodes is divided and analyzed based on the communication type value, specifically in the following way: Step 5-1: Under the premise that the relationship attribute time is time_value, extract all different net attribute values ​​and store them in net_types. Use set to ensure that all unique net attribute values ​​are stored in net_types. Step 5-2: Traverse the elements in net_types to obtain different net attribute values; Step 5-3: Use Cypher statements to query all copies of relational data that match the net, traverse each record in the query result, extract nodes a and b, use the id of node a as the key of the dictionary data graph, and store the id of node b as the value of the corresponding key in the list; Step 5-4: Check each node in the dictionary data graph to see if it has been visited. If a node has not been visited, it will be used as the starting node, and the breadth-first search algorithm will be called to find all connected nodes starting from this node, and these connected nodes will be added to the components list as a connected component. Finally, the components list will contain all the connected components of the graph data of the Neo4j graph database, and each connected component is composed of a group of interconnected nodes. Step 5-5: Store the connected components of each net in the connected_components dictionary, where the key is net and the value is a list of connected components of that type; Step 5-6: Repeat steps 5-2 to 5-5 above until all elements in net_types are traversed.

7. A method for analyzing the connectivity of communication nodes based on a knowledge graph according to claim 6, characterized in that: In step 6, the node id is mapped to the name name to facilitate intuitive understanding of the connectivity analysis results. The specific method is to query the node id corresponding to the name relationship, build a dictionary of node id and name name, and then replace all ids in connected_components with name.

Citation Information

Patent Citations

  • A network detection method and device, electronic equipment and storage medium

    CN114629819B

  • Methods, systems, equipment, and storage media for cross-provincial and regional power trading path search.

    CN115600766B

  • Power-grid GIS topology analysis method based on graph database and storage medium

    CN108228724A

  • Abnormal node determination method and device, storage medium and electronic device

    CN117313008A

  • Asset connection relation configuration processing method and device in network asset surveying and mapping

    CN117579472A

Cited By

  • Communication confrontation effect evaluation method based on knowledge graph

    CN120455233A

  • Communication network information transmission sequence intelligent optimization method

    CN120935093A

  • A method for intelligent optimization of information transmission sequence of a communication network

    CN120935093B

  • Node graph based data processing system and data processing method

    KR102969200B1