CN112437013B - Path acquisition method in network diagram and maintenance method of routing networking - Google Patents

Path acquisition method in network diagram and maintenance method of routing networking Download PDF

Info

Publication number
CN112437013B
CN112437013B CN202011262560.6A CN202011262560A CN112437013B CN 112437013 B CN112437013 B CN 112437013B CN 202011262560 A CN202011262560 A CN 202011262560A CN 112437013 B CN112437013 B CN 112437013B
Authority
CN
China
Prior art keywords
path
node
target
array
changed
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
CN202011262560.6A
Other languages
Chinese (zh)
Other versions
CN112437013A (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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011262560.6A priority Critical patent/CN112437013B/en
Publication of CN112437013A publication Critical patent/CN112437013A/en
Application granted granted Critical
Publication of CN112437013B publication Critical patent/CN112437013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

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

Abstract

The present disclosure provides a path obtaining method and a route networking maintenance method in a network diagram, which includes: updating path information of a path array of the direct connection nodes based on a direct connection path between each direct connection node of the target nodes in the network graph and the target nodes to obtain at least one change node; updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node to obtain at least one new changed node; repeatedly executing the updating step based on each change node until no change node exists in the network graph, and obtaining a target network graph; and acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph. The scheme does not need repeated calculation, improves the calculation efficiency, and can ensure the communication efficiency between two central routes when being applied to the maintenance of the route networking.

Description

Path acquisition method in network diagram and maintenance method of routing networking
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a path acquisition method and a route networking maintenance method in a network graph.
Background
Routing networking refers to a network which takes a plurality of routers as nodes and takes physical connection between the routers as a connection path, and a communication path between two central routes is often desired to be as short as possible in the running process of the routing networking so as to ensure the communication efficiency between the two central routes. In the network graph, a plurality of relatively short paths (or called target paths) between any two nodes in the network graph can be obtained, so that a plurality of relatively short paths between two central routes in the routing networking can also be obtained, and a communication path is selected from the plurality of relatively short paths for the two nodes to communicate.
In the conventional method for acquiring multiple relatively short paths between two nodes in a network graph, when multiple relatively short paths between two nodes are calculated, each short path is acquired by taking one node of the two nodes as a starting point and the other node as an end point, and the relatively short path between the two nodes is calculated.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides a method for acquiring a path in a network diagram, including:
updating path information of a path array of the direct connection nodes based on the direct connection path between each direct connection node of the target nodes in the network graph and the target nodes to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target nodes, and the change node is a node of which the path stored in the corresponding path array changes;
updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node to obtain at least one new changed node;
repeatedly executing the step of updating the path information of the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node until no change node exists in the network graph, and obtaining a target network graph;
and acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph.
In a second aspect, an embodiment of the present disclosure provides a method for maintaining a routing networking, including:
acquiring a network graph corresponding to routing networking;
acquiring at least one target communication path between any two central routing nodes in the network graph based on the path acquisition method in the network graph;
and when any communication path fails, taking another communication path in the at least one target communication path as a communication path between any two central routing nodes.
In a third aspect, an embodiment of the present disclosure provides a path obtaining apparatus in a network diagram, including:
the first path array updating module is used for updating path information of a path array of a target node in a network graph based on a direct connection path between each direct connection node of the target node and the target node to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target node, and the change node is a node of which the path stored in the corresponding path array changes;
the second path array updating module is used for updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node, updating the path array of the direct connection node and obtaining at least one new changed node;
the loop module is used for repeatedly executing the steps of updating the path information of the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node to obtain a target network graph;
and the target path acquisition module is used for acquiring at least one target path between a target node and any node based on the path array of any node in the target network graph.
In a fourth aspect, an embodiment of the present disclosure provides a maintenance apparatus for routing networking, including:
the network graph acquisition module is used for acquiring a network graph corresponding to the routing networking;
a target communication path acquisition module, configured to acquire at least one target communication path between any two central routing nodes in the network graph based on a path acquisition method in the network graph;
and the communication path switching module is used for taking any one of the at least one target communication path as a communication path between any two central routing nodes, and taking the other communication path in the at least one target communication path as a communication path between any two central routing nodes when any one communication path fails.
In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor;
the memory has a computer program stored therein;
a processor for executing a computer program for implementing the method provided in the embodiments of the first or second aspect.
In a sixth aspect, the disclosed embodiments provide a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the method provided in the first or second aspect.
The technical scheme provided by the disclosure has the following beneficial effects:
the method comprises the steps of setting a path array for each node in a network graph, updating the path array of the directly connected node by utilizing changed path information in the path array of the changed node, enabling the path information in the path array of each node in a target network graph obtained after updating to indicate a target path between the node and the target node, and further obtaining the target path between the node and the target node according to the path array of each node.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below.
Fig. 1 is a schematic flowchart of a path obtaining method in a network diagram according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a network diagram in one example of an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a maintenance method for routing networking according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a path obtaining apparatus in a network diagram according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a maintenance device for routing networking according to the disclosed embodiment
Fig. 6 is a structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of illustrating the present disclosure and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a path obtaining method in a network diagram according to an embodiment of the present disclosure, and as shown in fig. 1, the method may include:
step S101, updating path information of a path array of each direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target node, and the change node is a node where the path stored in the corresponding path array changes.
The target node may be understood as an initial node of target path calculation in the network graph, and the target node may be selected from the network graph according to the initial node. A direct connection node of a certain node in the network graph is a node directly connected with the node (there is no other node in a connection path between the node and the node), and a connection path between the certain node and the direct connection node is a direct connection path.
In the scheme of the present disclosure, a path array is set for each node in the network graph, the length of the path array may be set to M (M is a positive integer), that is, the value may include M bits, and path information between the node and the target node may be stored in each bit. Before using the method provided by the present disclosure, the path array of each node in the network graph may be considered empty, i.e., no path information is stored. The changed node can be understood as a node whose path information in the path array changes when the scheme of the present disclosure is adopted for updating.
Specifically, a plurality of direct connection nodes of the target node are obtained, and the path array of each direct connection node is updated respectively, that is, the path information of the path array of the corresponding direct connection node is updated by using the path information corresponding to the direct connection path between the target node and each direct connection node, and the path information corresponding to the direct connection path between the target node and each direct connection node may be stored in the path array of the corresponding direct connection node. Since the path array of each directly connected node is changed, each directly connected node becomes a changed node. It is understood that this step is the first updating step of the present disclosure, and may be considered as the first updating step in which the target node is the changed node, and the subsequent steps will be updated with the changed node obtained after updating.
For example, as shown in fig. 2, the network diagram includes a node A, B, C, D, where a is a target node, and then the direct connection nodes of a are B and C, then the path information a-B corresponding to the direct connection path is stored in the path array of B to obtain a changed node B, and the path information a-C corresponding to the direct connection path is stored in the path array of C to obtain a changed node C, and B and C are used as changed nodes to participate in the next update.
And step S102, updating the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node to obtain at least one new change node.
Specifically, the direct connection node of the changed node obtained in the previous step is obtained, then the connection path corresponding to the changed path information in the path array of the changed node and the path information corresponding to the combined path formed by combining the direct connection path between each direct connection node of the changed node and the changed node are obtained, and then the path information of the path array of the corresponding direct connection node is updated by using the path information corresponding to the combined path. After the updating step, if the path information of the direct connection node of the changed node changes, a new changed node is obtained.
For example, referring to fig. 2 again, the change node B has a direct connection node D, and since the path information a-B is added to the path array of the node B, and the path information corresponds to the direct connection path between the target node a and the node B, the direct connection path and the direct connection path between the node B and the node D are combined to obtain a combined path, and the path information of the path array of the node D is updated by using the path information a-B-D corresponding to the combined path, so that the node D becomes a new change node. The change node C has a direct connection node B, because the path information A-C is added in the path array of the node C, the path information corresponds to the direct connection path between the target node A and the node C, then the direct connection path and the direct connection path between the node C and the node B are combined to obtain a combined path, the path information of the path array of the node B is updated by using the path information A-C-B corresponding to the combined path, and the node B also becomes a new change node.
Step S103, repeatedly executing the step of updating the path information of the path array of each direct-connected node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node until there is no changed node in the network graph, so as to obtain the target network graph.
Specifically, the updating step is repeatedly executed, that is, the step of repeatedly executing a connection path corresponding to the changed path information in the path array of each changed node to the changed node and updating the path information of the path array of each directly connected node of the changed node is repeated until no change or node exists in the network graph, that is, the updating is completed, and the target network graph is obtained. The path information stored in the path array for each node in the resulting target network graph indicates a relatively short path (i.e., the target path) between the node and the target node. It can be understood that a shortest path exists in a relatively short path, so the scheme obtains the shortest path between the node and the target node after the target path is obtained.
Step S104, based on the path array of any node in the target network graph, at least one target path between the target node and any node is obtained.
Specifically, since the path information stored in the path array of each node in the target network graph indicates the target path between the node and the target node, at least one target path between the node and the target node may be determined according to the path information in the path array of any node. It is understood that the number of paths between each node and the target node in the network graph may not reach M, and therefore the number of bits in the path array of some nodes may be empty, i.e. the number of target paths between the nodes and the target node may be less than M.
According to the scheme provided by the disclosure, the path array is set for each node in the network graph, and the path array of the directly-connected node is updated by utilizing the changed path information in the path array of the changed node, so that the path information in the path array of each node in the target network graph obtained after the updating is finished indicates the target path between the node and the target node, the target path between the node and the target node can be obtained according to the path array of each node, repeated calculation is not needed in the process of obtaining the target path by the scheme, and the calculation efficiency is improved.
In an optional embodiment of the present disclosure, updating, based on a connection path corresponding to changed path information in a path array of each changed node, path information of a path array of each direct-connected node of the changed node, includes:
combining to obtain a corresponding combined path based on a connection path corresponding to the changed path information in the path array of each change node and a direct connection path between the change node and each direct connection node;
and updating the path information of the path array of the direct connection node based on the combined path.
Specifically, for each variable node, the path array of the direct connection node needs to be updated based on the changed path information in the path array of the variable node, a connection path corresponding to the changed path information in the path array of the variable node and a direct connection path between the variable node and the direct connection node are combined to obtain a combined path, and the combined path is a connection path between the direct connection node and a target node, so that the path information of the path array of the direct connection node can be updated by using the path information corresponding to the combined path.
In an optional embodiment of the present disclosure, updating path information of the path array of the direct connection node based on the combined path includes:
if the number of the path information in the path array of each directly connected node is less than a preset numerical value, storing the path information of the combined path corresponding to the directly connected node into the path array of the directly connected node;
and if the number of the path information in the path array of each directly-connected node is equal to a preset numerical value, replacing the path information corresponding to the longest path in the path array of the directly-connected node with the path information of the combined path corresponding to the directly-connected node.
As can be seen from the foregoing description, the number of the path arrays in the path arrays of the nodes may be less than M, because the path array of each node stores at most M pieces of path information, and the number of the path arrays in the path arrays of the nodes may not reach M pieces of connection paths between some nodes and the target node.
Specifically, when the path array of the direct connection node is updated based on the changed path information in the path array of the changed node, if the number of the path information in the path array of the direct connection node is less than M, the path information of the corresponding combined path is directly stored in the path array of the direct connection node, and if the number of the path information in the path array of the direct connection node is equal to M, the path information corresponding to the longest connection path in the direct connection node is obtained, and the path information is replaced by the path information of the combined path, so that it is ensured that the M pieces of path information in the direct connection node indicate the target path.
In an optional embodiment of the present disclosure, acquiring at least one target path between a target node and any node based on a path array of any node in a target network graph includes:
and taking the connection path corresponding to the path information stored in the path array of any node as a target path between the target node and any node.
Specifically, for a node in which M pieces of path information are stored in a path array, M connection paths indicated by the M pieces of path information in the path array are M entry label paths between the node and a target node. For nodes with less than M (for example, N is a positive integer) path information stored in the path array, the connection path indicated by the N path information in the path array is the N labeled path between the node and the target node.
In an optional embodiment of the disclosure, the method may further comprise:
before updating a path array of a direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node, initializing a corresponding path array with a length of a preset value for each node in the network graph.
Specifically, before updating the direct-connected node by using the target node as the change node, a path array with a length of M needs to be set for each node in the network graph, so as to store corresponding path information in a subsequent updating process. Wherein, M is a positive integer and can be set according to actual requirements.
Fig. 3 is a schematic flowchart of a maintenance method for routing networking according to an embodiment of the present disclosure, and as shown in fig. 3, the method may include:
step 301, obtaining a network map corresponding to the routing networking.
Specifically, each route is used as a node, and communication connection between the routes is used as a communication path to acquire a corresponding network graph.
Step 302, based on the path obtaining method in the network graph, obtaining at least one target communication path between any two central routing nodes in the network graph.
Specifically, to acquire at least one target communication path between any two central routing nodes, one of the routing nodes is used as a target node, the corresponding target network graph is acquired by using the path acquisition method in the network graph described in the above embodiment, and then at least one target communication path between two central routing nodes is acquired based on the routing path array of the other central routing node.
Step 303, taking any one of the at least one target communication path as a communication path between any two central routing nodes, and taking another communication path in the at least one target communication path as a communication path between any two central routing nodes when any communication path fails.
According to the scheme provided by the disclosure, the path array is set for each node in the network graph, and the path array of the directly-connected node is updated by utilizing the changed path information in the path array of the changed node, so that the path information in the path array of each node in the target network graph obtained after the updating is finished indicates the target path between the node and the target node, and further the target path between the node and the target node can be obtained according to the path array of each node.
Fig. 4 is a block diagram of a structure of a path obtaining apparatus in a network diagram according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus 400 may include: a first path array updating module 401, a second path array updating module 402, a loop module 403, and a target path obtaining module 404, wherein:
the first path array updating module 401 is configured to update path information of a path array of a target node in a network graph based on a direct connection path between each direct connection node of the target node and the target node, to obtain at least one changed node, where the path array is used to store at least one path between a corresponding node and the target node, and the changed node is a node where a path stored in the corresponding path array changes;
the second path array updating module 402 is configured to update the path information of the path array of each directly connected node of each changed node based on a connection path corresponding to the changed path information in the path array of each changed node, update the path array of the directly connected node, and obtain at least one new changed node;
the loop module 403 is configured to repeatedly execute the steps of updating the path information of the path array of each direct-connected node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node, and obtain a target network graph;
the target path obtaining module 404 is configured to obtain at least one target path between a target node and any node based on a path array of any node in the target network graph.
According to the scheme provided by the disclosure, the path array is set for each node in the network graph, and the path array of the directly-connected node is updated by utilizing the changed path information in the path array of the changed node, so that the path information in the path array of each node in the target network graph obtained after the updating is finished indicates the target path between the node and the target node, the target path between the node and the target node can be obtained according to the path array of each node, repeated calculation is not needed in the process of obtaining the target path by the scheme, and the calculation efficiency is improved.
In an optional embodiment of the present disclosure, the second path array updating module is specifically configured to:
combining to obtain a corresponding combined path based on a connection path corresponding to the changed path information in the path array of each change node and a direct connection path between the change node and each direct connection node;
and updating the path information of the path array of the direct connection node based on the combined path.
In an optional embodiment of the disclosure, the second path array update module is further configured to:
if the number of the path information in the path array of each directly connected node is less than a preset numerical value, storing the path information of the combined path corresponding to the directly connected node into the path array of the directly connected node;
and if the number of the path information in the path array of each directly-connected node is equal to a preset numerical value, replacing the path information corresponding to the longest path in the path array of the directly-connected node with the path information of the combined path corresponding to the directly-connected node.
In an optional embodiment of the present disclosure, the target path obtaining module is specifically configured to:
and taking the connection path corresponding to the path information stored in the path array of any node as a target path between the target node and any node.
In an optional embodiment of the present disclosure, the apparatus may further include a path array setting module, configured to:
before updating a path array of a direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node, initializing a corresponding path array with a length of a preset value for each node in the network graph.
Fig. 5 is a block diagram of a maintenance apparatus for routing networking according to the disclosed embodiment, and as shown in fig. 5, the apparatus 500 may include: a network map obtaining module 501, a target communication path obtaining module 502, and a communication path switching module 503, wherein:
the network map obtaining module 501 is configured to obtain a network map corresponding to a routing networking;
the target communication path obtaining module 502 is configured to obtain at least one target communication path between any two central routing nodes in the network graph based on a path obtaining method in the network graph;
the communication path switching module 503 is configured to use any one of the at least one target communication path as a communication path between any two central routing nodes, and use another communication path in the at least one target communication path as a communication path between any two central routing nodes when any communication path fails.
According to the scheme provided by the disclosure, the path array is set for each node in the network graph, and the path array of the directly-connected node is updated by utilizing the changed path information in the path array of the changed node, so that the path information in the path array of each node in the target network graph obtained after the updating is finished indicates the target path between the node and the target node, and further the target path between the node and the target node can be obtained according to the path array of each node.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., a terminal device or server that performs the methods of fig. 1 or 3) 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as a processing device 601 described below, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603, and a storage device 608, which are described below:
as shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable storage medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
updating path information of a path array of the direct connection nodes based on the direct connection path between each direct connection node of the target nodes in the network graph and the target nodes to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target nodes, and the change node is a node of which the path stored in the corresponding path array changes; updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node to obtain at least one new changed node; repeatedly executing the step of updating the path information of the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node until no change node exists in the network graph, and obtaining a target network graph; and acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph.
Or acquiring a network graph corresponding to the routing networking; acquiring at least one target communication path between any two central routing nodes in the network graph based on a path acquisition method in the network graph; and when any communication path fails, taking another communication path in the at least one target communication path as a communication path between any two central routing nodes.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. The names of the modules or units do not form a limitation to the units themselves in some cases, and for example, the network map acquisition module may also be described as a "module for acquiring a network map".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, an embodiment of the present disclosure provides a path obtaining method in a network diagram, including:
updating path information of a path array of the direct connection nodes based on the direct connection path between each direct connection node of the target nodes in the network graph and the target nodes to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target nodes, and the change node is a node of which the path stored in the corresponding path array changes;
updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node to obtain at least one new changed node;
repeatedly executing the step of updating the path information of the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node until no change node exists in the network graph, and obtaining a target network graph;
and acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph.
According to one or more embodiments of the present disclosure, updating path information of a path array of each direct connection node of each changed node based on a connection path corresponding to changed path information in the path array of each changed node includes:
combining to obtain a corresponding combined path based on a connection path corresponding to the changed path information in the path array of each change node and a direct connection path between the change node and each direct connection node;
and updating the path information of the path array of the direct connection node based on the combined path.
According to one or more embodiments of the present disclosure, updating path information of a path array of the direct connection node based on a combined path includes:
if the number of the path information in the path array of each directly connected node is less than a preset numerical value, storing the path information of the combined path corresponding to the directly connected node into the path array of the directly connected node;
and if the number of the path information in the path array of each directly-connected node is equal to a preset numerical value, replacing the path information corresponding to the longest path in the path array of the directly-connected node with the path information of the combined path corresponding to the directly-connected node.
According to one or more embodiments of the present disclosure, obtaining at least one target path between a target node and any node based on a path array of any node in a target network graph includes:
and taking the connection path corresponding to the path information stored in the path array of any node as a target path between the target node and any node.
In accordance with one or more embodiments of the present disclosure, the method further comprises:
before updating a path array of a direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node, initializing a corresponding path array with a length of a preset value for each node in the network graph.
According to one or more embodiments of the present disclosure, an embodiment of the present disclosure provides a maintenance method for routing networking, including:
acquiring a network graph corresponding to routing networking;
acquiring at least one target communication path between any two central routing nodes in the network graph based on a path acquisition method in the network graph;
and when any communication path fails, taking another communication path in the at least one target communication path as a communication path between any two central routing nodes.
According to one or more embodiments of the present disclosure, an apparatus for acquiring a target path in a network graph is provided in an embodiment of the present disclosure, including:
the first path array updating module is used for updating path information of a path array of a target node in a network graph based on a direct connection path between each direct connection node of the target node and the target node to obtain at least one change node, wherein the path array is used for storing at least one path between the corresponding node and the target node, and the change node is a positive integer of a node with a changed path stored in the corresponding path array;
the second path array updating module is used for updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node, updating the path array of the direct connection node and obtaining at least one new changed node;
the loop module is used for repeatedly executing the steps of updating the path information of the path array of each direct connection node of each change node based on the connection path corresponding to the changed path information in the path array of each change node to obtain a target network graph;
and the target path acquisition module is used for acquiring at least one target path between a target node and any node based on the path array of any node in the target network graph.
According to one or more embodiments of the present disclosure, the second path array updating module is specifically configured to:
combining to obtain a corresponding combined path based on a connection path corresponding to the changed path information in the path array of each change node and a direct connection path between the change node and each direct connection node;
and updating the path information of the path array of the direct connection node based on the combined path.
In accordance with one or more embodiments of the present disclosure, the second path array update module is further configured to:
if the number of the path information in the path array of each directly connected node is less than a preset numerical value, storing the path information of the combined path corresponding to the directly connected node into the path array of the directly connected node;
and if the number of the path information in the path array of each directly-connected node is equal to a preset numerical value, replacing the path information corresponding to the longest path in the path array of the directly-connected node with the path information of the combined path corresponding to the directly-connected node.
According to one or more embodiments of the present disclosure, the target path obtaining module is specifically configured to:
and taking the connection path corresponding to the path information stored in the path array of any node as a target path between the target node and any node.
According to one or more embodiments of the present disclosure, the apparatus may further include a path array setting module configured to:
before updating a path array of a direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node, initializing a corresponding path array with a length of a preset value for each node in the network graph.
According to one or more embodiments of the present disclosure, an embodiment of the present disclosure provides a maintenance apparatus for routing networking, including:
the network graph acquisition module is used for acquiring a network graph corresponding to the routing networking;
the target communication path acquisition module is used for acquiring at least one target communication path between any two central routing nodes in the network graph based on a path acquisition method in the network graph;
and the communication path switching module is used for taking any one of the at least one target communication path as a communication path between any two central routing nodes, and taking the other communication path in the at least one target communication path as a communication path between any two central routing nodes when any one communication path fails.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device comprising a memory and a processor;
the memory has a computer program stored therein;
a processor for executing a computer program to implement the method in one or more of the embodiments described above.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method in one or more embodiments described above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for acquiring a path in a network graph is characterized by comprising the following steps:
updating path information of a path array of a direct connection node based on a direct connection path between each direct connection node of a target node in a network graph and the target node to obtain at least one change node, wherein the path array is used for storing at least one path between a corresponding node and the target node, and the change node is a node in which the path stored in the corresponding path array changes;
updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node to obtain at least one new changed node;
repeatedly executing the connecting path corresponding to the changed path information in the path array based on each changed node, and updating the path information of the path array of each direct-connected node of the changed node until no changed node exists in the network graph, so as to obtain a target network graph;
and acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph.
2. The method according to claim 1, wherein the updating the path information of the path array of each directly connected node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node comprises:
combining to obtain a corresponding combined path based on a connection path corresponding to the changed path information in the path array of each change node and a direct connection path between the change node and each direct connection node;
and updating the path information of the path array of the directly connected node based on the combined path.
3. The method of claim 2, wherein updating the path information of the path array of the directly connected node based on the combined path comprises:
if the number of the path information in the path array of each directly connected node is less than a preset numerical value, storing the path information of the combined path corresponding to the directly connected node into the path array of the directly connected node;
and if the number of the path information in the path array of each directly-connected node is equal to a preset numerical value, replacing the path information corresponding to the longest path in the path array of the directly-connected node with the path information of the combined path corresponding to the directly-connected node.
4. The method of claim 1, wherein obtaining at least one target path between the target node and any node based on a path array of the any node in the target network graph comprises:
and taking the connecting path corresponding to the path information stored in the path array of any node as a target path between the target node and the any node.
5. The method according to any one of claims 1-4, further comprising:
initializing a path array with a corresponding length of a preset value for each node in the network graph before updating the path array of the direct connection node based on the direct connection path between each direct connection node of the target nodes in the network graph and the target nodes.
6. A maintenance method for routing networking is characterized by comprising the following steps:
acquiring a network graph corresponding to routing networking;
acquiring at least one target communication path between any two central routing nodes in the network graph based on the method of any one of claims 1-5;
and taking any one communication path in the at least one target communication path as a communication path between any two central routing nodes, and taking another communication path in the at least one target communication path as a communication path between any two central routing nodes when any communication path fails.
7. A path acquisition apparatus in a network map, comprising:
the first path array updating module is used for updating path information of a path array of a target node in a network graph based on a direct connection path between each direct connection node of the target node and the target node to obtain at least one change node, wherein the path array is used for storing at least one path between a corresponding node and the target node, and the change node is a node in which the path stored in the corresponding path array changes;
the second path array updating module is used for updating the path information of the path array of each direct connection node of each changed node based on the connection path corresponding to the changed path information in the path array of each changed node, updating the path array of the direct connection node and obtaining at least one new changed node;
a cycle module, configured to repeatedly execute the connection path corresponding to the changed path information in the path array based on each changed node, and update the path information of the path array of each directly connected node of the changed node, so as to obtain a target network graph;
and the target path acquisition module is used for acquiring at least one target path between the target node and any node based on the path array of any node in the target network graph.
8. A maintenance apparatus for routing networking, comprising:
the network graph acquisition module is used for acquiring a network graph corresponding to the routing networking;
a target communication path obtaining module, configured to obtain at least one entry label communication path between any two central routing nodes in the network graph based on the method according to any one of claims 1 to 5;
a communication path switching module, configured to use any one of the at least one target communication path as a communication path between any two of the center routing nodes, and use another communication path in the at least one target communication path as a communication path between any two of the center routing nodes when a fault occurs in any one of the communication paths.
9. An electronic device comprising a memory and a processor;
the memory has stored therein a computer program;
the processor for executing the computer program to implement the method of any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202011262560.6A 2020-11-12 2020-11-12 Path acquisition method in network diagram and maintenance method of routing networking Active CN112437013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262560.6A CN112437013B (en) 2020-11-12 2020-11-12 Path acquisition method in network diagram and maintenance method of routing networking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262560.6A CN112437013B (en) 2020-11-12 2020-11-12 Path acquisition method in network diagram and maintenance method of routing networking

Publications (2)

Publication Number Publication Date
CN112437013A CN112437013A (en) 2021-03-02
CN112437013B true CN112437013B (en) 2022-02-22

Family

ID=74701253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262560.6A Active CN112437013B (en) 2020-11-12 2020-11-12 Path acquisition method in network diagram and maintenance method of routing networking

Country Status (1)

Country Link
CN (1) CN112437013B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867993A (en) * 2010-06-08 2010-10-20 华中科技大学 Multi-path routing method based on route correlation degree
CN103051533A (en) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 Method and device for calculating route with protection service
CN103201987A (en) * 2010-11-12 2013-07-10 阿尔卡特朗讯公司 Prioritization of routing information updates
CN105027514A (en) * 2013-03-06 2015-11-04 日本电气方案创新株式会社 Network system, node, network management method, and computer-readable recording medium
CN108255987A (en) * 2017-12-28 2018-07-06 清华大学 Community-based node betweenness center degree update method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2356947A1 (en) * 1998-12-23 2000-07-06 Nokia Wireless Routers, Inc. A unified routing scheme for ad-hoc internetworking
US7656857B2 (en) * 2005-10-18 2010-02-02 Cisco Technology, Inc. Directed acyclic graph computation by orienting shortest path links and alternate path links obtained from shortest path computation
US9590889B2 (en) * 2014-10-08 2017-03-07 Dell Products L.P. Multicast routing via non-minimal paths

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867993A (en) * 2010-06-08 2010-10-20 华中科技大学 Multi-path routing method based on route correlation degree
CN103201987A (en) * 2010-11-12 2013-07-10 阿尔卡特朗讯公司 Prioritization of routing information updates
CN103051533A (en) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 Method and device for calculating route with protection service
CN105027514A (en) * 2013-03-06 2015-11-04 日本电气方案创新株式会社 Network system, node, network management method, and computer-readable recording medium
CN108255987A (en) * 2017-12-28 2018-07-06 清华大学 Community-based node betweenness center degree update method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
工业无线mesh网络若干技术的研究;左芸;《中国优秀博硕士学位论文全文数据库(博士)》;20130615;全文 *

Also Published As

Publication number Publication date
CN112437013A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN111858518B (en) Method and device for updating reference document, electronic equipment and storage medium
CN113327598B (en) Model training method, voice recognition method, device, medium and equipment
CN111857720A (en) Method and device for generating user interface state information, electronic equipment and medium
CN112418389A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN111612434B (en) Method, apparatus, electronic device and medium for generating processing flow
CN111597403B (en) Method and device for constructing graph index, electronic equipment and storage medium
CN111355784B (en) Method, device, medium and electronic equipment for processing request information
CN110489219B (en) Method, device, medium and electronic equipment for scheduling functional objects
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN112437013B (en) Path acquisition method in network diagram and maintenance method of routing networking
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN113240108A (en) Model training method and device and electronic equipment
CN112346891A (en) Message storage method, device, equipment and computer readable medium
CN111753238A (en) Data mapping method and device and electronic equipment
CN111338827A (en) Method and device for pasting table data and electronic equipment
CN111241443A (en) Method and device for pushing information and electronic equipment
CN114651237A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111625707B (en) Recommendation response method, device, medium and equipment
CN115994120B (en) Data file merging method, device, electronic equipment and computer readable medium
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN111382085A (en) Test case generation method, device, equipment and medium
CN113392361B (en) Service processing method, device, electronic equipment and computer readable medium
CN115391358A (en) Array updating method and device, electronic equipment and computer readable medium
CN114040014A (en) Content pushing method and device, electronic equipment and computer readable 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