Method and device for generating main / standby multicast tree, and medium

By combining a two-layer loop framework and Dijkstra's algorithm with supernode compression technology, the problem of multicast tree resource preemption under a centralized computing framework is solved, realizing the generation of master and backup multicast trees with no common edges and the lowest total cost, thus improving the robustness and transmission reliability of multicast networks.

CN120880979APending Publication Date: 2025-10-31INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511035024.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In a centralized computing framework, how can we construct two master-slave multicast trees with no common edges, the lowest total cost, and the maximum end-to-end latency constraint, while avoiding resource contention caused by step-by-step solutions?

Method used

A double-layer loop framework and Dijkstra's algorithm combined with supernode compression technology are adopted. By randomly growing multicast trees in turn and using the residual graph dynamic isolation mechanism, it is ensured that there are no common edges between multicast trees and the computational complexity is reduced.

Benefits of technology

It effectively avoids resource contention issues, ensures that the multicast tree has no common edge and the total cost is minimized, improves the robustness and deployment flexibility of the multicast network, and meets the end-to-end transmission reliability requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880979A_ABST
    Figure CN120880979A_ABST
Patent Text Reader

Abstract

The invention discloses a method and equipment for generating a main / standby multicast tree, and a medium, and relates to the technical field of communication. The method comprises the following steps: in an initialization stage, defining an original topological graph, a source node, a destination node set, a maximum delay constraint and an iteration threshold value, creating double trees only containing the source node, and binding independent residual graphs respectively to ensure initial resource isolation; a current growth tree is dynamically selected through a random alternate mechanism, a minimum cost path is calculated by using a super node compression technology in combination with a Dijkstra algorithm, a newly added path edge is removed in real time, and a dynamic isolation environment is constructed from another tree remainder graph; in the preferential output stage, the coverage integrity and the total cost are compared through multi-round iteration, the optimal dual-tree combination is reserved, multicast tree optimization which is free of common edges, low in delay and minimum in total cost is achieved, and the network reliability and the calculation efficiency are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, device and medium for generating a primary and backup multicast tree. Background Technology

[0002] In multicast communication networks, constructing a primary and backup multicast tree with no common edges is a key means to improve transmission reliability. Traditional methods typically employ a step-by-step solution strategy: first, an optimal multicast tree is generated using a Steiner tree or KMB heuristic algorithm; then, the paths occupied by this tree are removed; and finally, a second multicast tree is constructed based on the remaining topology. While this approach guarantees the optimality of the first tree, it neglects the necessity of collaborative optimization between the two trees.

[0003] Existing technologies have significant drawbacks: once the first multicast tree has fully grown, the critical paths it occupies (especially high-bandwidth, low-latency links) may force the second tree to choose a suboptimal path. This not only significantly increases the transmission cost of the second tree but may also fail to meet business constraints due to excessive latency on the remaining paths, potentially even causing the second tree to fail to build. In some scenarios, the total cost of the backup tree generated by the step-by-step solution method may exceed that of the primary tree by several times, severely violating the design principle of "low-cost primary-backup collaboration."

[0004] Furthermore, distributed protocols (such as PIM) rely on dynamic interactions between network nodes to generate multicast trees. These solutions require deploying complex protocol stacks in network devices, making them difficult to apply to centralized SDN architectures, and they cannot guarantee the hard isolation requirement of no common edges between the two trees. Existing centralized algorithms generally lack closed-loop verification mechanisms for latency constraints, often resulting in the risk that a single tree may locally meet latency requirements, but the overall latency may exceed the limit when the two trees are combined.

[0005] Therefore, how to construct two master-slave multicast trees with no common edges, the lowest total cost, and the maximum end-to-end delay constraint under a centralized computing framework, while avoiding resource contention caused by step-by-step solution, has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] This application provides a method, device, and medium for generating a master-slave multicast tree to solve the following technical problem: how to construct two master-slave multicast trees with no common edges, the lowest total cost, and the maximum end-to-end delay constraint under a centralized computing framework, while avoiding resource contention caused by step-by-step solution.

[0007] In a first aspect, embodiments of this application provide a method for generating a master-slave multicast tree, the method comprising: S1: defining an original topology graph, a set of source nodes, a set of destination nodes, a maximum delay constraint, and a threshold for the number of outer loop iterations; wherein, each edge in the original topology graph includes a start and end node, a cost, and a transmission delay; the cost is the transmission cost corresponding to a unit of transmitted data; S2: determining whether the number of outer loop iterations has reached the threshold for the number of outer loop iterations; if it has, outputting the optimal master-slave multicast tree; if it has not, executing S3; S3: creating a first multicast tree and a second multicast tree containing only source nodes, and initializing the remainder graph of the first multicast tree and the second multicast tree as the original topology graph. S4: Randomly select one of the first or second multicast trees as the current growth tree, and add an uncovered path to the uncovered destination node to the current growth tree using the preset Dijkstra algorithm; S5: Remove the edge corresponding to the uncovered path from the remaining graph corresponding to the other multicast tree; S6: If the first and second multicast trees do not contain all destination nodes, and there are uncovered destination nodes in the first or second multicast tree that are reachable under a delay less than the maximum constraint, then return to S4; otherwise, execute S7; S7: Compare the dual tree generated in this outer loop iteration with the historical best dual tree to retain the current best master-slave multicast tree, and return to S2.

[0008] In one embodiment of this application, before adding an uncovered path to an uncovered destination node to the current growth tree using a preset Dijkstra algorithm, the method further includes: determining whether the current growth tree contains all destination nodes, and if so, re-executing S4; and determining whether all uncovered destination nodes in the current growth tree are unreachable under a delay less than the maximum delay constraint, and if so, re-executing S4.

[0009] In one embodiment of this application, an uncovered path leading to an uncovered destination node is added to the current growth tree using a preset Dijkstra algorithm. Specifically, this includes: using the Dijkstra algorithm to calculate the path to be added with the minimum cost from the current growth tree to each uncovered destination node; and based on the maximum delay constraint, selecting one path from each path to be added and adding it to the current growth tree to add an uncovered path to the uncovered destination node to the current growth tree.

[0010] In one embodiment of this application, the Dijkstra algorithm is used to calculate the minimum cost path to each uncovered destination node from the current growing tree. Specifically, this includes: creating a replica of the original tree; merging all nodes in the current growing tree into a virtual super node in the replica; defining each uncovered destination node in the replica as a virtual destination node and the path between each virtual destination node and the virtual super node as an uncovered virtual path; using the Dijkstra algorithm to calculate the minimum cost uncovered virtual path from the virtual super node to each virtual destination node, and determining the path to be added corresponding to each minimum cost uncovered virtual path in the current growing tree; and deleting the replica.

[0011] In one embodiment of this application, based on the maximum delay constraint, selecting one path from each path to be added to the current growth tree specifically includes: sorting each path to be added in ascending order of path cost to obtain a path sorting sequence; determining whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint; if so, adding the first path to be added to the current growth tree; if not, polling and judging other paths to be added in the path sorting sequence in the sorting order until it is determined that a path to be added can reach the corresponding uncovered destination node under a delay less than the maximum delay constraint, so as to add an uncovered path to the uncovered destination node to the current growth tree.

[0012] In one embodiment of this application, determining whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint specifically includes: starting from the first uncovered destination node, backtracking upwards along the path to the source node of the current growth tree; accumulating the transmission delay of all edges in the backtracking path to obtain the total delay from the source node to the first uncovered destination node; when the total delay is less than the maximum delay constraint, determining that the first path to be added satisfies the reachability condition.

[0013] In one embodiment of this application, removing the edges corresponding to the uncovered path from the remaining graph of another multicast tree specifically includes: extracting all edges and associated nodes contained in the uncovered path; and deleting the topological connection relationships of all edges in the remaining graph data of another multicast tree.

[0014] In one embodiment of this application, comparing the dual-tree generated in the current outer loop iteration with the historical best dual-tree to retain the optimal master-slave multicast tree specifically includes: determining whether a historical best dual-tree exists; if not, determining the dual-tree generated in the current outer loop iteration as the current optimal master-slave multicast tree; if a historical best dual-tree exists, determining whether both the dual-tree generated in the current outer loop iteration and the historical best dual-tree contain all destination nodes; if both the dual-tree generated in the current outer loop iteration and the historical best dual-tree contain multicast trees that do not contain all destination nodes, randomly selecting one of the dual-trees generated in the current outer loop iteration or the historical best dual-tree as the current optimal master-slave multicast tree. The optimal master-slave multicast tree is determined as follows: If the current outer loop iteration generates a multicast tree that does not contain all destination nodes, and the historical best multicast tree contains all destination nodes, then the historical best multicast tree is determined as the current optimal master-slave multicast tree; if the historical best multicast tree contains a multicast tree that does not contain all destination nodes, and the current outer loop iteration generates a multicast tree that contains all destination nodes, then the current outer loop iteration generates a multicast tree as the current optimal master-slave multicast tree; if both the current outer loop iteration generates a multicast tree and the historical best multicast tree contain all destination nodes, then the total cost of the two sets of multicast trees is calculated separately, and the multicast tree with the smaller total cost is determined as the current optimal master-slave multicast tree.

[0015] Secondly, embodiments of this application also provide a primary / backup multicast tree generation apparatus, the apparatus comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a primary / backup multicast tree generation method as described above.

[0016] Thirdly, embodiments of this application also provide a non-volatile computer storage medium storing computer-executable instructions, which, when executed, implement a method for generating a master-slave multicast tree as described above.

[0017] The method, device, and medium for generating a primary and backup multicast tree provided in this application have the following beneficial effects: By combining a two-layer cyclic framework (outer layer iteratively selects the optimal solution and inner layer randomly grows in turn) with supernode compression technology, the resource contention problem between primary and backup multicast trees is effectively avoided, ensuring that the two trees have no common edges and the total cost is minimized; Specifically, the random sampling growth mechanism breaks the serialization limitation of traditional step-by-step solutions, preventing a single tree from monopolizing the critical path, which could lead to a surge in backup tree cost or excessive latency. At the same time, the supernode processing significantly reduces the computational complexity of Dijkstra's algorithm, achieving efficient path optimization in large-scale topologies; In addition, the dynamic backtracking verification of latency constraints ensures end-to-end transmission reliability, while the centralized design is directly compatible with the SDN architecture, significantly improving the robustness and deployment flexibility of the multicast network. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 A flowchart illustrating a method for generating a master-slave multicast tree, as provided in an embodiment of this application;

[0020] Figure 2 A flowchart illustrating a method for generating a multicast tree once using an inner loop, as provided in this application embodiment;

[0021] Figure 3 This is a schematic diagram of virtual supernode compression provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of the internal structure of a primary / backup multicast tree generation device provided in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] This application provides a method, device, and medium for generating a master-slave multicast tree to solve the following technical problem: how to construct two master-slave multicast trees with no common edges, the lowest total cost, and the maximum end-to-end delay constraint under a centralized computing framework, while avoiding resource contention caused by step-by-step solution.

[0025] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0026] Figure 1 This is a flowchart illustrating a method for generating a master-slave multicast tree, as provided in an embodiment of this application. Figure 1 As shown in the embodiment of this application, a method for generating a master-slave multicast tree specifically includes the following steps:

[0027] Example 1:

[0028] S1: Define the original topology graph, source node set, destination node set, maximum delay constraint, and outer loop iteration threshold; where each edge in the original topology graph includes the start and end nodes, cost, and transmission delay; the cost is the transmission cost corresponding to a unit of transmitted data.

[0029] In this embodiment, the original topology graph is the input object for the algorithm, and its essence is a weighted undirected graph data structure representation. It should be noted that the start and end nodes of each edge in the graph must clearly identify the network device interface (e.g., the MAC address of the router port), which is the basic connection unit for constructing the tree path; transmission delay characterizes the one-way delay of data packets traversing the physical link (e.g., fiber optic propagation delay + device processing delay), and its measurement must be consistent with actual network probe data; while cost, as an economic indicator, is defined as the cost resources consumed per unit of data transmitted (e.g., bandwidth rental fees, energy consumption, etc.).

[0030] Understandably, the source node, as the initiator of multicast data, is typically designated as a fixed server node (such as the IP address of a video source station); the destination node set includes all terminal devices that need to receive the multicast stream (such as a group of OBU devices in vehicle networking), and its size directly affects the algorithm complexity. The maximum latency constraint stems from the service quality requirements of the business layer; for example, in autonomous driving scenarios, the end-to-end latency must not exceed a critical threshold. As for the threshold for the number of outer loop iterations, this parameter controls the global search depth of the algorithm. An exemplary setting principle is: the higher the topology complexity (e.g., the number of nodes > 500), the larger the threshold, but a trade-off must be made between computational time and solution quality.

[0031] S2: Determine whether the number of iterations of the outer loop has reached the threshold for the number of iterations of the outer loop. If it has, output the optimal master-slave multicast tree. If it has not, execute S3.

[0032] In this embodiment, the outer loop iteration counter needs to be reset to zero during algorithm initialization and automatically incremented each time S2 is entered. It should be noted that a threshold-based decision strategy is used here instead of a fixed-duration wait, ensuring that the algorithm completes within a deterministic computation cycle. This is crucial for scenarios with high real-time requirements, such as SDN controllers.

[0033] Specifically, when the number of iterations reaches a preset threshold (for example, a higher threshold is set in a large metropolitan area network scenario), the system will output the optimal primary / backup multicast tree combination stored in the historical records (the selection logic is detailed in S7). If the threshold is not reached, the process proceeds to S3 for further iterative optimization. An exemplary determination process is as follows: compare the current counter value with the threshold parameter defined in S1; if they are equal, trigger the output process; otherwise, reset the dual-tree state and enter the next round of iteration.

[0034] S3: Create a first multicast tree and a second multicast tree containing only the source node, and initialize the remaining graphs of the first multicast tree and the second multicast tree to the original topology graph.

[0035] Understandably, a multicast tree is essentially a tree-like data structure. Its initial state only contains the source node (such as video server S), at which point there are neither branch paths nor destination node connections. It should be noted that the co-graph, as a key dynamic isolation mechanism, is essentially a subset copy of the original topology graph, used to limit the available link resources of each tree.

[0036] Specifically, during initialization: both the first multicast tree T1 and the second multicast tree T2 are initialized as isolated tree structures containing only the source node S (e.g., stored using an adjacency list, with only node S and no connecting edges). Independent co-graph instances (i.e., complete copies of the original topology graph) are created for T1 and T2 respectively, meaning that both trees initially have access to all network link resources. An exemplary implementation uses deep copy technology to generate two identical topology data sets, which are then associated with T1 and T2 respectively.

[0037] S4: Randomly select one of the first or second multicast trees as the current growth tree, and add an uncovered path to the uncovered destination node to the current growth tree using the preset Dijkstra algorithm.

[0038] In one embodiment of this application, before adding an uncovered path to an uncovered destination node to the current growth tree using a preset Dijkstra algorithm, the method further includes: determining whether the current growth tree contains all destination nodes, and if so, re-executing S4; and determining whether all uncovered destination nodes in the current growth tree are unreachable under a delay less than the maximum delay constraint, and if so, re-executing S4.

[0039] In one embodiment of this application, an uncovered path leading to an uncovered destination node is added to the current growth tree using a preset Dijkstra algorithm. Specifically, this includes: using the Dijkstra algorithm to calculate the path to be added with the minimum cost from the current growth tree to each uncovered destination node; and based on the maximum delay constraint, selecting one path from each path to be added and adding it to the current growth tree to add an uncovered path to the uncovered destination node to the current growth tree.

[0040] In one embodiment of this application, the Dijkstra algorithm is used to calculate the minimum cost path to each uncovered destination node from the current growing tree. Specifically, this includes: creating a replica of the original tree; merging all nodes in the current growing tree into a virtual super node in the replica; defining each uncovered destination node in the replica as a virtual destination node and the path between each virtual destination node and the virtual super node as an uncovered virtual path; using the Dijkstra algorithm to calculate the minimum cost uncovered virtual path from the virtual super node to each virtual destination node, and determining the path to be added corresponding to each minimum cost uncovered virtual path in the current growing tree; and deleting the replica.

[0041] In one embodiment of this application, based on the maximum delay constraint, selecting one path from each path to be added to the current growth tree specifically includes: sorting each path to be added in ascending order of path cost to obtain a path sorting sequence; determining whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint; if so, adding the first path to be added to the current growth tree; if not, polling and judging other paths to be added in the path sorting sequence in the sorting order until it is determined that a path to be added can reach the corresponding uncovered destination node under a delay less than the maximum delay constraint, so as to add an uncovered path to the uncovered destination node to the current growth tree.

[0042] In one embodiment of this application, determining whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint specifically includes: starting from the first uncovered destination node, backtracking upwards along the path to the source node of the current growth tree; accumulating the transmission delay of all edges in the backtracking path to obtain the total delay from the source node to the first uncovered destination node; when the total delay is less than the maximum delay constraint, determining that the first path to be added satisfies the reachability condition.

[0043] In this embodiment, the growth process of the multicast tree is activated through a dynamic random selection mechanism. It is understood that the random selection strategy essentially achieves nondeterministic, alternating growth of the two trees using a pseudo-random number generator (such as the Mason rotation algorithm). This means that in extreme cases, a single tree may grow multiple times consecutively. An exemplary scenario is in a complex network topology where, when the main tree T1 is selected consecutively, it can preferentially occupy multiple low-cost core links, forcing the backup tree T2 to explore alternative paths. This design breaks the rigid pattern of traditional sequential growth, providing the possibility of exploring a better solution space.

[0044] Specifically, if the selected tree has covered all the destination nodes, or if the remaining nodes in the residual graph cannot meet the delay constraints (such as satellite link delay exceeding the limit), the system will immediately extract another tree to avoid ineffective growth that consumes computing resources.

[0045] Furthermore, the current tree topology is compressed into virtual supernodes (e.g., abstracting hundreds of servers in a cloud data center into a single logical entity), and Dijkstra's algorithm is applied to the replica remainder graph to find the minimum-cost path. This technique significantly reduces computational complexity from O(N^2) to O(N^2). 2 The computation time is reduced to O(N), enabling second-level path planning in networks with tens of thousands of nodes. It should be noted that during supernode compression, the compression operation is only performed on the remaining graph copy of the current tree (e.g., when T1 grows, the remaining graph of T1 is used), to avoid polluting the resource pool of other trees.

[0046] Furthermore, candidate paths are sorted in ascending order of transmission cost (e.g., prioritizing fiber optic links over satellite links), and latency is verified through backtracking (accumulating latency values ​​hop-by-hop from the destination node to the source node). In the vehicle-to-everything (V2X) scenario, when the system attempts to add a 5G base station path, if backtracking reveals that a hop passes through outdated 4G equipment causing the total latency to exceed the limit, that path is automatically abandoned and replaced with a less desirable option.

[0047] S5: Remove the edges corresponding to the uncovered paths from the remaining graph of the other multicast tree.

[0048] In one embodiment of this application, removing the edges corresponding to the uncovered path from the remaining graph of another multicast tree specifically includes: extracting all edges and associated nodes contained in the uncovered path; and deleting the topological connection relationships of all edges in the remaining graph data of another multicast tree.

[0049] Understandably, the essence of the co-tree dynamic update is to build a resource isolation wall between the two trees. When a new path is added to one tree, all physical links of that path are immediately and permanently removed from the resource pool of the other tree. It should be noted that this operation is not a simple marking of disabling, but a complete deletion of edge connections at the data structure level (such as setting the adjacency matrix to zero or removing linked list nodes), ensuring that subsequent path calculations completely avoid these links.

[0050] Specifically, the uncovered paths added in S4 are first parsed (e.g., path P containing edges {E1, E3, E7}), recording not only edge identifiers but also capturing the topological relationships of associated nodes (e.g., E1 connects to nodes AB, E3 connects to BC). In an SDN scenario, this is equivalent to capturing the match field and action instructions from the OpenFlow flow table. Then, these edges and their topological connections are precisely deleted from the cohort graph data structure of another tree. An exemplary implementation uses a graph traversal algorithm to locate the target edges, surgically removing specific connections (e.g., after adding a path in T1, deleting the corresponding fiber optic link routing table entry in the cohort graph of T2).

[0051] Understandably, this step works in atomic coordination with S4: each added path immediately triggers a co-graph update, creating an isolated environment for real-time evolution.

[0052] S6: If the first multicast tree and the second multicast tree do not contain all destination nodes, and there are uncovered destination nodes in the first multicast tree or the second multicast tree that are reachable under a delay less than the maximum delay constraint, then return to S4; otherwise, execute S7.

[0053] Understandably, the dual-tree growth status monitoring acts like a speed regulator for the algorithm engine. When specific dynamic conditions are met, it continuously drives the inner loop (returning to S4); otherwise, it switches to the optimization phase (jumping to S7). It should be noted that the concept of "reachability" here includes dual verification: 1. Topological connectivity: There exists a physical path in the residual graph leading to the uncovered destination node (e.g., an available link not removed by S5); 2. Delay feasibility: The total path delay does not exceed the maximum constraint value (e.g., in industrial IoT scenarios, the end-to-end delay is required to be ≤200ms).

[0054] Understandably, this step, together with S4 / S5, forms a self-consistent growth loop. When a satellite link in the T2 remainder is removed due to T1 occupancy (S5), but the remaining microwave link can still connect to a destination node on an island and the latency meets the standard, the system will continuously return to S4 to drive T2 growth. Conversely, if neither tree remainder has a new reachable node (e.g., an earthquake causing a complete break in submarine optical cables), it immediately jumps to S7 to output the current optimal solution. This design is particularly important in emergency communication networks. When the main tree is paralyzed due to a disaster, the algorithm can quickly determine whether the backup tree can independently cover all nodes, avoiding invalid retries.

[0055] S7: Compare the dual tree generated in this outer loop iteration with the historical best dual tree, retain the current best master-slave multicast tree, and return to S2.

[0056] In one embodiment of this application, comparing the dual-tree generated in the current outer loop iteration with the historical best dual-tree to retain the optimal master-slave multicast tree specifically includes: determining whether a historical best dual-tree exists; if not, determining the dual-tree generated in the current outer loop iteration as the current optimal master-slave multicast tree; if a historical best dual-tree exists, determining whether both the dual-tree generated in the current outer loop iteration and the historical best dual-tree contain all destination nodes; if both the dual-tree generated in the current outer loop iteration and the historical best dual-tree contain multicast trees that do not contain all destination nodes, randomly selecting one of the dual-trees generated in the current outer loop iteration or the historical best dual-tree as the current optimal master-slave multicast tree. The optimal master-slave multicast tree is determined as follows: If the current outer loop iteration generates a multicast tree that does not contain all destination nodes, and the historical best multicast tree contains all destination nodes, then the historical best multicast tree is determined as the current optimal master-slave multicast tree; if the historical best multicast tree contains a multicast tree that does not contain all destination nodes, and the current outer loop iteration generates a multicast tree that contains all destination nodes, then the current outer loop iteration generates a multicast tree as the current optimal master-slave multicast tree; if both the current outer loop iteration generates a multicast tree and the historical best multicast tree contain all destination nodes, then the total cost of the two sets of multicast trees is calculated separately, and the multicast tree with the smaller total cost is determined as the current optimal master-slave multicast tree.

[0057] Understandably, dynamic optimization decision-making continuously selects the best dual-tree combination that satisfies the principle of "prioritizing coverage integrity and secondarily prioritizing economy" within a finite number of iterations. It should be noted that "optimal" here does not refer to absolute mathematical optimality (due to the NP-hard nature of the problem), but rather to the Pareto optimal solution found through iterative exploration.

[0058] It is also understandable that this step forms an iterative optimization closed loop with S2. The retained optimal combination will be used as the comparison benchmark for the next round of the loop. At the same time, after the counter is incremented, it returns to S2 to determine the iteration termination condition.

[0059] Example 2:

[0060] The master-slave multicast tree generation algorithm consists of two loops. The outer loop iterates multiple times to obtain the optimal result. The inner loop randomly grows the two multicast trees alternately until both reach their final state.

[0061] Outer loop process as follows Figure 1 As shown:

[0062] S1: The initial two optimal multicast trees are empty, the number of outer loop iterations, the original topology graph, the multicast source node set, the destination node set, and the maximum delay constraint of the multicast tree. Each edge in the original topology graph includes the start and end nodes, cost, and transmission delay.

[0063] S2: Determine if the outer loop has completed its count. If it has, output the two optimal multicast trees.

[0064] S3: Here we define the concept of the residual graph: the multicast tree that grows from the original graph after removing some edges is a traversable graph. In each loop, two multicast trees T1 and T2 are redefined. The two multicast trees only contain the source nodes, and the traversable residual graph is the original topology graph. The remaining unreached destination nodes in the two multicast trees are all the destination nodes.

[0065] S4: A memory loop randomly selects one of two multicast trees and grows it once, adding a path to the destination node until both multicast trees reach their final state. This patent addresses an NP-hard problem where it's impossible to find the optimal result and verify the result within a deterministic time. Randomly selecting a tree for growth each time might result in a single tree growing multiple times consecutively, with each outer loop generating different trees. The final result is then selected from multiple options to find the optimal one. The algorithm does not grow a tree to its final state, remove the path, and then grow another tree. This is because continuously growing one tree might occupy the critical path of another tree, preventing the second tree from reaching all destination nodes.

[0066] S5: The extracted multicast tree grows a path to the destination node. The edges that this path passes through are removed from the covariate graph of the other multicast tree, thus completely avoiding the two multicast trees from having common edges.

[0067] S6: Determine whether the two multicast trees have reached the final state. If the set of remaining destination nodes in the multicast tree is empty, or the remaining nodes cannot be reached under the delay condition, it means that the multicast tree can no longer grow and has reached the final state.

[0068] S7: Compare with the two best multicast trees currently available. If the best one is better, it is the optimal result. The comparison method is as follows: if both trees can reach all destination nodes, it is better than if only one tree can reach them; if both trees reach all destination nodes, the one with the lower total cost is better.

[0069] The inner loop completes the generation of two multicast trees in one iteration, such as... Figure 2 As shown.

[0070] S41: If the multicast tree grows to the final state, exit. If the set of remaining destination nodes in the multicast tree is empty, or the remaining nodes cannot be reached under the delay condition, it means that the multicast tree can no longer grow and has reached the final state.

[0071] S42: Compress the current nodes in the multicast tree into a virtual supernode. The compression method is to move all edges connecting the external nodes of the multicast tree to the virtual supernode. For example... Figure 3 As shown.

[0072] S43: The path with the minimum cost from the supernode to the remaining destination nodes is calculated using Dijkstra's algorithm. After compressing a cluster of nodes or a tree into supernodes, Dijkstra's algorithm only needs to be applied once, avoiding application to every node in the cluster or tree. The costs to the remaining destination nodes are sorted in ascending order, and the sorted destination nodes are [D1, D2, ..., D...]. m ]

[0073] S44: Traverse the remaining destination nodes after sorting them by cost in ascending order. If none of the remaining destination nodes meet the delay requirement after traversing all of them, then the multicast tree can no longer grow and has reached its final state.

[0074] S45: If the current destination node being traversed is D i The supernodes output by Dijkstra's algorithm are mapped to D. i The path is denoted as Path1. The first node of Path1 is the super node, and the second node is a node that extends outward from the multicast tree. Find the node with the lowest cost to the second node of Path1 in the multicast tree, and replace the first node of Path1 with it. The resulting Path2 is the real path.

[0075] S46: Determine if the delay meets the constraint after Path2 is added to the multicast tree. Backtrack from the last node of Path2 up to the source node of the multicast tree to calculate the total delay. If the delay does not meet the constraint, try the next remaining destination node.

[0076] S47: If the newly added Path2 satisfies the delay constraint, add it to the multicast tree, i.e., the multicast tree grows once.

[0077] S48: To D i Once the path is added to the multicast tree, the destination node is removed from the set of remaining destination nodes.

[0078] Dijkstra's algorithm is a mature algorithm that can calculate the minimum cost and path from one node to all other nodes in a graph.

[0079] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a device for generating a master-slave multicast tree, the structure of which is as follows: Figure 4 As shown.

[0080] Figure 4 This is a schematic diagram of the internal structure of a primary / backup multicast tree generation device provided in an embodiment of this application. Figure 4 As shown, the device includes:

[0081] At least one processor 401;

[0082] And a memory 402 that is communicatively connected to at least one processor;

[0083] The memory 402 stores instructions executable by at least one processor, which are executed by at least one processor 201 to enable at least one processor 401 to:

[0084] S1: Define the original topology graph, source node set, destination node set, maximum delay constraint, and outer loop iteration threshold; where each edge in the original topology graph includes the start and end nodes, cost, and transmission delay; the cost is the transmission cost corresponding to a unit of transmitted data;

[0085] S2: Determine whether the number of iterations of the outer loop has reached the threshold of the number of iterations of the outer loop. If it has, output the optimal master-slave multicast tree. If it has not, execute S3.

[0086] S3: Create a first multicast tree and a second multicast tree containing only the source node, and initialize the remaining graphs of the first multicast tree and the second multicast tree to the original topology graph;

[0087] S4: Randomly select one of the first or second multicast trees as the current growth tree, and add an uncovered path to the uncovered destination node to the current growth tree using the preset Dijkstra algorithm.

[0088] S5: Remove the edges corresponding to the uncovered paths from the remaining graph of the other multicast tree;

[0089] S6: If the first multicast tree and the second multicast tree do not contain all destination nodes, and there are uncovered destination nodes in the first multicast tree or the second multicast tree that are reachable under a delay less than the maximum delay constraint, then return to S4; otherwise, execute S7.

[0090] S7: Compare the dual tree generated in this outer loop iteration with the historical best dual tree, retain the current best master-slave multicast tree, and return to S2.

[0091] Some embodiments of this application provide corresponding to Figure 1 A non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0092] S1: Define the original topology graph, source node set, destination node set, maximum delay constraint, and outer loop iteration threshold; where each edge in the original topology graph includes the start and end nodes, cost, and transmission delay; the cost is the transmission cost corresponding to a unit of transmitted data;

[0093] S2: Determine whether the number of iterations of the outer loop has reached the threshold of the number of iterations of the outer loop. If it has, output the optimal master-slave multicast tree. If it has not, execute S3.

[0094] S3: Create a first multicast tree and a second multicast tree containing only the source node, and initialize the remaining graphs of the first multicast tree and the second multicast tree to the original topology graph;

[0095] S4: Randomly select one of the first or second multicast trees as the current growth tree, and add an uncovered path to the uncovered destination node to the current growth tree using the preset Dijkstra algorithm.

[0096] S5: Remove the edges corresponding to the uncovered paths from the remaining graph of the other multicast tree;

[0097] S6: If the first multicast tree and the second multicast tree do not contain all destination nodes, and there are uncovered destination nodes in the first multicast tree or the second multicast tree that are reachable under a delay less than the maximum delay constraint, then return to S4; otherwise, execute S7.

[0098] S7: Compare the dual tree generated in this outer loop iteration with the historical best dual tree, retain the current best master-slave multicast tree, and return to S2.

[0099] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for IoT devices and media are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0100] The systems, media, and methods provided in this application are one-to-one correspondences. Therefore, the systems and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be repeated here.

[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0106] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0107] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0108] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0109] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating a master-slave multicast tree, characterized in that, The method includes: S1: Define the original topology graph, source node set, destination node set, maximum delay constraint, and outer loop iteration threshold; wherein, each edge in the original topology graph includes the start and end nodes, cost, and transmission delay; the cost is the transmission cost corresponding to a unit of transmitted data; S2: Determine whether the number of outer loop iterations has reached the threshold of the number of outer loop iterations. If it has, output the optimal master-slave multicast tree. If it has not, execute S3. S3: Create a first multicast tree and a second multicast tree containing only the source node, and initialize the residual graph of the first multicast tree and the second multicast tree as the original topology graph; S4: Randomly select one of the first multicast tree or the second multicast tree as the current growth tree, and add an uncovered path to the uncovered destination node to the current growth tree using the preset Dijkstra algorithm. S5: Remove the edge corresponding to the uncovered path from the remaining graph corresponding to the other multicast tree; S6: If the first multicast tree and the second multicast tree do not contain all destination nodes, and there are uncovered destination nodes in the first multicast tree or the second multicast tree that are reachable under a delay less than the maximum delay constraint, then return to S4; otherwise, execute S7. S7: Compare the dual tree generated in this outer loop iteration with the historical best dual tree, retain the current best master-slave multicast tree, and return to S2.

2. The method for generating a master-slave multicast tree according to claim 1, characterized in that, Before adding an uncovered path to the uncovered destination node to the current growing tree using a preset Dijkstra algorithm, the method further includes: Determine whether the current growth tree contains all destination nodes; if so, re-execute S4; and, Determine whether all uncovered destination nodes in the current growth tree are unreachable under a delay less than the maximum delay constraint. If so, re-execute S4.

3. The method for generating a master-slave multicast tree according to claim 1, characterized in that, Using a pre-defined Dijkstra algorithm, an uncovered path is added to the current growing tree to reach the uncovered destination node, specifically including: Using the Dijkstra algorithm, calculate the path to be added that has the minimum cost from the current growing tree to each uncovered destination node; Based on the maximum delay constraint, one path is selected from each path to be added and added to the current growth tree, so as to add an uncovered path to the uncovered destination node to the current growth tree.

4. The method for generating a master-slave multicast tree according to claim 3, characterized in that, Using the Dijkstra algorithm, the path to be added from the current growing tree to each uncovered destination node with the minimum cost is calculated, specifically including: Create a replica of the original graph corresponding to the original graph. In the replica of the original graph, merge all nodes contained in the current growth tree into a virtual super node, and define each uncovered destination node in the replica of the original graph as a virtual destination node and the path between each virtual destination node and the virtual super node as an uncovered virtual path. Using the Dijkstra algorithm, calculate the uncovered virtual path with the minimum cost from the virtual super node to each virtual destination node, and determine the path to be added corresponding to each uncovered virtual path with the minimum cost in the current growing tree; Delete the duplicate image.

5. The method for generating a master-slave multicast tree according to claim 3, characterized in that, Based on the maximum delay constraint, one path is selected from each path to be added and added to the current growth tree, specifically including: Based on the ascending order of path cost, sort the paths to be added to obtain the path sorting sequence; Determine whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint. If so, add the first path to be added to the current growth tree. If not, poll the other paths to be added in the path sorting sequence in sorting order until a path to be added is determined that can reach the corresponding uncovered destination node under a delay less than the maximum delay constraint, so as to add an uncovered path to the uncovered destination node to the current growth tree.

6. The method for generating a master-slave multicast tree according to claim 5, characterized in that, Determining whether the first path to be added in the path sorting sequence can reach the corresponding first uncovered destination node under a delay less than the maximum delay constraint specifically includes: Starting from the first uncovered destination node, trace back up the path to the source node of the current growing tree; Accumulate the transmission delay of all edges in the backtracking path to obtain the total delay from the source node to the first uncovered destination node; When the total delay is less than the maximum delay constraint, the first path to be added is determined to meet the reachability condition.

7. The method for generating a master-slave multicast tree according to claim 1, characterized in that, Removing the edges corresponding to the uncovered paths from the remaining graph of the other multicast tree specifically includes: Extract all edges and associated nodes contained in the uncovered path; Remove the topological connections of all edges from the residual graph data of another multicast tree.

8. The method for generating a master-slave multicast tree according to claim 1, characterized in that, The dual-tree generated in this outer loop iteration is compared with the historical best dual-tree to retain the optimal master-slave multicast tree, specifically including: Determine if the historically optimal dual tree exists. If it does not exist, determine that the dual tree generated in this outer loop iteration is the current optimal master-slave multicast tree. If the historical best double tree exists, determine whether the double tree generated in the current outer loop iteration and the historical best double tree both contain all the target nodes; If both the dual tree generated in the current outer loop iteration and the historical best dual tree contain a multicast tree that does not contain all the destination nodes, randomly select one of the dual trees generated in the current outer loop iteration or the historical best dual tree as the current best master-slave multicast tree. If the dual tree generated in the current outer loop iteration contains a multicast tree that does not include all destination nodes and the historical best dual tree contains all destination nodes, then the historical best dual tree is determined to be the current best master-slave multicast tree. If there exists a multicast tree in the historical best dual tree that does not contain all destination nodes and the dual tree generated in the current outer loop iteration contains all destination nodes, then the dual tree generated in the current outer loop iteration is determined to be the current best master-slave multicast tree. If both the dual tree generated in the current outer loop iteration and the historical best dual tree contain all the target nodes, then the total cost of the two sets of multicast trees is calculated respectively, and the multicast tree with the smaller total cost is determined as the current best master-slave multicast tree.

9. A device for generating a master-slave multicast tree, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a method for generating a master-slave multicast tree as described in any one of claims 1-8.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement a method for generating a master-slave multicast tree as described in any one of claims 1-8.