CN117155851B - Data packet transmission method and system, storage medium and electronic device - Google Patents

Data packet transmission method and system, storage medium and electronic device Download PDF

Info

Publication number
CN117155851B
CN117155851B CN202311420870.XA CN202311420870A CN117155851B CN 117155851 B CN117155851 B CN 117155851B CN 202311420870 A CN202311420870 A CN 202311420870A CN 117155851 B CN117155851 B CN 117155851B
Authority
CN
China
Prior art keywords
identification information
node
determining
routing node
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311420870.XA
Other languages
Chinese (zh)
Other versions
CN117155851A (en
Inventor
陈静静
高娜
李树青
孙华锦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311420870.XA priority Critical patent/CN117155851B/en
Publication of CN117155851A publication Critical patent/CN117155851A/en
Application granted granted Critical
Publication of CN117155851B publication Critical patent/CN117155851B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • H04L49/1515Non-blocking multistage, e.g. Clos

Abstract

The embodiment of the application provides a data packet transmission method and system, a storage medium and an electronic device, wherein the data packet transmission method comprises the following steps: under the condition that a data transmission request sent by a first source node is received, first identification information of the first source node and second identification information of a second source node are analyzed from the data transmission request, wherein the data transmission request is used for the first source node to send a plurality of data packets to the second source node, and the first source node and the second source node are both positioned in a multistage switching network; determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information; and sending the special transmission path to the first source node so as to instruct the first source node to transmit the data packets to the second source node through the special transmission path.

Description

Data packet transmission method and system, storage medium and electronic device
Technical Field
The embodiment of the application relates to the field of computers, in particular to a data packet transmission method and system, a storage medium and an electronic device.
Background
Aiming at the defects of the system-on-chip in terms of time delay, clock synchronization, expandability, energy consumption, reusability and the like, a new system-on-chip structure 'network-on-chip' is proposed at the end of century, the system-on-chip structure 'network-on-chip' well overcomes various limitations brought by a bus structure, fully references related network technologies in the existing computer network, and introduces the related network technologies into the system-on-chip for development and utilization, and has good development prospect.
Clos networks are one of the most common network topologies used for networks on chip, with the original Clos network being a classical multi-stage interconnection network. The network is widely adopted in communication networks and multiprocessor computer systems, so that the network is widely valued, and since the proposal of Clos, the topology result, the connection characteristic and the control algorithm of the network are intensively studied, and a plurality of achievements are obtained.
All modules among the stages of the Clos network are connected by one, but a plurality of paths are selectable among any input/output ports, all Clos switching networks have the characteristic of multipath, and a plurality of equivalent paths can support the load balance of the service while providing redundancy; the module scale and structure of each stage of the Clos switching network are the same, and the Clos switching network has the characteristic of modularization and good expandability. However, when the scale of the network increases, the number of routing nodes and the number of wires of the Clos switching network greatly increase, as shown in fig. 3, each link in the figure can bidirectionally transmit data, i.e. is full duplex; the boxes in the figure are source nodes (por nodes), 32 in total, the circles are routing nodes, 8 primary routing nodes and 4 secondary routing nodes. 4 port nodes are hung on each primary routing node; the source node is responsible for sending the data packet and the mobile phone, and can mutually send the data packet; the routing node is responsible for forwarding the data packet.
In the conventional routing implementation scheme, when a terminal node initiates multi-packet data transmission to the same target terminal node, because of path diversity of the topology, different packet data may match different routing paths to perform data routing transmission, because of different blocking degree of each secondary routing node, the sequence of data transmitted to the target terminal node through different secondary routing nodes cannot be controlled, which results in multi-packet data transmission initiated at the source terminal node cannot be sequentially output from the corresponding target terminal node according to the initial sequence thereof, namely, a disorder phenomenon of data occurs, resulting in data transmission errors, for example, it is assumed that the input terminal node 0 sends 3 packets of data to the output terminal node 31, and the sequence of the 3 packets of data when the input terminal node 0 initiates transmission is data packet 1, data packet 2 and data packet 3, because of the routing diversity of the topology, the data packet 1 may select a path. Input terminal node 0, first level routing node 0, second level routing node 0, first level routing node 7, output terminal node 31; packet 2 may choose a path: input terminal node 0, first level routing node 0, second level routing node 1, first level routing node 7, output terminal node 31; packet 3 may choose a path: input terminal node 0, first level routing node 0, second level routing node 2, first level routing node 7, output terminal node 31; because the difference among the three paths is that the second level routing node is selected, the data packet 1 selects the second level node 0, the data packet 2 selects the second level node 1, and the data packet 3 selects the second level node 2, because the routing of the data in the interconnection structure is complicated, each second level node has the data of different paths to carry out routing forwarding, namely, the busyness degree of each second level routing node has the difference, thus the busyness state of the second level node 0 selected by the data packet 1 is possibly caused, the busyness state of the second level node 1 selected by the data packet 2 is possibly caused, namely, the idle state of the second level node 2 selected by the data packet 3 is firstly caused, namely, the data packet 1 reaching the second level node 0 needs to wait for a longer time to be queued because of the busyness state of the second level node 0, and the task to be arranged in front of the second level node is ended, and the data packet 1 can be forwarded and output from the second level node 0; and finally, the data packet 3 reaching the secondary node 2 can be immediately forwarded and output because of the idle state of the secondary node 2; packet 2 will be routed out of secondary node 1 earlier than packet 1 because of the "busy" state of secondary node 1. Then, the sequence when the data sent by the data packet 1, the data packet 2 and the data packet 3 arrives at the same destination node in the initial sequence becomes the data packet 3, the data packet 2 and the data packet 1, which will cause the data disorder error at the receiving end.
The traditional data disorder solving method is that buffers are arranged at a receiving end, received data are reordered, and the scheme brings the problems that the more paths are, the larger the buffers are needed, and once the buffers are used up, the reordering is not completed, so that the whole network is in paralysis.
In the related art, when data transmission is performed in a multi-stage switching network, different data packets are matched to different routing paths according to the blocking degree of nodes during transmission to perform transmission, so that the sequence of the data packets transmitted to a target terminal node cannot be controlled, and finally, the phenomenon of data disorder occurs, and the technical problem of data transmission errors is caused.
Disclosure of Invention
The embodiment of the application provides a data packet transmission method and system, a storage medium and an electronic device, which are used for at least solving the problems that when data transmission is carried out in a multistage switching network in the related technology, different data packets are matched to different routing paths according to the blocking degree of nodes during transmission to carry out transmission, so that the sequence of the data packets transmitted to a target terminal node cannot be controlled, and finally, the data disorder phenomenon occurs, and data transmission errors are caused.
According to an embodiment of the present application, there is provided a transmission method of a data packet, including: under the condition that a data transmission request sent by a first source node is received, first identification information of the first source node and second identification information of a second source node are analyzed from the data transmission request, wherein the data transmission request is used for the first source node to send a plurality of data packets to the second source node, and the first source node and the second source node are both positioned in a multistage switching network; determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information; and sending the special transmission path to the first source node so as to instruct the first source node to transmit the data packets to the second source node through the special transmission path.
In an exemplary embodiment, before said determining a dedicated transmission path of said data transmission request in said multi-stage switching network according to said first identification information and said second identification information, said method further comprises: converting identification information of a plurality of source nodes in the multistage switching network into binary numbers with k bits to obtain serial number information of the plurality of source nodes, wherein the plurality of source nodes at least comprise the first source node and the second source node, 2 k T is greater than or equal to t, t is a source node in the multi-stage switching networkThe number of points, t=m×n, n is the number of primary routing nodes in the multi-stage switching network, m is the number of source nodes in a group of source nodes connected to each primary routing node, and k, t, m, n is a positive integer.
In an exemplary embodiment, the determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information includes: determining third number information of a first primary routing node connected with the first source node according to first number information corresponding to the first identification information, and determining fourth number information of a second primary routing node connected with the second source node according to second number information corresponding to the second identification information; determining the relative position of the second source node in a group of source nodes connected with the second-level routing node according to the second numbering information; determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; and determining the special transmission path according to the target primary routing node and/or the target secondary routing node and the relative position.
In an exemplary embodiment, the determining, according to the first number information corresponding to the first identification information, third number information of the first primary routing node connected to the first source node, and determining, according to the second number information corresponding to the second identification information, fourth number information of the second primary routing node connected to the second source node includes: and determining the first p-bit numerical value of the first number information as the third number information, and determining the first p-bit numerical value of the second number information as the fourth number information, wherein p is determined according to the n and the m, and p is a positive integer.
In an exemplary embodiment, the p is determined by: s is determined by the following constraints: 2 k-s Greater than or equal to the n, and 2 s Greater than or equal to m, wherein s is a positive integer; p=k-s.
In an exemplary embodiment, the determining, according to the second number information, a relative position of the second source node in a group of source nodes connected to the second level one routing node includes: and determining the s-bit number after the second number information as fifth number information, and converting the fifth number information into decimal numbers to obtain a conversion result, wherein s is a positive integer, and the conversion result is used for indicating the relative position.
In an exemplary embodiment, the determining the target primary routing node and/or the target secondary routing node in the dedicated transmission path according to the third numbering information and the fourth numbering information includes: determining whether the third number information and the fourth number information are identical; determining the first primary routing node as the target primary routing node and determining that the dedicated transmission path does not include the target secondary routing node, if the third numbering information is the same as the fourth numbering information; and under the condition that the third number information is different from the fourth number information, determining the first primary routing node and the second primary routing node as the target primary routing node, and determining the target secondary routing node according to the sizes of third identification information and fourth identification information, wherein the third identification information is a decimal number corresponding to the third number information, and the fourth identification information is a decimal number corresponding to the fourth number information.
In an exemplary embodiment, the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information includes: in the case that the third identification information is greater than the fourth identification information, the third identification information is calculated by the formula Calculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third identification information, D 3 For the fourth identification information,% is a remainder operation, and h is the number of secondary routing nodes in the multi-stage switching network; in the third identification information is smaller than the first identification informationIn the case of the fourth identification information, by the formula +.>And calculating the fifth identification information.
In an exemplary embodiment, the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information includes: determining the target secondary routing node according to the sizes of r and h under the condition that the third identification information is larger than the fourth identification information, wherein r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of the secondary routing nodes in the multi-stage switching network for the fourth identification information; determining the target secondary routing node according to the sizes of l and h under the condition that the third identification information is smaller than the fourth identification information, wherein l=s 3 + D 3 -1。
In an exemplary embodiment, the determining the target secondary routing node according to the sizes of r and h includes: in the case where r is less than h, the method is represented by the formula Calculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information; in the case where r is greater than h, by the formulaAnd calculating the fifth identification information.
In an exemplary embodiment, the determining the target secondary routing node according to the sizes of l and h includes: in case that l is smaller than h, the method is represented by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information; in the case where l is greater than h, by the formula +.>And calculating the fifth identification information.
In an exemplary embodiment, said determining said dedicated transmission path according to said target primary routing node and/or said target secondary routing node, said relative position comprises: determining the second source node according to the second level routing node and the relative position under the condition that the third number information and the fourth number information are the same; determining the dedicated transmission path includes the following nodes: the first source node, the first primary routing node, the second source node, and the determining the transmission sequence of the dedicated transmission path are sequentially as follows: the first source node, the first primary routing node, and the second source node.
In an exemplary embodiment, said determining said dedicated transmission path according to said target primary routing node and/or said target secondary routing node, said relative position comprises: determining the second source node according to the second-level routing node and the relative position under the condition that the third numbering information and the fourth numbering information are different; determining the dedicated transmission path includes the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node, and the determining of the dedicated transmission path is sequentially as follows: the first source node, the first primary routing node, the target secondary routing node, the second primary routing node, and the second source node.
According to another embodiment of the present application, there is provided a transmission system of a data packet, including: the system comprises a first source node, a central processing unit and a second source node, wherein the first source node is used for sending a data transmission request to the central processing unit, the data request is used for sending a plurality of data packets to the second source node by the first source node, and the first source node and the second source node are both positioned in a multi-stage switching network; the central processing unit is used for analyzing the first identification information of the first source node and the second identification information of the second source node from the data transmission request; determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information; transmitting the dedicated transmission path to the first source node; the first source node is further configured to transmit the plurality of data packets to the second source node through the dedicated transmission path.
In one exemplary embodiment, the multi-stage switching network comprises: each primary routing node is connected with the h secondary routing nodes, each primary routing node is connected with a group of source nodes, h=n-1, t=m×n, m is the number of source nodes in the group of source nodes, m, h and t are positive integers, and n is a positive integer greater than 1.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, under the condition that the data transmission request is received, the special transmission path corresponding to the group of source nodes is determined according to the identification information of the data sender and the data receiver corresponding to the data transmission request, so that the data sender is instructed to send the data packets according to the special transmission path, and the fact that a plurality of data packets to be sent can be sequentially transmitted through only one transmission path is ensured, therefore, the problem that when data transmission is carried out in a multistage switching network in the related art, different data packets can be matched to different routing paths for transmission according to the blocking degree of the nodes during transmission, the sequence of the data packets transmitted to the target terminal node cannot be controlled, the data disorder phenomenon finally occurs, and data transmission errors are caused is solved, and the problem of data disorder is fundamentally solved, and the effect of data sequence preservation is achieved.
Drawings
Fig. 1 is a hardware block diagram of a central processing unit of a data packet transmission method according to an embodiment of the present application;
fig. 2 is a flowchart of a method of transmitting a data packet according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative multi-stage switching network architecture according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative multi-stage switching network according to an embodiment of the present application;
fig. 5 is a block diagram of a transmission system of a data packet according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a central processing unit or similar computing device. Taking the operation on the cpu as an example, fig. 1 is a block diagram of the hardware structure of the cpu of a data packet transmission method according to an embodiment of the present application. As shown in fig. 1, the central processor may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the central processor may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the cpu. For example, the central processor may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a transmission method of a data packet in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the central processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a central processing unit. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a transmission method of a data packet is provided, fig. 2 is a flowchart of a transmission method of a data packet according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, under the condition that a data transmission request sent by a first source node is received, first identification information of the first source node and second identification information of a second source node are analyzed from the data transmission request, wherein the data transmission request is used for the first source node to send a plurality of data packets to the second source node, and the first source node and the second source node are both positioned in a multistage switching network;
step S204, determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information;
step S206, transmitting the dedicated transmission path to the first source node, so as to instruct the first source node to transmit the plurality of data packets to the second source node through the dedicated transmission path.
Through the steps, under the condition that the data transmission request is received, the special transmission path corresponding to the group of source nodes is determined according to the identification information of the data sender and the data receiver corresponding to the data transmission request, so that the data sender is instructed to send the data packets according to the special transmission path, and the fact that a plurality of data packets to be sent can be sequentially transmitted through only one transmission path is ensured, therefore, the problem that when data transmission is carried out in a multistage switching network in the related art, different data packets can be matched to different routing paths for transmission according to the blocking degree of the nodes during transmission, the sequence of the data packets transmitted to a target terminal node cannot be controlled, the problem of data transmission error finally occurs, and the problem of data disorder is fundamentally solved, and the effect of data sequence preservation is achieved.
The main execution body of the above steps may be a central processing unit, a network switch, etc., but is not limited thereto.
The execution order of step S202 and step S204 may be interchanged, i.e. step S204 may be executed first and then step S202 may be executed.
In an exemplary embodiment, the above step S204 is performed: determining that the data transmission request precedes a dedicated transmission path in the multi-stage switching network according to the first identification information and the second identification information, the method further comprising: converting identification information of a plurality of source nodes in the multistage switching network into binary numbers with k bits to obtain serial number information of the plurality of source nodes, wherein the plurality of source nodes at least comprise the first source node and the second source node, 2 k Greater than or equal to t, t being the number of source nodes in the multi-stage switching network, t=m,n is the number of primary routing nodes in the multi-stage switching network, m is the number of source nodes in a group of source nodes connected with each primary routing node, and k, t, m, n is a positive integer.
In order to facilitate the operation of the central processing unit, the identification information of a plurality of source nodes in the multi-stage switching network is converted into binary numbers with k bits, so as to obtain the number information which can be identified by the central processing unit, wherein the plurality of source nodes at least comprise the first source node and the second source node, and k satisfies the condition 2 k And t is greater than or equal to t, t is the number of source nodes in the multi-stage switching network, t=m×n, n is the number of primary routing nodes in the multi-stage switching network, m is the number of source nodes in a group of source nodes connected with each primary routing node, and k, t, m, n is a positive integer.
Based on the above steps, the above step S204 is performed: determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information may be achieved by: s11, determining third number information of a first primary routing node connected with the first source node according to first number information corresponding to the first identification information, and determining fourth number information of a second primary routing node connected with the second source node according to second number information corresponding to the second identification information; s12, determining the relative position of the second source node in a group of source nodes connected with the second-stage routing node according to the second numbering information; s13, determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; s14, determining the special transmission path according to the target primary routing node and/or the target secondary routing node and the relative position.
Based on the first number information corresponding to the first identification information and the second number information corresponding to the second identification information, the central processor can directly determine the third number information of the first primary routing node connected with the first source node and the fourth number information of the second primary routing node connected with the second source node; then determining the relative position of the second source node in a group of source nodes connected with the second-stage routing node according to the second number information; determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; and finally, determining the special transmission path according to the determined target primary routing node and/or target secondary routing node and the relative position.
Optionally, step S11 is as follows: the determining of the third number information of the first primary routing node connected to the first source node according to the first number information corresponding to the first identification information and the determining of the fourth number information of the second primary routing node connected to the second source node according to the second number information corresponding to the second identification information may be achieved by the following scheme, including: and determining the first p-bit numerical value of the first number information as the third number information, and determining the first p-bit numerical value of the second number information as the fourth number information, wherein p is determined according to the n and the m, and p is a positive integer.
The first p digits of the number information refer to the number information of the first-stage routing node connected with the corresponding source node, so that the central processor can directly read the first p digits from the first number information to obtain the third number information of the first-stage routing node and the fourth number information of the second-stage routing node, the digits p are determined by n and m, and p is a positive integer.
Optionally, the p is determined by the following method, including: s is determined by the following constraints: 2 k-s Greater than or equal to the n, and 2 s Greater than or equal to m, wherein s is a positive integer; p=k-s.
The value of p may be determined by: the s value is first determined by the following constraints: 2 k-s Greater than or equal to n, and 2 s And (3) being greater than or equal to m, and calculating the value of p according to the formula p=k-s after s is determined.
For example, if n is 8 and m is 4, then 2 is to be satisfied k-s Greater than or equal to n, k-s is required to be greater than or equal to 3; but if it is to satisfy 2 s Greater than or equal to m, s is desirably greater than or equal to 2, and 2 k It is required to be greater than or equal to t, t=m×n=32, i.e. k is greater than or equal to 5, based on the above constraints, a set of solutions is obtained: k= 5,s =2, p=k-s=3.
Based on the above steps, the above step S12: the determining, according to the second number information, the relative position of the second source node in the group of source nodes connected to the second-level routing node may be implemented by the following scheme, including: and determining the s-bit number after the second number information as fifth number information, and converting the fifth number information into decimal numbers to obtain a conversion result, wherein s is a positive integer, and the conversion result is used for indicating the relative position.
Through the above calculation process, the central processing unit has obtained the values of p and s, because each primary routing node is connected to a group of source nodes with the number of m, the central processing unit needs to know the relative position in the group of source nodes corresponding to the second primary routing node of the second source node to perform accurate data transmission, the last s digits of the number information can represent the number information of the source nodes in the group of source nodes, so that the relative position of the second source node can be determined, the last s digits of the second number information are firstly determined as the fifth number information, the fifth number information is a binary number with the number of s bits, then the binary number is converted into a decimal number, for example, the source node with the identification information of 15 is converted into the binary number, the first three digits are 011, the number representing the primary routing node connected with the source node is 11, the last two digits are 3, the relative position in the group of source nodes connected with the first routing node with the number is determined as the fifth number information, the fifth number information is a binary number of one source node is 011, the relative position in the group of source node connected with the first source node with the number of one stage is determined as 3, and the relative position in the group of source node connected with the first node is a source node is determined as the first source node is 011.
Optionally, step S13 above: determining the target primary routing node and/or the target secondary routing node in the dedicated transmission path according to the third numbering information and the fourth numbering information may be achieved by the following steps: s131, determining whether the third number information and the fourth number information are the same; s132, determining the first primary routing node as the target primary routing node and determining that the special transmission path does not comprise the target secondary routing node under the condition that the third numbering information is the same as the fourth numbering information; s133, determining the first primary routing node and the second primary routing node as the target primary routing node under the condition that the third number information is different from the fourth number information, and determining the target secondary routing node according to the sizes of third identification information and fourth identification information, wherein the third identification information is a decimal number corresponding to the third number information, and the fourth identification information is a decimal number corresponding to the fourth number information.
Comparing whether the third number information and the fourth number information are the same or not by the central processing unit, if so, proving that the first source node and the second source node are connected with the same first-stage routing node, and transmitting data without passing through a second-stage routing node in the process of data transmission, so that the special transmission path does not comprise a target second-stage routing node, and determining a first-stage routing node which is commonly connected with the two source nodes as a target first-stage routing node; if the third number information and the fourth number information are different, it is indicated that the first-level routing nodes connected with the first source node and the second source node are different, so that data transmission between the two first-level routing nodes needs to be forwarded through the second-level routing nodes, at the moment, the target first-level routing node comprises the first-level routing node and the second-level routing node, then the target second-level routing node is determined according to the sizes of the third identification information and the fourth identification information, the third identification information is a decimal number corresponding to the third number information, and the fourth identification information is a decimal number corresponding to the fourth number information.
Optionally, the above step S133 is performed: the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information may include: in the case that the third identification information is larger than the fourth identification informationIn the case of (2) by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third identification information, D 3 For the fourth identification information,% is a remainder operation, and h is the number of secondary routing nodes in the multi-stage switching network; in case the third identification information is smaller than the fourth identification information, the third identification information is represented by the formula +.>And calculating the fifth identification information.
An optional calculation mode, if the third identification information is greater than the fourth identification information, the calculation mode is calculated according to the formulaDirectly calculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third identification information, D 3 For the fourth identification information,% is the remainder operation, and h is the number of the secondary routing nodes in the multi-stage switching network; if the third identification information is smaller than the fourth identification information, the formula +.>To calculate fifth identification information.
Optionally, the above step S133 is performed: the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information may further include: determining the target secondary routing node according to the sizes of r and h under the condition that the third identification information is larger than the fourth identification information, wherein r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of the secondary routing nodes in the multi-stage switching network for the fourth identification information; determining the target secondary routing node according to the sizes of l and h under the condition that the third identification information is smaller than the fourth identification information, wherein l=s 3 + D 3 -1。
In another optional calculation mode, if the third identification information is greater than the fourth identification information, the magnitudes of r and h are further compared, so as to determine the target secondary routing node, where r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of second-level routing nodes in the multi-level switching network for the fourth identification information; if the third identification information is smaller than the fourth identification information, determining the target secondary routing node by comparing the sizes of l and h, wherein l=s 3 + D 3 -1。
Further, the steps are as follows: the determining of the target secondary routing node according to the sizes of r and h can be realized in the following manner, and the method comprises the following steps: in the case where r is less than h, the method is represented by the formula Calculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information; in the case where r is greater than h, by the formula>And calculating the fifth identification information.
Specifically, if r is smaller than h, the formula is passedTo calculate the fifth identification information, if r is greater than h, by the formula +.>To calculate the fifth identification information.
Further, the steps are as follows: the determining of the target secondary routing node according to the sizes of l and h can be realized by the following steps: in case that l is smaller than h, the method is represented by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth labelInformation identification; in the case where l is greater than h, by the formula +.>And calculating the fifth identification information.
Specifically, if l is smaller than h, the formula is passedTo calculate the fifth identification information, if l is greater than h, then +.>To calculate the fifth identification information.
Through the embodiment, two alternative calculation schemes of the fifth identification information are provided, wherein the first scheme carries out calculation in a residual solving mode, the calculation mode is simpler and more convenient, and the second calculation mode only comprises addition and subtraction logic, so that the algorithm is more beneficial to hardware realization.
In an exemplary embodiment, the above step S14 is performed: the determining the dedicated transmission path according to the target primary routing node and/or the target secondary routing node and the relative position may comprise the steps of: determining the second source node according to the second level routing node and the relative position under the condition that the third number information and the fourth number information are the same; determining the dedicated transmission path includes the following nodes: the first source node, the first primary routing node, the second source node, and the determining the transmission sequence of the dedicated transmission path are sequentially as follows: the first source node, the first primary routing node, and the second source node.
If the third number information and the fourth number information are the same, determining a specific position of the second source node according to the second-stage routing node and the relative position, and then determining that the dedicated transmission path comprises the following nodes: the transmission sequence of the first source node, the first primary routing node, the second source node and the special transmission path is as follows in sequence: the system comprises a first source node, a first primary routing node and a second source node, wherein specific position information of the nodes is stored in a special transmission path.
In an exemplary embodiment, the above step S14 is performed: the determining the dedicated transmission path according to the target primary routing node and/or the target secondary routing node and the relative position may comprise the steps of: determining the second source node according to the second-level routing node and the relative position under the condition that the third numbering information and the fourth numbering information are different; determining the dedicated transmission path includes the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node, and the determining of the dedicated transmission path is sequentially as follows: the first source node, the first primary routing node, the target secondary routing node, the second primary routing node, and the second source node.
If the third number information and the fourth number information are different, determining a second source node according to the second-level routing node and the relative position, and then determining that the special transmission path comprises the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node and determining the special transmission path is as follows in sequence: the system comprises a first source node, a first primary routing node, a target secondary routing node, a second primary routing node and a second source node, wherein specific position information of the nodes is also stored in a special transmission path.
Based on the above data packet transmission method, the present application proposes an optional multi-stage switching network, as shown in fig. 4, fig. 4 is a schematic structural diagram of an optional multi-stage switching network according to an embodiment of the present application, in the multi-stage switching network, the total number of port nodes (corresponding to the source nodes) is m×n, taking 32 as an example, the number of ports hanging on the primary routing node is m, m taking 4 as an example, the number of primary routing nodes is n, n taking 8 as an example, and the number of secondary routing nodes is (n-1); in the conventional multi-stage switching network structure, the number of the secondary routing nodes is m, which is consistent with the number of ports hung on the primary routing nodes, as shown in fig. 3, by the multi-stage switching network structure shown in fig. 3, the requirement that each group of source nodes (corresponding to the first source nodes) and target nodes (corresponding to the second source nodes) have a special transmission path cannot be met, so that the structure of the multi-stage switching network is improved, and (n-1) secondary routing nodes are arranged in the multi-stage switching network.
Based on the structure of the multi-stage switching network shown in fig. 4, the application also provides an optional data packet transmission method, which specifically includes the following steps:
Firstly, the number of a port node is represented by a 5-bit binary number, and the number of a primary routing node is represented by the high three bits of the port node; the source node of the data packet (corresponding to the first source node) is denoted as S, the destination node of the data packet (corresponding to the second source node) is denoted as D, and the primary routing node where the source node is located is denoted as S 3 (corresponding to the third identification information), the primary routing node where the destination node is located is denoted as D 3 (corresponding to the fourth identification information).
When the route is from the first-level route node to the second-level route node, the port number of the second-level route node is the output:
(1);
according to equation (1), for S in FIG. 4 3 And D 3 As a result of enumeration of the routing request, as shown in table 1, it can be seen from table 1 that each row and each column has no duplicate port number, that is, when the primary routing nodes where the transmission port (corresponding to the first source node) and the reception port (corresponding to the second source node) are located are different, the path between the primary routing nodes is a dedicated path (corresponding to the dedicated transmission path). The relation of the port number output can be summarized from the table 1 and can also be expressed by the formula (2), wherein the formula (2) only contains addition and subtraction, so that the hardware implementation is convenient:
(2)。
TABLE 1
Specifically, the exclusive OR operation is performed on the upper three bits of S and D, if the result is 000, the S and D are represented to be in the same primary node (corresponding to the target primary routing node), and the lower two bits of D are forwarded downwards from the corresponding output port; if the result is not 000, the S and the D are not in the same level node, the comparison of the high three bits of the D and the high three bits of the S is checked, and if the result is smaller than the high three bits of the S, the result is thatThe corresponding output port is forwarded up to the secondary node (corresponding to the target secondary routing node) from +.>The corresponding output port is forwarded to the secondary node upwards;
illustrating:
1) S is port3, binary number is 00011, D is port7, binary number is 00111, after receiving the route request, the primary node 0 carries out exclusive OR on the high three bits of S and D, if the result is 001, the high three bits of D are larger than the high three bits of S when S and D are not in the same primary node, and the high three bits of D are upwards forwarded to the secondary node from the output port 0 corresponding to (D3-1+S3)% 7;
2) S is port5, binary number is 00101, D is port7, binary number is 00111, after receiving the route request, the first-level node 1 performs exclusive OR on the upper three bits of S and D, and if the result is 000, S and D are under the same first-level node, the lower two bits of D are checked, and the result is forwarded downwards from the corresponding No. 3 output port to port7.
Through the embodiment, the application provides a routing algorithm for improving the data order preservation of the clos network, and the routing algorithm controls the data to be transmitted from a transmitting end to a receiving end through a fixed path, so that the order preservation of the data is realized, and the problem of data disorder is fundamentally solved. And because of the dedicated path from the primary node where the transmission port is located to the primary node where the receiving port is located, the logic of the primary routing node and the secondary routing node becomes simple, and the hardware implementation is easy.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiment also provides a system for transmitting data packets, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a transmission system of a data packet according to an embodiment of the present application, and as shown in fig. 5, the system includes:
a first source node 52, configured to send a data transmission request to a central processor, where the data request is used for the first source node to send a plurality of data packets to a second source node, where the first source node and the second source node are both located in a multi-stage switching network;
a central processor 54, configured to parse the data transmission request to obtain first identification information of the first source node and second identification information of the second source node; determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information; transmitting the dedicated transmission path to the first source node;
The first source node 52 is further configured to transmit the plurality of data packets to the second source node through the dedicated transmission path.
According to the system, under the condition that the data transmission request is received, the special transmission path corresponding to the group of source nodes is determined according to the identification information of the data sender and the data receiver corresponding to the data transmission request, so that the data sender is instructed to send the data packets according to the special transmission path, and the fact that a plurality of data packets to be sent can be sequentially transmitted through only one transmission path is ensured, therefore, the problem that when data transmission is carried out in a multistage switching network in the related art, different data packets can be matched to different routing paths for transmission according to the blocking degree of the nodes during transmission, the sequence of the data packets transmitted to a target terminal node cannot be controlled, the problem of data transmission error finally occurs, and the problem of data disorder is fundamentally solved, and the effect of data sequence preservation is achieved.
Optionally, the above-mentioned central processor 54 is further configured to convert identification information of a plurality of source nodes in the multi-stage switching network into k-bit binary numbers to obtain serial number information of the plurality of source nodes, where the plurality of source nodes at least includes the first source node and the second source node, 2 k And t is greater than or equal to t, t is the number of source nodes in the multi-stage switching network, t=m×n, n is the number of primary routing nodes in the multi-stage switching network, m is the number of source nodes in a group of source nodes connected with each primary routing node, and k, t, m, n is a positive integer.
In order to facilitate the operation of the central processing unit, the identification information of a plurality of source nodes in the multi-stage switching network is converted into k-bit binary numbers to obtain the intermediate nodeThe CPU can identify the number information, the plurality of source nodes at least comprise the first source node and the second source node, and k satisfies the condition 2 k And t is greater than or equal to t, t is the number of source nodes in the multi-stage switching network, t=m×n, n is the number of primary routing nodes in the multi-stage switching network, m is the number of source nodes in a group of source nodes connected with each primary routing node, and k, t, m, n is a positive integer.
Optionally, the central processing unit 54 is further configured to determine third number information of the first primary routing node connected to the first source node according to the first number information corresponding to the first identification information, and determine fourth number information of the second primary routing node connected to the second source node according to the second number information corresponding to the second identification information; determining the relative position of the second source node in a group of source nodes connected with the second-level routing node according to the second numbering information; determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; and determining the special transmission path according to the target primary routing node and/or the target secondary routing node and the relative position.
Based on the first number information corresponding to the first identification information and the second number information corresponding to the second identification information, the central processor can directly determine the third number information of the first primary routing node connected with the first source node and the fourth number information of the second primary routing node connected with the second source node; then determining the relative position of the second source node in a group of source nodes connected with the second-stage routing node according to the second number information; determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; and finally, determining the special transmission path according to the determined target primary routing node and/or target secondary routing node and the relative position.
Optionally, the above central processing unit 54 is further configured to determine a p-bit preceding digit of the first number information as the third number information, and determine a p-bit preceding digit of the second number information as the fourth number information, where p is a positive integer according to the n and the m.
The first p digits of the number information refer to the number information of the first-stage routing node connected with the corresponding source node, so that the central processor can directly read the first p digits from the first number information to obtain the third number information of the first-stage routing node and the fourth number information of the second-stage routing node, the digits p are determined by n and m, and p is a positive integer.
Optionally, the p is determined by the following method, including: s is determined by the following constraints: 2 k-s Greater than or equal to the n, and 2 s Greater than or equal to m, wherein s is a positive integer; p=k-s.
The value of p may be determined by: the s value is first determined by the following constraints: 2 k-s Greater than or equal to n, and 2 s And (3) being greater than or equal to m, and calculating the value of p according to the formula p=k-s after s is determined.
For example, if n is 8 and m is 4, then 2 is to be satisfied k-s Greater than or equal to n, then k-s is desirably greater than or equal to 3; but if it is to satisfy 2 s Greater than or equal to m, s is desirably greater than or equal to 2, and 2 k It is required to be greater than or equal to t, t=m×n=32, i.e. k is greater than or equal to 5, based on the above constraints, a set of solutions is obtained: k= 5,s =2, p=k-s=3.
Optionally, the above central processing unit 54 is further configured to determine a s-bit number after the second number information as fifth number information, and convert the fifth number information into a decimal number, to obtain a conversion result, where s is a positive integer, and the conversion result is used to indicate the relative position.
Through the above calculation process, the central processing unit has obtained the values of p and s, because each primary routing node is connected to a group of source nodes with the number of m, the central processing unit needs to know the relative position in the group of source nodes corresponding to the second primary routing node of the second source node to perform accurate data transmission, the last s digits of the number information can represent the number information of the source nodes in the group of source nodes, so that the relative position of the second source node can be determined, the last s digits of the second number information are firstly determined as the fifth number information, the fifth number information is a binary number with the number of s bits, then the binary number is converted into a decimal number, for example, the source node with the identification information of 15 is converted into the binary number, the first three digits are 011, the number representing the primary routing node connected with the source node is 11, the last two digits are 3, the relative position in the group of source nodes connected with the first routing node with the number is determined as the fifth number information, the fifth number information is a binary number of one source node is 011, the relative position in the group of source node connected with the first source node with the number of one stage is determined as 3, and the relative position in the group of source node connected with the first node is a source node is determined as the first source node is 011.
Optionally, the central processor 54 is further configured to determine whether the third number information and the fourth number information are the same; determining the first primary routing node as the target primary routing node and determining that the dedicated transmission path does not include the target secondary routing node, if the third numbering information is the same as the fourth numbering information; and under the condition that the third number information is different from the fourth number information, determining the first primary routing node and the second primary routing node as the target primary routing node, and determining the target secondary routing node according to the sizes of third identification information and fourth identification information, wherein the third identification information is a decimal number corresponding to the third number information, and the fourth identification information is a decimal number corresponding to the fourth number information.
Comparing whether the third number information and the fourth number information are the same or not by the central processing unit, if so, proving that the first source node and the second source node are connected with the same first-stage routing node, and transmitting data without passing through a second-stage routing node in the process of data transmission, so that the special transmission path does not comprise a target second-stage routing node, and determining a first-stage routing node which is commonly connected with the two source nodes as a target first-stage routing node; if the third number information and the fourth number information are different, it is indicated that the first-level routing nodes connected with the first source node and the second source node are different, so that data transmission between the two first-level routing nodes needs to be forwarded through the second-level routing nodes, at the moment, the target first-level routing node comprises the first-level routing node and the second-level routing node, then the target second-level routing node is determined according to the sizes of the third identification information and the fourth identification information, the third identification information is a decimal number corresponding to the third number information, and the fourth identification information is a decimal number corresponding to the fourth number information.
Optionally, the above-mentioned central processing unit 54 is further configured to, in case that the third identification information is greater than the fourth identification information, pass through a formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third identification information, D 3 For the fourth identification information,% is a remainder operation, and h is the number of secondary routing nodes in the multi-stage switching network; in case the third identification information is smaller than the fourth identification information, the third identification information is represented by the formula +.>And calculating the fifth identification information.
An optional calculation mode, if the third identification information is greater than the fourth identification information, the calculation mode is calculated according to the formulaDirectly calculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third identification information, D 3 For the fourth identification information,% is the remainder operation, and h is the number of the secondary routing nodes in the multi-stage switching network; if the third identification information is smaller than the fourth identification information, the formula +.>To calculate fifth identification information.
Optionally, the above central processor 54 is further configured to determine, when the third identification information is greater than the fourth identification information, the target secondary routing node according to the magnitudes of r and h, where r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of the secondary routing nodes in the multi-stage switching network for the fourth identification information; determining the target secondary routing node according to the sizes of l and h under the condition that the third identification information is smaller than the fourth identification information, wherein l=s 3 + D 3 -1。
In another optional calculation mode, if the third identification information is greater than the fourth identification information, the magnitudes of r and h are further compared, so as to determine the target secondary routing node, where r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of second-level routing nodes in the multi-level switching network for the fourth identification information; if the third identification information is smaller than the fourth identification information, determining the target secondary routing node by comparing the sizes of l and h, wherein l=s 3 + D 3 -1。
Optionally, the above-mentioned central processing unit 54 is further configured to, in a case where r is smaller than h, pass through a formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information; in the case where r is greater than h, by the formula>And calculating the fifth identification information.
Specifically, if r is smaller than h, the formula is passedTo calculate the fifth identification information, if r is greater than h, by the formula +. >To calculate the fifth identification informationAnd (5) extinguishing.
Optionally, the above-mentioned central processing unit 54 is further configured to, in a case where l is smaller than h, pass through a formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information; in the case where l is greater than h, by the formula +.>And calculating the fifth identification information.
Specifically, if l is smaller than h, the formula is passedTo calculate the fifth identification information, if l is greater than h, then +.>To calculate the fifth identification information.
Through the embodiment, two alternative calculation schemes of the fifth identification information are provided, wherein the first scheme carries out calculation in a residual solving mode, the calculation mode is simpler and more convenient, and the second calculation mode only comprises addition and subtraction logic, so that the algorithm is more beneficial to hardware realization.
Optionally, the central processor 54 is further configured to determine, when the third number information and the fourth number information are the same, the second source node according to the second level routing node and the relative position; determining the dedicated transmission path includes the following nodes: the first source node, the first primary routing node, the second source node, and the determining the transmission sequence of the dedicated transmission path are sequentially as follows: the first source node, the first primary routing node, and the second source node.
If the third number information and the fourth number information are the same, determining a specific position of the second source node according to the second-stage routing node and the relative position, and then determining that the dedicated transmission path comprises the following nodes: the transmission sequence of the first source node, the first primary routing node, the second source node and the special transmission path is as follows in sequence: the system comprises a first source node, a first primary routing node and a second source node, wherein specific position information of the nodes is stored in a special transmission path.
Optionally, the above central processing unit 54 is further configured to determine, when the third number information and the fourth number information are different, the second source node according to the second level routing node and the relative position; determining the dedicated transmission path includes the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node, and the determining of the dedicated transmission path is sequentially as follows: the first source node, the first primary routing node, the target secondary routing node, the second primary routing node, and the second source node.
If the third number information and the fourth number information are different, determining a second source node according to the second-level routing node and the relative position, and then determining that the special transmission path comprises the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node and determining the special transmission path is as follows in sequence: the system comprises a first source node, a first primary routing node, a target secondary routing node, a second primary routing node and a second source node, wherein specific position information of the nodes is also stored in a special transmission path.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A data packet transmission method is characterized in that,
comprising the following steps:
under the condition that a data transmission request sent by a first source node is received, first identification information of the first source node and second identification information of a second source node are analyzed from the data transmission request, wherein the data transmission request is used for the first source node to send a plurality of data packets to the second source node, and the first source node and the second source node are both located in a multi-stage switching network, and the multi-stage switching network comprises: n primary routing nodes, h secondary routing nodes and t source nodes, wherein each primary routing node is connected with the h secondary routing nodes, each primary routing node is connected with a group of source nodes, h=n-1, t=m×n, m is the number of source nodes in the group of source nodes, m, h and t are positive integers, and n is a positive integer greater than 1;
Determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information;
transmitting the dedicated transmission path to the first source node to instruct the first source node to transmit the plurality of data packets to the second source node through the dedicated transmission path;
wherein prior to said determining a dedicated transmission path of said data transmission request in said multi-stage switching network based on said first identification information and said second identification information, said method further comprises:
converting identification information of a plurality of source nodes in the multistage switching network into binary numbers with k bits to obtain serial number information of the plurality of source nodes, wherein the plurality of source nodes at least comprise the first source node and the second source node, 2 k Greater than or equal to t, k is a positive integer;
wherein the determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information includes:
determining third number information of a first primary routing node connected with the first source node according to first number information corresponding to the first identification information, and determining fourth number information of a second primary routing node connected with the second source node according to second number information corresponding to the second identification information;
Determining the relative position of the second source node in a group of source nodes connected with the second-level routing node according to the second numbering information;
determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information;
determining the special transmission path according to the target primary routing node and/or the target secondary routing node and the relative position;
the determining, according to the first number information corresponding to the first identification information, third number information of the first primary routing node connected to the first source node, and determining, according to the second number information corresponding to the second identification information, fourth number information of the second primary routing node connected to the second source node, includes:
determining a first p-bit number of the first number information as the third number information and a first p-bit number of the second number information as the fourth number information, wherein p is determined according to n and m, and p is a positive integer;
wherein p is determined by the following means, including:
s is determined by the following constraints: 2 k-s Greater than or equal to the n, and 2 s Greater than or equal to m, wherein s is a positive integer;
p=k-s;
wherein the determining, according to the second number information, the relative position of the second source node in the group of source nodes connected to the second primary routing node includes:
determining the s-bit number after the second number information as fifth number information, and converting the fifth number information into decimal numbers to obtain a conversion result, wherein s is a positive integer, and the conversion result is used for indicating the relative position;
wherein the determining the target primary routing node and/or the target secondary routing node in the dedicated transmission path according to the third numbering information and the fourth numbering information includes:
determining whether the third number information and the fourth number information are identical;
determining the first primary routing node as the target primary routing node and determining that the dedicated transmission path does not include the target secondary routing node, if the third numbering information is the same as the fourth numbering information;
and under the condition that the third number information is different from the fourth number information, determining the first primary routing node and the second primary routing node as the target primary routing node, and determining the target secondary routing node according to the sizes of third identification information and fourth identification information, wherein the third identification information is a decimal number corresponding to the third number information, the fourth identification information is a decimal number corresponding to the fourth number information, and aiming at the same third identification information, different target secondary routing nodes corresponding to different fourth identification information are different.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information comprises the following steps:
in the case that the third identification information is greater than the fourth identification information, the third identification information is calculated by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information, S 3 For the third markInformation of identification, D 3 For the fourth identification information,% is a remainder operation, and h is the number of secondary routing nodes in the multi-stage switching network;
in the case that the third identification information is smaller than the fourth identification information, the third identification information is calculated by the formulaAnd calculating the fifth identification information.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the determining the target secondary routing node according to the sizes of the third identification information and the fourth identification information comprises the following steps:
determining the target secondary routing node according to the sizes of r and h under the condition that the third identification information is larger than the fourth identification information, wherein r=s 3 + D 3, S 3 For the third identification information, D 3 H is the number of the secondary routing nodes in the multi-stage switching network for the fourth identification information;
Determining the target secondary routing node according to the sizes of l and h under the condition that the third identification information is smaller than the fourth identification information, wherein l=s 3 + D 3 -1。
4. The method of claim 3, wherein the step of,
the determining the target secondary routing node according to the sizes of r and h comprises the following steps:
in the case where r is less than h, the method is represented by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information;
in the case where r is greater than h, by the formulaAnd calculating the fifth identification information.
5. The method of claim 3, wherein the step of,
the determining the target secondary routing node according to the sizes of the l and the h comprises the following steps:
in case that l is smaller than h, the method is represented by the formulaCalculating fifth identification information of the target secondary routing node, wherein output is the fifth identification information;
in case that l is greater than h, the method is represented by the formulaAnd calculating the fifth identification information.
6. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the determining the dedicated transmission path according to the target primary routing node and/or the target secondary routing node and the relative position comprises the following steps:
Determining the second source node according to the second level routing node and the relative position under the condition that the third number information and the fourth number information are the same;
determining the dedicated transmission path includes the following nodes: the first source node, the first primary routing node, the second source node, and the determining the transmission sequence of the dedicated transmission path are sequentially as follows: the first source node, the first primary routing node, and the second source node.
7. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the determining the dedicated transmission path according to the target primary routing node and/or the target secondary routing node and the relative position comprises the following steps:
determining the second source node according to the second-level routing node and the relative position under the condition that the third numbering information and the fourth numbering information are different;
determining the dedicated transmission path includes the following nodes: the transmission sequence of the first source node, the first primary routing node, the target secondary routing node, the second primary routing node and the second source node, and the determining of the dedicated transmission path is sequentially as follows: the first source node, the first primary routing node, the target secondary routing node, the second primary routing node, and the second source node.
8. A data packet transmission system is characterized in that,
comprising the following steps:
the first source node is configured to send a data transmission request to the central processor, where the data transmission request is used for the first source node to send a plurality of data packets to the second source node, where the first source node and the second source node are both located in a multi-stage switching network, where the multi-stage switching network includes: n primary routing nodes, h secondary routing nodes and t source nodes, wherein each primary routing node is connected with the h secondary routing nodes, each primary routing node is connected with a group of source nodes, h=n-1, t=m×n, m is the number of source nodes in the group of source nodes, m, h and t are positive integers, and n is a positive integer greater than 1;
the central processing unit is used for analyzing the first identification information of the first source node and the second identification information of the second source node from the data transmission request; determining a dedicated transmission path of the data transmission request in the multi-stage switching network according to the first identification information and the second identification information; transmitting the dedicated transmission path to the first source node;
The first source node is further configured to transmit the plurality of data packets to the second source node through the dedicated transmission path;
wherein the central processing unit is used for processing the data,the method is also used for converting the identification information of a plurality of source nodes in the multistage switching network into k-bit binary numbers to obtain the number information of the plurality of source nodes, wherein the plurality of source nodes at least comprise the first source node and the second source node, 2 k Greater than or equal to t, k is a positive integer;
the central processing unit is further configured to determine third number information of a first primary routing node connected to the first source node according to first number information corresponding to the first identification information, and determine fourth number information of a second primary routing node connected to the second source node according to second number information corresponding to the second identification information; determining the relative position of the second source node in a group of source nodes connected with the second-level routing node according to the second numbering information; determining a target primary routing node and/or a target secondary routing node in the special transmission path according to the third numbering information and the fourth numbering information; determining the special transmission path according to the target primary routing node and/or the target secondary routing node and the relative position;
The central processing unit is further configured to determine a p-bit preceding digit of the first number information as the third number information, and determine a p-bit preceding digit of the second number information as the fourth number information, where p is determined according to n and m, and p is a positive integer;
wherein the central processor is further configured to determine the p by: s is determined by the following constraints: 2 k-s Greater than or equal to the n, and 2 s Greater than or equal to m, wherein s is a positive integer; p=k-s;
the central processing unit is further configured to determine a s-bit number after the second number information as a fifth number information, and convert the fifth number information into a decimal number to obtain a conversion result, where s is a positive integer, and the conversion result is used to indicate the relative position;
the central processing unit is further configured to determine whether the third number information and the fourth number information are the same; determining the first primary routing node as the target primary routing node and determining that the dedicated transmission path does not include the target secondary routing node, if the third numbering information is the same as the fourth numbering information; and under the condition that the third number information is different from the fourth number information, determining the first primary routing node and the second primary routing node as the target primary routing node, and determining the target secondary routing node according to the sizes of third identification information and fourth identification information, wherein the third identification information is a decimal number corresponding to the third number information, the fourth identification information is a decimal number corresponding to the fourth number information, and aiming at the same third identification information, different target secondary routing nodes corresponding to different fourth identification information are different.
9. A computer-readable storage medium comprising,
the computer readable storage medium has stored therein a computer program, wherein the computer program when executed by a processor realizes the steps of the method as claimed in any of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 7.
CN202311420870.XA 2023-10-30 2023-10-30 Data packet transmission method and system, storage medium and electronic device Active CN117155851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311420870.XA CN117155851B (en) 2023-10-30 2023-10-30 Data packet transmission method and system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311420870.XA CN117155851B (en) 2023-10-30 2023-10-30 Data packet transmission method and system, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN117155851A CN117155851A (en) 2023-12-01
CN117155851B true CN117155851B (en) 2024-02-20

Family

ID=88912390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311420870.XA Active CN117155851B (en) 2023-10-30 2023-10-30 Data packet transmission method and system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117155851B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874316A (en) * 2005-05-31 2006-12-06 国际商业机器公司 Route creating system and method of distribution selection of route in multi-path network
CN105450555A (en) * 2014-09-26 2016-03-30 杭州华为数字技术有限公司 Network on chip system and establishment method of network on chip communication link
CN109861925A (en) * 2017-11-30 2019-06-07 华为技术有限公司 Data transmission method, relevant apparatus and network
CN111164938A (en) * 2017-09-29 2020-05-15 芬基波尔有限责任公司 Resilient network communication using selective multipath packet stream injection
CN116226025A (en) * 2023-01-17 2023-06-06 阿里巴巴(中国)有限公司 Data packet transmission method, scheduling management unit, chip and display card

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050111465A1 (en) * 2003-11-25 2005-05-26 Stewart Mark Andrew W. Infiniband switch operating in a clos network
US7466701B2 (en) * 2004-11-12 2008-12-16 Stmicroelectronics S.R.L. Routing procedure and system, corresponding network, such as a network on chip (NOC), and computer program product therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874316A (en) * 2005-05-31 2006-12-06 国际商业机器公司 Route creating system and method of distribution selection of route in multi-path network
CN105450555A (en) * 2014-09-26 2016-03-30 杭州华为数字技术有限公司 Network on chip system and establishment method of network on chip communication link
CN111164938A (en) * 2017-09-29 2020-05-15 芬基波尔有限责任公司 Resilient network communication using selective multipath packet stream injection
CN109861925A (en) * 2017-11-30 2019-06-07 华为技术有限公司 Data transmission method, relevant apparatus and network
CN116226025A (en) * 2023-01-17 2023-06-06 阿里巴巴(中国)有限公司 Data packet transmission method, scheduling management unit, chip and display card

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
片上网络路由算法的研究;谢佩博;顾华玺;贾林;;计算机工程与设计(13);全文 *

Also Published As

Publication number Publication date
CN117155851A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
US9571400B1 (en) Weighted load balancing in a multistage network using hierarchical ECMP
US8755287B2 (en) Network managing device and network managing method
US9608913B1 (en) Weighted load balancing in a multistage network
RU2540815C2 (en) Interruption, at least in part, of frame transmission
JP2016503594A (en) Non-uniform channel capacity in the interconnect
CN101019385A (en) Port aggregation across stack of devices
CN102065014B (en) Data cell processing method and device
CN110430135B (en) Message processing method and device
CN114726788B (en) Message transmission method applied to DPU and related device
JP6055553B2 (en) Queue scheduling method, apparatus and system
CN101848523B (en) Path selecting method in multi-channel wireless mesh network and device thereof
CN117155851B (en) Data packet transmission method and system, storage medium and electronic device
CN114500354A (en) Switch control method, device, control equipment and storage medium
US20210034428A1 (en) Estimating device and estimating method
US10609188B2 (en) Information processing apparatus, information processing system and method of controlling information processing system
CN116938851A (en) Message transmission method and related equipment
EP3579500A1 (en) A communication device for transmitting a transmission control protocol segment over a communication network using a multipath transmission control protocol
US7308468B2 (en) Pattern matching
WO2002035859A2 (en) Method and apparatus for determining connections in a crossbar switch
US20040042481A1 (en) Facilitating arbitration via information associated with groups of requesters
JP2010124205A (en) Switching device, switch of switching device, and method and program for controlling switching device
CN117097661B (en) Data packet forwarding method and device, storage medium and electronic equipment
US11467989B2 (en) Serial transmission system and serial transmission method
CN116248579B (en) Multi-point communication path planning method and device
JP7359299B2 (en) Packet identification device, packet identification method, and packet identification program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant