CN109831334B - Network topology construction method and device and terminal equipment - Google Patents

Network topology construction method and device and terminal equipment Download PDF

Info

Publication number
CN109831334B
CN109831334B CN201910135156.3A CN201910135156A CN109831334B CN 109831334 B CN109831334 B CN 109831334B CN 201910135156 A CN201910135156 A CN 201910135156A CN 109831334 B CN109831334 B CN 109831334B
Authority
CN
China
Prior art keywords
managed
equipment
level
network topology
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910135156.3A
Other languages
Chinese (zh)
Other versions
CN109831334A (en
Inventor
周启秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201910135156.3A priority Critical patent/CN109831334B/en
Publication of CN109831334A publication Critical patent/CN109831334A/en
Application granted granted Critical
Publication of CN109831334B publication Critical patent/CN109831334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network topology construction method, a device and terminal equipment, wherein the method comprises the following steps: acquiring an equipment information table corresponding to all managed equipment every other preset period; determining the affiliation between all managed devices and the management device according to the initial group identifier and the initial hierarchy identifier of the management device and the first device information, the first group identifier and the first hierarchy identifier of the managed devices; determining the affiliation among all managed devices according to the second device information; constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all managed devices; and correspondingly displaying real-time data of the network operation state in the constructed network topology according to the equipment information table. The invention can construct the network topology under the condition of reducing the complexity, can display the real-time data of the network running state through the network topology, and is beneficial to the management of each network device by a user.

Description

Network topology construction method and device and terminal equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a network topology construction method, an apparatus, and a terminal device.
Background
With the wide application of the wireless Wi-Fi technology and the expansion of activity places of people, the coverage requirements of people on a wireless network are increased, more and more users build the wireless network of a family or an office by using split type or master-slave type wireless network equipment to manage the network equipment, and the deployment of the wireless network is realized.
At present, wireless Network device exchange and configuration information display are generally performed through a Simple Network Management Protocol (SNMP), and a user may manage a Network device by running a Management process. The following disadvantages are associated with the use of the SNMP protocol for managing network devices:
first, the SNMP protocol is composed of a set of standards for network management, including an application layer protocol (application layer protocol), a database model (database schema) and a set of resource objects, and requires a user to have a certain professional knowledge, but the general user is not familiar with terms and operations related to the SNMP protocol, and the management manner is complicated for the user.
Second, users generally pay more attention to the dynamic operating parameters of the network to deploy wireless networks, such as network transmission rate, signal strength, better allocation and utilization of network resources. However, SNMP can only provide and display static attribute parameters of the network, which is not conducive to the management of each network device by the user.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method, an apparatus and a terminal device for constructing a network topology, which can construct a network topology under the condition of reducing complexity, and can display real-time data of a network operation state through the network topology, thereby facilitating a user to manage each network device.
In order to solve the above technical problem, an embodiment of the present invention provides a network topology construction method, where the method includes:
acquiring an equipment information table corresponding to all managed equipment every other preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
determining the affiliation between all managed devices and the management device according to a preset initial group identifier and a preset initial level identifier of the management device and the first device information, the first group identifier and the first level identifier of the managed devices;
determining the affiliation among all managed devices according to the second device information;
constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all managed devices;
and correspondingly displaying the real-time data of the network operation state in the constructed network topology according to the equipment information table.
Preferably, the method determines the affiliation between all managed devices and the managing device by:
determining whether the first group identification of the managed device corresponds to the initial group identification;
if the first group identification corresponds to the initial group identification, judging the hierarchy of the managed equipment in the network topology according to the first hierarchy identification of the managed equipment;
if the hierarchy of the managed device in the network topology is positioned at the lower level of the hierarchy of the management device, the managed device directly belongs to the management device;
if the hierarchy of the managed device in the network topology is not located at the next level of the hierarchy of the management device, the managed device is not directly subordinate to the management device.
Preferably, the method determines the affiliation between all managed devices by:
for any managed device which is not directly subordinate to the management device, determining a previous-level managed device of the managed device;
and determining the subordination relation between the managed equipment and the upper-level managed equipment according to the first equipment information of the managed equipment and the equipment information table of the upper-level managed equipment.
Preferably, the determining the affiliation between the managed device and the previous managed device according to the first device information of the managed device and the device information table of the previous managed device specifically includes:
judging whether the first equipment information of the managed equipment exists in an equipment information table of the upper-level managed equipment or not according to the first equipment information of the managed equipment;
if the first device information of the managed device exists in the device information table of the upper-level managed device, the managed device directly belongs to the upper-level managed device;
if the first device information of the managed device does not exist in the device information table of the upper-level managed device, the managed device does not directly belong to the upper-level managed device.
Preferably, the acquiring the device information tables of all managed devices every preset period specifically includes:
sending an information query message to all managed devices at intervals of a preset period, so that each managed device responds to the information query message and sends a device information table of the managed device to the management device;
and receiving the device information table sent by all the managed devices.
Preferably, before the obtaining the device information tables of all managed devices every preset period, the method further includes:
initializing a preset device information list array and a hash table; the device information list array is used for storing a received device information list sent by the managed device, and elements of the hash table serve as pointers and point to elements in the device information list array in a one-to-one correspondence mode.
Preferably, the first Group identifier and the initial Group identifier are both Group IDs, and the first level identifier and the initial level identifier are both numerical serial numbers.
Preferably, the first device information includes at least a MAC address or/and an IP address of the managed device;
the second device information at least comprises a MAC address or/and an IP address of a next-stage managed device associated with the managed device;
the third device information of the management device at least includes a MAC address or/and an IP address of the management device.
Preferably, the real-time data of the network operation state at least includes any one of a transmission rate, a signal strength and a transmission frequency band.
Preferably, after correspondingly displaying real-time data of the network operation state in the constructed network topology according to the device information table, the method further includes:
responding to the equipment information display request operation of any target equipment, and correspondingly displaying the equipment information of the target equipment in the network topology; wherein the target device is the management device or any managed device in the network topology.
In order to solve the above technical problem, an embodiment of the present invention further provides a network topology constructing apparatus, where the apparatus includes:
the acquisition module is used for acquiring an equipment information table corresponding to all managed equipment every other preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
a first dependency relationship determining module, configured to determine dependency relationships between all managed devices and the management device according to a preset initial group identifier and a preset initial hierarchy identifier of the management device, and the first device information, the first group identifier, and the first hierarchy identifier of the managed device;
the second dependency relationship determining module is used for determining the dependency relationship among all managed devices according to the second device information;
the network topology construction module is used for constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all the managed devices;
and the display module is used for correspondingly displaying the real-time data of the network running state in the constructed network topology according to the equipment information table.
In order to solve the technical problem, an embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the network topology constructing method is implemented as any one of the methods provided above.
According to the network topology construction method, the network topology construction device and the terminal equipment, information required for constructing the network topology and real-time data of the network operation state can be directly provided for the management equipment by the managed equipment when the network topology is constructed, the network topology can be constructed under the condition of reducing complexity, and the network topology construction through an SNMP (simple network management protocol) by applying professional knowledge when a user needs to manage each network equipment is avoided; meanwhile, the constructed network topology can provide real-time data of the network operation state for users, so that the users can conveniently know the operation condition of each network device, the users can manage each network device, and network resources can be better distributed and utilized.
Drawings
Fig. 1 is a schematic diagram of a network topology according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a network topology construction method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network topology constructing apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, fig. 1 is a schematic diagram of a network topology according to an embodiment of the present invention.
In a distributed or Master-slave wireless network structure, a wireless device is composed of a management device Master and a managed device, and fig. 1 illustrates a tree network topology formed by the management device and the managed device in the same cluster. The management device Master mainly provides a dial-up access gateway function, the managed device is mainly used for expanding a wireless coverage range of the management device, the management device Master and each managed device are distributed in a corresponding network layer in a network topology, if the level of the management device Master is taken as a first level, a second level is provided with a managed device A, a managed device B and a managed device C, a third level is provided with managed devices A1-A3, managed devices B1-B2 and managed devices C1-C3, and a fourth level is provided with a managed device A21, a managed device C11 and a managed device C31.
Referring to fig. 2, fig. 2 is a schematic flowchart of a network topology construction method according to an embodiment of the present invention; specifically, the embodiment of the present invention provides a method for constructing a network topology, where the method includes:
s100, acquiring a device information table corresponding to all managed devices every other preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
s200, determining the affiliation between all managed devices and the management device according to a preset initial group identifier and a preset initial level identifier of the management device and the first device information, the first group identifier and the first level identifier of the managed devices;
s300, determining the affiliation among all managed devices according to the second device information;
s400, constructing a network topology according to all managed devices and the affiliations among the managed devices;
and S500, correspondingly displaying the real-time data of the network running state in the constructed network topology according to the equipment information table.
When the wireless network comprises a plurality of clusters, the management device may have a plurality of initial group identifiers, the initial group identifier is used for identifying the cluster where the management device is located, and if the first group identifier of the managed device corresponds to the initial group identifier of the management device, the managed device is located in the cluster where the management device is located and is managed by the management device; the initial hierarchy identification of the managing device identifies a hierarchy of the managing device in the network topology and the first hierarchy identification of each managed device identifies a hierarchy of the managed device in the network topology. The managed device at the next level of the managed device refers to a managed device at the next level of the hierarchy of the managed device, and for example, as shown in fig. 1, for the managed device C1 at the third level of the network topology, the managed device a21, the managed device C11, and the managed device C31 at the fourth level are all managed devices at the next level of the managed device C1. The next-level managed devices associated with the managed device, that is, the managed devices directly belonging to the next level of the managed device, for example, the next-level managed devices associated with the managed device C are managed devices C1 to C3; as another example, the next level managed device associated with managed device C1 is managed device C11. Each of the next-stage managed devices is a managed device of the management device. The real-time data of the network operation state refers to real-time data of a network operation environment on a transmission link between network elements in a network, such as transmission rate, transmission frequency band, signal strength and the like.
Specifically, there may be a change in the device in the wireless network, for example, a new managed device is accessed, moved out, or exchanged, and the management device acquires the device information tables corresponding to all the managed devices every preset period, and each managed device responds to the information query message and sends the device information table to the management device; the device information table sent by each managed device comprises first device information of the managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next level managed device associated with the managed device; the management device acquires the device information table of each managed device, namely acquiring the information of any managed device and the information of the next-level managed device directly belonging to the managed device;
determining the affiliation between all managed devices and the management device according to the preset initial group identifier and the preset initial level identifier of the management device and the first device information, the first group identifier and the first level identifier of the managed devices; determining the affiliation among all managed devices according to the second device information provided by each managed device; determining the affiliation between the management equipment and the managed equipment in the network topology and the affiliation between the managed equipment, namely determining the structure in the network topology to construct the network topology; and correspondingly displaying real-time data of the network operation state in the constructed network topology according to the equipment information table. The user can see the network topology and real-time data of the management device and the operating status of each network in the display interface.
According to the network topology construction method provided by the embodiment of the invention, when the network topology is constructed, the managed equipment directly provides the information required for constructing the network topology and the real-time data of the network operation state for the management equipment, so that the network topology can be constructed under the condition of reducing the complexity, and the network topology construction through an SNMP protocol by applying professional knowledge when the user needs to manage each network equipment is avoided; meanwhile, the constructed network topology can provide real-time data of the network operation state for users, so that the users can conveniently know the operation condition of each network device, the users can manage each network device, and network resources can be better distributed and utilized.
Optionally, any managed device may set its first group identifier and first level identifier by:
analyzing a management data frame transmitted by front-end equipment associated with managed equipment to obtain a group identifier of the front-end equipment and a level identifier of the front-end equipment in the management data frame; modifying the group identification of the managed device into a first group identification corresponding to the group identification of the front-end device; acquiring a first level identifier corresponding to the level of the managed equipment according to a preset level corresponding rule and the level identifier of the front-end equipment; storing the first group identification and the first level identification of the managed device, and advertising the first group identification and the first level identification to a backend device associated with the managed device.
The front-end device is a device whose hierarchy is located at a level higher than the hierarchy where the managed device is located and is associated with the managed device, for example, if the Master of the management device is located at a first hierarchy of the network topology, the front-end devices of the managed devices a to C located at a second hierarchy are all management devices, and correspondingly, the back-end devices of the Master of the management device are the managed devices a to C located at the second hierarchy; for the managed device of the third hierarchy, the front-end devices of the managed devices a 1-A3 are the managed devices a located at the second hierarchy; and for the managed device at the third hierarchy, the front-end device of the managed device a21 is the managed device a2 at the third hierarchy, and so on.
Preferably, the method determines the affiliation between all managed devices and the managing device by:
determining whether the first group identification of the managed device corresponds to the initial group identification;
if the first group identification corresponds to the initial group identification, judging the hierarchy of the managed equipment in the network topology according to the first hierarchy identification of the managed equipment;
if the hierarchy of the managed device in the network topology is positioned at the lower level of the hierarchy of the management device, the managed device directly belongs to the management device;
if the hierarchy of the managed device in the network topology is not located at the next level of the hierarchy of the management device, the managed device is not directly subordinate to the management device.
Specifically, for any managed device, it may be determined whether the managed device and the management device are in the same cluster or not and whether the managed device is managed by the management device through the first group identifier of the managed device. Each cluster corresponds to one management device, and then the managed device at the level next to the level of the management device in the cluster directly belongs to the management device, while the level is not at the level next to the level of the management device, so that the managed device does not directly belong to the management device, each managed device is judged by adopting the same method, and all the managed devices directly belonging to the management device can be determined, thereby determining the association condition between the management device and each managed device.
Optionally, the first group identifier and the initial group identifier may correspond to each other in various manners, for example, the first group identifier is the same as the initial group identifier, or the initial group identifier is a capital letter, and the corresponding first group identifier is a lower case letter of the initial group identifier, or corresponds to each other in one-to-one manner according to a preset mapping table.
Preferably, the method determines the affiliation between all managed devices by:
for any managed device which is not directly subordinate to the management device, determining a previous-level managed device of the managed device;
and determining the subordination relation between the managed equipment and the upper-level managed equipment according to the first equipment information of the managed equipment and the equipment information table of the upper-level managed equipment.
The upper managed device refers to a managed device at a level higher than the level of the managed device, and for example, as shown in fig. 1, for a managed device a2 at a third level of the network topology, the managed device a, the managed device B, and the managed device C are all higher managed devices than the managed device a 2. The number of the managed devices at the upper stage of each managed device may be one, two or more.
Specifically, for any managed device that is not directly subordinate to the management device, a higher-level managed device of the managed device is determined, and the subordinate relationship between the managed device and the higher-level managed device is determined according to the first device information of the managed device and the device information table of the higher-level managed device, so as to determine the association between the managed devices.
Preferably, the determining the affiliation between the managed device and the previous managed device according to the first device information of the managed device and the device information table of the previous managed device specifically includes:
judging whether the first equipment information of the managed equipment exists in an equipment information table of the upper-level managed equipment or not according to the first equipment information of the managed equipment;
if the first device information of the managed device exists in the device information table of the upper-level managed device, the managed device directly belongs to the upper-level managed device;
if the first device information of the managed device does not exist in the device information table of the upper-level managed device, the managed device does not directly belong to the upper-level managed device.
Specifically, for any managed device, it is necessary to determine a previous managed device to which the managed device directly belongs from previous managed devices, and determine whether first device information of the managed device exists in a device information table of the previous managed device according to the first device information of the managed device, and if the first device information of the managed device exists in the device information table of a certain previous managed device, which indicates that the managed device is a next managed device associated with the previous managed device, the managed device directly belongs to the previous managed device; if the first device information of the managed device does not exist in the device information table of a certain upper-level managed device, the managed device is not the lower-level managed device associated with the upper-level managed device, and the managed device is not directly subordinate to the upper-level managed device.
Preferably, the acquiring the device information tables of all managed devices every preset period specifically includes:
sending an information query message to all managed devices at intervals of a preset period, so that each managed device responds to the information query message and sends a device information table of the managed device to the management device;
and receiving the device information table sent by all the managed devices.
Specifically, the management device sends an information query message to all managed devices every preset period, so that each managed device sends a device information table of the managed device to the management device in response to the information query message, so that the management device obtains the latest information of each device in the network topology and updates the network topology.
Preferably, before the obtaining the device information tables of all managed devices every preset period, the method further includes:
initializing a preset device information list array and a hash table; the device information list array is used for storing a received device information list sent by the managed device, and elements of the hash table serve as pointers and point to elements in the device information list array in a one-to-one correspondence mode.
Specifically, before information in the device information table sent by the managed device is stored, the device information list array and the hash table are initialized, and elements of the hash table are used as pointers to point to elements in the device information list array in a one-to-one correspondence manner, so that the device information table can be quickly inserted and inquired, and the construction of network topology is accelerated.
If the first device information comprises the MAC address, the Length of the character section of the device information list array is Length, the device information list array comprises Length elements, the MAC address in the first device information of the managed device corresponding to the ith element is composed of 6 char arrays which are respectively MACi[0]~MACi[5](ii) a The Hash table at least comprises Length elements, and the Hash value pointing to the ith element of the device information list array is HashiOptionally, each Hash value HashiCalculated by the following formula:
Hashi=(MACi[0]^MACi[1]^MACi[2]^MACi[3]^MACi[4]^MACi[6])%(Length)
wherein Λ is an exclusive-or operator,% is a remainder operator.
For example, the MAC address in the first device information of the managed device corresponding to the 2 nd element of the device information list array is: F8-1A-67-04-B0-BE, MAC2[0]~MAC2[5]F8, 1A, 67, 04, B0, BE, Length is 256, the hash value calculation formula for the 2 nd element of the device information list array in the hash table is:
Hash2=(MAC2[0]^MAC2[1]^MAC2[2]^MAC2[3]^MAC2[4]^MAC2[6])%256。
preferably, the first Group identifier and the initial Group identifier are both Group IDs, and the first level identifier are both numerical serial numbers.
Specifically, the first Group identifier and the initial Group identifier are both Group IDs, and the first level identifier and the initial level identifier are both numerical sequence numbers; optionally, the initial level identifier of the management device is 0, and the first level identifiers of the managed devices at each next lower level are sequentially added by 1, as shown in fig. 1, the initial level identifier of the management device Master is 0, the first level identifiers of the managed device a, the managed device B, and the managed device C at the second level are all 1, the first level identifiers of the managed devices a1 to A3, the managed devices B1 to B2, and the managed devices C1 to C3 at the third level are all 2, the first level identifiers of the managed device a21, the managed device C11, and the managed device C31 at the fourth level are all 3, and so on if there are other levels in the specific network topology. The initial level identifier of the management device is 0 here only as an example, and the initial level identifier may be other values.
Preferably, the first device information includes at least a MAC address or/and an IP address of the managed device;
the second device information at least comprises a MAC address or/and an IP address of a next-stage managed device associated with the managed device;
the third device information of the management device at least includes a MAC address or/and an IP address of the management device.
Specifically, the MAC address and the IP address of each device are globally unique, so that each device can be well distinguished, and the accuracy of determining the dependency relationship of each device in the network topology is improved.
Optionally, the first device information, the second device information, and the third device information may include a device name of a corresponding device, a value range of a node in the network topology where the device is located, and other information.
Preferably, the real-time data of the network operation state at least includes any one of a transmission rate, a signal strength and a transmission frequency band.
The transmission rate, the signal strength and the transmission frequency band are parameter information which can be understood and paid attention to by a general user, and any one of the transmission rate, the signal strength and the transmission frequency band is displayed to the user, so that the user can conveniently understand the network operation condition, and the network equipment can be managed conveniently.
Preferably, after correspondingly displaying real-time data of the network operation state in the constructed network topology according to the device information table, the method further includes:
responding to the equipment information display request operation of any target equipment, and correspondingly displaying the equipment information of the target equipment in the network topology; wherein the target device is the management device or any managed device in the network topology.
It should be noted that both the management device and any managed device can be target devices operated by the user, and the device information display operation can be set according to specific situations, for example, clicking or double-clicking a certain device in the network topology, pressing a certain function key after selecting a certain device, or pressing a function key for displaying device information of all devices by pressing one key.
In specific implementation, in the network topology construction method provided in the embodiment of the present invention, the device information tables corresponding to all managed devices are obtained every preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device; determining the affiliation between all managed devices and the management device according to a preset initial group identifier and a preset initial level identifier of the management device and the first device information, the first group identifier and the first level identifier of the managed devices; determining the affiliation among all managed devices according to the second device information; constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all managed devices; and correspondingly displaying the real-time data of the network operation state in the constructed network topology according to the equipment information table.
According to the network topology construction method provided by the embodiment of the invention, when the network topology is constructed, the managed equipment directly provides the information required for constructing the network topology and the real-time data of the network operation state for the management equipment, so that the network topology can be constructed under the condition of reducing the complexity, and the network topology construction through an SNMP protocol by applying professional knowledge when the user needs to manage each network equipment is avoided; meanwhile, the constructed network topology can provide real-time data of the network operation state for users, so that the users can conveniently know the operation condition of each network device, the users can manage each network device, and network resources can be better distributed and utilized.
Example two
Referring to fig. 3, fig. 3 is a schematic structural diagram of a network topology constructing apparatus according to a second embodiment of the present invention.
The embodiment of the invention also provides a network topology construction device, which comprises:
an obtaining module 11, configured to obtain, every preset period, an apparatus information table corresponding to all managed apparatuses; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
a first dependency relationship determining module 12, configured to determine, according to a preset initial group identifier and a preset initial hierarchy identifier of a management device, and the first device information, the first group identifier, and the first hierarchy identifier of a managed device, a dependency relationship between all managed devices and the management device;
a second dependency relationship determining module 13, configured to determine, according to the second device information, dependency relationships among all managed devices;
a network topology constructing module 14, configured to construct a network topology according to all managed devices and dependencies between the managed devices and dependencies between all managed devices;
and the display module 15 is configured to correspondingly display the real-time data of the network operation state in the constructed network topology according to the device information table.
Preferably, for any managed device, the first dependency relationship determining module 12 specifically includes:
a group identifier determining unit configured to determine whether the first group identifier corresponds to the initial group identifier;
a hierarchy determining unit, configured to determine, according to the first hierarchy identifier, a hierarchy of the managed device in a network topology if the first group identifier corresponds to the initial group identifier;
a first dependency relationship determining unit, configured to, if a hierarchy of a managed device in a network topology is located at a next level of a hierarchy of the managing device, directly depend from the managing device by the managed device; if the hierarchy of the managed device in the network topology is not located at the next level of the hierarchy of the management device, the managed device is not directly subordinate to the management device.
Preferably, the second dependency relationship determining module 13 specifically includes:
a first determination unit configured to determine, for any managed apparatus that is not directly subordinate to the management apparatus, a higher-level managed apparatus of the managed apparatus;
a second determining unit, configured to determine an affiliation between the managed device and the upper-level managed device according to the first device information of the managed device and the device information table of the upper-level managed device.
Preferably, the second determining unit is specifically configured to:
judging whether second equipment information in an equipment information table of the upper-level managed equipment has the first equipment information of the managed equipment or not according to the first equipment information of the managed equipment;
if the second device information in the device information table of the upper-level managed device has the first device information of the managed device, the managed device directly belongs to the upper-level managed device;
and if the second device information in the device information table of the upper-level managed device does not have the first device information of the managed device, the managed device does not directly belong to the upper-level managed device.
Preferably, the acquiring module specifically includes:
the query unit is used for sending information query messages to all managed devices at intervals of a preset period, so that each managed device responds to the information query messages and sends a device information table of the managed device to the management device;
and the receiving unit is used for receiving the equipment information table sent by all the managed equipment.
Preferably, the apparatus further comprises:
the initialization module is used for initializing the equipment information list array and the hash table; the device information list array is used for storing the device information list, and elements of the hash table are used as pointers to point to elements in the device information list array in a one-to-one correspondence mode.
Preferably, the first group identifier and the initial group identifier are group IDs, and the hierarchical identifier is a numerical serial number.
Preferably, the first device information includes at least a MAC address or an IP address of the managed device;
the second device information includes at least a MAC address or an IP address of a next-stage managed device associated with the managed device;
the third device information of the management device includes at least a MAC address or an IP address of the management device.
Preferably, the apparatus further comprises:
the device information display module is used for responding to the device information display request operation of any target device and correspondingly displaying the device information of the target device in the network topology; wherein the target device is the management device or any managed device in the network topology.
Preferably, the real-time data of the network operation state at least includes any one of a transmission rate, a signal strength and a transmission frequency band.
According to the network topology construction device provided by the embodiment of the invention, the acquisition module 11 acquires the device information tables corresponding to all managed devices at intervals of a preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device; determining, by a first dependency relationship determining module 12, dependency relationships between all managed devices and the managing device according to a preset initial group identifier and a preset initial level identifier of the managing device, and the first device information, the first group identifier, and the first level identifier of the managed device; determining the affiliation among all managed devices by a second affiliation determination module 13 according to the second device information; a network topology constructing module 14, configured to construct a network topology according to all managed devices and dependencies between the managed devices and dependencies between all managed devices; and correspondingly displaying the real-time data of the network operation state in the constructed network topology according to the equipment information table through a display module 15.
The network topology construction device provided by the embodiment of the invention can acquire the information required for constructing the network topology and the real-time data of the network operation state, which are directly provided by the managed equipment to the management equipment, when constructing the network topology, can construct the network topology under the condition of reducing the complexity, and avoids the situation that a user applies professional knowledge to construct the network topology through an SNMP (simple network management protocol) when needing to manage each network equipment; meanwhile, the constructed network topology can provide real-time data of the network operation state for users, so that the users can conveniently know the operation condition of each network device, the users can manage each network device, and network resources can be better distributed and utilized.
It should be noted that, the network topology construction apparatus provided in the second embodiment of the present invention is configured to execute the steps of the network topology construction method described in the above embodiment, and working principles and beneficial effects of the two are in one-to-one correspondence, which is not described again.
It will be understood by those skilled in the art that the schematic diagram of the network topology constructing apparatus is merely an example of the network topology constructing apparatus, and does not constitute a limitation to the network topology constructing apparatus, and may include more or less components than those shown in the drawings, or combine some components, or different components, for example, the network topology constructing apparatus may further include an input-output device, a network access device, a bus, and the like.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention.
An embodiment of the present invention further provides a terminal device, which includes a processor 10, a memory 20, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the network topology constructing method described in any one of the above-mentioned methods is implemented.
Specifically, the processor and the memory in the terminal device can be one or more, and the terminal device can be a computer, a mobile phone, a tablet, a server, a cloud device and the like.
The terminal device of the embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When executing the computer program, the processor implements the steps in the inter-process multi-request management method provided in the above embodiment, for example, step S100 shown in fig. 2, and acquires the device information tables corresponding to all managed devices at preset intervals. Or, the processor implements the functions of the modules in the embodiments of the apparatuses when executing the computer program, for example, the obtaining module 11 is configured to obtain the device information tables corresponding to all managed devices at preset intervals.
Illustratively, the computer program can be divided into one or more modules/units (e.g., computer program 1, computer program 2, shown in FIG. 4), which are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device. For example, the computer program may be divided into an obtaining module 11, a first dependency relationship determining module 12, a second dependency relationship determining module 13, a network topology constructing module 14, and a display module 15, and the specific functions of the modules are as follows:
an obtaining module 11, configured to obtain, every preset period, an apparatus information table corresponding to all managed apparatuses; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
a first dependency relationship determining module 12, configured to determine, according to a preset initial group identifier and a preset initial hierarchy identifier of a management device, and the first device information, the first group identifier, and the first hierarchy identifier of a managed device, a dependency relationship between all managed devices and the management device;
a second dependency relationship determining module 13, configured to determine, according to the second device information, dependency relationships among all managed devices;
a network topology constructing module 14, configured to construct a network topology according to all managed devices and dependencies between the managed devices and dependencies between all managed devices;
and the display module 15 is configured to correspondingly display the real-time data of the network operation state in the constructed network topology according to the device information table.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal device and connects the various parts of the whole terminal device using various interfaces and lines.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the terminal device integrated module/unit can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow in the inter-process multi-request management method provided by the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the inter-process multi-request management method provided by any of the above embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the terminal device may include, but is not limited to, a processor and a memory, and those skilled in the art will understand that the structural diagram of fig. 4 is only an example of the terminal device and does not constitute a limitation to the terminal device, and may include more or less components than those shown in the figure, or combine some components, or different components.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A method for constructing a network topology, the method comprising:
acquiring an equipment information table corresponding to all managed equipment every other preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
determining the affiliation between all managed devices and the management device according to a preset initial group identifier and a preset initial level identifier of the management device and the first device information, the first group identifier and the first level identifier of the managed devices;
determining the affiliation among all managed devices according to the second device information;
constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all managed devices;
correspondingly displaying real-time data of the network operation state in the constructed network topology according to the equipment information table;
the method determines the affiliation between all managed devices and the managing device by:
determining whether the first group identification of the managed device corresponds to the initial group identification;
if the first group identification corresponds to the initial group identification, judging the hierarchy of the managed equipment in the network topology according to the first hierarchy identification of the managed equipment;
if the hierarchy of the managed device in the network topology is positioned at the lower level of the hierarchy of the management device, the managed device directly belongs to the management device;
if the hierarchy of the managed device in the network topology is not positioned at the next level of the hierarchy of the management device, the managed device is not directly subordinate to the management device;
the method determines affiliation between all managed devices by:
for any managed device which is not directly subordinate to the management device, determining a previous-level managed device of the managed device;
and determining the subordination relation between the managed equipment and the upper-level managed equipment according to the first equipment information of the managed equipment and the equipment information table of the upper-level managed equipment.
2. The method according to claim 1, wherein the determining the dependency relationship between the managed device and the upper level managed device according to the first device information of the managed device and the device information table of the upper level managed device specifically comprises:
judging whether the first equipment information of the managed equipment exists in an equipment information table of the upper-level managed equipment or not according to the first equipment information of the managed equipment;
if the first device information of the managed device exists in the device information table of the upper-level managed device, the managed device directly belongs to the upper-level managed device;
if the first device information of the managed device does not exist in the device information table of the upper-level managed device, the managed device does not directly belong to the upper-level managed device.
3. The method for constructing a network topology according to claim 1, wherein the acquiring the device information tables of all managed devices every preset period specifically comprises:
sending an information query message to all managed devices at intervals of a preset period, so that each managed device responds to the information query message and sends a device information table of the managed device to the management device;
and receiving the device information table sent by all the managed devices.
4. The method for constructing a network topology according to claim 1, further comprising, before said obtaining the device information tables of all managed devices every preset period:
initializing a preset device information list array and a hash table; the device information list array is used for storing a received device information list sent by the managed device, and elements of the hash table serve as pointers and point to elements in the device information list array in a one-to-one correspondence mode.
5. The method according to claim 1, wherein said first Group ID and said initial Group ID are Group IDs, and said first level ID and said initial level ID are numerical sequence numbers.
6. The method of constructing a network topology according to claim 1,
the first device information at least comprises a MAC address or/and an IP address of the managed device;
the second device information at least comprises a MAC address or/and an IP address of a next-stage managed device associated with the managed device;
the third device information of the management device at least includes a MAC address or/and an IP address of the management device.
7. The method according to claim 1, wherein the real-time data of the network operation status at least comprises any one of transmission rate, signal strength and transmission frequency band.
8. The method according to any one of claims 1 to 7, further comprising, after correspondingly displaying real-time data of a network operation state in the constructed network topology according to the device information table:
responding to the equipment information display request operation of any target equipment, and correspondingly displaying the equipment information of the target equipment in the network topology; wherein the target device is the management device or any managed device in the network topology.
9. An apparatus for network topology construction, the apparatus comprising:
the acquisition module is used for acquiring an equipment information table corresponding to all managed equipment every other preset period; the device information table comprises first device information of a managed device, a preset first group identifier, a preset first level identifier, real-time data of a network running state and second device information of a next-level managed device related to the managed device;
a first dependency relationship determining module, configured to determine dependency relationships between all managed devices and the management device according to a preset initial group identifier and a preset initial hierarchy identifier of the management device, and the first device information, the first group identifier, and the first hierarchy identifier of the managed device;
the second dependency relationship determining module is used for determining the dependency relationship among all managed devices according to the second device information;
the network topology construction module is used for constructing a network topology according to the affiliations between all managed devices and the management device and the affiliations between all the managed devices;
the display module is used for correspondingly displaying the real-time data of the network operation state in the constructed network topology according to the equipment information table;
the first dependency determination module is specifically configured to: determining whether the first group identification of the managed device corresponds to the initial group identification;
if the first group identification corresponds to the initial group identification, judging the hierarchy of the managed equipment in the network topology according to the first hierarchy identification of the managed equipment;
if the hierarchy of the managed device in the network topology is positioned at the lower level of the hierarchy of the management device, the managed device directly belongs to the management device;
if the hierarchy of the managed device in the network topology is not positioned at the next level of the hierarchy of the management device, the managed device is not directly subordinate to the management device;
the second dependency relationship determining module is specifically configured to:
for any managed device which is not directly subordinate to the management device, determining a previous-level managed device of the managed device;
and determining the subordination relation between the managed equipment and the upper-level managed equipment according to the first equipment information of the managed equipment and the equipment information table of the upper-level managed equipment.
10. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the network topology construction method according to any one of claims 1 to 8 when executing the computer program.
CN201910135156.3A 2019-02-20 2019-02-20 Network topology construction method and device and terminal equipment Active CN109831334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910135156.3A CN109831334B (en) 2019-02-20 2019-02-20 Network topology construction method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910135156.3A CN109831334B (en) 2019-02-20 2019-02-20 Network topology construction method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN109831334A CN109831334A (en) 2019-05-31
CN109831334B true CN109831334B (en) 2022-03-08

Family

ID=66864239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910135156.3A Active CN109831334B (en) 2019-02-20 2019-02-20 Network topology construction method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN109831334B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111465074B (en) * 2020-04-16 2022-04-26 安科讯(福建)科技有限公司 Method and terminal for generating topological relation in wireless ad hoc network
CN112737830B (en) * 2020-12-25 2022-07-29 杭州迪普科技股份有限公司 Method and device for calibrating detection target information reported by mechanism
CN112817683A (en) * 2021-03-02 2021-05-18 深圳市东微智能科技股份有限公司 Control method, control device and medium for topological structure configuration interface
CN113312734B (en) * 2021-05-12 2023-07-04 广东顺畅科技有限公司 Ammeter network topology generation method and device and computer readable storage medium
CN115589364A (en) * 2021-07-06 2023-01-10 华为技术有限公司 Communication method, system and device
CN116137594A (en) * 2021-11-18 2023-05-19 ***通信集团重庆有限公司 Method, device, equipment and storage medium for generating network topology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104066208A (en) * 2013-03-22 2014-09-24 华为技术有限公司 Networking method of meter reading system and device thereof
CN107104824A (en) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 A kind of network topology determines method and apparatus
CN107294797A (en) * 2017-08-24 2017-10-24 广东电网有限责任公司电力科学研究院 Network topology structure recognition methods and system
CN108712286A (en) * 2018-05-22 2018-10-26 华为技术有限公司 The determination method, apparatus and storage medium of network topology structure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8849924B2 (en) * 2010-04-08 2014-09-30 Microsoft Corporation Network infrastructure management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104066208A (en) * 2013-03-22 2014-09-24 华为技术有限公司 Networking method of meter reading system and device thereof
CN107104824A (en) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 A kind of network topology determines method and apparatus
CN107294797A (en) * 2017-08-24 2017-10-24 广东电网有限责任公司电力科学研究院 Network topology structure recognition methods and system
CN108712286A (en) * 2018-05-22 2018-10-26 华为技术有限公司 The determination method, apparatus and storage medium of network topology structure

Also Published As

Publication number Publication date
CN109831334A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN109831334B (en) Network topology construction method and device and terminal equipment
CN107104824B (en) Network topology determination method and device
CN107819615B (en) Equipment self-adaptive access method and device and master control equipment
CN101257406B (en) Method and system for discovering net elements
CN101083557A (en) SNMP based IP network cluster managerial approach
CN111625419B (en) Log acquisition method, system, equipment and computer readable storage medium
CN112953774A (en) Network topology generation method, system, equipment and computer storage medium
CN114979074B (en) Enterprise IPv6 address hierarchical management method, system and storage medium
CN113642300A (en) Report generation method and device, electronic equipment and computer readable medium
CN114398397A (en) Data processing method, device, storage medium and system
CN110995483A (en) Network topology discovery method and device
CN116436968A (en) Service grid communication method, system, device and storage medium
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN113242254B (en) Communication message processing method, device, terminal equipment and storage medium
CN109067558A (en) data service method and system
CN114866970A (en) Policy control method, system and related equipment
CN111600749B (en) Method and system for managing multiple servers and computer storage medium
CN114584533A (en) Address conflict detection method, address conflict detection device and electronic equipment
CN113127292A (en) Operation, maintenance and monitoring method suitable for multi-cloud management
CN109862131B (en) Server access address allocation method and device and computer readable storage medium
CN112135302A (en) Control method and device for base station topology information and computer readable storage medium
CN115314512B (en) Massive terminal data synchronization method and system
CN111988745A (en) Target user determination method, device, equipment and medium based on WiFi connection data
CN116112306B (en) Decentralizing network interaction method, device, equipment and storage medium
CN115208671B (en) Firewall configuration method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant