CN115550189A - Network topology construction method and device, electronic equipment and storage medium - Google Patents

Network topology construction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115550189A
CN115550189A CN202211077856.XA CN202211077856A CN115550189A CN 115550189 A CN115550189 A CN 115550189A CN 202211077856 A CN202211077856 A CN 202211077856A CN 115550189 A CN115550189 A CN 115550189A
Authority
CN
China
Prior art keywords
entity
application
path
matrix
layer
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.)
Pending
Application number
CN202211077856.XA
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211077856.XA priority Critical patent/CN115550189A/en
Publication of CN115550189A publication Critical patent/CN115550189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a network topology construction method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint; determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix; and constructing a network topology according to the adjacency matrix. By constructing the network topology according to the embodiment of the invention, the cross-protocol layer organic association and positioning of the application layer, the logic layer and the physical layer can be realized.

Description

Network topology construction method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a network topology construction method, a network topology construction apparatus, an electronic device, and a storage medium.
Background
When a network such as an Internet Protocol (IP) operates, information of different layers needs to be associated from a certain layer of the network, for example, information of a bearer user is obtained based on a certain device; acquiring the actual physical routing condition based on a certain two-section address; however, in the conventional network operation, elements of different protocol layers are independent from each other, and mainly aim at the connection relationship between network devices, and only aim at the connection relationship acquisition between physical devices, depending on a specific three-layer routing protocol technology, the method cannot adapt to diversified routes such as policy routing, LSP (Layered Service Provider, hierarchical Service Provider) and a two-layer network structure, and an effective integration mechanism is lacking between different protocol layers.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a network topology constructing method, a network topology constructing apparatus, an electronic device and a storage medium that overcome or at least partially solve the above problems.
In one aspect of the invention, the embodiment of the invention discloses a network topology construction method, which is applied to an end-to-end three-layer topology model, wherein the end-to-end three-layer topology model comprises a physical layer, a logic layer and an application layer; the network topology construction method comprises the following steps:
acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix;
and constructing a network topology according to the adjacency matrix.
Optionally, the determining that the physical entity object, the logical entity object, and the application entity object are directed graph vertices, the determining that the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint are directed graph edges, and the constructing an adjacency matrix includes:
constructing a physical path set matrix according to the physical entity object and the physical entity relationship;
constructing a logic path set matrix according to the logic entity object, the logic entity relationship, the logic entity constraint and the physical path set matrix;
constructing an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint and the logic path set matrix;
determining the application path set matrix as the adjacency matrix.
Optionally, the step of constructing a logical path set matrix according to the logical entity object, the logical entity relationship, the logical entity constraint, and the physical path set matrix includes:
determining a forwarding path matrix according to the relation between the logic entity object and the logic entity;
calculating the intersection of the forwarding path matrix and the physical path set matrix to obtain a logical topology matrix;
constructing a logic entity relationship according to the logic entity object and the logic entity constraint, and determining a logic constraint matrix;
and adding the logic topology matrix and the logic constraint matrix to obtain a logic path set matrix.
Optionally, the step of constructing an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint, and the logic path set matrix includes:
determining an application relation matrix according to the application entity object and the application entity relation;
assigning the application relation matrix by adopting the logic path set matrix;
determining an application constraint matrix according to the application entity object and the application entity constraint;
and adding the assigned application relation matrix and the application constraint matrix to obtain an application path set matrix.
Optionally, the network topology constructing method further includes:
decomposing the adjacency matrix to obtain a one-way path;
determining a target path according to the unidirectional path;
and carrying out data transmission based on the target path.
Optionally, the step of determining a target path according to the unidirectional path includes:
carrying out accessibility judgment on the one-way path aiming at any one-way path;
when the one-way path has reachability, determining that the one-way path is a reachable path;
and determining a target path according to the reachable path.
Optionally, the reachable path includes multiple reachable sub-paths, and the reachable sub-paths correspond to the priority weight values; the step of determining a target path according to the reachable path comprises:
comparing the reachable sub-paths of the same hop of different reachable paths, and judging whether the priority weight values corresponding to the reachable sub-paths are the same or not;
when the priority weight values corresponding to the reachable sub-paths are the same, the hop count is increased, and based on the hop count after increasing, the same-hop reachable sub-paths aiming at different reachable paths are compared, and whether the priority weight values corresponding to the reachable sub-paths are the same is judged;
when the priority weight values corresponding to the reachable sub-paths are different, sorting the reachable sub-paths based on the descending order of the priority weight values corresponding to the reachable sub-paths, and determining the reachable path where the first reachable sub-path is sorted as a target path.
In a second aspect of the present invention, an embodiment of the present invention further discloses a network topology constructing apparatus, which is applied to an end-to-end three-layer topology model, where the end-to-end three-layer topology model includes a physical layer, a logical layer, and an application layer; the network topology constructing apparatus includes:
the acquisition module is used for acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
a construction module, configured to determine that the physical entity object, the logical entity object, and the application entity object are directed graph vertices, determine that the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint are directed graph edges, and construct an adjacency matrix;
and the construction module is used for constructing a network topology according to the adjacency matrix.
In a third aspect of the present invention, an embodiment of the present invention further discloses an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the network topology construction method are implemented.
In a fourth aspect of the present invention, the embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the network topology building method as described above.
The embodiment of the invention has the following advantages:
the embodiment of the invention obtains physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint; determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix; and constructing a network topology according to the adjacency matrix. By integrating the three layers of an application layer, a logic layer and a physical layer in a graph theory mode through an end-to-end network three-layer topological model structure, the effective association among a plurality of protocol layers is realized, and the integration of a multi-layer and end-to-end topological system is established; in the actual network operation, any network element of one layer can be appointed to pass through the mapping relation of three-layer topology; and the related end-to-end path elements of each layer are positioned, so that the network operation is facilitated.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a method for network topology construction of the present invention;
FIG. 2 is a flow chart of steps in another embodiment of a method of network topology construction of the present invention;
FIG. 3 is a schematic diagram of an example of a network topology construction method of the present invention;
FIG. 4 is a first path diagram illustrating an example of a network topology construction method according to the present invention;
FIG. 5 is a second path diagram illustrating an exemplary network topology construction method according to the present invention;
FIG. 6 is a third exemplary path diagram of a network topology construction method according to the present invention;
FIG. 7 is a fourth exemplary path diagram of a network topology construction method according to the present invention;
fig. 8 is a block diagram of a network topology constructing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a network topology construction method according to the present invention is shown, where the network topology construction method is applied to an end-to-end three-layer topology model, and the end-to-end three-layer topology model includes a physical layer, a logical layer, and an application layer.
In an embodiment of the present invention, the end-to-end three-layer topology model is defined to include three protocol layers, specifically a physical layer, a logical layer, and an application layer. Three protocol layers of the end-to-end three-layer topology Model have a correspondence relationship with seven protocol layers of an Open System Interconnection Reference Model (OSI). The application layer, presentation layer, session layer, and transport layer in the osi seven-layer model can be defined as the application layer in the end-to-end three-layer model with reference to table 1; a network layer and a data link layer in the OSI seven-layer model are defined as logic layers in an end-to-end three-layer model; the physical layer in the OSI seven-layer model is defined as the physical layer in the end-to-end three-layer model. Wherein, the application layer is used for describing an application path from the client to the server. The logical layer is used to delineate a logical forwarding path. The physical layer is used to delineate the end-application path.
Figure BDA0003832380460000051
TABLE 1
The network topology construction method may specifically include the following steps:
step 101, acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
and acquiring the physical layer element, the logic layer element and the application layer element based on the preset data storage address. The data storage address may be a storage space address of itself or a third-party data storage space address, which is not limited in the embodiment of the present invention. The data storage addresses of the physical layer element, the logical layer element and the application layer element can be the same data storage address, that is, the physical layer element, the logical layer element and the application layer element are stored in the same storage space range; at this time, the physical layer element, the logical layer element and the application layer element are simultaneously acquired from one data storage address. Or a plurality of data storage addresses, namely the physical layer element, the logic layer element and the application layer element are stored in different storage spaces; at this time, the physical layer element, the logical layer element, and the application layer element are acquired from the plurality of data storage addresses, respectively.
The physical layer element may specifically include a physical entity object and a physical entity relationship. The physical entity object is a physical device in the physical layer. Physical entity relationships are a collection of physical connection relationships between physical entities.
The logical layer elements may specifically include logical entity objects, logical entity relationships, and logical entity constraints. The logical entity object is an entity object of the logical layer. The logical entity relationship is a set of logical connection relationships of the logical entity objects. The logical entity constraint is a set of access restriction relationships in the forwarding process for the logical entity object.
Specific to the application layer elements may include application entity objects, application entity relationships, and application entity constraints. The application entity object is an entity object in the application layer. The application entity relationship is a connection relationship set of the application entity object in the application layer. The application entity constraint is a set of access restriction relationships of the application entity object during the transmission.
102, determining the physical entity object, the logic entity object and the application entity object as directed graph vertexes, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix;
in the embodiment of the invention, each entity object in the physical entity object, the logical entity object and the application entity object in the physical layer-logical layer-application layer is taken as a directed graph vertex (directed graph endpoint) in a directed graph based on a graph theory mode. And taking each of the physical entity relationship, the logical entity constraint, the application entity relationship and the application entity constraint in the physical layer-logical layer-application layer as a directed graph edge in the directed graph. The directed graph vertex and the directed graph edge are connected to form a complete directed graph, the adjacent matrix is an array of the connection relation among the directed graph vertexes, and the connection of the directed graph vertex and the directed graph edge to form the directed graph is equivalent to the construction of the adjacent matrix.
And 103, constructing a network topology according to the adjacency matrix.
After the adjacency matrix is constructed, the connection relation corresponding to the physical entity object, the logic entity object and the application entity object can be determined through the adjacency matrix, and the physical layer element, the logic layer element and the application layer element in the end-to-end three-layer topology model are organically connected through the element relation of the array in the adjacency matrix to construct the network topology.
The embodiment of the invention obtains physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint; determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix; and constructing a network topology according to the adjacency matrix. By integrating the three layers of the end-to-end network three-layer topological model structure, the application layer, the logic layer and the physical layer in a graph theory mode, the effective association among a plurality of protocol layers is realized, and the multilevel end-to-end topological system integration is constructed; in the actual network operation, any network element of one layer can be appointed through the mapping relation of three-layer topology; and the related end-to-end path elements of each layer are positioned, so that the network operation is facilitated.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a network topology construction method according to the present invention is shown, where the network topology construction method is applied to an end-to-end three-layer topology model, and the end-to-end three-layer topology model includes a physical layer, a logical layer, and an application layer. The network topology construction method may specifically include the following steps:
step 201, acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
in the embodiment of the present invention, referring to table 2, the physical elements include physical entity objects and physical entity relationships. Wherein, the physical entity object is a terminal entity device, which can comprise a terminal (E) 1 ) And network equipment (E) 2 ). In practical applications, the terminal (E) 1 ) Can be client equipment, server equipment and the like; network equipment (E) 2 ) Which may be a hub, switch, router, etc. The physical entity relationship is the connection relationship of the terminal entity device, and may include the interconnection relationship (R) between the terminal and the network device 1 ) Interconnection relationship (R) with network devices 2 )。
The logical layer elements include logical entity objects, logical entity relationships, and logical entity constraints. Wherein, the logical entity object is a business logical entity, and can comprise a business entity (E' 1 ) And forwarding entity (E' 2 ). In actual application, business entity (E' 1 ) The IP address set A and the mac address set B of the terminal are set; forwarding entity (E' 2 ) The port is a logical port, such as an IP subinterface, a Virtual Local Area Network (VLAN) Virtual interface, an aggregation port, and the like. The logical entity relationship is a connection logical relationship of the business logical entity, and may include a dependency (R ') of the business entity and the forwarding entity' 1 ) Forwarding inter-entity forwarding relationship (R ') based on specific business entity' 2 ) And forwarding path reachability (R ') between business entities' 3 ). In practical application, the dependency (R ') of business entity and forwarding entity' 1 ) May be described by VLAN tunnels, etc.; forwarding inter-entity forwarding relationship (R ') based on specific business entity' 2 ) IP routing, two or three layer VPN (Virtual Private network) can be usedk, virtual private Network) tunnel, NAT (Network Address Translation), and the like. The logical entity constraint is a limiting condition of the service logical entity in the access policy, and may include an access control policy (C') for the service entity based on the network layer and the link layer. In practical application, the access control strategy (C') based on network layer and link layer to service entity is access control based on ip address (segment) (ip ∈ A) and access control based on mac address (segment) (mac ∈ B).
The application layer elements include application entity objects, application entity relationships, and application entity constraints. Specifically, the application entity object is an application-side entity device, and can comprise a client (E) " 1 ) And a service end (E) " 2 ). In practical applications, the client (E) " 1 ) It can be PC (Personal Computer) terminal, mobile phone terminal, sensor, cash register, etc.; service end (E) " 2 ) The system can be a server, a website, a mobile phone APP (Application), an Internet of things platform and the like. The application entity relationship is a connection logic relationship between application entity objects, and may include path reachability (R ") of an application of the client and the server. In actual applications, the path reachability (R ") of an application between a client and a server can be described by a set of logical paths from the client to the server. The application entity constraint is a limiting condition of the application entity object in the access policy, and may include an access control policy (C ") based on the transport layer and above. In practical applications, the access Control policy (C ") based on the transport layer and above is access Control based on a TCP (Transmission Control Protocol)/UDP (User Data Protocol) port number, access Control based on a domain name, and the like.
Figure BDA0003832380460000091
TABLE 2
The physical layer element, the logic layer element and the application layer element can be determined through channels of network digital asset acquisition, physical topology, logic topology and application topology.
For the acquisition of the Network digital assets, the relevant parameters of the Network equipment can be acquired based on an SNMP (Simple Network Management Protocol), and the Network digital assets are obtained through data integration, analysis and calculation: a network device table, a terminal table, a routing table, an IP Address table, an ARP (Address Resolution Protocol) table, an MAC Address table, a VLAN table, an access control list, and the like are used as logical layer elements and application layer elements.
The physical topology is determined by calculation based on two-layer and three-layer physical topologies. Wherein, the two or three layers of terminals and network devices can be the physical entity object E in the physical layer element 1 、E 2 . Circularly traversing the MAC address table of the gateway downlink equipment through two-layer physical topology calculation, and calculating the interconnection relationship between the terminal and two-layer equipment and the interconnection relationship between the two-layer equipment; and three-layer physical topology calculation, namely circularly traversing the ARP address table and the IP address table according to the next hop information of the routing table, and calculating the interconnection relationship between the terminal and the gateway and the interconnection relationship between three layers of equipment; and integrating the two-layer physical topology and the three-layer physical topology by taking the gateway as a correlation point to obtain a complete physical topology of the physical layer. Determining the interconnection relationship between the terminal and the two-layer equipment and the interconnection relationship between the terminal and the gateway as a physical entity relationship R 1 The interconnection relationship among the two-layer equipment, the interconnection relationship among the three-layer equipment and the interconnection relationship among the two/three-layer equipment are physical entity relationships R 2
The logic topology is determined based on two-layer and three-layer logic topology calculation. Wherein, the ip address (segment)/MAC address (segment) of the terminal is determined as a logical entity object E' 1 And the two-layer and three-layer logical ports are logical entity objects E' 2 . Through the calculation of the two-layer logic topology, the VLAN table is circularly traversed, and a VLAN channel from the terminal to the two-layer logic port and a VLAN channel between the two-layer ports are generated. And through three-layer logic topology calculation, associating the logic port with a physical port of a logic entity object thereof, and circularly traversing the IP of the logic port through the strategy routing table and the IP routing table to calculate a routing channel from the terminal to the three-layer logic port and a routing channel between the three-layer logic port.Determining that VLAN channel from terminal to two-layer logical port and routing channel from terminal to three-layer logical port are logical entity relation R' 1 Determining VLAN channels between two-layer logical ports and VLAN channels between three-layer logical ports as logical entity relation R' 2 Logical entity relationship R' 1 And logical entity relationship R' 2 Binding is logical entity relationship R' 3 (ii) a The access control of the network layer and the link layer of the OSI model is a logical entity constraint C'.
And for the application topology, determining based on ports and protocols of the client and the server, and obtaining the complete application topology from the client to the server by integrating the domain name and the protocol port information of the server and overlapping the access control strategies of a transmission layer and the layers above on the basis of a logic path. Determining the client as an application entity object E ″) 1 Determining the server as an application entity object E ″ 2 (ii) a The logical path is the application entity relationship R'; the access control policy of the transport layer and above is the application entity constraint C ".
After determining the physical layer elements, the logical layer elements, and the application layer elements, the physical layer elements, the logical layer elements, and the application layer elements may be stored in a designated address, and the physical layer elements, the logical layer elements, and the application layer elements may be acquired from the designated address.
Step 202, determining the physical entity object, the logical entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logical entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix;
it should be noted that, the directed graph G = (v, e), where v is a set of vertices of the directed graph, e is a set of edges of the directed graph (i.e., a set of ordered pairs of elements in v), and an adjacency matrix of the corresponding directed graph is:
C=[c ij ] m×n
Figure BDA0003832380460000111
wherein i and j are non-zero positive integers.
In the embodiment of the present invention, the physical entity object, the logical entity object, and the application entity object may be directed graph vertices, i.e., elements in v. And after merging the physical entity relationship, the logical entity constraint, the application entity relationship and the application entity constraint, determining the merged physical entity relationship, the logical entity constraint, the application entity relationship and the application entity constraint as directed graph edges, namely elements in the e. And then forming a complete directed graph based on the directed graph vertex and the directed graph edge, and constructing a critical matrix corresponding to the directed graph.
Specifically, the step of determining that the physical entity object, the logical entity object, and the application entity object are directed graph vertices, and determining that the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint are directed graph edges may include the following sub-steps:
substep S2021, constructing a physical path set matrix according to the physical entity object and the physical entity relation;
in the embodiment of the invention, the directed graph can be constructed for the physical layer, the physical entity object is used as a vertex, and the physical entity relationship is the directed graph edge to determine the directed graph. The physical entity relationship comprises a terminal and network equipment interconnection relationship and an interconnection relationship between network equipment, and in a physical layer, the terminal and the network equipment are connected through a physical relay, and a complete directed graph can be obtained only by adding the two relationships, namely, a complete physical path set matrix is constructed only by adding the two relationships. Wherein, can be (v) i ,v J ) E, namely, the interconnection physical relay exists between the network equipment or between the terminal and the network equipment, the matrix item r ij =1, otherwise 0. And the matrix is a numerical expression of connection, namely the physical path set matrix is PhyPath = R 1 +R 2
Substep S2022, constructing a logic path set matrix according to the logic entity object, the logic entity relationship, the logic entity constraint and the physical path set matrix;
for the logic layer, the operation is carried out depending on the physical layer, and after a physical path set matrix is obtained; can be integrated into the construction of the logical layer. The logical entity object can be used as a vertex, the logical entity relationship and the logical entity constraint are used as edges to construct a directed graph, and a complete directed graph of a logical layer is constructed by combining the directed graph (namely, a physical path set matrix) of the physical layer to obtain a corresponding logical path set matrix.
Further, the step of constructing a logical path set matrix according to the logical entity object, the logical entity relationship, the logical entity constraint, and the physical path set matrix may include the sub-steps of:
substep S20221, determining a forwarding path matrix according to the relation between the logical entity object and the logical entity;
in practical application, the directed graph can be constructed by taking the logic entity object as the vertex of the directed graph and taking the logic entity relationship as the directed graph edge to obtain a corresponding matrix, namely a forwarding path matrix. Specifically, in the logical layer, the service entity is an ip address set or a MAC address set of the terminal or the server. The forwarding entity is a logical interface of the network device. The service entities depend on the forwarding entities directly connected with the service entities, the forwarding entities can forward data according to the target addresses of specific service entities, a plurality of service entities exist in the network, and the specific service entities refer to two end service entities from an a end to a b end. Can be (v) i ,v J ) E, namely a logical interconnection relationship exists between forwarding entities or between forwarding entities and business entities, r' ij =1 and conversely 0, obtaining a matrix R 'of the dependency of the service entity and the forwarding entity' 1 And a matrix R 'based on forwarding relation among forwarding entities of specific business entities' 2 . And the path reachability is jointly determined based on the dependency and forwarding relation of the business entity and the forwarding entity, namely a path reachability matrix R' 3 Is R' 1 And R' 2 And the forwarding path matrix satisfies the reachability, that is, the forwarding path matrix is a path reachability matrix R' 3 =R’ 1 +R’ 2
Substep S20222, calculating an intersection of the forwarding path matrix and the physical path set matrix to obtain a logical topology matrix;
since the forwarding path needs to be actually sent out only when the forwarding path has a physical path, the forwarding path has a situation of lacking a corresponding physical path, and a complete logical topology needs substantial forwarding path construction. Thus, an intersection of the forwarding path matrix and the physical path set matrix may be computed, and the intersection may be determined to be a logical topology matrix, i.e., logical topology matrix LogiTopo = PhyPath & 'R' 3
Substep S20223, constructing a logical entity relationship according to the logical entity object and the logical entity constraint, and determining a logical constraint matrix;
in the embodiment of the present invention, the logical entity object may be used as a vertex of a directed graph, the logical entity constraint may be used as a directed graph edge, and the obtained directed graph of the logical entity constraint may be controlled based on an IP or MAC address. According to the access control list, if the access is refused, the device sends a matrix entry c 'to the destination IP direction' ij And =1, otherwise 0. And determining a logic constraint matrix C' corresponding to the directed graph. It should be noted that, in the service entity, all the constraint conditions are not necessarily satisfied, so that the service entity may be decomposed to obtain a plurality of separated logic constraint sub-matrices, and a complete logic constraint matrix is obtained by integrating the plurality of logic constraint sub-matrices.
And a substep S20224, adding the logical topology matrix and the logical constraint matrix to obtain a logical path set matrix.
In the topology of the logic layer, there are entity connection and entity constraint at the same time, and for this reason, the logic topology matrix and the logic constraint matrix need to be added to obtain a complete logic path set matrix, that is, the logic path set matrix LogiPath = LogiTopo + C'.
Substep S2023, constructing an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint and the logic path set matrix;
in the embodiment of the invention, the application entity object can be used as the vertex of the directed graph, and the application entity relation and the application entity constraint are respectively bound to the directed graph edges to form the directed graph, so as to obtain the corresponding adjacency matrix; and combining the logic path set matrix on the basis of the adjacent matrix to obtain an application path set matrix.
Further, the step of constructing an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint and the logic path set matrix may comprise the sub-steps of:
substep S20231, determining an application relationship matrix according to the application entity object and the application entity relationship;
in the embodiment of the invention, firstly, the application entity object is used as the vertex of the directed graph, the application entity relation is used as the directed graph edge to form the directed graph, and the application relation matrix R' corresponding to the directed graph is determined.
Substep S20232, assigning the application relationship matrix by using the logic path set matrix;
since the application entity relationships between the application entity objects are based on logical paths, i.e. the set of logical paths corresponds to the application entity relationships. The logical path set matrix may be assigned to an application relationship matrix, i.e., the application relationship matrix R = LogiPath.
Substep S20233, determining an application constraint matrix according to the application entity object and the application entity constraint;
in the embodiment of the present invention, the application entity object may also be used as a vertex of a directed graph, and the application entity constraint may be used as a side of the directed graph to form the directed graph, where access control is performed on a protocol port or a domain name at or above a transport layer, and according to an access control list, if access is denied, a matrix entry c ″ in a direction from the device to a destination port or a domain name ij And =1, otherwise 0, determining the matrix of the directed graph, i.e. determining the application constraint matrix.
And a substep S20234 of adding the assigned application relationship matrix and the application constraint matrix to obtain an application path set matrix.
Because the application layer has the constraint condition of forwarding and the application entity relationship at the same time, the complete topology of the application layer is composed of the two parts, and the application relationship matrix after assignment and the application constraint matrix can be added to obtain an application path set matrix, namely the application path set matrix ApppPath = R "+ C".
Sub-step S2024, determining the application path set matrix as the adjacency matrix.
The application path set matrix is obtained by associating and merging various elements in the three protocol layers, so that the application path set matrix can be determined to be a connection relation array structure of the network topology structure, namely the application path set matrix is used as an adjacent matrix of the network topology structure.
Step 203, constructing a network topology according to the adjacency matrix;
after the adjacency matrix is determined, the adjacency matrix represents the connection relation of each node in the network topology structure, and the network topology can be constructed according to the connection relation in the adjacency matrix. I.e. the adjacency matrix is the union of reachable paths.
Step 204, decomposing the adjacency matrix to obtain a one-way path;
after a network topology is constructed, when data transmission needs to be performed by using the network, the adjacency matrix can be decomposed, that is, a union set of all reachable paths is decomposed into a plurality of independent unidirectional paths.
Specifically, based on the topological sorting principle, in the adjacency matrix, the starting vertex of the designated path is the starting point of the traffic direction; deleting the vertexes with the degree of income of 0 from the vertexes which are not the starting points; repeating the two steps until no vertex with the degree of income of 0 exists, and obtaining a one-way path. And repeating the step of determining the unidirectional paths, and decomposing all unidirectional paths from the adjacent matrix.
Step 205, determining a target path according to the unidirectional path;
after the plurality of unidirectional paths are obtained, because of the limitation of the path priority or the path accessibility corresponding to each unidirectional path, the target path can be determined from the plurality of unidirectional paths according to the path priority or the path accessibility of the unidirectional path.
Specifically, the step of determining the target path according to the unidirectional path may include the following sub-steps:
a substep S2051 of performing reachability determination on the unidirectional path with respect to any one of the unidirectional paths;
the reachability judgment is performed on one of the unidirectional paths, specifically, whether the vertex of the unidirectional path is the same as a preset vertex and whether the two ends can be communicated with each other through any end point can be determined.
A substep S2052 of determining the unidirectional path as a reachable path when the unidirectional path has reachability;
when the two ends of the one-way path are communicated with each other through any end point to realize the communication of the preset vertex, the one-way path is accessible, the one-way path meets the accessibility, and the one-way path is determined to be the accessible path.
And a substep S2053 of determining a target path according to the reachable path.
The obtained reachable paths show that the reachable paths are all corresponding to complete transmission links for transmission; and then, the priority of the reachable path can be judged, and the target path is determined.
Furthermore, the reachable path comprises a plurality of reachable sub-paths, and the reachable sub-paths correspond to the priority weight values; the step of determining a target path according to the reachable path comprises:
the substep S20531 is used for comparing the same hop reachable sub-path of different reachable paths and judging whether the priority weight values corresponding to the reachable sub-paths are the same or not;
in practical applications, a single reachable path has multiple reachable sub-paths, and each reachable sub-path has a different priority weight value due to the influence of performance overhead, routing policy, and the like. In practical application, the weights can be given according to the priority in advance aiming at each hop reachable sub-path in the unidirectional path, and the higher the weight is, the higher the priority is.
According to the flow direction, aiming at the same hop count, aiming at the same hop reachable sub-path of different reachable paths, comparing, and judging whether the priority weight values corresponding to the reachable sub-paths are the same or not.
Substep S20532, when the priority weight values corresponding to the reachable sub-paths are the same, incrementing the hop count, and based on the incremented hop count, performing the step of comparing the reachable sub-paths of the same hop for different reachable paths, and determining whether the priority weight values corresponding to the reachable sub-paths are the same;
when the hop count is less than the predetermined value, the reachable sub-paths of each reachable path have the same priority, i.e., have the same priority, and the reachable path with the higher priority cannot be determined as the target path. The hop count can be increased by one, and then the priority weight values corresponding to the reachable sub-paths of the next hop count are compared, and the round-robin comparison is carried out until the priority weight values are different.
And a substep S20533, when the priority weight values corresponding to the reachable sub-paths are different, sorting the reachable sub-paths based on the descending order of the priority weight values corresponding to the reachable sub-paths, and determining the reachable path where the first reachable sub-path is sorted as the target path.
When the priority weight values corresponding to reachable sub-paths of the same hop in all reachable paths are different under the same hop count, that is, the priorities of the reachable sub-paths under the hop count are different. The reachable sub-paths may be sorted in descending order according to the priority weight value, and the reachable path where the first reachable sub-path after sorting is located is determined as the target path. When the priority weight values corresponding to two or more reachable sub-paths are the first order in the descending order, the priority weight values corresponding to the reachable sub-paths of the next hop number of the reachable sub-paths can be compared independently until the priority weight value of the first reachable sub-path only corresponds to one reachable sub-path, and the reachable path where the reachable sub-path is located is determined to be the target path. The priority of a certain hop in a certain reachable path is screened out to be higher than the priority of the corresponding hop number in other reachable paths through round training comparison, and the reachable path is preferentially selected as the target path.
And step 206, carrying out data transmission based on the target path.
And after the target path is obtained, the target path is adopted to carry out data transmission, so that the network transmission function is realized.
The embodiment of the invention obtains the physical layer element, the logic layer element and the application layer element; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint; determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix; constructing a network topology according to the adjacency matrix; decomposing the adjacency matrix to obtain a one-way path; determining a target path according to the unidirectional path; and carrying out data transmission based on the target path. Network elements are abstracted, the integration of the whole topology is carried out according to a graph theory method irrelevant to a protocol, a specific network architecture and a network protocol mode are loosely coupled, the differentiation calculation can be realized by combining the current network characteristics such as route aggregation, route priority and the like, the global strategy rule is integrated on the basis, and the overall analysis of the whole network configuration strategy is realized; the application, logic and physical layers are integrated, effective association among a plurality of protocol layers is realized, multi-layer and end-to-end topology system integration is established, and in actual network operation, only any network element of one layer needs to be specified, and the mapping relation of three-layer topology can be realized; and the related end-to-end path elements of each layer are positioned, so that the functions of network overall planning, service risk evaluation, rapid fault positioning analysis and the like according to application differentiation are realized from the application requirements in the later IP network operation process.
In order to enable a person skilled in the art to better understand the embodiments of the present invention, the following description is given by way of an example:
referring to fig. 3, a schematic diagram of an example of a network topology construction method of the present invention is shown;
1. definition and basic element classification definition for three network layers
This section may refer to the above embodiments where the end-to-end three-layer topology model includes three layers, a protocol layer, a physical layer, a logical layer, and an application layer. The physical layer element comprises terminal entity equipment and physical entity relation, and the terminal entity equipment is a terminal (E) 1 ) And network equipment (E) 2 ) (ii) a The physical entity relationship is the interconnection relationship (R) between the terminal and the network equipment 1 ) Interconnection relationship (R) with network devices 2 ). The logic layer elements comprise logic entity objects, logic entity relations and logic entity constraints, wherein the logic entity objects are business entities (E' 1 ) And forwarding entity (E' 2 ) (ii) a The logical entity relationship is the dependency (R ') of the business entity and the forwarding entity' 1 ) Forwarding relationship (R ') between forwarding entities based on specific business entity' 2 ) And forwarding path reachability (R ') between business entities' 3 ) (ii) a The logical entity constraints are based on access control policies (C') in the network layer and the link layer to the business entities. The application layer elements include application entity objects, application entity relationships, and application entity constraints.
2. Integration and association of elements of three network layers
Taking fig. 4 as an example for explanation, where a is a client, b is a server, A, B, C, D, E is a switch/router device, and a connection represents that there is a physical relay between the two ends. The flow direction is exemplified by a to b. According to the topological relation, 7 points are shared in the directed graph, and a 7x7 adjacency matrix can be constructed.
Suppose that the ip segment of service entity a is a and the ip segment of service entity b is b. Business entities or forwarding entities with physical interconnection relation are considered to be associated with each other. Device D is provided with an access control list: the control list is specifically rejected to be included in a 1 (a 1 E.g. a) segment, access to the source ip contained in b 1 (b 1 E b) the destination ip of the segment.
And an access control condition based on a protocol port number or a domain name exists in the application layer, and data meeting the condition is rejected to be forwarded to the C through the E equipment.
First, physical layer elements are integrated.
From the graph of FIG. 4, R can be obtained 1 And R 2 The matrix of (a):
Figure BDA0003832380460000181
the physical path set matrix is R 1 And R 2 The sum of the matrices of (a), i.e.:
Figure BDA0003832380460000182
that is, a directed graph as shown in fig. 5, which illustrates the physical layer topology between vertices, can be obtained based on the physical path set matrix.
And after finishing the physical layer topology, carrying out topology construction on the logical layer based on the physical layer topology.
Relation adjacency matrix R 'between logic layer business entity and forwarding entity' 1 And forwarding relation adjacency matrix R 'between forwarding entities based on specific business entities' 2 Comprises the following steps:
Figure BDA0003832380460000191
the forwarding path matrix is R' 1 And R' 2 And (3) the sum of the following components:
Figure BDA0003832380460000192
the actually existing logical topology adjacency matrix is the intersection of the forwarding path matrix and the physical path set matrix, that is:
Figure BDA0003832380460000193
based on the application layer constraint conditions, the obtained logic constraint matrix is:
Figure BDA0003832380460000194
Figure BDA0003832380460000195
adding the logic topology matrix and the logic constraint matrix to obtain a logic path set matrix:
Figure BDA0003832380460000201
based on the logical path aggregation matrix, the topology of the logical layer, fig. 6, can be derived. The left side is a directed graph corresponding to the fact that the service entity does not meet the access constraint of the logic layer, and the right side is a directed graph corresponding to the fact that the service entity meets the access constraint of the logic layer.
And finally, calculating the application layer topology based on the logic layer topology to obtain the topology corresponding adjacency matrix of the whole network.
The application relationship matrix is the same as the logic path set matrix, that is, the application relationship matrix is:
R″=LogiPath
according to the application layer constraint condition, the constraint adjacency matrix is as follows:
Figure BDA0003832380460000202
Figure BDA0003832380460000203
adding the application relation matrix and the application constraint matrix to obtain an application path set matrix as follows:
Figure BDA0003832380460000211
3. application layer path set (application path set matrix) decomposition
Taking the application path set which does not satisfy the logic layer constraint and satisfies the application layer constraint as an example, the path decomposition is performed, and then the weight value of each sub-path is preset, so that the directed graph of fig. 7 can be obtained.
The application paths are sorted and decomposed to obtain 3 application paths, namely
Route 1: a → A → B → C → B;
route 2: a → A → D → C → b;
route 3: a → A → E;
the determination of the path reachability is performed, and it is found that the path 1 and the path 2 are reachable paths and the path 3 is unreachable path.
Then, calculating the priority of the path 1 and the priority of the path 2, wherein the first edge weights of the path 1 and the path 2 are both 1; comparing the second side weights passed by the path 1 and the path 2, the second side weight of the path 1 is 2, and the second side weight of the path 2 is 3, so that the path 2 is preferentially selected. And determining the path 2 as a target path for data transmission.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
Referring to fig. 8, a block diagram of a network topology constructing apparatus according to an embodiment of the present invention is shown, the network topology constructing apparatus is applied to an end-to-end three-layer topology model, and the end-to-end three-layer topology model includes a physical layer, a logical layer and an application layer; the network topology constructing apparatus may specifically include the following modules:
an obtaining module 801, configured to obtain a physical layer element, a logical layer element, and an application layer element; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
a constructing module 802, configured to determine that the physical entity object, the logical entity object, and the application entity object are directed graph vertices, determine that the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint are directed graph edges, and construct an adjacency matrix;
a constructing module 803, configured to construct a network topology according to the adjacency matrix.
In an alternative embodiment of the present invention, the construction module 802 comprises:
the first matrix construction submodule is used for constructing a physical path set matrix according to the physical entity object and the physical entity relation;
a second matrix construction sub-module, configured to construct a logical path set matrix according to the logical entity object, the logical entity relationship, the logical entity constraint, and the physical path set matrix;
a third matrix construction sub-module, configured to construct an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint, and the logic path set matrix;
and the determining submodule is used for determining the application path set matrix as the adjacency matrix.
In an optional embodiment of the invention, the second matrix building sub-module includes:
a first matrix determining unit, configured to determine a forwarding path matrix according to the relationship between the logical entity object and the logical entity;
the first calculation unit is used for calculating the intersection of the forwarding path matrix and the physical path set matrix to obtain a logical topology matrix;
the second matrix determining unit is used for constructing a logic entity relationship according to the logic entity object and the logic entity constraint and determining a logic constraint matrix;
and the first matrix addition module is used for adding the logic topology matrix and the logic constraint matrix to obtain a logic path set matrix.
In an optional embodiment of the invention, the third matrix building sub-module includes:
a third matrix determining unit, configured to determine an application relationship matrix according to the application entity object and the application entity relationship;
the assignment unit is used for assigning the application relation matrix by adopting the logic path set matrix;
a fourth matrix determining unit, configured to determine an application constraint matrix according to the application entity object and the application entity constraint;
and the second matrix addition module is used for adding the assigned application relationship matrix and the application constraint matrix to obtain an application path set matrix.
In an optional embodiment of the present invention, the network topology constructing apparatus further includes:
the decomposition module is used for decomposing the adjacent matrix to obtain a one-way path;
the target path determining module is used for determining a target path according to the unidirectional path;
and the transmission module is used for transmitting data based on the target path.
In an optional embodiment of the present invention, the target path determining module includes:
the judgment submodule is used for carrying out accessibility judgment on the one-way path aiming at any one-way path;
a reachable path determining submodule for determining the one-way path as a reachable path when the one-way path has reachability;
and the target path determining submodule is used for determining a target path according to the reachable path.
In an optional embodiment of the present invention, the reachable path includes a plurality of reachable sub-paths, and the reachable sub-paths correspond to the priority weight values; the target path determination sub-module includes:
the judging unit is used for comparing the same hop reachable sub-paths of different reachable paths and judging whether the priority weight values corresponding to the reachable sub-paths are the same or not;
an updating unit, configured to increment the hop count when the priority weight values corresponding to the reachable sub-paths are the same, and execute the step of comparing the reachable sub-paths of the same hop with respect to different reachable paths based on the incremented hop count, and determining whether the priority weight values corresponding to the reachable sub-paths are the same;
and the target path determining unit is used for sorting the reachable sub-paths based on the descending order of the priority weight values corresponding to the reachable sub-paths when the priority weight values corresponding to the reachable sub-paths are different, and determining the reachable path where the first reachable sub-path is sorted as the target path.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
a processor and a storage medium storing a computer program executable by the processor, the computer program being executable by the processor to perform a method according to any one of the embodiments of the invention when the electronic device is run. The specific implementation manner and technical effects are similar to those of the method embodiment, and are not described herein again.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method according to any one of the embodiments of the present invention. The specific implementation manner and technical effects are similar to those of the method embodiment, and are not described herein again.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal apparatus that comprises the element.
The network topology construction method, device, electronic device and storage medium provided by the present invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A network topology construction method is characterized in that the method is applied to an end-to-end three-layer topology model, and the end-to-end three-layer topology model comprises a physical layer, a logic layer and an application layer; the network topology construction method comprises the following steps:
acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
determining the physical entity object, the logic entity object and the application entity object as directed graph vertices, determining the physical entity relationship, the logic entity constraint, the application entity relationship and the application entity constraint as directed graph edges, and constructing an adjacency matrix;
and constructing a network topology according to the adjacency matrix.
2. The method of claim 1, wherein determining the physical entity object, the logical entity object, and the application entity object as directed graph vertices, determining the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint as directed graph edges, and constructing an adjacency matrix comprises:
constructing a physical path set matrix according to the physical entity object and the physical entity relationship;
constructing a logic path set matrix according to the logic entity object, the logic entity relationship, the logic entity constraint and the physical path set matrix;
constructing an application path set matrix according to the application entity object, the application entity relationship, the application entity constraint and the logic path set matrix;
determining the application path set matrix as the adjacency matrix.
3. The method of claim 2, wherein the step of constructing a logical path set matrix from the logical entity objects, the logical entity relationships, the logical entity constraints, and the physical path set matrix comprises:
determining a forwarding path matrix according to the relation between the logic entity object and the logic entity;
calculating the intersection of the forwarding path matrix and the physical path set matrix to obtain a logic topology matrix;
constructing a logic entity relationship according to the logic entity object and the logic entity constraint, and determining a logic constraint matrix;
and adding the logic topology matrix and the logic constraint matrix to obtain a logic path set matrix.
4. The method of claim 2, wherein the step of constructing an application path set matrix from the application entity objects, the application entity relationships, the application entity constraints, and the logical path set matrix comprises:
determining an application relation matrix according to the application entity object and the application entity relation;
assigning the application relation matrix by adopting the logic path set matrix;
determining an application constraint matrix according to the application entity object and the application entity constraint;
and adding the assigned application relation matrix and the application constraint matrix to obtain an application path set matrix.
5. The method of claim 1, wherein the network topology construction method further comprises:
decomposing the adjacency matrix to obtain a one-way path;
determining a target path according to the unidirectional path;
and carrying out data transmission based on the target path.
6. The method of claim 5, wherein the step of determining a target path based on the unidirectional path comprises:
carrying out accessibility judgment on the one-way path aiming at any one-way path;
when the one-way path has reachability, determining that the one-way path is a reachable path;
and determining a target path according to the reachable path.
7. The method of claim 6, wherein the reachable path comprises a plurality of reachable sub-paths, and wherein the reachable sub-paths have corresponding priority weights; the step of determining a target path according to the reachable path comprises:
comparing the reachable sub-paths of the same hop of different reachable paths, and judging whether the priority weight values corresponding to the reachable sub-paths are the same or not;
when the priority weight values corresponding to the reachable sub-paths are the same, the hop count is increased, and based on the hop count after increasing, the same-hop reachable sub-paths aiming at different reachable paths are compared, and whether the priority weight values corresponding to the reachable sub-paths are the same is judged;
when the priority weight values corresponding to the reachable sub-paths are different, sorting the reachable sub-paths based on the descending order of the priority weight values corresponding to the reachable sub-paths, and determining the reachable path where the first reachable sub-path is sorted as a target path.
8. The network topology construction device is applied to an end-to-end three-layer topology model, wherein the end-to-end three-layer topology model comprises a physical layer, a logic layer and an application layer; the network topology constructing apparatus includes:
the acquisition module is used for acquiring physical layer elements, logic layer elements and application layer elements; the physical layer element comprises a physical entity object and a physical entity relation, the logical layer element comprises a logical entity object, a logical entity relation and a logical entity constraint, and the application layer element comprises an application entity object, an application entity relation and an application entity constraint;
a construction module, configured to determine that the physical entity object, the logical entity object, and the application entity object are directed graph vertices, determine that the physical entity relationship, the logical entity constraint, the application entity relationship, and the application entity constraint are directed graph edges, and construct an adjacency matrix;
and the constructing module is used for constructing a network topology according to the adjacency matrix.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the network topology construction method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the network topology construction method according to any of the claims 1 to 7.
CN202211077856.XA 2022-09-05 2022-09-05 Network topology construction method and device, electronic equipment and storage medium Pending CN115550189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211077856.XA CN115550189A (en) 2022-09-05 2022-09-05 Network topology construction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211077856.XA CN115550189A (en) 2022-09-05 2022-09-05 Network topology construction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115550189A true CN115550189A (en) 2022-12-30

Family

ID=84724801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211077856.XA Pending CN115550189A (en) 2022-09-05 2022-09-05 Network topology construction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115550189A (en)

Similar Documents

Publication Publication Date Title
Manzoor et al. Performance analysis and route optimization: redistribution between EIGRP, OSPF & BGP routing protocols
Mechtri et al. A scalable algorithm for the placement of service function chains
US20190036810A1 (en) Method and apparatus for data network traffic control optimization
US20200099625A1 (en) Path determination method and system for delay-optimized service function chaining
CN104247348B (en) For the method and apparatus for the Packet Service that network is guided by exchange component
US20180302343A1 (en) System and method for convergence of software defined network (sdn) and network function virtualization (nfv)
Kotronis et al. Stitching inter-domain paths over IXPs
US9215164B2 (en) Multi-source correlation of network topology metrics
CN105991430A (en) Data router crossing multiple self-organizing network systems
CN105191215A (en) Data plane learning of bi-directional service chains
CN103650456A (en) Placement of service delivery locations of a distributed computing service based on logical topology
CN114070854B (en) Method, system, equipment and medium for sensing and routing calculation force in calculation force network
CN115443640A (en) Tenant-based mapping for virtual routing and forwarding
RU2454008C2 (en) Fitness based routing
US20040233850A1 (en) Device and a method for determining routing paths in a communication network in the presence of selection attributes
Mahantesh et al. Optimized path and reduced rule caching cost for software defined network (SDN) based Internet of Things (IOT)
Yang et al. Bandwidth–delay constrained routing algorithms
CN115550189A (en) Network topology construction method and device, electronic equipment and storage medium
Liu et al. A Lagrangian-relaxation-based approach for service function chain dynamic orchestration for the Internet of Things
Moza et al. Routing in networks using genetic algorithm
Hussain et al. Supporting multimedia applications through network redesign
Jalalitabar et al. Branching-aware service function placement and routing in network function virtualization
US10924382B1 (en) Rapid and verifiable network configuration repair
CN111478808A (en) Method, system, electronic device and storage medium for assisting configuration update verification
Mei et al. On routing optimization in networks with embedded computational services

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