A complex network topology information analysis method

By using a hash algorithm and a two-layer map structure to parse complex network topology information, this method solves the problems of high time consumption and difficulty in scaling up traditional methods, and achieves fast retrieval and low-cost scaling up, meeting the real-time requirements of the Internet environment.

CN116346630BActive Publication Date: 2026-04-24BEIJING SPACEFLIGHT TUOPUGAO SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SPACEFLIGHT TUOPUGAO SCI & TECH CO LTD
Filing Date
2023-04-10
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Traditional network topology traversal and parsing methods suffer from high time consumption and difficulty in scaling, making it difficult to meet the real-time requirements of the Internet environment for parsing complex network topology information.

Method used

A hash algorithm and a two-layer map structure are used to parse complex network topology information. Hash calculations are performed using the MAC addresses of pseudo-network elements and real network elements to construct a two-layer map structure for the entire network elements, enabling fast retrieval and low-cost node expansion.

Benefits of technology

It improves the efficiency of network node information retrieval, supports low-cost and rapid node expansion, and enables efficient parsing of complex network topology information, meeting the real-time requirements of network management and topology awareness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346630B_ABST
    Figure CN116346630B_ABST
Patent Text Reader

Abstract

The application discloses a complex network topology information analysis method, which comprises the following steps: S1, defining a network element node protocol; S2, acquiring whole network topology json information; S3, extracting whole network pseudo network element information; S4, initializing a pseudo network element array; S5, constructing a whole network pseudo network element Map; and S6, binding a real network element Map to the pseudo network element. The method utilizes Hash algorithm and a double-layer Map structure to analyze complex network topology information, can quickly search corresponding network element information in the double-layer Map through Hash operation on the network element MAC address, improves the network node information searching efficiency, binds the corresponding pseudo network element node of the outer layer through the inner layer Map, realizes dynamic analysis on the complex network topology information in the json format, can realize low-cost fast node expansion, achieves the effect of high-efficiency analysis on the complex network topology information, and provides guarantee for network management and network topology sensing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network topology analysis and management technology, and specifically to a method for analyzing complex network topology information. Background Technology

[0002] With the widespread application of large-scale heterogeneous systems in recent years, the requirements for interconnection, interoperability, and interoperability between systems have been continuously increasing. The network structure for information exchange between systems has also become increasingly complex, and network topology is an effective way to represent the relationships between network devices in different systems. Network topology information parsing has a significant impact on network management and network node information synchronization. Network topology information is commonly represented in JSON format between systems. Traditional network topology traversal parsing methods parse the information of each node in the network topology by traversing nodes, which suffers from drawbacks such as high time consumption, difficulty in scaling, and low efficiency. Therefore, given the real-time requirements of network topology awareness in the current Internet environment, how to achieve efficient parsing of complex network topology information is a pressing technical problem that needs to be solved. Summary of the Invention

[0003] The purpose of this invention is to propose a method for parsing complex network topology information to solve the aforementioned technical problems. This invention is achieved through the following technical solution:

[0004] This invention proposes a method for parsing complex network topology information, the method comprising the following steps:

[0005] S1: Define the network element node protocol: Define the network element node protocol as a JSON consisting of a pseudo network element and multiple real network elements that interact with the pseudo network element.

[0006] S2: Obtain full network topology JSON information: Obtain full network topology JSON information, which is a JSON string composed of all pseudo network elements and real network element information according to the network element node protocol;

[0007] S3: Extract pseudo network element information from the entire network: Extract pseudo network element information from JSON information;

[0008] S4: Initialize the pseudo-network element array: Initialize the pseudo-network element array composed of pseudo-network elements from the entire network and determine the length of the pseudo-network element array;

[0009] S5: Constructing a Pseudo-Network Element Map: Obtain the pseudo-network element array index by performing a hash calculation on the MAC address of the pseudo-network element, and put the pseudo-network element information into the memory space of the corresponding array index. In the case of multiple pseudo-network elements having the same hash value, the hash collision is resolved by the chaining method, thereby constructing a pseudo-network element map for the entire network.

[0010] S6: Pseudo-network element binding to real-network element Map: Each node in the pseudo-network element Map is also bound to multiple real-network elements corresponding to the pseudo-network element in the form of a Map, and finally a two-layer Map structure of network elements in the whole network is constructed.

[0011] Furthermore, the attributes of the pseudo network element described in S1 include: pseudo network element ID, pseudo network element MAC address, and pseudo network element port.

[0012] Furthermore, the attributes of the real network element described in S1 include: the real network element's MAC address, the real network element's port, link type, bandwidth value, and channel factor value.

[0013] Furthermore, the formula for hashing the pseudo-network element MAC address described in S5 is as follows:

[0014] index=HashCode(remoteMac)&(Length-1)

[0015] Where index is the index of the pseudo-network element array; remoteMac is the MAC address of the pseudo-network element; and Length is the length of the pseudo-network element array.

[0016] Furthermore, in the two-layer Map structure described in S6, the key of the outer Map is the value of the hash calculation of the MAC address of the pseudo network element, and the key of the inner Map is the value of the hash calculation of the MAC address of the real network element bound to the pseudo network element.

[0017] Furthermore, the construction of the two-layer Map structure for the entire network elements described in S6 includes the following steps:

[0018] S61. Initialize the pseudo-network element array Arr[P_Node] and determine the array length as Length = 16;

[0019] S62. Construct a set of pseudo-network element nodes for the entire network, Set(P_Node);

[0020] S63. Traverse the entire set of pseudo-network element nodes Set(P_Node), obtain the MAC address of each pseudo-network element node P_Node and perform Hash calculation to obtain the index of the pseudo-network element array;

[0021] S64. Determine whether a pseudo-network element has been placed at the index position, i.e. whether a hash collision has occurred. If the index is empty, call the array put method to assign the pseudo-network element information to the index position. If there is data at the index, the pointer of the original data points to the array position, and the pseudo-network element information is assigned to the index by the first insertion method of the linked list.

[0022] S65. Initialize the array of real network elements bound to the current pseudo network element;

[0023] S66. Obtain the real network element MAC address and perform hash calculation to obtain the real network element array index;

[0024] S67. Insert the real network element into the array or the linked list after the collision;

[0025] S68. Determine whether the pseudo-network element node set Set(P_Node) has been traversed. If the traversal is not complete, return to step S63 to continue traversing the pseudo-network elements in the set; otherwise, the entire network element double-layer Map is completed and the process ends.

[0026] Furthermore, when the occupied capacity of the pseudo network element array or the real network element array reaches 0.75 of its total array capacity, it is expanded to twice its original size, and the hash calculation is re-performed to assign values ​​to the array elements.

[0027] The beneficial effects of this invention are as follows: The method described in this invention utilizes a hash algorithm and a two-layer Map structure to parse complex network topology information. By performing a hash operation on the MAC address of a network element, the corresponding network element information can be quickly retrieved in the two-layer Map, improving the retrieval efficiency of network node information. Furthermore, by binding the inner Map to the corresponding pseudo-network element node in the outer layer, dynamic parsing of complex network topology information in JSON format is achieved, enabling low-cost and rapid node expansion and achieving the effect of highly efficient parsing of complex network topology information, thus providing a guarantee for network management and network topology awareness.

[0028] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the method flow described in this invention;

[0030] Figure 2 This is a schematic diagram showing the breakdown of the method steps described in this invention;

[0031] Figure 3 A schematic diagram of the construction process of a two-layer map for all network elements. Detailed Implementation

[0032] This invention proposes a method for parsing complex network topology information, such as... Figure 1 , Figure 2 As shown, the method includes the following steps:

[0033] S1: Define the network element node protocol: Define the network element node protocol as a JSON object consisting of a pseudo-network element and multiple real network elements that interact with the pseudo-network element, with the following structure:

[0034]

[0035] Where P_Node(i) is the i-th pseudo network element; R_Node(i,n) is the n-th real network element bound to the i-th pseudo network element.

[0036] Specifically, the P_Node(i) object structure contains the following attributes:

[0037]

[0038] Where remoteNodeId is the pseudo-network element ID; remoteMac is the pseudo-network element MAC address; and remoteport is the pseudo-network element port.

[0039] The R_Node(i,n) object structure contains the following attributes:

[0040]

[0041] Where localMac is the actual MAC address of the network element; localport is the port of the actual network element; linkType is the link type; bandwidth is the bandwidth value; and channelFactor is the channel factor value.

[0042] S2: Obtain full network topology JSON information: Obtain full network topology JSON information, which is a JSON string containing information on all pseudo network elements and real network elements, composed according to the network element node protocol. Its structure is as follows:

[0043]

[0044]

[0045] S3: Extract pseudo network element information from the entire network: Extract pseudo network element information from the JSON information.

[0046] S4: Initialize the pseudo-network element array: Initialize the pseudo-network element array Arr[P_Node] composed of pseudo-network elements from the entire network, and determine the length of the pseudo-network element array Length.

[0047] S5: Pseudo-Network Element Construction Map: The pseudo-network element array index is obtained by hashing the MAC address of the pseudo-network elements. The specific calculation formula is as follows:

[0048] index=HashCode(remoteMac)&(Length-1)

[0049] Where index is the index of the pseudo-network element array; remoteMac is the MAC address of the pseudo-network element; and Length is the length of the pseudo-network element array.

[0050] Then, the pseudo-network element information is placed into the memory space of the corresponding array index. In the case of multiple pseudo-network elements having the same hash value, the hash collision is resolved by the chaining method, thereby constructing a full network pseudo-network element Map.

[0051] S6: Pseudo-Network Element Binding to Real-Network Element Map: Each node in the pseudo-network element map is also bound to multiple real-network elements corresponding to that pseudo-network element in the form of a map, ultimately constructing a two-layer map structure for the entire network elements. In the two-layer map structure, the key of the outer map is the value of the hash calculation of the MAC address of the pseudo-network element, and the key of the inner map is the value of the hash calculation of the MAC address of the real-network element bound to the pseudo-network element.

[0052] Specifically, such as Figure 3 As shown, constructing a two-layer Map structure for all network elements includes the following steps:

[0053] S61. Initialize the pseudo-network element array Arr[P_Node] and determine the array length as Length = 16;

[0054] S62. Construct a set of pseudo-network element nodes for the entire network, Set(P_Node);

[0055] S63. Traverse the entire set of pseudo-network element nodes Set(P_Node), obtain the MAC address of each pseudo-network element node P_Node and perform Hash calculation to obtain the index of the pseudo-network element array;

[0056] S64. Determine whether a pseudo-network element has been placed at the index position, i.e. whether a hash collision has occurred. If the index is empty, call the array put method to assign the pseudo-network element information to the index position. If there is data at the index, the pointer of the original data points to the array position, and the pseudo-network element information is assigned to the index by the first insertion method of the linked list.

[0057] S65. Initialize the array of real network elements bound to the current pseudo network element;

[0058] S66. Obtain the real network element MAC address and perform hash calculation to obtain the real network element array index;

[0059] S67. Insert the real network element into the array or the linked list after the collision;

[0060] S68. Determine whether the pseudo-network element node set Set(P_Node) has been traversed. If the traversal is not complete, return to step S63 to continue traversing the pseudo-network elements in the set; otherwise, the entire network element double-layer Map is completed and the process ends.

[0061] Specifically, when the capacity occupied by the pseudo network element array or the real network element array reaches 0.75 of its total array capacity, it is expanded to twice its original size, and the hash calculation is re-performed to assign values ​​to the array elements.

[0062] The method described in this invention addresses the real-time requirements of network topology perception and discovery in the current Internet environment. Traditional network topology traversal and parsing methods suffer from high time consumption and difficulty in scaling. This invention defines a network topology information protocol structure and transforms the topology information into a flexible two-layer map structure based on the protocol structure. This structure not only enables fast retrieval based on hash calculations but also supports low-cost, rapid node expansion, achieving effective parsing.

[0063] Finally, it should be noted that the above description is only used to illustrate the technical solution of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred arrangement, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for parsing complex network topology information, characterized in that: The method includes the following steps: S1: Define the network element node protocol: Define the network element node protocol as a JSON consisting of a pseudo network element and multiple real network elements that interact with the pseudo network element. S2: Obtain full network topology JSON information: Obtain full network topology JSON information, which is a JSON string composed of all pseudo network elements and real network element information according to the network element node protocol; S3: Extract pseudo network element information from the entire network: Extract pseudo network element information from JSON information; S4: Initialize the pseudo-network element array: Initialize the pseudo-network element array composed of pseudo-network elements from the entire network and determine the length of the pseudo-network element array; S5: Constructing a Pseudo-Network Element Map: Obtain the pseudo-network element array index by performing a hash calculation on the MAC address of the pseudo-network element, and put the pseudo-network element information into the memory space of the corresponding array index. In the case of multiple pseudo-network elements having the same hash value, the hash collision is resolved by the chaining method, thereby constructing a pseudo-network element map for the entire network. S6: Pseudo-network element binding to real network element Map: Each node in the pseudo-network element Map is also bound to multiple real network elements corresponding to the pseudo-network element in the form of a Map, and finally a two-layer Map structure of network elements in the whole network is constructed. The construction of the two-layer Map structure for the entire network elements includes the following steps: S61. Initialize the pseudo-network element array Arr[P_Node], and determine the array length as Length=16; S62. Construct the set of pseudo-network element nodes Set(P_Node) for the entire network; S63. Traverse the entire set of pseudo-network element nodes Set(P_Node), obtain the MAC address of each pseudo-network element node P_Node and perform Hash calculation to obtain the index of the pseudo-network element array; S64. Determine whether a pseudo-network element has been placed at the index position, i.e. whether a hash collision has occurred. If the index is empty, call the array put method to assign the pseudo-network element information to the index position. If there is data at the index, the pointer of the original data points to the array position, and the pseudo-network element information is assigned to the index by the first insertion method of the linked list. S65. Initialize the array of real network elements bound to the current pseudo network element; S66. Obtain the real network element MAC address and perform hash calculation to obtain the real network element array index; S67. Insert the real network element into the array or the linked list after the collision; S68. Determine whether the pseudo-network element node set Set(P_Node) has been traversed. If the traversal is not complete, return to step S63 to continue traversing the pseudo-network elements in the set; otherwise, the entire network element double-layer Map is completed and the process ends.

2. The method for parsing complex network topology information according to claim 1, characterized in that, The attributes of the pseudo network element described in S1 include: pseudo network element ID, pseudo network element MAC address, and pseudo network element port.

3. The method for parsing complex network topology information according to claim 1, characterized in that, The attributes of the real network element described in S1 include: the real network element's MAC address, the real network element's port, link type, bandwidth value, and channel factor value.

4. The method for parsing complex network topology information according to claim 1, characterized in that, The formula for hashing the pseudo-network element MAC address as described in S5 is: index=HashCode(remoteMac) & (Length-1) Where index is the index of the pseudo-network element array; remoteMac is the MAC address of the pseudo-network element; and Length is the length of the pseudo-network element array.

5. The method for parsing complex network topology information according to claim 1, characterized in that, The two-layer Map structure described in S6 has an outer Map key that is the hash value of the pseudo network element's MAC address, and an inner Map key that is the hash value of the real network element's MAC address bound to the pseudo network element.

6. The method for parsing complex network topology information according to claim 1, characterized in that, When the occupied capacity of the pseudo network element array or the real network element array reaches 0.75 of its total array capacity, it is expanded to twice its original size, and the hash calculation is re-performed to assign values ​​to the array elements.

Citation Information

Patent Citations

  • Automatic discovery of network topology

    CN1780250A

  • Network-based flat routing method

    WO2016058261A1