Network fault recovery method and device, medium and computer program product

By monitoring the status of network nodes, reconstructing communication paths and migrating services, the problem of reducing network operation costs while ensuring the reliability of network nodes is solved, and efficient network failure recovery and resource utilization are achieved.

CN120151183APending Publication Date: 2025-06-13ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510481127.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

On the premise of ensuring the reliability of nodes in the network, how to reduce network operation costs?

Method used

By monitoring the status of network nodes, the scope of influence of failed nodes on network topology is determined, the communication paths between associated nodes are reconstructed to reduce communication cost parameters, and the services of failed nodes are migrated to other network nodes to achieve rapid recovery without redundant design.

Benefits of technology

While ensuring the reliability of network nodes, the network operation costs are reduced, the utilization rate of network nodes and links is improved, and additional resource investment and system complexity are avoided by redundant design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151183A_ABST
    Figure CN120151183A_ABST
Patent Text Reader

Abstract

The invention discloses a network fault recovery method and device, a medium and a computer program product, and relates to the technical field of communication. According to the method, the influence range of the failure node on the network topology of the target network is determined, namely, the association nodes associated with the failure node and communication cost parameters among different association nodes are determined according to the network topology of the target network, and the communication cost parameters among the different association nodes are reduced by reconstructing communication paths among the association nodes. The temporary edge connection is created, the communication path after the failure node is eliminated is reconstructed, the communication path of the reconstructed network is ensured to meet the interconnection requirement, the service of the failure node is migrated to other network nodes on the basis of the reconstructed communication path, the service of the failure node can be quickly recovered, redundant design is not needed, and the communication path of the network is ensured to meet the interconnection requirement. On the premise of ensuring the node reliability in the network, the network operation cost is reduced, and the network node utilization rate and the link utilization rate are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a network fault recovery method, device, medium, and computer program product. Background Art

[0002] With the rapid development of information technology and the explosion of the number of Internet users, modern networks are facing unprecedented challenges in terms of performance, reliability, and scalability. Node failures have become common and serious problems in network operation, which can lead to the interruption of some communication links and may also trigger a chain reaction, affecting the normal operation of other nodes. To ensure the stability and reliability of the network, related technologies can quickly replace nodes when they fail through redundant design (including introducing multiple communication links, backup servers, or redundant devices in the network), ensuring the continuous operation of the system. However, implementing redundant design requires a large amount of additional resources.

[0003] How to reduce the network operation cost on the premise of ensuring the reliability of nodes in the network is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The present invention provides a network fault recovery method, device, medium, and computer program product to at least solve the problem of reducing the network operation cost on the premise of ensuring the reliability of nodes in the network compared with related technologies.

[0005] The present invention provides a network fault recovery method, including: Monitoring the status of network nodes in a target network; When a failed node in the network nodes is detected, determining associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network; Reconstructing the communication path between the associated nodes to reduce the communication cost parameters between different associated nodes; Based on the network topology and the reconstructed communication path, migrating the service of the failed node to other network nodes.

[0006] The present invention also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above network fault recovery methods when executing the computer program.

[0007] The present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program realizes the steps of any of the above network fault recovery methods when executed by a processor.

[0008] The present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of any of the above network fault recovery methods.

[0009] Through the present invention, after detecting a failed node, the influence range of the failed node on the network topology of the target network is determined, that is, the associated nodes associated with the failed node and the communication cost parameters between different associated nodes are determined according to the network topology of the target network. By reconstructing the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes, the creation of a temporary edge connection is achieved and the communication paths after excluding the failed node are reconstructed, ensuring that the communication paths of the reconstructed network meet the interconnection requirements. On the basis of the reconstructed communication paths, the services of the failed node are migrated to other network nodes, so that the services of the failed node can be quickly restored without redundant designs such as standby communication links, standby servers or redundant devices. Therefore, the present invention can reduce the network operation cost on the premise of ensuring the reliability of the nodes in the network, and improve the utilization rate of network nodes and links. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0011] Figure 1 It is a flowchart of a network fault recovery method provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of a monitoring architecture of a target network provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of the structure of a network fault recovery device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.

[0013] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0014] To enable those skilled in the art of the present technology to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0015] Some key terms used in the embodiments of the present invention will be explained here first.

[0016] Communication Network Topology refers to the connection mode and layout structure among various nodes (devices) in a communication network. It determines the transmission path and mode of data in the communication network, and has an important impact on the performance, reliability, scalability and cost of the network.

[0017] In a communication network topology, a node is the basic unit in the network, which can be various types of devices. They are connected together through links to achieve data transmission and processing. The type and function of the nodes determine the performance and reliability of the network.

[0018] The target network in the embodiments of the present invention is the communication network, and the network nodes in the embodiments of the present invention are the physical nodes (devices) in the communication network topology.

[0019] In the related art, redundancy design is carried out in the target network, including introducing multiple communication links, standby servers or redundant devices, etc. During the operation of the target network, the redundant nodes are in an idle state. When a failed node appears, the service of the failed node is migrated to the redundant node, and the network topology is reconstructed on the redundant node to ensure the reliability and business continuity of the system. However, while redundancy design provides reliability and availability, it also brings many problems. First of all, implementing redundancy design and other fault tolerance mechanisms usually requires additional investment in hardware, software and human resources, thus significantly increasing the operation and maintenance costs. At the same time, the implementation and maintenance of redundancy design often lead to an increase in the complexity of the system architecture, and professional personnel are required for configuration, monitoring and troubleshooting, which may affect the management efficiency. In addition, although redundancy design enhances the reliability of the system, too many redundant components may introduce additional latency and resource consumption, thus affecting the overall system performance, especially in high-load situations.

[0020] In response to this, an embodiment of the present invention provides a network fault recovery solution, aiming to efficiently address the problem of network node failure in a target network while keeping the original network structure unchanged. Specifically, in the embodiment of the present invention, after detecting a failed node, the influence range of the failed node on the network topology of the target network is determined, that is, the associated nodes associated with the failed node and the communication cost parameters between different associated nodes are determined according to the network topology of the target network. By reconstructing the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes, the creation of temporary edge connections is achieved and the communication paths after excluding the failed node are reconstructed, ensuring that the communication paths of the reconstructed network meet the interconnection requirements. On the basis of the reconstructed communication paths, the services of the failed node are migrated to other network nodes, so that the services of the failed node can be quickly restored without redundant designs such as standby communication links, standby servers or redundant devices. Therefore, the embodiment of the present invention can reduce the network operation cost on the premise of ensuring the reliability of nodes in the network, and improve the utilization rate of network nodes and link utilization rate.

[0021] An embodiment of the present invention provides a network fault recovery method. Combining with the execution process of the network fault recovery method, the method will be described in detail below.

[0022] Figure 1 It is a flowchart of a network fault recovery method provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of the monitoring architecture of a target network provided by an embodiment of the present invention.

[0023] As Figure 1 shown, the network fault recovery method provided by an embodiment of the present invention includes:

[0024] S101: Monitor the status of network nodes in the target network.

[0025] S102: When a failed node is detected in the network nodes, determine the associated nodes associated with the failed node and the communication cost parameters between different associated nodes according to the network topology of the target network.

[0026] S103: Reconstruct the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes.

[0027] S104: Based on the network topology and the reconstructed communication paths, migrate the services of the failed node to other network nodes.

[0028] In practical applications, the monitoring object of the embodiment of the present invention is the network nodes in the target network. The target network includes multiple network nodes, and there may or may not be communication connections between different network nodes.

[0029] The network fault recovery method provided by the embodiments of the present invention can be executed based on a monitoring node. The monitoring node can be a network node in the target network or a device dedicated to monitoring. There are connections between the monitoring node and the monitored network nodes.

[0030] As Figure 2 shown, taking four network nodes as an example, network node 1 is connected to network node 2, network node 2 is connected to network node 4, network node 1 is connected to network node 4, network node 3 is connected to network node 4, and there is no connection between network node 1 and network node 3. The monitoring node has connections with each network node.

[0031] In a specific implementation, for S101, the monitoring node monitors the operating states of each network node, specifically by means of heartbeat signal monitoring or communication cost parameter measurement.

[0032] For S102, after the monitoring node determines the existence of a failed node through a pre-set monitoring method, it analyzes the local network in the target network affected by the failed node, that is, determines the associated nodes associated with the failed node and the communication cost parameters between different associated nodes according to the network topology of the target network.

[0033] The network topology structure diagram, that is, the network topology of the target network, can be drawn according to the geographical locations of the network nodes. In the embodiments of the present invention, the nodes in the network topology are network nodes, and the edges in the network topology are the edges between two nodes (which can be directed edges or bidirectional edges).

[0034] For two directly connected or non-directly connected network nodes, a communication path is specified to enable data transmission between the two network nodes based on this communication path. The communication path can be a path for direct communication between the two network nodes or a path forwarded via one or more intermediate nodes.

[0035] After a failed node appears, the network nodes directly or indirectly connected to the failed node are affected, and the communication link passing through the failed node is disconnected. At this time, the failed node needs to be removed from the network topology for analysis.

[0036] In the embodiments of the present invention, to optimize the communication path of the local network after removing the failed node, communication cost parameters are used to quantify the communication cost between two network nodes. In some optional implementation manners of the embodiments of the present invention, the communication cost parameter between two network nodes can be represented by the physical distance between the two network nodes.

[0037] Since the resource states of different network nodes are different, the physical distance alone may not fully characterize the communication cost between two network nodes. In some other alternative embodiments of the present invention, the communication cost parameter between two network nodes is calculated based on at least one of the physical distance between the two network nodes, the network latency between the two network nodes, and the communication bandwidth between the two network nodes.

[0038] In still some other alternative embodiments of the present invention, the single - communication cost parameter between two network nodes can also be calculated based on at least one of the physical distance between the two network nodes, the network latency between the two network nodes, and the communication bandwidth between the two network nodes, and the communication cost parameter between the two network nodes is calculated based on the communication frequency between the two network nodes.

[0039] The communication cost parameters between any two network nodes in the target network can be obtained through pre - testing, and the communication cost parameters between any two associated nodes can be determined from the communication cost parameters corresponding to the target network after the associated nodes are determined. It is also possible to re - test to obtain the communication cost parameters between any two associated nodes after the associated nodes are determined.

[0040] For S103, with the aim of reducing the communication cost parameters between different associated nodes, the communication path between the associated nodes is reconstructed. For example, if adding a new intermediate node to the original communication path can reduce the communication cost parameters between two associated nodes, then the communication path after adding this intermediate node can be used as the reconstructed communication path. And so on, intermediate nodes can also be added or replaced.

[0041] For S104, based on the network topology and the reconstructed communication path, the service of the failed node is migrated to other network nodes, including: determining the target node in the network nodes for receiving the service of the failed node; and migrating the service of the failed node to the target node based on the network topology and the reconstructed communication path. Since the reconstructed communication path is optimized compared with the original communication path, it can ensure the efficient migration of the service of the failed node.

[0042] The network fault recovery method provided by the embodiments of the present invention, after detecting a failed node, determines the influence range of the failed node on the network topology of the target network, that is, determines the associated nodes associated with the failed node and the communication cost parameters between different associated nodes according to the network topology of the target network, and reduces the communication cost parameters between different associated nodes by reconstructing the communication paths between the associated nodes, realizes the creation of temporary edge connections and reconstructs the communication paths after excluding the failed node, ensures that the communication paths of the reconstructed network meet the interconnection requirements, and migrates the services of the failed node to other network nodes based on the reconstructed communication paths, which can realize the rapid recovery of the services of the failed node without redundant designs such as standby communication links, standby servers or redundant devices. Therefore, the present invention can reduce the network operation cost on the premise of ensuring the reliability of nodes in the network, and improve the utilization rate of network nodes and links.

[0043] Based on the above embodiments, the embodiments of the present invention further elaborate on the step of detecting a failed node.

[0044] In the above embodiments, it is introduced that the monitoring node can monitor the status of each network node through heartbeat signals.

[0045] Then, in some alternative embodiments of the embodiments of the present invention, detecting a failed node in S102 may include: if it is determined that a network node is a suspected failed node by directly communicating with the network node, obtaining the status detection result of the suspected failed node by its neighbor nodes; if the status detection results of more than the tolerated number of neighbor nodes are that the suspected failed node is in a normal state, setting the suspected failed node to the online state, otherwise determining the suspected failed node as a failed node.

[0046] In a specific implementation, let the set of all network nodes in the target network be defined as: , the th network node periodically receives heartbeat signals from the monitoring node. The heartbeat signals can be sent once every fixed interval seconds. If the network node does not respond within the specified time , its heartbeat is marked as failed. The actual response time received by the network node at minus the sending time is: ; Then, the status of each network node is defined as follows: ; To reduce misjudgment, the embodiment of the present invention adopts a continuous timeout detection mechanism. Determining that a network node is a suspected failed node by directly communicating with the network node may include: initializing the timeout count value corresponding to the network node to 0; if the heartbeat signal of the network node is not received continuously for the first time, adding 1 to the timeout count value; if within the second time, the timeout count value corresponding to the network node reaches the cumulative timeout threshold, determining that the network node is a suspected failed node, otherwise setting the timeout count value corresponding to the network node to 0 at the cycle time point corresponding to the second time.

[0047] Then the first time is the above-mentioned . Set the time window (that is, continuously for the second time, and the second time includes multiple first times). Continuously detect whether the network node fails within the time window . Within the time window , monitor the heartbeat signal of each network node times. Define the cumulative detection result as: ; When , it means that the network node responds normally within (all heartbeat signals are successful). When , it means that all heartbeat signals of the node within fail, and mark the node as a suspected failed node.

[0048] After the network node is marked as a suspected failure, further cross-verify through its neighbor node set . Define as the neighbor node set of the network node , if and only if there is a direct connection between the two: ; Make the neighbor node send a heartbeat request to the suspected failed node and verify the response: ; If most neighbor nodes feedback , then the node resumes to the online state: ; Where is the number of tolerated nodes, , and finally obtain the failed node set F.

[0049] In the above embodiment, it is introduced that the monitoring node can monitor the status of each network node by measuring the communication quality parameters of each network node.

[0050] In some other alternative embodiments of the embodiments of the present invention, the detection of a failed node in the network node in S102 may include: sending probe packets to the network node at a fixed rate, obtaining delay information and packet loss rate between the monitoring node and the network node by parsing the probe packet response. If the delay information is greater than a preset delay threshold or the packet loss rate is greater than a preset packet loss threshold, the network node is determined as a suspected failed node, and then the status detection results of the neighbor nodes of the suspected failed node for the suspected failed node are obtained. If the status detection results of more than the tolerable number of neighbor nodes are that the suspected failed node is in a normal state, the suspected failed node is set to the online state; otherwise, the suspected failed node is determined as a failed node.

[0051] Monitoring the status of each network node by measuring the communication quality parameters between the monitoring node and the network node can detect the abnormal situation of the network node faster.

[0052] In addition, in the embodiments of the present invention, the monitoring node first determines the suspected failed node, and then the neighbor nodes of the suspected failed node are used for cross-verification, which can avoid misjudgment of the failed node by the monitoring node and improve the reliability of network fault detection.

[0053] On the basis of the above embodiments, the embodiments of the present invention further describe the reconstruction steps of the communication path between the affected associated nodes.

[0054] In some alternative embodiments of the embodiments of the present invention, determining the associated nodes associated with the failed node and the communication cost parameters between different associated nodes according to the network topology of the target network in S102 may include: obtaining the first adjacency matrix corresponding to the target network, where the elements of the first adjacency matrix represent the communication cost parameters between two network nodes; removing the row elements corresponding to the failed node and the column elements corresponding to the failed node in the first adjacency matrix to obtain the second adjacency matrix; using the network nodes corresponding to the second adjacency matrix as the associated nodes, and determining the communication cost parameters between different associated nodes according to the elements in the second adjacency matrix.

[0055] In a specific implementation, a weighted graph can be used to represent the network, where V is the set of nodes, representing the nodes in the network. is the set of edges, representing the connections between nodes. The original graph is represented by the first adjacency matrix W, and the element in the first adjacency matrix W represents the communication cost parameter between the network node and the network node . The set of failed nodes represents the failed nodes to be removed (and the edges associated with them).

[0056] In an embodiment of the present invention, in the first adjacency matrix, the element at the intersection of the row and column corresponding to the same network node can be set to 0, and the element corresponding to two unconnected network nodes is set to infinity. That is ; if , is unconnected, then .

[0057] Then, in an embodiment of the present invention, removing the row elements corresponding to the failed nodes and the column elements corresponding to the failed nodes in the first adjacency matrix to obtain a second adjacency matrix may include: setting the row elements corresponding to the failed nodes and the column elements corresponding to the failed nodes in the first adjacency matrix to infinity; removing the rows with all elements being infinity and the columns with all elements being infinity in the first adjacency matrix to obtain the second adjacency matrix.

[0058] Based on this, reconstructing the communication paths between associated nodes in S103 to reduce the communication cost parameters between different associated nodes may include: according to the second adjacency matrix, for each associated node, determining the change in the communication cost parameters between two associated nodes after the associated node serves as an intermediate node between any two associated nodes; if the communication cost parameters between two associated nodes decrease after adding the intermediate node, then adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise not adding the intermediate node between the two associated nodes to the communication path.

[0059] In a specific implementation, according to the second adjacency matrix, for each associated node, determining the change in the communication cost parameters between two associated nodes after the associated node serves as an intermediate node between any two associated nodes includes: initializing an optimal path matrix such that the elements in the optimal path matrix are the same as those in the second adjacency matrix; for each associated node, according to the optimal path matrix, calculating the smaller value of the communication cost parameters between any two associated nodes before the associated node is added as an intermediate node and the communication cost parameters after adding the intermediate node; if the communication cost parameters between two associated nodes decrease after adding the intermediate node, then adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise not changing the communication path between the two associated nodes, including: if the smaller value is less than the corresponding element in the optimal path matrix, then adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes and updating the optimal path matrix; if the smaller value is not less than the corresponding element in the optimal path matrix, then not adding the intermediate node between the two associated nodes to the communication path.

[0060] Specifically, the initialized optimal path matrix can be denoted as , which is the optimal path matrix in the original graph.

[0061] Remove the failed node F from the first adjacency matrix W and set the corresponding row and column to , that is: .

[0062] Suppose the first adjacency matrix W is: .

[0063] The failed node F = {2}. Remove network node 2, and set its row and column to . The adjacency matrix after removal is: .

[0064] Then, extract the local subgraph affected by the failed node.

[0065] First, find all the node sets directly or indirectly connected to the failed node F: .

[0066] That is to say, after setting the row and column elements corresponding to the failed node to infinity, for the remaining network nodes in the target network, as long as the communication cost parameter between it and any other network node is not infinity, then determine that the network node is an associated node .

[0067] If all the network nodes in the target network are two-way communication, then: .

[0068] Extract the second adjacency matrix containing the network nodes in: .

[0069] In the node set , the submatrix is: .

[0070] Among them, indicates that there is no direct path from network node 1 to network node 3. indicates that the communication cost parameter between network node 1 and network node 4 is 7.

[0071] Thus, obtain the second adjacency matrix . Only need to update the optimal communication path between the associated nodes affected by the failed node, then the optimal path matrix can be updated by the following formula: .

[0072] Among them, represents considering the After passing through an intermediate node, from the network node to the network node of the optimal path, if passing through the intermediate node can reduce the communication cost parameter from the network node to the network node , then update the communication path between the network node and the network node .

[0073] Taking the above example, for each associated node in the affected node set , perform dynamic updates to check whether all communication paths can become shorter by passing through this associated node.

[0074] For network node 1: ; ; ; That is to say, for any two associated nodes, if adding network node 1 does not reduce the communication cost parameter, then at this time, do not use network node 1 to update the communication path between the associated nodes.

[0075] For network node 3: ; ; ; That is to say, for any two associated nodes, if adding network node 3 does not reduce the communication cost parameter, then at this time, do not use network node 3 to update the communication path between the associated nodes.

[0076] For network node 4: ; ; ; It can be seen that after taking network node 4 as the intermediate node between network node 1 and network node 3, the communication cost parameter between network node 1 and network node 3 can be reduced, so the communication path between network node 1 and network node 3 is updated to 1-4-3.

[0077] Through the above update, the finally output is the optimal path between the associated nodes. Then, for any two network nodes in the target network, the connection situation after breakpoint adjustment can be quickly found.

[0078] In addition to the above reconstruction solution for the communication paths between affected associated nodes, in some alternative embodiments of the present invention, in S102, determining the associated nodes associated with the failed node and the communication cost parameters between different associated nodes according to the network topology of the target network may further include: extracting, according to the network topology of the target network, the network nodes whose number of hops of the communication path with the failed node does not exceed a preset number of hops as associated nodes, and determining the communication cost parameters between different associated nodes based on the network topology of the target network.

[0079] Based on this, in S103, reconstructing the communication paths between associated nodes to reduce the communication cost parameters between different associated nodes may include: obtaining the initial communication paths between each associated node; for each associated node, determining the change in the communication cost parameters between two associated nodes after the associated node serves as the intermediate node between any two associated nodes; if the communication cost parameters between two associated nodes decrease after adding the intermediate node, then add the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise do not add the intermediate node to the communication path between the two associated nodes.

[0080] The specific implementation manners of the embodiments of the present invention may refer to the introduction of the above embodiments.

[0081] After reconstructing the communication paths between associated nodes, it is necessary to migrate the services of the failed node based on the network topology and the reconstructed communication paths. In some alternative embodiments of the present invention, migrating the services of the failed node to other network nodes based on the network topology and the reconstructed communication paths may include: determining the target node in the network nodes for receiving the services of the failed node; migrating the services of the failed node to the target node based on the network topology and the reconstructed communication paths.

[0082] In specific implementation, all associated nodes may be determined as target nodes. In some other alternative embodiments of the present invention, determining the target node in the network nodes for receiving the services of the failed node may also include: screening out the target node from the associated nodes according to the communication cost parameters between the failed node and the associated nodes, the communication cost parameters between the associated nodes, the first load value corresponding to the services of the failed node, and the available node remaining load value of the associated nodes. That is to say, the associated node with the smallest migration cost and the available node remaining load value meeting the requirements can be screened out as the target node.

[0083] In an embodiment of the present invention, based on the network topology and the reconstructed communication path, migrating the services of a failed node to a target node may include: determining a first load value corresponding to the services of the failed node; determining the remaining load values of available nodes of each target node; calculating the product of the ratio of the remaining load value of an available node of a target node to the total value of the remaining load values of available nodes and the first load value to obtain the task volume size of the services of the failed node received by the target node; and migrating the services of the failed node corresponding to the task volume size to the target node.

[0084] After reconstructing the network excluding the failed node, the load of the failed node needs to be redistributed to ensure that the services on the failed node can be borne by other nodes, avoiding the paralysis of the entire network due to the failure.

[0085] Let be the load redistributed to the target node v, then the total scattered load of the failed node = the load of the failed node: .

[0086] Among them, represents the set of target nodes, represents the first load value of the failed node , represents the set of failed nodes.

[0087] In addition, it is necessary to constrain the load distribution to adapt to the remaining load of the target node: .

[0088] Among them, represents the remaining load of available nodes of the target node v.

[0089] Then for the failed node , perform service migration in proportion: .

[0090] In some other alternative embodiments of the embodiments of the present invention, based on the network topology and the reconstructed communication path, migrating the services of a failed node to a target node may further include: determining a first load value corresponding to the services of the failed node; determining the remaining load values of available nodes of each target node and the communication cost parameter between the target node and the failed node, and obtaining the task volume size of the services of the failed node received by the target node based on this; and migrating the services of the failed node corresponding to the task volume size to the target node. By comprehensively considering the remaining load values of available nodes of each target node and the communication cost parameter between the target node and the failed node, the service quality after migrating the services of the failed node can be further improved.

[0091] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0092] Figure 3 The following is a schematic structural diagram of a network fault recovery device provided by an embodiment of the present invention.

[0093] As Figure 3 shown, an embodiment of the present invention also provides a network fault recovery device, including: A monitoring unit 301, configured to monitor the status of network nodes in a target network; A determination unit 302, configured to, when a failed node in the network nodes is detected, determine associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network; A reconstruction unit 303, configured to reconstruct a communication path between associated nodes to reduce the communication cost parameters between different associated nodes; A control unit 304, configured to migrate the service of the failed node to other network nodes based on the network topology and the reconstructed communication path.

[0094] In an embodiment of the present invention, the determination unit 302 determines associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network, which may include: obtaining a first adjacency matrix corresponding to the target network, where elements of the first adjacency matrix represent communication cost parameters between two network nodes; removing row elements corresponding to the failed node and column elements corresponding to the failed node in the first adjacency matrix to obtain a second adjacency matrix; using the network nodes corresponding to the second adjacency matrix as associated nodes, and determining communication cost parameters between different associated nodes according to the elements in the second adjacency matrix.

[0095] In an embodiment of the present invention, in the first adjacency matrix, elements at the intersection of the row and column corresponding to the same network node are 0, and elements corresponding to two non-connected network nodes are infinite. The determination unit 302 removes row elements corresponding to the failed node and column elements corresponding to the failed node in the first adjacency matrix to obtain a second adjacency matrix, which may include: setting row elements corresponding to the failed node and column elements corresponding to the failed node in the first adjacency matrix to infinite; removing rows in the first adjacency matrix where all elements are infinite and columns where all elements are infinite to obtain a second adjacency matrix.

[0096] In an embodiment of the present invention, the reconstruction unit 303 reconstructs the communication path between associated nodes to reduce the communication cost parameter between different associated nodes, which may include: according to the second adjacency matrix, for each associated node, determining the change of the communication cost parameter between two associated nodes after the associated node serves as the intermediate node between any two associated nodes; if the communication cost parameter between two associated nodes decreases after adding the intermediate node, adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise not adding the intermediate node between the two associated nodes to the communication path.

[0097] In an embodiment of the present invention, the reconstruction unit 303 determines, according to the second adjacency matrix, for each associated node, the change of the communication cost parameter between two associated nodes after the associated node serves as the intermediate node between any two associated nodes, which may include: initializing an optimal path matrix such that the elements in the optimal path matrix are the same as those in the second adjacency matrix; for each associated node, calculating, according to the optimal path matrix, the smaller value between the communication cost parameter before any two associated nodes do not add the associated node as the intermediate node and the communication cost parameter after adding the intermediate node; if the communication cost parameter between two associated nodes decreases after adding the intermediate node, adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise not changing the communication path between the two associated nodes, including: if the smaller value is less than the corresponding element in the optimal path matrix, adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes and updating the optimal path matrix; if the smaller value is not less than the corresponding element in the optimal path matrix, not adding the intermediate node between the two associated nodes to the communication path.

[0098] In an embodiment of the present invention, the determination unit 302 determines the associated nodes associated with the failed node and the communication cost parameter between different associated nodes according to the network topology of the target network, which may include: according to the network topology of the target network, extracting the network nodes whose number of hops of the communication path with the failed node does not exceed the preset number of hops as the associated nodes, and determining the communication cost parameter between different associated nodes based on the network topology of the target network.

[0099] In an embodiment of the present invention, the reconstruction unit 303 reconstructs the communication path between associated nodes to reduce the communication cost parameter between different associated nodes, which may include: obtaining the initial communication path between each associated node; for each associated node, determining the change of the communication cost parameter between two associated nodes after the associated node serves as the intermediate node between any two associated nodes; if the communication cost parameter between two associated nodes decreases after adding the intermediate node, adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise not adding the intermediate node between the two associated nodes to the communication path.

[0100] In an embodiment of the present invention, the communication cost parameter between two network nodes is calculated based on at least one of the physical distance between the two network nodes, the network latency between the two network nodes, and the communication bandwidth between the two network nodes.

[0101] In an embodiment of the present invention, the control unit 304 migrates the service of the failed node to other network nodes based on the network topology and the reconstructed communication path, which may include: determining a target node in the network nodes for receiving the service of the failed node; and migrating the service of the failed node to the target node based on the network topology and the reconstructed communication path.

[0102] In an embodiment of the present invention, the control unit 304 migrates the service of the failed node to the target node based on the network topology and the reconstructed communication path, which may include: determining a first load value corresponding to the service of the failed node; determining the remaining available load value of each target node; calculating the product of the ratio of the remaining available load value of the target node to the total value of the remaining available load values of the available nodes and the first load value to obtain the task volume size of the service of the failed node received by the target node; and migrating the service of the failed node corresponding to the task volume size to the target node.

[0103] In an embodiment of the present invention, when the monitoring unit 301 detects a failed node in the network nodes, it may include: if it is determined that a network node is a suspected failed node by directly communicating with the network node, obtaining the status detection result of the suspected failed node by its neighbor nodes; if the status detection results of more than the tolerated number of neighbor nodes indicate that the suspected failed node is in a normal state, setting the suspected failed node to the online state, otherwise determining the suspected failed node as a failed node.

[0104] In an embodiment of the present invention, when the monitoring unit 301 determines that a network node is a suspected failed node by directly communicating with the network node, it may include: initializing the timeout count value corresponding to the network node to 0; if the heartbeat signal of the network node is not received continuously for a first period of time, incrementing the timeout count value by 1; if the timeout count value corresponding to the network node reaches the cumulative timeout threshold within a second period of time, determining the network node as a suspected failed node, otherwise setting the timeout count value corresponding to the network node to 0 at the periodic time point corresponding to the second period of time.

[0105] For the description of the features in the embodiments corresponding to the network fault recovery device, reference may be made to the relevant description in the embodiments corresponding to the network fault recovery method, which will not be elaborated here.

[0106] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the network fault recovery method.

[0107] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the network fault recovery method when running.

[0108] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.

[0109] An embodiment of the present invention further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the network fault recovery method.

[0110] An embodiment of the present invention further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the network fault recovery method.

[0111] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0112] The above has introduced in detail a network fault recovery method, device, medium, and computer program product provided by the present invention. Specific examples are used herein to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A network failure recovery method, characterized in that: include: Monitor the status of network nodes in the target network; When a failed node in the network nodes is detected, determining associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network; reconstructing the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes; Based on the network topology and the reconstructed communication path, the service of the failed node is migrated to other network nodes.

2. The network failure recovery method according to claim 1, characterized in that: Determining associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network includes: Acquire a first adjacency matrix corresponding to the target network, wherein elements of the first adjacency matrix represent communication cost parameters between two network nodes; Eliminate the row elements corresponding to the failed nodes and the column elements corresponding to the failed nodes in the first adjacency matrix to obtain a second adjacency matrix; The network nodes corresponding to the second adjacency matrix are taken as the associated nodes, and communication cost parameters between different associated nodes are determined according to the elements in the second adjacency matrix.

3. The network failure recovery method according to claim 2, characterized in that: In the first adjacency matrix, the elements at the intersection of rows and columns corresponding to the same network node are 0, and the elements corresponding to the two unconnected network nodes are infinite; Eliminating the row elements corresponding to the failed nodes and the column elements corresponding to the failed nodes in the first adjacency matrix to obtain a second adjacency matrix, including: Setting the row elements corresponding to the failed nodes and the column elements corresponding to the failed nodes in the first adjacency matrix to infinity; The second adjacency matrix is ​​obtained by removing rows and columns in which all elements in the first adjacency matrix are infinite.

4. The network failure recovery method according to claim 2, characterized in that: Reconstructing the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes includes: According to the second adjacency matrix, for each of the associated nodes, determining a change in a communication cost parameter between two of the associated nodes after the associated node serves as an intermediate node between any two of the associated nodes; If the communication cost parameter between the two associated nodes is reduced after adding the intermediate node, the intermediate node is added between the two associated nodes to reconstruct the communication path between the two associated nodes; otherwise, the intermediate node is not added to the communication path between the two associated nodes.

5. The network failure recovery method according to claim 4, characterized in that: Determining, for each of the associated nodes according to the second adjacency matrix, a change in a communication cost parameter between two associated nodes after the associated node serves as an intermediate node between any two associated nodes, including: Initializing an optimal path matrix so that the elements in the optimal path matrix are the same as those in the second adjacency matrix; For each of the associated nodes, according to the optimal path matrix, calculating the smaller value of the communication cost parameter of any two associated nodes before the associated node is added as the intermediate node and the communication cost parameter after the associated node is added as the intermediate node; If the communication cost parameter between the two associated nodes is reduced after adding the intermediate node, then adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, otherwise the communication path between the two associated nodes is not changed, including: If the smaller value is smaller than the corresponding element in the optimal path matrix, adding the intermediate node between the two associated nodes to reconstruct the communication path between the two associated nodes, and updating the optimal path matrix; If the smaller value is not smaller than the corresponding element in the optimal path matrix, the intermediate node is not added to the communication path between the two associated nodes.

6. The network failure recovery method according to claim 1, characterized in that: Determining associated nodes associated with the failed node and communication cost parameters between different associated nodes according to the network topology of the target network includes: According to the network topology of the target network, the network nodes whose communication paths with the failed nodes have hop counts not exceeding a preset number are extracted as the associated nodes, and communication cost parameters between different associated nodes are determined based on the network topology of the target network.

7. The network failure recovery method according to claim 6, characterized in that: Reconstructing the communication paths between the associated nodes to reduce the communication cost parameters between different associated nodes includes: Acquire an initial communication path between each of the associated nodes; For each of the associated nodes, determining a change in a communication cost parameter between any two of the associated nodes after the associated node serves as an intermediate node between any two of the associated nodes; If the communication cost parameter between the two associated nodes is reduced after adding the intermediate node, the intermediate node is added between the two associated nodes to reconstruct the communication path between the two associated nodes; otherwise, the intermediate node is not added to the communication path between the two associated nodes.

8. The network failure recovery method according to any one of claims 1 to 7, characterized in that: The communication cost parameter between the two network nodes is calculated based on at least one of the physical distance between the two network nodes, the network delay between the two network nodes, and the communication bandwidth between the two network nodes.

9. The network failure recovery method according to claim 1, characterized in that: Based on the network topology and the reconstructed communication path, migrating the service of the failed node to other network nodes includes: Determining a target node among the network nodes for receiving the service of the failed node; Based on the network topology and the reconstructed communication path, the service of the failed node is migrated to the target node.

10. The network failure recovery method according to claim 9, characterized in that: Migrating the service of the failed node to the target node based on the network topology and the reconstructed communication path, including: Determine a first load value corresponding to the service of the failed node; Determining the available node remaining load value of each of the target nodes; Calculate the product of the ratio of the available node remaining load value of the target node to the total value of the available node remaining load value and the first load value to obtain the task amount of the service of the failed node received by the target node; Migrate the services of the failed node corresponding to the task size to the target node.

11. The network failure recovery method according to claim 1, characterized in that: The failed nodes in the network nodes are detected, including: If the network node is determined to be a suspected failed node by directly communicating with the network node, obtaining a state detection result of the suspected failed node by a neighboring node of the suspected failed node; If the state detection result of the neighbor nodes whose number is greater than the tolerated node number is that the suspected failed node is in a normal state, the suspected failed node is set to an online state; otherwise, the suspected failed node is determined to be the failed node.

12. The network failure recovery method according to claim 11, characterized in that: Determining that the network node is a suspected failed node by directly communicating with the network node includes: Initialize the timeout count value corresponding to the network node to 0; If the heartbeat signal of the network node is not received for a first period of time, the timeout count value is increased by 1; If the timeout count value corresponding to the network node reaches the cumulative timeout threshold within the second time, the network node is determined to be the suspected failed node, otherwise the timeout count value corresponding to the network node is set to 0 when the periodic time point corresponding to the second time is reached.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the network failure recovery method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the network failure recovery method according to any one of claims 1 to 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the network failure recovery method according to any one of claims 1 to 12 are implemented.