Switching and data processing system

By having switches and data nodes work together to perform distributed computing tasks, the problem of increased latency caused by insufficient data transmission bandwidth is solved, and low-latency, high-efficiency data processing is achieved.

CN113992604BActive Publication Date: 2026-03-20HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In artificial intelligence parameter training and high-performance computing, the increase in the number of data nodes leads to insufficient data transmission bandwidth, resulting in increased latency in data aggregation and processing.

Method used

By having switches and data nodes work together to perform distributed computing tasks, switches perform distributed computing operations during data transmission, including aggregating similar data, thereby reducing system costs and improving data processing efficiency.

Benefits of technology

It effectively reduces data processing latency, improves data processing efficiency, and avoids the inefficiency caused by individual nodes performing calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113992604B_ABST
    Figure CN113992604B_ABST
Patent Text Reader

Abstract

The application discloses a switch connected with at least two data nodes, wherein the switch is used for receiving result data of a first operation of a distributed computing task sent by the at least two data nodes respectively, performing a second operation of the distributed computing task according to the received result data of the first operation, obtaining result data of the second operation, and distributing the result data of the second operation. Thus, the operation process of the distributed computing task performed by the data nodes and the switch is realized, the data processing efficiency is improved, and the processing time delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, and in particular to a switch and a data processing system. BACKGROUND

[0002] In the scenarios of artificial intelligence (AI) parameter training of simulating human thinking process and intelligent behavior (such as training and reasoning), high performance computing (HPC) of processing computing-intensive computing tasks by aggregating computing power, and the like, it is often required to aggregate the same data of multiple data nodes (the data nodes are usually servers). For example, the computer program all_reduce() of aggregation processing used in AI parameter training, and the computer program MPI_all_reduce() of aggregation processing of message passing interface (MPI) used in HPC. The aggregation processing is performed by an independent aggregation node, and the aggregation node can be a separate server. However, as the number of data nodes increases and the amount of data to be aggregated generated by the data nodes also increases, the amount of data transmitted by the data nodes to the aggregation node also increases, and the aggregation node needs to process more data, so that the data transmission bandwidth in the entire system cannot meet the requirements, resulting in an increase in the latency of data aggregation processing. Therefore, how to reduce the processing latency of data aggregation has become a technical problem to be solved. SUMMARY

[0003] The present application provides a switch, a device and a system for data processing, to provide a low-latency data processing method and improve the efficiency of data processing.

[0004] In a first aspect, the present application provides a switch connected to at least two data nodes, wherein the at least two data nodes respectively perform a first operation of a distributed computing task; the switch is configured to receive result data of the first operation sent by the at least two data nodes, perform a second operation of the distributed computing task according to the received result data of the first operation, obtain result data of the second operation, and distribute the result data of the second operation to the at least two data nodes. As described above, the switch and the data nodes can jointly complete the distributed computing task, that is, the operation of the distributed computing task can be performed during the data transmission of the switch, thereby avoiding the low efficiency problem caused by the separate node performing the second operation, and further improving the efficiency of data processing. In addition, since the switch completes the second operation of the distributed computing task during data transmission, a separate node does not need to be deployed, thereby reducing the cost of the system.

[0005] As a possible implementation, the switch comprises a processing unit and at least two ports, each port being connected to one data node, and each port being configured to receive result data of a first operation sent by the connected data node and forward the result data of the first operation to the processing unit. Thus, a second operation of the distributed computing task is implemented by the processing unit of the switch, thereby reducing the latency of data processing.

[0006] As another possible implementation, each port is further configured to perform a third operation of the distributed computing task on the result data of the first operation before forwarding the result data of the first operation to the processing unit. That is, each port can also perform a third operation of the distributed computing task before forwarding the result data of the first operation to the processing unit, thereby speeding up the speed of data processing.

[0007] As another possible implementation, the distributed computing task comprises a distributed artificial intelligence computing task or a distributed high-performance computing task or a distributed graph computing task or a distributed cloud computing task.

[0008] As another possible implementation, the second operation or the third operation of the distributed computing task comprises an operation of aggregating the same type of data.

[0009] As another possible implementation, the switch is an access switch or an aggregation switch.

[0010] As another possible implementation, the processing unit is further configured to send an operation command to the at least two ports, wherein the operation command is configured to instruct the at least two ports to perform the third operation of the distributed computing task respectively. The processing unit can instruct the ports connected to the data nodes performing the distributed computing task to perform the third operation of the distributed computing task respectively through the operation command, thereby achieving the purpose of the switch performing the operation of the distributed computing task in the data transmission process and improving the efficiency of data processing.

[0011] As another possible implementation, the processing unit sends the operation command to the at least two ports connected to the data nodes performing the distributed computing task through a first ring, wherein the first ring comprises at least two ports sorted according to a preset rule, and the order of the first ring indicates the order in which the at least two ports receive or perform the operation command. The transmission of the operation command and the result data of the operation command is realized through the first ring, which can avoid the influence of data aggregation processing on other types of data processing. Moreover, the bandwidth of the first ring can be configured according to business requirements, thereby ensuring the performance of data processing.

[0012] As another possible implementation, after the port in front of the sequence in the first loop performs the third operation according to the operation command, the result data of the third operation and the operation command are forwarded to the adjacent port behind, until the last port in the first loop sends all the result data of the third operation to the processing unit. Through the data communication path of the first loop, the operation command can be executed by each port in the first loop in turn, and the result data of the first operation is sent to the adjacent port behind, until the last port in the first loop completes the processing process of the operation command, so that each port completes the operation of the distributed computing task according to the operation command, and the data processing process is accelerated.

[0013] As another possible implementation, the processing unit is further configured to, before sending the operation command, receive a packet header sent by each of the at least two ports connected with the data node performing the distributed computing task, each packet header comprising a data category and a packet sequence number; establish an operation entry according to the packet header, wherein the operation entry records data to be processed and data processed in each data category; and send the operation command according to the operation entry. Thus, the processing unit can instruct the operation command of the at least two ports according to the processing condition of each data category, and each port can complete the processing process of the distributed computing task according to the operation command.

[0014] As another possible implementation, the packet header further comprises a port identifier, and the operation entry is further configured to record the port identifier corresponding to each data to be processed in each data category.

[0015] As another possible implementation, the switch comprises at least one first loop.

[0016] As another possible implementation, the switch is further configured to establish a second loop, and distribute the result data of the second operation through the second loop. The switch can further comprise a second loop, and the second loop is configured to distribute the result data of the second operation, so as to avoid the influence of distributing the result data of the second operation on other types of operations. In the second loop, each port can obtain the result data of the second operation in turn. For example, in the distributed computing task of aggregating data, the result data of the second operation refers to the aggregation result of all data of the same category, and the switch can send the aggregation result of all data of the same category to the port connected with the data node performing the distributed computing task through the second loop, and then send the aggregation result of all data of the same category to the data node performing the distributed computing task through each port, so as to perform the operation of the distributed computing task in the data transmission process and accelerate the data processing efficiency.

[0017] As another possible implementation, the first loop and the second loop can be the same.

[0018] As another possible implementation, the first loop and the second loop can also be different.

[0019] In a second aspect, the present application provides a data processing method, which is performed by a switch connected with at least two data nodes, each of which is configured to perform a first operation of a distributed computing task, and the process of the data processing method comprises: the switch receives result data of the first operation sent by the at least two data nodes respectively; the switch performs a second operation of the distributed computing task according to the received result data of the first operation, obtains result data of the second operation, and distributes the result data of the second operation. As can be seen from the above, the switch performs the operation of the distributed computing task in the data transmission process, thereby improving the efficiency of data processing.

[0020] In a possible implementation, the switch comprises a processing unit and at least two ports, each of which is connected with a data node, and each of the ports is configured to receive result data of the first operation sent by the connected data node and forward the result data of the first operation to the processing unit. In this way, the processing unit of the switch performs the second operation of the distributed computing task, thereby reducing the time delay of data processing.

[0021] As another possible implementation, each of the ports is further configured to perform a third operation of the distributed computing task on the result data of the first operation before forwarding the result data of the first operation to the processing unit. That is, each of the ports can also perform the third operation of the distributed computing task before forwarding the result data of the first operation to the processing unit, thereby accelerating the speed of data processing.

[0022] As another possible implementation, the distributed computing task comprises a distributed artificial intelligence computing task, a distributed high-performance computing task, a distributed graph computing task, or a distributed cloud computing task.

[0023] As another possible implementation, the second operation or the third operation of the distributed computing task comprises an operation of aggregating data of the same type.

[0024] As another possible implementation, the switch is an access switch or an aggregation switch.

[0025] As another possible implementation, the processing unit is further configured to send an operation command to the at least two ports, wherein the operation command is configured to instruct the at least two ports to perform the third operation of the distributed computing task respectively. The processing unit can instruct the ports connected with the data nodes performing the distributed computing task to perform the third operation of the distributed computing task respectively through the operation command, thereby achieving the purpose of the switch performing the operation of the distributed computing task in the data transmission process, and improving the efficiency of data processing.

[0026] As another possible implementation, the processing unit sends operation commands to at least two ports connected to the data node executing the distributed computing task via a first loop. The first loop includes at least two ports ordered according to a preset rule, and the order of the first loop indicates the order in which the at least two ports receive or execute the operation commands. Using the first loop to transmit operation commands and their results avoids the impact of data aggregation processing on other types of data processing. Furthermore, the bandwidth of the first loop can be configured according to business needs, thereby ensuring data processing performance.

[0027] As another possible implementation, after the port at the beginning of the sequence in the first loop executes the third operation according to the operation command, it forwards the result data of the third operation along with the operation command to the adjacent port at the end, until the port at the end of the sequence in the first loop sends all the result data of the third operation to the processing unit. Through the data communication path of the first loop, the operation command can be executed sequentially by each port in the first loop, and the result data of its first operation can be sent to the adjacent port at the end, until the last port in the first loop has completed the processing of the operation command. This allows each port to complete the distributed computing task according to the operation command, accelerating the data processing process.

[0028] As another possible implementation, the processing unit is further configured to, before sending the operation command, receive message headers sent by at least two ports connected to the data node executing the distributed computing task, each message header including a data category and a message sequence number; establish operation entries based on the message headers, wherein the operation entries record the data to be processed and the data already processed in each data category; and send the operation command based on the operation entries. This enables the processing unit to instruct the operation commands of the at least two ports according to the processing status of each data category, and then each port to complete the processing of the distributed computing task according to the operation commands.

[0029] As another possible implementation, the message header also includes a port identifier, and the operation table entries are used to record the port identifier corresponding to each piece of data to be processed in each type of data.

[0030] As another possible implementation, the switch includes at least one of the first loops.

[0031] As another possible implementation, the switch is further configured to establish a second ring for distributing result data of the second operation. The second ring can be included in the switch, and the second ring is configured to distribute the result data of the second operation, so as to avoid the influence of the distribution of the result data of the second operation on other types of operations. In the second ring, each port can sequentially obtain the result data of the second operation. For example, in a distributed computing task of aggregating data, the result data of the second operation refers to the aggregation result of all data of the same type, and the switch can send the aggregation result of all data of the same type to the port connected to the data node performing the distributed computing task through the second ring, and then send the aggregation result of all data of the same type to the data node performing the distributed computing task through each port, so as to perform the operation of the distributed computing task in the data transmission process and accelerate the data processing efficiency.

[0032] As another possible implementation, the first ring and the second ring can be the same.

[0033] As another possible implementation, the first ring and the second ring can also be different.

[0034] In a third aspect, the present application provides a data processing apparatus, which comprises various modules for performing the data processing method in the second aspect or any possible implementation of the second aspect.

[0035] In a fourth aspect, the present application provides a data processing system, which comprises a switching network and at least two data nodes connected to the switching network. The at least two data nodes are configured to respectively perform a first operation of a distributed computing task. The switching network comprises at least one switch, and the at least one switch is configured to respectively receive result data of the first operation sent by the at least two data nodes, perform a second operation of the distributed computing task according to the received result data of the first operation, obtain result data of the second operation, and distribute the result data of the second operation.

[0036] As a possible implementation, each switch comprises a first processor and at least two ports. Each port is configured to be connected to a data node performing the distributed computing task. The first processor and each port are configured to perform the operation steps of the method in any possible implementation of the second aspect.

[0037] In a fifth aspect, the present application provides a computer readable storage medium, which stores a command. When the command is run on a computer, the computer is caused to perform the method in the above aspects.

[0038] Sixthly, this application provides a computer program product containing commands that, when run on a computer, cause the computer to perform the methods described in the above aspects.

[0039] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of an aggregation process provided in an embodiment of this application;

[0041] Figure 2 A schematic diagram of the architecture of a data processing system 100 provided in this application;

[0042] Figure 3 A schematic diagram of the structure of a switch provided in an embodiment of this application;

[0043] Figure 4 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0044] Figure 5 This is a schematic diagram of the structure of a switch 500 provided in an embodiment of this application;

[0045] Figure 6 This is a schematic diagram of another switch 600 provided in an embodiment of this application. Detailed Implementation

[0046] To solve the problem of high data processing delay in the prior art, a data processing method is provided, in which a computing task is performed by a data node and a switch connected to the data node to improve the efficiency of data processing. For ease of description, the computing task performed by the data node and the switch together can also be referred to as a distributed computing task. The data node can be a node in the form of a computing device (for example, a server), or a node in the form of a virtual machine or a container. In this case, the virtual machine or the container can be deployed in at least one computing device (for example, a server), and each computing device is connected to the switch. The distributed computing task includes a distributed artificial intelligence (AI) computing task, a distributed high-performance computing (HPC) task, a distributed graphic computing task, a distributed cloud computing task, or other computing tasks that can be processed in a distributed computing manner. The distributed cloud computing task refers to a computing task in an AI, HPC, graphic computing, or other scenario, which is performed by a data node in the form of a virtual machine or a container and a switch.

[0047] For ease of description, the operation of the distributed computing task performed by the data node can also be referred to as a first operation, and the operation of the distributed computing task performed by the switch can also be referred to as a second operation.

[0048] For example, in an AI, HPC, or graphic computing application scenario, part of the computing task can be processed by the data node and the switch connected to the data node. For example, in a distributed computing task of data aggregation, aggregation refers to an operation of accumulating the same type of data. For example, in an AI or HPC scenario, the data node can generate the same type of data. In this case, the operation of generating the same type of data by the data node can also be referred to as a first operation of the distributed computing task. The same type of data includes the same type of parameter used in an algorithm in an AI scenario, or the same type of data generated in a computing-intensive task. The specific same type of data can be set according to the application scenario and business requirements. The switch can perform a data aggregation operation on the same type of data generated by the data node, and then obtain an aggregation result of the same type of data. In this case, the operation of performing the data aggregation on the same type of data generated by the data node by the switch can also be referred to as a second operation.

[0049] Figure 1An example of a data aggregation operation provided by the present application is shown in the figure. Data node A, data node B and data node C generate three types of parameters respectively, for example, data node A generates A0, A1 and A2, data node B generates B0, B1 and B2, and data node C generates C0, C1 and C2. Assuming that data with the same mantissa is the same type of data, the aggregation result obtained by the switch after performing the aggregation operation includes A0+B0+C0, A1+B1+C1 and A2+B2+C2.

[0050] Next, taking a distributed computing task as an example of data aggregation processing, the technical solution protected by the present application will be described in detail in combination with the drawings.

[0051] Figure 2 An architecture diagram of a data processing system 100 provided by an embodiment of the present application is shown in the figure. The system 100 includes a switching network 10 and data nodes 20, and the data nodes 20 are connected to the switching network 10.

[0052] The data nodes 20 are configured to generate data to be processed in a distributed computing task, for example, the same type of data to be aggregated in a parameter training of artificial intelligence and / or a data-intensive computing task in a high-performance computing scenario, and send the same type of data to be aggregated in the form of a message to the switch connected thereto. For example, as shown in the figure, the data nodes 20 include six data nodes, wherein the data nodes 201 to 203 are connected to the switch 102, the data nodes 204 to 206 are connected to the switch 103, the switch 102 and the switch 103 are connected through the switch 101, thereby realizing the communication connection between the data nodes, and each data node can send the same type of data to be aggregated generated thereby to the switching network 10, and the data aggregation operation is performed by the switch in the switching network 10. Figure 2

[0053] The switching network 10 is configured to realize the data transmission and the operation of the distributed computing task (for example, the operation of data aggregation in the distributed computing task of aggregating data) in the system 100. The switching network 10 includes at least one switch. As shown in the figure, the present application takes the switching network 10 including three switches as an example. The switch 101 can also be referred to as a convergence switch, and the switches 102 and 103 can also be referred to as access switches. The access switches are configured to connect the data nodes 20 and perform the operation of the distributed computing task of the data nodes 20 connected thereto, and the convergence switch is configured to realize the data transmission and the operation of the distributed computing task of the data nodes connected by different access switches.

[0054] Optionally, Figure 2 As shown in the figure, the switching network 10 in the system 100 can also be provided with only one switch, which is configured to realize the data transmission and the aggregation processing of the data nodes 201 to 206.​

[0055] It is worth noting that, due to the limited number of ports in a switch, as the number of switching nodes in the system increases, a single switch may not be able to meet the system networking requirements. In this case, the number of data nodes that can be accessed in the system can be expanded by increasing the number of switches. Therefore, in specific implementations, the structure of the switching network and the number of switches can be set according to business needs. This application does not limit the number of switches and the networking method in the switching network 10. For ease of description, the following embodiments of this application use... Figure 2 The following explanation uses the switching network 10 shown as an example.

[0056] Figure 2 Each switch can perform data aggregation processing during the transmission of data from data nodes. Further, see... Figure 3 , Figure 3 The present application provides a schematic diagram of the structure of a switch. As shown in the figure, the switch includes a processing unit 110, multiple ports (e.g., ports 1201 to 1222) and a crossbar 130.

[0057] The processing unit 110 is used to perform data aggregation operations. Optionally, the processing unit 110 is also used to instruct ports to perform data aggregation processing. Further, the processing unit 110 includes an aggregation result cache 111, a calculation unit 112, a command generation module 113, and a message header management module 114. The aggregation result cache 111 is used to store aggregation results of similar data. In specific implementations, the aggregation result cache 111 can be implemented using the memory in the switch or the cache of the processor in the switch. The calculation unit 112 is used to perform aggregation operations on the aggregation results sent from each port, and to manage operation entries (specifically, aggregation entries for aggregation operations), including generating, updating, and deleting operation entries. The operation entries record the data to be processed and the data already processed in each type of data. Command generation unit 113 is used to determine the similar data to be aggregated based on the operation table entries, generate an operation command (specifically an aggregation command for data aggregation operations), and send the aggregation command to the first port of the aggregation loop. This port then checks its input buffer for the existence of similar data to be aggregated and performs the aggregation operation. Header management unit 114 is used to parse the headers sent by each port, so that the sequence number in the header is sent to command generation unit 114. Command generation unit 114 then generates the aggregation command based on the sequence number and the aggregation table entries. Furthermore, header management unit 114 is also used to connect to cross-connect network 130, which can also be called a cross-connect switch matrix, to realize the transmission of headers between processing unit 110 and each port.

[0058] The plurality of ports in the switch are respectively used to connect data nodes, each port can be connected with one data node, and each port includes a computing unit and a memory. For example, the port 1201 includes a computing unit 12011 and a memory 12012. The computing unit is configured to parse a message sent by a data node to obtain a message header and payload data. Optionally, the computing unit is further configured to perform an aggregation operation according to an aggregation command sent by the processing unit 110. In addition, the memory of each port can be further divided into an input buffer and an output buffer (not shown in the figure) according to different types of stored data. The input buffer is used to store a message sent by a data node connected to the port, and the message includes a message header and payload data. The payload data includes homogeneous data to be aggregated. The output buffer is used to receive and store the aggregation result of the same type of data sent by the processing unit 110 after the system 100 completes the aggregation operation of all the same type of data to be processed, so as to send the aggregation result of all the same type of data to the data node connected to the port.

[0059] It should be noted that the number of ports in the switch varies according to different products produced by manufacturers, and the number of ports included in the switch is not limited in the present application.

[0060] Figure 3 The system further shows two data transmission loops: an aggregation loop and a distribution loop. For ease of description, the aggregation loop can also be referred to as a first loop, and the distribution loop can also be referred to as a second loop.

[0061] The aggregation loop is a set of ports connected with data nodes participating in a distributed computing task, and includes at least two ports sorted according to a preset rule. The sorting of the ports in the aggregation loop is used to indicate the order of receiving or executing the aggregation command by the at least two ports. The aggregation command generated by the processing unit 110 can be transmitted from the first port of the aggregation loop to the last port in sequence. Each port can execute a corresponding aggregation operation according to the aggregation command and whether the same type of data to be aggregated is stored in the port, and send the aggregation result and the aggregation command to the next port adjacent to the port in the loop, and so on, until the last port in the aggregation loop completes the processing of the aggregation command and sends the aggregation result of the aggregation command to the processing unit, thereby completing the processing process of one aggregation command in the aggregation loop. Figure 3As shown, the aggregation loop includes: processing unit 110-port 1201-port 1202-…-port 1211-port 1212-…-port 1221-port 1222-processing unit 110, forming a closed loop, and the aggregation command can be executed by each port of the aggregation loop respectively, and the final result data is transmitted to the processing unit 110 by the last port in the aggregation loop. Among them, the port 1201 connected with the processing unit 110 can also be called the first port of the aggregation loop, which is used to receive the aggregation command sent by the processing unit 110. The aggregation command is processed by the port 1201, the port 1202, the port 1211, the port 1212, …, the port 1221 and the port 1222 in turn, and the final result is transmitted to the processing unit 110 by the port 1222. Among them, the port 1202, the port 1211, the port 1212, the port 1221 can also be called the link port of the aggregation loop, each port can receive the aggregation command sent by the previous port adjacent to it in the aggregation loop and the aggregation result of the previous port adjacent to it according to the aggregation command, and execute the aggregation operation based on the received aggregation command and the aggregation result of the previous port adjacent to it according to the aggregation command. For example, the port 1202 can receive the aggregation command sent by the port 1201 and the aggregation result of the port 1201 to the aggregation command. When the port 1201 does not include the same type of data to be aggregated, the port 1201 directly sends the aggregation command to the port 1202. At this time, it can also be understood that the aggregation result of the port 1201 to the aggregation command is empty or null. When the aggregation port 1201 includes the same type of data to be aggregated, the port 1201 will send the aggregation result of the port 1201 to the port 1202 in addition to sending the aggregation command to the port 1202, …, and so on. In the aggregation loop, each port receives the aggregation command in turn, and executes the aggregation operation according to the aggregation command, and sends the aggregation command and the aggregation result of the port according to the aggregation command to the next port adjacent to it in the aggregation loop. Finally, the final aggregation result of the aggregation command is transmitted to the processing unit 110 by the last port (which can also be called the tail port) in the aggregation loop. For example, the port 1222 is the last port in the aggregation loop, and the port 1222 transmits the final aggregation result to the processing unit 110, and then the processing unit 110 judges whether the aggregation processing of all the same type of data is completed.

[0062] Optionally, at least one aggregation loop can be included in the switch, and each aggregation loop includes at least two ports sorted according to a preset rule.

[0063] The distribution loop is a set of ports connected with the data nodes participating in the distributed computing task, and includes at least two ports sorted according to a preset rule. The sorting of the ports is used to indicate the order in which the ports connected with the data nodes participating in the distributed computing task receive the aggregation result of all the same data, so that the data nodes connected with the above-mentioned ports can learn the aggregation result of all the same data, and then complete other operations of the distributed computing task. For example, as shown in FIG. 1, the distribution loop includes a processing unit 110-port 1201-port 1202-…-port 1211, and then the processing unit 110 can send the aggregation result of all the same data to each port in the distribution loop through the above-mentioned distribution loop. Figure 3

[0064] Specifically, similar to the aggregation loop, the central unit 110 can also send the aggregation result of all the same data to the first port (for example, the port 1201) of the distribution loop, and then the first port sends the aggregation result of all the same data to the subsequent port (for example, the port 1202) adjacent to the first port, and so on. Each port in the distribution loop can obtain the aggregation result of all the same data sent by the port adjacent to the previous port. In addition, after each port receives the aggregation result of all the same data, the aggregation result of all the same data can be stored in the memory of the port, and can be stored in the output buffer of the memory.

[0065] Optionally, after the last port in the distribution loop receives the aggregation result of all the same data, the last port can also send a notification message to the central unit, and the notification message is used to indicate the situation that the ports in the distribution loop obtain the aggregation result of all the same data.

[0066] Optionally, the switch includes at least one distribution loop, and each distribution loop includes at least two ports sorted according to a preset rule.

[0067] Optionally, the aggregation loop and the distribution loop can be the same loop, that is, the aggregation loop is used to transmit the aggregation command and the aggregation result of the port in the data aggregation process, and is also used to send the aggregation result of all the first type data to the port connected with the data node participating in the distributed computing.

[0068] Optionally, the aggregation loop and the distribution loop can also be different loops.

[0069] As a possible embodiment, the connection mode of the adjacent ports in the aggregation loop and the distribution loop, and the connection mode of the port and the processing unit can be connected through the physical connection (for example, the conductive circuit) in the printed circuit board (PCB).

[0070] ​It is worth mentioning that the number of ports included in the aggregation loop and the distribution loop can be configured according to business needs, and the data transmission path is sequentially transmitted through the ports included in the aggregation loop or the distribution loop.

[0071] The application provides a data processing method, which is described below. Figure 4 The application provides a data processing method, which is described below.

[0072] S301, the processing unit receives the first message header sent by the first port.

[0073] S302, the processing unit receives the second message header sent by the second port.

[0074] S303, the processing unit receives the third message header sent by the third port.

[0075] In the distributed computing task, the same type of data to be aggregated has an associated message column number, and each data can be sent to the switch by a data node using a message. Each message includes a message header and payload data. Specifically, after the port parses the message to obtain the message header, it can send the message header to the processing unit through the cross network, and each message header includes a message sequence number, which is used to indicate the sequence number of the message sent by the data node connected to the port. Each message carries at least one data to be aggregated. Optionally, the message header also includes a data type, which is used to indicate the type of data to be processed. In a specific implementation, the generation rule of the message header can be determined by the data node and notified to the switch, or determined by the switch and notified to the data node, which is not limited by the application.

[0076] For example, a fixed identification bit can be set in the specified field of the message sequence number, such as the first field in Table 1 is the sequence number, and the second field is used to indicate the data category. When the second field of the message sequence number of the message received by the port is 1, it indicates that the message associated with the message sequence number includes the first type of data with a data category of 1, and the aggregation operation can be performed on the data with a data type of 1 in the data processing process.

[0077] Optionally, the message header also includes a third field for indicating an offset bit. The offset bit is used to indicate the total number of the same type of data to be aggregated by the same port. For example, when the third field of the received message sequence number is 3, it indicates that the total number of data to be aggregated by the port is 3.

[0078] Optionally, the message header can further comprise a field 4 for indicating a port identifier. The port identifier is used to indicate the identifier of the port sending the message header to the processing unit, which can be represented by numbers and / or letters. Optionally, the processing unit can also record the identifier of the port sending the message header when receiving the message header sent by the port.

[0079] Table 1 is an example of a message header

[0080] Field 1 Field 2 Field 3 Field 4 Serial number Data category Offset bit Port identification

[0081] S304 (optionally), the processing unit respectively checks the reliability of the message sequence number in each message header.

[0082] After the processing unit receives the message header sent by the port, the reliability of the message sequence number included in each message header can be checked. The reliability checking method can be any of the following methods:

[0083] Method one, the processing unit can check the reliability of the message sequence number according to a preset rule.

[0084] The data node and the processing unit can agree on a generation rule of the message sequence number in advance, which can also be referred to as a preset rule, and each message sequence number is a globally unique identifier. Optionally, each message carries a first type of data, that is, the message sequence number can uniquely identify a first type of data. The processing unit can check the legality of each message sequence number according to the preset rule. Specifically, the processing unit can pre-store a preset message sequence number table, which is used to record a set of all message sequence numbers generated according to the preset rule. The processing unit can query whether each message sequence number exists in the preset message sequence number table. When the preset message sequence number table exists, it is considered that the result of the reliability check of the message sequence number is passed; otherwise, it is considered that the result of the reliability check of the message sequence number is not passed.

[0085] Method two, the processing unit can calculate the legality of the message sequence number according to the preset rule.

[0086] The message sequence number can be a random number or an identifier generated according to a preset rule, and is used to globally uniquely identify a message sequence number. For example, when the message sequence number is a random number generated by using a hash algorithm and is obtained by using an encryption algorithm, the processing unit can decrypt the algorithm, determine the decrypted message sequence number according to the hash algorithm, and determine whether the decrypted message sequence number is within a pre-agreed message sequence number range. If the decrypted message sequence number is within the pre-agreed message sequence number range, it is considered that the message sequence number reliability check result is passed. If the decrypted message sequence number is not within the pre-agreed message sequence number range, it is considered that the message sequence number reliability check result is failed. Alternatively, the message sequence number can also be generated by using other self-defined algorithms or general algorithms other than the hash algorithm, which is not limited in the present application.

[0087] Through the reliability verification of the message sequence number, the legality of the message header can be determined before the aggregation operation is performed, and then the data error problem caused by aggregating non-classified data can be avoided, and the accuracy of the distributed computing task is improved.

[0088] S305, the processing unit generates an aggregation table item according to each message sequence number.

[0089] The processing unit can generate an aggregation table item according to the message sequence number in the received message header. The aggregation table item records the data to be processed and the processed data in each type of data, that is, in the data aggregation processing, the aggregation table item is used to indicate the aggregation of the first type of data, including the message sequence number and the aggregation state of each message sequence number. The aggregation state is used to indicate the aggregation state of the first type of data associated with each message sequence number, and the aggregation state includes any one of “unaggregated”, “aggregated”, and “unaggregated and no message header received”. Alternatively, the aggregation table item can also include the port identifier associated with the message sequence number. Alternatively, the aggregation table item can also include the data category and offset associated with the message sequence number.

[0090] For example, Table 2 is a summary result of a processing unit receiving a message header provided by an embodiment of the present application. As shown in the table, the processing unit can know from receiving the message header of each port that the data type 1 to be aggregated of the port with a port identifier of 1 is 3, and the messages with message sequence numbers of 1 and 2 have been received. The data type 1 to be aggregated of the port with a port identifier of 2 is 4, and the messages with message sequence numbers of 1 and 3 have been received. The data type 1 to be aggregated of the port with a port identifier of 3 is 2, and the messages with message sequence numbers of 1 and 2 have been received.

[0091] Table 2 is a summary result of a processing unit receiving a message header

[0092]

[0093] The processing unit can determine the packet sequence numbers of all the first type data to be aggregated and the aggregation state of the first type data corresponding to each packet sequence number according to the offset bits of the packet header in Table 2, and then generate the aggregation entry indicating the aggregation state of the first type data according to the determination result. For example, according to Table 2, it can be learned that the data nodes connected by the port with the port identifier 1 generate a total of 3 packet sequence numbers of the first type data, the processing unit has received the packet header of the packet sequence number 1 and 2 sent by the port with the port identifier 1, and the processing unit has not obtained the packet header of the packet sequence number 3; the data nodes connected by the port with the port identifier 2 generate a total of 4 packet sequence numbers of the first type data, the processing unit has received the packet header of the packet sequence number 1 and 3 sent by the port with the port identifier 2, and the processing unit has not obtained the packet header of the packet sequence number 2 and 4; the data nodes connected by the port with the port identifier 3 generate a total of 2 packet sequence numbers of the first type data, and the processing unit has obtained the packet header of the packet sequence number 1 and 2. At this time, as shown in Table 3, the processing unit can determine the packet sequence numbers of all the first type data to be aggregated and the port identifier associated with each packet sequence number according to the above situation, and further identify the aggregation state of each packet sequence number. For example, the aggregation state of the packet sequence number 1 of the port identifier 1 is “not aggregated”, and the aggregation state of the packet sequence number 1 of the port identifier 1 is “not aggregated and no packet header is received”.

[0094] Table 3: An example of an aggregation entry

[0095]

[0096] Optionally, in addition to using the literal form as shown in Table 3 to identify the aggregation state, any form such as a number, a letter, or a combination of data and letters can be used to identify the aggregation state.

[0097] The processing unit can learn the aggregation state of the first type data to be aggregated by generating the aggregation entry as shown in Table 3, and further, the processing unit can generate an aggregation command according to the aggregation entry, the aggregation command being used to instruct the port to perform the data aggregation operation according to the aggregation command.

[0098] S306, the processing unit determines the packet sequence numbers of the first type data to be aggregated according to the aggregation entry, and generates an aggregation command.

[0099] After determining the packet sequence numbers of all the first type data to be aggregated and the aggregation state of each packet sequence number, the processing unit can generate an aggregation command based on the packet sequence number and the port identifier associated with the unaggregated data, and the aggregation command includes at least one packet sequence number of the first type data to be aggregated.

[0100] Specifically, the processing unit can generate the aggregation command according to the screening rule, and the screening rule is used to screen the packet sequence number of the first type of data to be aggregated included in the aggregation command, and specifically includes any one of the following manners:

[0101] Manner one, in a polling manner, at least one packet sequence number of the first type of data to be aggregated is determined according to the size of the packet sequence number.

[0102] Specifically, in a polling manner, one or more packet sequence numbers of the first type of data to be aggregated can be selected from all packet sequence numbers of the first type of data to be aggregated according to the size of the packet sequence number.

[0103] Manner two, at least one packet sequence number of the first type of data to be aggregated is determined in a priority manner.

[0104] The first type of data to be aggregated can also have a priority identifier, which is carried in the packet, and the priority is used to identify the priority of the first type of data associated therewith, for example, Figure 1 The first type of data generated by a certain data node in the aggregation data is important data, and the priority of the first data can be identified as high, and correspondingly, the packet sent by the data node also carries information indicating the priority. The processing unit can select one or more first data to be aggregated from all packet sequence numbers of the first type of data to be aggregated according to the priority of the first type of data to be aggregated.

[0105] Manner three, at least one packet sequence number of the first type of data to be aggregated is selected according to the received packet header.

[0106] In addition to the above two manners of screening the packet sequence number from all packet sequence numbers of the first type of data to be aggregated, the processing unit can first determine the received packet sequence number, and then select at least one first data packet sequence number in the received packet sequence number using the method of manner one or manner two.

[0107] Further, the processing unit can generate only one aggregation command according to the aggregation table item, and the aggregation command includes all packet sequence numbers of the first type of data to be aggregated screened in any one of the above manners; or generate multiple aggregation commands, each aggregation command includes a packet sequence number of the first type of data to be aggregated; or generate multiple aggregation commands, each aggregation command includes part of the packet sequence number of the first type of data to be aggregated. In order to facilitate description, an example of the processing unit generating only one aggregation command is described, and the command includes all packet sequence numbers of the first type of data to be aggregated screened in any one of the above manners.

[0108] Optionally, the aggregation command further includes a port identifier associated with the packet sequence number of the first type of data to be aggregated.

[0109] S307, the processing unit sends the aggregation command to the first port.

[0110] The processing unit can send the aggregation command by using the aggregation loop, and if the first port is the first port of the aggregation loop, the processing unit sends the aggregation command to the first port. That is, the processing unit directly sends the aggregation command to the first port of the aggregation loop, and after the first port completes the processing of the aggregation command, the first port sends the aggregation command to the subsequent port adjacent to the first port in the aggregation loop, and then the subsequent port completes the aggregation processing of the subsequent port according to the aggregation result of the first port and the aggregation command. The port in front of the sequence forwards the result data of the aggregation operation and the aggregation command to the adjacent subsequent port after the port in front of the sequence executes the aggregation operation, and the port in front of the sequence forwards the result data of the aggregation operation and the aggregation command to the adjacent subsequent port until the last port of the aggregation loop sends all the result data of the aggregation command to the processing unit. For details, see steps S308 to S310.

[0111] S308, when the first port includes the packet sequence number of the first type of data to be aggregated, the first port executes the aggregation operation and sends the aggregation command and the aggregation result of the first port to the second port.

[0112] After the first port receives the packet of the data node connected thereto, the first port parses the packet to obtain the packet header and the payload data, and sends the packet header to the processing unit through the cross network, and stores the packet header and the payload data to the memory of the first port. When the first port receives the aggregation command, the first port executes the processing of the aggregation command according to the packet sequence number of the first type of data to be aggregated in the aggregation command. Specifically, the first port can first determine whether the memory of the first port includes the packet sequence number of the first type of data to be aggregated; then determine the payload data associated with the packet sequence number according to the packet sequence number; and finally execute the aggregation operation according to the payload data.

[0113] Alternatively, the first port can also first determine whether the first port includes the port identifier associated with the packet sequence number in the aggregation command; then determine whether the memory of the first port includes the packet sequence number of the first type of data to be aggregated; then determine the payload data associated with the packet sequence number according to the packet sequence number; and finally execute the aggregation operation according to the payload data. In order to facilitate description, the operation executed by each port in the aggregation loop according to the aggregation command can also be referred to as a third operation of a distributed computing task, and correspondingly, each port executes the third operation to obtain result data, which can also be referred to as the result data of the third operation.

[0114] After the first port executes the aggregation command, the first port sends the aggregation command and the aggregation result of the first port to the port adjacent to the first port (for example, the second port) in the aggregation loop, and the second port continues to execute the aggregation operation according to the aggregation command and the aggregation result of the first port.

[0115] For example, the aggregation command generated by the aggregation table item shown in Table 3 includes the packet sequence numbers 1 and 2 in the port with the port identifier 1, the packet sequence numbers 1 and 3 in the port with the port identifier 2, and the packet sequence numbers 1 and 2 in the port with the port identifier 3. When the first port receives the aggregation command, the first port aggregates the payload data associated with the packet sequence numbers 1 and 2 to obtain an aggregation result. The aggregation result can also be referred to as the aggregation result obtained by the first port according to the aggregation command, or the aggregation result of the first port, or the result data of the first port performing the aggregation command, or the result data of the first port performing the third operation.

[0116] Optionally, when the second port does not include the packet sequence numbers of the first type of data to be aggregated in the aggregation command, the first port can directly send the aggregation command to the second port. In this case, the aggregation result of the first port can be considered as zero or null.

[0117] S309, when the second port includes the packet sequence numbers of the first type of data to be aggregated, the second port performs the aggregation operation and sends the aggregation command and the aggregation result of the second port to the third port.

[0118] Similar to step S308, after receiving the aggregation command, the second port can also find the payload data matching the packet sequence numbers of the first type of data to be aggregated in the memory of the second port according to the packet sequence numbers of the first type of data to be aggregated in the aggregation command. Specifically, the second port can first determine whether the memory of the second port includes the packet sequence numbers of the first type of data to be aggregated. Then, the second port determines the first data to be aggregated according to the packet sequence numbers, that is, the payload data associated with the packet sequence numbers. The second port performs the aggregation operation according to the payload data. When the second port performs the aggregation operation, the second port needs to determine whether the first port sends the aggregation result generated by the first port according to the aggregation command. If yes, the second port needs to perform the aggregation operation according to the aggregation result of the first port and the first type of data to be aggregated stored in the memory of the second port to obtain the aggregation result of the second port, that is, the second port needs to perform the aggregation operation based on the aggregation result of the first port.

[0119] For example, taking the aggregation command generated by the aggregation entry shown in Table 3 as an example, which includes message sequence numbers 1 and 2 in port 1, message sequence numbers 1 and 3 in port 2, and message sequence numbers 1 and 2 in port 3, when the first port aggregates the first type of data associated with message sequence numbers 1 and 2 according to the aggregation command to obtain the aggregation result of the first port, it sends the above aggregation result and aggregation command to the second port. Correspondingly, the second port will execute the above aggregation result and the aggregation of the first type of data associated with message sequence numbers 1 and 3 according to the above aggregation result and aggregation command to obtain the aggregation result of the second port. At this time, the aggregation result of the second port includes the aggregation result of the first type of data associated with message sequence numbers 1 and 2 in port 1, and the aggregation result of the first type of data associated with message sequence numbers 1 and 3 in port 2. For ease of description, the aggregation result obtained by the second port according to the aggregation command can also be called the aggregation result of the second port, or the aggregation result obtained by the second port executing the aggregation command, or the result data obtained by the second port executing the third operation.

[0120] Optionally, when the second port does not contain the message sequence number of the first type of data to be aggregated by the aggregation command, the second port can directly send the aggregation command and the aggregation result of the first port to the third port. In this case, the aggregation result of the second port can also be considered to be zero or empty.

[0121] It is worth noting that if the first port does not include the sequence number of the first type of data to be aggregated by the aggregation command, the second port can directly aggregate the command to the third port. In other words, in this case, neither the first port nor the second port includes the sequence number of the first type of data to be aggregated by the aggregation command, and the aggregation results of the first port and the second port are both zero or empty.

[0122] S310. When the third port includes the message sequence number of the first type of data to be aggregated, perform the aggregation operation and send the aggregation result of the third port to the processing unit.

[0123] The third port is the last port in the aggregation loop; that is, the third port is the last port in the aggregation loop in sequence. For example, as shown... Figure 3 Port 1222 is shown. Similar to step S309 above, the third port will also perform an aggregation operation based on whether the message sequence number of the first type of data to be aggregated indicated in the aggregation command exists in the memory of the third port, and the aggregation result of the preceding port adjacent to the third port in the aggregation loop, and send the result data of its aggregation operation to the processing unit.

[0124] It is worth mentioning that the third port is to perform the aggregation operation according to the first type of data to be aggregated stored in the third port and the aggregation result of the second loop, and obtain the aggregation result, which can be referred to as the aggregation result of the third port, or the aggregation result obtained by the second port executing the aggregation command, or the result data of the third port executing the aggregation command.

[0125] Optionally, each port in the aggregation loop does not store the aggregation result of the first type of data aggregated by the port according to the aggregation command, and when the processing of the aggregation command is completed, the aggregation result of the aggregation command is sent to the subsequent port adjacent to the port in the aggregation loop.

[0126] S311, when the processing unit determines that the aggregation operation of all first type data is not completed, the processing unit generates a new aggregation command according to the aggregation table item, repeats the operations of steps S306 to S310, and determines the aggregation result of all first type data according to the aggregation result of at least two aggregation commands.

[0127] Further, when the processing unit obtains the aggregation result of the last port in the aggregation loop in step S310, the aggregation state of the packet sequence number in table 3 can be updated, and whether the aggregation operation of all first type data is completed can be determined according to the updated result. If the aggregation operation of all first type data is not completed, a new aggregation command can be generated again by referring to the above steps S306 to S310, and the aggregation operation can be performed by each port in the aggregation loop according to the new aggregation command. The processing unit sends the aggregation result of the new aggregation command to the processing unit, and then obtains the aggregation result of all first type data according to the aggregation result of multiple aggregation commands. That is, when there are multiple aggregation results obtained by the aggregation command, the processing unit can perform the aggregation operation on the aggregation result of multiple aggregation commands, and then obtain the aggregation result of all first type data.

[0128] The above steps S301 to S311 can also be referred to as a data aggregation process. After completing the aggregation operation of all first type data, the processing unit can send the aggregation result of all data to the port connected to the data node participating in the distributed computing task through the distribution loop by the data distribution process, and then send all first type data to the data node participating in the distributed computing task through the above port, so that the data node participating in the distributed computing task continues to complete other operations of the distributed computing. The specific process is described in steps S312 to S313.

[0129] S312, when the aggregation of all first type data is completed, the processing unit sends the aggregation result of all first type data to the first port through the distribution loop.

[0130] S313, the first port sends the aggregation result of all first type data to the second port.

[0131] S314, the second port sends the aggregation result of all first type data to the third port.

[0132] The distribution loop is a path in the switch for sending the aggregation result of all first type data, and is a data transmission loop composed of at least two ports sorted according to a preset rule.

[0133] For example, Figure 3 The switch shown includes two distribution loops, distribution loop 1 is processing unit 110-port 1201-port 1202…-port 1211, and distribution loop 2 is processing unit 110-port 1222-port 1221-…-port 1212. When the processing unit determines that the aggregation of all first type data has been completed, the result of all first type data can be distributed to the port connected to the data node participating in the distributed computing through the distribution loop, and then transmitted to the data node participating in the distributed computing.

[0134] S315, (optionally) the processing unit cleans up the aggregation command table item and the aggregation result cache.

[0135] After the processing unit completes the distribution of the aggregation result including all first type data, the processing unit can clean up the aggregation result cache and delete the aggregation command table item, thereby releasing the storage space of the processing unit.

[0136] As can be known from the above description of the data aggregation process and the aggregation data distribution process, the aggregation method provided by the present application can directly execute the data aggregation operation by the switch in the data transmission process, avoiding the problems of occupying network resources, low transmission rate, long processing delay, etc. caused by the special aggregation node executing the aggregation operation in the traditional technology, and improving the efficiency of aggregation processing. In addition, the processing unit and each port in the switch can execute the aggregation operation on the data to be aggregated in a distributed manner, avoiding the performance bottleneck problem caused by a single subject executing the aggregation operation, and further reducing the delay of aggregation processing. Moreover, since the independent device is avoided for executing the aggregation operation, the number of nodes in the system is reduced, and the system cost is reduced. On the other hand, by executing the aggregation processing and the distribution processing through the aggregation loop and the distribution loop respectively, the bandwidth occupied by the transmission of other types of data is avoided, and the transmission bandwidth of the distributed computing can be greatly improved. In addition, since the aggregation result of the first type data is only in the aggregation result cache of the processing unit in the data processing process, the port does not need to cache the aggregation result of part of the first type data in the data processing process, and only needs to store the aggregation result of all the same type data after completing the aggregation operation of all the same type data, greatly reducing the capacity demand of the cached data in the port.

[0137] As a possible embodiment, Figure 4In addition to transmitting data by using the aggregation loop and the distribution loop, the method of data processing shown can also directly use the cross network 130 to implement data transmission between the processing unit and each port. In this case, the cross network 130 is used not only to transmit the packet header between the processing unit and each port, but also to transmit the aggregation command generated by the processing unit and the processing result of the aggregation command executed by each port. The above implementation can also implement the process of data aggregation by the switch in data transmission, thereby avoiding the problems of long time consumption and low efficiency caused by the single aggregation node in the traditional aggregation operation.

[0138] As a possible embodiment, in addition to the method shown Figure 4 In addition to the method shown, the data processing method provided by the present application can also only use the processing unit of the switch to execute the distributed computing task, that is, after each port obtains the packet carrying the first type of data to be aggregated and the packet header sent by the data node, the packet is sent to the processing unit, the processing unit parses the packet, obtains the packet sequence number in the packet header, and executes the aggregation operation according to the packet sequence number. Alternatively, each port can also complete the parsing process of the packet, send the packet header and the payload data to the processing unit, and then execute the aggregation operation by the processing unit. The above process can also achieve the purpose of executing the aggregation operation by the switch in data transmission, thereby improving the efficiency of data processing.

[0139] Through the above description, the switch 500 provided by the present application can complete the distributed computing task together with the data node, so that the switch completes the operation of the distributed computing task in the data transmission process, thereby improving the efficiency and speed of data processing. Moreover, the aggregation loop and the distribution loop are used to execute the aggregation processing and the distribution processing respectively, thereby avoiding occupying the bandwidth of the transmission of other types of data, and the transmission bandwidth of the distributed computing can be greatly improved.

[0140] It should be noted that, for the above method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the order of the described actions, and those skilled in the art should also know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily required by the present application.

[0141] Those skilled in the art can think of other reasonable step combinations according to the above description, which also belong to the protection scope of the present application. In addition, those skilled in the art should also be familiar with the fact that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily required by the present application.

[0142] The above describes in detail the method of data processing provided by the present application in combination with Figures 1 to 4 The above describes in detail the method of data processing provided by the present application in combination withFigures 5 to 6 , a switch for data processing is provided.

[0143] Figure 5 A structural diagram of a switch 500 provided by the present application is shown in the figure. The switch 500 is used to connect at least two data nodes for performing a first operation of a distributed computing task, and comprises a first processing unit 501, wherein

[0144] The first processing unit 501 is configured to receive result data of the first operation sent by the at least two data nodes, perform a second operation of the distributed computing task according to the received result data of the first operation, obtain result data of the second operation, and distribute the result data of the second operation.

[0145] Optionally, the switch 500 further comprises at least two ports, each port being connected to a data node, and each port comprising a receiving unit 502 and a sending unit 503, wherein

[0146] The receiving unit 502 is configured to receive result data of the first operation sent by the connected data node.

[0147] The sending unit 503 is configured to forward the result data of the first operation to the first processing unit 501.

[0148] Optionally, each port further comprises a second processing unit 504 configured to perform a third operation of the distributed computing task on the result data of the first operation before the sending unit 503 forwards the result data of the first operation to the first processing unit 501.

[0149] Optionally, the distributed computing task comprises a distributed artificial intelligence computing task or a distributed high-performance computing task or a distributed graph computing task.

[0150] Optionally, the second operation or the third operation of the distributed computing task comprises an operation of aggregating data of the same type.

[0151] Optionally, the switch is an access switch or an aggregation switch.

[0152] Optionally, the first processing unit 501 is further configured to send an operation command to the at least two ports, the operation command being used to instruct the second processors 504 of the at least two ports to respectively perform the third operation.

[0153] Optionally, the at least two ports are sorted according to a preset rule to form a first loop, and an order of the first loop indicates an order in which the at least two ports receive or perform the operation command.

[0154] Optionally, the port in front of the sequence in the first ring forwards the result data of the third operation to the adjacent port behind the sequence after the port in front of the sequence in the first ring performs the third operation according to the operation command, until the last port in the sequence in the first ring sends all the result data of the third operation to the first processing unit 501.

[0155] Optionally, the first processing unit 501 is further configured to receive the packet header sent by each of the at least two ports before sending the operation command, each packet header comprising a data category and a packet sequence number; establish an operation entry according to the packet header, the operation entry recording the data to be processed and the processed data in each category of data; and send the operation command according to the operation entry.

[0156] Optionally, the packet header further comprises a port identifier, and the operation entry is further configured to record the port identifier corresponding to each data to be processed in each category of data.

[0157] Optionally, the switch comprises at least one first ring.

[0158] Optionally, the switch is further configured to establish a second ring, and the first processing unit 501 is further configured to distribute the result data of the second operation through the second ring.

[0159] Optionally, the switch comprises at least one second ring.

[0160] It should be understood that the first processing unit 501 and the second processing unit 504 of the embodiments of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), which can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. They can also be implemented by software Figure 4 In the data processing method shown, the first processing unit 501, the second processing unit 504 and each module thereof can also be software modules.

[0161] The switch 500 according to the embodiments of the present application can correspond to the method described in the embodiments of the present application, and the above and other operations and / or functions of each unit in the switch 500 are respectively to realize the Figure 4The corresponding flow of each method in the above description will not be described here for brevity.

[0162] Through the above description, the switch 500 provided by the present application can complete the distributed computing task together with the data nodes, so that the switch completes the operation of the distributed computing task in the data transmission process, improving the efficiency and speed of data processing. Moreover, the aggregation loop and the distribution loop perform aggregation processing and distribution processing respectively, avoiding occupying the bandwidth of transmission of other types of data, which can greatly improve the transmission bandwidth of distributed computing.

[0163] Figure 6 Another structure schematic diagram of the switch 600 provided by the present application is shown in the figure, which includes a first processor 601 and at least two ports 602, wherein each port 602 is respectively used to be connected with a data node participating in a distributed computing task through a network 603, wherein,

[0164] The first processor 601 is used to respectively receive the result data of the first operation sent by the at least two data nodes, execute a second operation of the distributed computing task according to the received result data of the first operation, obtain the result data of the second operation, and distribute the result data of the second operation.

[0165] It should be understood that in the embodiments of the present application, the first processor 601 can be a CPU, and the processor 601 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0166] The network 603 can be a bus, which can include not only a data bus, but also a power bus, a control bus and a state signal bus, etc.

[0167] Optionally, the first processor 601 can be used to realize the functions of the calculation unit 112, the command generation unit 13 and the message header management unit 114 in the processing unit 110 as shown in Figure 2 The corresponding flow of each method in the above description will not be described here for brevity.

[0168] Optionally, the first processor 601 further includes a memory (not shown in the figure), which is used to provide commands and data to the first processor 601, so that the first processor can execute the operation steps of the method as shown in Figure 4 The memory can include read-only memory and random access memory, and the memory can also include non-volatile random access memory.

[0169] Optionally, the first processor 601 can also include a memory outside the first processor 601 to provide commands and data to the first processor 601, so that the first processor can perform operations as Figure 4 indicated in the method.

[0170] Optionally, each port 602 includes a second processor 6021 and a memory 6022, wherein the second processor 6021 can also be a CPU, and the processor 6021 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0171] Each port 602 can be used to implement the operation steps of the method performed by the first port or the second port or the third port in the method as Figure 4 indicated, and for brevity, will not be repeated here.

[0172] It should be understood that the switch 600 according to the embodiments of the present application can correspond to the switch 500 in the embodiments of the present application, and can correspond to the execution of the corresponding subject in the method according to the embodiments of the present application Figure 4 indicated, and the above and other operations and / or functions of each module in the switch 600 are respectively to realize the corresponding flow of each method in Figure 4 , and for brevity, will not be repeated here.

[0173] Through the above description, the switch 600 provided by the present application can complete the distributed computing task together with the data node, so that the switch completes the operation of the distributed computing task in the data transmission process, improving the efficiency and speed of data processing. Moreover, by performing aggregation processing and distribution processing through the aggregation loop and the distribution loop respectively, the transmission bandwidth of the distributed computing can be greatly improved.

[0174] The present application also provides a system for data processing, which includes a switching network and at least two data nodes connected with the switching network and respectively performing a first operation of a distributed computing task, and the switching network includes at least one switch, each switch including a first processor and at least two ports as Figure 6 indicated, and is used to realize the functions of the corresponding execution subject in the method as Figure 4 indicated, and for brevity, will not be repeated here. The system can implement the distributed computing task, and in the data transmission process, the operation of the distributed computing task is executed by the switch, thereby improving the efficiency of data processing and reducing the latency of data processing.

[0175] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer commands. When the computer commands are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer commands can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another, for example, the computer commands can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as a coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or a set of available media. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).

[0176] The above is only a specific implementation of the present application. Those skilled in the art can think of changes or replacements based on the specific implementation provided by the present application, which should be covered within the protection scope of the present application.

Claims

1. A switch, characterized in that, The switch includes a processing unit and at least two ports, each port being connected to a data node; Each port is configured to receive the result data of the first operation of the distributed computing task sent by the connected data node, and forward the result data of the first operation to the processing unit; wherein, before forwarding the result data of the first operation to the processing unit, each port is further configured to perform a third operation of the distributed computing task on the result data of the first operation, the third operation including the operation of aggregating similar data; The processing unit is configured to receive the result data of the first operation sent by the at least two ports, execute the second operation of the distributed computing task according to the received result data of the first operation, obtain the result data of the second operation, and distribute the result data of the second operation.

2. The switch according to claim 1, characterized in that, The distributed computing tasks include distributed artificial intelligence computing tasks, distributed high-performance computing tasks, distributed graphics computing tasks, or distributed cloud computing tasks.

3. The switch according to claim 1 or 2, characterized in that, The second operation of the distributed computing task includes the aggregation of similar data.

4. The switch according to claim 1, characterized in that, The switch is either an access switch or an aggregation switch.

5. The switch according to claim 1, characterized in that, The processing unit is further configured to send operation commands to the at least two ports, the operation commands being used to instruct the at least two ports to perform the third operation respectively.

6. The switch according to claim 5, characterized in that, The at least two ports are arranged in a first loop according to a preset rule, and the order of the first loop indicates the order in which the at least two ports receive or execute the operation command.

7. The switch according to claim 6, characterized in that, After the port at the beginning of the first loop executes the third operation according to the operation command, it forwards the result data of the third operation and the operation command to the adjacent port at the end, until the port at the end of the first loop sends all the result data of the third operation to the processing unit.

8. The switch according to claim 5, characterized in that, The processing unit is further configured to receive message headers sent by the at least two ports respectively, each message header including a message sequence number; establish operation entries based on the message headers, the operation entries recording the data to be processed and the data already processed in each type of data; and send the operation command based on the operation entries.

9. The switch according to claim 8, characterized in that, The message header also includes a port identifier, and the operation table entry is also used to record the port identifier corresponding to each piece of data to be processed in each type of data.

10. The switch according to claim 1, characterized in that, The switch is also used to establish a second loop, through which the result data of the second operation is distributed.

11. A data processing system, characterized in that, The system includes a switching network and at least two data nodes connected to the switching network; The at least two data nodes are used to execute the first operation of the distributed computing task, respectively. The switching network includes at least one switch, each switch including a processing unit and at least two ports, each port connected to a data node; each port is used to receive the result data of the first operation sent by the connected data node, and forward the result data of the first operation to the processing unit; wherein, before forwarding the result data of the first operation to the processing unit, each port is also used to perform a third operation of the distributed computing task on the result data of the first operation, the third operation including an operation of aggregating similar data; the processing unit is used to receive the result data of the first operation sent by the at least two ports, perform a second operation of the distributed computing task according to the received result data of the first operation, obtain the result data of the second operation, and distribute the result data of the second operation.

12. The system according to claim 11, characterized in that, The distributed computing tasks include distributed artificial intelligence computing tasks, distributed high-performance computing tasks, or distributed graphics computing tasks.

13. The system according to claim 11 or 12, characterized in that, The second operation of the distributed computing task includes the aggregation of similar data.

14. The system according to claim 11, characterized in that, The switch is either an access switch or an aggregation switch.

15. The system according to claim 11, characterized in that, The processing unit is further configured to send operation commands to the at least two ports, the operation commands being used to instruct the at least two ports to perform the third operation respectively.

16. The system according to claim 15, characterized in that, The at least two ports are arranged in a first loop according to a preset rule, and the order of the first loop indicates the order in which the at least two ports receive or execute the operation command.

17. The system according to claim 16, characterized in that, After the port at the beginning of the first loop executes the third operation according to the operation command, it forwards the result data of the third operation and the operation command to the adjacent port at the end, until the port at the end of the first loop sends all the result data of the third operation to the processing unit.

18. The system according to claim 15, characterized in that, The processing unit is further configured to receive message headers sent by the at least two ports respectively, each message header including a message sequence number; establish an operation entry based on the message header, the operation entry recording the data to be processed and the data already processed in each type of data; and send the operation command based on the operation entry.

19. The system according to claim 18, characterized in that, The message header also includes a port identifier, and the operation table entry is also used to record the port identifier corresponding to each piece of data to be processed in each type of data.

20. The system according to claim 11, characterized in that, The switch is also used to establish a second loop, through which the result data of the second operation is distributed.

21. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the operational steps performed by the switch of any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data processing method, device and system

    CN110233798A