[go: up one dir, main page]

CN115914083B - Data transmission method and device, storage medium and electronic device - Google Patents

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

Info

Publication number
CN115914083B
CN115914083B CN202211578122.XA CN202211578122A CN115914083B CN 115914083 B CN115914083 B CN 115914083B CN 202211578122 A CN202211578122 A CN 202211578122A CN 115914083 B CN115914083 B CN 115914083B
Authority
CN
China
Prior art keywords
multicast
node
nodes
address
leaf
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211578122.XA
Other languages
Chinese (zh)
Other versions
CN115914083A (en
Inventor
崔兴龙
蒋震
方沛昱
周伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202211578122.XA priority Critical patent/CN115914083B/en
Publication of CN115914083A publication Critical patent/CN115914083A/en
Application granted granted Critical
Publication of CN115914083B publication Critical patent/CN115914083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data transmission method and device, a storage medium and an electronic device, wherein the data transmission method comprises the steps of obtaining first multicast messages to be multicast to N destination addresses, copying the first multicast messages to N nodes through node addresses stored in N nodes connected in series, transmitting the first multicast messages on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, and transmitting the first multicast messages received by each multicast leaf in the N multicast leaves to the N destination addresses.

Description

Data transmission method and device, storage medium and electronic device
Technical Field
The present application relates to the field of computers, and in particular, to a data transmission method and apparatus, a storage medium, and an electronic apparatus.
Background
In the prior art, in the multicast replication process, multicast leaves are often directly associated in a multicast group, and replication of a multicast message is completed by connecting the multicast leaves in series. In detail, during the multicast process, the multicast leaf attribute and the multicast leaf are often coupled together through a tandem relationship, which may result in that even if different multicast groups include the same multicast leaf, respective multicast leaves (or referred to as multicast leaf resources) need to be allocated to the different multicast groups, so as to copy the multicast message to the corresponding multicast leaf. In this way, significant wastage of multicast leaf resources is created.
Aiming at the problems of low utilization rate of multicast leaves and the like in the multicast process in the related technology, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a data transmission method and device, a storage medium and an electronic device, which are used for at least solving the problems of low utilization rate of multicast leaves in the multicast process and the like in the related technology.
According to one embodiment of the application, a data transmission method is provided, which comprises the steps of obtaining a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2, copying the first multicast message to the N nodes through node addresses stored in N nodes connected in series, transmitting the first multicast message on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node addresses stored in the i node in the N nodes comprise the address of the i+1th node in the N nodes, the multicast leaf address stored in the i node in the N nodes comprises the address of the i multicast leaf in the N multicast leaves, the multicast address stored in the N node comprises the address of the i multicast leaf in the N multicast leaves, and the node address stored in the N node in the N multicast leaves is greater than or equal to 1, and the multicast address of each leaf in the N multicast leaves is received to be equal to the N.
Optionally, the copying the first multicast message to the N nodes through node addresses stored in the N nodes connected in series includes transmitting the first multicast message to a1 st node in the N nodes, and transmitting the first multicast message received by the i node to the i+1st node through the address of the i+1st node stored on the i node.
Optionally, before the first multicast message is copied to the N nodes by the node addresses stored in the N nodes connected in series and the first multicast message on the N nodes is transmitted to the N multicast leaves by the multicast leaf addresses stored in the N nodes, the method further includes creating the N nodes for transmitting the first multicast message, and storing the address of the i+1th node in the N nodes and the address of the i multicast leaf in the N multicast leaves in the i node in the N nodes, and storing the address of the N multicast leaf in the N node.
Optionally, before copying the first multicast message to the N nodes through node addresses stored in N nodes connected in series and transmitting the first multicast message on the N nodes to the N multicast leaves through the multicast leaf addresses stored in the N nodes, the method further comprises selecting N nodes corresponding to the N multicast leaves in a group of nodes according to the N destination addresses, wherein each node in the group of nodes prestores an address of the multicast leaf corresponding to each node, the address of the multicast leaf corresponding to each node is one destination address, the address of the multicast leaf prestored in the ith node in the N nodes is the address of the ith multicast leaf in the N multicast leaves, and the address of the multicast leaf prestored in the nth node is the address of the ith node in the n+1 th node in the N nodes.
Optionally, the method further comprises the steps of obtaining a second multicast message to be multicast to M destination addresses, wherein M is a positive integer greater than or equal to 2, the M destination addresses are partial destination addresses in the N destination addresses, copying the second multicast message to the M nodes through node addresses stored in M nodes in series, transmitting the second multicast message on the M nodes to M multicast leaves through the multicast leaf addresses stored in the M nodes, wherein the M multicast leaves correspond to the M destination addresses, the M multicast leaves are partial multicast leaves in the N multicast leaves, the node addresses stored in a j node in the M nodes comprise addresses of j+1th nodes in the M nodes, the multicast leaf addresses stored in a j node in the M nodes comprise the M multicast leaves, the M multicast leaves stored in the M multicast leaves comprise the j node address, and the M multicast leaves received by the M multicast leaves are the M multicast leaves, and the M multicast leaves stored in the M node addresses are the positive integer greater than or equal to the M multicast leaves.
Optionally, the transmitting the first multicast message received by each multicast leaf of the N multicast leaves to the N destination addresses includes encapsulating, by a message processing module in an ith multicast leaf of the N multicast leaves, the first multicast message and an ith destination address of the N destination addresses into an ith first message and transmitting the ith first message to the ith destination address, and the transmitting the second multicast message received by each multicast leaf of the M multicast leaves to the M destination addresses includes encapsulating, by a message processing module in a jth multicast leaf of the M multicast leaves, the second multicast message and a jth destination address of the M destination addresses into a jth second message and transmitting the jth second message to the jth first message, wherein the jth second message and the jth destination address are encapsulated into the same message, and encapsulating the jth message into the same message by the jth multicast module when the jth multicast address is the jth multicast address and the jth message.
According to another embodiment of the present application, a data transmission device is provided, which includes a first obtaining module, configured to obtain a first multicast packet to be multicast to N destination addresses, where N is a positive integer greater than or equal to 2, a first processing module, configured to copy the first multicast packet to the N nodes through node addresses stored in N nodes connected in series, and transmit the first multicast packet on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, where the N multicast leaves correspond to the N destination addresses, the node address stored in an i node in the N nodes includes an address of an i+1th node in the N nodes, the multicast address stored in an i node in the N nodes includes an address of an i multicast leaf in the N multicast leaves, the multicast address stored in an N node in the N node includes an N multicast leaf address in the N multicast leaves, and the node address stored in the N multicast leaves is greater than or equal to 1 m, and the node address stored in the N node is equal to the N multicast leaf address.
According to a further aspect of embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described data transmission method when run.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the data transmission method described above through the computer program.
In the embodiment of the application, in the process of transmitting the multicast message, the multicast message on each node is transmitted to the multicast leaf corresponding to the multicast leaf address through the multicast leaf addresses in the nodes connected in series, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf. By the method, the series connection relation among the multicast leaves is relieved, the situation that the multicast messages are required to be transmitted through different multicast leaves even if the same destination address is included in destination addresses transmitted by different multicast messages in the process of transmitting the multicast messages is avoided, the multicast messages are transmitted to the corresponding multicast leaves through the multicast leaf addresses stored in the nodes according to the destination addresses required to be transmitted by the multicast messages, the multicast messages are further transmitted to the destination addresses corresponding to the multicast leaves, and the multicast leaves required to be distributed in the transmission process of the multicast messages are greatly reduced. By adopting the technical scheme, the problems of low utilization rate of the multicast leaves in the multicast process and the like in the related technology are solved, and the technical effect of improving the utilization rate of the multicast leaves in the multicast process is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a data transmission method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of transmitting data according to an embodiment of the application;
fig. 3 is a schematic diagram illustrating transmission of a multicast packet according to an embodiment of the present application;
fig. 4 is a second schematic diagram illustrating transmission of a multicast packet according to an embodiment of the present application;
FIG. 5 is a schematic diagram of selecting a node according to a destination address according to an embodiment of the application;
fig. 6 is a schematic diagram illustrating transmission of a plurality of multicast messages according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a method of transmitting data according to an embodiment of the present application;
fig. 8 is a block diagram of a data transmission apparatus according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided by the embodiments of the present application may be performed in a computer terminal, a device terminal, or a similar computing apparatus. Taking a computer terminal as an example, fig. 1 is a schematic diagram of a hardware environment of a data transmission method according to an embodiment of the present application. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and in one exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, a computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a data transmission method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a data transmission method is provided and applied to the computer terminal, and fig. 2 is a flowchart of a data transmission method according to an embodiment of the present application, where the flowchart includes the following steps:
Step S202, a first multicast message to be multicast to N destination addresses is obtained, wherein N is a positive integer greater than or equal to 2;
Step S204, copying the first multicast message to N nodes through node addresses stored in N nodes connected in series, and transmitting the first multicast message on the N nodes to N multicast leaves through the multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in the i node in the N nodes comprises the address of the i+1th node in the N nodes, the multicast leaf address stored in the i node in the N nodes comprises the address of the i multicast leaf in the N multicast leaves, and the multicast leaf address stored in the N node comprises the address of the N multicast leaf in the N multicast leaves, i is a positive integer greater than or equal to 1 and less than N;
Step S206, transmitting the first multicast message received by each multicast leaf of the N multicast leaves to the N destination addresses.
Through the steps, in the process of transmitting the multicast message, the multicast message on each node is transmitted to the multicast leaf corresponding to the multicast leaf address through the multicast leaf addresses in the nodes connected in series, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf. By the method, the series connection relation among the multicast leaves is relieved, the situation that the multicast messages are required to be transmitted through different multicast leaves even if the same destination address is included in destination addresses transmitted by different multicast messages in the process of transmitting the multicast messages is avoided, the multicast messages are transmitted to the corresponding multicast leaves through the multicast leaf addresses stored in the nodes according to the destination addresses required to be transmitted by the multicast messages, the multicast messages are further transmitted to the destination addresses corresponding to the multicast leaves, and the multicast leaves required to be distributed in the transmission process of the multicast messages are greatly reduced. By adopting the technical scheme, the problems of low utilization rate of the multicast leaves in the multicast process and the like in the related technology are solved, and the technical effect of improving the utilization rate of the multicast leaves in the multicast process is realized.
Alternatively, in this embodiment, the multicast message may be transmitted to a plurality of destination addresses through nodes connected in series, but is not limited to this. Fig. 3 is a schematic diagram of transmission of a multicast packet according to an embodiment of the present application, as shown in fig. 3, where a first multicast packet is desired to be transmitted to N destination addresses (destination address 1, destination address 2, destination address N-1, destination address N). In such a case, the first multicast message is copied to the N nodes (node 1, node 2, node N) by the node addresses (node address 2, node address 3, node N-1, node N) stored in the N nodes (node 1, node 2, node N) in series, and the first multicast message on the N nodes (node 1, node 2, node N-1, node N) is transmitted to the N multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf N-1, multicast leaf N) by the multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, multicast leaf N-1 address, multicast leaf N address) stored in the N nodes (node 1, node 2, node N). The first multicast message received by each of the N multicast leaves (multicast leaf 1, multicast leaf 2,) is transmitted to N destination addresses (destination address 1, destination address 2,) destination address N-1, destination address N.
In the solution provided in step S202, in the case that the first multicast packet is acquired, it may indicate that it is desired to transmit the first multicast packet to a plurality of destination addresses. The destination addresses to which different multicast messages are intended to be transmitted may be, but are not limited to, identical, or different, or partially identical, etc.
In the technical solution provided in step S204, N multicast leaves are not connected, or a tandem relationship does not exist between N multicast leaves, but N nodes are connected in series. By the method, the series connection relation among the multicast leaves is relieved, and the multicast messages are transmitted to the corresponding multicast leaves through the multicast leaf addresses stored in the nodes according to the destination addresses required to be transmitted by the multicast messages, so that the multicast messages are transmitted to the destination addresses corresponding to the multicast leaves. The multicast leaves which are required to be distributed in the process of transmitting different multicast messages are greatly reduced, and the utilization rate of the multicast leaves is improved.
Optionally, in this embodiment, the address of the multicast leaf corresponding to the current node and the node address of the next node of the current node are stored in other nodes except the nth node, where the nth node may store the address of the nth multicast leaf, and the node address stored in the nth node may be, but is not limited to, null.
In one exemplary embodiment, a first multicast message may be, but is not limited to being, replicated to N nodes by transmitting the first multicast message to a 1 st node of the N nodes and transmitting the first multicast message received by the i-th node to the i+1-th node through an address of the i+1-th node stored on the i-th node by an i-th node of the N nodes.
Alternatively, in this embodiment, in the case that the first multicast message is acquired, the first multicast message may be transmitted to the first node, and then the first multicast message on the first node is transmitted to the second node, so that the first multicast message on the N-1 node is transmitted to the N node. Fig. 4 is a transmission schematic diagram two of a multicast packet according to an embodiment of the present application, as shown in fig. 4, where the first multicast packet is intended to be transmitted to N destination addresses (destination address 1, destination address 2,) for destination address i, destination address i+1, & gt. In such a case, the first multicast message is transmitted to the N-th node (node 1, node 2, node i, node i+1, node N) of the 1 st node (i.e., node 1), the first multicast message received by the 1 st node is transmitted to the 2 nd node via the address of the 2 nd node (i.e., node address 2) stored on the 1 st node, the first multicast message received by the 2 nd node is transmitted to the 3 rd node via the address of the 3 rd node (i.e., node address 3) stored on the 2 nd node, the first multicast message received by the 2 nd node is transmitted to the 3 rd node, and the first multicast message is transmitted to the i+1 (i.e., node i+1) node via the address of the i+1 th node (i.e., node i+1) stored on the i node i, the first multicast message is transmitted to the i+1 st node via the i+1 st node (i.e., node i+2) to the i+2 th node). The node is configured by N nodes (node 1, node 2,.,. The term "multicast leaf address" stored in node N) (multicast leaf 1 address, multicast leaf 2 address, multicast leaf i address, multicast leaf i+1 address, multicast leaf N address), transmitting a first multicast message on N nodes (node 1, node 2, node i, node i+1, node N) to N multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf i, multicast leaf i+1, multicast leaf N). The first multicast message received by each of the N multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf i, multicast leaf i+1, the first multicast message is transmitted to N destination addresses (destination address 1, destination address 2, the second multicast message is transmitted to the first multicast message).
In one exemplary embodiment, the address of the multicast leaf may be created in a node by, but not limited to, creating the N nodes for transmitting the first multicast message, and storing the address of the (i+1) th node of the N nodes and the address of the (i) th multicast leaf of the N multicast leaves in the (i) th node of the N nodes, and storing the address of the (N) th multicast leaf of the N multicast leaves in the (N) th node of the N nodes.
Alternatively, in the present embodiment, it is possible, but not limited to, in the case where the first multicast packet is acquired, to create N nodes for transmitting the first multicast packet, and store the address of the multicast leaf 1 in the 1 st node of the N nodes and the node address of the 2 nd node of the N nodes, store the address of the multicast leaf 2 in the 2 nd node and the node address of the 3 rd node of the N nodes, store the address of the multicast leaf N-1 in the N-1 st node of the N nodes and the node address of the N-th node of the N nodes, and store the address of the multicast leaf N in the N-th node.
In one exemplary embodiment, a node address and a multicast leaf address may be, but are not limited to, stored in nodes by selecting N nodes corresponding to the N multicast leaves among a group of nodes according to the N destination addresses, wherein each node among the group of nodes has a pre-stored address of the multicast leaf corresponding to each node, one destination address corresponding to the address of the multicast leaf corresponding to each node, the pre-stored address of the multicast leaf among the ith node among the N nodes is the address of the ith multicast leaf among the N multicast leaves, the pre-stored address of the multicast leaf among the N nodes is the address of the Nth multicast leaf among the N multicast leaves, and the address of the ith+1th node among the N nodes is stored in the ith node among the N nodes.
Alternatively, in this embodiment, the node corresponding to the multicast leaves to which the multicast packet is to be transmitted may be selected from a group of nodes created in advance according to, but not limited to, the destination addresses to which the multicast packet is to be transmitted. Fig. 5 is a schematic view showing selection of nodes according to destination addresses according to an embodiment of the present application, as shown in fig. 5, according to N destination addresses (destination address 1, destination address 2,) destination address N-1, destination address N, in a group of nodes (node 1, node 2,) node N-1, node N,) node P) N nodes (node 1, multicast leaf 2,) corresponding to N multicast leaves N-1, multicast leaf N) are selected, node N), wherein P is greater than or equal to N, each of a set of nodes (node 1, node 2, the term "node N-1, node N, the term" node P ") has pre-stored therein a multicast leaf (multicast leaf 1, multicast leaf 2, the term" multicast leaf N-1, multicast leaf N, the term "multicast leaf P") address (multicast leaf 1 address, multicast leaf 2 address, the term "multicast leaf N-1 address, multicast leaf N address, the term" multicast leaf P address) corresponding to each node. Node address 2 of the 2 nd node stored in the N nodes among the 1 st node of the N nodes (node 1, node 2,.), node N-1, node N, node address 3 of the 3 rd node among the N nodes stored in the 2 nd node, the node address N of an Nth node among the N nodes is stored in the N-1 nodes.
In the technical solution provided in step S206, in the case that the first multicast packet is acquired, it may indicate that it is desired to transmit the first multicast packet to a plurality of destination addresses, in this case, the first multicast packet may be copied to N nodes by node addresses stored in N nodes connected in series, and the first multicast packet on N nodes may be transmitted to N multicast leaves by multicast leaf addresses stored in N nodes, and the first multicast packet received by each multicast leaf in N multicast leaves may be transmitted to N destination addresses.
In one exemplary embodiment, the second multicast message may be transmitted, but is not limited to, by obtaining the second multicast message to be multicast to M destination addresses, wherein M is a positive integer greater than or equal to 2, the M destination addresses being part of the N destination addresses; copying the second multicast message to M nodes through node addresses stored in M nodes connected in series, transmitting the second multicast message on the M nodes to M multicast leaves through multicast leaf addresses stored in the M nodes, wherein the M multicast leaves correspond to the M destination addresses, the M multicast leaves are partial multicast leaves in the N multicast leaves, the node addresses stored in the j node in the M nodes comprise the address of the j+1th node in the M nodes, the multicast leaf address stored in the j node in the M nodes comprises the address of the j multicast leaf in the M multicast leaves, the multicast leaf address stored in the M node comprises the address of the M multicast leaf in the M multicast leaf, j is a positive integer greater than or equal to 1 and less than M, and transmitting each multicast leaf in the M to the second multicast message.
Optionally, in this embodiment, the M multicast leaves are not connected, or there is no tandem relationship, the node address stored in the M node may be, but is not limited to, null, but may be, but is not limited to, when the first multicast message is acquired, or when the first multicast message is transmitted to a corresponding plurality of destination addresses, or when the first multicast message is already transmitted to a corresponding plurality of destination addresses, the second multicast message is acquired, and in this case, the multicast message on each node may be, but is not limited to, transmitted to the multicast leaf corresponding to the multicast leaf address through the multicast leaf address in the tandem node, and then the second multicast message is transmitted to the destination address corresponding to the multicast leaf. By the mode, the multicast messages are transmitted to the corresponding destination addresses in parallel, and the transmission efficiency of the multicast messages is greatly improved.
Optionally, in this embodiment, the destination address to which the first multicast packet is to be transmitted may, but is not limited to, a destination address to which the second multicast packet is to be transmitted, fig. 6 is a schematic transmission diagram of a plurality of multicast packets according to an embodiment of the present application, as shown in fig. 6, the transmission process of the plurality of multicast packets may, but is not limited to, be explained with n=5, m=4, and the first multicast packet may, but is not limited to, be acquired first, and the first multicast packet may, but is not limited to, be transmitted to destination address 1, destination address 2, destination address 3, destination address 4, and destination address 5. In this case, the first multicast message is transmitted to the 1 st node (i.e., node 1) of the 5 th nodes (i.e., node 1, node 2, node 3, node 4, node 5), the first multicast message received by the 1 st node is transmitted to the 2 nd node through the address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node, the first multicast message received by the 2 nd node is transmitted to the 3 rd node through the address (i.e., node address 3) of the 3 rd node (i.e., node 3) stored on the 2 nd node, the first multicast message received by the 4 th node is transmitted to the 4 th node through the address (i.e., node address 4) of the 4 th node (i.e., node 4) stored on the 3 rd node, and the first multicast message received by the 4 th node is transmitted to the 5 th node through the address (i.e., node address 5) stored on the 4 th node. The first multicast message on 5 nodes (node 1, node 2, node 3, node 4, node 5) is transmitted to 5 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4, multicast leaf 5) by multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 4 address, multicast leaf 5 address) stored in 5 nodes (node 1, node 2, node 3, node 4, node 5). The first multicast message received by each of the 5 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4, multicast leaf 5) is transmitted to 5 destination addresses (destination address 1, destination address 2, destination address 3, destination address 4, destination address 5).
The second multicast message may be acquired, but not limited to, when the first multicast message is completed, and the second multicast message may be transmitted to destination address 1, destination address 2, destination address 3, and destination address 4, that is, the first multicast message includes multicast leaves required for transmitting the second multicast message. In this case, the second multicast message is transmitted to the 1 st node (i.e., node 1) of the 4 th nodes (i.e., node 1, node 2, node 3, node 4), the second multicast message received by the 1 st node is transmitted to the 2 nd node through the address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node, the second multicast message received by the 2 nd node is transmitted to the 3 rd node through the address (i.e., node address 3) of the 3 rd node (i.e., node 3) stored on the 2 nd node, and the second multicast message received by the 2 rd node is transmitted to the 4 th node through the address (i.e., node address 4) of the 4 th node (i.e., node 4) stored on the 3 rd node (i.e., node 3). The second multicast message on the 4 nodes (node 1, node 2, node 3, node 4) is transmitted to the 4 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4) by multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 3 address, multicast leaf 4 address) stored in the 4 nodes (node 1, node 2, node 3, node 4). The second multicast message received by each of the 4 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4) is transmitted to 4 destination addresses (destination address 1, destination address 2, destination address 3, destination address 4).
By the method, the series connection relation among the multicast leaves is relieved, multiplexing of the multicast leaves is achieved under the condition that the same multicast leaves exist on the multicast leaves corresponding to different multicast messages through the nodes connected in series, transmission of different multicast messages transmitted to the same destination address can be achieved through the same multicast leaves, sharing of the same multicast leaves among different multicast groups is achieved, waste of the multicast leaves required for transmitting the multicast messages is greatly reduced, and utilization rate of the multicast leaves is greatly improved.
In one exemplary embodiment, a multicast message received by a multicast leaf may be transmitted to a plurality of destination addresses by, but not limited to, encapsulating an ith first message and an ith destination address in the N multicast leaves into an ith first message by a message processing module in an ith multicast leaf in the N multicast leaves, and transmitting the ith first message to the ith destination address, encapsulating a jth destination address in the M multicast leaves into a jth second message and transmitting the jth second message to the jth destination address by a message processing module in a jth multicast leaf in the M multicast leaves, wherein when the ith multicast leaf and the jth multicast leaf are the same multicast leaf, the message processing module in the same multicast is used to encapsulate the first and the jth messages into the jth second message and the jth address.
Optionally, in this embodiment, when the multicast message is received by the multicast leaf, the multicast leaf may, but is not limited to, encapsulate, by a message processing module in the multicast leaf, an index (which may, but is not limited to, include an operation name, an operation identifier, and the like) of an operation performed by the received multicast message, a destination address to which the received multicast message is to be transmitted, and the received message, to obtain a message to be transmitted to the destination address.
Alternatively, in this embodiment, in the case where multiple multicast messages are transmitted to the same or partially the same destination address, the multiple multicast messages may be processed by multiplexing the message processing modules in the same multicast leaf. By the method, multicast leaves required by multicast messages are greatly reduced, the required multicast leaves are saved, and the utilization rate of the multicast leaves is improved.
In order to better understand the process of transmitting the data, the following description is given with reference to an optional embodiment, but the technical solution of the embodiment of the present application is not limited.
In this embodiment, a data transmission method is provided, fig. 7 is a schematic diagram of a data transmission method according to an embodiment of the present application, and as shown in fig. 7, a first multicast packet may be but not limited to be acquired first, and the first multicast packet may be but not limited to be transmitted to destination address 1, destination address 2, destination address 3, destination address 4, and destination address 5. In such a case, the first multicast message is transmitted to the 1 st node (i.e., node 1) of the 5 th nodes (i.e., node 1, node 2, node 4, node 5), the first multicast message received by the 1 st node is transmitted to the 2 nd node through the address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node, the first multicast message received by the 2 nd node is transmitted to the 3 rd node through the address (i.e., node address 3) of the 3 rd node (i.e., node 3) stored on the 2 nd node, the first multicast message received by the 4 th node is transmitted to the 4 th node through the address (i.e., node address 4) of the 4 th node (i.e., node 4) stored on the 3 rd node (i.e., node 5), and the first multicast message received by the 4 th node is transmitted to the 5 th node through the address (i.e., node 5) stored on the 4 th node (i.e., node 5). The first multicast message on 5 nodes (node 1, node 2, node 3, node 4, node 5) is transmitted to 5 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4, multicast leaf 5) by multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 4 address, multicast leaf 5 address) stored in 5 nodes (node 1, node 2, node 3, node 4, node 5). The first multicast message received by each of the 5 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4, multicast leaf 5) is transmitted to 5 destination addresses (destination address 1, destination address 2, destination address 3, destination address 4, destination address 5).
The second multicast message may be acquired, but not limited to, when the first multicast message is completed, and the second multicast message may be transmitted to destination address 1, destination address 2, and destination address 3, that is, the first multicast message includes multicast leaves required for transmitting the second multicast message. In this case, the second multicast message is transmitted to the 1 st node (i.e., node 1) of the 3 nodes (i.e., node 1, node 2, node 3), the second multicast message received by the 1 st node is transmitted to the 2 nd node through the address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node, and the second multicast message received by the 2 nd node is transmitted to the 3 rd node through the address (i.e., node address 3) of the 3 rd node (i.e., node 3) stored on the 2 nd node. The second multicast message on the 3 nodes (node 1, node 2, node 3) is transmitted to the 3 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3) by multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 3 address) stored in the 3 nodes (node 1, node 2, node 3). The second multicast message received by each of the 3 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3) is transmitted to 3 destination addresses (destination address 1, destination address 2, destination address 3).
The third multicast message may be acquired, but not limited to, during the transmission of the second multicast message, and the third multicast message may be transmitted to the destination address 1 and the destination address 2, that is, the first multicast message includes multicast leaves required for transmitting the third multicast message. In this case, the third multicast message is transmitted to the 1 st node (i.e., node 1) of the 2 nd nodes (node 1, node 2), and the third multicast message received by the 1 st node is transmitted to the 2 nd node through the address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node. The third multicast message on 2 nodes (node 1, node 2) is transmitted to 2 multicast leaves (multicast leaf 1, multicast leaf 2) by multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address) stored in 2 nodes (node 1, node 2). The third multicast message received by each of the 2 multicast leaves (multicast leaf 1, multicast leaf 2) is transmitted to 2 destination addresses (destination address 1, destination address 2).
By the data transmission method in the embodiment of the application, under the condition that the first multicast message, the second multicast message and the third multicast message are transmitted to partial same destination addresses, 5 multicast leaves are required to be allocated in total, in the prior art, 5 multicast leaves are required to be allocated for transmitting the first multicast message, 3 multicast leaves are required to be allocated for transmitting the second multicast message, 2 multicast leaves are required to be allocated for transmitting the third multicast message, and even if the destination addresses to which the first multicast message, the second multicast message and the third multicast message are transmitted are repeated, 10 multicast leaves are required in the prior art. Compared with the prior art, the method in the embodiment of the application greatly reduces the consumption of the multicast leaves, reduces the cost of the network chip and improves the competitiveness of the product by multiplexing the multicast leaves under the condition that the destination addresses to which the multicast messages are transmitted are the same.
Furthermore, in a typical network device there are typically 4096 interfaces, which for three-layer multicast, may be leaves of the multicast group. In the prior art, if 10000 multicast groups are required to be supported, when each multicast group has 4000 multicast leaves, 10000×4000=40000000 multicast leaves are required in a limit, and the network chip in the prior art cannot support such huge leaf specification. By the data transmission method in the embodiment of the application, 10000 multicast groups can be supported only by 4096 multicast leaves. And because the multicast leaves are shared, no matter how many multicast groups are supported, the number of the multicast groups supported by the network chip is greatly improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present application.
Fig. 8 is a block diagram of a data transmission device according to an embodiment of the present application, as shown in fig. 8, including a first obtaining module 802, configured to obtain a first multicast packet to be multicast to N destination addresses, where N is a positive integer greater than or equal to 2;
A first processing module 804, configured to copy the first multicast packet to N nodes through node addresses stored in N nodes connected in series, and transmit the first multicast packet on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, where the N multicast leaves correspond to the N destination addresses, the node address stored in an ith node in the N nodes includes an address of an i+1th node in the N nodes, the multicast leaf address stored in an ith node in the N nodes includes an address of an ith multicast leaf in the N multicast leaves, the multicast leaf address stored in an nth node in the N nodes includes an address of an nth multicast leaf in the N multicast leaves, and i is a positive integer greater than or equal to1 and less than N;
a first transmission module 806, configured to transmit the first multicast message received by each of the N multicast leaves to the N destination addresses.
Through the above embodiment, in the process of transmitting the multicast message, the multicast message on each node is transmitted to the multicast leaf corresponding to the multicast leaf address through the multicast leaf addresses in the nodes connected in series, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf. By the method, the series connection relation among the multicast leaves is relieved, the situation that the multicast messages are required to be transmitted through different multicast leaves even if the same destination address is included in destination addresses transmitted by different multicast messages in the process of transmitting the multicast messages is avoided, the multicast messages are transmitted to the corresponding multicast leaves through the multicast leaf addresses stored in the nodes according to the destination addresses required to be transmitted by the multicast messages, the multicast messages are further transmitted to the destination addresses corresponding to the multicast leaves, and the multicast leaves required to be distributed in the transmission process of the multicast messages are greatly reduced. By adopting the technical scheme, the problems of low utilization rate of the multicast leaves in the multicast process and the like in the related technology are solved, and the technical effect of improving the utilization rate of the multicast leaves in the multicast process is realized.
In an exemplary embodiment, the first processing module is configured to transmit the first multicast message to a1 st node of the N nodes, and transmit, by an i-th node of the N nodes, the first multicast message received by the i-th node to the i+1-th node through an address of the i+1-th node stored on the i-th node.
In an exemplary embodiment, the apparatus further includes a second processing module configured to create the N nodes for transmitting the first multicast message before the first multicast message on the N nodes is transmitted to the N multicast leaves by the node addresses stored in the N nodes connected in series, copy the first multicast message to the N nodes by the multicast leaf addresses stored in the N nodes, store the address of the i+1th node in the N nodes and the address of the i multicast leaf in the N multicast leaves in the i node, and store the address of the N multicast leaf in the N node.
In an exemplary embodiment, the apparatus further comprises:
A selecting module, configured to, before copying the first multicast packet to the N nodes by using node addresses stored in N nodes connected in series, and transmitting the first multicast packet on the N nodes to N multicast leaves by using multicast leaf addresses stored in the N nodes, select, according to the N destination addresses, N nodes corresponding to the N multicast leaves in a group of nodes, where each node in the group of nodes has a prestored address of a multicast leaf corresponding to the each node, and an address of a multicast leaf prestored in an ith node in the N nodes is an address of an ith multicast leaf in the N multicast leaves, and an address of a multicast leaf prestored in the nth node in the N nodes is an address of a leaf of an nth multicast leaf in the N multicast leaves;
And the storage module is used for storing the address of the (i+1) th node in the N nodes in the ith node in the N nodes.
In an exemplary embodiment, the apparatus further comprises:
The second acquisition module is used for acquiring a second multicast message to be multicast to M destination addresses, wherein M is a positive integer greater than or equal to 2, and the M destination addresses are part of the N destination addresses;
A third processing module, configured to copy, by using node addresses stored in M nodes connected in series, the second multicast packet to the M nodes, and transmit, by using a multicast leaf address stored in the M nodes, the second multicast packet on the M nodes to M multicast leaves, where the M multicast leaves correspond to the M destination addresses, the M multicast leaves are part of multicast leaves in the N multicast leaves, the node address stored in a j-th node in the M nodes includes an address of a j+1th node in the M nodes, the multicast leaf address stored in the j-th node in the M nodes includes an address of a j-th multicast leaf in the M multicast leaves, and the multicast leaf address stored in the M node includes an M-th multicast leaf address in the M multicast leaves, where j is a positive integer greater than or equal to 1 and less than M;
And the second transmission module is used for transmitting the second multicast message received by each multicast leaf in the M multicast leaves to the M destination addresses.
In an exemplary embodiment, the first transmission module is configured to encapsulate, by a message processing module in an ith multicast leaf of the N multicast leaves and an ith destination address of the N destination addresses into an ith first message, and transmit the ith first message to the ith destination address, and the second transmission module is configured to encapsulate, by a message processing module in a jth multicast leaf of the M multicast leaves, the second multicast message and a jth destination address of the M destination addresses into a jth second message, and transmit the jth second message to the jth destination address, where the ith multicast leaf and the jth multicast leaf are the same multicast leaf, and the message processing module in the same multicast leaf is configured to encapsulate the first multicast message and the ith destination address into the jth second message, and encapsulate the ith second message and the jth destination address into the jth message.
An embodiment of the present application also provides a storage medium including a stored program, wherein the program executes the method of any one of the above.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
S1, acquiring a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2;
S2, copying the first multicast message to N nodes through node addresses stored in N nodes connected in series, and transmitting the first multicast message on the N nodes to N multicast leaves through the multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in the i node in the N nodes comprises the address of the i+1th node in the N nodes, the multicast leaf address stored in the i node in the N nodes comprises the address of the i multicast leaf in the N multicast leaves, the multicast leaf address stored in the N node comprises the address of the N multicast leaf in the N multicast leaves, and i is a positive integer greater than or equal to 1 and less than N;
And S3, transmitting the first multicast message received by each multicast leaf in the N multicast leaves to the N destination addresses.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, acquiring a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2;
S2, copying the first multicast message to N nodes through node addresses stored in N nodes connected in series, and transmitting the first multicast message on the N nodes to N multicast leaves through the multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in the i node in the N nodes comprises the address of the i+1th node in the N nodes, the multicast leaf address stored in the i node in the N nodes comprises the address of the i multicast leaf in the N multicast leaves, the multicast leaf address stored in the N node comprises the address of the N multicast leaf in the N multicast leaves, and i is a positive integer greater than or equal to 1 and less than N;
And S3, transmitting the first multicast message received by each multicast leaf in the N multicast leaves to the N destination addresses.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a random access Memory (Random AccessMemory RAM), a removable hard disk, a magnetic disk, or an optical disk, etc. which can store program codes.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (8)

1.一种数据的传输方法,其特征在于,包括:1. A data transmission method, comprising: 获取待组播至N个目的地址的第一组播报文,其中,N为大于或者等于2的正整数;Obtain a first multicast message to be multicast to N destination addresses, where N is a positive integer greater than or equal to 2; 通过串联的N个节点中存储的节点地址,将所述第一组播报文复制到所述N个节点,并通过所述N个节点中存储的组播叶子地址,将所述N个节点上的所述第一组播报文传输给N个组播叶子,其中,所述N个组播叶子对应所述N个目的地址,所述N个节点中的第i节点中存储的节点地址包括所述N个节点中第i+1个节点的地址,所述N个节点中的第i节点中存储的组播叶子地址包括所述N个组播叶子中第i个组播叶子的地址,所述N个节点中的第N个节点中存储的组播叶子地址包括所述N个组播叶子中第N个组播叶子的地址,i为大于或等于1、且小于N的正整数;The first multicast message is copied to the N nodes through the node addresses stored in the N nodes connected in series, and the first multicast message on the N nodes is transmitted to the N multicast leaves through the multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in the i-th node among the N nodes includes the address of the i+1-th node among the N nodes, the multicast leaf address stored in the i-th node among the N nodes includes the address of the i-th multicast leaf among the N multicast leaves, the multicast leaf address stored in the N-th node among the N nodes includes the address of the N-th multicast leaf among the N multicast leaves, and i is a positive integer greater than or equal to 1 and less than N; 将所述N个组播叶子中的各个组播叶子接收到的所述第一组播报文传输给所述N个目的地址;Transmitting the first multicast message received by each of the N multicast leaves to the N destination addresses; 其中,所述通过串联的N个节点中存储的节点地址,将所述第一组播报文复制到所述N个节点,包括:The step of copying the first multicast message to the N nodes by using the node addresses stored in the N nodes connected in series includes: 将所述第一组播报文传输到所述N个节点中的第1个节点,并通过所述N个节点中的第i个节点执行以下操作:The first multicast message is transmitted to the first node among the N nodes, and the following operations are performed through the i-th node among the N nodes: 通过所述第i个节点上存储的所述第i+1个节点的地址,将所述第i个节点接收到的所述第一组播报文传输给所述第i+1个节点。The first multicast message received by the i-th node is transmitted to the i+1-th node via the address of the i+1-th node stored on the i-th node. 2.根据权利要求1所述的方法,其特征在于,在通过串联的N个节点中存储的节点地址,将所述第一组播报文复制到所述N个节点,并通过所述N个节点中存储的组播叶子地址,将所述N个节点上的所述第一组播报文传输给N个组播叶子之前,所述方法还包括:2. The method according to claim 1, characterized in that before copying the first multicast message to the N nodes through the node addresses stored in the serially connected N nodes, and transmitting the first multicast message on the N nodes to the N multicast leaves through the multicast leaf addresses stored in the N nodes, the method further comprises: 创建用于传输所述第一组播报文的所述N个节点,并在所述N个节点中的第i节点中存储所述N个节点中第i+1个节点的地址以及所述N个组播叶子中第i个组播叶子的地址,以及在所述N个节点中的所述第N个节点中存储所述N个组播叶子中第N个组播叶子的地址。Create the N nodes for transmitting the first multicast message, and store the address of the i+1th node among the N nodes and the address of the i-th multicast leaf among the N multicast leaves in the i-th node among the N nodes, and store the address of the N-th multicast leaf among the N multicast leaves in the N-th node among the N nodes. 3.根据权利要求1所述的方法,其特征在于,在通过串联的N个节点中存储的节点地址,将所述第一组播报文复制到所述N个节点,并通过所述N个节点中存储的组播叶子地址,将所述N个节点上的所述第一组播报文传输给N个组播叶子之前,所述方法还包括:3. The method according to claim 1, characterized in that before copying the first multicast message to the N nodes through the node addresses stored in the serially connected N nodes, and transmitting the first multicast message on the N nodes to the N multicast leaves through the multicast leaf addresses stored in the N nodes, the method further comprises: 根据所述N个目的地址,在一组节点中选择与所述N个组播叶子对应的N个节点,其中,所述一组节点中的每个节点中预先存储了与所述每个节点对应的组播叶子的地址,所述与所述每个节点对应的组播叶子的地址对应的一个目的地址,所述N个节点中的第i节点中预先存储的组播叶子的地址是所述N个组播叶子中第i个组播叶子的地址,所述N个节点中的所述第N个节点中预先存储的组播叶子的地址是所述N个组播叶子中第N个组播叶子的地址;According to the N destination addresses, N nodes corresponding to the N multicast leaves are selected from a group of nodes, wherein the address of the multicast leaf corresponding to each node is pre-stored in each node in the group of nodes, the address of the multicast leaf corresponding to each node corresponds to a destination address, the address of the multicast leaf pre-stored in the i-th node in the N nodes is the address of the i-th multicast leaf in the N multicast leaves, and the address of the multicast leaf pre-stored in the N-th node in the N nodes is the address of the N-th multicast leaf in the N multicast leaves; 在所述N个节点中的第i节点中存储所述N个节点中第i+1个节点的地址。An address of an i+1th node among the N nodes is stored in an i-th node among the N nodes. 4.根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:获取待组播至M个目的地址的第二组播报文,其中,M为大于或者等于2的正整数,所述M个目的地址是所述N个目的地址中的部分目的地址;4. The method according to any one of claims 1 to 3, characterized in that the method further comprises: obtaining a second multicast message to be multicast to M destination addresses, wherein M is a positive integer greater than or equal to 2, and the M destination addresses are part of the N destination addresses; 通过串联的M个节点中存储的节点地址,将所述第二组播报文复制到所述M个节点,并通过所述M个节点中存储的组播叶子地址,将所述M个节点上的所述第二组播报文传输给M个组播叶子,其中,所述M个组播叶子对应所述M个目的地址,所述M个组播叶子是所述N个组播叶子中的部分组播叶子,所述M个节点中的第j节点中存储的节点地址包括所述M个节点中第j+1个节点的地址,所述M个节点中的第j节点中存储的组播叶子地址包括所述M个组播叶子中第j个组播叶子的地址,所述M个节点中的第M个节点中存储的组播叶子地址包括所述M个组播叶子中第M个组播叶子的地址,j为大于或等于1、且小于M的正整数;The second multicast message is copied to the M nodes through the node addresses stored in the M nodes connected in series, and the second multicast message on the M nodes is transmitted to the M multicast leaves through the multicast leaf addresses stored in the M nodes, wherein the M multicast leaves correspond to the M destination addresses, the M multicast leaves are part of the N multicast leaves, the node address stored in the j-th node among the M nodes includes the address of the j+1-th node among the M nodes, the multicast leaf address stored in the j-th node among the M nodes includes the address of the j-th multicast leaf among the M multicast leaves, the multicast leaf address stored in the M-th node among the M nodes includes the address of the M-th multicast leaf among the M multicast leaves, and j is a positive integer greater than or equal to 1 and less than M; 将所述M个组播叶子中的各个组播叶子接收到的所述第二组播报文传输给所述M个目的地址。The second multicast message received by each multicast leaf in the M multicast leaves is transmitted to the M destination addresses. 5.根据权利要求4所述的方法,其特征在于,5. The method according to claim 4, characterized in that 所述将所述N个组播叶子中的各个组播叶子接收到的所述第一组播报文传输给所述N个目的地址,包括:通过所述N个组播叶子中的第i个组播叶子中的报文处理模块,将所述第一组播报文和所述N个目的地址中的第i个目的地址封装成第i个第一报文,并将所述第i个第一报文传输到所述第i个目的地址;The transmitting the first multicast message received by each multicast leaf in the N multicast leaves to the N destination addresses includes: encapsulating the first multicast message and the i-th destination address in the N destination addresses into an i-th first message through a message processing module in the i-th multicast leaf in the N multicast leaves, and transmitting the i-th first message to the i-th destination address; 所述将所述M个组播叶子中的各个组播叶子接收到的所述第二组播报文传输给所述M个目的地址,包括:通过所述M个组播叶子中的第j个组播叶子中的报文处理模块,将所述第二组播报文和所述M个目的地址中的第j个目的地址封装成第j个第二报文,并将所述第j个第二报文传输到所述第j个目的地址;The method of transmitting the second multicast message received by each multicast leaf in the M multicast leaves to the M destination addresses comprises: encapsulating the second multicast message and the jth destination address in the M destination addresses into a jth second message through a message processing module in the jth multicast leaf in the M multicast leaves, and transmitting the jth second message to the jth destination address; 其中,所述第i个组播叶子和所述第j个组播叶子是相同的组播叶子时,所述相同的组播叶子中的报文处理模块用于将所述第一组播报文和所述第i个目的地址封装成所述第i个第一报文,并将所述第二组播报文和所述第j个目的地址封装成所述第j个第二报文。Among them, when the i-th multicast leaf and the j-th multicast leaf are the same multicast leaf, the message processing module in the same multicast leaf is used to encapsulate the first multicast message and the i-th destination address into the i-th first message, and encapsulate the second multicast message and the j-th destination address into the j-th second message. 6.一种数据的传输装置,其特征在于,包括:6. A data transmission device, comprising: 第一获取模块,用于获取待组播至N个目的地址的第一组播报文,其中,N为大于或者等于2的正整数;A first acquisition module, used to acquire a first multicast message to be multicast to N destination addresses, where N is a positive integer greater than or equal to 2; 第一处理模块,用于通过串联的N个节点中存储的节点地址,将所述第一组播报文复制到所述N个节点,并通过所述N个节点中存储的组播叶子地址,将所述N个节点上的所述第一组播报文传输给N个组播叶子,其中,所述N个组播叶子对应所述N个目的地址,所述N个节点中的第i节点中存储的节点地址包括所述N个节点中第i+1个节点的地址,所述N个节点中的第i节点中存储的组播叶子地址包括所述N个组播叶子中第i个组播叶子的地址,所述N个节点中的第N个节点中存储的组播叶子地址包括所述N个组播叶子中第N个组播叶子的地址,i为大于或等于1、且小于N的正整数;A first processing module is used to copy the first multicast message to the N nodes through the node addresses stored in the N nodes connected in series, and transmit the first multicast message on the N nodes to the N multicast leaves through the multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in the i-th node among the N nodes includes the address of the i+1-th node among the N nodes, the multicast leaf address stored in the i-th node among the N nodes includes the address of the i-th multicast leaf among the N multicast leaves, and the multicast leaf address stored in the N-th node among the N nodes includes the address of the N-th multicast leaf among the N multicast leaves, and i is a positive integer greater than or equal to 1 and less than N; 第一传输模块,用于将所述N个组播叶子中的各个组播叶子接收到的所述第一组播报文传输给所述N个目的地址;A first transmission module, used for transmitting the first multicast message received by each multicast leaf in the N multicast leaves to the N destination addresses; 其中,所述第一处理模块,用于:Wherein, the first processing module is used to: 将所述第一组播报文传输到所述N个节点中的第1个节点,并通过所述N个节点中的第i个节点执行以下操作:The first multicast message is transmitted to the first node among the N nodes, and the following operations are performed through the i-th node among the N nodes: 通过所述第i个节点上存储的所述第i+1个节点的地址,将所述第i个节点接收到的所述第一组播报文传输给所述第i+1个节点。The first multicast message received by the i-th node is transmitted to the i+1-th node via the address of the i+1-th node stored on the i-th node. 7.一种计算机可读的存储介质,其特征在于,所述计算机可读的存储介质包括存储的程序,其中,所述程序被处理器运行以执行权利要求1至5中任一项所述的方法。7. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program is executed by a processor to perform the method according to any one of claims 1 to 5. 8.一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行权利要求1至5中任一项所述的方法。8. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 5 through the computer program.
CN202211578122.XA 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device Active CN115914083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211578122.XA CN115914083B (en) 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211578122.XA CN115914083B (en) 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115914083A CN115914083A (en) 2023-04-04
CN115914083B true CN115914083B (en) 2025-04-08

Family

ID=86485436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211578122.XA Active CN115914083B (en) 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115914083B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632147A (en) * 2013-06-29 2018-10-09 华为技术有限公司 Message multicast processing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100407175B1 (en) * 2001-11-02 2003-11-28 주식회사 케이티프리텔 Method and apparatus for transmitting explict multicast data packet over mobile network
CN100596094C (en) * 2005-12-31 2010-03-24 华为技术有限公司 Multipoint-to-multipoint service realization method and switching equipment
CN101515889B (en) * 2009-04-03 2011-07-06 华为技术有限公司 Method and device for copying and processing multicast message
CN109561023B (en) * 2017-09-27 2022-03-11 华为技术有限公司 Method, device and system for transmitting multicast message
CN112769745B (en) * 2019-11-01 2022-07-22 华为技术有限公司 Method and related device for transmitting multicast message
CN112866114B (en) * 2020-12-31 2022-12-13 锐捷网络股份有限公司 Multicast message processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632147A (en) * 2013-06-29 2018-10-09 华为技术有限公司 Message multicast processing method and device

Also Published As

Publication number Publication date
CN115914083A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
CN110896404B (en) Data processing method and device and computing node
CN111447143B (en) Business service data transmission method, apparatus, computer equipment and storage medium
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN114238703A (en) Event flow arrangement method, device and application
US11134129B2 (en) System for determining whether to forward packet based on bit string within the packet
CN111338787B (en) Data processing method and device, storage medium and electronic device
CN113625589A (en) Equipment control method and device, electronic equipment and storage medium
CN105490843A (en) Information processing method and system
CN113382065A (en) File downloading method, device, system, equipment and storage medium
CN105553684A (en) Communication system and applied router upgrading method thereof
CN115914083B (en) Data transmission method and device, storage medium and electronic device
CN110888892B (en) Block synchronization method, device and storage medium
CN117376300B (en) Message all-channel sending method and device, electronic equipment and storage medium
CN112800440A (en) Dynamic watermark adding processing method and device
CN112261125A (en) Centralized unit cloud deployment method, device and system
CN114173396B (en) Method and device for determining terminal networking time, electronic equipment and storage medium
CN116233200A (en) Electric energy meter communication method and system based on subsequent frame dynamic registration
CN115460040A (en) Service processing method, device, terminal equipment and storage medium
CN113504981A (en) Task scheduling method and device, storage medium and electronic equipment
CN114301924A (en) Application task scheduling method and node equipment for cloud edge collaborative environment
CN113220439B (en) Device online control method and device, electronic device and readable storage medium
CN114244744B (en) Node discovery method and device based on Internet of things equipment
KR102848252B1 (en) Data processing method and apparatus, program product, device, and medium for consensus network
CN111061562B (en) A software collaborative packaging method, system, terminal and storage medium
CN110120881B (en) Data synchronization method and device

Legal Events

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