Data packet transmission method, electronic equipment, storage medium and product
By determining the target third-level node and target path in the first and second-level nodes of the multi-level switching network, the problem of inability to fix the data packet transmission path is solved, and the order preservation and transmission accuracy of data packets are achieved.
Patent Information
- Application Number
- CN202510246840.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The paths of data packets transmitted to output port nodes in a multi-stage switching network cannot be fixed, resulting in data out of order and transmission errors.
By receiving the routing request forwarded from the first and first-level nodes in the first and second-level nodes of the multi-level switching network, when the second number identification and the third number identification are detected, the target three-level nodes are determined from the multiple three-level nodes according to the first number identification, the second number identification and the third number identification, and the target path between the target three-level nodes and the output port node is determined to ensure the uniqueness and fixedness of data packet transmission.
The uniqueness and fixedness of the packet transmission path from the input port node to the output port node in a multi-level switching network is realized, which avoids data out of order and transmission errors, improves the accuracy of packet transmission, and ensures the order preservation of data packets.
Smart Images

Figure CN119728524A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data packet transmission method, electronic device, storage medium and product. Background Art
[0002] The multi-stage switching network (also known as the CLOS network) is the most commonly used network topology in on-chip networks. It is evolved from the Benes network and is widely used in communication networks and multi-processor computer systems. There is only one link between each routing node at each level of the multi-stage switching network, but there are multiple paths to choose from between any source routing node and the destination routing node.
[0003] When an input port node initiates multiple routing requests for data transmission to its corresponding output port node, due to the path diversity of the topological structure of the multi-stage switching network, different data packets in the multiple routing requests may match different routing paths for data routing transmission, and the blocking degree of different routing nodes is different. Therefore, the path for the data packet to be transmitted from the input port node to the output port node cannot be fixed, which leads to data disorder when multiple data packets initiated by the input port node are transmitted, resulting in data transmission errors. Summary of the invention
[0004] The present application provides a data packet transmission method, electronic device, storage medium and product, so as to at least solve the problem in the related art that the path for transmitting data packets from input port nodes to output port nodes in a multi-stage switching network cannot be fixed.
[0005] The present application provides a data packet transmission method, which is applied to a multi-stage switching network, wherein each level in the multi-stage switching network includes at least one node, wherein a transmission path is formed between each node of the previous level and each node of the next level, including: The first and second-level nodes receive a first routing request forwarded from the first first-level node, the first routing request is used to request the transmission of a first data packet from the input port node to the output port node, and the first routing request carries a first numbering identifier of the first first-level node, a second numbering identifier of the first second-level node, a third numbering identifier of the second second-level node to which the output port node belongs, and the first data packet; when the first and second-level nodes detect that the second numbering identifier is different from the third numbering identifier, the first and second-level nodes determine a target third-level node from multiple third-level nodes connected to the first and second-level nodes according to the first numbering identifier, the second numbering identifier, and the third numbering identifier, and determine a target path between the target third-level node and the output port node; the first and second-level nodes transmit the first routing request to the target third-level node, so that the target third-level node transmits the first data packet to the output port node through the target path.
[0006] The present application also provides a data packet transmission device, which is applied to a multi-stage switching network, wherein each level in the multi-stage switching network includes at least one node, wherein a transmission path is formed between each node of the previous level and each node of the next level, including: a transceiver module, configured to receive a first routing request forwarded from a first first-level node, the first routing request being used to request transmission of a first data packet from an input port node to an output port node, the first routing request carrying a first numbering identifier of the first first-level node, a second numbering identifier of the first second-level node, a third numbering identifier of a second second-level node to which the output port node belongs, and the first data packet; a processing module, configured to determine, when detecting that the second numbering identifier is different from the third numbering identifier, a target third-level node from a plurality of third-level nodes connected to the first and second-level nodes according to the first numbering identifier, the second numbering identifier, and the third numbering identifier, and determine a target path between the target third-level node and the output port node; The transceiver module is also used to transmit the first routing request to the target third-level node, so that the target third-level node transmits the first data packet to the output port node through the target path.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned data packet transmission methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned data packet transmission methods are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned data packet transmission methods when the computer program is executed by a processor.
[0010] Through the present application, when the first and second level nodes in a multi-level switching network receive a first routing request forwarded from the first first level node and detect that the second number identifier is different from the third number identifier, that is, when it is detected that the first and second level nodes to which the input port node belongs and the second and second level nodes to which the output port node belongs are not the same second level node, the target third level node is determined from multiple third level nodes connected to the first and second level nodes based on the first number identifier of the first first level node, the second number identifier of the first and second level nodes, and the third number identifier of the second and second level nodes.
[0011] Since the first level node connected to the input port node, the first level node connected to the first level node, and the second level node to which the output port node belongs in the multi-stage switching network are fixed, the target level 3 node determined based on the first number identifier, the second number identifier, and the third number identifier is fixed, and the target path determined thereby is also fixed, which means that when the input port node and the output port node are fixed, the first level 2 node can determine a unique target level 3 node, and then determine a unique fixed target path, so that the path for the first level 2 node to route the data packet upward to the level 3 node is unique, that is, the path for transmitting the data packet from the input port node to the output port node is unique and fixed, thereby solving the problem in the related art that the path for transmitting the data packet from the input port node to the output port node in the multi-stage switching network cannot be fixed, thereby avoiding the disorder of data when multiple data packets initiated by the input port node are transmitted, improving the accuracy of data packet transmission, and achieving the purpose of maintaining order when multiple data packets are transmitted from the input port node to the output port node in the multi-stage switching network. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 A topological structure diagram of a two-level bidirectional multi-level interconnection network provided in an embodiment of the present application; Figure 2 A multi-stage switching network for preserving the order of data packets provided in an embodiment of the present application; Figure 3 A topological diagram of a multi-stage switching network provided in an embodiment of the present application; Figure 4 A method for transmitting a data packet provided in an embodiment of the present application; Figure 5 is a schematic diagram of a first corresponding relationship provided by an embodiment of the present invention; Figure 6 A structural block diagram of a data packet transmission device provided in an embodiment of the present application; Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0016] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0017] In conjunction with the specific application environment architecture or the specific hardware architecture on which the execution of the data packet transmission method depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0018] The present application is applied to a scenario in which a data packet is transmitted from an input port node to an output port node in a multi-stage switching network.
[0019] The topology of a multi-stage switching network refers to the abstract connection mode in which various network devices (such as routers, switches, etc.) including computers in the network realize network interconnection. The multi-stage switching network topology is concerned with this connection relationship and its diagram, and does not care about the various details of the connected computers or devices. The nodes mainly refer to the various active devices connected in the network. Therefore, the computer network topology is composed of nodes and links.
[0020] The multi-stage switching network (e.g., Cols network) is the most commonly used network topology in on-chip networks. The original multi-stage switching network is a classic multi-stage interconnection network. The Cols network evolved from the Benes network, which is widely used in communication networks and multi-processor computer systems.
[0021] There is only one link between each module at each level of the multi-stage switching network, but there are multiple transmission paths to choose from between any input and output port nodes. Therefore, the multi-stage switching network has the characteristics of multi-path. Multiple equal-cost paths can provide redundancy while also supporting load balancing of services. In addition, the module scale and structure of each level of the node in the multi-stage switching network are the same, with modular characteristics and good scalability. However, when the scale of the multi-stage switching network increases, the number of routing nodes (also called nodes) and the number of connections in the multi-stage switching network will increase greatly. Figure 1 As shown, Figure 1 A topological structure diagram of a two-level bidirectional multi-level interconnection network provided in an embodiment of the present application.
[0022] Figure 1 Each link can transmit data in both directions, that is, it is full-duplex; Figure 1 The boxes in the figure are port nodes, a total of 32. The circles are routing nodes, with 8 first-level routing nodes and 4 second-level routing nodes. There are 4 port nodes on the first-level routing node. The port node is responsible for sending and collecting data packets. The port nodes can send data packets to each other; the routing node is responsible for forwarding data packets.
[0023] In the related routing technology, the input port node initiates a data packet routing request to its corresponding output port node. When a certain input port node initiates multi-packet data transmission to the same output port node, due to the path diversity of the topological structure of the multi-stage switching network, different packet data may match different routing paths for data packet routing transmission. Figure 1 Take the example of input port node 0 sending 3 packets of data to output terminal node 31. The order of these 3 packets of data when the input port node 0 initiates the transmission is data packet 1→data packet 2→data packet 3. Due to the routing diversity of the topology, the possible paths for each data packet are: Data packet 1 may choose the path: input terminal node 0 → first-level routing node 0 → second-level routing node 0 → first-level routing node 7 → output terminal node 31.
[0024] Data packet 2 may choose the path: input terminal node 0 → first-level routing node 0 → second-level routing node 1 → first-level routing node 7 → output terminal node 31.
[0025] Data packet 3 may choose the path: input terminal node 0 → first-level routing node 0 → second-level routing node 2 → first-level routing node 7 → output terminal node 31.
[0026] Since the difference among the three paths lies in the selection of the secondary routing node, data packet 1 selects secondary node 0, data packet 2 selects secondary node 1, and data packet 3 selects secondary node 2. Since the data routing in the interconnected structure of the multi-stage switching network is complicated, each secondary node will have data of different paths for routing and forwarding, that is, the "busyness" of each secondary routing node is different, which may cause the secondary node 0 selected by data packet 1 to be "the busiest", the secondary node 1 selected by data packet 2 to be "relatively busy", and the secondary node 2 selected by data packet 3 to be "idle". In other words, data packet 1, which arrives at secondary node 0 first, needs to wait for a long time to queue because of the "busiest" state of secondary node 0. Data packet 1 can be forwarded and output from secondary node 0 only after the task in front of it is completed; while data packet 3, which arrives at secondary node 2 last, can be forwarded and output immediately because of the "idle" state of secondary node 2; data packet 2 will be routed and output from the secondary node earlier than data packet 1 because of the "relatively busy" state of secondary node 1. Then, the data sent in the starting order of packet 1 → packet 2 → packet 3 arrives at the same target node in the order of packet 3 → packet 2 → packet 1, which will cause the output port node to receive packets out of order.
[0027] In the related art, a multi-stage switching network for data packet order preservation is proposed, the number of port nodes attached to the first-level routing node is m, the number of first-level routing nodes is n, the number of port nodes of the multi-node switching network is m×n, the number of second-level routing nodes is (n-1), and the first-level routing nodes are fully connected with the second-level routing nodes. Figure 2 As shown, Figure 2 A topological structure diagram of a data order-preserving multi-stage switching network provided in this application. Figure 2 In the example, the number of port nodes m attached to the first-level routing node is 4, the number of first-level routing nodes n is 8, the number of port nodes in the multi-node switching network is 4×8=32, and the number of second-level routing nodes is 7. This method can achieve data packet order preservation, but as the number of port nodes increases, the number of connections between the first-level routing nodes and the second-level routing nodes also increases, which increases the layout and wiring pressure of the integrated circuit where the back-end multi-level switching network is located.
[0028] Below Figure 3 Taking the multi-stage switching network shown as an example, the method provided in the embodiment of the present application is described.
[0029] like Figure 3 As shown, Figure 3 A topological diagram of a multi-stage switching network provided in an embodiment of the present application. Figure 3In the multi-stage switching network, the multiple levels include, from bottom to top: the level where the port node is located, the level where the primary node is located, the level where the secondary node is located, and the level where the tertiary node is located.
[0030] Each level in the multi-level switching network includes at least one node, wherein there is a transmission path between each node of the previous level and each node of the next level.
[0031] The input port nodes and output port nodes in the embodiment of the present application are at the level where the port nodes are located.
[0032] In some optional implementations, the data packet transmission device obtains n nodes and uses the n nodes as n first-level nodes; divides the n first-level nodes into k first-level groups, each of which includes First-level nodes; set k second-level nodes, and include each first-level group primary nodes are connected to the same secondary node; set The third-level nodes will The third-level nodes are divided into Three-level groups, each of which includes three-level nodes, each of which is fully connected to each second-level node; based on n first-level nodes, k second-level nodes and A multi-stage switching network is generated by using three-stage nodes, wherein each first-stage node is connected to at least one port node.
[0033] in, Indicates rounding up. For example, when n is 8 and k is 3, The value of is 3.
[0034] In some optional embodiments, before dividing n first-level nodes into k first-level groups, the data packet transmission device obtains layout information of the integrated circuit where the multi-level switching network is located; and determines the number k of first-level groups based on the layout information and the number n of first-level nodes.
[0035] The layout information may be the shape or size of the integrated circuit where the multi-stage switching network is located.
[0036] The secondary node is connected to the tertiary node upwards Root link is divided into Servings, each Each root link corresponds to a primary node. When each primary node routes to a third-level node through a secondary node, it can only use a fixed Root link.
[0037] For example, Figure 3Taking the number n of the first-level nodes in as 9 and the layout information that the shape of the integrated circuit where the multi-level switching network is located is a triangle as an example, the shape of the integrated circuit where the multi-level switching network is located is obtained as a triangle; based on the layout information and the number 9 of the first-level nodes, the number k of the first-level groups is determined to be 3.
[0038] Divide the 9 first-level nodes into 3 first-level groups, each of which includes 3 first-level nodes; set up 3 second-level nodes, and connect the 3 first-level nodes in each first-level group to the same second-level node (for example, connect the first-level node 0, the first-level node 1, and the first-level node 2 to the same second-level node 0); set up 6 third-level nodes, and divide the 6 third-level nodes into 3 third-level groups, each of which includes 2 third-level nodes, and each third-level node is fully connected with each second-level node; based on 9 first-level nodes, 3 second-level nodes, and 6 third-level nodes, a multi-level switching network is generated. Divide the 6 links connecting the second-level nodes to the third-level nodes upward into 3 parts, each with 2 links, and each part corresponds to a first-level node. When each first-level node routes to the third-level node through the second-level node, only 2 fixed links can be used (for example, when the first-level node 3 routes to the third-level node through the second-level node 1, only the link 1 between the second-level node 1 and the third-level node 2 and the link 2 between the second-level node 1 and the third-level node 3 can be used).
[0039] In the embodiment of the present application, the transmission device of the data packet can be any node in the multi-stage switching network.
[0040] It can be understood that by selecting appropriate groups for all nodes in the multi-stage switching network, the number of links in the entire multi-stage switching network is reduced, making it easier to layout and route the back-end. Even if the number of port nodes increases and the connection between the primary routing node and the secondary routing node is limited, the layout and routing pressure of the integrated circuit where the back-end multi-stage switching network is located will not be too great.
[0041] Figure 3 The multi-stage switching network shown is only used as an example and is not used to limit the technical solution of the present application. Those skilled in the art should understand that in the specific implementation process, the multi-stage switching network can also include more primary nodes, secondary nodes, tertiary nodes and port nodes, and the number of port nodes connected to the primary node and the number of nodes at each level can also be increased according to specific needs without limitation.
[0042] The method is described in detail below in conjunction with the execution flow of the data packet transmission method.
[0043] The embodiment of the present application provides a method for transmitting a data packet, which is applied to Figure 3 The multi-stage switching network shown in Figure 4 As shown, Figure 4A method for transmitting a data packet provided in an embodiment of the present application comprises the following steps: S401: The first second-level node receives a first routing request forwarded from the first first-level node.
[0044] The first routing request is used to request the transmission of a first data packet from the input port node to the output port node. The first routing request carries a first number identifier of the first first-level node, a second number identifier of the first second-level node, a third number identifier of the second second-level node to which the output port node belongs, a fourth number identifier of the second first-level node to which the output port node is connected, and the first data packet.
[0045] In some optional embodiments, before the first and second level nodes receive the first routing request forwarded from the first and second level nodes, the first and second level nodes receive the first routing request sent from the input port node; the first and second level nodes detect whether the first numbering identifier is the same as the fourth numbering identifier; if they are not the same, the first and second level nodes forward the first routing request to the first and second level nodes.
[0046] Exemplarily, taking the input port node as port node 1 and the output port as port node 30, that is, the first number identifier carried by the first routing request is 0 and the fourth number identifier is 7; the first level node detects that the first number identifier is different from the fourth number identifier, then the first level node forwards the first routing request to the first level 2 node.
[0047] It can be understood that the input port node and the output port node are located under different first-level nodes, and the transmission of the first data packet in the first routing request needs to be forwarded through the second-level node. Therefore, the first first-level node needs to forward the first routing request to the first second-level node.
[0048] Optionally, if the first level node detects that the first number identifier is the same as the fourth number identifier, the first data packet is transmitted to the output port node.
[0049] It can be understood that the input port node and the output port node are located under the same first-level node, that is, the first data packet in the first routing request can be routed and transmitted within the first-level node.
[0050] S402: When the first and second nodes detect that the second numbering identifier is different from the third numbering identifier, the first and second nodes determine the target third-level node from the multiple third-level nodes connected to the first and second nodes based on the first numbering identifier, the second numbering identifier and the third numbering identifier, and determine the target path between the target third-level node and the output port node.
[0051] Among them, the target number identifier of the target third-level node matches the first number identifier, the second number identifier and the third number identifier and is unique.
[0052] In some optional embodiments, when the first and second nodes detect that the second numbering identifier is different from the third numbering identifier, the first and second nodes determine at least one candidate third-level node from multiple third-level nodes connected to the first and second nodes based on the first numbering identifier; the first and second nodes determine the target third-level node from at least one candidate third-level node based on the first numbering identifier, the second numbering identifier, and the third numbering identifier, and determine the target path between the target third-level node and the output port node.
[0053] In one example, when the first and second-level nodes detect that the second numbering identifier is different from the third numbering identifier, the first and second-level nodes determine the order of the first first-level node in the first-level group where the first first-level node is located based on the first numbering identifier; encode the order to obtain a first target code; and determine at least one candidate third-level node based on the first target code and the first corresponding relationship.
[0054] The order is a decimal value. Since the primary node routes the secondary node upward through the port, the order can also be understood as the port at which the first secondary node receives the first routing request forwarded by the first primary node.
[0055] The first corresponding relationship is a corresponding relationship between the first target code and at least one candidate third-level node.
[0056] In one example, the first and second level nodes encode the order to obtain a first target code, including: the first and second level nodes binary encode the order to obtain an initial code, and subtract a preset value from the initial code to obtain the first target code.
[0057] The preset value can be set according to actual needs without limitation. For example, the preset value can be 1. The first target code can also be understood as the port number of the first-level node receiving the first routing request forwarded by the first-level node.
[0058] For example, Figure 3 For example, in Figure 3 In the example, the order of the first first-level node in the first-level group where the first first-level node is located can be 1, 2, or 3. For example, if the first first-level node is first-level node 1, the order of first-level node 1 in the first-level group where the first first-level node is located is 2; the first second-level node encodes the order 2, and obtains the first target code 01; for another example, if the first first-level node is first-level node 5, the order of first-level node 5 in the first-level group where the first first-level node is located is 3, and the first second-level node encodes the order 3, and obtains the first target code 10.
[0059] In one example, Figure 3 For example, Figure 5 As shown, Figure 5is a schematic diagram of a first corresponding relationship provided by an embodiment of the present invention; Figure 5 In the embodiment, when the first target code is 00, the first and second-level nodes determine at least one candidate third-level node as third-level node 0 and third-level node 1 based on the first target code and the first corresponding relationship; when the first target code is 01, the first and second-level nodes determine at least one candidate third-level node as third-level node 2 and third-level node 3 based on the first target code and the first corresponding relationship; when the first target code is 10, the first and second-level nodes determine at least one candidate third-level node as third-level node 4 and third-level node 5 based on the first target code and the first corresponding relationship.
[0060] Exemplarily, taking the input port node as port node 1 and the output port as port node 30, that is, the second number identifier carried by the first routing request is 0 and the third number identifier is 2; when the first and second level nodes detect that the second number identifier 0 is different from the third number identifier 2, based on the first number identifier 0, determine the order 1 of the first level node 0 in the first level group where the first level node 0 is located; encode the order to obtain the first target code 00; based on the first target code 00 and the first corresponding relationship, determine at least one candidate third level node as third level node 0 and third level node 1.
[0061] Further, the first and second level nodes determine the target third level node from at least one candidate third level node based on the number k of second level nodes in the multi-level switching network, the order corresponding to the first numbering identifier, the second numbering identifier, and the third numbering identifier. The first and second level nodes compare the size between the second numbering identifier and the third numbering identifier, specifically including the following two situations: Case 1: If the second numbering identifier is greater than the third numbering identifier, the first and second level nodes determine the target third level node based on the number k of second level nodes in the multi-level switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier and the first relationship, the first relationship: : .
[0062] in, is the target number identifier of the target third-level node, is the second number identifier, The third number identification, The first number identifies the corresponding sequence.
[0063] Case 2: If the second numbering identifier is less than the third numbering identifier, the first and second-level nodes determine the target third-level node based on the number k of second-level nodes in the multi-level switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier, and the second relationship. The second relationship is: : .
[0064] Below Figure 3 For example, from the three cases where the first target code is 00, 01 or 11, enumerate the target third-level nodes.
[0065] Case 1: When the first target code is 00 (the port number of the first second-level node receiving the first routing request forwarded by the first first-level node is 00), the relationship for determining the target third-level node is as follows: : .
[0066] : .
[0067] As shown in Table 1 below, Table 1 is a schematic table of target third-level node enumeration results corresponding to Case 1.
[0068] Table 1: Schematic diagram of target level 3 node enumeration results corresponding to case 1
[0069] Case 2: When the first target code is 01 (the port number of the first second-level node receiving the first first-level node forwarding the first routing request is 01), the relationship for determining the target third-level node is as follows: : .
[0070] : .
[0071] As shown in Table 2 below, Table 2 is a schematic table of target third-level node enumeration results corresponding to Case 2.
[0072] Table 2: Schematic diagram of target third-level node enumeration results corresponding to case 2
[0073] Case 3: When the first target code is 10 (the port number of the first second-level node receiving the first routing request forwarded by the first first-level node is 10), the relationship for determining the target third-level node is as follows: : .
[0074] : .
[0075] As shown in Table 3 below, Table 3 is a schematic table of target third-level node enumeration results corresponding to Case 3.
[0076] Table 3: Schematic diagram of target level 3 node enumeration results corresponding to case 3
[0077] In some optional embodiments, when the first and second level nodes detect that the second numbering identifier is the same as the third numbering identifier, based on the fourth numbering identifier, forward the first data packet to the second first level node corresponding to the fourth numbering identifier, so that the second first level node transmits the first data packet to the output port node.
[0078] It can be understood that the input port node and the output port node are located under the same secondary node, that is, the first data packet in the first routing request is routed and transmitted inside the secondary node.
[0079] S403: The first and second-level nodes transmit the first routing request to the target third-level node, so that the target third-level node transmits the first data packet to the output port node through the target path.
[0080] In some optional implementations, the first and second-level nodes determine the target path according to the target number identifier, the third number identifier, and the fourth number identifier of the target third-level node.
[0081] The target path is composed of a first path, a second path and a third path. The first path is the path between the target third-level node and the second second-level node, the second path is the path between the second second-level node and the second first-level node, and the third path is the path between the second first-level node and the output port node.
[0082] It can be understood that the target third-level node receives the first routing request sent from the first second-level node, and transmits the first data packet to the second second-level node through the first path; the second second-level node transmits the first data packet to the second first-level node through the second path; the second first-level node transmits the first data packet to the output port node through the third path.
[0083] Optionally, the first level-1 node receives a second routing request sent from the input port node, the second routing request being used to request transmission of a second data packet from the input port node to the output port node; upon detecting that the first numbering identifier is different from the fourth numbering identifier, the first level-1 node forwards the second routing request to the first level-2 node; the first level-2 node receives the second routing request forwarded from the first level-1 node; upon detecting that the second numbering identifier is different from the third numbering identifier, the first level-2 node transmits the second routing request to the target level-3 node, so that the target level-3 node transmits the second data packet to the output port node through the target path.
[0084] It can be understood that, since the input port node and the output port node in the second routing request are consistent with the input port node and the output port node in the first routing request, a fixed link will be allocated according to the input port node and the output port node, so that the path from the secondary node to the tertiary node is fixed (dedicated). Since the path from the primary node to the secondary node is unique, for routing requests with the same input port node and output port node, the path from the primary node where the input port node is located to the tertiary node is unique and fixed, and the path from the tertiary node to the primary node where the output port node is located is also unique and fixed, so the purpose of data packet order preservation can be achieved. In addition, the path from the primary node where the input port node is located to the primary node where the output port node is located is unique and fixed, making the logic of all routing nodes simple and easy to implement in hardware.
[0085] Through the above Figure 4 According to the method, when the first and second level nodes in the multi-stage switching network receive a first routing request forwarded from the first first level node and detect that the second number identifier is different from the third number identifier, that is, when it is detected that the first and second level nodes to which the input port node belongs and the second and second level nodes to which the output port node belongs are not the same second level node, a target third level node is determined from multiple third level nodes connected to the first and second level nodes according to the first number identifier of the first first level node, the second number identifier of the first and second level nodes, and the third number identifier of the second and second level nodes.
[0086] Since the first level node connected to the input port node, the first level node connected to the first level node, and the second level node to which the output port node belongs in the multi-stage switching network are fixed, the target level 3 node determined based on the first number identifier, the second number identifier, and the third number identifier is fixed, and the target path determined thereby is also fixed, which means that when the input port node and the output port node are fixed, the first level 2 node can determine a unique target level 3 node, and then determine a unique fixed target path, so that the path for the first level 2 node to route the data packet upward to the level 3 node is unique, that is, the path for transmitting the data packet from the input port node to the output port node is unique and fixed, thereby solving the problem in the related art that the path for transmitting the data packet from the input port node to the output port node in the multi-stage switching network cannot be fixed, thereby avoiding the disorder of data when multiple data packets initiated by the input port node are transmitted, improving the accuracy of data packet transmission, and achieving the purpose of maintaining order when multiple data packets are transmitted from the input port node to the output port node in the multi-stage switching network.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0088] The embodiment of the present application also provides a data packet transmission device, which is applied to a multi-stage switching network. Each level in the multi-stage switching network includes at least one node, wherein each node of the previous level and each node of the next level are a transmission path, such as Figure 6 As shown, Figure 6 A structural block diagram of a data packet transmission device provided in an embodiment of the present application; the device includes: The transceiver module 601 is used to receive a first routing request forwarded from a first first-level node, where the first routing request is used to request transmission of a first data packet from an input port node to an output port node, and the first routing request carries a first number identifier of the first first-level node, a second number identifier of the first second-level node, a third number identifier of a second second-level node to which the output port node belongs, and a first data packet.
[0089] Processing module 602 is used to determine the target third-level node from multiple third-level nodes connected to the first and second-level nodes based on the first numbering identifier, the second numbering identifier and the third numbering identifier when it is detected that the second numbering identifier is different from the third numbering identifier, and determine the target path between the target third-level node and the output port node.
[0090] The transceiver module 601 is further used to transmit the first routing request to the target third-level node, so that the target third-level node transmits the first data packet to the output port node through the target path.
[0091] In some optional implementations, the transceiver module 601 is further used to obtain n nodes and use the n nodes as n first-level nodes, each of which is connected to at least one port node; the processing module 602 is further used to divide the n first-level nodes into k first-level groups, each of which includes The processing module 602 is also used to set k secondary nodes, including each primary group The first-level nodes are connected to the same second-level node; the processing module 602 is also used to set The third-level nodes will The third-level nodes are divided into Three-level groups, each of which includes The processing module 602 is also used to process the n first-level nodes, k second-level nodes and Three-level nodes generate a multi-level switching network.
[0092] In some optional embodiments, the processing module 602 is specifically used to determine at least one candidate third-level node from multiple third-level nodes connected to the first and second-level nodes based on the first numbering identifier when it is detected that the second numbering identifier is different from the third numbering identifier; determine the target third-level node from at least one candidate third-level node based on the first numbering identifier, the second numbering identifier, and the third numbering identifier, and determine the target path between the target third-level node and the output port node.
[0093] In some optional embodiments, the processing module 602 is also specifically used to determine the order of the first-level node in the first-level group where the first-level node is located based on the first numbering identifier when it is detected that the second numbering identifier is different from the third numbering identifier; encode the order to obtain a first target code; and determine at least one candidate third-level node based on the first target code and the first corresponding relationship, the first corresponding relationship being the corresponding relationship between the first target code and at least one candidate third-level node.
[0094] In some optional implementations, the processing module 602 is further specifically used to determine a target third-level node from at least one candidate third-level node based on the number k of second-level nodes in the multi-stage switching network, the order corresponding to the first numbering identifier, the second numbering identifier and the third numbering identifier.
[0095] In some optional implementations, the processing module 602 is further specifically used to compare the size between the second numbering identifier and the third numbering identifier; if the second numbering identifier is greater than the third numbering identifier, the target third-level node is determined based on the number k of the second-level nodes in the multi-level switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier and the first relationship, the first relationship: ; The processing module 602 is further specifically configured to determine the target third-level node based on the number k of second-level nodes in the multi-level switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier, and a second relationship if the second numbering identifier is less than the third numbering identifier, wherein the second relationship is: ; in, is the target number identifier of the target third-level node, is the second number identifier, The third number identification, The first number identifies the corresponding sequence.
[0096] In some optional embodiments, the first routing request carries the fourth number identifier of the second first-level node to which the output port node is connected; the processing module 602 is also specifically used to determine the target path based on the target number identifier, the third number identifier and the fourth number identifier of the target third-level node, the target path consisting of a first path, a second path and a third path, the first path being the path between the target third-level node and the second second-level node, the second path being the path between the second second-level node and the second first-level node, and the third path being the path between the second first-level node and the output port node.
[0097] In some optional embodiments, the processing module 602 is also used to forward the first data packet to the second level node corresponding to the fourth numbering identifier based on the fourth numbering identifier when it is detected that the second numbering identifier is the same as the third numbering identifier, so that the second level node transmits the first data packet to the output port node.
[0098] In some optional embodiments, before the first and second level nodes receive the first routing request forwarded from the first first level node, the transceiver module 601 is also used to receive the first routing request sent from the input port node; the processing module 602 is also used to detect whether the first number identifier is the same as the fourth number identifier; if they are not the same, the first routing request is forwarded to the first and second level nodes.
[0099] In some optional implementations, the processing module 602 is further configured to transmit the first data packet to the output port node if it is detected that the first number identifier is the same as the fourth number identifier.
[0100] In some optional implementations, before dividing n first-level nodes into k first-level groups, the processing module 602 is further used to obtain layout information of the integrated circuit where the multi-stage switching network is located; and determine the number k of the first-level groups based on the layout information and the number n of first-level nodes.
[0101] In some optional embodiments, the transceiver module 601 is also used to receive a second routing request sent from the input port node, and the second routing request is used to request the transmission of a second data packet from the input port node to the output port node; the processing module 602 is also used to forward the second routing request to the first and second-level nodes when it is detected that the first numbering identifier is different from the fourth numbering identifier; the transceiver module 601 is also used to receive the second routing request forwarded from the first and first-level nodes; the processing module 602 is also used to transmit the second routing request to the target third-level node when it is detected that the second numbering identifier is different from the third numbering identifier, so that the target third-level node transmits the second data packet to the output port node through the target path.
[0102] For the description of the features in the embodiment corresponding to the data packet transmission device, reference can be made to the relevant description of the embodiment corresponding to the data packet transmission method, which will not be repeated here.
[0103] The embodiment of the present application also provides an electronic device, such as Figure 7 As shown, Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application, the electronic device includes a processor 70 and a memory 71, the memory 71 stores a computer program, and the processor 70 is configured to run the computer program to execute the steps in any of the above-mentioned data packet transmission method embodiments.
[0104] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned data packet transmission method embodiments when running.
[0105] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0106] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned data packet transmission method embodiments are implemented.
[0107] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned data packet transmission method embodiments are implemented.
[0108] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0109] The above is a detailed introduction to a data packet transmission method, device, electronic device, storage medium and product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for transmitting a data packet, characterized in that: Applied to a multi-stage switching network, each level of the multi-stage switching network includes at least one node, wherein there is a transmission path between each node of the previous level and each node of the next level, the method includes: The first second-level node receives a first routing request forwarded from the first first-level node, the first routing request is used to request transmission of a first data packet from the input port node to the output port node, and the first routing request carries a first number identifier of the first first-level node, a second number identifier of the first second-level node, a third number identifier of the second second-level node to which the output port node belongs, and the first data packet; When the first second-level node detects that the second numbering identifier is different from the third numbering identifier, the first second-level node determines a target third-level node from a plurality of third-level nodes connected to the first second-level node according to the first numbering identifier, the second numbering identifier, and the third numbering identifier, and determines a target path between the target third-level node and the output port node; The first level 2 node transmits the first routing request to the target level 3 node, so that the target level 3 node transmits the first data packet to the output port node through the target path.
2. The method for transmitting a data packet according to claim 1, characterized in that: The method further comprises: Obtain n nodes, and use the n nodes as n first-level nodes, each of the first-level nodes being connected to at least one port node; The n first-level nodes are divided into k first-level groups, each of which includes the first-level nodes; Set k secondary nodes, and include each primary group The first-level nodes are connected to the same second-level node; set up The third-level nodes will The three-level nodes are divided into three-level groups, each of which includes The third-level nodes, each of the third-level nodes is fully connected with each of the second-level nodes; Based on n said first-level nodes, k said second-level nodes and The three-level nodes are used to generate the multi-level switching network.
3. The method for transmitting a data packet according to claim 2, characterized in that: When the first second-level node detects that the second numbering identifier is different from the third numbering identifier, determining a target third-level node from a plurality of third-level nodes connected to the first second-level node according to the first numbering identifier, the second numbering identifier, and the third numbering identifier, includes: When the first second-level node detects that the second numbering identifier is different from the third numbering identifier, the first second-level node determines at least one candidate third-level node from the plurality of third-level nodes connected to the first second-level node based on the first numbering identifier; The first second-level node determines the target third-level node from the at least one candidate third-level node based on the first number identifier, the second number identifier and the third number identifier, and determines the target path between the target third-level node and the output port node.
4. The method for transmitting a data packet according to claim 3, characterized in that: When the first second-level node detects that the second numbering identifier is different from the third numbering identifier, the first second-level node determines at least one candidate third-level node from the plurality of third-level nodes connected to the first second-level node based on the first numbering identifier, including: When detecting that the second numbering identifier is different from the third numbering identifier, the first second-level node determines, based on the first numbering identifier, an order of the first first-level node in the first-level group where the first first-level node is located; The first secondary node performs encoding processing on the order to obtain a first target code; The first second-level node determines the at least one candidate third-level node based on the first target code and a first corresponding relationship, where the first corresponding relationship is a corresponding relationship between the first target code and the at least one candidate third-level node.
5. The method for transmitting a data packet according to claim 4, characterized in that: The first second-level node determines the target third-level node from the at least one candidate third-level node based on the first numbering identifier, the second numbering identifier, and the third numbering identifier, including: The first secondary node determines the target third-level node from the at least one candidate third-level node based on the number k of the second-level nodes in the multi-stage switching network, the order corresponding to the first numbering identifier, the second numbering identifier and the third numbering identifier.
6. The method for transmitting a data packet according to claim 5, characterized in that: The first secondary node determines the target third-level node from the at least one candidate third-level node based on the number k of the second-level nodes in the multi-stage switching network, the order corresponding to the first numbering identifier, the second numbering identifier, and the third numbering identifier, including: The first secondary node compares the second numbering identifier with the third numbering identifier; If the second numbering identifier is greater than the third numbering identifier, the first secondary node determines the target third-level node based on the number k of the secondary nodes in the multi-stage switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier and a first relational expression, wherein the first relational expression is: ; If the second numbering identifier is less than the third numbering identifier, the first secondary node determines the target third-level node based on the number k of the secondary nodes in the multi-stage switching network, the order corresponding to the first numbering identifier, the second numbering identifier, the third numbering identifier, and a second relationship, wherein the second relationship is: ; in, is the target number identifier of the target third-level node, is the second number identifier, is the third numbering identifier, The order corresponding to the first number identifier is identified.
7. The method for transmitting a data packet according to claim 6, characterized in that: The first routing request carries a fourth number identifier of a second first-level node connected to the output port node; and determining a target path between the target third-level node and the output port node includes: The first second-level node determines the target path based on the target number identifier, the third number identifier and the fourth number identifier of the target third-level node, and the target path consists of a first path, a second path and a third path, the first path is the path between the target third-level node and the second second-level node, the second path is the path between the second second-level node and the second first-level node, and the third path is the path between the second first-level node and the output port node.
8. The method for transmitting a data packet according to claim 7, characterized in that: The method further comprises: When the first second-level node detects that the second numbering identifier is the same as the third numbering identifier, the first second-level node forwards the first data packet to the second first-level node corresponding to the fourth numbering identifier based on the fourth numbering identifier, so that the second first-level node transmits the first data packet to the output port node.
9. The method for transmitting a data packet according to claim 8, characterized in that: Before the first secondary node receives the first routing request forwarded from the first primary node, the method further includes: The first level node receives the first routing request sent from the input port node; The first level node detects whether the first numbering identifier is the same as the fourth numbering identifier; If they are not the same, the first level one node forwards the first routing request to the first level two node.
10. The method for transmitting a data packet according to claim 9, characterized in that: The method further comprises: If the first level node detects that the first number identifier is the same as the fourth number identifier, the first data packet is transmitted to the output port node.
11. The method for transmitting a data packet according to claim 10, characterized in that: Before dividing the n first-level nodes into k first-level groups, the method further includes: Acquire layout information of the integrated circuit where the multi-stage switching network is located; The number k of the first-level groups is determined according to the layout information and the number n of the first-level nodes.
12. The method for transmitting a data packet according to claim 11, characterized in that: The method further comprises: The first level node receives a second routing request sent from the input port node, where the second routing request is used to request transmission of a second data packet from the input port node to the output port node; When the first level-1 node detects that the first numbering identifier is different from the fourth numbering identifier, the first level-1 node forwards the second routing request to the first level-2 node; The first secondary node receives the second routing request forwarded by the first primary node; When detecting that the second numbering identifier is different from the third numbering identifier, the first second-level node transmits the second routing request to the target third-level node, so that the target third-level node transmits the second data packet to the output port node through the target path.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for transmitting a data packet as claimed in any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for transmitting a data packet as claimed in any one of claims 1 to 12.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for transmitting a data packet as claimed in any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
CLOS network, construction method, transmission method, system, equipment and medium
CN117082014A
Data packet forwarding method and device, storage medium and electronic equipment
CN117097661A
Data packet transmission method and system, storage medium and electronic device
CN117155851A
Data transmission method, device and equipment, switch chip and storage medium
CN118413478A
Cluster Oriented Dynamic Routing
US20210021512A1
Cited By
Three-level transmission network, data transmission method, device, equipment, medium and product
CN121585593A