WO2022214041A1 - 集合通信的方法及通信装置 - Google Patents

集合通信的方法及通信装置 Download PDF

Info

Publication number
WO2022214041A1
WO2022214041A1 PCT/CN2022/085645 CN2022085645W WO2022214041A1 WO 2022214041 A1 WO2022214041 A1 WO 2022214041A1 CN 2022085645 W CN2022085645 W CN 2022085645W WO 2022214041 A1 WO2022214041 A1 WO 2022214041A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
information
network device
value
task
Prior art date
Application number
PCT/CN2022/085645
Other languages
English (en)
French (fr)
Inventor
吴涛
郑合文
韩磊
闫健
蒋有军
龚翔宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22784107.9A priority Critical patent/EP4319056A1/en
Publication of WO2022214041A1 publication Critical patent/WO2022214041A1/zh
Priority to US18/477,044 priority patent/US20240022497A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/26Route discovery packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and a communication device for collective communication.
  • the child nodes of the second network device include a first network device (such as an access (leaf) switch) and a third network device (such as an access switch)
  • the child nodes of the first network device and the third network device include four terminal devices as an example, each terminal device is deployed with one process, and different processes are deployed on different terminal devices. Among them, different processes correspond to different ranks.
  • some collective communication algorithms such as recursive doubling algorithms require each terminal device to perform three communications with other terminal devices, and each communication involves the source terminal device and the other terminal devices. The destination terminal device is determined based on the process number.
  • the source terminal device cannot perceive the location of the destination terminal device in the network topology, and there may be a phenomenon of multiple communications across the second network device. In this case, the communication path between the two terminal devices is long, and the resource overhead is large.
  • Embodiments of the present application provide a method and a communication device for collective communication, which can determine to reduce the number of long communication paths and save resource overhead.
  • an embodiment of the present application provides a method for collective communication, where the execution body of the method may be a first terminal device, or may be a chip applied in the first terminal device.
  • the following description will be given by taking the execution subject as the first terminal device as an example.
  • the method includes: the first terminal device receives at least one second packet from the first network device.
  • the second packet includes information of the first process and information of the network device corresponding to the first process, the first process is used to execute the first task, and the information of the network device corresponding to the first process is the terminal device where the first process is located Information about the network device to which it belongs.
  • the first terminal device determines the third packet according to the at least one second packet.
  • the third packet includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network device is at least one of the network devices corresponding to the first task.
  • the first terminal device sends a third packet to the first network device.
  • the second packet received by the first terminal device carries both the information of the first process and the information of the network device corresponding to the first process.
  • the first terminal device aggregates the second packet to obtain the third packet.
  • the first terminal device sends a third message. Since the third packet includes at least information of one target network device and information of all the first processes that execute the first task corresponding to the target network device, for terminal devices belonging to the same network device, each terminal device is All the first processes executing the first task corresponding to the target network device can be known, so as to plan a communication path, realize short-range communication, minimize the communication path across the second network device, and save resource overhead.
  • neither the first network device nor the first terminal device need to support other protocols, nor does the first terminal device need to deploy the Netloc library, and no additional Netloc library deployment work is introduced.
  • the target network devices are all network devices corresponding to the first task.
  • the first terminal device determines the third packet according to the at least one second packet, including: in the case that the number of the at least one second packet is the target value, the first terminal device determines the third packet according to the at least one second packet.
  • the target value indicates the number of all terminal devices where the first process executing the first task is located.
  • the first terminal device generates the third packet only when it determines that the second packet has arrived, so that the third packet carries the information of all the first processes that execute the first task.
  • the target network device is one of the network devices corresponding to the first task; the first terminal device determines the third packet according to the at least one second packet, including: in the at least one second packet When the number of is the target value, the first terminal device determines the third packet according to the target packet in the at least one second packet.
  • the target value indicates the number of all terminal devices where the first process executing the first task is located, and the target packet belongs to at least one second packet and carries information of the same target network device.
  • the first terminal device determines that the second packet is in order, it generates the third packet according to the target packet that carries the information of the same target network device in the second packet.
  • a third packet carries information of all first processes that execute the first task and are deployed on a terminal device belonging to a certain target network device.
  • the third packet further includes first information, where the first information includes at least one quantity value, and the number of the quantity value is consistent with the number of target network devices, and corresponds to each other one-to-one.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A target network device corresponding to a quantity value.
  • the first quantity value indicates the number of terminal devices in which the first process is deployed among the terminal devices belonging to a certain target network device.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet, thereby indicating the packet type of the third packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the second packet further includes third information, and the third information indicates that the second packet includes information of the network device corresponding to the first process, so that the first terminal device knows that the second packet carries Information about the network device corresponding to the first process.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, where the fourth information indicates that the type of the second packet is a query packet, thereby indicating the packet type of the second packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet. That is to say, the third packet may be transmitted in a RoCE protocol format.
  • the second packet satisfies the RoCE protocol format. That is, the second packet may be transmitted in a RoCE protocol format.
  • an embodiment of the present application provides a method for collective communication, where the execution body of the method may be a first network device or a chip applied in the first network device.
  • the following description will be given by taking the execution subject being the first network device as an example.
  • the method includes: the first network device sends at least one second packet to the first terminal device.
  • the second packet includes information of the first process and information of the network device corresponding to the first process, the first process is used to execute the first task, and the information of the network device corresponding to the first process is the terminal device where the first process is located Information about the network device to which it belongs.
  • the first network device receives the third packet from the first terminal device.
  • the third packet includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network device is at least one of the network devices corresponding to the first task.
  • the first network device sends a third packet to the target terminal device.
  • the target terminal device is deployed with the first process for executing the first task, and the target terminal device belongs to the target network device.
  • the second packet provided by the first network device to the first terminal device carries both the information of the first process and the information of the network device corresponding to the first process, so that the first terminal device can generate the first process.
  • the first network device receives the third packet from the first terminal device, and then forwards it to the corresponding target terminal device. Since the third packet includes at least information of one target network device and information of all the first processes that execute the first task corresponding to the target network device, for terminal devices belonging to the same network device, each terminal device is All the first processes executing the first task corresponding to the target network device can be known, so as to plan a communication path, realize short-range communication, minimize the communication path across the second network device, and save resource overhead. In addition, neither the above-mentioned first network device nor the first terminal device need to support other protocols, nor does the terminal device need to deploy the Netloc library, and no additional Netloc library deployment work is introduced.
  • the third packet further includes first information, and the first information includes at least one quantity value, and the number of the quantity value is consistent with the number of target network devices, and corresponds to each other one-to-one.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A target network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the collective communication method in this embodiment of the present application further includes: the first network device receives the first packet from the second terminal device.
  • the first packet includes information of the first process, and the second terminal device belongs to the target terminal device.
  • the first network device determines the second packet according to the first packet.
  • the second packet is generated by the first network device, that is, the first network device adds its own information to the first packet to generate the second packet.
  • the first network device determining the second packet according to the first packet includes: when a preset condition is met, the first network device determining the second packet according to the first packet .
  • the preset conditions include: the type of the first packet belongs to the target type, and the first packet includes fifth information, and the fifth information indicates that the first packet does not carry information of the network device corresponding to the first process.
  • the target type may be a query message.
  • the first network device only when the first packet belongs to the target type and the first packet does not carry the information of the network device corresponding to the first process, the first network device generates the second packet based on the first packet.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet, so as to indicate the packet type of the first packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the method for collective communication in this embodiment of the present application further includes: the first network device receives a second packet from the second terminal device. Wherein, the second terminal device belongs to the target terminal device.
  • the first network device obtains the information from the second terminal device
  • the second packet and the second packet carries both the information of the first process and the information of the network device corresponding to the first process.
  • the first network device only needs to forward the second packet, and does not need to process the second packet.
  • the method for collective communication in this embodiment of the present application further includes: the first network device receives a second packet from the second network device.
  • the third network device belongs to the second network device.
  • the first network device obtains the information through the second network device A second packet, and the second packet carries both the information of the first process and the information of the network device corresponding to the first process.
  • the first network device only needs to forward the second packet, and does not need to process the second packet.
  • the second message further includes third information.
  • the third information indicates that the second packet includes information of the network device corresponding to the first process, so that the first terminal device can quickly know whether the second packet carries the information of the network device.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, where the fourth information indicates that the type of the second packet is a query packet, so as to indicate the packet type of the second packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet.
  • the second packet satisfies the RoCE protocol format.
  • an embodiment of the present application provides a method for collective communication, where the execution body of the method may be a third network device, or may be a chip applied in the third network device.
  • the following description will be given by taking the execution subject being the third network device as an example.
  • the method includes: the third network device sends at least one second packet to the second network device.
  • the second packet includes information of the first process and information of the third network device, the first process is deployed on the third terminal device, the third terminal device belongs to the third network device, and the first process is used to perform the first task .
  • the third network device receives the third packet from the second network device.
  • the third packet includes at least information of the third network device and information of all the first processes that execute the first task corresponding to the third network device. After that, the third network device sends a third packet to the third terminal device.
  • the third terminal device belongs to the third network device and the first process is deployed on the third terminal device
  • the second packet provided by the third network device to the second network device carries both The information of the first process is carried, and the information of the third network device is also carried, so that the first terminal device generates a third packet.
  • the third network device further receives the third packet from the second network device, and forwards the third packet to the third terminal device. Since the third packet includes at least the information of the third network device and the information of all the first processes corresponding to the third network device that execute the first task, the third terminal device can know all the corresponding processes of the third network device that execute the first task.
  • the first process of a task thereby planning a communication path, realizing short-range communication, minimizing the communication path across the second network device, and saving resource overhead.
  • the third terminal device does not perform the above steps, so as to avoid waste of transmission resources.
  • the third network device, the second network device, and the third terminal device do not need to support other protocols, and the third terminal device does not need to deploy the Netloc library, and no additional Netloc library deployment work is introduced.
  • the third packet further includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task.
  • the target network device is all network devices except the third network device in the network devices corresponding to the first task.
  • the third packet can also be carried Information of other target network devices and information of all first processes executing the first task corresponding to the target network device, so that the third terminal device can know the distribution status of all first processes corresponding to the first task in the network topology.
  • the third packet further includes first information, the first information includes at least one quantity value, and the number of the quantity value is the same as the quantity of network devices corresponding to the first task, and is in one-to-one correspondence.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the method for collective communication in this embodiment of the present application further includes: the third network device receives the first packet from the third terminal device.
  • the first packet includes information of the first process.
  • the third network device determines the second packet according to the first packet.
  • the second packet is generated by the third network device, that is, the third network device adds its own information to the first packet to generate the second packet.
  • the third network device determining the second packet according to the first packet includes: when the preset condition is satisfied, the third network device determining the second packet according to the first packet .
  • the preset conditions include: the type of the first packet belongs to the target type, and the first packet includes fifth information.
  • the fifth information indicates that the first packet does not carry the information of the third network device.
  • the third network device only when the first packet belongs to the target type and the first packet does not carry the information of the third network device, the third network device generates the second packet based on the first packet.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the method for collective communication in this embodiment of the present application further includes: the third network device receives the second packet from the third terminal device. That is to say, the third network device obtains the second packet from the third terminal device, and the second packet carries both the information of the first process and the information of the third network device. The third network device only needs to forward the second packet, and does not need to process the second packet.
  • the second message further includes third information.
  • the third information indicates that the second packet includes information of the third network device, so that the third network device can quickly know whether the second packet carries the information of the third network device.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, and the fourth information indicates that the type of the second packet is a query packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet. That is to say, the third packet may be transmitted in a RoCE protocol format.
  • the second packet satisfies the RoCE protocol format. That is, the second packet may be transmitted in a RoCE protocol format.
  • an embodiment of the present application provides a method for collective communication, where the execution body of the method may be a fourth terminal device, or may be a chip applied in the fourth terminal device.
  • the following description will be given by taking the execution subject being the fourth terminal device as an example.
  • the method includes: the fourth terminal device sends the first message to the fourth network device.
  • the first packet includes at least information of the first process, the first process is deployed on the fourth terminal device, and the first process is used to execute the first task.
  • the fourth terminal device receives the third packet from the fourth network device.
  • the third packet includes at least information of the fourth network device and information of all the first processes that execute the first task corresponding to the fourth network device.
  • the fourth terminal device when the fourth terminal device sends the first packet to the fourth network device, the first packet carries at least the information of the first process, so that the first terminal device can summarize the information of the first process, thereby A third message is generated. Then, the fourth terminal device receives the third packet from the fourth network device, so as to know at least the information belonging to the fourth network device and the information of all the first processes that execute the first task corresponding to the fourth network device, so as to make The fourth terminal device plans a communication path, realizes short-range communication, minimizes the communication path across the second network device, and saves resource overhead. Moreover, in the above process, if a fourth terminal device does not deploy the first process, the fourth terminal device does not perform the above steps, so as to avoid waste of transmission resources. In addition, neither the above-mentioned fourth network device nor the fourth terminal device needs to support other protocols, nor does the fourth terminal device need to deploy the Netloc library, and no additional Netloc library deployment work is introduced.
  • the third packet further includes information of the fifth network device and information of all the first processes that execute the first task corresponding to the fifth network device.
  • the fifth network device is all network devices except the fourth network device among the network devices corresponding to the first task.
  • the third packet can also carry the information of the fifth network device and the information of all the first processes that execute the first task corresponding to the fifth network device, so that the fourth terminal device can know the information corresponding to the first task.
  • the distribution of all first processes in the network topology can also carry the information of the fifth network device and the information of all the first processes that execute the first task corresponding to the fifth network device, so that the fourth terminal device can know the information corresponding to the first task.
  • the third packet further includes first information, the first information includes at least one quantity value, and the number of the quantity value is the same as the quantity of network devices corresponding to the first task, and is in one-to-one correspondence.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the first packet includes fifth information, and the fifth information indicates that the first packet does not carry the information of the fourth network device.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes information of the fourth network device.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet. That is to say, the third packet may be transmitted in a RoCE protocol format.
  • the first packet satisfies the RoCE protocol format. That is, the first packet may be transmitted in a RoCE protocol format.
  • an embodiment of the present application provides a communication device, where the communication device may be the first terminal device in the first aspect or any possible design of the first aspect, or be provided in the first terminal device.
  • the communication device includes a module, unit, or means (means) corresponding to the above-mentioned method, and the module, unit, or means can be realized by hardware, software, or The corresponding software implementation is performed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions.
  • the communication device includes a sending unit, a receiving unit and a processing unit.
  • the receiving unit is configured to receive at least one second packet from the first network device.
  • the second packet includes information of the first process and information of the network device corresponding to the first process, the first process is used to execute the first task, and the information of the network device corresponding to the first process is the terminal device where the first process is located Information about the network device to which it belongs.
  • the processing unit is configured to determine the third packet according to the at least one second packet.
  • the third packet includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network device is at least one of the network devices corresponding to the first task.
  • the sending unit is configured to send the third packet to the first network device.
  • the target network devices are all network devices corresponding to the first task.
  • the processing unit is specifically configured to: in the case that the quantity of the at least one second packet is the target value, determine the third packet according to the at least one second packet.
  • the target value indicates the number of all terminal devices where the first process executing the first task is located.
  • the target network device is one of the network devices corresponding to the first task.
  • the processing unit is specifically configured to: in the case that the quantity of the at least one second packet is the target value, determine the third packet according to the target packet in the at least one second packet.
  • the target value indicates the number of all terminal devices where the first process executing the first task is located, and the target packet belongs to at least one second packet and carries information of the same target network device.
  • the third packet further includes first information, and the first information includes at least one quantity value, and the number of the quantity value is consistent with the number of target network devices, and corresponds to each other one-to-one.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A target network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the second packet further includes third information, and the third information indicates that the second packet includes information of the network device corresponding to the first process.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, and the fourth information indicates that the type of the second packet is a query packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet.
  • the second packet satisfies the RoCE protocol format.
  • an embodiment of the present application provides a communication device, where the communication device may be the first network device in the second aspect or any possible design of the second aspect, or be provided in the first network device.
  • the communication device includes a module, unit, or means (means) corresponding to the above-mentioned method, and the module, unit, or means can be implemented by hardware, software, or The corresponding software implementation is performed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions.
  • the communication device includes a sending unit and a receiving unit.
  • the sending unit is configured to send at least one second packet to the first terminal device.
  • the second packet includes information of the first process and information of the network device corresponding to the first process, the first process is used to execute the first task, and the information of the network device corresponding to the first process is the terminal device where the first process is located Information about the network device to which it belongs.
  • the receiving unit is configured to receive the third message from the first terminal device.
  • the third packet includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network device is at least one of the network devices corresponding to the first task.
  • the sending unit is further configured to send a third message to the target terminal device.
  • the target terminal device is deployed with the first process for executing the first task, and the target terminal device belongs to the target network device.
  • the third packet further includes first information, and the first information includes at least one quantity value, and the number of the quantity value is consistent with the number of target network devices, and corresponds to each other one-to-one.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A target network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the receiving unit is further configured to receive the first packet from the second terminal device.
  • the first packet includes information of the first process
  • the second terminal device belongs to the target terminal device.
  • the communication device further includes a processing unit, and the processing unit is configured to determine the second message according to the first message.
  • the processing unit is specifically configured to: determine the second packet according to the first packet under the condition that the preset condition is satisfied.
  • the preset conditions include: the type of the first packet belongs to the target type, and the first packet includes fifth information, and the fifth information indicates that the first packet does not carry information of the network device corresponding to the first process.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the receiving unit is further configured to receive the second packet from the second terminal device.
  • the second terminal device belongs to the target terminal device.
  • the receiving unit is further configured to receive the second packet from the second network device.
  • the third network device belongs to the second network device.
  • the second message further includes third information.
  • the third information indicates that the second packet includes information of the network device corresponding to the first process.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, and the fourth information indicates that the type of the second packet is a query packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet.
  • the second packet satisfies the RoCE protocol format.
  • an embodiment of the present application provides a communication device.
  • the communication device may be a third network device in the third aspect or any possible design of the third aspect, or a third network device disposed in the third network device.
  • the hardware or software includes one or more modules or units corresponding to the above functions.
  • the communication device includes a sending unit and a receiving unit.
  • the sending unit is configured to send at least one second packet to the second network device.
  • the second packet includes information of the first process and information of the communication device, the first process is deployed on the third terminal device, the third terminal device belongs to the communication device, and the first process is used to perform the first task.
  • the receiving unit is configured to receive the third packet from the second network device.
  • the third packet includes at least information of the communication device and information of all first processes corresponding to the communication device that execute the first task.
  • the sending unit is further configured to send a third message to the third terminal device.
  • the third packet further includes information of the target network device and information of all first processes corresponding to the target network device that execute the first task.
  • the target network device is all network devices except the communication device in the network devices corresponding to the first task.
  • the third packet further includes first information, the first information includes at least one quantity value, and the number of the quantity value is the same as the quantity of network devices corresponding to the first task, and is in one-to-one correspondence.
  • the first quantity value indicates the number of terminal devices in the terminal equipment set that are deployed with the first process that executes the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the receiving unit is further configured to receive the first packet from the third terminal device.
  • the first packet includes information of the first process.
  • the processing unit is further configured to determine the second packet according to the first packet.
  • the processing unit is specifically configured to: determine the second packet according to the first packet under the condition that the preset condition is satisfied.
  • the preset conditions include: the type of the first packet belongs to the target type, and the first packet includes fifth information.
  • the fifth information indicates that the first packet does not carry the information of the communication device.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the receiving unit is further configured to receive the second packet from the third terminal device.
  • the second message further includes third information.
  • the third information indicates that the second packet includes information of the communication device.
  • the third information includes a second field in the second packet, and the value of the second field in the second packet is a second preset value.
  • the second packet further includes fourth information, and the fourth information indicates that the type of the second packet is a query packet.
  • the fourth information includes the first field in the second packet, and the value of the first field in the second packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet.
  • the second packet satisfies the RoCE protocol format.
  • an embodiment of the present application provides a communication device, where the communication device may be the fourth terminal device in the fourth aspect or any possible design of the fourth aspect, or be provided in the fourth terminal device.
  • the communication device includes modules, units, or means (means) corresponding to the above-mentioned methods, and the modules, units, or means can be implemented by hardware, software, or The corresponding software implementation is performed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above functions.
  • the communication device includes a sending unit, a receiving unit and a processing unit.
  • the sending unit is configured to send the first packet to the fourth network device.
  • the first packet includes at least information of the first process
  • the first process is deployed in the communication device, and the first process is used to execute the first task.
  • the receiving unit is configured to receive the third packet from the fourth network device.
  • the third packet includes at least information of the fourth network device and information of all the first processes that execute the first task corresponding to the fourth network device.
  • the processing unit is used to determine the first message.
  • the third packet further includes information of the fifth network device and information of all the first processes that execute the first task corresponding to the fifth network device.
  • the fifth network device is all network devices except the fourth network device among the network devices corresponding to the first task.
  • the third packet further includes first information, the first information includes at least one quantity value, and the number of the quantity value is the same as the quantity of network devices corresponding to the first task, and is in one-to-one correspondence.
  • the first quantity value indicates the number of terminal equipments in the terminal equipment set that are deployed with the first process executing the first task, the first quantity value is one of at least one quantity value, and the terminal equipment in the terminal equipment set belongs to the first A network device corresponding to a quantity value.
  • the third packet further includes second information, and the second information indicates that the type of the third packet is a notification packet.
  • the second information includes the first field in the third packet, and the value of the first field in the third packet is the first preset value.
  • the first packet includes fifth information, and the fifth information indicates that the first packet does not carry the information of the fourth network device.
  • the fifth information includes a second field in the first packet, and the value of the second field in the first packet is a fourth preset value.
  • the first packet further includes information of the fourth network device.
  • the first packet further includes sixth information, where the sixth information indicates that the type of the first packet is a query packet.
  • the sixth information includes the first field in the first packet, and the value of the first field in the first packet is a third preset value.
  • the third packet satisfies the protocol format of the remote direct memory access RoCE of the converged Ethernet.
  • the first packet satisfies the RoCE protocol format.
  • an embodiment of the present application provides a communication device, including: a processor and a memory; the memory is used to store a computer instruction, and when the processor executes the instruction, the communication device is made to perform any one of the above-mentioned aspects or any
  • the method executed by the first terminal device in any possible design.
  • the communication apparatus may be the first terminal device in the first aspect or any possible design of the first aspect, or a chip that implements the functions of the first terminal device.
  • an embodiment of the present application provides a communication device, including: a processor; the processor is coupled to a memory, and is configured to read and execute instructions in the memory, so that the communication device performs any of the above-mentioned aspects Or a method executed by the first terminal device in any possible design of any aspect.
  • the communication device may be the first terminal device in the first aspect or any possible design of the first aspect, or a chip that implements the function of the first terminal device.
  • an embodiment of the present application provides a chip, including a logic circuit and an input and output interface.
  • the input and output interfaces are used for communication with modules other than the chip.
  • the chip may be a chip that implements the function of the first terminal device in the first aspect or any possible design of the first aspect.
  • the input and output interface outputs the third message.
  • the input and output interface inputs the second message.
  • a logic circuit is used to run a computer program or instructions to implement the method in the above first aspect or any possible design of the first aspect.
  • an embodiment of the present application provides a communication device, including: a processor and a memory; the memory is used to store a computer instruction, and when the processor executes the instruction, the communication device is made to execute any of the foregoing aspects or The method performed by the first network device in any possible design of any aspect.
  • the communication apparatus may be the first network device in the second aspect or any possible design of the second aspect, or a chip that implements the function of the first network device.
  • an embodiment of the present application provides a communication device, including: a processor; the processor is coupled to a memory, and is configured to read and execute instructions in the memory, so that the communication device executes any of the above A method performed by a first network device in any possible design of the aspect or any aspect.
  • the communication apparatus may be the first network device in the second aspect or any possible design of the second aspect, or a chip that implements the function of the first network device.
  • an embodiment of the present application provides a chip, including a logic circuit and an input and output interface.
  • the input and output interfaces are used for communication with modules other than the chip.
  • the chip may be a chip that implements the function of the first network device in the second aspect or any possible design of the second aspect.
  • the input and output interface outputs the second packet and the third packet.
  • the input and output interface inputs the third message.
  • a logic circuit is used to run a computer program or instructions to implement the method in the above second aspect or any possible design of the second aspect.
  • an embodiment of the present application provides a communication device, including: a processor and a memory; the memory is used to store computer instructions, and when the processor executes the instructions, the communication device is made to perform any of the above aspects or A method performed by a third network device in any possible design of any aspect.
  • the communication apparatus may be the third network device in the third aspect or any possible design of the third aspect, or a chip that implements the function of the third network device.
  • an embodiment of the present application provides a communication device, including: a processor; the processor is coupled to a memory, and is configured to read and execute instructions in the memory, so that the communication device executes any of the above A method performed by a third network device in any possible design of the aspect or any aspect.
  • the communication apparatus may be the third network device in the third aspect or any possible design of the third aspect, or a chip that implements the function of the third network device.
  • an embodiment of the present application provides a chip, including a logic circuit and an input and output interface.
  • the input and output interfaces are used for communication with modules other than the chip.
  • the chip may be a chip that implements the function of the third network device in the third aspect or any possible design of the third aspect.
  • the input and output interface outputs the second packet and the third packet.
  • the input and output interface inputs the third message.
  • a logic circuit is used to run a computer program or instructions to implement the method in the above third aspect or any possible design of the third aspect.
  • an embodiment of the present application provides a communication device, including: a processor and a memory; the memory is used to store a computer instruction, and when the processor executes the instruction, the communication device is made to perform any one of the above-mentioned aspects or The method performed by the fourth terminal device in any possible design of any aspect.
  • the communication device may be the fourth terminal device in the fourth aspect or any possible design of the fourth aspect, or a chip that implements the functions of the fourth terminal device.
  • an embodiment of the present application provides a communication device, including: a processor; the processor is coupled to a memory, and is configured to read and execute instructions in the memory, so that the communication device executes any one of the above A method performed by the fourth terminal device in any possible design of the aspect or any aspect.
  • the communication device may be the fourth terminal device in the fourth aspect or any possible design of the fourth aspect, or a chip that implements the functions of the fourth terminal device.
  • an embodiment of the present application provides a chip, including a logic circuit and an input and output interface.
  • the input and output interfaces are used for communication with modules other than the chip.
  • the chip may be a chip that implements the function of the fourth terminal device in the fourth aspect or any possible design of the fourth aspect.
  • the input and output interface outputs the second packet and the third packet.
  • the input and output interface inputs the third message.
  • the logic circuit is used to run the computer program or instructions to implement the method in the above fourth aspect or any possible design of the fourth aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, the computer can execute any one of the above aspects. method of collective communication.
  • an embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to perform the collective communication method in any one of the foregoing aspects.
  • circuit system includes a processing circuit configured to perform the method for collective communication according to any one of the foregoing aspects.
  • an embodiment of the present application provides a communication system, where the communication system includes the terminal device and the network device in any one of the foregoing aspects.
  • FIG. 1a is a schematic diagram of distribution of communication paths under a network architecture provided by an embodiment of the present application
  • FIG. 1b is a schematic diagram of another communication path distribution under the network architecture provided by the embodiment of the application.
  • 2a is a schematic flowchart of a method for collective communication provided by an embodiment of the present application
  • FIG. 2b is a schematic structural diagram of a message provided by an embodiment of the present application.
  • FIG. 2c is a schematic structural diagram of still another message provided by an embodiment of the present application.
  • 3a is a schematic flowchart of still another method for collective communication provided by an embodiment of the present application.
  • 3b is a schematic structural diagram of another message provided by an embodiment of the present application.
  • 4a is a schematic flowchart of another method for collective communication provided by an embodiment of the present application.
  • FIG. 4b is a schematic structural diagram of another message provided by an embodiment of the present application.
  • 4c is a schematic structural diagram of another message provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a communication device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of still another communication apparatus according to an embodiment of the present application.
  • MPI Message passing interface
  • MPI is a communication library for message passing between multiple processes.
  • the application realizes data transmission by calling the communication interface defined in MPI.
  • Collective communication is a communication mode of MPI, which specifically refers to the communication mode in which all processes in a specific group participate. Wherein, a specific group may be a collection of processes that complete a certain task.
  • a task refers to a set of processes that need to be executed to complete a specific computing business. Tasks are run by a set of processes on a node. The number of nodes may be one or multiple. Each group of processes can include one process or multiple processes. One process in a group of processes can be deployed on a node, or multiple processes in a group of processes can be deployed.
  • a process is used to complete a certain part of the operation of a task.
  • different processes are identified by different numbers.
  • each process is assigned a unique number during the initialization of the communication domain.
  • the communication domain must be created when running a task, and the communication domain includes a context, a process group, and the like.
  • a task can have one or more communication domains, and a communication domain corresponds to a process group.
  • a process group represents a collection of all processes in the communication domain corresponding to itself.
  • the node where the process numbered 0 is located is called the master node, and the other nodes are called computing nodes.
  • the master node and the computing node run the same task at the same time to realize parallel computing. It should be noted that, in this embodiment of the present application, the node may also be replaced by a terminal device.
  • FIG. 1a shows a schematic diagram of a network architecture to which this embodiment of the present application is applied.
  • the network architecture is only used as an example, and should not be construed as a limitation on the application scenarios of the embodiments of the present application.
  • the sub-nodes of the second network device include a first network device and a third network device.
  • the second network device may be a core (spine) switch, and both the first network device and the third network device may be access (leaf) switches.
  • One process is deployed on one terminal device, and different processes are deployed on different terminal devices.
  • the numbers corresponding to different processes are also different.
  • the numbers of the deployment processes on the terminal device include: number 0, number 1, number 2, and number 3.
  • the numbers of the deployment process on the terminal device include: number 4, number 5, number 6, and number 7.
  • the network devices (such as the first network device, the second network device, and the third network device) in the embodiments of the present application are not limited to the switches mentioned above, and may also be other devices, such as routers, etc. .
  • the terminal device in this embodiment of the present application may also be described as a node.
  • the terminal device mentioned in the embodiments of this application may be a server or the like.
  • a belongs to B means that A is a child node of B, and B is a parent node of A.
  • B there are four terminal devices belonging to the first network device, which can also be described as: there are four child nodes of the first network device.
  • B to which A belongs also means that A is the child node of B, and B is the parent node of A.
  • the terminal device where the process numbered 0 is located belongs to the child node of the first network device.
  • the network device to which the terminal device (the terminal device in which the process numbered 0 is deployed) belongs is the first network device.
  • some collective communication algorithms require each terminal device to perform three communications with other terminal devices, and each communication involves the source terminal device and the other terminal devices.
  • the destination terminal device is determined based on the process number.
  • the curved arrows in Fig. 1a show the source end device and the destination end device for each communication.
  • the number of second network devices may be one or multiple. In FIG. 1a, only one A second network device is shown. The number of sub-nodes of the second network device may be one or multiple. In FIG. 1a, only the second network device including two sub-nodes is taken as an example for description. The number of child nodes of the first network device may be one or more, and in FIG. 1a only the first network device includes four child nodes as an example for description. Similarly, the number of child nodes of the third network device may be one or more. In FIG. 1a, only the third network device includes four child nodes as an example for description. The number of child nodes of the first network device and the number of child nodes of the third network device may be the same or different, which is not limited in this embodiment of the present application.
  • the source terminal device cannot perceive the location of the destination terminal device in the network topology, there may be multiple communications across the second network device. As shown in FIG. 1b, the number of communications across the second network device in the three parallel communications is three, while in FIG. 1a, the number of communications across the second network device in the three parallel communications is one. That is, the longer the communication path across the second network device, the greater the communication overhead.
  • the first network device, the third network device and the terminal device all support the open flow (open flow) protocol, and a lightweight network location (portable network locality, Netloc) is deployed on the terminal device.
  • the terminal device can obtain the global network topology. Then, for a certain task, the terminal device can query the application programming interface (API) through the MPI communication library to obtain the position of the process executing the task in the network topology, and then combine the corresponding number of each process. , to determine the communication path that matches the network topology.
  • API application programming interface
  • terminal device 1 The terminal device that deploys the process identified by the number 0 is denoted as terminal device 1.
  • terminal device 1 acquires the first topology information from the first network device.
  • the first topology information includes the connection status between the first network device and the second network device, and the connection status between the first network device and its own child nodes.
  • the terminal device 1 acquires the third topology information from the third network device.
  • the third topology information includes the connection status between the third network device and the second network device, and the connection status between the third network device and its own child nodes.
  • the terminal device 1 can determine the global network topology based on the first topology information and the third topology information. For terminal devices that deploy processes identified by other numbers, the above process can be repeated to determine the global network topology.
  • the terminal device needs to support the OpenFlow protocol, and the Netloc library needs to be deployed.
  • the network equipment also needs to support the OpenStream protocol.
  • the topology information provided by each network device indicates the connection status between itself and other devices. Even if no process is deployed on a terminal device belonging to the network device, the network device still provides the connection between itself and the terminal device. The connection status is a waste of transmission resources.
  • the embodiments of the present application provide a method for collective communication, which can accurately determine the position of a process of a certain task in the network topology, which is beneficial to planning a communication path matching the network topology, reducing long communication paths and reducing resources. overhead.
  • the network architecture to which the method for collective communication according to the embodiment of the present application is applicable is shown in FIG. 1a and FIG. 1b.
  • the network architecture and service scenarios described in the embodiments of the present application are for the purpose of illustrating the technical solutions of the embodiments of the present application more clearly, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application.
  • the terminal device deployed with the process identified by the number 0 is described as the terminal device 1
  • the network device to which the terminal device 1 belongs is described as the first network device
  • the number 0 is described as the first network device.
  • the task performed by the identified process is described as the first task.
  • the terminal device 1 can also be described as a master node.
  • the first stage reporting process information and network device information.
  • the process information refers to the information of the first process deployed on a terminal device
  • the information of the network device refers to the information of the network device corresponding to the first process.
  • the network device corresponding to the first process refers to: in a communication domain, the network device to which the terminal device in which the first process is deployed belongs.
  • the process of executing the first task is not only distributed on the terminal device 1, but also distributed on other terminal devices belonging to the first network device.
  • the terminal device 2 sends the packet 1 to the first network device.
  • the first network device receives the packet 1 from the terminal device 2 .
  • the description of the terminal device 2 is as follows: the terminal device 2 belongs to the first network device, and the first process is deployed on the terminal device 2 .
  • the number of the deployment process on the terminal device 2 may be one of the following: number 1, number 2, or number 3.
  • the terminal device 2 may also be referred to as a computing node.
  • the message 1 includes at least information of the first process, such as the number of the first process, the identifier of the first process, and the like.
  • the information of the first process includes the information of "number 1".
  • the information of the first process includes the information of "number 2".
  • the message 1 uses 4 bytes (byte, B) to carry the information of the first process, and these 4 bytes are recorded as node_info.
  • Example 1 The message 1 does not carry the information of the network device corresponding to the first process (ie, the first network device in FIG. 1a ).
  • the first network device in this embodiment of the present application executes S202.
  • S202 For details, please refer to the relevant description of S202, which will not be repeated here.
  • Message 1 may also include at least one of the following information:
  • the information 1 indicates that the packet 1 does not carry the information of the network device corresponding to the first process (ie, the first network device in FIG. 1a).
  • the information 1 includes the field 1 in the packet 1, and the value of the field 1 in the packet 1 is a preset value of 1.
  • Field 1 may be a switch device (switch_modified) field in packet 1, as shown in FIG. 2b, or may be a field with other names, which is not limited in this embodiment of the present application.
  • the value of the preset value 1 may be 0, or may be other values, which are not limited in this embodiment of the present application.
  • the switching device field occupies bits 4-7 in the infinite bandwidth (infiniband, IB) payload (payload). When the value of the switching device field is 0, the packet 1 where this field is located is not It carries the information of the network device corresponding to the first process.
  • the second item information 2.
  • the information 2 indicates that the type of the message 1 is a query message.
  • the information 2 includes the field 2 in the packet 1, and the value of the field 2 in the packet 1 is a preset value of 2.
  • Field 2 may be a message type indication field in message 1, such as a field marked as query_notify in FIG. 2b, or may be a field with other names, which is not limited in this embodiment of the present application.
  • the value of the preset value 2 may be 0, or may be other values, which are not limited in this embodiment of the present application.
  • the message type indication field occupies bits 0-3 in the InfiniBand payload. When the value of the message type indication field is 0, the message 1 where the field is located is a query message.
  • Example 2 The packet 1 carries the information of the network device corresponding to the first process (ie, the first network device in FIG. 1a ).
  • the first network device in this embodiment of the present application does not need to perform S202, but only needs to perform S203
  • the packet 2 in S203 is the packet 1 in this example, see the relevant description of S203 for details , and will not be repeated here.
  • the information of the first network device carried in the packet 1 is introduced: the information of the first network device is used to uniquely identify the first network device, which may include but not limited to: the IP address of the first network device, the first network device identification information, etc. Taking FIG.
  • the message 1 uses 4 bytes to carry the information of the first network device, and these 4 bytes are denoted as TOR_info.
  • the field corresponding to TOR_info carries the IP address (eg, 192.168.2.1) of the first network device.
  • message 1 does not include information 1 (eg, a field marked switch_modified), but may include information 2 (eg, a field marked query_notify), as shown in FIG. 2c.
  • the terminal device 2 can acquire the information of the first network device in various ways. For example, during the establishment of the communication connection between the terminal device 2 and the first network device, the terminal device 2 acquires the first network device. Information about a network device. Of course, the terminal device 2 may also acquire the information of the first network device in other ways, which is not limited in this embodiment of the present application.
  • the packet 1 also includes other fields.
  • Ethernet packet header ethernet linker header
  • ETH Internet Protocol
  • UDP User Datagram Protocol
  • IB BTH Infiniband base transport header
  • ICRC constant loop Redundancy check
  • the ICRC is used to protect the integrity of the message. This is a mechanism that protects the integrity of the message through a cyclic redundancy check (CRC).
  • the first network device generates a packet 2 according to the packet 1.
  • the message 2 includes at least the information of the first process and the information of the first network device.
  • the information of the first process reference may be made to the introduction of S201, and details are not repeated here.
  • the message 2 uses 4 bytes to carry the information of the first network device, and these 4 bytes are recorded as TOR_info.
  • the packet 1 of Example 1 of S201 the field corresponding to TOR_info is 0, that is, the packet 1 does not carry the information of the first network device.
  • the first network device encapsulates the IP address (eg, 192.168.2.1) of the first network device into the TOR_info field of the packet 1 to obtain the packet 2.
  • the first network device when the preset condition is satisfied, the first network device generates the packet 2 according to the packet 1 .
  • the preset conditions include the following two:
  • the first item, the type of message 1, belongs to the target type.
  • the target type may include, but is not limited to, query packets. For example, in the case where the message 1 includes the information 2, the message 1 belongs to the query message.
  • the second item, message 1 includes information 1 .
  • information 1 For the introduction of the information 1, reference may be made to the description of S201, and details are not repeated here.
  • the first network device performs forwarding processing and does not update the message.
  • the first network device can determine which packets to process according to preset conditions to obtain the second packet.
  • the first network device performs S202, and in the case that the message 1 is the second example of S201, the first network device does not need to perform S202.
  • the first network device executes S202, if the message 1 includes the information 1, the first network device also updates the information 1 to the information 3. That is, message 2 includes information 3.
  • the information 3 indicates that the packet 2 carries the information of the network device corresponding to the first process (ie, the first network device in FIG. 1 a ).
  • the information 3 includes the field 1 in the packet 2, and the value of the field 1 in the packet 2 is a preset value of 3.
  • the value of the preset value 3 may be 1, which may be different from the value of the preset value 1.
  • the first network device in addition to updating two fields (as shown in Figure 2b, the field corresponding to switch_notified and the field corresponding to TOR_info), the first network device also updates the ICRC field. The value of , to check the integrity of the data from the IP header to the ICRC field.
  • the first network device sends the packet 2 to the terminal device 1 .
  • the terminal device 1 receives the packet 2 from the first network device.
  • the number of the deployment process on the terminal device 1 is 0.
  • the terminal device 1 may also be referred to as a master node.
  • the packet 2 in S203 is the packet 2 in S202.
  • the packet 2 in S203 is the packet 1 in Example 2 in S201.
  • the terminal device 1 can obtain the process information deployed on the terminal device 2 and the information of the first network device to which the terminal device 2 belongs. It should be noted that, in the above communication domain, in addition to the terminal equipment 1 and the terminal equipment 2, if there are other terminal equipment belonging to the first network equipment, and the terminal equipment is deployed with the process of executing the first task, then The terminal device 1 still obtains the process information deployed on the terminal device and the information of the first network device.
  • the specific implementation process reference may be made to the introduction of S201 to S203, which will not be repeated here.
  • the process of executing the first task is not only distributed on the terminal equipment belonging to the first network equipment, but also distributed on the terminal equipment belonging to the third network equipment.
  • the third network device belongs to the above-mentioned second network device. The following takes a terminal device as an example to introduce this situation:
  • the terminal device 3 sends the packet 3 to the third network device.
  • the third network device receives the packet 3 from the terminal device 3 .
  • the description of the terminal device 3 is as follows: the terminal device 3 belongs to a third network device, and a first process is deployed on the terminal device 3, and the first process is used to execute the first task.
  • the number of the deployment process on the terminal device 3 may be one of the following: number 4 , number 5 , number 6 or number 7 .
  • the terminal device 3 may also be referred to as a computing node.
  • the third network device generates a packet 4 according to the packet 3 .
  • the message 4 includes at least the information of the first process and the information of the third network device.
  • the information of the first process reference may be made to the introduction of S201, and details are not repeated here.
  • the information of the third network device is used to uniquely identify the third network device.
  • the IP address of the third network device may be recorded as 192.168.1.1.
  • the third network device sends the packet 4 to the second network device.
  • the second network device receives the packet 4 from the third network device.
  • the third network device belongs to the second network device.
  • the packet 4 in S206 is the packet 4 in S205.
  • the packet 4 in S206 is the packet 3 in Example 2 in S204.
  • the second network device sends the packet 4 to the first network device.
  • the first network device receives the packet 4 from the second network device.
  • the packet 4 in S207 is the packet 4 in S206.
  • the first network device sends the packet 4 to the terminal device 1 .
  • the terminal device 1 receives the packet 4 from the first network device.
  • the terminal device 1 can obtain the process information deployed on the terminal device 3 and the information of the third network device to which the terminal device 3 belongs. It should be noted that, in the above communication domain, in addition to the terminal equipment 3, if there are other terminal equipment belonging to the third network equipment, and the terminal equipment is deployed with the process of executing the first task, the terminal equipment still The process information of self-deployment and the information of the third network device are reported to the terminal device 1. For the specific implementation process, reference may be made to the introduction of S204 to S208, which will not be repeated here.
  • the second stage distributing process information and network device information.
  • the process information refers to the information of all the first processes corresponding to the target network device that execute the first task
  • the network device information refers to the information of the target network device.
  • the target network device is at least one of the network devices corresponding to the first task.
  • the network device corresponding to the first task refers to, in a communication domain of the first task, the network device to which the terminal device in which the first process is deployed belongs.
  • the first process is used for executing the first task.
  • the network devices corresponding to the first task include a first network device and a third network device. Below, this stage is described in two possible designs:
  • the first terminal device distributes the information of all target network devices corresponding to the first task in the above communication domain, and the information corresponding to each target network device Information about all processes executing the first task.
  • the steps in the embodiment of the present application are as follows:
  • the terminal device 1 generates a message 5 according to the message obtained in the first stage.
  • the packets acquired in the first stage include the above-mentioned packets 2 and 4.
  • the message 5 at least includes information of all target network devices corresponding to the first task in the above communication domain, and information of all first processes executing the first task corresponding to each target network device.
  • FIG. 3b shows some fields of the packet 5, and the field carrying the information of the target network device is denoted as TOR_info.
  • TOR_info includes information of the first network device (ie, 192.168.2.1) and information of the third network device (ie, 192.168.1.1).
  • attached_node_info is the field that carries the information of the process.
  • the information of all the first processes that execute the first task corresponding to the first network device includes: number 0, number 1, number 2, and number 3.
  • the information of all the first processes that execute the first task corresponding to the third network device includes: number 4 , number 5 , number 6 , and number 7 .
  • packet 5 further includes at least one of the following information:
  • the information 4 includes at least one quantity value, and the number of the quantity values is consistent with the quantity of target network devices corresponding to the first network, and is in one-to-one correspondence.
  • the first quantity value belongs to one of the at least one quantity value.
  • the first quantity value indicates the number of terminal devices deployed with the first process executing the first task in the terminal device set.
  • the terminal equipment in the terminal equipment set belongs to the target network equipment corresponding to the first quantity value.
  • the first quantity value is consistent with the quantity of the first process in the terminal device set.
  • the description of the other quantity values may refer to the description of the first quantity value, and details are not repeated here.
  • the information 4 is the number field of the terminal device in the packet 5, which is denoted as attached_node_number.
  • the quantity value 4 after 192.168.1.1 corresponds to the third network device identified by 192.168.1.1, and the quantity value 4 indicates that among the terminal devices belonging to the third network device, there are 4 The first process of a task.
  • the quantity value 4 after 192.168.2.1 corresponds to the first network device identified by 192.168.2.1, and the quantity value 4 indicates that among the terminal devices belonging to the first network device, there are 4 terminal devices deployed with executing the first network device. The first process of a task.
  • the information 5 indicates that the type of the message 5 is a notify message.
  • the information 5 includes the field 2 in the packet 5, and the value of the field 2 in the packet 5 is a preset value of 4.
  • Field 2 may be the message type indication field in message 5, or may be a field with other names.
  • the value of the preset value 4 may be 1, or may be other values, which may be different from the value of the preset value 2.
  • the information 5 is the message type indication field in the message 5, which is denoted as query_notify.
  • the value of the query_notify field is 1, indicating that the message 5 where the field is located is a notification message.
  • the information 6 indicates that the packet 5 carries the information of the target network device corresponding to the first task in the above-mentioned communication domain.
  • the information 6 includes the field 1 in the packet 5, and the value of the field 1 in the packet 5 is a preset value of 3.
  • information 6 is a message type indication field in message 5, which is denoted as query_notify.
  • the value of the query_notify field is 1, indicating that the message 5 where the field is located is a notification message.
  • information 7 indicates the number of target network devices corresponding to the first task in the above-mentioned communication domain.
  • information 7 is the "number of network devices" field in packet 5, which is denoted as TOR_number.
  • the value of the TOR_number field is 2 to indicate that the number of target network devices corresponding to the first task in the above communication domain is 2.
  • the terminal device 1 when the number of packets acquired in the first stage is a target value, the terminal device 1 generates packet 5 according to the packets acquired in the first stage.
  • the target value indicates: in the above communication domain, the number of all terminal devices where the process executing the first task is located. Since the process identified by the number 0 is deployed on the terminal device 1, the number of all terminal devices executing the first task in the above communication domain can be known, that is, the terminal device 1 can know the value of the target value.
  • the value of the target value is 8.
  • the terminal device 1 determines that 8 packets are acquired (that is, 8 packets are acquired in the first stage)
  • the terminal device 1 After the terminal device 1 determines that 8 packets are acquired (that is, 8 packets are acquired in the first stage), the terminal device 1 generates a packet 5 according to the acquired 8 packets.
  • the message 5 carries the information of the first process in the above-mentioned 8 messages, and the information of the network device corresponding to the first task in the above-mentioned 8 messages in the above-mentioned communication domain, so as to avoid omission of process information and network devices.
  • Information
  • the terminal device 1 can identify the retransmitted packet, and the terminal device 1 can also determine which packet is retransmitted. In this case, if a certain packet is retransmitted, the terminal device 1 determines that the retransmitted packet is invalid, which does not affect the statistics of the number of the above-mentioned packets.
  • the terminal device 1 sends the packet 5 to the first network device.
  • the first network device receives the message 5 from the terminal device 2.
  • the process of executing the first task is not only distributed on the terminal device 1, but also distributed on other terminal devices belonging to the first network device.
  • the following takes a terminal device as an example to introduce this situation:
  • the first network device sends the packet 5 to the terminal device 2 .
  • the terminal device 2 receives the packet 5 from the first network device.
  • the first network device determines that the packet 5 does not meet the preset condition, and the first network device performs forwarding processing, that is, sends the packet 5 to the terminal device 2 .
  • the first network device performs forwarding processing, that is, sends the packet 5 to the terminal device 2 .
  • the first network device performs forwarding processing, that is, sends the packet 5 to the terminal device 2 .
  • the terminal device 2 can obtain the information of all target network devices corresponding to the first task in the above communication domain, and the information of all the first processes executing the first task corresponding to each target network device. information. It should be noted that, in the above communication domain, in addition to the terminal equipment 1 and the terminal equipment 2, if there are other terminal equipment belonging to the first network equipment, and the terminal equipment is deployed with the process of executing the first task, then The first network device still sends the packet 5 to the terminal device, which will not be repeated here.
  • the process of executing the first task is not only distributed on the terminal device belonging to the first network device, but also distributed on the terminal belonging to the third network device on the device.
  • the third network device belongs to the second network device. The following takes a terminal device as an example to introduce this situation:
  • the first network device sends the packet 5 to the second network device.
  • the second network device receives the packet 5 from the first network device.
  • the child nodes of the second network device include the third network device.
  • the first network device determines that the packet 5 does not meet the preset condition, and the first network device performs forwarding processing, that is, sends the packet 5 to the second network device.
  • forwarding processing that is, sends the packet 5 to the second network device.
  • the second network device sends the packet 5 to the third network device.
  • the third network device receives the packet 5 from the second network device.
  • the second network device determines that the packet 5 does not meet the preset condition, and the second network device performs forwarding processing, that is, sends the packet 5 to the third network device.
  • the second network device performs forwarding processing, that is, sends the packet 5 to the third network device.
  • the introduction of the preset conditions reference may be made to the introduction of S202, which will not be repeated here.
  • the third network device sends the packet 5 to the terminal device 3 .
  • the terminal device 3 receives the packet 5 from the third network device.
  • the third network device determines that the packet 5 does not meet the preset condition, and the third network device performs forwarding processing, that is, sends the packet 5 to the terminal device 3 .
  • the third network device performs forwarding processing, that is, sends the packet 5 to the terminal device 3 .
  • the third network device performs forwarding processing, that is, sends the packet 5 to the terminal device 3 .
  • the introduction of the preset conditions reference may be made to the introduction of S202, which will not be repeated here.
  • the terminal device 3 can obtain the information of all target network devices corresponding to the first task in the above communication domain, and each target network device Corresponding information about all the first processes that execute the first task. It should be noted that, in addition to the terminal device 3, if there are other terminal devices belonging to the third network device, and the terminal device is deployed with a process for executing the first task, the third network device still sends the terminal device to the terminal device. Packet 5 will not be repeated here.
  • the second network device still sends the message 5 to the network device.
  • the terminal device sends packet 5, which is not repeated here.
  • the first terminal device distributes the information of a target network device corresponding to the first task, and all the execution first task corresponding to the target network device. process information.
  • the steps in the embodiment of the present application are as follows:
  • the terminal device 1 generates at least one packet 6 according to the packets acquired in the first stage.
  • the packets acquired in the first stage include the above-mentioned packets 2 and 4.
  • the number of packets 6 is consistent with the number of all target network devices corresponding to the first task in the above communication domain.
  • a packet 6 includes information of a target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network devices in different packets 6 are different.
  • each packet 6 includes at least one item of the following information: information 4 , information 5 , information 6 and information 7 .
  • information 4 For the introduction of information 4 to information 7, reference may be made to the relevant description of S301, which will not be repeated here.
  • the terminal device 1 when the number of packets acquired in the first stage is a target value, the terminal device 1 generates at least one packet 6 according to the target packets in the packets acquired in the first stage.
  • the target packet belongs to the packet obtained in the first stage, and carries the information of the same target network device.
  • the value of the target value is 8.
  • the terminal device 1 determines that 8 packets are obtained (that is, 8 packets are obtained in the first stage)
  • the terminal device 1 determines that there are 4 packets carrying the information of the first network device
  • the terminal device 1 determines that there are 4 packets carrying the information of the first network device.
  • the message generates a message 6, which can be recorded as message 6a.
  • the message 6a carries the information of the first network device and the information of the four first processes corresponding to the first network device, as shown in FIG. 4b.
  • the terminal device 1 determines that there are four packets carrying the information of the third network device, and the terminal device 1 generates another packet 6 according to the four packets, which may be recorded as packet 6b.
  • the message 6b carries the information of the third network device and the information of the four first processes corresponding to the third network device, as shown in FIG. 4c .
  • the terminal device 1 sends at least one packet 6 to the first network device.
  • the first network device receives at least one packet 6 from the terminal device 2 .
  • the number of packets 6 is consistent with the number of all target network devices corresponding to the first task in the above communication domain.
  • a packet 6 includes information of a target network device and information of all first processes corresponding to the target network device that execute the first task, and the target network devices in different packets 6 are different.
  • the packet 6 sent by the terminal device 1 to the first network device includes a packet 6a (as shown in FIG. 4b ) and a packet 6b (as shown in FIG. 4b ). shown in Figure 4c).
  • the process for executing the first task is not only distributed on the terminal device 1, but also distributed on other terminal devices belonging to the first network device.
  • the following takes a terminal device as an example to introduce this situation:
  • the first network device sends a packet 6 to the terminal device 2 .
  • the terminal device 2 receives the packet 6 from the first network device.
  • the message 6 sent by the first network device to the terminal device 2 includes the information of the first network device and the information of all the first processes that execute the first task corresponding to the first network device, that is, the message 6a, as shown in FIG. 4b.
  • the first network device determines that the packet 6a does not meet the preset condition, and the first network device performs forwarding processing, that is, sends the packet 6a to the terminal device 2 .
  • the first network device performs forwarding processing, that is, sends the packet 6a to the terminal device 2 .
  • the first network device performs forwarding processing, that is, sends the packet 6a to the terminal device 2 .
  • the preset conditions reference may be made to the introduction of S202, which will not be repeated here.
  • the terminal device 2 can obtain the information of the first network device and the information of all the first processes that execute the first task corresponding to the first network device. It should be noted that, in the above communication domain, in addition to the terminal equipment 1 and the terminal equipment 2, if there are other terminal equipment belonging to the first network equipment, and the terminal equipment is deployed with the process of executing the first task, then The first network device still sends the packet 6 to the terminal device, which will not be repeated here.
  • the process of executing the first task is not only distributed on the terminal device belonging to the first network device, but also distributed on the terminal belonging to the third network device on the device.
  • the following takes a terminal device as an example to introduce this situation:
  • the first network device sends at least one packet 6 to the second network device.
  • the second network device receives at least one packet 6 from the first network device.
  • the packet 6 in S404 can be one.
  • the child node of the second network device also includes a fourth network device (not shown in FIG. 1a ) if there is still a terminal device belonging to the fourth network device, and the terminal device is deployed with a fourth network device that performs the first task
  • the number of packets 6 in S404 is at least two. That is to say, the number of packets 6 in S404 is related to the number of target network devices belonging to the second network device.
  • the packet 6 sent by the first network device to the second network device includes the information of the third network device and the process information corresponding to the third network device, that is, Message 6b, as shown in Figure 4c.
  • the second network device sends the packet 6 to the third network device.
  • the third network device receives the packet 6 from the second network device.
  • the packet 6 sent by the second network device to the third network device includes the information of the third network device and the process information corresponding to the third network device, that is, Message 6b, as shown in Figure 4c.
  • the third network device sends the packet 6 to the terminal device 3 .
  • the terminal device 3 receives the message 6 from the third network device.
  • the message 6 sent by the third network device to the terminal device 3 includes the information of the third network device and the process information corresponding to the third network device, that is, the message 6. Text 6b, as shown in Figure 4c.
  • the terminal device 3 can obtain the information of all the first processes that execute the first task corresponding to the third network device. It should be noted that, in the above communication domain, in addition to the terminal device 3, if there are other terminal devices belonging to the third network device, and the terminal device is deployed with a process for executing the first task, the third network device The message 6 is still sent to the terminal device, which will not be repeated here. Similarly, in the above communication domain, in addition to the third network device, if there is a terminal device belonging to other network devices, and the terminal device is deployed with a process for executing the first task, the second network device still reports to the terminal device. The network device sends the message 6 to transmit the message 6 to the corresponding terminal device through the network device, which will not be repeated here.
  • the terminal device selects a process from the multiple processes allocated by itself according to certain rules, as the corresponding process of the terminal device.
  • the target process, and the information of the target process is carried in the sent message 1.
  • the network interface card of the terminal device obtains the message from the network device, it distributes the message to the processors executing each process, so that each processor knows the location of the process executing the first task in the network topology. Location.
  • the above descriptions are based on one communication domain as the granularity.
  • the execution process of each communication domain can refer to the introduction of the above two stages, and the description of the above two stages is not included here. Repeat.
  • the message received by the terminal device 1 carries both the information of the first process and the information of the network device corresponding to the first process. Then, the terminal device 1 generates the above-mentioned message 5 or message 6 according to the received message (such as the above-mentioned message 2 and message 4), and both the message 5 and the message 6 include at least one target network device information and Information of all the first processes that execute the first task corresponding to the target network device, and send the generated message to the corresponding target network device, so that the terminal device belonging to the target network device can obtain the information generated by the terminal device 1. 's message.
  • each terminal device can know the information of the network device to which it belongs, and the information of all the first processes that execute the first task corresponding to the network device to which it belongs, Thereby, the communication path is planned, the short-range communication is realized, the communication path across the three network devices is minimized, and the resource overhead is saved. Moreover, in the above process, if a terminal device does not deploy the first process, the terminal device does not perform the above steps, so as to avoid waste of transmission resources. In addition, the above-mentioned network equipment and terminal equipment do not need to support other protocols, and the terminal equipment does not need to deploy the Netloc library, and no additional Netloc library deployment work is introduced.
  • an embodiment of the present application further provides a communication device, and the communication device may be a network element in the foregoing method embodiments, or a device including the foregoing network element, or a component usable for a network element.
  • the communication apparatus includes corresponding hardware structures and/or software modules for executing each function.
  • the present application can be implemented in hardware or a combination of hardware and computer software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • An embodiment of the present application provides a chip, where the chip includes a logic circuit and an input and output interface.
  • the input and output interface is used for communicating with modules other than the chip
  • the logic circuit is used for performing other operations on the device where the chip is located in the above method embodiments except for the transceiving operation.
  • the input and output interfaces can be used to execute the terminal device 1 in the embodiment of the present application.
  • S203 and S208 on the side, and/or the input and output interfaces are also used to perform other transceiving steps on the side of the terminal device 1 in the embodiment of the present application.
  • the logic circuit may be used to execute other processing steps on the side of the terminal device 1 in the embodiment of the present application.
  • the input/output interface may be used to execute S302 on the terminal device 1 side, and/or the input/output interface may also be used to execute the implementation of the present application.
  • the logic circuit may be used to perform S301 on the side of the terminal device 1, and/or the logic circuit may also be used to perform other processing steps on the side of the terminal device 1 in this embodiment of the present application.
  • the input/output interface may be used to execute S402 on the terminal device 1 side, and/or the input/output interface may also be used to execute the implementation of the present application.
  • the logic circuit may be used to perform S401 on the side of the terminal device 1, and/or the logic circuit may be used to perform other processing steps on the side of the terminal device 1 in this embodiment of the present application.
  • the input and output interfaces may be used to perform S201, S203, S207, S208, and/or the input/output interface are also used to perform other transceiving steps on the first network device side in this embodiment of the present application.
  • the logic circuit may be used to perform S202 on the side of the first network device in the embodiment of the present application, and/or the logic circuit may be further configured to perform other processing steps on the side of the first network device in the embodiment of the present application.
  • the input/output interface may be used to execute S302, S303, and S304 on the side of the first network device, and/or the input/output interface also It is used to perform other sending and receiving steps on the side of the first network device in this embodiment of the present application.
  • Logic circuits may be used to perform other processing steps in the first network device side.
  • the input/output interface may be used to perform S402, S403, and S404 on the side of the first network device, and/or the input/output interface also It is used to perform other sending and receiving steps on the side of the first network device in this embodiment of the present application.
  • Logic circuits may be used to perform other processing steps in the first network device side.
  • the input and output interfaces may be used to perform S204, S206, and/or the input/output interface is further configured to perform other transceiving steps on the third network device side in the embodiment of the present application.
  • the logic circuit may be used to perform S205 on the side of the third network device in the embodiment of the present application, and/or the logic circuit may be used to perform other processing steps on the side of the third network device in the embodiment of the present application.
  • the input/output interface may be used to execute S305 and S306 on the side of the third network device, and/or the input/output interface may also be used for Perform other transceiving steps on the third network device side in the embodiment of the present application.
  • Logic circuits may be used to perform other processing steps in the third network device side.
  • the input/output interface may be used to execute S405 and S406 on the third network device side, and/or the input/output interface may also be used for Perform other transceiving steps on the third network device side in the embodiment of the present application.
  • Logic circuits may be used to perform other processing steps in the third network device side.
  • the input and output interfaces may be used to execute the embodiments of the present application.
  • S201 on the side of the terminal device 2, and/or the input/output interface is also used to perform other transceiving steps on the side of the terminal device 2 in the embodiment of the present application.
  • the logic circuit may be used to execute other processing steps on the side of the terminal device 2 in the embodiment of the present application.
  • the input/output interface may be used to execute S303 on the side of the terminal device 2, and/or the input/output interface may also be used to execute the implementation of the present application.
  • Logic circuits can be used to perform other processing steps in the terminal device 2 side.
  • the input/output interface may be used to execute S403 on the side of the terminal device 2, and/or the input/output interface may also be used to execute the implementation of the present application.
  • Logic circuits can be used to perform other processing steps in the terminal device 2 side.
  • FIG. 5 shows a schematic structural diagram of a communication apparatus 500 .
  • the communication device 500 includes a receiving unit 504 , a sending unit 503 and a processing unit 502 .
  • the first terminal device is implemented as a terminal device 1, for example, taking the communication apparatus 500 as the terminal device 1 shown in FIG.
  • the receiving unit 504 performs S203 and S208 on the terminal device 1 side, and/or the receiving unit 504 is further configured to perform other transceiving steps on the terminal device 1 side in this embodiment of the present application.
  • the processing unit 502 is configured to execute other processing steps on the side of the terminal device 1 in this embodiment of the present application.
  • the sending unit 503 executes S302 on the terminal device 1 side, and/or the sending unit 503 is further configured to execute the terminal device in the embodiment of the present application.
  • the receiving unit 504 performs other transceiving steps on the terminal device 1 side.
  • the processing unit 502 is configured to perform S301 on the side of the terminal device 1 in the embodiment of the present application, and/or the sending unit 503 is further configured to perform other transceiving steps on the side of the terminal device 1 in the embodiment of the present application.
  • the sending unit 503 executes S402 on the side of the terminal device 1, and/or the sending unit 503 is further configured to execute the terminal device in the embodiment of the present application Other transceiving steps on side 1.
  • the receiving unit 504 performs other transceiving steps on the terminal device 1 side.
  • the processing unit 502 is configured to perform S401 on the side of the terminal device 1 in the embodiment of the present application, and/or the sending unit 503 is further configured to perform other transceiving steps on the side of the terminal device 1 in the embodiment of the present application.
  • the sending unit 503 executes S203 and S208 on the side of the first network device, and/or the sending unit 503 It is also used to perform other transceiving steps on the side of the first network device in the embodiment of the present application.
  • the receiving unit 504 performs S201 and S207 on the side of the first network device, and/or the receiving unit 504 is further configured to perform other transceiving steps on the side of the first network device in this embodiment of the present application.
  • the processing unit 502 is configured to perform S202 on the side of the first network device in the embodiment of the present application, and/or the processing unit 502 is further configured to perform other processing steps on the side of the first network device in the embodiment of the present application.
  • the sending unit 503 executes S303 and S304 on the side of the first network device, and/or the sending unit 503 is further configured to execute the implementation of the present application.
  • the receiving unit 504 performs S302 on the side of the first network device, and/or the sending unit 503 is further configured to perform other transceiving steps on the side of the first network device in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the first network device in this embodiment of the present application.
  • the sending unit 503 executes S403 and S404 on the side of the first network device, and/or the sending unit 503 is further configured to execute the implementation of the present application Other transceiving steps on the side of the first network device in the example.
  • the receiving unit 504 performs S402 on the side of the first network device, and/or the sending unit 503 is further configured to perform other transceiving steps on the side of the first network device in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the first network device in this embodiment of the present application.
  • the sending unit 503 executes S206 on the side of the third network device, and/or the sending unit 503 further uses and other transceiving steps on the side of the third network device in the embodiment of the present application.
  • the receiving unit 504 performs S204 on the third network device side, and/or the receiving unit 504 is further configured to perform other sending and receiving steps on the third network device side in this embodiment of the present application.
  • the processing unit 502 is configured to execute S205 on the third network device side in the embodiment of the present application, and/or the processing unit 502 is further configured to execute other processing steps on the third network device side in the embodiment of the present application.
  • the sending unit 503 executes S306 on the third network device side, and/or the sending unit 503 is further configured to execute the steps in the embodiments of the present application.
  • Other transceiving steps on the third network device side The receiving unit 504 performs S305 on the third network device side, and/or the sending unit 503 is further configured to perform other sending and receiving steps on the third network device side in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the third network device in this embodiment of the present application.
  • the sending unit 503 executes S406 on the third network device side, and/or the sending unit 503 is further configured to execute the steps in the embodiments of the present application.
  • Other transceiving steps on the third network device side The receiving unit 504 performs S405 on the third network device side, and/or the sending unit 503 is further configured to perform other sending and receiving steps on the third network device side in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the third network device in this embodiment of the present application.
  • the sending unit 503 performs other transceivers on the side of the terminal device 2.
  • the receiving unit 504 performs S201 on the side of the terminal device 2, and/or the receiving unit 504 is further configured to perform other transceiving steps on the side of the terminal device 2 in this embodiment of the present application.
  • the processing unit 502 is configured to execute other processing steps on the side of the terminal device 2 in this embodiment of the present application.
  • the sending unit 503 performs other sending and receiving steps on the terminal device 2 side.
  • the receiving unit 504 performs S303 on the side of the terminal device 2, and/or the receiving unit 504 is further configured to perform other transceiving steps on the side of the terminal device 2 in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the terminal device 2 in this embodiment of the present application.
  • the sending unit 503 performs other sending and receiving steps on the terminal device 2 side.
  • the receiving unit 504 performs S403 on the terminal device 2 side, and/or the sending unit 503 is further configured to perform other sending and receiving steps on the terminal device 2 side in this embodiment of the present application.
  • the processing unit 502 is configured to perform other transceiving steps on the side of the terminal device 2 in this embodiment of the present application.
  • processing unit 502 in this embodiment of the present application may be implemented by a processor or a processor-related circuit component
  • the sending unit 503 may be implemented by a transmitter or a transmitter-related circuit component
  • the receiving unit 504 may be implemented by a receiver or a receiver-related circuit component circuit component implementation.
  • the communication apparatus 500 may further include a storage unit 501 for storing program codes and data of the communication apparatus 500, and the data may include but not limited to original data or intermediate data.
  • the processing unit 502 may be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (application specific integrated circuit) circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • a processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the sending unit 503 may be a communication interface, a transmitter or a sending circuit, or the like.
  • the receiving unit 504 may be a communication interface, a receiver or a receiving circuit, or the like.
  • the communication interface is a general term, and in a specific implementation, the communication interface may include multiple interfaces.
  • the storage unit 501 may be a memory.
  • the processing unit 502 is a processor
  • the sending unit 503 is a transceiver
  • the receiving unit 504 is a transceiver
  • the storage unit 501 is a memory
  • the communication apparatus 600 involved in the embodiment of the present application may be as shown in FIG. 6 .
  • the communication device 600 includes: a processor 602 , a transceiver 603 , and a memory 601 .
  • the transceiver 603 may be an independently set transmitter, and the transmitter may be used to send information to other devices, and the transceiver may also be an independently set receiver, used to receive information from other devices.
  • the transceiver may also be a component that integrates the functions of sending and receiving information, and the specific implementation of the transceiver is not limited in this embodiment of the present application.
  • the communication apparatus 600 may further include a bus 604 .
  • the transceiver 603, the processor 602 and the memory 601 can be connected to each other through a bus 604; the bus 604 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus etc.
  • the bus 604 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, digital video disc (DVD), or semiconductor media (eg, solid state disk, SSD)) Wait.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network devices. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each functional unit may exist independently, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
  • the present application can be implemented by means of software plus necessary general-purpose hardware, and of course hardware can also be used, but in many cases the former is a better implementation manner .
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art.
  • the computer software products are stored in a readable storage medium, such as a floppy disk of a computer. , a hard disk or an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了集合通信的方法及通信装置,涉及通信技术领域,能够实现近距离通信,节省通信资源。该方法包括:第一终端设备接收来自第一网络设备的至少一个第二报文。其中,第二报文包括第一进程的信息和第一进程对应的网络设备的信息,第一进程用于执行第一任务,第一进程对应的网络设备的信息为第一进程所在的终端设备所归属的网络设备的信息。第一终端设备根据至少一个第二报文,确定第三报文。其中,第三报文包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息,目标网络设备为第一任务对应的网络设备中的至少一个。第一终端设备向第一网络设备发送第三报文。

Description

集合通信的方法及通信装置
本申请要求于2021年04月09日提交国家知识产权局、申请号为202110387422.9、申请名称为“集合通信的方法及通信装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种集合通信的方法及通信装置。
背景技术
集合通信是指一个特定组内所有进程都参与的通信方式。在Fat-tree组网架构下,以第二网络设备(如核心(spine)交换机)的子节点包括第一网络设备(如接入(leaf)交换机)和第三网络设备(如接入交换机),且第一网络设备和第三网络设备的子节点均包括四个终端设备为例,每个终端设备上部署一个进程,且不同终端设备上部署不同进程。其中,不同进程对应不同的编号(rank)。为了完成一次全局规约(allreduce),某些集合通信算法(如递推倍增(recursive doubling)算法)要求每个终端设备与其他终端设备之间执行三次通信,且每次通信涉及的源终端设备和目的终端设备是基于进程的编号确定的。
但是,源终端设备无法感知目的终端设备在网络拓扑中的位置,可能存在多次跨第二网络设备通信的现象。此种情况下,两个终端设备之间的通信路径长,资源开销大。
发明内容
本申请实施例提供一种集合通信的方法及通信装置,能够确定减少长通信路径的数量,节省资源开销。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供一种集合通信的方法,该方法的执行主体可以是第一终端设备,也可以是应用于第一终端设备中的芯片。下面以执行主体是第一终端设备为例进行描述。该方法包括:第一终端设备接收来自第一网络设备的至少一个第二报文。其中,第二报文包括第一进程的信息和第一进程对应的网络设备的信息,第一进程用于执行第一任务,第一进程对应的网络设备的信息为第一进程所在的终端设备所归属的网络设备的信息。然后,第一终端设备根据至少一个第二报文,确定第三报文。其中,第三报文包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息,目标网络设备为第一任务对应的网络设备中的至少一个。之后,第一终端设备向第一网络设备发送第三报文。
也就是说,第一终端设备接收的第二报文中既携带了第一进程的信息,又携带了第一进程对应的网络设备的信息。第一终端设备汇总第二报文,以得到第三报文。然后,第一终端设备发出第三报文。由于第三报文至少包括一个目标网络设备的信息和该目标网络设备对应的所有执行第一任务的第一进程的信息,所以,对于归属于同一网络设备的终端设备而言,各个终端设备即可获知目标网络设备对应的所有执行第一任务的第一进程,从而规划通信路径,实现近距离通信,尽量减少跨第二网络设备通信的路径,节省资源开销。 另外,上述第一网络设备和第一终端设备均无需支持其他的协议,第一终端设备也无需部署Netloc库,不引入额外的Netloc库部署工作。
在一种可能的设计中,目标网络设备为第一任务对应的所有网络设备。第一终端设备根据至少一个第二报文,确定第三报文,包括:在至少一个第二报文的数量为目标数值的情况下,第一终端设备根据至少一个第二报文,确定第三报文。其中,目标数值指示执行第一任务的第一进程所在的所有终端设备的数量。
也就是说,第一终端设备在确定第二报文到齐的情况下,才生成第三报文,以使第三报文携带执行第一任务的所有第一进程的信息。
在一种可能的设计中,目标网络设备为第一任务对应的网络设备中的一个;第一终端设备根据至少一个第二报文,确定第三报文,包括:在至少一个第二报文的数量为目标数值的情况下,第一终端设备根据至少一个第二报文中的目标报文,确定第三报文。其中,目标数值指示执行第一任务的第一进程所在的所有终端设备的数量,目标报文属于至少一个第二报文,且携带同一目标网络设备的信息。
也就是说,第一终端设备在确定第二报文到齐的情况下,根据第二报文中携带同一目标网络设备的信息的目标报文,生成第三报文。此种情况下,一个第三报文携带了归属于某一目标网络设备的终端设备上部署的所有执行第一任务的第一进程的信息。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,数量值的个数和目标网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的目标网络设备。
也就是说,在第三报文中,第一数量值指示了在归属于某一目标网络设备的终端设备中,部署有第一进程的终端设备的数量。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文,从而指示第三报文的报文类型。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,第二报文还包括第三信息,第三信息指示第二报文包括第一进程对应的网络设备的信息,从而使得第一终端设备获知第二报文携带了第一进程对应的网络设备的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文,从而指示第二报文的报文类型。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。也就是说,第三报文可以采用RoCE的协议格式传输。
在一种可能的设计中,第二报文满足RoCE的协议格式。也就是说,第二报文可以采用RoCE的协议格式传输。
第二方面,本申请实施例提供一种集合通信的方法,该方法的执行主体可以是第一网络设备,也可以是应用于第一网络设备中的芯片。下面以执行主体是第一网络设备为例进行描述。该方法包括:第一网络设备向第一终端设备发送至少一个第二报文。其中,第二报文包括第一进程的信息和第一进程对应的网络设备的信息,第一进程用于执行第一任务,第一进程对应的网络设备的信息为第一进程所在的终端设备所归属的网络设备的信息。第一网络设备接收来自第一终端设备的第三报文。其中,第三报文包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息,目标网络设备为第一任务对应的网络设备中的至少一个。第一网络设备向目标终端设备发送第三报文。其中,目标终端设备部署有执行第一任务的第一进程,且目标终端设备归属于目标网络设备。
也就是说,第一网络设备向第一终端设备提供的第二报文中既携带了第一进程的信息,又携带了第一进程对应的网络设备的信息,以使第一终端设备生成第三报文。然后,第一网络设备从第一终端设备接收第三报文,再转发给相应的目标终端设备。由于第三报文至少包括一个目标网络设备的信息和该目标网络设备对应的所有执行第一任务的第一进程的信息,所以,对于归属于同一网络设备的终端设备而言,各个终端设备即可获知目标网络设备对应的所有执行第一任务的第一进程,从而规划通信路径,实现近距离通信,尽量减少跨第二网络设备通信的路径,节省资源开销。另外,上述第一网络设备和第一终端设备均无需支持其他的协议,终端设备也无需部署Netloc库,不引入额外的Netloc库部署工作。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和目标网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的目标网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,在目标网络设备包括第一网络设备的情况下,本申请实施例集合通信的方法还包括:第一网络设备接收来自第二终端设备的第一报文。其中,第一报文包括第一进程的信息,第二终端设备属于目标终端设备。第一网络设备根据第一报文,确定第二报文。
也就是说,第二报文是第一网络设备生成的,即由第一网络设备在第一报文中添加自身的信息,以生成第二报文。
在一种可能的设计中,第一网络设备根据第一报文,确定第二报文,包括:在满足预设条件的情况下,第一网络设备根据第一报文,确定第二报文。其中,预设条件包括:第一报文的类型属于目标类型,且第一报文包括第五信息,第五信息指示第一报文未携带第一进程对应的网络设备的信息。其中,目标类型可以是查询报文。
也就是说,在第一报文属于目标类型,且第一报文未携带第一进程对应的网络设备的信息的情况下,第一网络设备才基于第一报文,生成第二报文。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字 段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文,以指示第一报文的报文类型。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,在目标网络设备包括第一网络设备的情况下,本申请实施例集合通信的方法还包括:第一网络设备接收来自第二终端设备的第二报文。其中,第二终端设备属于目标终端设备。
也就是说,对于归属于第一网络设备的第二终端设备而言,在第二终端设备已获知第一进程对应的网络设备的信息的情况下,第一网络设备从第二终端设备中获取第二报文,且第二报文既携带了第一进程的信息,又携带了第一进程对应的网络设备的信息。第一网络设备转发第二报文即可,无需对第二报文进行处理。
在一种可能的设计中,在目标网络设备包括第三网络设备的情况下,本申请实施例集合通信的方法还包括:第一网络设备接收来自第二网络设备的第二报文。其中,第三网络设备归属于第二网络设备。
也就是说,对于归属于第三网络设备的终端设备而言,在已获知第一进程对应的网络设备的信息(即第三网络设备)的情况下,第一网络设备通过第二网络设备获取第二报文,且第二报文中既携带了第一进程的信息,又携带了第一进程对应的网络设备的信息。第一网络设备转发第二报文即可,无需对第二报文进行处理。
在一种可能的设计中,第二报文还包括第三信息。其中,第三信息指示第二报文包括第一进程对应的网络设备的信息,以方便第一终端设备快速获知第二报文是否携带了网络设备的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文,以指示第二报文的报文类型。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。
在一种可能的设计中,第二报文满足RoCE的协议格式。
第三方面,本申请实施例提供一种集合通信的方法,该方法的执行主体可以是第三网络设备,也可以是应用于第三网络设备中的芯片。下面以执行主体是第三网络设备为例进行描述。该方法包括:第三网络设备向第二网络设备发送至少一个第二报文。其中,第二报文包括第一进程的信息和第三网络设备的信息,第一进程部署于第三终端设备,第三终端设备归属于第三网络设备,第一进程用于执行第一任务。然后,第三网络设备接收来自第二网络设备的第三报文。其中,第三报文至少包括第三网络设备的信息和第三网络设备对应的所有执行第一任务的第一进程的信息。之后,第三网络设备向第三终端设备发送第三报文。
也就是说,在第三终端设备归属于第三网络设备,且第三终端设备上均部署有第一进程的情况下,第三网络设备向第二网络设备提供的第二报文中既携带了第一进程的信息,又携带了第三网络设备的信息,以使第一终端设备生成第三报文。然后,第三网络设备还接收来自第二网络设备的第三报文,且将第三报文转发给第三终端设备。由于第三报文至少包括第三网络设备的信息和第三网络设备对应的所有执行第一任务的第一进程的信息,所以,第三终端设备即可获知第三网络设备对应的所有执行第一任务的第一进程,从而规划通信路径,实现近距离通信,尽量减少跨第二网络设备通信的路径,节省资源开销。并且,在上述过程中,若某一第三终端设备未部署第一进程,则该第三终端设备不执行上述步骤,避免传输资源的浪费。另外,上述第三网络设备、第二网络设备和第三终端设备均无需支持其他的协议,第三终端设备也无需部署Netloc库,不引入额外的Netloc库部署工作。
在一种可能的设计中,第三报文还包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息。其中,目标网络设备为第一任务对应的网络设备中除第三网络设备之外的所有网络设备。
也就是说,除第三终端设备之外,还存在其他终端设备上部署了执行第一任务的第一进程,且这些终端设备归属于其他目标网络设备的情况下,第三报文也可以携带其他的目标网络设备的信息,以及目标网络设备对应的所有执行第一任务的第一进程的信息,以使第三终端设备获知第一任务对应的所有第一进程在网络拓扑中的分布状况。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和第一任务对应的网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,本申请实施例集合通信的方法还包括:第三网络设备接收来自第三终端设备的第一报文。其中,第一报文包括第一进程的信息。然后,第三网络设备根据第一报文,确定第二报文。
也就是说,第二报文是第三网络设备生成的,即由第三网络设备在第一报文中添加自身的信息,以生成第二报文。
在一种可能的设计中,第三网络设备根据第一报文,确定第二报文,包括:在满足预设条件的情况下,第三网络设备根据第一报文,确定第二报文。其中,预设条件包括:第一报文的类型属于目标类型,且第一报文包括第五信息。第五信息指示第一报文未携带第三网络设备的信息。
也就是说,在第一报文属于目标类型,且第一报文未携带第三网络设备的信息的情况下,第三网络设备才基于第一报文,生成第二报文。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,本申请实施例集合通信的方法还包括:第三网络设备接收来自第三终端设备的第二报文。也就是说,第三网络设备从第三终端设备中获取第二报文,且第二报文既携带了第一进程的信息,又携带了第三网络设备的信息。第三网络设备转发第二报文即可,无需对第二报文进行处理。
在一种可能的设计中,第二报文还包括第三信息。其中,第三信息指示第二报文包括第三网络设备的信息,以使第三网络设备快速获知第二报文是否携带第三网络设备的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。也就是说,第三报文可以采用RoCE的协议格式传输。
在一种可能的设计中,第二报文满足RoCE的协议格式。也就是说,第二报文可以采用RoCE的协议格式传输。
第四方面,本申请实施例提供一种集合通信的方法,该方法的执行主体可以是第四终端设备,也可以是应用于第四终端设备中的芯片。下面以执行主体是第四终端设备为例进行描述。该方法包括:第四终端设备向第四网络设备发送第一报文。其中,第一报文至少包括第一进程的信息,第一进程部署于第四终端设备,第一进程用于执行第一任务。然后,第四终端设备接收来自第四网络设备的第三报文。其中,第三报文至少包括第四网络设备的信息和第四网络设备对应的所有执行第一任务的第一进程的信息。
也就是说,在第四终端设备向第四网络设备发送第一报文的情况下,第一报文至少携带了第一进程的信息,以使第一终端设备汇总第一进程的信息,从而生成第三报文。然后,第四终端设备从第四网络设备中接收第三报文,以至少获知归属于第四网络设备的信息和第四网络设备对应的所有执行第一任务的第一进程的信息,以使第四终端设备规划通信路径,实现近距离通信,尽量减少跨第二网络设备通信的路径,节省资源开销。并且,在上述过程中,若某一第四终端设备未部署第一进程,则该第四终端设备不执行上述步骤,避免传输资源的浪费。另外,上述第四网络设备和第四终端设备均无需支持其他的协议,第四终端设备也无需部署Netloc库,不引入额外的Netloc库部署工作。
在一种可能的设计中,第三报文还包括第五网络设备的信息以及第五网络设备对应的所有执行第一任务的第一进程的信息。其中,第五网络设备为第一任务对应的网络设备中除第四网络设备之外的所有网络设备。
也就是说,除第四终端设备之外,还存在其他的第一进程,且部署在归属于第五网络设备的终端设备上。此种情况下,第三报文也可以携带第五网络设备的信息,以及第五网 络设备对应的所有执行第一任务的第一进程的信息,以使第四终端设备获知第一任务对应的所有第一进程在网络拓扑中的分布状况。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和第一任务对应的网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,第一报文包括第五信息,第五信息指示第一报文未携带第四网络设备的信息。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第四网络设备的信息。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。也就是说,第三报文可以采用RoCE的协议格式传输。
在一种可能的设计中,第一报文满足RoCE的协议格式。也就是说,第一报文可以采用RoCE的协议格式传输。
第五方面,本申请实施例提供一种通信装置,该通信装置可以为上述第一方面或第一方面任一种可能的设计中的第一终端设备,或者为设置于上述第一终端设备内的装置,或者实现上述第一终端设备功能的芯片;所述通信装置包括实现上述方法相应的模块、单元、或手段(means),该模块、单元、或means可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块或单元。
该通信装置包括发送单元、接收单元和处理单元。其中,接收单元用于接收来自第一网络设备的至少一个第二报文。其中,第二报文包括第一进程的信息和第一进程对应的网络设备的信息,第一进程用于执行第一任务,第一进程对应的网络设备的信息为第一进程所在的终端设备所归属的网络设备的信息。处理单元用于根据至少一个第二报文,确定第三报文。其中,第三报文包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息,目标网络设备为第一任务对应的网络设备中的至少一个。发送单元用于向第一网络设备发送第三报文。
在一种可能的设计中,目标网络设备为第一任务对应的所有网络设备。处理单元具体用于:在至少一个第二报文的数量为目标数值的情况下,根据至少一个第二报文,确定第三报文。其中,目标数值指示执行第一任务的第一进程所在的所有终端设备的数量。
在一种可能的设计中,目标网络设备为第一任务对应的网络设备中的一个。处理单元 具体用于:在至少一个第二报文的数量为目标数值的情况下,根据至少一个第二报文中的目标报文,确定第三报文。其中,目标数值指示执行第一任务的第一进程所在的所有终端设备的数量,目标报文属于至少一个第二报文,且携带同一目标网络设备的信息。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和目标网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的目标网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,第二报文还包括第三信息,第三信息指示第二报文包括第一进程对应的网络设备的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。
在一种可能的设计中,第二报文满足RoCE的协议格式。
第六方面,本申请实施例提供一种通信装置,该通信装置可以为上述第二方面或第二方面任一种可能的设计中的第一网络设备,或者为设置于上述第一网络设备内的装置,或者实现上述第一网络设备功能的芯片;所述通信装置包括实现上述方法相应的模块、单元、或手段(means),该模块、单元、或means可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块或单元。
该通信装置包括发送单元和接收单元。其中,发送单元用于向第一终端设备发送至少一个第二报文。其中,第二报文包括第一进程的信息和第一进程对应的网络设备的信息,第一进程用于执行第一任务,第一进程对应的网络设备的信息为第一进程所在的终端设备所归属的网络设备的信息。接收单元用于接收来自第一终端设备的第三报文。其中,第三报文包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息,目标网络设备为第一任务对应的网络设备中的至少一个。发送单元还用于向目标终端设备发送第三报文。其中,目标终端设备部署有执行第一任务的第一进程,且目标终端设备归属于目标网络设备。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和目标网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的目标网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,在目标网络设备包括第一网络设备的情况下,接收单元还用于接收来自第二终端设备的第一报文。其中,第一报文包括第一进程的信息,第二终端设备属于目标终端设备。该通信装置还包括处理单元,处理单元用于根据第一报文,确定第二报文。
在一种可能的设计中,处理单元具体用于:在满足预设条件的情况下,根据第一报文,确定第二报文。其中,预设条件包括:第一报文的类型属于目标类型,且第一报文包括第五信息,第五信息指示第一报文未携带第一进程对应的网络设备的信息。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,在目标网络设备包括第一网络设备的情况下,接收单元还用于接收来自第二终端设备的第二报文。其中,第二终端设备属于目标终端设备。
在一种可能的设计中,在目标网络设备包括第三网络设备的情况下,接收单元还用于接收来自第二网络设备的第二报文。其中,第三网络设备归属于第二网络设备。
在一种可能的设计中,第二报文还包括第三信息。其中,第三信息指示第二报文包括第一进程对应的网络设备的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。
在一种可能的设计中,第二报文满足RoCE的协议格式。
第七方面,本申请实施例提供一种通信装置,该通信装置可以为上述第三方面或第三方面任一种可能的设计中的第三网络设备,或者为设置于上述第三网络设备内的装置,或者实现上述第三网络设备功能的芯片;所述通信装置包括实现上述方法相应的模块、单元、或手段(means),该模块、单元、或means可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块或单元。
该通信装置包括发送单元和接收单元。其中,发送单元用于向第二网络设备发送至少一个第二报文。其中,第二报文包括第一进程的信息和通信装置的信息,第一进程部署于 第三终端设备,第三终端设备归属于通信装置,第一进程用于执行第一任务。接收单元用于接收来自第二网络设备的第三报文。其中,第三报文至少包括通信装置的信息和通信装置对应的所有执行第一任务的第一进程的信息。发送单元还用于向第三终端设备发送第三报文。
在一种可能的设计中,第三报文还包括目标网络设备的信息以及目标网络设备对应的所有执行第一任务的第一进程的信息。其中,目标网络设备为第一任务对应的网络设备中除通信装置之外的所有网络设备。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和第一任务对应的网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,接收单元还用于接收来自第三终端设备的第一报文。其中,第一报文包括第一进程的信息。处理单元还用于根据第一报文,确定第二报文。
在一种可能的设计中,处理单元具体用于:在满足预设条件的情况下,根据第一报文,确定第二报文。其中,预设条件包括:第一报文的类型属于目标类型,且第一报文包括第五信息。第五信息指示第一报文未携带通信装置的信息。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,接收单元还用于接收来自第三终端设备的第二报文。
在一种可能的设计中,第二报文还包括第三信息。其中,第三信息指示第二报文包括通信装置的信息。
在一种可能的设计中,第三信息包括第二报文中的第二字段,且第二报文中的第二字段的取值为第二预设值。
在一种可能的设计中,第二报文还包括第四信息,第四信息指示第二报文的类型为查询报文。
在一种可能的设计中,第四信息包括第二报文中的第一字段,且第二报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。
在一种可能的设计中,第二报文满足RoCE的协议格式。
第八方面,本申请实施例提供一种通信装置,该通信装置可以为上述第四方面或第四 方面任一种可能的设计中的第四终端设备,或者为设置于上述第四终端设备内的装置,或者实现上述第四终端设备功能的芯片;所述通信装置包括实现上述方法相应的模块、单元、或手段(means),该模块、单元、或means可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块或单元。
该通信装置包括发送单元、接收单元和处理单元。其中,发送单元用于向第四网络设备发送第一报文。其中,第一报文至少包括第一进程的信息,第一进程部署于通信装置,第一进程用于执行第一任务。接收单元用于接收来自第四网络设备的第三报文。其中,第三报文至少包括第四网络设备的信息和第四网络设备对应的所有执行第一任务的第一进程的信息。处理单元用于确定第一报文。
在一种可能的设计中,第三报文还包括第五网络设备的信息以及第五网络设备对应的所有执行第一任务的第一进程的信息。其中,第五网络设备为第一任务对应的网络设备中除第四网络设备之外的所有网络设备。
在一种可能的设计中,第三报文还包括第一信息,第一信息包括至少一个数量值,且数量值的个数和第一任务对应的网络设备的数量一致,且一一对应。其中,第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量,第一数量值是至少一个数量值中的一个,终端设备集中的终端设备归属于第一数量值对应的网络设备。
在一种可能的设计中,第三报文还包括第二信息,第二信息指示第三报文的类型为通知报文。
在一种可能的设计中,第二信息包括第三报文中的第一字段,且第三报文中的第一字段的取值为第一预设值。
在一种可能的设计中,第一报文包括第五信息,第五信息指示第一报文未携带第四网络设备的信息。
在一种可能的设计中,第五信息包括第一报文中的第二字段,且第一报文中的第二字段的取值为第四预设值。
在一种可能的设计中,第一报文还包括第四网络设备的信息。
在一种可能的设计中,第一报文还包括第六信息,第六信息指示第一报文的类型为查询报文。
在一种可能的设计中,第六信息包括第一报文中的第一字段,且第一报文中的第一字段的取值为第三预设值。
在一种可能的设计中,第三报文满足融合以太网的远程直接内存访问RoCE的协议格式。
在一种可能的设计中,第一报文满足RoCE的协议格式。
第九方面,本申请实施例提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机指令,当该处理器执行该指令时,使得该通信装置执行上述任一方面或任一方面任一种可能的设计中第一终端设备所执行的方法。该通信装置可以为上述第一方面或第一方面任一种可能的设计中的第一终端设备,或者实现上述第一终端设备功能的芯片。
第十方面,本申请实施例提供了一种通信装置,包括:处理器;所述处理器与存储器耦合,用于读取存储器中的指令并执行,以使该通信装置执行如上述任一方面或任一方面任一种可能的设计中的第一终端设备所执行的方法。该通信装置可以为上述第一方面或第 一方面任一种可能的设计中的第一终端设备,或者实现上述第一终端设备功能的芯片。
第十一方面,本申请实施例提供一种芯片,包括逻辑电路和输入输出接口。其中,输入输出接口用于与芯片之外的模块通信,例如,该芯片可以为实现上述第一方面或第一方面任一种可能的设计中的第一终端设备功能的芯片。输入输出接口输出第三报文。输入输出接口输入第二报文。逻辑电路用于运行计算机程序或指令,以实现以上第一方面或第一方面任一种可能的设计中的方法。
第十二方面,本申请实施例提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机指令,当该处理器执行该指令时,使得该通信装置执行上述任一方面或任一方面任一种可能的设计中第一网络设备所执行的方法。该通信装置可以为上述第二方面或第二方面任一种可能的设计中的第一网络设备,或者实现上述第一网络设备功能的芯片。
第十三方面,本申请实施例提供了一种通信装置,包括:处理器;所述处理器与存储器耦合,用于读取存储器中的指令并执行,以使该通信装置执行如上述任一方面或任一方面任一种可能的设计中的第一网络设备所执行的方法。该通信装置可以为上述第二方面或第二方面任一种可能的设计中的第一网络设备,或者实现上述第一网络设备功能的芯片。
第十四方面,本申请实施例提供一种芯片,包括逻辑电路和输入输出接口。其中,输入输出接口用于与芯片之外的模块通信,例如,该芯片可以为实现上述第二方面或第二方面任一种可能的设计中的第一网络设备功能的芯片。输入输出接口输出第二报文、第三报文。输入输出接口输入第三报文。逻辑电路用于运行计算机程序或指令,以实现以上第二方面或第二方面任一种可能的设计中的方法。
第十五方面,本申请实施例提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机指令,当该处理器执行该指令时,使得该通信装置执行上述任一方面或任一方面任一种可能的设计中第三网络设备所执行的方法。该通信装置可以为上述第三方面或第三方面任一种可能的设计中的第三网络设备,或者实现上述第三网络设备功能的芯片。
第十六方面,本申请实施例提供了一种通信装置,包括:处理器;所述处理器与存储器耦合,用于读取存储器中的指令并执行,以使该通信装置执行如上述任一方面或任一方面任一种可能的设计中的第三网络设备所执行的方法。该通信装置可以为上述第三方面或第三方面任一种可能的设计中的第三网络设备,或者实现上述第三网络设备功能的芯片。
第十七方面,本申请实施例提供一种芯片,包括逻辑电路和输入输出接口。其中,输入输出接口用于与芯片之外的模块通信,例如,该芯片可以为实现上述第三方面或第三方面任一种可能的设计中的第三网络设备功能的芯片。输入输出接口输出第二报文、第三报文。输入输出接口输入第三报文。逻辑电路用于运行计算机程序或指令,以实现以上第三方面或第三方面任一种可能的设计中的方法。
第十八方面,本申请实施例提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机指令,当该处理器执行该指令时,使得该通信装置执行上述任一方面或任一方面任一种可能的设计中第四终端设备所执行的方法。该通信装置可以为上述第四方面或第四方面任一种可能的设计中的第四终端设备,或者实现上述第四终端设备功能的芯片。
第十九方面,本申请实施例提供了一种通信装置,包括:处理器;所述处理器与存储器耦合,用于读取存储器中的指令并执行,以使该通信装置执行如上述任一方面或任一方面任一种可能的设计中的第四终端设备所执行的方法。该通信装置可以为上述第四方面或 第四方面任一种可能的设计中的第四终端设备,或者实现上述第四终端设备功能的芯片。
第二十方面,本申请实施例提供一种芯片,包括逻辑电路和输入输出接口。其中,输入输出接口用于与芯片之外的模块通信,例如,该芯片可以为实现上述第四方面或第四方面任一种可能的设计中的第四终端设备功能的芯片。输入输出接口输出第二报文、第三报文。输入输出接口输入第三报文。逻辑电路用于运行计算机程序或指令,以实现以上第四方面或第四方面任一种可能的设计中的方法。
第二十一方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述任一方面中任一项的集合通信的方法。
第二十二方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述任一方面中任一项的集合通信的方法。
第二十三方面,本申请实施例提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行如上述任一方面中任一项的集合通信的方法。
第二十四方面,本申请实施例提供一种通信系统,该通信系统包括上述各个方面中任一项中的终端设备和网络设备。
其中,第五方面至第二十四方面中任一种设计所带来的技术效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1a为本申请实施例提供的网络架构下的通信路径分布示意图;
图1b为本申请实施例提供的网络架构下的另一种通信路径分布示意图;
图2a为本申请实施例提供的一种集合通信的方法的流程示意图;
图2b为本申请实施例提供的一种报文的结构示意图;
图2c为本申请实施例提供的再一种报文的结构示意图;
图3a为本申请实施例提供的再一种集合通信的方法的流程示意图;
图3b为本申请实施例提供的又一种报文的结构示意图;
图4a为本申请实施例提供的又一种集合通信的方法的流程示意图;
图4b为本申请实施例提供的又一种报文的结构示意图;
图4c为本申请实施例提供的又一种报文的结构示意图;
图5为本申请实施例提供的一种通信装置的结构示意图;
图6为本申请实施例提供的再一种通信装置的结构示意图。
具体实施方式
本申请的说明书以及附图中的术语“第一”和“第二”等是用于区别不同的对象,或者用于区别对同一对象的不同处理,而不是用于描述对象的特定顺序。此外,本申请的描述中所提到的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括其他没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任 何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。本申请的描述中所提到的术语“多个”是指两个或两个以上。
首先,介绍本申请实施例所涉及的技术术语:
1、消息传递接口(message passing interface,MPI)
MPI是一种用于多进程间消息传递的通信库。应用通过调用MPI中定义的通信接口实现数据传输。
2、集合通信、任务、进程
集合通信是MPI的一种通信模式,具体是指一个特定组内所有进程都参与的通信方式。其中,特定组可以是完成某一任务的进程集合。
任务,是指完成一项特定的计算业务所需要执行的一组进程的集合。任务通过节点上的一组进程来运行。其中,节点的数量可以是一个,也可以是多个。每组进程可以包括一个进程,也可以包括多个进程。一个节点上可以部署一组进程中的一个进程,也可以部署一组进程中的多个进程。
进程,用于完成某一任务的某一部分运算处理。在本申请实施例中,用于执行某一任务的进程至少包括两个。其中,不同的进程采用不同的编号来标识。对于同一通信域的进程而言,每个进程在该通信域初始化的过程中,被赋予唯一的编号。其中,通信域是运行一个任务时必须创建的,通信域包括上下文(context)、进程组(group)等。一个任务可以有一个或多个通信域,一个通信域对应一个进程组。进程组表示与自身对应的通信域中所有进程的集合。
为了加以区分,对于同一通信域的进程而言,编号为0的进程所在的节点称为主节点,其余节点称为计算节点。主节点和计算节点同时运行同一任务,实现并行计算。需要说明的是,在本申请实施例中,节点也可以替换为终端设备。
示例性的,图1a示出了本申请实施例所应用的一种网络架构示意图。该网络架构仅作为示例,不应理解为对本申请实施例应用场景的限制。在图1a所示的一个通信域的网络架构图中,第二网络设备的子节点包括第一网络设备和第三网络设备。其中,第二网络设备可以是核心(spine)交换机,第一网络设备和第三网络设备均可以是接入(leaf)交换机。归属于第一网络设备的终端设备有四个,归属于第三网络设备的终端设备也有四个。一个终端设备上部署一个进程,不同终端设备上部署不同进程。不同进程对应的编号也不一样。对于归属于第一网络设备的终端设备而言,该终端设备上部署进程的编号包括:编号0、编号1、编号2和编号3。对于归属于第三网络设备的终端设备而言,该终端设备上部署进程的编号包括:编号4、编号5、编号6和编号7。
需要说明的是,本申请实施例中的网络设备(如第一网络设备、第二网络设备和第三网络设备)并不局限于上述已经提到的交换机,还可以为其他设备,如路由器等。本申请实施例中的终端设备,也可以描述为节点。本申请实施例提到的终端设备可以为服务器等。
另外,在本申请实施例中,“A归属于B”是指,A是B的子节点,B是A的父节点。例如,图1a中,归属于第一网络设备的终端设备有四个,也可以描述为:第一 网络设备的子节点有四个。“A所归属的B”也是指,A是B的子节点,B是A的父节点。再如,仍以图1a为例,编号0的进程所在的终端设备属于第一网络设备的子节点。换言之,该终端设备(部署有编号0的进程的终端设备)所归属的网络设备是第一网络设备。
为了完成一次全局规约(allreduce),某些集合通信算法(如递推倍增(recursive doubling)算法)要求每个终端设备与其他终端设备之间执行三次通信,且每次通信涉及的源终端设备和目的终端设备是基于进程的编号确定的。图1a中的曲线箭头示出了每次通信的源终端设备和目的终端设备。
需要说明的是,在图1a所示的网络架构中,仅以某一任务的一个通信域为例进行介绍,第二网络设备的数量可以是一个,也可以是多个,在图1a中仅示出了一个第二网络设备。第二网络设备的子节点数量可以是一个,也可以是多个,在图1a中仅以第二网络设备包括两个子节点为例进行介绍。第一网络设备的子节点数量可以是一个,也可以是多个,在图1a中仅以第一网络设备包括四个子节点为例进行介绍。类似的,第三网络设备的子节点数量可以是一个,也可以是多个,在图1a中仅以第三网络设备包括四个子节点为例进行介绍。第一网络设备的子节点数量与第三网络设备的子节点数量可以相同,也可以不同,本申请实施例对此不作限定。
由于源终端设备无法感知目的终端设备在网络拓扑中的位置,可能存在多次跨第二网络设备通信的现象。如图1b所示,三次并行通信中跨第二网络设备的通信次数为三,而在图1a中,三次并行通信中跨第二网络设备的通信次数为一。也就是说,跨第二网络设备的通信路径越长,通信开销越大。
虽然,在以太网的组网环境中,第一网络设备、第三网络设备和终端设备均支持开放流(open flow)协议,且终端设备上部署轻量级网络位置(portable network locality,Netloc)库的情况下,终端设备能够获取到全局的网络拓扑。然后,针对某一任务,终端设备通过MPI通信库进行应用程序编程接口(application programming interface,API)查询,即可获取到执行该任务的进程在网络拓扑中的位置,再结合各进程对应的编号,来确定与网络拓扑匹配的通信路径。其中,获取全局的网络拓扑的过程如下:
将部署编号0所标识进程的终端设备记为终端设备1,对于终端设备1而言,终端设备1从第一网络设备获取第一拓扑信息。其中,第一拓扑信息包括第一网络设备与第二网络设备之间的连接状况,以及第一网络设备与自身的子节点之间的连接状况。并且,终端设备1从第三网络设备中获取第三拓扑信息。其中,第三拓扑信息包括第三网络设备与第二网络设备之间的连接状况,以及第三网络设备与自身的子节点之间的连接状况。终端设备1基于第一拓扑信息和第三拓扑信息,即可确定全局的网络拓扑。对于部署其他编号所标识进程的终端设备而言,重复执行上述过程,即可确定全局的网络拓扑。
由此可知,为了获取拓扑信息,终端设备需支持开放流协议,且需要部署Netloc库。网络设备也需支持开放流协议。并且,每个网络设备提供的拓扑信息指示了自身与其他设备之间的连接状况,即使归属于该网络设备的某一终端设备上未部署进程,该网络设备仍提供自身与该终端设备之间的连接状况,浪费了传输资源。
综上可知,在集合通信过程中,如何获取执行某一任务的进程在网络拓扑中的位 置,减少长通信(跨多个网络设备)路径,节省资源开销,是亟待解决的技术问题。
有鉴于此,本申请实施例提供一种集合通信的方法,能够精准地确定某一任务的进程在网络拓扑中的位置,有利于规划与网络拓扑匹配的通信路径,减少长通信路径,降低资源开销。本申请实施例集合通信的方法所适用的网络架构详见图1a和图1b。本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定。
在本申请实施例中,以一个通信域为例,将部署有编号0所标识进程的终端设备描述为终端设备1,将终端设备1所归属的网络设备描述为第一网络设备,将编号0标识的进程所完成的任务描述为第一任务。终端设备1也可以描述为主节点。下面,对本申请实施例集合通信的方法200的步骤进行介绍:
第一阶段、上报进程信息和网络设备的信息。其中,第一阶段中,进程信息是指一个终端设备上部署的第一进程的信息,网络设备的信息是指第一进程对应的网络设备的信息。第一进程对应的网络设备,是指:在一个通信域中,部署有第一进程的终端设备所归属的网络设备。下面,参见图2a,分两种情况对此阶段进行介绍:
作为第一阶段的第一种情况、在一个通信域中,执行第一任务的进程除了分布在终端设备1上,还分布在归属于第一网络设备的其他终端设备上。下面,以一个终端设备为例,对此种情况进行介绍:
S201、终端设备2向第一网络设备发送报文1。相应的,第一网络设备接收来自终端设备2的报文1。
其中,终端设备2的说明如下:终端设备2归属于第一网络设备,且终端设备2上部署有第一进程。示例性的,参见图1a,终端设备2上部署进程的编号可以是以下其中一项:编号1、编号2、或编号3。终端设备2也可以称为计算节点。
其中,报文1的说明如下:报文1至少包括第一进程的信息,如第一进程的编号、第一进程的标识等。示例性的,仍以图1a为例,在终端设备2上部署进程的编号为1的情况下,第一进程的信息包括“编号1”这一信息。在终端设备2上部署进程的编号为2的情况下,第一进程的信息包括“编号2”这一信息。在终端设备2上部署进程的编号为3的情况下,第一进程的信息包括“编号3”这一信息。以图2b为例,报文1采用4个字节(byte,B)承载第一进程的信息,这4个字节记为node_info。
其中,通过两个示例对报文1中的其他信息进行介绍:
示例一、报文1未携带第一进程对应的网络设备(即图1a中的第一网络设备)的信息。此种示例下,本申请实施例第一网络设备执行S202,详见S202的相关描述,此处不再赘述。报文1还可以包括以下信息中的至少一项:
第一项、信息1。其中,信息1指示报文1未携带第一进程对应的网络设备(即图1a中的第一网络设备)的信息。示例性的,信息1包括报文1中的字段1,且报文1中字段1的取值为预设值1。字段1可以是报文1中的交换设备(switch_modified)字段,如图2b所示,也可以是其他名称的字段,本申请实施例对此不作限定。预设值1的取值可以是0,也可以是其他取值,本申请实施例对此不作限定。在图2b中,交换设备字段占用无限带宽(infiniband,IB)净荷(payload)中的比特位4-7,在交换设备字段的取值为0的情况下,该字段所在的报文1未携带第一进程对应的网络设备的信息。
第二项、信息2。其中,信息2指示报文1的类型为查询(query)报文。示例性的,信息2包括报文1中的字段2,且报文1中字段2的取值为预设值2。字段2可以是报文1中的报文类型指示字段,如图2b中记为query_notify的字段,也可以是其他名称的字段,本申请实施例对此不作限定。预设值2的取值可以是0,也可以是其他取值,本申请实施例对此不作限定。在图2b中,报文类型指示字段占用无限带宽净荷中的比特位0-3,在报文类型指示字段的取值为0的情况下,该字段所在的报文1为查询报文。
示例二、报文1携带第一进程对应的网络设备(即图1a中的第一网络设备)的信息。此种示例下,此种示例下,本申请实施例第一网络设备无需执行S202,执行S203即可,且S203中的报文2即为此示例中的报文1,详见S203的相关描述,此处不再赘述。下面,对报文1携带的第一网络设备的信息进行介绍:第一网络设备的信息用于唯一标识第一网络设备,可以包括但不限于:第一网络设备的IP地址、第一网络设备的标识信息等。以图2c为例,报文1采用4个字节承载第一网络设备的信息,这4个字节记为TOR_info。示例性的,在报文1中,TOR_info对应的字段承载有第一网络设备的IP地址(如192.168.2.1)。此种示例下,报文1不包括信息1(如记为switch_modified的字段),可以包括信息2(如记为query_notify的字段),如图2c所示。另外,在此种示例下,终端设备2获取第一网络设备的信息的方式可以有多种,例如,在终端设备2与第一网络设备之间的通信连接建立过程中,终端设备2获取第一网络设备的信息。当然,终端设备2还可以通过其他方式,来获取第一网络设备的信息,本申请实施例对此不作限定。
需要说明的是,在上述两种示例中,报文1还包含其它字段。示例性地,参见图2b,以融合以太网的远程直接内存访问(RDMA over converged ethernet,RoCE)版本2的网络协议为例,报文1还包括如下字段:以太网报文头(ethernet linker header,ETH)、互联网协议(internet protocol,IP)的报文头、用户数据协议(user datagram protocol,UDP)的报文头、无限带宽基础传输头(infiniband base transport header,IB BTH)、不变循环冗余校验(invariant cyclic redundancy check,ICRC)等。其中,ICRC用于保护报文的完整性。这是一种通过循环冗余校验(cyclic redundancy check,CRC)对报文的完整性提供保护的机制。
S202、第一网络设备根据报文1,生成报文2。
其中,报文2至少包括第一进程的信息和第一网络设备的信息。第一进程的信息可以参见S201的介绍,此处不再赘述。第一网络设备的信息可以参见S201的示例二相关描述,此处不再赘述。以图2b为例,报文2采用4个字节承载第一网络设备的信息,这4个字节记为TOR_info。示例性的,在S201的示例一的报文1中,TOR_info对应的字段为0,即报文1未携带第一网络设备的信息。第一网络设备将第一网络设备的IP地址(如192.168.2.1)封装进报文1的TOR_info字段,以得到报文2。
可选的,在满足预设条件的情况下,第一网络设备根据报文1,生成报文2。其中,预设条件包括以下两项:
第一项、报文1的类型属于目标类型。其中,目标类型可以包括但不限于:查询报文。例如,在报文1包括信息2的情况下,报文1属于查询报文。
第二项、报文1包括信息1。其中,信息1的介绍可以参见S201的说明,此处不再赘述。
反之,在不满足预设条件的情况下,第一网络设备执行转发处理,不对报文进行更新。
如此,即使第一网络设备还接收了其他的报文,也能够根据预设条件确定对哪些报文进行处理,以得到第二报文。
需要说明的是,在报文1为S201的示例一的情况下,第一网络设备执行S202,在报文1为S201的示例二的情况下,第一网络设备无需执行S202。在第一网络设备执行S202的情况下,若报文1包括信息1,则第一网络设备还将信息1更新为信息3。也就是说,报文2包括信息3。其中,信息3指示报文2携带第一进程对应的网络设备(即图1a中的第一网络设备)的信息。示例性的,信息3包括报文2中的字段1,且报文2中字段1的取值为预设值3。预设值3的取值可以是1,与预设值1的取值不同即可。在报文1满足RoCE V2的网络协议的情况下,第一网络设备除了更新两个字段(如图2b中,switch_notified对应的字段、TOR_info对应的字段)之外,第一网络设备还更新ICRC字段的取值,以校验从IP的报文头开始到ICRC字段之前的数据的完整性。
S203、第一网络设备向终端设备1发送报文2。相应的,终端设备1接收来自第一网络设备的报文2。
其中,终端设备1上部署进程的编号为0。终端设备1也可以称为主节点。
其中,在第一网络设备执行S202的情况下,S203中的报文2即为S202中的报文2。在第一网络设备未执行S202的情况下,S203中的报文2即为S201中示例二的报文1。
通过上述S201至S203的描述,终端设备1即可获取到终端设备2上部署的进程信息,以及终端设备2所归属的第一网络设备的信息。需要说明的是,在上述通信域中,除终端设备1和终端设备2之外,若存在其他的终端设备归属于第一网络设备,且该终端设备上部署有执行第一任务的进程,则终端设备1仍获取该终端设备上部署的进程信息,以及第一网络设备的信息,具体实现过程可以参见S201至S203的介绍,此处不再赘述。
作为第一阶段的第二种情况、在上述通信域中,执行第一任务的进程除了分布在归属于第一网络设备的终端设备上,还分布在归属于第三网络设备的终端设备上。第三网络设备归属于上述第二网络设备。下面,以一个终端设备为例,对此种情况进行介绍:
S204、终端设备3向第三网络设备发送报文3。相应的,第三网络设备接收来自终端设备3的报文3。
其中,终端设备3的说明如下:终端设备3归属于第三网络设备,且终端设备3上部署有第一进程,第一进程用于执行第一任务。示例性的,参见图1a,终端设备3上部署进程的编号可以是以下其中一项:编号4、编号5、编号6或编号7。终端设备3也可以称为计算节点。
其中,报文3的说明可以参见S201中关于“报文1”的相关说明,此处不再赘述。
S205、第三网络设备根据报文3,生成报文4。
其中,报文4至少包括第一进程的信息和第三网络设备的信息。第一进程的信息可以参见S201的介绍,此处不再赘述。第三网络设备的信息用于唯一标识第三网络设备。例如,第三网络设备的IP地址可以记为192.168.1.1。其中,S205的实现过程可以参见S202的介绍,此处不再赘述。
S206、第三网络设备向第二网络设备发送报文4。相应的,第二网络设备接收来自第三网络设备的报文4。
其中,第三网络设备归属于第二网络设备。
其中,在第三网络设备执行S205的情况下,S206中的报文4即为S205中的报文4。在第三网络设备未执行S205的情况下,S206中的报文4即为S204中示例二的报文3。
S207、第二网络设备向第一网络设备发送报文4。相应的,第一网络设备接收来自第二网络设备的报文4。
其中,S207中的报文4即为S206中的报文4。
S208、第一网络设备向终端设备1发送报文4。相应的,终端设备1接收来自第一网络设备的报文4。
其中,终端设备1的介绍可以参见S203的相关说明,此处不再赘述。
通过上述S204至S208的描述,终端设备1即可获取到终端设备3上部署的进程信息,以及终端设备3所归属的第三网络设备的信息。需要说明的是,在上述通信域中,除终端设备3之外,若存在其他的终端设备归属于第三网络设备,且该终端设备上部署有执行第一任务的进程,则该终端设备仍向终端设备1上报自身部署的进程信息,以及第三网络设备的信息,具体实现过程可以参见S204至S208的介绍,此处不再赘述。
第二阶段、分发进程信息和网络设备的信息。其中,第二阶段中,进程信息是指目标网络设备对应的所有执行第一任务的第一进程的信息,网络设备的信息是指目标网络设备的信息。目标网络设备是第一任务对应的网络设备中的至少一个。第一任务对应的网络设备,是指,在第一任务的一个通信域中,部署有第一进程的终端设备所归属的网络设备。其中,第一进程用于执行第一任务。以图1a为例,第一任务对应的网络设备包括第一网络设备和第三网络设备。下面,分两种可能的设计对此阶段进行介绍:
在第一种可能的设计中,在上述通信域中,以任务为粒度,第一终端设备分发第一任务在上述通信域中对应的所有目标网络设备的信息,以及每一目标网络设备对应的所有执行第一任务的进程信息。参见图3a,本申请实施例的步骤如下:
S301、终端设备1根据第一阶段获取的报文,生成报文5。
其中,第一阶段获取的报文包括上述报文2和报文4。
其中,报文5至少包括第一任务在上述通信域中对应的所有目标网络设备的信息,以及每一目标网络设备对应的所有执行第一任务的第一进程的信息。
示例性的,图3b示出了报文5的部分字段,承载目标网络设备的信息的字段记为TOR_info。以图1b所示的网络架构为例,第一任务在该通信域中对应的所有目标网络设备包括第一网络设备和第三网络设备。TOR_info字段包括第一网络设备的信息(即192.168.2.1)和第三网络设备的信息(即192.168.1.1)。承载进程的信息的字段记为attached_node_info。仍以图1b所示的网络架构为例,在上述通信域中,第一网络设备对应的所有执行第一任务的第一进程的信息包括:编号0、编号1、编号2和编号3。第三网络设备对应的所有执行第一任务的第一进程的信息包括:编号4、编号5、编号6和编号7。
可选的,报文5还包括以下信息中的至少一项:
第一项、信息4。其中,信息4包括至少一个数量值,且数量值的个数和第一网络对应的目标网络设备的数量一致,且一一对应。以第一数量值为例进行详细说明:第一数量值属于至少一个数量值中的一个。第一数量值指示在终端设备集中,部署有执行第一任务的第一进程的终端设备的数量。其中,终端设备集中的终端设备归属于第一数量值对应的目标网络设备。在单核场景中,第一数量值与终端设备集中第一进程的数量一致。在至少 一个数量值还包括其它数量值的情况下,其它数量值的介绍可以参见第一数量值的说明,此处不再赘述。
示例性的,参见图3b,信息4是报文5中的终端设备的数量字段,记为attached_node_number。192.168.1.1之后的数量值4,与192.168.1.1所标识的第三网络设备对应,该数量值4指示:在归属于第三网络设备的终端设备中,有4个终端设备上部署有执行第一任务的第一进程。192.168.2.1之后的数量值4,与192.168.2.1所标识的第一网络设备对应,该数量值4指示:在归属于第一网络设备的终端设备中,有4个终端设备上部署有执行第一任务的第一进程。
第二项、信息5。其中,信息5指示报文5的类型为通知(notify)报文。示例性的,信息5包括报文5中的字段2,且报文5中字段2的取值为预设值4。字段2可以是报文5中的报文类型指示字段,也可以是其他名称的字段。关于字段2的介绍可以参见S201的相关说明,此处不再赘述。预设值4的取值可以是1,也可以是其他取值,与预设值2的取值不同即可。示例性的,参见图3b,信息5是报文5中的报文类型指示字段,记为query_notify。该query_notify字段的取值为1,以指示该字段所在的报文5为通知报文。
第三项、信息6。其中,信息6指示报文5携带第一任务在上述通信域中对应的目标网络设备的信息。示例性的,信息6包括报文5中的字段1,且报文5中字段1的取值为预设值3。关于字段1和预设值3的介绍可以参见S202的相关说明,此处不再赘述。示例性的,参见图3b,信息6是报文5中的报文类型指示字段,记为query_notify。该query_notify字段的取值为1,以指示该字段所在的报文5为通知报文。
第四项、信息7。其中,信息7指示第一任务在上述通信域中对应的目标网络设备的数量。示例性的,参见图3b,信息7是报文5中的“网络设备的个数”字段,记为TOR_number。仍以图1b所示的网络架构为例,该TOR_number字段的取值为2,以指示第一任务在上述通信域中对应的目标网络设备的数量为2。
在一些实施例中,在第一阶段获取的报文的数量为目标数值的情况下,终端设备1根据第一阶段获取的报文,生成报文5。其中,目标数值指示:在上述通信域中,执行第一任务的进程所在的所有终端设备的数量。由于终端设备1上部署编号0所标识的进程,能够获知在上述通信域中所有执行第一任务的终端设备数量,即终端设备1能够知晓目标数值的取值。
示例性的,仍以图1a所示的网络架构为例,在8个终端设备上部署有第一进程的情况下,目标数值的取值为8。在终端设备1确定获取到8个报文(即第一阶段获取到8个报文)之后,终端设备1根据获取到的8个报文,生成报文5。其中,报文5携带了上述8个报文中的第一进程的信息,以及上述8个报文中第一任务在上述通信域中对应的网络设备的信息,以避免遗漏进程信息和网络设备的信息。
需要说明的是,在图1a所示的网络架构中,即使设备之间(如第一网络设备与终端设备1之间)的通信质量变差,存在重传的现象,如S203中的报文2重传,或S208中的报文4重传,终端设备1能够识别出重传的报文,且终端设备1还能够确定重传的是哪一报文。此种情况下,若某一报文出现重传,则终端设备1确定重传的报文是无效的,不影响上述报文数量的统计。
S302、终端设备1向第一网络设备发送报文5。相应的,第一网络设备接收来自终端 设备2的报文5。
其中,报文5的介绍可以参见S301的相关说明,此处不再赘述。
作为第一种可能的设计的第一种情况、在上述通信域中,执行第一任务的进程除了分布在终端设备1上,还分布在归属于第一网络设备的其他终端设备上。下面,以一个终端设备为例,对此种情况进行介绍:
S303、第一网络设备向终端设备2发送报文5。相应的,终端设备2接收来自第一网络设备的报文5。
示例性的,第一网络设备确定报文5不满足预设条件,第一网络设备执行转发处理,即向终端设备2发送报文5。其中,预设条件的介绍可以参见S202的介绍,此处不再赘述。
通过上述S301至S303的描述,终端设备2即可获取到第一任务在上述通信域中对应的所有目标网络设备的信息,以及每一目标网络设备对应的所有执行第一任务的第一进程的信息。需要说明的是,在上述通信域中,除终端设备1和终端设备2之外,若存在其他的终端设备归属于第一网络设备,且该终端设备上部署有执行第一任务的进程,则第一网络设备仍向该终端设备发送报文5,此处不再赘述。
作为第一种可能的设计的第二种情况、在上述通信域中,执行第一任务的进程除了分布在归属于第一网络设备的终端设备上,还分布在归属于第三网络设备的终端设备上。第三网络设备归属于第二网络设备。下面,以一个终端设备为例,对此种情况进行介绍:
S304、第一网络设备向第二网络设备发送报文5。相应的,第二网络设备接收来自第一网络设备的报文5。
其中,第二网络设备的子节点包括第三网络设备。
示例性的,第一网络设备确定报文5不满足预设条件,第一网络设备执行转发处理,即向第二网络设备发送报文5。其中,预设条件的介绍可以参见S202的介绍,此处不再赘述。
S305、第二网络设备向第三网络设备发送报文5。相应的,第三网络设备接收来自第二网络设备的报文5。
示例性的,第二网络设备确定报文5不满足预设条件,第二网络设备执行转发处理,即向第三网络设备发送报文5。其中,预设条件的介绍可以参见S202的介绍,此处不再赘述。
S306、第三网络设备向终端设备3发送报文5。相应的,终端设备3接收来自第三网络设备的报文5。
其中,终端设备3的介绍可以参见S204的相关说明,此处不再赘述。
示例性的,第三网络设备确定报文5不满足预设条件,第三网络设备执行转发处理,即向终端设备3发送报文5。其中,预设条件的介绍可以参见S202的介绍,此处不再赘述。
在上述通信域中,通过上述S301、S302、S304、S305和S306的描述,终端设备3即可获取到第一任务在上述通信域中对应的所有目标网络设备的信息,以及每一目标网络设备对应的所有执行第一任务的第一进程的信息。需要说明的是,除终端设备3之外,若存在其他的终端设备归属于第三网络设备,且该终端设备上部署有执行第一任务的进程,则 第三网络设备仍向该终端设备发送报文5,此处不再赘述。类似的,除第三网络设备之外,若存在终端设备归属于其他的网络设备,且该终端设备上部署有执行第一任务的进程,则第二网络设备仍向该网络设备发送报文5,该终端设备发送报文5,此处不再赘述。
在第二种可能的设计中,在上述通信域中,以网络设备为粒度,第一终端设备分发第一任务对应的一个目标网络设备的信息,以及该目标网络设备对应的所有执行第一任务的进程信息。参见图4a,本申请实施例的步骤如下:
S401、终端设备1根据第一阶段获取的报文,生成至少一个报文6。
其中,第一阶段获取的报文包括上述报文2和报文4。
其中,报文6的数量与第一任务在上述通信域中对应的所有目标网络设备的数量一致。一个报文6包括一个目标网络设备的信息和该目标网络设备对应的所有执行第一任务的第一进程的信息,不同报文6中的目标网络设备不同。
可选的,每个报文6包括以下信息中的至少一项:信息4、信息5、信息6和信息7。其中,信息4至信息7的介绍可以参见S301的相关说明,此处不再赘述。
在一些实施例中,在第一阶段获取的报文的数量为目标数值的情况下,终端设备1根据第一阶段获取的报文中的目标报文,生成至少一个报文6。其中,目标数值的介绍可以参见S301的介绍,此处不再赘述。目标报文属于第一阶段获取的报文,且携带同一目标网络设备的信息。
示例性的,仍以图1a所示的网络架构为例,在8个终端设备上部署有第一进程的情况下,目标数值的取值为8。在终端设备1确定获取到8个报文(即第一阶段获取到8个报文)之后,终端设备1确定携带第一网络设备的信息的报文有4个,终端设备1根据这4个报文生成一个报文6,可以记为报文6a。其中,报文6a中携带了第一网络设备的信息和第一网络设备对应的4个第一进程的信息,如图4b所示。终端设备1确定携带第三网络设备的信息的报文有4个,终端设备1根据这4个报文生成另一个报文6,可以记为报文6b。其中,报文6b中携带了第三网络设备的信息和第三网络设备对应的4个第一进程的信息,如图4c所示。
S402、终端设备1向第一网络设备发送至少一个报文6。相应的,第一网络设备接收来自终端设备2的至少一个报文6。
其中,报文6的数量与第一任务在上述通信域中对应的所有目标网络设备的数量一致。一个报文6包括一个目标网络设备的信息和该目标网络设备对应的所有执行第一任务的第一进程的信息,不同报文6中的目标网络设备不同。
示例性的,仍以图1a所示的网络架构为例,在S402中,终端设备1向第一网络设备发送的报文6包括报文6a(如图4b所示)和报文6b(如图4c所示)。
作为第二种可能的设计的第一种情况、在上述通信域中,执行第一任务的进程除了分布在终端设备1上,还分布在归属于第一网络设备的其他终端设备上。下面,以一个终端设备为例,对此种情况进行介绍:
S403、第一网络设备向终端设备2发送报文6。相应的,终端设备2接收来自第一网络设备的报文6。
其中,第一网络设备向终端设备2发送的报文6包括第一网络设备的信息,以及该第一网络设备对应的所有执行第一任务的第一进程的信息,即报文6a,如图4b所示。
示例性的,第一网络设备确定报文6a不满足预设条件,第一网络设备执行转发处理,即向终端设备2发送报文6a。其中,预设条件的介绍可以参见S202的介绍,此处不再赘述。
通过上述S401至S403的描述,终端设备2即可获取到第一网络设备信息,以及第一网络设备对应的所有执行第一任务的第一进程的信息。需要说明的是,在上述通信域中,除终端设备1和终端设备2之外,若存在其他的终端设备归属于第一网络设备,且该终端设备上部署有执行第一任务的进程,则第一网络设备仍向该终端设备发送报文6,此处不再赘述。
作为第二种可能的设计的第二种情况、在上述通信域中,执行第一任务的进程除了分布在归属于第一网络设备的终端设备上,还分布在归属于第三网络设备的终端设备上。下面,以一个终端设备为例,对此种情况进行介绍:
S404、第一网络设备向第二网络设备发送至少一个报文6。相应的,第二网络设备接收来自第一网络设备的至少一个报文6。
其中,在第二网络设备的子节点中,若仅归属于第三网络设备的终端设备上部署有执行第一任务的第一进程,如图1a所示的网络架构,则S404中报文6的数量可以为一个。在第二网络设备的子节点还包括第四网络设备(图1a未示出)的情况下,若还存在终端设备归属于第四网络设备,且该终端设备上部署有执行第一任务的第一进程,则S404中报文6的数量至少为两个。也就是说,S404中报文6的数量与归属于第二网络设备的目标网络设备的数量有关。
示例性的,仍以图1b所示的网络架构为例,第一网络设备向第二网络设备发送的报文6包括第三网络设备的信息,以及该第三网络设备对应的进程信息,即报文6b,如图4c所示。
S405、第二网络设备向第三网络设备发送报文6。相应的,第三网络设备接收来自第二网络设备的报文6。
示例性的,仍以图1b所示的网络架构为例,第二网络设备向第三网络设备发送的报文6包括第三网络设备的信息,以及该第三网络设备对应的进程信息,即报文6b,如图4c所示。
S406、第三网络设备向终端设备3发送报文6。相应的,终端设备3接收来自第三网络设备的报文6。
示例性的,仍以图1b所示的网络架构为例,第三网络设备向终端设备3发送的报文6包括第三网络设备的信息,以及该第三网络设备对应的进程信息,即报文6b,如图4c所示。
通过上述S401、S402、S404、S405和S406的描述,终端设备3即可获取到第三网络设备对应的所有执行第一任务的第一进程的信息。需要说明的是,在上述通信域中,除终端设备3之外,若存在其他的终端设备归属于第三网络设备,且该终端设备上部署有执行第一任务的进程,则第三网络设备仍向该终端设备发送报文6,此处不再赘述。类似的,在上述通信域中,除第三网络设备之外,若存在终端设备归属于其他的网络设备,且该终端设备上部署有执行第一任务的进程,则第二网络设备仍向该网络设备发送报文6,以通过该网络设备将报文6传输至相应的终端设备,此处不再赘述。
需要说明的是,以上均是以一个终端设备分配一个进程为例进行介绍。在一个终端设备分配多个进程的情况下,对于分配了多个进程的终端设备而言,终端设备按照一定的规则,从自身分配的多个进程中选取一个进程,以作为该终端设备对应的目标进程,并在发出的报文1中携带该目标进程的信息,报文1在网络设备之间的传输过程可以参见上述介绍,此处不再赘述。在该终端设备的网络接口卡获取到来自网络设备的报文之后,再向执行每个进程的处理器分发该报文,以使每个处理器获知执行第一任务的进程在网络拓扑中的位置。
另外,上述均是以一个通信域为粒度进行介绍,在第一任务对应两个或两个以上通信域的情况下,每个通信域的执行过程可以参见上述两个阶段的介绍,此处不再赘述。
本申请实施例集合通信的方法中,终端设备1接收的报文中既携带了第一进程的信息,又携带了第一进程对应的网络设备的信息。然后,终端设备1根据接收到的报文(如上述报文2和报文4),生成上述报文5或报文6,报文5和报文6均至少包括一个目标网络设备的信息和该目标网络设备对应的所有执行第一任务的第一进程的信息,并将生成的报文发送给相应的目标网络设备,以使归属于该目标网络设备的终端设备能够获取到终端设备1生成的报文。如此,对于归属于同一网络设备的终端设备而言,各个终端设备即可获知自身所归属的网络设备的信息,以及自身所归属的网络设备对应的所有执行第一任务的第一进程的信息,从而规划通信路径,实现近距离通信,尽量减少跨三个网络设备通信的路径,节省资源开销。并且,在上述过程中,若某一终端设备未部署第一进程,则该终端设备不执行上述步骤,避免传输资源的浪费。另外,上述网络设备和终端设备均无需支持其他的协议,终端设备也无需部署Netloc库,不引入额外的Netloc库部署工作。
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。相应的,本申请实施例还提供了通信装置,该通信装置可以为上述方法实施例中的网元,或者包含上述网元的装置,或者为可用于网元的部件。可以理解的是,该通信装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例提供一种芯片,该芯片包括逻辑电路和输入输出接口。其中,输入输出接口用于与芯片之外的模块通信,逻辑电路用于执行上述方法实施例中芯片所在设备上除了收发操作之外的其他操作。
在第一终端设备实现为终端设备1的情况下,比如,以芯片实现为上述方法实施例图2a的终端设备1的功能为例,输入输出接口可以用于执行本申请实施例中终端设备1侧的S203、S208,和/或输入输出接口还用于执行本申请实施例中终端设备1侧的其他收发步骤。逻辑电路可以用于执行本申请实施例中终端设备1侧的其他处理步骤。
再如,以芯片实现为上述方法实施例中图3a的终端设备1的功能为例,输入输出接口可以用于执行终端设备1侧的S302,和/或输入输出接口还用于执行本申请实施例中终端设备1侧的其他收发步骤。逻辑电路可以用于执行终端设备1侧中的S301,和/或逻辑电路还用于执行本申请实施例中终端设备1侧的其他处理步骤。
又如,以芯片实现为上述方法实施例中图4a的终端设备1的功能为例,输入输出接口可以用于执行终端设备1侧的S402,和/或输入输出接口还用于执行本申请实施例中终端设备1侧的其他收发步骤。逻辑电路可以用于执行终端设备1侧中的S401,和/或逻辑电路还用于执行本申请实施例中终端设备1侧的其他处理步骤。
对于第一网络设备而言,比如,以芯片实现为上述方法实施例图2a的第一网络设备的功能为例,输入输出接口可以用于执行本申请实施例中第一网络设备侧的S201、S203、S207、S208,和/或输入输出接口还用于执行本申请实施例中第一网络设备侧的其他收发步骤。逻辑电路可以用于执行本申请实施例中第一网络设备侧的S202,和/或逻辑电路还用于执行本申请实施例中第一网络设备侧的其他处理步骤。
再如,以芯片实现为上述方法实施例中图3a的第一网络设备的功能为例,输入输出接口可以用于执行第一网络设备侧的S302、S303、S304,和/或输入输出接口还用于执行本申请实施例中第一网络设备侧的其他收发步骤。逻辑电路可以用于执行第一网络设备侧中的其他处理步骤。
又如,以芯片实现为上述方法实施例中图4a的第一网络设备的功能为例,输入输出接口可以用于执行第一网络设备侧的S402、S403、S404,和/或输入输出接口还用于执行本申请实施例中第一网络设备侧的其他收发步骤。逻辑电路可以用于执行第一网络设备侧中的其他处理步骤。
对于第三网络设备而言,比如,以芯片实现为上述方法实施例图2a的第三网络设备的功能为例,输入输出接口可以用于执行本申请实施例中第三网络设备侧的S204、S206,和/或输入输出接口还用于执行本申请实施例中第三网络设备侧的其他收发步骤。逻辑电路可以用于执行本申请实施例中第三网络设备侧的S205,和/或逻辑电路还用于执行本申请实施例中第三网络设备侧的其他处理步骤。
再如,以芯片实现为上述方法实施例中图3a的第三网络设备的功能为例,输入输出接口可以用于执行第三网络设备侧的S305、S306,和/或输入输出接口还用于执行本申请实施例中第三网络设备侧的其他收发步骤。逻辑电路可以用于执行第三网络设备侧中的其他处理步骤。
又如,以芯片实现为上述方法实施例中图4a的第三网络设备的功能为例,输入输出接口可以用于执行第三网络设备侧的S405、S406,和/或输入输出接口还用于执行本申请实施例中第三网络设备侧的其他收发步骤。逻辑电路可以用于执行第三网络设备侧中的其他处理步骤。
在第四终端设备实现为终端设备2或终端设备3的情况下,比如,以芯片实现为上述方法实施例图2a的终端设备2的功能为例,输入输出接口可以用于执行本申请实施例中终端设备2侧的S201,和/或输入输出接口还用于执行本申请实施例中终端设备2侧的其他收发步骤。逻辑电路可以用于执行本申请实施例中终端设备2侧的其他处理步骤。
再如,以芯片实现为上述方法实施例中图3a的终端设备2的功能为例,输入输出接口可以用于执行终端设备2侧的S303,和/或输入输出接口还用于执行本申请实施例中终端设备2侧的其他收发步骤。逻辑电路可以用于执行终端设备2侧中的其他处理步骤。
又如,以芯片实现为上述方法实施例中图4a的终端设备2的功能为例,输入输出接口可以用于执行终端设备2侧的S403,和/或输入输出接口还用于执行本申请实施例中终端 设备2侧的其他收发步骤。逻辑电路可以用于执行终端设备2侧中的其他处理步骤。
作为另一种可能的实施例,图5示出了一种通信装置500的结构示意图。该通信装置500包括接收单元504、发送单元503和处理单元502。
在第一终端设备实现为终端设备1的情况下,比如,以通信装置500为上述方法实施例中图2a的终端设备1为例,发送单元503执行终端设备1侧的其他收发步骤。接收单元504执行终端设备1侧的S203、S208,和/或接收单元504还用于执行本申请实施例中终端设备1侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备1侧的其他处理步骤。
再如,以通信装置500为上述方法实施例中图3a的终端设备1为例,发送单元503执行终端设备1侧的S302,和/或发送单元503还用于执行本申请实施例中终端设备1侧的其他收发步骤。接收单元504执行终端设备1侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备1侧的S301,和/或发送单元503还用于执行本申请实施例中终端设备1侧的其他收发步骤。
又如,以通信装置500为上述方法实施例中图4a的终端设备1为例,发送单元503执行终端设备1侧的S402,和/或发送单元503还用于执行本申请实施例中终端设备1侧的其他收发步骤。接收单元504执行终端设备1侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备1侧的S401,和/或发送单元503还用于执行本申请实施例中终端设备1侧的其他收发步骤。
对于第一网络设备而言,比如,以通信装置500为上述方法实施例中图2a的第一网络设备为例,发送单元503执行第一网络设备侧的S203、S208,和/或发送单元503还用于执行本申请实施例中第一网络设备侧的其他收发步骤。接收单元504执行第一网络设备侧的S201、S207,和/或接收单元504还用于执行本申请实施例中第一网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第一网络设备侧的S202,和/或处理单元502还用于执行本申请实施例中第一网络设备侧的其他处理步骤。
再如,以通信装置500为上述方法实施例中图3a的第一网络设备为例,发送单元503执行第一网络设备侧的S303、S304,和/或发送单元503还用于执行本申请实施例中第一网络设备侧的其他收发步骤。接收单元504执行第一网络设备侧的S302,和/或发送单元503还用于执行本申请实施例中第一网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第一网络设备侧的其他收发步骤。
又如,以通信装置500为上述方法实施例中图4a的第一网络设备为例,发送单元503执行第一网络设备侧的S403、S404,和/或发送单元503还用于执行本申请实施例中第一网络设备侧的其他收发步骤。接收单元504执行第一网络设备侧的S402,和/或发送单元503还用于执行本申请实施例中第一网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第一网络设备侧的其他收发步骤。
对于第三网络设备而言,比如,以通信装置500为上述方法实施例中图2a的第三网络设备为例,发送单元503执行第三网络设备侧的S206,和/或发送单元503还用于执行本申请实施例中第三网络设备侧的其他收发步骤。接收单元504执行第三网络设备侧的S204,和/或接收单元504还用于执行本申请实施例中第三网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第三网络设备侧的S205,和/或处理单元502还用于执行本申 请实施例中第三网络设备侧的其他处理步骤。
再如,以通信装置500为上述方法实施例中图3a的第三网络设备为例,发送单元503执行第三网络设备侧的S306,和/或发送单元503还用于执行本申请实施例中第三网络设备侧的其他收发步骤。接收单元504执行第三网络设备侧的S305,和/或发送单元503还用于执行本申请实施例中第三网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第三网络设备侧的其他收发步骤。
又如,以通信装置500为上述方法实施例中图4a的第三网络设备为例,发送单元503执行第三网络设备侧的S406,和/或发送单元503还用于执行本申请实施例中第三网络设备侧的其他收发步骤。接收单元504执行第三网络设备侧的S405,和/或发送单元503还用于执行本申请实施例中第三网络设备侧的其他收发步骤。处理单元502用于执行本申请实施例中第三网络设备侧的其他收发步骤。
在第四终端设备实现为终端设备2或终端设备3的情况下,比如,以通信装置500为上述方法实施例中图2a的终端设备2为例,发送单元503执行终端设备2侧的其他收发步骤。接收单元504执行终端设备2侧的S201,和/或接收单元504还用于执行本申请实施例中终端设备2侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备2侧的其他处理步骤。
再如,以通信装置500为上述方法实施例中图3a的终端设备2为例,发送单元503执行终端设备2侧的其他收发步骤。接收单元504执行终端设备2侧的S303,和/或接收单元504还用于执行本申请实施例中终端设备2侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备2侧的其他收发步骤。
又如,以通信装置500为上述方法实施例中图4a的终端设备2为例,发送单元503执行终端设备2侧的其他收发步骤。接收单元504执行终端设备2侧的S403,和/或发送单元503还用于执行本申请实施例中终端设备2侧的其他收发步骤。处理单元502用于执行本申请实施例中终端设备2侧的其他收发步骤。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
应理解,本申请实施例中的处理单元502可以由处理器或处理器相关电路组件实现,发送单元503可以由发送器或发送器相关电路组件实现,接收单元504可以由接收器或接收器相关电路组件实现。
可选的,通信装置500还可以包括存储单元501,用于存储通信装置500的程序代码和数据,数据可以包括不限于原始数据或者中间数据等。
其中,处理单元502可以是处理器或控制器,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application specific integrated circuit,ASIC),现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
发送单元503可以是通信接口、发送器或发送电路等。接收单元504可以是通信接口、 接收器或接收电路等。其中,该通信接口是统称,在具体实现中,该通信接口可以包括多个接口。
存储单元501可以是存储器。
当处理单元502为处理器,发送单元503为收发器,接收单元504为收发器,存储单元501为存储器时,本申请实施例所涉及的通信装置600可以为图6所示。
参阅图6所示,该通信装置600包括:处理器602、收发器603、存储器601。
其中,收发器603可以为独立设置的发送器,该发送器可用于向其他设备发送信息,该收发器也可以为独立设置的接收器,用于从其他设备接收信息。该收发器也可以是将发送、接收信息功能集成在一起的部件,本申请实施例对收发器的具体实现不做限制。
可选的,通信装置600还可以包括总线604。其中,收发器603、处理器602以及存储器601可以通过总线604相互连接;总线604可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线604可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本领域普通技术人员可以理解:在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络设备上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个功能单元独立存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (49)

  1. 一种集合通信的方法,其特征在于,包括:
    第一终端设备接收来自第一网络设备的至少一个第二报文,其中,所述第二报文包括第一进程的信息和所述第一进程对应的网络设备的信息,所述第一进程用于执行第一任务,所述第一进程对应的网络设备的信息为所述第一进程所在的终端设备所归属的网络设备的信息;
    所述第一终端设备根据所述至少一个第二报文,确定第三报文,其中,所述第三报文包括目标网络设备的信息以及所述目标网络设备对应的所有执行所述第一任务的第一进程的信息,所述目标网络设备为所述第一任务对应的网络设备中的至少一个;
    所述第一终端设备向所述第一网络设备发送所述第三报文。
  2. 根据权利要求1所述的方法,其特征在于,所述目标网络设备为所述第一任务对应的所有网络设备;所述第一终端设备根据所述至少一个第二报文,确定第三报文,包括:
    在所述至少一个第二报文的数量为目标数值的情况下,所述第一终端设备根据所述至少一个第二报文,确定所述第三报文,其中,所述目标数值指示执行所述第一任务的第一进程所在的所有终端设备的数量。
  3. 根据权利要求1所述的方法,其特征在于,所述目标网络设备为所述第一任务对应的网络设备中的一个;所述第一终端设备根据所述至少一个第二报文,确定第三报文,包括:
    在所述至少一个第二报文的数量为目标数值的情况下,所述第一终端设备根据所述至少一个第二报文中的目标报文,确定所述第三报文,其中,所述目标数值指示执行所述第一任务的第一进程所在的所有终端设备的数量,所述目标报文属于所述至少一个第二报文,且携带同一目标网络设备的信息。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述第三报文还包括第一信息,所述第一信息包括至少一个数量值,所述数量值的个数和所述目标网络设备的数量一致,且一一对应;
    其中,第一数量值指示在终端设备集中,部署有执行所述第一任务的第一进程的终端设备的数量,所述第一数量值是所述至少一个数量值中的一个,所述终端设备集中的终端设备归属于所述第一数量值对应的目标网络设备。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第三报文还包括第二信息,所述第二信息指示所述第三报文的类型为通知报文。
  6. 根据权利要求5所述的方法,其特征在于,所述第二信息包括所述第三报文中的第一字段,且所述第三报文中的第一字段的取值为第一预设值。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述第二报文还包括第三信息,所述第三信息指示所述第二报文包括所述第一进程对应的网络设备的信息。
  8. 根据权利要求7所述的方法,其特征在于,所述第三信息包括所述第二报文中的第二字段,且所述第二报文中的第二字段的取值为第二预设值。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述第二报文还包括第四信息,所述第四信息指示所述第二报文的类型为查询报文。
  10. 根据权利要求9所述的方法,其特征在于,所述第四信息包括所述第二报文中的 第一字段,且所述第二报文中的第一字段的取值为第三预设值。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述第三报文满足融合以太网的远程直接内存访问RoCE的协议格式;
    和/或,所述第二报文满足所述RoCE的协议格式。
  12. 一种集合通信的方法,其特征在于,包括:
    第四终端设备向第四网络设备发送第一报文,其中,所述第一报文至少包括第一进程的信息,所述第一进程部署于所述第四终端设备,所述第一进程用于执行第一任务;
    所述第四终端设备接收来自所述第四网络设备的第三报文,所述第三报文至少包括所述第四网络设备的信息和所述第四网络设备对应的所有执行所述第一任务的第一进程的信息。
  13. 根据权利要求12所述的方法,其特征在于,所述第三报文还包括第五网络设备的信息以及所述第五网络设备对应的所有执行所述第一任务的第一进程的信息;
    其中,所述第五网络设备为所述第一任务对应的网络设备中除所述第四网络设备之外的所有网络设备。
  14. 根据权利要求12或13所述的方法,其特征在于,所述第三报文还包括第一信息,所述第一信息包括至少一个数量值,所述数量值的个数和所述第一任务对应的网络设备的数量一致,且一一对应;
    其中,第一数量值指示在终端设备集中,部署有执行所述第一任务的第一进程的终端设备的数量,所述第一数量值是所述至少一个数量值中的一个,所述终端设备集中的终端设备归属于所述第一数量值对应的网络设备。
  15. 根据权利要求12至14任一项所述的方法,其特征在于,所述第三报文还包括第二信息,所述第二信息指示所述第三报文的类型为通知报文。
  16. 根据权利要求15所述的方法,其特征在于,所述第二信息包括所述第三报文中的第一字段,且所述第三报文中的第一字段的取值为第一预设值。
  17. 根据权利要求12至16任一项所述的方法,其特征在于,所述第一报文包括第五信息,所述第五信息指示所述第一报文未携带所述第四网络设备的信息。
  18. 根据权利要求17所述的方法,其特征在于,所述第五信息包括所述第一报文中的第二字段,且所述第一报文中的第二字段的取值为第四预设值。
  19. 根据权利要求12至16任一项所述的方法,其特征在于,所述第一报文还包括所述第四网络设备的信息。
  20. 根据权利要求12至19任一项所述的方法,其特征在于,所述第一报文还包括第六信息,所述第六信息指示所述第一报文的类型为查询报文。
  21. 根据权利要求20所述的方法,其特征在于,所述第六信息包括所述第一报文中的第一字段,且所述第一报文中的第一字段的取值为第三预设值。
  22. 根据权利要求12至21任一项所述的方法,其特征在于,所述第三报文满足融合以太网的远程直接内存访问RoCE的协议格式;
    和/或,所述第一报文满足所述RoCE的协议格式。
  23. 一种通信装置,其特征在于,包括发送单元、接收单元和处理单元;其中,
    所述接收单元,用于接收来自第一网络设备的至少一个第二报文,其中,所述第二报 文包括第一进程的信息和所述第一进程对应的网络设备的信息,所述第一进程用于执行第一任务,所述第一进程对应的网络设备的信息为所述第一进程所在的终端设备所归属的网络设备的信息;
    所述处理单元,用于根据所述至少一个第二报文,确定第三报文,其中,所述第三报文包括目标网络设备的信息以及所述目标网络设备对应的所有执行所述第一任务的第一进程的信息,所述目标网络设备为所述第一任务对应的网络设备中的至少一个;
    所述发送单元,用于向所述第一网络设备发送所述第三报文。
  24. 根据权利要求23所述的装置,其特征在于,所述目标网络设备为所述第一任务对应的所有网络设备;所述处理单元,用于根据所述至少一个第二报文,确定第三报文,包括:在所述至少一个第二报文的数量为目标数值的情况下,根据所述至少一个第二报文,确定所述第三报文,其中,所述目标数值指示执行所述第一任务的第一进程所在的所有终端设备的数量。
  25. 根据权利要求23所述的装置,其特征在于,所述目标网络设备为所述第一任务对应的网络设备中的一个;所述处理单元,用于根据所述至少一个第二报文,确定第三报文,包括:
    在所述至少一个第二报文的数量为目标数值的情况下,根据所述至少一个第二报文中的目标报文,确定所述第三报文,其中,所述目标数值指示执行所述第一任务的第一进程所在的所有终端设备的数量,所述目标报文属于所述至少一个第二报文,且携带同一目标网络设备的信息。
  26. 根据权利要求23至25任一项所述的装置,其特征在于,所述第三报文还包括第一信息,所述第一信息包括至少一个数量值,所述数量值的个数和所述目标网络设备的数量一致,且一一对应;
    其中,第一数量值指示在终端设备集中,部署有执行所述第一任务的第一进程的终端设备的数量,所述第一数量值是所述至少一个数量值中的一个,所述终端设备集中的终端设备归属于所述第一数量值对应的目标网络设备。
  27. 根据权利要求23至26任一项所述的装置,其特征在于,所述第三报文还包括第二信息,所述第二信息指示所述第三报文的类型为通知报文。
  28. 根据权利要求27所述的装置,其特征在于,所述第二信息包括所述第三报文中的第一字段,且所述第三报文中的第一字段的取值为第一预设值。
  29. 根据权利要求23至28任一项所述的装置,其特征在于,所述第二报文还包括第三信息,所述第三信息指示所述第二报文包括所述第一进程对应的网络设备的信息。
  30. 根据权利要求29所述的装置,其特征在于,所述第三信息包括所述第二报文中的第二字段,且所述第二报文中的第二字段的取值为第二预设值。
  31. 根据权利要求23至30任一项所述的装置,其特征在于,所述第二报文还包括第四信息,所述第四信息指示所述第二报文的类型为查询报文。
  32. 根据权利要求31所述的装置,其特征在于,所述第四信息包括所述第二报文中的第一字段,且所述第二报文中的第一字段的取值为第三预设值。
  33. 根据权利要求23至32任一项所述的装置,其特征在于,所述第三报文满足融合以太网的远程直接内存访问RoCE的协议格式;
    和/或,所述第二报文满足所述RoCE的协议格式。
  34. 一种通信装置,其特征在于,包括发送单元和接收单元;其中,
    所述发送单元,用于向第四网络设备发送第一报文,其中,所述第一报文至少包括第一进程的信息,所述第一进程部署于所述通信装置,所述第一进程用于执行第一任务;
    所述接收单元,用于接收来自所述第四网络设备的第三报文,所述第三报文至少包括所述第四网络设备的信息和所述第四网络设备对应的所有执行所述第一任务的第一进程的信息。
  35. 根据权利要求34所述的装置,其特征在于,所述第三报文还包括第五网络设备的信息以及所述第五网络设备对应的所有执行所述第一任务的第一进程的信息;
    其中,所述第五网络设备为所述第一任务对应的网络设备中除所述第四网络设备之外的所有网络设备。
  36. 根据权利要求34或35所述的装置,其特征在于,所述第三报文还包括第一信息,所述第一信息包括至少一个数量值,所述数量值的个数和所述第一任务对应的网络设备的数量一致,且一一对应;
    其中,第一数量值指示在终端设备集中,部署有执行所述第一任务的第一进程的终端设备的数量,所述第一数量值是所述至少一个数量值中的一个,所述终端设备集中的终端设备归属于所述第一数量值对应的网络设备。
  37. 根据权利要求34至36任一项所述的装置,其特征在于,所述第三报文还包括第二信息,所述第二信息指示所述第三报文的类型为通知报文。
  38. 根据权利要求37所述的装置,其特征在于,所述第二信息包括所述第三报文中的第一字段,且所述第三报文中的第一字段的取值为第一预设值。
  39. 根据权利要求34至38任一项所述的装置,其特征在于,所述第一报文包括第五信息,所述第五信息指示所述第一报文未携带所述第四网络设备的信息。
  40. 根据权利要求39所述的装置,其特征在于,所述第五信息包括所述第一报文中的第二字段,且所述第一报文中的第二字段的取值为第四预设值。
  41. 根据权利要求34至38任一项所述的装置,其特征在于,所述第一报文还包括所述第四网络设备的信息。
  42. 根据权利要求34至41任一项所述的装置,其特征在于,所述第一报文还包括第六信息,所述第六信息指示所述第一报文的类型为查询报文。
  43. 根据权利要求42所述的装置,其特征在于,所述第六信息包括所述第一报文中的第一字段,且所述第一报文中的第一字段的取值为第三预设值。
  44. 根据权利要求34至43任一项所述的装置,其特征在于,所述第三报文满足融合以太网的远程直接内存访问RoCE的协议格式;
    和/或,所述第一报文满足所述RoCE的协议格式。
  45. 一种通信装置,其特征在于,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时,如权利要求1至11中任一项所述的集合通信的方法被执行。
  46. 一种芯片,其特征在于,所述芯片包括逻辑电路和输入输出接口,所述输入输出接口用于与所述芯片之外的模块通信,所述逻辑电路用于运行计算机程序或指令,以控制 第一终端设备执行如权利要求1至11中任一项所述的集合通信的方法。
  47. 一种通信装置,其特征在于,包括:处理器和存储器,所述处理器和所述存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时,如权利要求12至22中任一项所述的集合通信的方法被执行。
  48. 一种芯片,其特征在于,所述芯片包括逻辑电路和输入输出接口,所述输入输出接口用于与所述芯片之外的模块通信,所述逻辑电路用于运行计算机程序或指令,以控制第四终端设备执行如权利要求12至22中任一项所述的集合通信的方法。
  49. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储程序,所述程序被处理器调用时,权利要求1至11任一项所述的集合通信的方法被执行,或者权利要求12至22任一项所述的集合通信的方法被执行。
PCT/CN2022/085645 2021-04-09 2022-04-07 集合通信的方法及通信装置 WO2022214041A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22784107.9A EP4319056A1 (en) 2021-04-09 2022-04-07 Collective communication method and communication apparatus
US18/477,044 US20240022497A1 (en) 2021-04-09 2023-09-28 Collective Communication Method and Communication Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110387422.9A CN115208964A (zh) 2021-04-09 2021-04-09 集合通信的方法及通信装置
CN202110387422.9 2021-04-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/477,044 Continuation US20240022497A1 (en) 2021-04-09 2023-09-28 Collective Communication Method and Communication Apparatus

Publications (1)

Publication Number Publication Date
WO2022214041A1 true WO2022214041A1 (zh) 2022-10-13

Family

ID=83545116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085645 WO2022214041A1 (zh) 2021-04-09 2022-04-07 集合通信的方法及通信装置

Country Status (4)

Country Link
US (1) US20240022497A1 (zh)
EP (1) EP4319056A1 (zh)
CN (1) CN115208964A (zh)
WO (1) WO2022214041A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391658A (zh) * 2015-11-24 2016-03-09 无锡江南计算技术研究所 一种基于物理位置感知的集合通信方法
CN109840306A (zh) * 2017-12-28 2019-06-04 中国科学院计算技术研究所 一种基于递归的并行快速傅里叶变换通信优化方法和系统
US20190306030A1 (en) * 2018-03-29 2019-10-03 Kuang Yi Chen Modular Meshed Radio Nodes Networking Topology for Kinematic Objects
CN112039777A (zh) * 2019-06-04 2020-12-04 华为技术有限公司 一种集合通信的方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391658A (zh) * 2015-11-24 2016-03-09 无锡江南计算技术研究所 一种基于物理位置感知的集合通信方法
CN109840306A (zh) * 2017-12-28 2019-06-04 中国科学院计算技术研究所 一种基于递归的并行快速傅里叶变换通信优化方法和系统
US20190306030A1 (en) * 2018-03-29 2019-10-03 Kuang Yi Chen Modular Meshed Radio Nodes Networking Topology for Kinematic Objects
CN112039777A (zh) * 2019-06-04 2020-12-04 华为技术有限公司 一种集合通信的方法、装置及系统

Also Published As

Publication number Publication date
CN115208964A (zh) 2022-10-18
US20240022497A1 (en) 2024-01-18
EP4319056A1 (en) 2024-02-07

Similar Documents

Publication Publication Date Title
CN110313163B (zh) 分布式计算系统中的负载平衡
US10237177B2 (en) Transfer device and transfer system
WO2020001393A1 (zh) 发送网络性能参数、计算网络性能的方法和网络节点
US11902139B2 (en) Diagnosing and resolving issues in a network using probe packets
CN109818917B (zh) 一种通信方法及其装置
KR100961712B1 (ko) 선호하는 경로 소스 라우팅, 다중의 보증 QoS와 자원유보, 관리 및 배포를 구비하는 고 성능의 통신 버스를제공하는 장치, 방법 및 컴퓨터 프로그램 생성물
JP2021129300A (ja) ハイブリッドネットワークでパケットを転送するための方法、デバイス、及びシステム
CN110430135B (zh) 一种报文处理方法和装置
WO2017157318A1 (zh) 链路发现方法及装置
CN105052106A (zh) 用于接收和传输互联网协议(ip)数据包的方法和系统
JP2023529639A (ja) パケット処理方法、デバイス、およびシステム
WO2022214041A1 (zh) 集合通信的方法及通信装置
WO2020187124A1 (zh) 数据处理方法及装置
WO2023179457A1 (zh) 业务连接的标识方法、装置、系统及存储介质
JPWO2014126094A1 (ja) 通信システム、通信方法、制御装置、制御装置の制御方法及びプログラム
CN116915708A (zh) 路由数据包的方法、处理器及可读存储介质
WO2016141884A1 (en) Software defined network (sdn) control signaling for traffic engineering to enable multi-type transport in data plane
WO2022206480A1 (zh) 一种数据包发送方法及设备
US10609188B2 (en) Information processing apparatus, information processing system and method of controlling information processing system
CN105471817A (zh) 业务流的卸载方法、装置和系统
WO2020220987A1 (zh) 数据包传输、管理方法、装置及数据转发设备、存储介质
KR102280343B1 (ko) 복수의 이더넷 포트를 가지는 사물인터넷 디바이스
CN112840623B (zh) 数据报文传输方法及节点
Großmann et al. Emulation of Multipath Transmissions in P4 Networks with Kathará
WO2022228293A1 (zh) 一种发送报文的方法、处理报文的方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22784107

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022784107

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022784107

Country of ref document: EP

Effective date: 20231027

NENP Non-entry into the national phase

Ref country code: DE