Method and apparatus for multi-level replication of network data, electronic device, and storage medium
Patent Information
- Application Number
- CN202611194692.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-30
AI Technical Summary
而主cross带宽仅有16Gbps带宽,因此在入口方向,需要耗费16倍的延时进行all to all的多播复制
本申请通过接收对待转发报文的多播请求,响应于多播请求,利用多级网关中的一级交叉开关执行第一级复制,将待转发报文转发至各二级交叉开关,利用各二级交叉开关执行第二级复制,将待转发报文转发至各三级交叉开关,利用各三级交叉开关执行第三级复制,将待转发报文转发至各三级交叉开关的物理端口,以降低入口处的带宽需求,从而降低复制延时。
Smart Images

Figure CN123020508A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of message processing, and more specifically, to a method, apparatus, electronic device, and storage medium for multi-level replication of network data. Background Technology
[0002] In the field of Ethernet data switching, there are both one-to-one data transmission forms, called unicast, and one-to-many data transmission forms, called multicast.
[0003] To meet different business needs, network chips support both unicast and multicast. Multicast essentially involves copying a packet received at one port multiple times and sending it to multiple other ports. The packet copying method affects the latency and bandwidth of the network chip.
[0004] like Figure 1 As shown, during one-to-one unicast, packets from each port are cross-connected at the main crossover point. Assuming there are 16 ports, each with a bandwidth of 1Gbps, the main crossover point has a bandwidth of 16Gbps. When each port is forwarding data at full bandwidth, the bandwidth of the main crossover point can meet the forwarding requirements of each port.
[0005] like Figure 2 As shown, if all ports perform all-to-all multicast replication, meaning each port forwards data to all ports including itself, the bandwidth requirement for the main cross is 16 * 16 = 256 Gbps. However, the main cross only has 16 Gbps bandwidth. Therefore, on the ingress direction, all-to-all multicast replication requires 16 times the latency. Summary of the Invention
[0006] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for multi-level replication of network data, which can reduce replication latency.
[0007] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a multi-level replication method for network data, applied to a network switching device with multi-level cross switches and physical ports, the method comprising: Receive multicast requests for messages to be forwarded; In response to the multicast request, the first-level replication is performed using the first-level cross switch in the multi-level gateway to forward the packet to be forwarded to each second-level cross switch; The second-level copy is performed using each of the secondary cross switches to forward the message to be forwarded to each of the tertiary cross switches; The third-level replication is performed using each of the three-level cross switches to forward the message to be forwarded to the physical port of each of the three-level cross switches.
[0008] In an optional implementation, the primary cross switch is communicatively connected to each of the secondary cross switches, and the secondary cross switches are communicatively connected to each of the tertiary cross switches.
[0009] In an optional implementation, the primary cross switch manages the first target group set; The secondary cross switch manages the second target group set; The three-level cross switch manages the ports in the second target group.
[0010] In an optional implementation, the step of responding to the multicast request by performing first-level replication using a first-level cross-switch in a multi-level gateway to forward the packet to be forwarded to each second-level cross-switch includes: Parse the multicast request to determine the first target group set for the primary crossbar switch management; Determine the first quantity of the first target group set; The message to be forwarded is copied in the first number of times and sent to each secondary cross gateway through the first-level cross switch.
[0011] In an optional implementation, the first target group set includes Group1, Group2, Group3 and Group4, and the first-level cross switch manages Group1, Group2, Group3 and Group4 respectively.
[0012] In an optional implementation, the step of performing second-level replication using each of the secondary cross switches to forward the packet to be forwarded to each of the tertiary cross switches includes: Determine the set of the second target groups for secondary cross-management; Determine the second quantity of the second target group set; The message to be forwarded is copied a second number of times and sent to each of the three-level cross gateways through the second-level cross switch.
[0013] In an optional implementation, the step of performing third-level replication using each level-three cross switch to forward the packet to be forwarded to the physical port of each of the level-three cross switches includes: For each of the three-level cross switches, determine the third target group managed by the three-level cross switches; Determine the physical port corresponding to the third target group; The message to be forwarded is forwarded to each of the physical ports.
[0014] Secondly, embodiments of this application provide a multi-level replication apparatus for network data, and a method for multi-level replication of network data.
[0015] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the multi-level copying method for network data.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the multi-level copying method for network data.
[0017] This application has the following beneficial effects: This application receives multicast requests for packets to be forwarded, and in response to the multicast requests, performs first-level replication using the first-level cross-connect switches in the multi-level gateway to forward the packets to be forwarded to each second-level cross-connect switch. Then, it performs second-level replication using each second-level cross-connect switch to forward the packets to be forwarded to each third-level cross-connect switch. Finally, it performs third-level replication using each third-level cross-connect switch to forward the packets to be forwarded to the physical ports of each third-level cross-connect switch. This reduces the bandwidth requirements at the ingress point, thereby reducing replication latency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is one of the existing technology schematic diagrams; Figure 2 This is the second illustration of existing technology; Figure 3 A block diagram of an electronic device provided in an embodiment of the present invention; Figure 4 This is one of the flowcharts illustrating a method for implementing multi-level replication of network data according to an embodiment of the present invention; Figure 5 This is a second flowchart illustrating a method for implementing multi-level replication of network data according to an embodiment of the present invention. Figure 6 This is the third flowchart illustrating a method for implementing multi-level replication of network data according to an embodiment of the present invention. Figure 7This is the fourth flowchart illustrating a method for implementing multi-level replication of network data according to an embodiment of the present invention. Figure 8 This is a diagram illustrating two-level replication. Figure 9 This is a diagram illustrating multi-level replication. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0022] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0023] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0024] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0025] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0026] Extensive research by the inventors revealed that, to meet diverse business needs, network chips must simultaneously support unicast and multicast. Multicast essentially involves copying a packet received at one port multiple times and sending it to several other ports. The method of packet copying affects the latency and bandwidth of the network chip. In multicast copying scenarios, excessive bandwidth demands lead to excessive latency.
[0027] In view of the above-mentioned problems, this embodiment provides a multi-level replication method, apparatus, electronic device, and storage medium for network data. It can receive multicast requests for packets to be forwarded; respond to the multicast requests, perform first-level replication using a first-level cross-connect switch in a multi-level gateway, forwarding the packets to be forwarded to each second-level cross-connect switch; perform second-level replication using each second-level cross-connect switch, forwarding the packets to be forwarded to each third-level cross-connect switch; and perform third-level replication using each third-level cross-connect switch, forwarding the packets to be forwarded to the physical ports of each third-level cross-connect switch. This reduces the bandwidth requirements at the entry point, thereby reducing replication latency. The solution provided in this embodiment will be described in detail below.
[0028] This embodiment provides an electronic device capable of multi-level replication of network data. In one possible implementation, the electronic device can be a user terminal, such as, but not limited to, a server, smartphone, personal computer (PC), tablet computer, personal digital assistant (PDA), mobile internet device (MID), and image acquisition device.
[0029] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. The electronic device 100 may further include... Figure 3 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.
[0030] The electronic device 100 includes a multi-level copying device for network data 110, a memory 120, and a processor 130.
[0031] The components of the memory 120 and processor 130 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The multi-level replication device 110 for network data includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute executable modules stored in the memory 120, such as the software function modules and computer programs included in the multi-level replication device 110 for network data.
[0032] The memory 120 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving execution instructions.
[0033] Please refer to Figure 4 , Figure 4 For application Figure 3 The flowchart below shows a method for multi-level replication of network data in an electronic device 100. The method includes a detailed description of each step.
[0034] The multi-level replication method for network data is applied to network switching equipment with multi-level cross switches and physical ports.
[0035] S201: Receive multicast requests for messages to be forwarded.
[0036] S202: In response to a multicast request, perform first-level replication using the first-level crossbar switch in the multi-level gateway, forwarding the message to be forwarded to each second-level crossbar switch.
[0037] S203: Perform second-level replication using each secondary cross switch, forwarding the message to be forwarded to each tertiary cross switch.
[0038] S204: Perform third-level replication using each level 3 cross switch, forwarding the message to be forwarded to the physical port of each level 3 cross switch.
[0039] Multicast requests refer to control information that accompanies messages to be forwarded or transmitted independently. The core of a multicast request is a global multicast mask, which identifies the reception status of all physical ports in bit form and is used to guide the replication behavior of cross switches at all levels.
[0040] A multi-level gateway is a tree-structured switching network consisting of a first-level crossbar switch, a second-level crossbar switch, and a third-level crossbar switch.
[0041] Specifically, the first-level cross switch receives multicast requests from the source port, parses the global multicast mask, performs the first-level replication, and replicates the single message to be forwarded into N copies, where N is the first target group set managed by the first-level cross switch, and sends them to the corresponding second-level cross switches. At this stage, the first-level cross switch only perceives the granularity of the first target group managed by the first-level cross switch and does not parse specific port information.
[0042] Each secondary cross switch receives the message to be forwarded, parses the bit fields belonging to its group in the global multicast mask, determines the set of second target groups within its group that need to receive the message, and performs the second-level copy. The message to be forwarded is copied into M copies, where M is the number of second target groups within the group, and sent to the corresponding tertiary cross switch.
[0043] Each level 3 cross switch receives the message to be forwarded, parses the corresponding mask bit field of its group, determines the physical port, and performs level 3 copying.
[0044] The message to be forwarded is copied into K copies, where K is the number of ports in this group, and then accurately sent to the physical port directly connected to this level 3 cross switch to complete the full path forwarding.
[0045] It should be noted that the message to be forwarded always follows the principle of cross-connect to cross-connect entity transmission throughout the entire forwarding path.
[0046] The communication connection between the primary cross switch and each secondary cross switch is specifically manifested in that the primary cross switch has an independent output port equal to the number of groups, for example, 4 output ports. Each output port is fixedly connected one-to-one to the input port of the corresponding secondary cross switch through a dedicated point-to-point high-speed serial link or parallel data bus.
[0047] For example, the Output_G1 port of the primary cross switch is only connected to the input port of the secondary cross switch corresponding to Group1, and the Output_G2 port is only connected to the input port of the secondary cross switch corresponding to Group2, and there is no direct physical connection or data path between different secondary cross switches.
[0048] Correspondingly, the communication connection between the secondary cross switch and each tertiary cross switch is specifically manifested in that each secondary cross switch has an independent output port equal to the number of subgroups, such as two output ports. Each output port is fixedly connected one-to-one to the input port of the corresponding tertiary cross switch in the same group through a dedicated link. For example, the Output_SG1 port of the secondary cross switch of Group1 is only connected to the tertiary cross switch corresponding to Sub-Group1 in the same group, and the Output_SG2 port is only connected to the tertiary cross switch corresponding to Sub-Group2 in the same group. There is no horizontal interconnection between different tertiary cross switches.
[0049] In addition, the physical media of each level of connection usually adopts a synchronous clock domain design to ensure timing convergence and low latency characteristics when data is transmitted across levels in the tree structure.
[0050] In this embodiment, the primary crossbar switch manages the first target group set. Specifically, the primary crossbar switch maintains a global group mapping table. The global group mapping table establishes a static binding relationship between the identifiers of Group1 to Group4 and its own output ports. When the primary crossbar switch parses the global multicast mask, it extracts all set group identifiers, such as {G1, G2, G3, G4}. This set is the first target group set. The primary crossbar switch controls the connectivity state of its internal switching matrix accordingly, enabling only the output ports that match the number of target groups, thereby accurately directing the packets to the corresponding secondary crossbar switch. In this process, the primary crossbar switch only senses and processes the address information at the Group granularity, without needing to parse specific subgroup or port information.
[0051] The secondary cross switch manages the second target group set. Specifically, each secondary cross switch, taking Group1 as an example, only manages the local address space belonging to its own group, namely Sub-Group1 and Sub-Group2. Internally, it manages the subgroup mask parsing logic of its own group. When it receives a packet and the global multicast mask, the secondary cross switch extracts the four bits corresponding to its own group from the global mask, corresponding to Port1-Port4. Based on the setting of these four bits, it determines the list of Sub-Groups within its own group that need to receive packets, such as {SG1, SG2}. This list is the second target group set. The secondary cross switch uses this to complete the replication and forwarding to a specific tertiary cross switch, and the secondary cross switches are unaware of each other's second target group set.
[0052] The three-level cross switch manages the ports in the second target group. Specifically, each three-level cross switch, taking Group1 / SG1 as an example, only manages the physical port resources within its own subgroup, such as Port1 and Port2. It maintains a port enable register internally. The three-level cross switch receives packets from the two-level cross switch and parses the two bits in the global multicast mask corresponding to the subgroup it manages. Based on the parsing result, it determines the list of port IDs within its subgroup that need to receive packets, such as {Port1, Port2}. Then, it copies and sends the packets to the corresponding physical ports. During this process, the three-level cross switch only has read and write permissions for the ports in its own subgroup and cannot access the port resources of other subgroups or groups, thus achieving progressively refined management granularity and resource isolation.
[0053] In response to a multicast request, the first-level replication is performed using the first-level crossbar in a multi-level gateway. There are several ways to forward packets to the second-level crossbars. In one implementation, such as... Figure 5 As shown, it includes the following steps: S301: Parse multicast requests to determine the first target group set for the management of the first-level cross switch.
[0054] S302: Determine the first quantity of the first target group set.
[0055] S303: Copy the message to be forwarded to the first number of times and send it to each secondary cross gateway through the primary cross switch.
[0056] The first-level crossbar switch receives multicast requests accompanying the packets to be forwarded, and extracts the group identifiers of all packets to be received from the global mask according to the pre-configured group division rules, such as mapping the high 2 bits of the address to Group ID.
[0057] For example, when the global mask indicates that ports 1 through 16 need to receive messages, the flag bits of Group1, Group2, Group3 and Group4 are all set, and the Group1, Group2, Group3 and Group4 determined in this way are the first target group set.
[0058] The number of valid identifiers in the first target group set is counted to obtain the first quantity N. In the above full-port multicast scenario, N=4. If the multicast request only points to Group1 and Group3, then the first quantity is 2.
[0059] The primary cross switch internally configures a replication factor based on a first quantity N, caching and cloning a single message to be forwarded into N logical copies. Simultaneously, based on the physical connection relationships of each group in the first target group set, such as output port P1 corresponding to Group1, output port P2 corresponding to Group2, etc., parallel data paths are established from the input port to the N target output ports. The N cloned messages are then synchronously sent to the corresponding secondary cross switches of Group1 to Group4 via the output ports of the primary cross switch and point-to-point fixed physical links under the drive of a synchronous clock, thus completing the first-level replication and forwarding.
[0060] During this process, the message copying action and the port mapping action occur simultaneously, and the number of copies is strictly limited by the number of groups, thus avoiding unnecessary bandwidth usage.
[0061] For example, the first target group set includes Group1, Group2, Group3, and Group4. The primary crossbar switch has a built-in global group management table, which statically establishes a one-to-one mapping relationship between the output ports of the primary crossbar switch and the Group identifiers, i.e., Output_Port1 is bound to Group1, Output_Port2 is bound to Group2, Output_Port3 is bound to Group3, and Output_Port4 is bound to Group4. The primary crossbar switch exclusively manages these four groups in terms of physical connection and logical configuration. Apart from these four groups, the primary crossbar switch is unaware of any other subgroups or port resources within the system.
[0062] There are several ways to implement second-level replication using each secondary crossbar switch to forward packets to each tertiary crossbar switch. One implementation method is as follows: Figure 6 As shown, it includes the following steps: S401: Determine the set of second target groups for secondary cross-management.
[0063] S402: Determine the second quantity of the second target group set.
[0064] S403: Copy the message to be forwarded a second number of times and send it to each third-level cross gateway through the second-level cross switch.
[0065] Each secondary cross switch governs only its corresponding single logic group. For example, the secondary cross switch corresponding to Group 1 only manages the Subs within Group 1. Group 1 and Sub Group 2.
[0066] The second-level cross switch counts the number of valid subgroup identifiers in the second target group set to obtain the second quantity M. If the second target group set contains Sub... Group 1 and Sub If Group2 is included, then the second quantity M=2; if it includes only one of them, then M=1.
[0067] The secondary crossbar switch, configured with a replication factor based on a second quantity M, clones the received single packet into M logical copies. Simultaneously, it uses a pre-configured subgroup-output port mapping table, such as Output_SG1 corresponding to Sub... Group 1's three-level cross switches establish physical pathways to M target three-level cross switches.
[0068] M copies of the message are simultaneously sent to the corresponding level-3 cross switch of the target subgroup via their respective output ports and fixed-connection links. For example, when the second quantity is 2, the level-2 cross switch of Group 1 will send the message to the connection Sub Group 1 and Sub The three-level cross switches of Group 2 enable fine-grained distribution within the group, and this process runs completely in parallel with the two-level cross switches of other groups without interfering with each other.
[0069] There are several ways to implement third-level replication using each level-three crossbar switch to forward packets to the physical ports of each level-three crossbar switch. One implementation method is as follows: Figure 7 As shown, it includes the following steps: S501: For each level three cross switch, determine the third target group for level three cross switch management.
[0070] S502: Determine the physical port corresponding to the third target group.
[0071] S503: Forward the message to be forwarded to each of the physical ports.
[0072] Each level 3 cross switch has only local physical port management rights, and its jurisdiction is strictly limited to the physical ports within its own subgroup. For example, the level 3 cross switch corresponding to Group1 / SG1 only manages Port1 and Port2.
[0073] The replication engine of the three-level cross switch configures the replication factor according to the number of target physical ports, cloning a single message into the corresponding number of logical copies; at the same time, it establishes an internal data path to the target physical port according to the port mapping table, and drives the physical layer transmission circuit to synchronously send the message copies to the corresponding physical ports.
[0074] For example, when the physical ports corresponding to the third target group are determined to be Port1 and Port2, the three-level cross switch will copy the message into two copies and send them out from the output pins connecting Port1 and Port2 respectively, completing the last hop of the multicast path. During this process, each three-level cross switch independently performs port-level copying, and the port transmission operations between different subgroups are completely parallel and do not interfere with each other.
[0075] This method, as described in this application embodiment, can be extended to level N, thereby reducing the cross bandwidth from level 1 to N-1. When N equals 2, as... Figure 8 As shown, when N equals M, as Figure 9 As shown.
[0076] like Figure 8 As shown, assuming each of the 16 ports has a bandwidth of 1Gbps, and the main crossbar has a bandwidth of 16Gbps (i.e., the bandwidth of the first-level crossbar switch is 16Gbps), the 16 ports are divided into four groups. During all-to-all multicast replication, the main crossbar is responsible for forwarding the replication request of a certain port to the corresponding group, i.e., the first-level replication. Within each group, the replication request of a certain port is then replicated to the corresponding port. Taking the multicast of data from port 1 in group1 to ports 1 through 15 as an example, the data from port 1 is forwarded by the main crossbar to groups 1 through 4. Group 1 forwards the data to ports 1 through 4 through its sub-crossbars (the second-level crossbar switch). Group 2 forwards the data to ports 5 through 8 through its sub-crossbars, group 3 forwards the data to ports 9 through 12 through its sub-crossbars, and group 4 forwards the data to ports 13 through 15 through its sub-crossbars, thus completing the multicast replication and forwarding of the data from port 1.
[0077] The first-level replication only requires forwarding the packets to 4 groups, and the bandwidth requirement for the main cross is 64Gbps. Compared with the existing technology, the bandwidth requirement in the cross ingress direction is reduced by 4 times.
[0078] This application embodiment also provides an application for... Figure 3 The network data multi-level copying device 110 of the electronic device 100 implements the network data multi-level copying method.
[0079] This application also provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement a multi-level copying method for network data.
[0080] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor 130, implements a multi-level copying method for network data.
[0081] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0082] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0083] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 limitations, 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.
[0084] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for multi-level replication of network data, characterized in that, The method, applicable to network switching equipment with multi-level crossbar switches and physical ports, includes: Receive multicast requests for messages to be forwarded; In response to the multicast request, the first-level replication is performed using the first-level cross switch in the multi-level gateway to forward the packet to be forwarded to each second-level cross switch; The second-level copy is performed using each of the secondary cross switches to forward the message to be forwarded to each of the tertiary cross switches; The third-level replication is performed using each of the three-level cross switches to forward the message to be forwarded to the physical port of each of the three-level cross switches.
2. The method according to claim 1, characterized in that, The primary cross switch is communicatively connected to each of the secondary cross switches, and the secondary cross switch is communicatively connected to each of the tertiary cross switches.
3. The method according to claim 2, characterized in that, The first-level cross switch manages the first target group set; The secondary cross switch manages the second target group set; The three-level cross switch manages the ports in the second target group.
4. The method according to claim 1, characterized in that, The step of responding to the multicast request by performing first-level replication using a first-level cross-switch in a multi-level gateway to forward the packet to be forwarded to each second-level cross-switch includes: Parse the multicast request to determine the first target group set for the primary crossbar switch management; Determine the first quantity of the first target group set; The message to be forwarded is copied in the first number of times and sent to each secondary cross gateway through the first-level cross switch.
5. The method according to claim 4, characterized in that, The first target group set includes Group1, Group2, Group3 and Group4, and the first-level cross switch manages Group1, Group2, Group3 and Group4 respectively.
6. The method according to claim 1, characterized in that, The step of performing second-level replication using each of the secondary cross switches to forward the packet to be forwarded to each of the tertiary cross switches includes: Determine the set of the second target groups for secondary cross-management; Determine the second quantity of the second target group set; The message to be forwarded is copied a second number of times and sent to each of the three-level cross gateways through the second-level cross switch.
7. The method according to claim 1, characterized in that, The step of performing third-level replication using each of the three-level cross switches to forward the packet to be forwarded to the physical ports of each of the three-level cross switches includes: For each of the three-level cross switches, determine the third target group managed by the three-level cross switches; Determine the physical port corresponding to the third target group; The message to be forwarded is forwarded to each of the physical ports.
8. A multi-level replication device for network data, characterized in that, The apparatus performs the method as described in any one of claims 1-7.
9. An electronic device, characterized in that, The method includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the method according to any one of claims 1-7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-7.
