Data communication method and device, distributed system, equipment and medium
By realizing data forwarding and communication unit connection between computing units within nodes in distributed systems, cross-node data communication problems are solved, the collaborative computing flexibility and communication efficiency of computing units are improved, and hardware costs are reduced.
Patent Information
- Application Number
- CN202210614958.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The prior art is difficult to realize data communication between different computing units across nodes in a distributed system, especially when the nodes include multiple computing units, the hardware cost is high and the communication efficiency is low.
By realizing data forwarding between computing units within the node, using the communication unit connected to the computing unit, each computing unit can directly send data to other nodes, realizing data communication across nodes, using direct communication links and multiple types of communication Communication protocols, such as TCP/IP, SNA, IPX, etc., and communication connection is realized through IO bus, PCIe bus, AXI bus, etc.
Cross-node data communication is realized, the collaborative computing flexibility of computing units in distributed systems is improved, hardware costs are saved, communication efficiency is improved, and data can be efficiently transmitted between different computing units.
Smart Images

Figure CN115037747B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of cloud computing technology, and specifically to a data communication method, device, distributed system, electronic device, computer-readable storage medium, and computer program product applied to a distributed system. Background Art
[0002] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed in an on-demand, self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0003] A distributed system contains multiple nodes. In order to improve the computing power of the system, each node can include multiple computing units. In order to improve the collaborative performance of each computing unit in the distributed system, data communication needs to be implemented between the computing units.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a data communication method, apparatus, electronic device, computer-readable storage medium, and computer program product applied to a distributed system.
[0006] According to one aspect of the present disclosure, there is provided a data communication method applied to a distributed system, wherein the distributed system comprises a plurality of nodes, each node comprises a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, and each of the plurality of communication units is communicatively connected to at least one communication unit included in other nodes, the method comprising: in response to receiving a data sending request from a first computing unit in a first node to send data to a second node, and in response to determining that the first node comprises a first communication unit communicatively connected to the second node, determining that the first communication unit is a target communication unit; in response to determining that the target communication unit is not in a communication connection state with the first computing unit, forwarding the data to a second computing unit communicatively connected to the target communication unit; and sending the data from the second computing unit to the second node via the target communication unit.
[0007] According to another aspect of the present disclosure, there is also provided a data communication method applied to a distributed system, wherein the distributed system comprises a plurality of nodes, each node comprises a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, and each of the plurality of communication units is communicatively connected to at least one communication unit included in other nodes, the method comprising: in response to a third computing unit in a second node receiving data, determining a target computing unit for processing the data; and in response to the target computing unit being different from the third computing unit and the second node including the target computing unit, forwarding the data to the target computing unit.
[0008] According to another aspect of the present disclosure, there is provided a data communication device applied to a distributed system, wherein the distributed system comprises a plurality of nodes, each node comprises a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, each of the plurality of communication units is communicatively connected to at least one communication unit included in other nodes, and the device comprises: a first determining unit, configured to respond to a data sending request received from a first computing unit in a first node to send data to a second node, and in response to determining that the first node comprises a first communication unit communicatively connected to the second node, determine that the first communication unit is a target communication unit; a first forwarding unit, configured to forward the data to a second computing unit communicatively connected to the target communication unit in response to the target communication unit and the first computing unit not being in a communication connection state; and a sending unit, configured to send the data from the second computing unit to the second node via the target communication unit, so that the second node can receive the data.
[0009] According to another aspect of the present disclosure, there is also provided a data communication device applied to a distributed system, wherein the distributed system comprises a plurality of nodes, each node comprises a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, each of the plurality of communication units is communicatively connected to at least one communication unit included in other nodes, and the device comprises: a second determination unit, configured to determine a target computing unit for processing the data in response to a third computing unit in a second node receiving the data; and a second forwarding unit, configured to forward the data to the target computing unit in response to the target computing unit being different from the third computing unit and the second node including the target computing unit.
[0010] According to another aspect of the present disclosure, a distributed system is also provided, comprising a plurality of nodes, wherein each of the plurality of nodes comprises: a plurality of computing units; a plurality of communication units respectively communicatively connected to the plurality of computing units, each of the communication units being communicatively connected to at least one communication unit included in other nodes; and any one of the data communication devices as described above.
[0011] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned data communication method.
[0012] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above data communication method.
[0013] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program can implement the above data communication method when executed by a processor.
[0014] According to one or more embodiments of the present disclosure, cross-node data communication can be implemented, thereby improving the flexibility of data communication in a distributed system.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0017] Figure 1 A flow chart showing a data communication method according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 2 A flow chart showing a data communication method according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 3 A structural block diagram of a data communication device according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 4 A structural block diagram of a data communication device according to an exemplary embodiment of the present disclosure is shown;
[0021] Figure 5A-Figure 5B A structural block diagram of a distributed system according to an exemplary embodiment of the present disclosure is shown;
[0022] Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0024] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0025] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0026] In the related art, one implementation scheme is to use switches to interconnect the nodes in the distributed system, and each switch is connected to the communication unit included in other switches or nodes. This scheme requires a large number of switches and has a high hardware cost. Another implementation scheme is to integrate the switching function into each node included in the distributed system. The switching unit in the node can be interconnected with the adjacent nodes through the multiple communication interfaces included therein, thereby realizing the communication between the nodes in the system. However, this scheme can only realize the interconnection communication at the node level. When the node includes multiple computing units, it fails to realize the data communication between different computing units across the node.
[0027] Based on this, the present disclosure provides a data communication method applied to a distributed system, which realizes data forwarding between computing units within the node, and then can utilize the communication unit connected to the computing unit on this basis, so that each computing unit in the node can directly send data to other nodes, thereby realizing cross-node data communication.
[0028] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0029] Figure 1 A flowchart of a data communication method 100 applied to a distributed system according to an exemplary embodiment of the present disclosure is shown, wherein the distributed system includes multiple nodes, each node includes multiple computing units and multiple communication units, the multiple communication units are communicatively connected to the multiple computing units respectively, and each of the multiple communication units is communicatively connected to at least one communication unit included in other nodes.
[0030] The computing unit in the distributed system is used to perform various computing operations, such as convolution operations and pooling operations in deep learning, so that it can be applied to large-scale deep learning tasks. Exemplarily, the computing unit can be a graphics processing unit (GPU).
[0031] The communication connection described in the exemplary embodiment of the present disclosure refers to a direct communication link established between two units, so that data communication between the two can be achieved. The communication unit is used to achieve communication connection between nodes. Exemplarily, the communication connection can be implemented in various forms, and it can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. For example, a wired communication connection is achieved by using USB, CAN bus, wired Ethernet, power carrier communication, etc. As long as a communication link that can realize data transmission can be established between the connected nodes, there is no restriction on the form of the specific communication link.
[0032] In one example, the computing unit and the communication unit in each node may be implemented using different chips, for example, a GPU chip is used as the computing unit and an Ethernet chip is used as the communication unit. In this case, the communication connection between the two may be implemented through an IO bus, such as a PCIe bus. In another example, the computing unit in each node and the communication unit connected thereto may be integrated on the same chip, and the chip circuit modules corresponding to the two may be connected, for example, through an AXI bus.
[0033] like Figure 1 As shown, the method 100 includes:
[0034] Step S101: in response to receiving a data sending request from a first computing unit in a first node to send data to a second node, and in response to determining that the first node includes a first communication unit that is communicatively connected to the second node, determining that the first communication unit is a target communication unit;
[0035] Step S102: in response to determining that the target communication unit and the first computing unit are not in a communication connection state, forwarding the data to a second computing unit that is in communication connection with the target communication unit; and
[0036] Step S103: Send the data from the second computing unit to the second node via the target communication unit.
[0037] According to the exemplary embodiment of the present disclosure, each node of the distributed system includes multiple computing units and multiple communication units that are respectively connected to the multiple computing units. By realizing internal forwarding between computing units in the node, the communication unit connected to the computing unit can be used on this basis, so that each computing unit in the node can directly send data to other nodes to realize cross-node data communication. In this way, a distributed system can be constructed without a switching unit, saving hardware costs while improving the flexibility of using each computing unit in the system for collaborative computing.
[0038] Exemplarily, the multiple computing units may be interconnected via a cache coherent high-speed bus, such as NVLink, CCIX, CXL, etc., thereby achieving high-speed data forwarding between computing units within a node.
[0039] Exemplarily, the data may carry metadata when being sent, and the metadata can indicate a target computing unit for processing the data, thereby enabling the data forwarding process to be controlled by parsing the data during data communication, thereby achieving data communication between computing units.
[0040] In one example, data forwarding between different computing units can be controlled by a control unit that is communicatively connected to the computing units. The control unit can control the data sending of each computing unit by querying pre-configured routing information, thereby realizing data communication between computing units across nodes in a distributed system.
[0041] In some examples, the method 100 further includes: in response to determining that the target communication unit is in communication connection with the first computing unit, sending the data from the first computing unit to the second node via the target communication unit. Thus, data communication between the first computing unit and the second node can be achieved when the first computing unit and the second node can be directly connected via the communication unit.
[0042] According to some embodiments, the method 100 further includes: in response to receiving a data transmission request for a first computing unit in a first node to send data to a second node, and in response to determining that any communication unit included in the first node is not in communication connection with the second node, determining that a second communication unit in communication connection with a third node is a target communication unit, wherein the third node can be in communication connection with the second node through at least one communication unit; and sending the data from the second computing unit to the third node via the target communication unit, so that the third node can forward the data to the second node. Thus, in the case where the first node and the second node cannot achieve direct communication connection, data communication between the first computing unit and the second node can be achieved by sending data to the third node, and the third node forwarding the data to the second node.
[0043] According to some embodiments, each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, and wherein, in step S103, sending the data from the second computing unit to the second node via the target communication unit includes: sending the data from the second computing unit to the second node via the communication link corresponding to the first computing unit in the target communication unit. In this case, the plurality of computing units included in each node can simultaneously use their respective corresponding communication links to send data to other nodes, thereby improving communication efficiency.
[0044] Exemplarily, the communication unit may be a network communication unit, and each network communication unit may include a plurality of Ethernet cards, so that a plurality of Ethernet communication links between communication units of adjacent nodes can be constructed by using the plurality of Ethernet cards.
[0045] According to some embodiments, the multiple nodes constitute an N-dimensional torus structure, thereby enabling simple and efficient network interconnection. Each node in the N-dimensional torus structure includes 2N communication units, the multiple nodes are arranged in a grid manner, and the nodes adjacent to each other in the grid are connected to each other through the communication units included therein. For example, when the multiple nodes constitute a two-dimensional torus structure, the multiple nodes are arranged into a two-dimensional grid including multiple rows and multiple columns, and the adjacent nodes in each row and each column are connected to each other, so that each row and each column constitute a ring topology, and the multiple rows and multiple columns constitute a two-dimensional torus topology. It should be understood that the multiple nodes can also be interconnected based on other topological structures, such as a ring topology, a star topology, etc., without limitation.
[0046] According to another aspect of the present disclosure, a data communication method applied to a distributed system is also provided. Figure 2A flow chart of a data communication method 200 applied to a distributed system according to an exemplary embodiment of the present disclosure is shown, wherein the distributed system includes a plurality of nodes, each of which includes a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, and each of the plurality of communication units is communicatively connected to at least one communication unit included in another node. Figure 2 As shown, the method 200 includes:
[0047] Step S201: in response to a third computing unit in a second node receiving data, determining a target computing unit for processing the data; and
[0048] Step S202: In response to determining that the target computing unit is different from the third computing unit and determining that the second node includes the target computing unit, forwarding the data to the target computing unit.
[0049] By utilizing the above method, the internal forwarding function between the computing units in the node can be utilized to forward the received data directly to the corresponding target computing unit, so that the target computing unit can receive the data sent by other nodes without the need for other units to process the data, thereby improving the flexibility of collaborative computing using various computing units in the system.
[0050] In some embodiments, method 200 further includes: in response to determining that the third computing unit is the target computing unit, ending the data communication process.
[0051] Exemplarily, the determination of the target computing unit for processing the data may be achieved by parsing the data. As described above, the data sent by the computing unit in the distributed system may carry meta information when sent, and the meta information can indicate the target computing unit for processing the data.
[0052] According to some embodiments, method 100 further includes: in response to determining that the second node does not include the target computing unit, and determining that the second node includes a third communication unit that is communicatively connected to a fourth node that includes the target computing unit, determining that the third communication unit is a transit communication unit; forwarding the data to a fourth computing unit that is communicatively connected to the transit communication unit; and sending the data from the fourth computing unit to the fourth node via the transit communication unit. Thus, when a node that sends data and a node that receives data cannot achieve direct communication connection, data communication between computing units can be achieved by using the communication unit and computing unit included in other nodes for transit.
[0053] It should be understood that the above embodiment only describes the situation where the data can be forwarded to the node receiving the data via one transit node after being sent. In actual application, it may be necessary to forward the data via multiple transit nodes to achieve data communication between the computing units respectively included in the two nodes. The present disclosure does not limit this.
[0054] According to some embodiments, each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, and wherein, in step S203, sending the data from the fourth computing unit to the fourth node via the transit communication unit includes: sending the data from the fourth computing unit to the fourth node via the communication link corresponding to the third computing unit in the target communication unit. In this case, the plurality of computing units included in each node can simultaneously forward data to other nodes using their respective corresponding communication links, thereby improving communication efficiency.
[0055] According to some embodiments, the multiple nodes form an N-dimensional torus structure, thereby enabling simple and efficient network interconnection. It should be understood that the multiple nodes may also be interconnected based on other topological structures, such as a ring topology, a star topology, etc., without limitation.
[0056] According to another aspect of the present disclosure, a data communication device applied to a distributed system is provided. Figure 3 The structure block diagram of a data communication device 300 applied to a distributed system according to an exemplary embodiment of the present disclosure is shown, wherein the distributed system includes a plurality of nodes, each of which includes a plurality of computing units and a plurality of communication units, wherein the plurality of communication units are respectively connected to the plurality of computing units for communication, and each of the plurality of communication units is connected to at least one communication unit included in another node for communication. Figure 3 As shown, the device 300 includes:
[0057] A first determining unit 301 is configured to, in response to receiving a data sending request from a first computing unit in a first node to send data to a second node, and in response to determining that the first node includes a first communication unit that is communicatively connected to the second node, determine that the first communication unit is a target communication unit;
[0058] A first forwarding unit 302 is configured to forward the data to a second computing unit that is communicatively connected to the target communication unit in response to the target communication unit and the first computing unit not being in a communication connection state; and
[0059] The sending unit 303 is configured to send the data from the second computing unit to the second node via the target communication unit, so that the second node can receive the data.
[0060] The operations of the units 301 to 303 of the data communication device 300 are similar to the operations of the steps S101 to S103 described above, and are not described in detail here.
[0061] According to another aspect of the present disclosure, a data communication device applied to a distributed system is also provided. Figure 4 The structure block diagram of a data communication device 400 applied to a distributed system according to an exemplary embodiment of the present disclosure is shown, wherein the distributed system includes a plurality of nodes, each node includes a plurality of computing units and a plurality of communication units, the plurality of communication units are respectively connected to the plurality of computing units for communication, and each of the plurality of communication units is connected to at least one communication unit included in another node for communication. Figure 4 As shown, the device 400 includes:
[0062] A second determining unit 401 is configured to determine a target computing unit for processing the data in response to the third computing unit in the second node receiving the data; and
[0063] The second forwarding unit 402 is configured to forward the data to the target computing unit in response to the target computing unit being different from the third computing unit and the second node including the target computing unit.
[0064] The operations of the units 401 and 402 of the data communication device 400 are similar to the operations of the steps S201 and S202 described above, and are not described in detail here.
[0065] According to another aspect of the present disclosure, a distributed system is also provided, comprising a plurality of nodes, wherein each of the plurality of nodes comprises: a plurality of computing units; a plurality of communication units communicatively connected to the plurality of computing units respectively, each of the communication units being communicatively connected to at least one communication unit included in other nodes; and a data communication device 300 or a data communication device 400 as described above.
[0066] Figure 5AA block diagram of a distributed system according to an exemplary embodiment of the present disclosure is shown. As shown in FIG5 , in this example, the distributed system includes four nodes (1,1), (1,2), (2,1) and (2,2), each of which includes four computing units and four communication units that are respectively connected to the four computing units, each of which is connected to a communication unit included in other nodes, and the four nodes form a two-dimensional torus structure. Each node also includes a data communication device, and the data communication device in each node is connected to the four computing units in the node (not shown in the figure), so that data forwarding between computing units can be controlled by executing the method 100 or 200 described above.
[0067] In one example, the computing unit A of the node (2, 1) needs to send data to the computing unit D in the node (1, 2). Then the data communication device in the node (2, 1) can perform the following steps:
[0068] Step S1, in response to receiving a data transmission request from a computing unit A of node (2,1) to transmit data to node (1,2), and determining that any communication unit included in node (2,1) is not in communication connection with node (1,2), determining that communication unit a in communication connection with node (2,2) is a target communication unit, and node (2,2) can be in communication connection with node (1,2) through at least one communication unit;
[0069] Step S2: in response to determining that the target communication unit a is in communication connection with the computing unit A, the data is sent to the node (2, 2) via the target communication unit a, so that the node (2, 2) can forward the data to the node (1, 2).
[0070] Furthermore, the data communication device in the node (2,2) may perform the following steps:
[0071] Step S3, in response to the computing unit B in the node (2, 2) receiving the data, determining a target computing unit D for processing the data;
[0072] Step S4, in response to determining that the node (2, 2) does not include the target computing unit D and determining that the node (2, 2) includes a communication unit c that is communicatively connected to the node (1, 2) that includes the target computing unit D, determining that the communication unit c is a transit communication unit;
[0073] Step S5, forwarding the data to a computing unit C that is communicatively connected to a transit communication unit c;
[0074] Step S6, sending the data from the computing unit C to the node (1, 2) via the transit communication unit c;
[0075] Furthermore, the data communication device in the node (1, 2) may perform the following steps:
[0076] Step S7, in response to the computing unit D in the node (1, 2) receiving the data, determining a target computing unit for processing the data;
[0077] Step S8: In response to determining that computing unit D is the target computing unit, the data communication process ends.
[0078] Therefore, by realizing internal data forwarding between computing units in a node and data transfer between nodes, data communication between computing units across nodes can be realized without the need for switching units, thereby improving the flexibility of collaborative computing using various computing units in the system.
[0079] It should be understood that the multiple nodes included in the distributed system can also form other N-dimensional torus topologies, such as a three-dimensional torus topology. In the case where the multiple nodes form a three-dimensional torus topology, each node includes 6 communication units, and the multiple nodes are arranged into a three-dimensional grid, wherein the adjacent nodes included in the rows in each horizontal axis, each vertical axis, and each vertical axis direction are all connected in communication, so that each row in the horizontal axis, vertical axis, and vertical axis direction constitutes a ring topology, and then combined into a three-dimensional torus topology.
[0080] Figure 5B FIG. 2 shows a block diagram of a distributed system according to another exemplary embodiment of the present disclosure. Figure 5B As shown, distributed systems can be Figure 5A By expanding on the basis of the system structure shown, each communication unit can be connected to more computing units, thereby further improving the computing power of the system.
[0081] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned data communication method.
[0082] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is further provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned data communication method.
[0083] According to another aspect of the present disclosure, a computer program product is further provided, including a computer program, wherein the computer program implements the above-mentioned data communication method when executed by a processor.
[0084] refer to Figure 6, a block diagram of an electronic device 600 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0085] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0086] Multiple components in the device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 can be any type of device that can input information to the device 600. The input unit 606 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 607 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 can include but is not limited to a disk, an optical disk. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0087] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as data communication methods. For example, in some embodiments, the data communication method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the data communication method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the data communication method in any other appropriate manner (e.g., by means of firmware).
[0088] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0089] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0090] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0093] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0095] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A data communication method applied to a distributed system, wherein the distributed system comprises a plurality of nodes, each node comprises a plurality of computing units and a plurality of communication units, the plurality of communication units are communicatively connected to the plurality of computing units respectively, and each of the plurality of communication units is communicatively connected to at least one communication unit included in another node, wherein: The multiple nodes form an N-dimensional torus structure, each node includes 2N communication units, and 2N adjacent nodes corresponding to each node are respectively connected to the node through one of the 2N communication units, so that the node can communicate with the 2N adjacent nodes simultaneously through the 2N communication units. The method includes: In response to receiving a data transmission request from a first computing unit in a first node to transmit data to a second node, and in response to determining that the first node includes a first communication unit communicatively connected to the second node, determining the first communication unit as a target communication unit; In response to determining that the target communication unit and the first computing unit are not in a communication connection state, forwarding the data to a second computing unit that is in communication connection with the target communication unit; and sending the data from the second computing unit to the second node via the target communication unit, Each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, respectively, so that the plurality of computing units in the first node can simultaneously send data to the second node through the plurality of communication links in the target communication unit, and wherein sending the data from the second computing unit to the second node via the target communication unit includes: sending the data from the second computing unit to the second node via a communication link in the target communication unit corresponding to the first computing unit, The data carries meta information capable of indicating a target computing unit for processing the data, so that the second node can send the data to the target computing unit based on the meta information.
2. The method of claim 1, further comprising: In response to receiving a data transmission request for a first computing unit in a first node to transmit data to a second node, and in response to determining that none of the communication units included in the first node is communicatively connected to the second node, determining a second communication unit communicatively connected to a third node as a target communication unit, wherein the third node can be communicatively connected to the second node through at least one communication unit; and The data is sent from the second computing unit to the third node via the target communication unit, so that the third node can forward the data to the second node.
3. A data communication method applied to a distributed system, the distributed system comprising a plurality of nodes, each node comprising a plurality of computing units and a plurality of communication units, the plurality of communication units being communicatively connected to the plurality of computing units respectively, each of the plurality of communication units being communicatively connected to at least one communication unit included in another node, wherein: The multiple nodes form an N-dimensional torus structure, each node includes 2N communication units, and 2N adjacent nodes corresponding to each node are respectively connected to the node through one of the 2N communication units, so that the node can communicate with the 2N adjacent nodes simultaneously through the 2N communication units. The method includes: In response to the third computing unit in the second node receiving the data, determining a target computing unit for processing the data; and In response to determining that the target computing unit is different from the third computing unit and determining that the second node includes the target computing unit, forwarding the data to the target computing unit; In response to determining that the second node does not include the target computing unit and determining that the second node includes a third communication unit that is communicatively connected to a fourth node that includes the target computing unit, determining that the third communication unit is a transit communication unit; forwarding the data to a fourth computing unit communicatively connected to the transit communication unit; and sending the data from the fourth computing unit to the fourth node via the transit communication unit, Each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, respectively, so that the plurality of computing units in the second node can simultaneously send data to the fourth node through the plurality of communication links in the transit communication unit, and wherein the forwarding of the data from the fourth computing unit to the fourth node via the transit communication unit includes: sending the data from the fourth computing unit to the fourth node via the communication link in the transit communication unit corresponding to the third computing unit, The data carries meta information capable of indicating the target computing unit, and determining the target computing unit for processing the data includes: determining the target computing unit based on the meta information.
4. A data communication device applied to a distributed system, the distributed system comprising a plurality of nodes, each node comprising a plurality of computing units and a plurality of communication units, the plurality of communication units being communicatively connected to the plurality of computing units respectively, each of the plurality of communication units being communicatively connected to at least one communication unit included in another node, wherein: The multiple nodes form an N-dimensional torus structure, each node includes 2N communication units, and 2N adjacent nodes corresponding to each node are respectively connected to the node through one communication unit in the 2N communication units, so that the node can communicate with the 2N adjacent nodes simultaneously through the 2N communication units, and the device includes: a first determining unit configured to, in response to receiving a data sending request for a first computing unit in a first node to send data to a second node, and in response to determining that the first node includes a first communication unit communicatively connected to the second node, determine that the first communication unit is a target communication unit; a first forwarding unit configured to forward the data to a second computing unit communicatively connected to the target communication unit in response to the target communication unit and the first computing unit not being in a communication connection state; and a sending unit configured to send the data from the second computing unit to the second node via the target communication unit so that the second node can receive the data, Each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, respectively, so that the plurality of computing units in the first node can simultaneously send data to the second node through the plurality of communication links in the target communication unit, and the sending unit is configured to: sending the data from the second computing unit to the second node via a communication link in the target communication unit corresponding to the first computing unit, The data carries meta information capable of indicating a target computing unit for processing the data, so that the second node can send the data to the target computing unit based on the meta information.
5. A data communication device applied to a distributed system, the distributed system comprising a plurality of nodes, each node comprising a plurality of computing units and a plurality of communication units, the plurality of communication units being communicatively connected to the plurality of computing units respectively, each of the plurality of communication units being communicatively connected to at least one communication unit included in another node, wherein: The multiple nodes form an N-dimensional torus structure, each node includes 2N communication units, and 2N adjacent nodes corresponding to each node are respectively connected to the node through one communication unit in the 2N communication units, so that the node can communicate with the 2N adjacent nodes simultaneously through the 2N communication units, and the device includes: a second determining unit configured to determine a target computing unit for processing the data in response to the third computing unit in the second node receiving the data; and The second forwarding unit is configured to: In response to the target computing unit being different from the third computing unit and the second node including the target computing unit, forwarding the data to the target computing unit; In response to determining that the second node does not include the target computing unit and determining that the second node includes a third communication unit that is communicatively connected to a fourth node that includes the target computing unit, determining that the third communication unit is a transit communication unit; forwarding the data to a fourth computing unit communicatively connected to the transit communication unit; and sending the data from the fourth computing unit to the fourth node via the transit communication unit, Each of the communication units includes a plurality of communication links corresponding to the plurality of computing units, respectively, so that the plurality of computing units in the second node can simultaneously send data to the fourth node through the plurality of communication links in the transit communication unit, and the second forwarding unit is configured as follows: sending the data from the fourth computing unit to the fourth node via the communication link in the transit communication unit corresponding to the third computing unit, The data carries meta information capable of indicating the target computing unit, and the second determination unit is configured to determine the target computing unit based on the meta information.
6. A distributed system comprising a plurality of nodes, wherein: Each of the plurality of nodes comprises: Multiple computing units; a plurality of communication units respectively connected to the plurality of computing units in communication, each of the communication units being connected to at least one communication unit included in another node in communication; and The data communication device according to claim 4 or the data communication device according to claim 5.
7. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-3.
