Broadcasting method, device, electronic device and storage medium
By pre-storing the correspondence between broadcast instructions and algorithms in the higher-order network topology structure, determining the target broadcast algorithm and optimizing the routing path, the deadlock problem caused by multicast and broadcast routing algorithms in higher-order networks is solved, and network performance and scalability are improved.
Patent Information
- Application Number
- CN202210509164.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-05-10
AI Technical Summary
In advanced network topology, multicast and broadcast routing algorithms tend to cause absorption channels to be deadlocked, and existing methods increase the number of virtual channels to avoid excessive cost in deadlock configurations.
A broadcasting method is provided, by pre-storing the correspondence between broadcast instructions and broadcast algorithms, determining the target broadcasting algorithm based on the acquired data packets, and broadcasting in a higher-order network topology, including algorithms such as group-first one-pair full broadcast, router-first one-pair full broadcast, message merging, and private full broadcast, to optimize the routing path to avoid deadlocks.
It effectively avoids deadlock problems in high-order network topology, while reducing the demand for virtual channels, improving network performance and scalability.
Smart Images

Figure CN115987702B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a broadcasting method, device, electronic device and storage medium. Background Art
[0002] An important issue in the design of multicast and broadcast routing algorithms is to avoid deadlock in the consumption channel. Figure 1 A schematic diagram of a multicast or broadcast message proposed in the related art, such as Figure 1 As shown, where R0, R1, ..., R m-1 The routers in the same router group now have multicast or broadcast messages M0, M1, M2 and M3. And the destination nodes of these four routing messages are all routers R0, R1, ..., R in the group. m-1 , the source nodes of these four routing messages do not belong to the group. Assume that the absorption channel in the network has two virtual channels. At a certain moment, routing message M0 reserves the absorption channel of R0 and R1, and waits for the application of R2, R3, ... R m-1 The absorption channel of the routing message M1 reserves R i ,R i+1 ,…,R m-1 The absorption channel is waiting for application R0, R1, ..., R i-1 The routing message M2 reserves R0, R1, ..., R i Absorption channel, waiting to apply for R i+1 ,...,R m-1 The routing message M3 reserves the R0 and R m-1 The absorption channel waits for R1, R2, ..., R m-2These four routing messages form a circular wait relationship, severely consuming network resources. This deadlock configuration is relatively easy to resolve in low-order topologies. Assume that the number of virtual channels required by the network routing algorithm is v and the number of input ports on the router is k. A simple way to avoid this deadlock is to increase the number of virtual channels of the physical channel to v﹒k. This method is a popular solution in low-order networks because the number of virtual channels required is limited. Consider a 2D-mesh network. If the xy protocol is used as the baseline routing algorithm, the number of physical channels only needs to be increased to four virtual channels to avoid this deadlock configuration; if the Duato protocol is used as the baseline routing algorithm, the number of physical channels needs to be increased to eight virtual channels. Consider a two-dimensional torus network. If the xy protocol is used as the baseline routing algorithm, the number of virtual channels of the absorbing channel only needs to be increased to eight virtual channels; if the Duato protocol is used as the baseline routing algorithm, the number of virtual channels of the absorbing channel needs to be increased to 12 virtual channels. If this method is used in a high-order network to avoid deadlock of the absorbing channel, the number of virtual channels required will be very large, which increases the cost of constructing the high-order network topology. Summary of the Invention
[0003] In response to the above problems, the present application provides a broadcasting method, apparatus, electronic device and storage medium.
[0004] The present application provides a broadcast method, which is applied to a high-order network topology structure, wherein the high-order network topology structure includes: multiple router groups, at least one connection between any two router groups, and at least one connection between any two routers in any router group. The method includes:
[0005] determining a broadcast instruction based on the acquired data packet;
[0006] determining a target broadcast algorithm based on the broadcast instruction and a pre-stored correspondence between the broadcast instruction and the broadcast algorithm;
[0007] The data packet is broadcast in the high-order network topology based on the target broadcast algorithm.
[0008] In some embodiments, the broadcast instruction includes: a group-priority-one-to-all all-to-all broadcast instruction, and the broadcast algorithm corresponding to the group-priority-one-to-all all-to-all broadcast instruction includes:
[0009] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0010] For each router r∈G, call deliver(r,G) to deliver the data packet from r to all router groups in G;
[0011] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) by v i Multicast the message to D i All routers in , where v i Receive the data packet sent from r.
[0012] In some embodiments, calling deliver(r,G) to deliver a packet from r to all routers in G includes:
[0013] Determine the number of all router groups in G;
[0014] When the number of all router groups in G is greater than 2, G is divided into two subsets of the same size G' and G";
[0015] If r is in the low-numbered router group subset G', transmit the message from r to the lowest-numbered router group c1 in G"; call deliver(r,G') on r and call deliver(c1,G") on c1;
[0016] If r is in the high-numbered router group subset G', transmit the message from r to the highest-numbered router group c1 in G'; call deliver(c1,G') at c1, and call deliver(r,G') at r.
[0017] In some embodiments, the call forward(v i ,D i ) by v i Multicast the message to D i All routers in the, including:
[0018] Determine D i The number of routers in the
[0019] In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2;
[0020] If vi is in the low-numbered subset D1, transmit the message of vi to the lowest-numbered router v2 in the high-numbered subset D2; call forward(v2,D2) on v2, and call forward(vi,D1) on vi;
[0021] If vi is in D2, this transmits the message for vi to the highest-numbered router v1 in D1; calls forward(v1,D1) at v1 and forward(vi,D2) at vi.
[0022] In some embodiments, the broadcast instruction includes: a router-first-one-to-all broadcast instruction, and the broadcast algorithm corresponding to the router-first-one-to-all broadcast instruction includes:
[0023] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0024] For any router r∈G s , router group G s ∈G,G s The router set is D i , call forward(r, G s ) transmits the message of router r to G s All routers in;
[0025] For any router R in the network v , calling urouter(R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it;
[0026] For any router R v’ ∈G j , router group G j ∈G calls forward(R v’ ,G j ) Each group of R v’ The received g·m messages are multicast to all other routers in the router group.
[0027] In some embodiments, the calling urouter (R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it, including:
[0028] Determine D i The number of routers in the
[0029] In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2, Among them, D1 contains g / 2 routers with small labels, and D2 contains g / 2 routers with large labels;
[0030] In Rv Call urouter(R v ,D1) and call urouter(c2,D2-{c2}) at c2, where c2 is the router with the smallest label in D2.
[0031] In some embodiments, the broadcast instruction includes: an all-to-all broadcast instruction of message merging, and the broadcast algorithm corresponding to the all-to-all broadcast instruction of message merging includes:
[0032] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0033] For every router r∈G i , G i ∈G, call collect(r,G i ) Transmit message r to router group G i Each router in;
[0034] For each router group G i , G i The router group includes Router D i , call scatter(r,D i ) The messages collected in the selected router r are distributed to G i Each router in;
[0035] For any router r in the high-order network topology, call urouter(r,G) to transmit the m messages of router r to the group of g=m / 2 routers in G that are directly connected to r;
[0036] For any router r in the high-order network topology, r∈G j , G j ∈G, transmit the m messages received by r to G j All other routers in the
[0037] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction with group priority and one-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction with group priority and one-to-all broadcast includes:
[0038] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0039] For each router r∈G, call deliver(r,G) to transmit (g·m+1)·(m-1) packets from r to all router groups in G, where m·g·m packets are transmitted to routers in other groups in the higher-order network topology, and m packets are transmitted to m routers in the same group including r. In the first unicast step, router r transmits m·g·m / 2 packets to the first router group, and the routers in the first router group recursively distribute the packets to |G| / 2 router groups. In the second routing step, router r transmits m·g·m / 4 packets to the second router group, and the routers in the second router group recursively distribute the packets to |G| / 4 router groups. Repeat the above steps until each router group receives m packets, and the m packets in each router group are distributed to the m routers in the router group. Router r recursively distributes m-1 packets to other m-1 routers in the same group.
[0040] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) Send the message from v i Multicast the data packet to D i All routers in , where v i Receive m data packets sent from r.
[0041] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction with group priority and one-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction with group priority and one-to-all broadcast includes:
[0042] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0043] For any router r∈G s , G s ∈G, call forward(r, G s ) distributes the (m·g+1)·(m-1) messages of router r along the multicast tree of router r to the router group G where router r is located s All routers in:
[0044] In the first routing step, m·m·g / 2+m / 2 packets are transmitted from r to R m / 2 , (m-1)·m·g / 2+m / 2 data packets are transmitted from r to R m / 2-1The router that receives the data packet in the first routing step recursively transmits the data packet to the next m / 2 routers, and each router receives m·g / 2+1 data packets;
[0045] In the second routing step, routers r and R m / 2 Simultaneously send m·m·g / 4+m / 4 data packets to R m / 4 and R 3m / 4 ; Repeat the above routing steps until each router receives m·g+1 data packets;
[0046] For any router R in the high-order network topology v , calling urouter(R v ,D) R v The m·m·g messages in the group are multicast to g routers in the group of other routers directly connected to it;
[0047] For any router R v’ ∈G j , call forward(R v’ ,G j ) Each router R v’ The received m·m messages are distributed to all other routers in the router group.
[0048] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast algorithm instruction for data packet merging, and the broadcast algorithm corresponding to the private all-to-all broadcast algorithm instruction for data packet merging includes:
[0049] For each router group G in the network i , r∈G i ,r is selected, call collect(r,G i ) collect m in r 3 g+(m-1) m messages;
[0050] Call scatter(r,D i ) Publish the message of router r to router group G i In each router, each router receives m 2 g+(m-1) messages, m 2 ·g messages by G i The m-1 messages are transmitted from the external router. i The messages delivered to the router r by other m-1 routers;
[0051] Call urouter(r,G) to convert m in r 2 g data packets are transmitted to G through g global channels iAn additional router;
[0052] For each router r in the high-order network topology, r∈G i , each router group received by r 2 The messages are distributed to m routers, and each router receives m messages.
[0053] An embodiment of the present application provides a broadcast device, which is applied to a high-order network topology structure. The high-order network topology structure includes: multiple router groups, at least one connection between any two router groups, and at least one connection between any two routers in any router group, including:
[0054] A first determining module, configured to determine a broadcast instruction based on the acquired data packet;
[0055] a second determining module, configured to determine a target broadcast algorithm based on the broadcast instruction and a pre-stored correspondence between the broadcast instruction and the broadcast algorithm;
[0056] A broadcast module is used to broadcast the data packet in the high-order network topology structure based on the target broadcast algorithm.
[0057] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned broadcasting method is executed.
[0058] An embodiment of the present application provides a storage medium, which stores a computer program that can be executed by one or more processors and can be used to implement the above-mentioned broadcasting method.
[0059] The present application provides a broadcast method, device, electronic device and storage medium, which pre-store the correspondence between broadcast instructions and broadcast algorithms, and execute the corresponding broadcast algorithm after receiving the broadcast instruction to achieve broadcasting in a high-order network topology structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Hereinafter, the present application will be described in more detail based on embodiments with reference to the accompanying drawings.
[0061] Figure 1 A schematic diagram of a multicast or broadcast message proposed in the related art;
[0062] Figure 2 A schematic diagram of the overall architecture of a dragonfly network provided in an embodiment of the present application;
[0063] Figure 3 An example diagram of a network topology provided in an embodiment of the present application;
[0064] Figure 4 A schematic diagram of an implementation flow of a broadcasting method provided in an embodiment of the present application;
[0065] Figure 5 A schematic diagram of a group-first, one-to-all, all-to-all broadcast provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of RFA2A broadcasting provided in an embodiment of the present application;
[0067] Figure 7 A schematic diagram of an A2A broadcast provided in an embodiment of the present application;
[0068] Figure 8 A schematic diagram of the A2A all-to-all broadcast algorithm is given;
[0069] Figure 9 A schematic diagram of the implementation flow of a PA2A algorithm provided in an embodiment of the present application;
[0070] Figure 10 A schematic diagram of the implementation flow of a PA2A algorithm provided in an embodiment of the present application;
[0071] Figure 11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0072] In the drawings, like components are given like reference numerals, and the drawings are not drawn to scale. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0074] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0075] If similar descriptions of "first\second\third" appear in the application documents, the following explanation will be added. In the following description, the terms "first\second\third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0077] Based on the problems existing in the related art, an embodiment of the present application provides a broadcast method, which is applied to a high-order network topology structure. The high-order network topology structure can be a dragonfly network, which includes routers, router groups and interconnected networks. Figure 2 A schematic diagram of the overall architecture of a dragonfly network provided in an embodiment of the present application is shown as follows: Figure 2 As shown, at the lowest level, each router has three different types of connections: (1) connections to p terminals, (2) connections to m-1 local channels with routers in the same group, and (3) connections to g global channels with routers in other groups. Therefore, the degree of each router is k=p+g+m-1. A router group contains m routers, which are interconnected through local channels. Each group has m﹒p terminal ports and m﹒g global ports, so each router group can be viewed as a virtual router with dimension k'=m﹒(p+g). For example, n=m﹒g+1 groups can be connected by global paths of length 1, which is the number of router groups.
[0078] In a maximum dragonfly network, N = m﹒ p﹒ (m﹒g+1) represents the total number of processors, and there is only one global link between every two groups of routers. The parameters m, p, and g in a dragonfly network can take arbitrary values. However, to balance channel load, the network parameters should be configured such that m = 2p = 2g. This is because every packet passing through two local channels along its routing path must pass through a global channel and a terminal channel, maintaining a balanced load. Because global channels are costly, to keep global channels fully loaded, a balanced dragonfly network should maintain m ≥ 2g and p ≥ g.
[0079] By increasing the effective dimensionality, the dragonfly network is highly scalable. For example, using a 64-port switch chip, the network topology can be expanded to contain 256K nodes with a network diameter of only 3 hops. In comparison, a 2D flat butterfly network can be expanded to approximately 10K nodes using 64-dimensional routers, and a 3D flat butterfly network can only be expanded to 64K nodes. The intra-group and inter-group networks in the dragonfly network can use arbitrary interconnection network structures. A simple example of a dragonfly network is Figure 3 As shown in the figure, p=g=2, m=4, and k=7-dimensional routers are used to expand the network to 72 nodes. The intra-group network adopts a 1D fully connected network.
[0080] In the embodiment of the present application, in order to facilitate the description of the topological structure, some basic variables of the topological structure are explained. The basic component unit of the topological structure is the router. The routers are grouped. Assume that there are m routers in each router group, which are numbered R0, R1, ..., R m-1 , the network is divided into n groups G0, G1, …, G n-1 In order to reduce the diameter of the network topology, the routers in the group adopt a fully connected strategy, and there is a connection between any two routers in the group.
[0081] There is a connection between any two router groups, but the connection ultimately needs to be connected through the router's port, so the connection between router groups is relatively complex, so there is a certain amount of room for optimization. Therefore, the embodiment of the present application proposes a connection strategy between router groups. This connection strategy minimizes the number of connections in the routing path that do not comply with the negative priority routing rule, making negative priority routing very efficient in this customized network. The detailed connection rules are described as follows:
[0082] Rule 1: For index i from 0 to n-2, G i Router R in the group m-1 , and G i+1 The routers R0 in the group are connected through the global channel, and the router groups are connected at the end;
[0083] Rule 2: For index i from 0 to n-3, j from i+2 to n-1, G i R within the group v Connect to G j R within the group v’ ,in v It's G i The router number of the highest available port in the group. v’ It's G j The lowest available port in the group
[0084] ;
[0085] Rule 2 v , v’ The rules can be further refined, and the router number can be obtained by calculation. The calculation method can be obtained by formula (1) and formula (2). The g in the formula represents the number of global ports used for global connection in the network topology router. The i in formula (1) indicates G i The router group G0, G1, ..., G has been connected from the low-availability port i-1 Through i global ports. j Before connecting, the same G iAlready connected to router group G from the highest available port i+1 ,G i+2 ,…,G j-1 Through ji-1 global ports. Formula (2) represents G j The router group has connected router groups G0, G1,…, G from the lowest available port. i-1 Through i global ports. According to the above rules, the connection of a network topology can be determined. In order to more intuitively demonstrate the concept of network topology, here is a specific topology example. Here we assume a relatively small network scale, including 9 groups of routers, each group of routers contains 4 routers, and each router has 2 global ports, and n=9, m=4, g=2, Figure 3 This is a network topology example diagram provided in an embodiment of the present application. The network topology connection is as follows: Figure 3 shown.
[0086] This topology employs a very simple approach for both intra-group and inter-group connectivity. Full connectivity is employed within and between groups, ensuring that only one global channel exists between any two groups. This ensures a very small network diameter. The shortest distance between any two points requires at most two local connections and one global connection, or three hops. While global channels have higher latency than local channels in lower-order topologies, the significant reduction in hops improves network performance. In low-order networks, whether mesh or ring networks, the diameter of the topology is related to the number of nodes. This network diameter indicates an increase in the average number of network hops required to route a message. When the network size is very large, the proposed network topology, which is independent of the number of network hops, can achieve excellent performance.
[0087] The embodiments of the present application provide a broadcast method, which is applied to electronic devices, such as computers, mobile terminal switches, routers, etc. The functions implemented by the broadcast method provided in the embodiments of the present application can be implemented by a processor of the electronic device calling a program code, wherein the program code can be stored in a computer storage medium.
[0088] The embodiment of the present application provides a broadcasting method, Figure 4 A schematic diagram of the implementation flow of a broadcast method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, including:
[0089] Step S101: determining a broadcast instruction based on the acquired data packet.
[0090] In an embodiment of the present application, the data packet can be parsed to determine the header information of the data packet, and the broadcast instruction can be determined based on the header information.
[0091] Step S102, determining a target broadcast algorithm based on the correspondence between the broadcast instruction and pre-stored broadcast instructions and broadcast algorithms;
[0092] In an embodiment of the present application, the broadcast algorithm may include: group-first, router-first, all-to-all broadcast GFA2A based on group-first, all-to-all broadcast RFA2A based on router-first, all-to-all broadcast A2A based on data packet merging, (6) private all-to-all broadcast GPA2A based on group-first, private all-to-all broadcast RPA2A based on router-first, and private all-to-all broadcast (PA2A) based on data packet merging.
[0093] Step S103: broadcasting the data packet in the high-order network topology structure based on the target broadcast algorithm.
[0094] In the embodiment of the present application, after the target broadcast algorithm is determined, the data packet can be broadcast in the high-order network topology structure based on the target broadcast algorithm.
[0095] The present application provides a broadcast method that pre-stores the correspondence between broadcast instructions and broadcast algorithms, and executes the corresponding broadcast algorithm after receiving the broadcast instruction to achieve broadcasting in a high-order network topology structure.
[0096] In some embodiments, the broadcast instruction includes a group-priority, one-to-all, all-to-all broadcast instruction. The broadcast algorithm (GPA2A) corresponding to the group-priority, one-to-all, all-to-all broadcast instruction is considered to be two separate steps: the first is a group-level step, and the second is a router-level step. In the group-level step, the source node routing sends the source router message to all router groups via a global channel according to certain rules. At the same time, the router-level step is that the router within the router group sends the received routing message to all routers in the group. The GPA2A broadcast strategy prioritizes the group-level routing strategy, so the source node routing first sends the routing message to all router groups via a global channel according to certain rules. Then, each router group performs intra-group broadcast routing.
[0097] The broadcast algorithms corresponding to the group-first one-to-all all-to-all broadcast instructions include:
[0098] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0099] For each router r∈G, call deliver(r,G) to deliver the data packet from r to all router groups in G;
[0100] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) by v i Multicast the message to D i All routers in , where v i Receive the data packet sent from r.
[0101] In the embodiment of the present application, calling deliver(r,G) to transmit a data packet from r to all router groups in G includes:
[0102] Determine the number of all router groups in G;
[0103] When the number of all router groups in G is greater than 2, G is divided into two subsets of the same size G' and G";
[0104] If r is in the low-numbered router group subset G', transmit the message from r to the lowest-numbered router group c1 in G"; call deliver(r,G') on r and call deliver(c1,G") on c1;
[0105] If r is in the high-numbered router group subset G', transmit the message from r to the highest-numbered router group c1 in G'; call deliver(c1,G') at c1, and call deliver(r,G') at r.
[0106] In the embodiment of the present application, if |G|=2, the message is transmitted to another router group; then exit.
[0107] In some embodiments, the call forward(v i ,D i ) by v i Multicast the message to D i All routers in the, including:
[0108] Determine D i The number of routers in the
[0109] In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2;
[0110] If vi is in the low-numbered subset D1, transmit the message of vi to the lowest-numbered router v2 in the high-numbered subset D2; call forward(v2,D2) on v2, and call forward(vi,D1) on vi;
[0111] If vi is in D2, this forwards vi's message to the highest-numbered router v1 in D1; calls forward(v1,D1) on v1, and calls forward(vi,D2) on vi.
[0112] In D i If the number of routers in is equal to 2, the message is transmitted from v1 to another router.
[0113] In the embodiment of the present application, the intra-group broadcast algorithm in the group-priority broadcast routing also uses a recursive form to broadcast a router in the group that receives the routing message to other routers in the group, which takes a local channel delay of log(m), where m is the number of routers in the group.
[0114] Figure 5 A schematic diagram of a group-first one-to-all all-to-all broadcast provided in an embodiment of the present application is shown as follows: Figure 5 As shown, Figure 5 In (a), a pair of full broadcasts with the original router being R1(G5) router group priority is given. Figure 5 (b) shows the multicast tree of inter-group messages. Four global channel unicast operations need to be performed sequentially to transmit the message of the source node to all router groups. Figure 5 (c) shows the situation where each router group receives the data packet and then multicasts it within the group.
[0115] In some embodiments, the broadcast instruction includes: a router-first-to-all broadcast instruction, and the broadcast algorithm (RFA2A) corresponding to the router-first-to-all broadcast instruction is considered to be three steps: (1) first, the source node router group multicasts the data packet to all routers in the group; (2) all routers in the original router group multicast the data packet to all router groups connected to it; (3) the router that receives the broadcast message performs multicast within the group, thus finally completing the broadcast operation. The broadcast algorithm corresponding to the router-first-to-all broadcast instruction takes into account the large delay of the message passing through the all-pass channel. The first stage of the inter-group broadcast in the router group priority broadcast routing algorithm requires log(n) times the global channel delay time, where n is the number of router groups in the topology structure. The router-first broadcast algorithm reduces the delay time of using the global channel, making the use of the global channel more balanced. Router-first broadcast requires 2log(m)+log(g)=log(m 3 / 2) unicast steps, while the router group priority broadcast algorithm requires
[0116] log(n)+log(m)=log(m·g / 2+1)·m =log(m 3 / 2)
[0117] The two are exactly the same. However, the latter requires log(n) global channel routing steps, which is obviously not as good as router-priority broadcast.
[0118] The router prioritizes the broadcast algorithm corresponding to the full broadcast instruction, including:
[0119] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0120] For any router r∈G s , router group G s ∈G,G s The router set is D i , call forward(r, G s ) transmits the message of router r to G s All routers in;
[0121] For any router R in the network v , calling urouter(R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it;
[0122] For any router R v’ ∈G j , router group G j ∈G calls forward(R v’ ,G j ) Each group of R v’ The received g·m messages are multicast to all other routers in the router group.
[0123] In the embodiment of the present application, urouter (R v ,D) is the source router group of each router to all router groups broadcast, the call urouter (R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it, including:
[0124] Determine D i The number of routers in the
[0125] In D iIf the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2, Among them, D1 contains g / 2 routers with small labels, and D2 contains g / 2 routers with large labels;
[0126] In R v Call urouter(R v ,D1) and call urouter(c2,D2-{c2}) in c2, where c2 is the router with the smallest label in D2;
[0127] If |D|=1, R v The message is transmitted to the only target node through the MFR path.
[0128] In the embodiment of this application, Figure 6 A broadcast diagram of RFA2A provided in an embodiment of the present application is shown as follows: Figure 6 As shown, in actual practice, there are three situations, such as Figure 6 As shown in (a), the target router set D is all on the left side of the source router, and the labels are all smaller than the source router; Figure 6 As shown in (b), the target router set D is all to the right of the source router, and the labels are all larger than the source router; Figure 6 As shown in (c), the target router set D is located on both sides of the source router. Figure 6 The actual unicast steps of the group broadcast phase are shown in a real network topology with g=4. Figure 5 In (a), (b), and (c), respectively, the set D labels are all smaller than the source router, the set D labels are all larger than the source router, and the set D is distributed on both sides of the source router. The required delay is the global channel delay of log(g)+1. Here, there are three routing steps. Compared with group-priority broadcast routing, the delay of the inter-group broadcast stage is greatly reduced.
[0129] In some embodiments, the broadcast instruction includes: an all-to-all broadcast instruction of message merging, and the broadcast algorithm (A2A) corresponding to the all-to-all broadcast instruction of message merging includes:
[0130] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0131] For every router r∈G i , G i ∈G, call collect(r,G i ) Transmit message r to router group G i Each router in;
[0132] For each router group G i , G i The router group includes Router D i , call scatter(r,D i ) The messages collected in the selected router r are distributed to G i Each router in;
[0133] For any router r in the high-order network topology, call urouter(r,G) to transmit the m messages of router r to the group of g=m / 2 routers in G that are directly connected to r;
[0134] For any router r in the high-order network topology, r∈G j , G j ∈G, transmit the m messages received by r to G j All other routers in the
[0135] In the embodiment of the present application, the all-to-all broadcast algorithm A2A based on packet merging consists of four independent stages: (1) collecting packets within the original router group and transmitting all packets from all routers in the router group to a selected multicast tree root, (2) distributing the packets collected in the first stage from the tree root to all routers in the group, (3) each router multicasts m packets to g routers in other directly connected router groups, and (4) each router receives a total of g·m packets and packages each m group of packets and multicasts them to m routers in the same group.
[0136] Assume that a router group contains m routers, and the routers in the group include R0, R1, R2, R3, …, R m-2 , R m-1 In the data packet collection phase, all data packets of the group are transmitted to the selected root node. Assume that R0 is selected as the root node. In the first unicast step, R1, R3, …, R m-1 (Assume m is an even number) Send data packets to R0, R2, …, R m-2 In the second unicast step, R2, R6,…, (assuming m is an even number) transmit two packets to R0, R4,…, respectively. Repeat the above operation until the log(m)th unicast step, router R m / 2 Transmit m / 2 data packets to R0.
[0137] Figure 7 A schematic diagram of an A2A broadcast provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, in Figure 7(a) shows the process of collecting data packets for a router group with 8 routers. Each arc with an arrow is marked with two numbers a(b), where a and b represent the routing steps and the number of data packets respectively. Figure 7 As shown in (a), in the first unicast step, routers R1, R3, R5, and R7 transmit one packet to R0, R2, R4, and R6 respectively. In the second routing step, R2 and R6 transmit two packets to R0 and R4 respectively. In the third routing step, router R4 transmits four packets to R0. After the packets from all routers are collected at R0, the packet distribution process (scattering) is started: In the first unicast cycle, router R0 transmits m / 2 packets to R m / 2 ; In the second unicast cycle, R0, R m / 2 Transmit 3m / 4 data packets to R respectively m / 4 and R 3m / 4 ; Repeat the above operation until the log(m)th unicast step, R0, R2, ..., R m-2 Transmit m-1 data packets to R1, R3,…, R respectively m-1 .
[0138] exist Figure 7 (b) shows the message distribution process of a router group containing 8 routers. In the first unicast step, R0 transmits 4 data packets to R4; in unicast step 2, R0 and R4 transmit 6 data packets to R2 and R6 respectively; in unicast step 3, routers R0, R2, R4 and R6 transmit 7 data packets to R1, R3, R5 and R7 respectively. Each router will receive a total of g·m data packets transmitted from the external router group, and each group will receive m data packets. Each time m data packets are received, they are multicast intact to all other routers in the router group. This process requires log(m) steps, and each step transmits the m data packets. Figure 7 As shown in (c), assume that router R0 receives eight packets from another router group. In the first unicast step, router R0 transmits eight packets to R4. In the second unicast step, routers R0 and R4 transmit eight packets to R2 and R6, respectively. In the third unicast step, routers R0, R2, R4, and R6 transmit eight packets to R1, R3, R5, and R7, respectively.
[0139] Figure 8 A schematic diagram of the A2A all-to-all broadcast algorithm in which any router transmits a data packet to another router group is given. Figure 8In (a), (b), and (c), respectively, data packets are transmitted from one router to other router groups. The labels of the target router groups are all lower than those of the source router groups. The labels of the target router groups are all higher than those of the meta-router groups. Half of the router groups have labels lower than the meta-router groups, and the labels of the general router groups are higher than those of the source router groups.
[0140] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction of group-priority one-to-all broadcast, and the broadcast algorithm (GPA2A) corresponding to the private all-to-all broadcast instruction of group-priority one-to-all broadcast includes:
[0141] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0142] For each router r∈G, call deliver(r,G) to transmit (g·m+1)·(m-1) packets from r to all router groups in G, where m·g·m packets are transmitted to routers in other groups in the higher-order network topology, and m packets are transmitted to m routers in the same group including r. In the first unicast step, router r transmits m·g·m / 2 packets to the first router group, and the routers in the first router group recursively distribute the packets to |G| / 2 router groups. In the second routing step, router r transmits m·g·m / 4 packets to the second router group, and the routers in the second router group recursively distribute the packets to |G| / 4 router groups. Repeat the above steps until each router group receives m packets, and the m packets in each router group are distributed to the m routers in the router group. Router r recursively distributes m-1 packets to other m-1 routers in the same group.
[0143] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) Send the message from v i Multicast the data packet to D i All routers in , where v i Receive m data packets sent from r.
[0144] In an embodiment of the present application, each router transmits a different data packet to all other routers in the network in a private all-to-all broadcast. In the GPA2A private all-to-all broadcast, each router transmits g·m·m +(m-1) data packets to all other routers. Each router independently performs a private one-to-all broadcast. The original router transmits m·g·m / 2 data packets to the first router group in the first unicast step, and these data packets are recursively transmitted to all half of the routers. In the second unicast step, the original router transmits m·g·m / 4 data packets to the second router group, and these data packets are recursively distributed to 25% of the router groups in the remaining half of the router groups. Repeat the above operation until each router group is distributed to m data packets. The m data packets of each router group are distributed to each router in the group, one data packet for each router. The original router distributes m-1 data packets to each router in the meta-router group.
[0145] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction with group priority and one-to-all broadcast, and the broadcast algorithm (RPA2A) corresponding to the private all-to-all broadcast instruction with group priority and one-to-all broadcast includes:
[0146] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0147] For any router r∈G s , G s ∈G, call forward(r, G s ) distributes the (m·g+1)·(m-1) messages of router r along the multicast tree of router r to the router group G where router r is located s All routers in:
[0148] In the first routing step, m·m·g / 2+m / 2 packets are transmitted from r to R m / 2 , (m-1)·m·g / 2+m / 2 data packets are transmitted from r to R m / 2-1 The router that receives the data packet in the first routing step recursively transmits the data packet to the next m / 2 routers, and each router receives m·g / 2+1 data packets;
[0149] In the second routing step, routers r and R m / 2 Simultaneously send m·m·g / 4+m / 4 data packets to R m / 4 and R 3m / 4 ; Repeat the above routing steps until each router receives m·g+1 data packets;
[0150] For any router R in the high-order network topologyv , calling urouter(R v ,D) R v The m·m·g messages in the group are multicast to g routers in the group of other routers directly connected to it;
[0151] For any router R v’ ∈G j , call forward(R v’ ,G j ) Each router R v’ The received m·m messages are distributed to all other routers in the router group.
[0152] In an embodiment of the present application, each router transmits a different data packet to all other routers in the network in a private all-to-all broadcast. In the GPA2A private all-to-all broadcast, each router transmits g·m·m +(m-1) data packets to all other routers. Each router independently performs a private one-to-all broadcast. The original router transmits m·g·m / 2 data packets to the first router group in the first unicast step, and these data packets are recursively transmitted to all half of the routers. In the second unicast step, the original router transmits m·g·m / 4 data packets to the second router group, and these data packets are recursively distributed to 25% of the router groups in the remaining half of the router groups. Repeat the above operation until each router group is distributed to m data packets. The m data packets of each router group are distributed to each router in the group, one data packet for each router. The original router distributes m-1 data packets to each router in the meta-router group.
[0153] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast algorithm instruction for data packet merging, and the broadcast algorithm corresponding to the private all-to-all broadcast algorithm instruction for data packet merging (private all-to-all broadcast algorithm for data packet merging PA2A) may be composed of four different stages: (1) data packet collection within the router group, in which each router collects all data packets that need to be broadcast to the only selected root node in the group; (2) all data packets collected at the root node are dispersed to m routers in the group; (3) after each router receives the data packet, it distributes it to g directly connected routers outside the group through a global channel, and (4) once each router receives m·m data packets transmitted from any other router group, it immediately distributes them to m routers in the group, with m data packets for each router. The broadcast algorithm corresponding to the private all-to-all broadcast algorithm instruction for data packet merging includes:
[0154] For each router group G in the network i , r∈G i ,r is selected, call collect(r,Gi ) collect m in r 3 g+(m-1) m messages;
[0155] Call scatter(r,D i ) Publish the message of router r to router group G i In each router, each router receives m 2 g+(m-1) messages, m 2 ·g messages by G i The m-1 messages are transmitted from the external router. i The messages delivered to the router r by other m-1 routers;
[0156] Call urouter(r,G) to convert m in r 2 g data packets are transmitted to G through g global channels i An additional router;
[0157] For each router r in the high-order network topology, r∈G i , each router group received by r 2 The messages are distributed to m routers, and each router receives m messages.
[0158] In the first phase of the PA2A algorithm, during the data packet collection phase, each router r distributes (m-1)·m·g+(m-1) data packets to m-1 routers in the same group through the same selected multicast tree root node, (m-1)·m·g+(m-1) data packets are retained at the root node router r, and (m-1)·m·g data packets are distributed by r Distribute to m-1 routers in the same group.
[0159] Figure 9 A schematic diagram of the implementation flow of a PA2A algorithm provided in an embodiment of the present application is shown in FIG. Figure 9 As shown, in Figure 9 (a) shows the process of data packet collection in the first phase, assuming that router R0 is selected as the root node of the data packet collection tree. In the first unicast cycle, R1, R3, R5, …, transmit g·m·(m-1)+(m-1) data packets to R0, R2, R4, … respectively. In the second unicast step, each leaf node in the data packet collection tree transmits 2·(m-2)·m·g + (m-2)·2 data packets to the predecessor node, where 2·(m-2)·m·g is the number of data packets transmitted by the two routers to other router groups through the other m-2 routers, and (m-2)·2 is the number of data packets transmitted by the two routers to (m-2); repeat the above operation, and in the log(m)th unicast cycle, R m / 2Transmit m·m / 2·(m / 2·g) + m / 2·m / 2 data packets to R0.
[0160] like Figure 9 As shown in (a), each router group has eight routers. In the first unicast cycle, R1, R3, R5, and R7 transmit 8·28+7 packets to R0, R2, R4, and R6, respectively. In the second unicast step, the predecessor of each leaf node in the packet collection tree transmits 48·8+12 packets to its predecessor, where 48x8 represents the number of packets transmitted by the two routers to the other router groups via the other six routers, and 12 represents the number of packets transmitted by the two routers to the other six routers in the group. In the third unicast cycle, R4 transmits 8x64+16 packets to R0.
[0161] In the first data distribution phase: In the first unicast step, R0 transmits m / 2·m / 2·m·g+m / 2·m / 2 packets to R m / 2 , where m / 2·m / 2·m·g represents the period from R0-R m / 2-1 By R m / 2 -R m-1 Data packets transmitted to other router groups, m / 2·m / 2 is from R0-R m / 2-1 Transfer to R m / 2 -R m-1 data packets.
[0162] In the second unicast step, R0 and R m / 2 Transmit 3m / 4·m / 4·m·g+3m / 4·m / 4 data packets to R m / 4 and R 3m / 4 , where 3m / 4·m / 4·m·g represents the period from R0-R m / 4-1 By R m / 4 -R m / 2-1 , and R m / 2 -R 3m / 4-1 By R 3m / 4 -R m-1 Data packets transmitted to other router groups, 3m / 4·m / 4 is from R0-R m / 2-1 Transfer to R m / 2 -R m-1 and R m / 2 -R 3m / 4-1 Transfer to R 3m / 4 -R m-1 data packets.
[0163] Repeat the above process until the log(m / 2)th unicast step when all m / 2 even-numbered routers transmit [(m-1)·m·g+(m-1)] packets. Consider the arrow curve from R0 to R1, (m-1)·m·g represents the packets transmitted from the other m-1 routers in the group to other router groups through R1, and m-1 represents all m-1 packets transmitted from the other m-1 routers in the same group to R1.
[0164] exist Figure 9 As shown in (b), in the first unicast cycle, R0 transmits 64x8+16 packets to R4. Of these, 64x8 represent packets transmitted from R0-R3 to other router groups via R4-R7, and 16 represent packets transmitted from R0-R3 to R4-R7. In the second unicast cycle, routers R0 and R4 transmit 48x8+12 packets to R2 and R6, respectively. Considering the packets from R0 to R2, 48x8 represent packets transmitted from R0, R1, R4-R7 to other router groups via R2 and R3.
[0165] After the first distribution phase is complete, each router retains m·m·g packets to be transmitted to g other groups of routers. For each router r, call urouter(r,G) to transmit m·m·g packets to routers in g other groups of routers through the global channel. There are three different cases: (1) all router groups connected to r have a lower group label than the source router group label, (2) all router groups connected to r have a higher group label than the source router group label, and (3) g / 2 of the router groups have a higher group label than the source router group label, and g / 2 of the source router groups have a lower group label.
[0166] All m·m·g packets are packaged into log(g) large packets, which can significantly reduce startup and receipt delays. Figure 10 This is a schematic diagram of the implementation flow of a PA2A algorithm provided in the embodiment of the present application. Assume that G i , G i+1 ,…,G i+g-1 For a group of g routers directly connected to router r, in the first unicast cycle, such as Figure 10 As shown in (a), m·m·g / 2 data packets are transmitted from r to G i+g / 2 In the second unicast cycle, m·m·g / 4 packets are transmitted directly from r to G i+g / 4 , while G i+g / 2 Transmit m·m·g / 4 data packets to G i+3g / 4 Repeat the above operation until the log(g)th unicast cycle, and transmit m·m packets from r to G iAt this point, all g router groups directly connected to r have received m·m data packets.
[0167] Figure 10 As shown in (b), taking each group of 8 routers as an example, in the first unicast step, router r transmits 8x8x2 data packets to G i+2 In the second unicast step, routers r and G i+2 Transmit 8x8 data packets to G respectively i+1 and G i+3 In the third routing step, router r transmits 8x8 packets to G i .
[0168] When a router r receives data packets from m·m other routers, it immediately distributes these data packets to the m routers in the same group. We take R0 as an example to introduce the distribution algorithm. In the first unicast step, r forwards m·m / 2 data packets to R m / 2 In the second unicast step, routers R0 and R m / 2 Forward m·m / 4 data packets to R respectively m / 4 and R 3m / 4 Continue the above distribution operation until all routers have received m data packets.
[0169] like Figure 9 As shown in (c), R2 is the source router for the distribution operation. In the first unicast step, router R2 distributes 4x8 packets to R4. In the second unicast step, routers R2 and R4 distribute 2x8 packets to R1 and R6, respectively. In routing step 3, R1, R2, R4, and R6 transmit 8 packets to R0, R3, R5, and R7, respectively.
[0170] Based on the foregoing embodiments, an embodiment of the present application provides a broadcasting device, wherein the modules included in the device and the units included in each module can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0171] An embodiment of the present application provides a broadcast device, which is applied to a high-order network topology structure. The high-order network topology structure includes: multiple router groups, at least one connection between any two router groups, and at least one connection between any two routers in any router group, including:
[0172] A first determining module, configured to determine a broadcast instruction based on the acquired data packet;
[0173] a second determining module, configured to determine a target broadcast algorithm based on the broadcast instruction and a pre-stored correspondence between the broadcast instruction and the broadcast algorithm;
[0174] A broadcast module is used to broadcast the data packet in the high-order network topology structure based on the target broadcast algorithm.
[0175] In some embodiments, the broadcast instruction includes: a group-priority-one-to-all all-to-all broadcast instruction, and the broadcast algorithm corresponding to the group-priority-one-to-all all-to-all broadcast instruction includes:
[0176] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0177] For each router r∈G, call deliver(r,G) to deliver the data packet from r to all router groups in G;
[0178] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) by v i Multicast the message to D i All routers in , where v i Receive the data packet sent from r.
[0179] In some embodiments, calling deliver(r,G) to deliver a packet from r to all routers in G includes:
[0180] Determine the number of all router groups in G;
[0181] When the number of all router groups in G is greater than 2, G is divided into two subsets of the same size G' and G";
[0182] If r is in the low-numbered router group subset G', transmit the message from r to the lowest-numbered router group c1 in G"; call deliver(r,G') on r and call deliver(c1,G") on c1;
[0183] If r is in the high-numbered router group subset G', transmit the message from r to the highest-numbered router group c1 in G'; call deliver(c1,G') at c1, and call deliver(r,G') at r.
[0184] In some embodiments, the call forward(v i ,D i ) by v i Multicast the message to D i All routers in the, including:
[0185] Determine D i The number of routers in the
[0186] In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2;
[0187] If vi is in the low-numbered subset D1, transmit the message of vi to the lowest-numbered router v2 in the high-numbered subset D2; call forward(v2,D2) on v2, and call forward(vi,D1) on vi;
[0188] If vi is in D2, this transmits the message for vi to the highest-numbered router v1 in D1; calls forward(v1,D1) at v1 and forward(vi,D2) at vi.
[0189] In some embodiments, the broadcast instruction includes: a router-first-one-to-all broadcast instruction, and the broadcast algorithm corresponding to the router-first-one-to-all broadcast instruction includes:
[0190] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0191] For any router r∈G s , router group G s ∈G,G s The router set is D i , call forward(r, G s ) transmits the message of router r to G s All routers in;
[0192] For any router R in the network v , calling urouter(R v ,D) R vThe m messages in are multicast to g routers in the group of other routers directly connected to it;
[0193] For any router R v’ ∈G j , router group G j ∈G calls forward(R v’ ,G j ) Each group of R v’ The received g·m messages are multicast to all other routers in the router group.
[0194] In some embodiments, the calling urouter (R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it, including:
[0195] Determine D i The number of routers in the
[0196] In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2, Among them, D1 contains g / 2 routers with small labels, and D2 contains g / 2 routers with large labels;
[0197] In R v Call urouter(R v ,D1) and call urouter(c2,D2-{c2}) at c2, where c2 is the router with the smallest label in D2.
[0198] In some embodiments, the broadcast instruction includes: an all-to-all broadcast instruction of message merging, and the broadcast algorithm corresponding to the all-to-all broadcast instruction of message merging includes:
[0199] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0200] For every router r∈G i , G i ∈G, call collect(r,G i ) Transmit message r to router group G i Each router in;
[0201] For each router group G i , G i The router group includes Router D i , call scatter(r,D i) The messages collected in the selected router r are distributed to G i Each router in;
[0202] For any router r in the high-order network topology, call urouter(r,G) to transmit the m messages of router r to the group of g=m / 2 routers in G that are directly connected to r;
[0203] For any router r in the high-order network topology, r∈G j , G j ∈G, transmit the m messages received by r to G j All other routers in the
[0204] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction with group priority and one-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction with group priority and one-to-all broadcast includes:
[0205] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0206] For each router r∈G, call deliver(r,G) to transmit (g·m+1)·(m-1) packets from r to all router groups in G, where m·g·m packets are transmitted to routers in other groups in the higher-order network topology, and m packets are transmitted to m routers in the same group including r. In the first unicast step, router r transmits m·g·m / 2 packets to the first router group, and the routers in the first router group recursively distribute the packets to |G| / 2 router groups. In the second routing step, router r transmits m·g·m / 4 packets to the second router group, and the routers in the second router group recursively distribute the packets to |G| / 4 router groups. Repeat the above steps until each router group receives m packets, and the m packets in each router group are distributed to the m routers in the router group. Router r recursively distributes m-1 packets to other m-1 routers in the same group.
[0207] For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) Send the message from v i Multicast the data packet to D i All routers in , where v i Receive m data packets sent from r.
[0208] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast instruction with group priority and one-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction with group priority and one-to-all broadcast includes:
[0209] Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G;
[0210] For any router r∈G s , G s ∈G, call forward(r, G s ) distributes the (m·g+1)·(m-1) messages of router r along the multicast tree of router r to the router group G where router r is located s All routers in:
[0211] In the first routing step, m·m·g / 2+m / 2 packets are transmitted from r to R m / 2 , (m-1)·m·g / 2+m / 2 data packets are transmitted from r to R m / 2-1 The router that receives the data packet in the first routing step recursively transmits the data packet to the next m / 2 routers, and each router receives m·g / 2+1 data packets;
[0212] In the second routing step, routers r and R m / 2 Simultaneously send m·m·g / 4+m / 4 data packets to R m / 4 and R 3m / 4 ; Repeat the above routing steps until each router receives m·g+1 data packets;
[0213] For any router R in the high-order network topology v , calling urouter(R v ,D) R v The m·m·g messages in the group are multicast to g routers in the group of other routers directly connected to it;
[0214] For any router R v’ ∈G j , call forward(R v’ ,G j ) Each router R v’ The received m·m messages are distributed to all other routers in the router group.
[0215] In some embodiments, the broadcast instruction includes: a private all-to-all broadcast algorithm instruction for data packet merging, and the broadcast algorithm corresponding to the private all-to-all broadcast algorithm instruction for data packet merging includes:
[0216] For each router group G in the network i , r∈G i ,r is selected, call collect(r,G i ) collect m in r 3 g+(m-1) m messages;
[0217] Call scatter(r,D i ) Publish the message of router r to router group G i In each router, each router receives m 2 g+(m-1) messages, m 2 ·g messages by G i The m-1 messages are transmitted from the external router. i The messages delivered to the router r by other m-1 routers;
[0218] Call urouter(r,G) to convert m in r 2 g data packets are transmitted to G through g global channels i An additional router;
[0219] For each router r in the high-order network topology, r∈G i , each router group received by r 2 The messages are distributed to m routers, and each router receives m messages.
[0220] It should be noted that in the embodiments of the present application, if the above-mentioned broadcasting method is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, or the part that contributes to the existing technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0221] Accordingly, an embodiment of the present application provides a storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps in the broadcasting method provided in the above embodiment are implemented.
[0222] An embodiment of the present application provides an electronic device; Figure 11A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 11 As shown, the electronic device 600 includes: a processor 601, at least one communication bus 602, a user interface 603, at least one external communication interface 604, and a memory 605. The communication bus 602 is configured to enable communication between these components. The user interface 603 may include a display screen, and the external communication interface 604 may include a standard wired interface and a wireless interface. The processor 601 is configured to execute a program for the broadcasting method stored in the memory to implement the steps of the broadcasting method provided in the above embodiment.
[0223] The description of the above display device and storage medium embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the computer device and storage medium embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0224] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0225] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0226] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0227] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0228] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0229] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0230] Those skilled in the art will understand that all or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROMs), magnetic disks, optical disks, and other media that can store program codes.
[0231] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a controller to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0232] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A broadcasting method, characterized in that: Applied to a high-order network topology, the high-order network topology includes: multiple router groups, at least one connection between any two router groups, and at least one connection between any two routers in any router group, the method includes: determining a broadcast instruction based on the acquired data packet; determining a target broadcast algorithm based on the broadcast instruction and a pre-stored correspondence between the broadcast instruction and the broadcast algorithm; Broadcasting the data packet in the high-order network topology structure based on the target broadcast algorithm; The broadcast instruction includes: a router-first-to-all broadcast instruction, and the broadcast algorithm corresponding to the router-first-to-all broadcast instruction includes: Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G; For any router r∈G s , router group G s ∈G,G s The router set is D i , call forward(r, G s ) transmits the message of router r to G s All routers in; For any router R in the network v , call urouter(R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it; For any router R v’ ∈G j , router group G j ∈G calls forward(R v’ ,G j ) Each group of R v’ The received g·m messages are multicast to all other routers in the router group.
2. The broadcasting method according to claim 1, wherein: The broadcast instruction includes: a group-priority-to-all all-to-all broadcast instruction, and the broadcast algorithm corresponding to the group-priority-to-all all-to-all broadcast instruction includes: Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G; For each router r∈G, call deliver(r,G) to deliver the data packet from r to all router groups in G; For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) by v i Multicast the message to D i All routers in , where v i Receive the data packet sent from r; Wherein, the call forward(v i ,D i ) by v i Multicast the message to D i All routers in the, including: Determine D i The number of routers in the In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2; If vi is in the low-numbered subset D1, transmit the message of vi to the lowest-numbered router v2 in the high-numbered subset D2; call forward(v2,D2) on v2, and call forward(vi,D1) on vi; If vi is in D2, transmit the message of vi to the router v1 with the highest label in D1; call forward(v1,D1) at v1 and call forward(vi,D2) at vi.
3. The method according to claim 2, characterized in that The call deliver(r,G) delivers the packet from r to all routers in G, including: Determine the number of all router groups in G; When the number of all router groups in G is greater than 2, G is divided into two subsets of the same size G' and G"; If r is in the low-numbered router group subset G', transmit the message from r to the lowest-numbered router group c1 in G"; call deliver(r,G') on r and call deliver(c1,G") on c1; If r is in the high-numbered router group subset G', transmit the message from r to the highest-numbered router group c1 in G'; call deliver(c1,G') at c1, and call deliver(r,G') at r.
4. The broadcasting method according to claim 1, wherein: The call urouter (R v ,D) R v The m messages in are multicast to g routers in the group of other routers directly connected to it, including: Determine D i The number of routers in the In D i If the number of routers in the network is greater than 2, D i Divide into two equal subsets D1 and D 2, Among them, D1 contains g / 2 routers with small labels, and D2 contains g / 2 routers with large labels; In R v Call urouter(R v ,D1) and call urouter(c2,D2-{c2}) at c2, where c2 is the router with the smallest label in D2.
5. The broadcasting method according to claim 1, wherein: The broadcast instruction includes: an all-to-all broadcast instruction of message merging, and the broadcast algorithm corresponding to the all-to-all broadcast instruction of message merging includes: Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G; For every router r∈G i , G i ∈G, call collect(r,G i ) Transmit message r to router group G i Each router in; For each router group G i , G i The router group includes Router D i , call scatter(r,D i ) The messages collected in the selected router r are distributed to G i Each router in; For any router r in the high-order network topology, call urouter(r,G) to transmit the m messages of router r to the group of g=m / 2 routers in G that are directly connected to r; For any router r in the high-order network topology, r∈G j , G j ∈G, transmit the m messages received by r to G j All other routers in the 6. The broadcasting method according to claim 1, wherein: The broadcast instruction includes: a private all-to-all broadcast instruction of group priority-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction of group priority-to-all broadcast includes: Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G; For each router r∈G, call deliver(r,G) to transmit (g·m+1)·(m-1) packets from r to all router groups in G, where m·g·m packets are transmitted to routers in other groups in the higher-order network topology, and m packets are transmitted to m routers in the same group including r. In the first unicast step, router r transmits m·g·m / 2 packets to the first router group, and the routers in the first router group recursively distribute the packets to |G| / 2 router groups. In the second routing step, router r transmits m·g·m / 4 packets to the second router group, and the routers in the second router group recursively distribute the packets to |G| / 4 router groups. Repeat the above steps until each router group receives m packets, and the m packets in each router group are distributed to the m routers in the router group. Router r recursively distributes m-1 packets to other m-1 routers in the same group. For each router group G i ∈G,G i The router set is D i , call forward(v i ,D i ) Send the message from v i Multicast the data packet to D i All routers in , where v i Receive m packets sent from r.
7. The broadcasting method according to claim 1, wherein: The broadcast instruction includes: a private all-to-all broadcast instruction of group priority-to-all broadcast, and the broadcast algorithm corresponding to the private all-to-all broadcast instruction of group priority-to-all broadcast includes: Based on the router group labels, all router groups are sorted according to the principle of negative priority to obtain the router set G; For any router r∈G s , G s ∈G, call forward(r, G s ) distributes the (m·g+1)·(m-1) messages of router r along the multicast tree of router r to the router group G where router r is located s All routers in: In the first routing step, m·m·g / 2+m / 2 packets are transmitted from r to R m / 2 , (m-1)·m·g / 2+m / 2 data packets are transmitted from r to R m / 2-1 The router that receives the data packet in the first routing step recursively transmits the data packet to the next m / 2 routers, and each router receives m·g / 2+1 data packets; In the second routing step, routers r and R m / 2 Simultaneously send m·m·g / 4+m / 4 data packets to R m / 4 and R 3m / 4 ; Repeat the above routing steps until each router receives m·g+1 data packets; For any router R in the high-order network topology v , call urouter(R v ,D) R v The m·m·g messages in the group are multicast to g routers in the group of other routers directly connected to it; For any router R v’ ∈G j , call forward(R v’ ,G j ) Each router R v’ The received m·m messages are distributed to all other routers in the router group.
8. The broadcasting method according to claim 1, wherein: The broadcast instruction includes: a private all-to-all broadcast algorithm instruction for merging data packets, and the broadcast algorithm corresponding to the private all-to-all broadcast algorithm instruction for merging data packets includes: For each router group G in the network i , r∈G i ,r is selected, call collect(r,G i ) collect m in r 3 g+(m-1) m messages; Call scatter(r,D i ) Publish the message of router r to router group G i In each router, each router receives m 2 g+(m-1) messages, m 2 ·g messages by G i The m-1 messages are transmitted from the external router. i The messages delivered to the router r by other m-1 routers; Call urouter(r,G) to convert m in r 2 g data packets are transmitted to G through g global channels i An additional router; For each router r in the high-order network topology, r∈G i , each router group received by r 2 The messages are distributed to m routers, and each router receives m messages.
9. A broadcasting device for implementing the broadcasting method according to any one of claims 1 to 8, characterized in that: Applicable to a high-order network topology, the high-order network topology comprising: multiple router groups, at least one connection between any two router groups, and at least one connection between any two routers in any router group, including: A first determining module, configured to determine a broadcast instruction based on the acquired data packet; a second determining module, configured to determine a target broadcast algorithm based on the broadcast instruction and a pre-stored correspondence between the broadcast instruction and the broadcast algorithm; A broadcast module is used to broadcast the data packet in the high-order network topology structure based on the target broadcast algorithm.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the broadcasting method according to any one of claims 1 to 8 is executed.
11. A storage medium, characterized in that: The computer program stored in the storage medium can be executed by one or more processors and can be used to implement the broadcasting method according to any one of claims 1 to 8.
Citation Information
Patent Citations
A network-on-chip system and a communication method thereof
CN109873771A
Dragonfly network architecture and broadcast routing method thereof
CN110324243A