A method for transmitting data packets, an electronic device, a storage medium, and a product
By determining and fixing the transmission path of data packets in a multi-level switching network, the problem of the inability to fix the packet transmission path is solved, and accurate and order-safe transmission of data packets is achieved.
Patent Information
- Application Number
- CN202510246840.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The path of data packets transmitted through input port nodes to output port nodes in a multi-level switching network cannot be fixed, resulting in out-of-order phenomenon during data packet transmission, affecting the accuracy of data transmission.
By establishing a fixed transmission path between each hierarchical node of the multi-level switching network, the specific steps include the first and second-level nodes receiving routing requests, detecting differences in number identifications, and determining the target tertiary node and target path based on these identifications, thereby ensuring a unique and fixed transmission path of the data packet.
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 the phenomenon of out-of-order data packets, improves the accuracy of packet transmission, and ensures the order-keeping transmission of multiple data packets.
Smart Images

Figure CN119728524B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method for transmitting data packets, an electronic device, a storage medium, and a product. Background Art
[0002] A multi-stage switching network (also known as a CLOS network) is one of the most commonly used network topologies for on-chip networks. It is evolved from the Benes network and is widely used in communication networks and multi-processor computer systems. There is one and only one link between each routing node at each level of the multi-stage switching network, but there are multiple paths available between any source routing node and 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 topology 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 degrees of different routing nodes are 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 further leads to out-of-order data during the transmission of multiple data packets initiated by the input port node, resulting in data transmission errors. Summary of the Invention
[0004] This application provides a method for transmitting data packets, an electronic device, a storage medium, and a product, so as to at least solve the problem in the related art that the path for a data packet to be transmitted from an input port node to an output port node in a multi-stage switching network cannot be fixed.
[0005] This application provides a method for transmitting data packets, which is applied to a multi-stage switching network. Each level in the multi-stage switching network includes at least one node, and there is a transmission path between each node in the upper level and each node in the lower level. The method includes:
[0006] A first secondary node receives a first routing request forwarded from a first primary node. The first routing request is used to request to transmit a first data packet from an input port node to an output port node. The first routing request carries a first number identifier of the first primary node, a second number identifier of the first secondary node, a third number identifier of a second secondary node to which the output port node belongs, and the first data packet. When the first secondary node detects that the second number identifier is different from the third number identifier, the first secondary node determines a target tertiary node from multiple tertiary nodes connected to the first secondary node according to the first number identifier, the second number identifier, and the third number identifier, and determines a target path between the target tertiary node and the output port node. The first secondary node transmits the first routing request to the target tertiary node, so that the target tertiary node transmits the first data packet to the output port node through the target path.
[0007] The present application also provides a transmission device for data packets, which is applied to a multi-level switching network. Each level in the multi-level switching network includes at least one node, and there is a transmission path between each node in the upper level and each node in the lower level, including:
[0008] A transceiver module, configured to receive a first routing request forwarded from a first first-level node. The first routing request is used to request to transmit a first data packet from an input port node to an output port node, and the first routing request carries a first identification number of the first first-level node, a second identification number of a first second-level node, a third identification number of a second second-level node to which the output port node belongs, and the first data packet;
[0009] A processing module, configured to, when detecting that the second identification number is different from the third identification number, determine a target third-level node from multiple third-level nodes connected to the first second-level node according to the first identification number, the second identification number, and the third identification number, and determine a target path between the target third-level node and the output port node;
[0010] The transceiver module is further configured 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.
[0011] The present application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above data packet transmission methods when executing the computer program.
[0012] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above data packet transmission methods are implemented.
[0013] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above data packet transmission methods are implemented.
[0014] Through the present application, when the first second-level node in the multi-level switching network receives the first routing request forwarded from the first first-level node and detects that the second identification number is different from the third identification number, that is, when it detects that the first second-level node to which the input port node belongs and the second second-level node 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 second-level node according to the first identification number of the first first-level node, the second identification number of the first second-level node, and the third identification number of the second second-level node.
[0015] Since the first-level nodes connected to the input port nodes, the second-level nodes connected to the first-level nodes, and the second-level nodes to which the output port nodes belong in the multi-level switching network are fixed, the target three-level nodes determined based on the first identification number, the second identification number, and the third identification number are fixed. Consequently, the determined target paths are also fixed. That is to say, when the input port nodes and the output port nodes are fixed, the first second-level nodes can determine a unique target three-level node, and then determine a unique and fixed target path, making the path for the first second-level nodes to route data packets upward to the three-level nodes unique. That is, the path for transmitting data packets from the input port nodes to the output port nodes is unique and fixed, solving the problem in the related art that the paths for data packets to be transmitted from the input port nodes to the output port nodes in the multi-level switching network cannot be fixed. Furthermore, it avoids the out-of-order phenomenon of data when multiple data packets are transmitted from the input port nodes, improves the accuracy of data packet transmission, and achieves the purpose of maintaining the order of multiple data packets when they are transmitted from the input port nodes to the output port nodes in the multi-level switching network. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 Topological structure diagram of a two-level bidirectional multi-level interconnection network provided by an embodiment of the present application;
[0018] Figure 2 Multi-level switching network for maintaining the order of data packets provided by an embodiment of the present application;
[0019] Figure 3 Topological structure diagram of the multi-level switching network provided by an embodiment of the present application;
[0020] Figure 4 Transmission method of a data packet provided by an embodiment of the present application;
[0021] Figure 5 Schematic diagram of the first corresponding relationship provided by an embodiment of the present invention;
[0022] Figure 6 Structural block diagram of the data packet transmission device provided by an embodiment of the present application;
[0023] Figure 7 Hardware structure schematic diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the protection scope of the present application.
[0025] It should be noted that in the description of the present 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 not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0026] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0027] In combination with the specific application environment architecture or specific hardware architecture on which the execution of the data packet transmission method depends, the specific application environment architecture or specific hardware architecture is described herein.
[0028] The present application is applied to the scenario of transmitting data packets from an input port node to an output port node in a multi-stage switching network.
[0029] The topological structure of a multi-stage switching network refers to the abstract connection method shown by various network devices (such as routers, switches, etc.) including computers in the network to achieve network interconnection. What the multi-stage switching network topology concerns is this connection relationship and its graphical representation, and does not care about various details of the connected computers or devices. The nodes therein mainly refer to various active devices connected in the network. Therefore, the computer network topological structure is composed of nodes and links.
[0030] The multi-stage switching network (for example, the Cols network) is one of the most commonly used network topologies for on-chip networks. The original multi-stage switching network is a classic multi-stage interconnection network. The Cols network is evolved on the basis of the Benes network, and this network is widely used in communication networks and multi-processor computer systems.
[0031] There is one and only one link between each module at all levels of the multi - level switching network. However, there are multiple transmission paths available between any input and output port nodes. Therefore, the multi - level switching network has the characteristic of multi - path. Multiple equivalent paths can provide redundancy and support load balancing of services at the same time. In addition, the module scale and structure of each - level node in the multi - level switching network are the same, with the characteristic of modularity and good scalability. However, when the scale of the multi - level switching network increases, the number of routing nodes (also called nodes) and the number of connections in the multi - level switching network increase significantly. As Figure 1 shown Figure 1 is a topological structure diagram of a two - level bidirectional multi - level interconnection network provided by an embodiment of the present application.
[0032] Figure 1 Each link in it can transmit data bidirectionally, that is, it is full - duplex; Figure 1 The boxes in it are port nodes (port nodes), a total of 32. The circles are routing nodes. There are 8 first - level routing nodes and 4 second - level routing nodes. 4 port nodes are attached to the first - level routing nodes. The port nodes are responsible for sending and collecting data packets, and the port nodes can send data packets to each other; the routing nodes are responsible for forwarding data packets.
[0033] In related routing technologies, 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 - level switching network, different packet data may match different routing paths for data - packet routing transmission. For example, taking the case where the input port node 0 in Figure 1 sends 3 packets of data to the output terminal node 31 as an example, the order of these 3 packets of data when initiated for transmission at the input port node 0 is data packet 1 → data packet 2 → data packet 3. Due to the routing diversity of the topology, the possible selected paths for each data packet are respectively:
[0034] Data packet 1 may select 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.
[0035] Data packet 2 may select 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.
[0036] Data packet 3 may select 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.
[0037] Since the difference among the three paths lies in the selection of the secondary routing nodes, Packet 1 selects secondary node 0, Packet 2 selects secondary node 1, and Packet 3 selects secondary node 2. Due to the intricate data routing in the interconnection structure of the multi-level switching network, different paths of data will be routed and forwarded at each secondary node, that is, there are differences in the "busyness" of each secondary routing node. This may result in the situation where the secondary node 0 selected by Packet 1 is the "busiest", the secondary node 1 selected by Packet 2 is "busier", and the secondary node 2 selected by Packet 3 is "idle". That is to say, Packet 1 that first arrives at secondary node 0 needs to wait for a long time to queue because of the "busiest" state of secondary node 0, and it can be forwarded and output from secondary node 0 only after the tasks in front of it are completed; while Packet 3 that finally arrives at secondary node 2 can be immediately forwarded and output because of the "idle" state of secondary node 2; Packet 2 will be routed and output from the secondary node earlier than Packet 1 because of the "busier" state of secondary node 1. Then, the order of the data sent in the starting order of Packet 1 → Packet 2 → Packet 3 when reaching the same target node becomes Packet 3 → Packet 2 → Packet 1, which will cause the error of out-of-order received packets at the output port node.
[0038] In the related art, a multi-level switching network for 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 in the multi-level switching network is m×n, the number of secondary routing nodes is (n - 1), and the first-level routing nodes are fully connected to the secondary routing nodes. As Figure 2 shown, Figure 2 This is the topological structure diagram of a data order-preserving multi-level switching network provided by the present application. In Figure 2 it, the number m of port nodes attached to the first-level routing node is 4, the number n of first-level routing nodes is 8, the number of port nodes in the multi-level switching network is 4×8 = 32, and the number of secondary routing nodes is 7. This method can achieve packet order preservation, but as the number of port nodes increases, the connections between the first-level routing nodes and the secondary routing nodes also increase, increasing the pressure on the layout and wiring of the integrated circuit where the backend multi-level switching network is located.
[0039] Next, taking the multi-level switching network Figure 3 shown as an example, the method provided by the embodiments of the present application will be described.
[0040] As Figure 3 shown, Figure 3 This is the topological structure diagram of the multi-level switching network provided by the embodiments of the present application. Figure 3In [the above], the multi - level switching network includes multiple levels. In the multi - level switching network, the multiple levels from bottom to top include: the level where the port nodes are located, the level where the first - level nodes are located, the level where the second - level nodes are located, and the level where the third - level nodes are located.
[0041] Each level in the multi - level switching network includes at least one node, and there is a transmission path between each node in the upper level and each node in the lower level.
[0042] The input port nodes and output port nodes in the embodiments of the present application are at the level where the port nodes are located.
[0043] In some alternative embodiments, the data packet transmission device acquires n nodes and uses the n nodes as n first - level nodes; divides the n first - level nodes into k first - level groups, and each first - level group includes first - level nodes; sets k second - level nodes, and connects the first - level nodes included in each first - level group to the same second - level node; sets third - level nodes, divides the third - level nodes into third - level groups, and each third - level group includes third - level nodes, and each third - level node is fully connected to each second - level node; generates a multi - level switching network based on the n first - level nodes, k second - level nodes, and third - level nodes. Among them, each first - level node is connected to at least one port node.
[0044] Among them, represents the ceiling operation. For example, when n is 8 and k is 3, the value of is 3.
[0045] In some alternative embodiments, before dividing the n first - level nodes into k first - level groups, the data packet transmission device acquires the layout information of the integrated circuit where the multi - level switching network is located; determines the number k of first - level groups according to the layout information and the number n of first - level nodes.
[0046] Among them, the layout information may be the shape or size of the integrated circuit where the multi - level switching network is located.
[0047] The root links through which the second - level nodes are connected upward to the third - level nodes are divided into parts, and each part has root links, and each part corresponds to a first - level node respectively. When each first - level node routes to the third - level node through the second - level node, it can only use the fixed root links. root links.
[0048] Exemplarily, taking Figure 3The number n of the first-level nodes is 9. Taking the shape of the integrated circuit where the multi-stage switching network is located as a triangle as an example of the layout information, the shape of the integrated circuit where the multi-stage switching network is located is obtained as a triangle; according to this layout information and the number 9 of the first-level nodes, the number k of the first-level groups is determined to be 3.
[0049] The 9 first-level nodes are divided into 3 first-level groups, and each first-level group includes 3 first-level nodes; 3 second-level nodes are set, and the 3 first-level nodes included in each first-level group are connected to the same second-level node (for example, the first-level node 0, the first-level node 1, and the first-level node 2 are connected to the same second-level node 0); 6 third-level nodes are set, the 6 third-level nodes are divided into 3 third-level groups, each third-level group includes 2 third-level nodes, and each third-level node is fully connected to each second-level node; based on the 9 first-level nodes, 3 second-level nodes, and 6 third-level nodes, a multi-stage switching network is generated. The 6 links connecting the second-level nodes upward to the third-level nodes are divided into 3 portions, each portion has 2 links, and each portion corresponds to a first-level node respectively. When each first-level node routes through the second-level node to the third-level node, only the fixed 2 links can be used (for example, when the first-level node 3 routes through the second-level node 1 to the third-level node, 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).
[0050] In the embodiment of the present application, the data packet transmission device can be any node in the multi-stage switching network.
[0051] It can be understood that by selecting appropriate grouping for all nodes in the multi-stage switching network, the number of links in the entire multi-stage switching network is reduced, which is conducive to the backend layout and wiring. Even as the number of port nodes increases, the connection between the first-level routing nodes and the second-level routing nodes is limited, and the pressure on the layout and wiring of the integrated circuit where the backend multi-stage switching network is located will not be too great.
[0052] Figure 3 The multi-stage switching network shown is only for illustration and is not used to limit the technical solutions of the present application. Those skilled in the art should understand that in the specific implementation process, the multi-stage switching network may further include more first-level nodes, second-level nodes, third-level nodes, and port nodes. At the same time, the number of connections between the first-level nodes and the port nodes and the number of nodes at each level can also be determined according to specific needs, without limitation.
[0053] Next, in combination with the execution process of the data packet transmission method, the method will be described in detail.
[0054] An embodiment of the present application provides a data packet transmission method, which is applied to Figure 3 the multi-stage switching network shown, as Figure 4 shown, Figure 4A data packet transmission method provided by an embodiment of this application, the data packet transmission method includes the following steps:
[0055] S401: The first secondary node receives a first routing request forwarded from the first primary node.
[0056] Among them, the first routing request is used to request to transmit a first data packet from an input port node to an output port node. The first routing request carries a first number identifier of the first primary node, a second number identifier of the first secondary node, a third number identifier of the second secondary node to which the output port node belongs, a fourth number identifier of the second primary node connected to the output port node, and the first data packet.
[0057] In some optional embodiments, before the first secondary node receives the first routing request forwarded from the first primary node, the first primary node receives the first routing request sent by the input port node; the first primary node detects whether the first number identifier is the same as the fourth number identifier; if they are not the same, the first primary node forwards the first routing request to the first secondary node.
[0058] Exemplarily, taking the input port node as port node 1 and the output port as port node 30 as an example, that is, the first number identifier carried by the first routing request is 0 and the fourth number identifier is 7; the first primary node detects that the first number identifier is not the same as the fourth number identifier, then the first primary node forwards the first routing request to the first secondary node.
[0059] It can be understood that the input port node and the output port node are under different primary nodes, and the transmission of the first data packet in the first routing request needs to be forwarded through the secondary node. Therefore, the first primary node needs to forward the first routing request to the first secondary node.
[0060] Optionally, if the first primary node detects that the first number identifier is the same as the fourth number identifier, it transmits the first data packet to the output port node.
[0061] It can be understood that the input port node and the output port node are under the same primary node, that is, the first data packet in the first routing request can be routed and transmitted within this primary node.
[0062] S402: When the first secondary node detects that the second number identifier is not the same as the third number identifier, it determines a target tertiary node from multiple tertiary nodes connected to the first secondary node according to the first number identifier, the second number identifier, and the third number identifier, and determines a target path between the target tertiary node and the output port node.
[0063] Among them, the target number identifier of the target tertiary node matches and is unique to the first number identifier, the second number identifier, and the third number identifier.
[0064] In some alternative embodiments, when the first secondary node detects that the second number identifier is different from the third number identifier, based on the first number identifier, the first secondary node determines at least one candidate tertiary node from among a plurality of tertiary nodes connected to the first secondary node; the first secondary node determines the target tertiary node from among the at least one candidate tertiary node based on the first number identifier, the second number identifier, and the third number identifier, and determines the target path between the target tertiary node and the output port node.
[0065] In one example, when the first secondary node detects that the second number identifier is different from the third number identifier, based on the first number identifier, the first secondary node determines the order of the first primary node in the primary group where the first primary node is located; encodes the order to obtain a first target code; and determines at least one candidate tertiary node based on the first target code and the first correspondence.
[0066] Among them, 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 through which the first secondary node receives the first routing request forwarded by the first primary node.
[0067] The first correspondence is the correspondence between the first target code and at least one candidate tertiary node.
[0068] In one example, the first secondary node encodes the order to obtain a first target code, including: the first secondary node performs binary encoding on the order to obtain an initial code, and subtracts a preset value from the initial code to obtain the first target code.
[0069] Among them, 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 through which the first secondary node receives the first routing request forwarded by the first primary node.
[0070] Exemplarily, taking Figure 3 as an example, in Figure 3 , the order of the first primary node in the primary group where the first primary node is located can be 1 or 2 or 3. For example, if the first primary node is primary node 1, then the order of primary node 1 in the primary group where primary node 1 is located is 2; the first secondary node encodes the order 2 to obtain a first target code of 01; and for another example, if the first primary node is primary node 5, then the order of primary node 5 in the primary group where primary node 5 is located is 3, and the first secondary node encodes the order 3 to obtain a first target code of 10.
[0071] In one example, takingFigure 3 For example, as Figure 5 shown, Figure 5 is a schematic diagram of the first correspondence provided by an embodiment of the present invention; in Figure 5 , when the first target code is 00, the first secondary node determines at least one candidate tertiary node as tertiary node 0 and tertiary node 1 based on the first target code and the first correspondence; when the first target code is 01, the first secondary node determines at least one candidate tertiary node as tertiary node 2 and tertiary node 3 based on the first target code and the first correspondence; when the first target code is 10, the first secondary node determines at least one candidate tertiary node as tertiary node 4 and tertiary node 5 based on the first target code and the first correspondence.
[0072] Exemplarily, taking the input port node as port node 1 and the output port as port node 30 as an example, that is, the second number identifier carried by the first routing request is 0 and the third number identifier is 2; when the first secondary node detects that the second number identifier 0 is different from the third number identifier 2, based on the first number identifier 0, it determines the order 1 of the first primary node 0 in the primary group where the first primary node 0 is located; encodes the order to obtain the first target code 00; based on the first target code 00 and the first correspondence, determines at least one candidate tertiary node as tertiary node 0 and tertiary node 1.
[0073] Further, the first secondary node determines the target tertiary node from at least one candidate tertiary node based on the number k of secondary nodes in the multi-level switching network, the order corresponding to the first number identifier, the second number identifier, and the third number identifier. The first secondary node compares the magnitudes between the second number identifier and the third number identifier, which specifically includes the following two cases:
[0074] Case 1: If the second number identifier is greater than the third number identifier, the first secondary node determines the target tertiary node based on the number k of secondary nodes in the multi-level switching network, the order corresponding to the first number identifier, the second number identifier, the third number identifier, and the first relational expression. The first relational expression:
[0075] : .
[0076] Wherein, is the target number identifier of the target tertiary node, is the second number identifier, is the third number identifier, is the order corresponding to the first number identifier.
[0077] Case 2: If the second number identifier is less than the third number identifier, the first-level and second-level node determines 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 number identifier, the second number identifier, the third number identifier, and the second relational expression. The second relational expression:
[0078] : 。
[0079] Next, taking Figure 3 as an example, the target third-level nodes are enumerated from three cases where the first target code is 00 or 01 or 11.
[0080] Case 1: When the first target code is 00 (the port number through which the first-level and second-level node receives the first routing request forwarded by the first-level node is 00), the relational expression for determining the target third-level node is as follows:
[0081] : 。
[0082] : 。
[0083] As shown in Table 1 below, Table 1 is a schematic table of the enumerated results of the target third-level nodes corresponding to Case 1.
[0084] Table 1: Schematic table of the enumerated results of the target third-level nodes corresponding to Case 1
[0085]
[0086] Case 2: When the first target code is 01 (the port number through which the first-level and second-level node receives the first routing request forwarded by the first-level node is 01), the relational expression for determining the target third-level node is as follows:
[0087] : 。
[0088] : 。
[0089] As shown in Table 2 below, Table 2 is a schematic table of the enumerated results of the target third-level nodes corresponding to Case 2.
[0090] Table 2: Schematic table of the enumerated results of the target third-level nodes corresponding to Case 2
[0091]
[0092] Case 3: When the first target code is 10 (the port number through which the first-level and second-level node receives the first routing request forwarded by the first-level node is 10), the relational expression for determining the target third-level node is as follows:
[0093] : 。
[0094] : 。
[0095] As shown in Table 3 below, Table 3 is a schematic table of the enumerated results of the target tertiary nodes corresponding to Case 3.
[0096] Table 3: Schematic Table of the Enumerated Results of the Target Tertiary Nodes Corresponding to Case 3
[0097]
[0098] In some alternative embodiments, when the first secondary node detects that the second identification number is the same as the third identification number, based on the fourth identification number, the first data packet is forwarded to the second primary node corresponding to the fourth identification number, so that the second primary node transmits the first data packet to the output port node.
[0099] It can be understood that the input port node and the output port node are under the same secondary node, that is, the first data packet in the first routing request can be routed and transmitted within this secondary node.
[0100] S403: The first secondary node transmits the first routing request to the target tertiary node, so that the target tertiary node transmits the first data packet to the output port node through the target path.
[0101] In some alternative embodiments, the first secondary node determines the target path according to the target identification number of the target tertiary node, the third identification number, and the fourth identification number.
[0102] Among them, 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 tertiary node and the second secondary node, the second path is the path between the second secondary node and the second primary node, and the third path is the path between the second primary node and the output port node.
[0103] It can be understood that the target tertiary node receives the first routing request sent by the first secondary node and transmits the first data packet to the second secondary node through the first path; the second secondary node transmits the first data packet to the second primary node through the second path; the second primary node transmits the first data packet to the output port node through the third path.
[0104] Optionally, the first first-level node receives a second routing request sent from an input port node, where the second routing request is used to request the transmission of a second data packet from the input port node to an output port node; when the first first-level node detects that the first identification number is different from the fourth identification number, it forwards the second routing request to the first second-level node; the first second-level node receives the second routing request forwarded from the first first-level node; when the first second-level node detects that the second identification number is different from the third identification number, it 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.
[0105] It can be understood that since the input port node and the output port node in the second routing request are the same as those in the first routing request, a fixed link is allocated according to the input port node and the output port node, making the path from the second-level node to the third-level node for upward routing fixed (dedicated). Since the path from the first-level node to the second-level node for upward routing is unique, for routing requests with the same input port node and output port node, the path from the first-level node where the input port node is located to the third-level node is unique and fixed, and the path from the third-level node to the first-level node where the output port node is located is also unique and fixed. Therefore, the purpose of packet in-sequence preservation can be achieved. In addition, the path from the first-level node where the input port node is located to the first-level 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.
[0106] Through the above Figure 4 method, when the first second-level node in the multi-level switching network receives the first routing request forwarded from the first first-level node and detects that the second identification number is different from the third identification number, that is, when it detects that the first second-level node to which the input port node belongs is not the same second-level node as the second second-level node to which the output port node belongs, it determines the target third-level node from multiple third-level nodes connected to the first second-level node according to the first identification number of the first first-level node, the second identification number of the first second-level node, and the third identification number of the second second-level node.
[0107] Since the first-level nodes connected to the input port nodes, the first second-level nodes connected to the first-level nodes, and the second second-level nodes to which the output port nodes belong in the multi-level switching network are fixed, the target third-level nodes determined based on the first identification number, the second identification number, and the third identification number are fixed. Consequently, the determined target paths are also fixed. That is, when the input port nodes and the output port nodes are fixed, the first second-level nodes can determine a unique target third-level node and then determine a unique and fixed target path, enabling the first second-level nodes to route the data packets upward to the third-level nodes along a unique path. That is, the path for transmitting the data packets from the input port nodes to the output port nodes is unique and fixed, solving the problem in the related art that the paths for data packets to be transmitted from the input port nodes to the output port nodes in the multi-level switching network cannot be fixed. Furthermore, it avoids the out-of-order phenomenon of data when multiple data packets are transmitted from the input port nodes, improves the accuracy rate of data packet transmission, and achieves the purpose of maintaining the order of multiple data packets when they are transmitted from the input port nodes to the output port nodes in the multi-level switching network.
[0108] From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0109] The embodiments of the present application further provide a data packet transmission device, which is applied to a multi-level switching network. Each level in the multi-level switching network includes at least one node, and there is a transmission path between each node in the upper level and each node in the lower level, as Figure 6 shown Figure 6 is the structural block diagram of the data packet transmission device provided by the embodiments of the present application; the device includes:
[0110] A transceiver module 601, configured to receive a first routing request forwarded from a first-level node. The first routing request is used to request to transmit a first data packet from an input port node to an output port node. The first routing request carries a first identification number of the first-level node, a second identification number of the first second-level node, a third identification number of the second second-level node to which the output port node belongs, and the first data packet.
[0111] A processing module 602, configured to, when detecting that the second identification number is different from the third identification number, determine a target third-level node from multiple third-level nodes connected to the first second-level node according to the first identification number, the second identification number, and the third identification number, and determine a target path between the target third-level node and the output port node.
[0112] The transceiver module 601 is further configured to transmit the first routing request to the target three - level node, so that the target three - level node transmits the first data packet to the output port node through the target path.
[0113] In some alternative embodiments, the transceiver module 601 is further configured to obtain n nodes and use the n nodes as n first - level nodes, and each first - level node is connected to at least one port node; the processing module 602 is further configured to divide the n first - level nodes into k first - level groups, and each first - level group includes first - level nodes; the processing module 602 is further configured to set k second - level nodes, and connect the first - level nodes included in each first - level group to the same second - level node; the processing module 602 is further configured to set third - level nodes, and divide the third - level nodes into third - level groups, and each third - level group includes third - level nodes, and each third - level node is fully connected to each second - level node; the processing module 602 is further configured to generate a multi - level switching network based on the n first - level nodes, the k second - level nodes, and the third - level nodes.
[0114] In some alternative embodiments, the processing module 602 is specifically configured to, when detecting that the second number identifier is different from the third number identifier, determine at least one candidate third - level node from the multiple third - level nodes connected to the first second - level node based on the first number identifier; determine the target third - level node from at least one candidate third - level node based on the first number identifier, the second number identifier, and the third number identifier, and determine the target path between the target third - level node and the output port node.
[0115] In some alternative embodiments, the processing module 602 is further specifically configured to, when detecting that the second number identifier is different from the third number identifier, 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 number identifier; perform encoding processing on the order to obtain the first target code; determine at least one candidate third - level node based on the first target code and the first corresponding relationship, where the first corresponding relationship is the corresponding relationship between the first target code and at least one candidate third - level node.
[0116] In some alternative embodiments, the processing module 602 is further specifically configured to 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 number identifier, the second number identifier, and the third number identifier.
[0117] In some alternative embodiments, the processing module 602 is further specifically configured to compare the magnitudes between the second number identifier and the third number identifier; if the second number identifier is greater than the third number identifier, based on the number k of secondary nodes in the multi - level switching network, the order corresponding to the first number identifier, the second number identifier, the third number identifier, and the first relational expression, determine the target tertiary node, the first relational expression:
[0118] ;
[0119] The processing module 602 is further specifically configured to, if the second number identifier is less than the third number identifier, based on the number k of secondary nodes in the multi - level switching network, the order corresponding to the first number identifier, the second number identifier, the third number identifier, and the second relational expression, determine the target tertiary node, the second relational expression:
[0120] ;
[0121] Wherein, is the target number identifier of the target tertiary node, is the second number identifier, is the third number identifier, is the order corresponding to the first number identifier.
[0122] In some alternative embodiments, the first routing request carries the fourth number identifier of the second primary node connected to the output port node; the processing module 602 is further specifically configured to determine the target path according to the target number identifier of the target tertiary node, the third number identifier, and the fourth number identifier, 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 tertiary node and the second secondary node, the second path is the path between the second secondary node and the second primary node, and the third path is the path between the second primary node and the output port node.
[0123] In some alternative embodiments, the processing module 602 is further configured to, when detecting that the second number identifier is the same as the third number identifier, forward the first data packet to the second primary node corresponding to the fourth number identifier based on the fourth number identifier, so that the second primary node transmits the first data packet to the output port node.
[0124] In some alternative embodiments, before the first secondary node receives the first routing request forwarded from the first primary node, the transceiver module 601 is further configured to receive the first routing request sent from the input port node; the processing module 602 is further configured to detect whether the first number identifier is the same as the fourth number identifier; if not, forward the first routing request to the first secondary node.
[0125] In some alternative embodiments, 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 identification number is the same as the fourth identification number.
[0126] In some alternative embodiments, before dividing n first-level nodes into k first-level groups, the processing module 602 is further configured to obtain the layout information of the integrated circuit where the multi-level switching network is located; and determine the number k of first-level groups according to the layout information and the number n of first-level nodes.
[0127] In some alternative embodiments, the transceiver module 601 is further configured to receive a second routing request sent from an input port node, where the second routing request is used to request to transmit a second data packet from the input port node to the output port node; the processing module 602 is further configured to forward the second routing request to the first second-level node when it is detected that the first identification number is different from the fourth identification number; the transceiver module 601 is further configured to receive the second routing request forwarded from the first first-level node; the processing module 602 is further configured to transmit the second routing request to the target third-level node when it is detected that the second identification number is different from the third identification number, so that the target third-level node transmits the second data packet to the output port node through the target path.
[0128] For the description of the features in the corresponding embodiments of the data packet transmission device, reference can be made to the relevant description in the corresponding embodiments of the data packet transmission method, which will not be elaborated here one by one.
[0129] An embodiment of the present application further provides an electronic device, such as Figure 7 shown Figure 7 is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application. The electronic device includes a processor 70 and a memory 71. A computer program is stored in the memory 71, and the processor 70 is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the data packet transmission method.
[0130] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-mentioned embodiments of the data packet transmission method when running.
[0131] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: various media such as a USB flash drive, a read-only memory (ROM for short), a random access memory (RAM for short), a mobile hard disk, a magnetic disk, or an optical disc that can store a computer program.
[0132] Embodiments of the present application also provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the data packet transmission method are implemented.
[0133] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-described embodiments of the data packet transmission method are implemented.
[0134] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0135] The above has introduced in detail a data packet transmission method, device, electronic device, storage medium, and product provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope 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 each node of the previous level and each node of the next level are connected by a transmission path, and the multi-stage switching network is based on n primary nodes, k secondary nodes and The method comprises: 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: Acquire the layout information of the integrated circuit where the multi-stage switching network is located; 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; Determining the number k of the first-level groups according to the layout information and the number n of the first-level nodes; 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: 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 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 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.
12. 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 11 when executing the computer program.
13. 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 11.
14. 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 11 are implemented.
Citation Information
Patent Citations
Data packet transmission method and system, storage medium and electronic device
CN117155851A