CN115914083A - 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
CN115914083A
CN115914083A CN202211578122.XA CN202211578122A CN115914083A CN 115914083 A CN115914083 A CN 115914083A CN 202211578122 A CN202211578122 A CN 202211578122A CN 115914083 A CN115914083 A CN 115914083A
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.)
Pending
Application number
CN202211578122.XA
Other languages
Chinese (zh)
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/CN115914083A/en
Publication of CN115914083A publication Critical patent/CN115914083A/en
Pending legal-status Critical Current

Links

Images

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 following steps: acquiring a first multicast message to be multicast to N destination addresses; copying the first multicast messages to the N nodes through node addresses stored in the N nodes connected in series, and transmitting the first multicast messages on the N nodes to the N multicast leaves through multicast leaf addresses stored in the N nodes; the first multicast messages received by each multicast leaf in the N multicast leaves are transmitted to the N destination addresses, and by adopting the technical scheme, the problems that the utilization rate of the multicast leaves is low in the multicast process and the like in the related technology are solved.

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, the multicast leaves are often directly associated in the multicast group, and the replication of the multicast packet is completed in a manner that the multicast leaves are connected in series with the multicast leaves. In detail, in the multicast process, the multicast leaf attribute and the multicast leaf are often coupled together through a series relationship, and this way may cause that even if different multicast groups include the same multicast leaf, the different multicast groups need to be allocated with respective multicast leaves (or referred to as multicast leaf resources) to copy the multicast packet to the corresponding multicast leaf. In this way, a great waste of multicast leaf resources is caused.
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 is provided.
Disclosure of Invention
The embodiment of the application provides a data transmission method and device, a storage medium and an electronic device, and aims to at least solve the problems that in the related art, the utilization rate of multicast leaves is low in the multicast process and the like.
According to an embodiment of the present application, there is provided a data transmission method, including: acquiring 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, and transmitting the first multicast message 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 +1 th node in the N nodes, the multicast leaf address stored in an ith node in the N nodes includes an address of an i th 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 N th multicast leaf in the N multicast leaves, and i is a positive integer greater than or equal to 1 and less than N; and transmitting the first multicast messages received by each multicast leaf in the N multicast leaves to the N destination addresses.
Optionally, the copying the first multicast packet to the N nodes through node addresses stored in the N nodes connected in series includes: transmitting the first multicast message to a 1 st node of the N nodes and performing, by an ith node of the N nodes: and transmitting the first multicast message received by the ith node to the (i + 1) th node through the address of the (i + 1) th node stored on the ith node.
Optionally, before copying the first multicast packet to the N nodes through node addresses stored in the N nodes connected in series and transmitting the first multicast packet on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, the method further includes: creating the N nodes for transmitting the first multicast packet, and storing an address of an i +1 th node of the N nodes and an address of an i multicast leaf of the N multicast leaves in an i node of the N nodes, and storing an address of an N multicast leaf of the N multicast leaves in an N node of the N nodes.
Optionally, before copying the first multicast packet to the N nodes through node addresses stored in the N nodes connected in series and transmitting the first multicast packet on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, the method further includes: selecting N nodes corresponding to the N multicast leaves from a group of nodes according to the N destination addresses, wherein each node in the group of nodes stores an address of a multicast leaf corresponding to the each node in advance, the destination address of the multicast leaf corresponding to the each node in advance, the address of the multicast leaf stored in advance in an ith node in the N nodes is the address of an ith multicast leaf in the N multicast leaves, and the address of the multicast leaf stored in advance in an Nth node in the N nodes is the address of an Nth multicast leaf in the N multicast leaves; storing an address of an i +1 th node of the N nodes in an ith node of the N nodes.
Optionally, the method further includes: 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; copying the second multicast message to the M nodes through node addresses stored in M nodes connected in series, and 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 address stored in a jth node in the M nodes includes addresses of j +1 nodes in the M nodes, the multicast leaf address stored in a jth node in the M nodes includes an address of a jth multicast leaf in the M multicast leaves, the multicast leaf address stored in an mth node in the M nodes includes an address of an mth multicast leaf in the M multicast leaves, j is a positive integer greater than or equal to 1 and less than M; and transmitting the second multicast messages received by each multicast leaf in the M multicast leaves to the M destination addresses.
Optionally, the transmitting the first multicast packet received by each multicast leaf in the N multicast leaves to the N destination addresses includes: encapsulating the first multicast message and the ith destination address in the N destination addresses into an ith first message through 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; the transmitting the second multicast packet received by each multicast leaf in the M multicast leaves to the M destination addresses includes: encapsulating the second multicast message and a jth destination address in the M destination addresses into a jth second message through a message processing module in a jth multicast leaf in the M multicast leaves, and transmitting the jth second message to the jth destination address; when the ith multicast leaf and the jth multicast leaf are the same multicast leaf, a message processing module in the same multicast leaf is used for encapsulating the first multicast message and the ith destination address into the ith first message, and encapsulating the second multicast message and the jth destination address into the jth second message.
According to another embodiment of the present application, there is also provided a data transmission apparatus, including: the first obtaining module is used for obtaining a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2; a first processing module, 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, a node address stored in an ith node in the N nodes includes an address of an i +1 th node in the N nodes, a 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, a 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 to 1 and less than N; a first transmission module, configured to transmit the first multicast packet received by each multicast leaf in the N multicast leaves to the N destination addresses.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above data transmission method when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above data transmission method 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 address 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 relation between the multicast leaves is eliminated, and the multicast messages are prevented from being transmitted through different multicast leaves even if the destination addresses transmitted by different multicast messages comprise the same destination address in the process of transmitting the multicast messages; the multicast message is transmitted to the corresponding multicast leaf through the multicast leaf address stored in the node according to the destination address required to be transmitted by the multicast message, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf, so that the number of the multicast leaves required to be distributed in the transmission process of the multicast message is greatly reduced. By adopting the technical scheme, the problems that the utilization rate of the multicast leaves is low and the like in the multicast process 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 present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a hardware environment diagram 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 present application;
fig. 3 is a first schematic diagram illustrating transmission of a multicast packet according to an embodiment of the present application;
fig. 4 is a 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 present application;
fig. 6 is a schematic diagram of transmission of multiple multicast messages according to an embodiment of the present application;
FIG. 7 is a diagram illustrating a method for 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 to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or 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 provided by the embodiment of the application can be executed in a computer terminal, a device terminal or a similar operation device. Taking a computer terminal as an example, fig. 1 is a hardware environment diagram 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 shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data transmission method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The 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 located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as 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 in a wireless manner.
In this embodiment, a data transmission method is provided, which is 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, acquiring a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2;
step S204, copying the first multicast packet to the N nodes through node addresses stored in N nodes connected in series, and transmitting 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 +1 th 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 to 1 and less than N;
step S206, transmitting the first multicast packet received by each multicast leaf in 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 address 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 relation between the multicast leaves is eliminated, and the multicast messages are prevented from being transmitted through different multicast leaves even if the destination addresses transmitted by different multicast messages comprise the same destination address in the process of transmitting the multicast messages; the multicast message is transmitted to the corresponding multicast leaf through the multicast leaf address stored in the node according to the destination address required to be transmitted by the multicast message, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf, so that the number of the multicast leaves required to be distributed in the transmission process of the multicast message is greatly reduced. By adopting the technical scheme, the problems that the utilization rate of the multicast leaves is low and the like in the multicast process 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.
Optionally, in this embodiment, the multicast packet may be transmitted to multiple destination addresses through nodes connected in series, but not limited to. Fig. 3 is a first schematic diagram illustrating multicast packet transmission according to an embodiment of the present application, and as shown in fig. 3, a first multicast packet is expected to be transmitted to N destination addresses (destination address 1, destination address 2, \8230;, destination address N-1, destination address N). Under the condition, the first multicast messages are copied to the leaf addresses (multicast leaf 1 address, multicast leaf 2 address, 8230; node N-1, node N) stored in N nodes (node 1, node 2, node address 3; 8230; node address N-1) in series, and the first multicast messages on the N nodes (node 1, node 2, node 8230; node N-1, node N) are transmitted to the multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address, 8230; multicast leaf N-1; node N-1, node N) through the leaf addresses (node 1, node 2; 8230; multicast leaf N-1 address, multicast leaf N-1; multicast leaf 8230; node 1, node 2, node 8230; multicast leaf 828230; multicast leaf N-1, node N-1; multicast leaf 821; multicast leaf 822; multicast leaf 82821; multicast leaf) in series. The first multicast report received by each multicast leaf of N multicast leaves (multicast leaf 1, multicast leaf 2, \8230;, multicast leaf N-1, multicast leaf N) is transmitted to N destination addresses (destination address 1, destination address 2, \8230;, destination address N-1, destination address N).
In the technical solution provided in step S202, when the first multicast packet is acquired, it may be indicated that it is desired to transmit the first multicast packet to multiple destination addresses. The destination addresses to which different multicast messages are desired to be transmitted may be, but are not limited to, the same, different, or partially the same, etc.
In the technical solution provided in step S204, N multicast leaves are not connected, or there is no series relationship between N multicast leaves, but N nodes are connected in series. By the method, the series relation between the multicast leaves is eliminated, the multicast message is transmitted to the corresponding multicast leaf through the multicast leaf address stored in the node according to the destination address required to be transmitted by the multicast message, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf. The multicast leaves 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 in the N nodes; the nth node may, but is not limited to, store the address of the nth multicast leaf, and the node address stored by the nth node may, but is not limited to, be null.
In an exemplary embodiment, the first multicast packet may be copied to the N nodes by, but is not limited to: transmitting the first multicast message to a 1 st node of the N nodes and performing, by an ith node of the N nodes: and transmitting the first multicast message received by the ith node to the (i + 1) th node through the address of the (i + 1) th node stored on the ith node.
Optionally, in this embodiment, when the first multicast message is obtained, but not limited to, the first multicast message may be transmitted to the first node first, and then the first multicast message on the first node is transmitted to the second node, \ 8230 \ 8230;, until the first multicast message on the N-1 st node is transmitted to the nth node. Fig. 4 is a schematic diagram illustrating a transmission of a multicast packet according to an embodiment of the present application, where as shown in fig. 4, a first multicast packet is expected to be transmitted to N destination addresses (destination address 1, destination address 2, \ 8230; \ 8230;, destination address i, destination address i +1, \ 8230; \ 8230;, destination address N). In this case, the first multicast message is transmitted to a 1 st node (i.e., node 1) of the N nodes (node 1, node 2, \8230; node i, node i +1, \8230;, node N), and the first multicast message received by the 1 st node is transmitted to the 2 nd node through an address (i.e., node address 2) of the 2 nd node (i.e., node 2) stored on the 1 st node; transmitting the first multicast message received by the 2 nd node to the 3 rd node through the address (namely, the node address 3) of the 3 rd node (namely, the node 3) stored on the 2 nd node; 823060, 8230; transmitting the first multicast message on the ith node to the (i + 1) th node through the address (i.e. the node address i + 1) of the (i + 1) th node stored on the ith node (i.e. the node i); transmitting a first multicast message on an (i + 1) th node to an (i + 2) th node by using an address (i.e., a node address i + 2) of the (i + 2) th node (i.e., a node i + 2) stored on the (i + 1) th node (i.e., a node i + 1); \8230; until the first multicast message is transmitted to the nth node (i.e., node N). A first multicast message on N nodes (node 1, node 2, \ 8230; \ 8230;, node i, node i +1, \ 8230; \ 8230;, multicast leaf 2 address, \ 8230; \ 8230;, multicast leaf i address, multicast leaf i +1 address, \ 8230; \ 8230;, multicast leaf N address) is transmitted to N multicast leaves (multicast leaf 1, multicast leaf 2, \\\ 8230; \8230; \ 8230;, multicast leaf i, multicast leaf i +1, \\ 8230; \\\\ 8230;, multicast leaf N). The first multicast report received by each multicast leaf of N multicast leaves (multicast leaf 1, multicast leaf 2, \ 8230; \ 8230;, multicast leaf i, multicast leaf i +1, \ 8230; \ 8230;, multicast leaf N) is transmitted to N destination addresses (destination address 1, destination address 2, \8230;, destination address i +1, \8230;, destination address N).
In an exemplary embodiment, the address at which the multicast leaf is stored in the node may be created, but is not limited to, by: creating the N nodes for transmitting the first multicast packet, and storing an address of an i +1 th node of the N nodes and an address of an i multicast leaf of the N multicast leaves in an i node of the N nodes, and storing an address of an N multicast leaf of the N multicast leaves in the N node.
Optionally, in this embodiment, but not limited to, in the case of obtaining the first multicast packet, creating N nodes for transmitting the first multicast packet, and storing an address of a multicast leaf 1 and a node address of a 2 nd node in the N nodes in a 1 st node in the N nodes, storing an address of a multicast leaf 2 and a node address of a 3 rd node in the N nodes in the 2 nd node, 8230\8230:, storing an address of a multicast leaf N-1 and a node address of an N nth node in the N nodes in an N-1 st node in the N nodes, and storing an address of the multicast leaf N in the nth node.
In an exemplary embodiment, the node address and the multicast leaf address may be stored in the node by, but are not limited to: 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 stores an address of a multicast leaf corresponding to the each node in advance, one destination address corresponding to the address of the multicast leaf corresponding to the each node, the address of the multicast leaf stored in advance in an 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 stored in advance in the Nth node in the N nodes is the address of the Nth multicast leaf in the N multicast leaves; storing an address of an i +1 th node of the N nodes in an ith node of the N nodes.
Optionally, in this embodiment, but not limited to, according to a plurality of destination addresses to which multicast packets are to be transmitted, a node corresponding to a plurality of multicast leaves to which the multicast packets are to be transmitted may be selected from a group of nodes created in advance. Fig. 5 is a schematic diagram of selecting nodes according to destination addresses according to an embodiment of the present application, and as shown in fig. 5, N nodes (node 1, node 2, multicast leaf 8230; and multicast leaf N) corresponding to N multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 8230; and multicast leaf N-1, and multicast leaf N) are selected from a group of nodes (node 1, node 2, node 8230; and node P) according to N destination addresses (destination address 1, destination address 2, 8230; and destination address N), node N-1, node N), wherein P is more than or equal to N, and the address (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 8230, multicast leaf N-1 address, multicast leaf N address 8230, multicast leaf P address) of multicast leaf corresponding to each node is pre-stored in each node (node 1, node 2, 8230, multicast leaf N-1 address, multicast leaf N, 8230, multicast leaf P). A node address 2 of a 2 nd node among N nodes is stored in a 1 st node among N nodes (node 1, node 2, \ 8230; \ 8230;, node N-1, node N), a node address 3 of a 3 rd node among the N nodes is stored in the 2 nd node, \ 8230; \ 8230;, a 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, when the first multicast packet is obtained, it may be indicated that it is desired to transmit the first multicast packet to multiple destination addresses, and in such a case, the first multicast packet may be copied to N nodes through node addresses stored in N nodes connected in series, and the first multicast packet on the N nodes is transmitted to N multicast leaves through multicast leaf addresses stored in the N nodes, and the first multicast packet received by each multicast leaf in the N multicast leaves is transmitted to the N destination addresses.
In an exemplary embodiment, the second multicast packet may be transmitted, but is not limited to, by: 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; copying the second multicast message to the M nodes through node addresses stored in M nodes connected in series, and 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 address stored in a jth node in the M nodes includes addresses of j +1 nodes in the M nodes, the multicast leaf address stored in a jth node in the M nodes includes an address of a jth multicast leaf in the M multicast leaves, the multicast leaf address stored in an mth node in the M nodes includes an address of an mth multicast leaf in the M multicast leaves, j is a positive integer greater than or equal to 1 and less than M; and transmitting the second multicast messages received by each multicast leaf in the M multicast leaves to the M destination addresses.
Optionally, in this embodiment, M multicast leaves are not connected, or there is no tandem relationship, a node address stored in the mth node may be, but is not limited to, empty, and may be, but is not limited to, when a first multicast packet is obtained, or in a process that the first multicast packet is transmitted to a plurality of corresponding destination addresses, or in a case that the first multicast packet is already transmitted to a plurality of corresponding destination addresses, a second multicast packet is obtained, in such a case, but is not limited to, multicast leaves corresponding to multicast leaf addresses are transmitted to multicast messages on each node through multicast leaf addresses in the tandem nodes, and then the second multicast packet is transmitted to the destination addresses corresponding to multicast leaves. By the mode, the multiple 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, a destination address to which a first multicast packet is to be transmitted may include, but is not limited to, a destination address to which a second multicast packet is to be transmitted, and fig. 6 is a schematic transmission diagram of multiple multicast packets according to an embodiment of the present application, as shown in fig. 6, it may be, but is not limited to, explaining a transmission process of the multiple multicast packets by N =5,m =4, and may be, but is not limited to, acquiring the first multicast packet first, where the first multicast packet may be, but is not limited to, to be transmitted to a destination address 1, a destination address 2, a destination address 3, a destination address 4, and a destination address 5. In this case, the first multicast message is transmitted to the 1 st node (i.e., node 1) of the 5 nodes (node 1, node 2, node 3, node 4, node 5), and 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; transmitting the first multicast message received by the 2 nd node to the 3 rd node through the address (namely, the node address 3) of the 3 rd node (namely, the node 3) stored on the 2 nd node; transmitting the first multicast message on the 3 rd node 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; the first multicast message on the 4 th node is transmitted to the 5 th node by the address of the 5 th node (i.e., node 5) (i.e., node address 5) stored on the 4 th node. Through the multicast leaf address (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 3 address, multicast leaf 4 address, multicast leaf 5 address) stored in 5 nodes (node 1, node 2, node 3, node 4, multicast leaf 5 address), 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). 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, but is not limited to, to be transmitted to the destination address 1, the destination address 2, the destination address 3, and the destination address 4, that is, the first multicast message includes multicast leaves required for transmission of the second multicast message. In such a case, the second multicast message is transmitted to the 1 st node (i.e., node 1) of the 4 nodes (node 1, node 2, node 3, node 4), and 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; transmitting the second multicast message received by the 2 nd node to the 3 rd node through the address (namely, the node address 3) of the 3 rd node (namely, the node address 3) stored in the 2 nd node; the second multicast message on the 3 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 4 nodes (node 1, node 2, node 3, node 4) is transmitted to 4 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4) via the multicast leaf addresses (multicast leaf 1, multicast leaf 2, multicast leaf 3, multicast leaf 4) stored in 4 nodes (node 1, node 2, node 3, node 4). And transmitting the second multicast messages received by each of the 4 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3 and multicast leaf 4) to 4 destination addresses (destination address 1, destination address 2, destination address 3 and destination address 4).
By the mode, the series relation between the multicast leaves is eliminated, the multiplexing of the multicast leaves is realized through the nodes connected in series under the condition that the same multicast leaves exist in the multicast leaves corresponding to different multicast messages, the transmission of different multicast messages transmitted to the same destination address can be realized through the same multicast leaves, the sharing of the same multicast leaves among different multicast groups is realized, the waste of the multicast leaves required by the transmission of the multicast messages is greatly reduced, and the utilization rate of the multicast leaves is greatly improved.
In an exemplary embodiment, the multicast packet received by the multicast leaf may be transmitted to multiple destination addresses, but is not limited to, by: encapsulating the first multicast message and the ith destination address in the N destination addresses into an ith first message through a message processing module in the ith multicast leaf in the N multicast leaves, and transmitting the ith first message to the ith destination address; encapsulating the second multicast message and a jth destination address in the M destination addresses into a jth second message through a message processing module in a jth multicast leaf in the M multicast leaves, and transmitting the jth second message to the jth destination address; when the ith multicast leaf and the jth multicast leaf are the same multicast leaf, a message processing module in the same multicast leaf is used for encapsulating the first multicast message and the ith destination address into the ith first message, and encapsulating the second multicast message and the jth destination address into the jth second message.
Optionally, in this embodiment, when receiving the multicast packet, the multicast leaf may, but is not limited to, encapsulate, by a packet 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 executed by the received multicast packet, a destination address to which the received multicast packet is to be transmitted, and the received packet, so as to obtain a packet to be transmitted to the destination address.
Optionally, in this embodiment, when multiple multicast packets are transmitted to the same or partially the same destination address, multiple multicast packets may be processed by multiplexing the packet processing modules in the same multicast leaf. By the method, the multicast leaves required by the multicast message 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 describes the transmission flow of the data with reference to an alternative embodiment, but the transmission flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a data transmission method is provided, and 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 obtained, but is not limited to, that the first multicast packet is to be transmitted to a destination address 1, a destination address 2, a destination address 3, a destination address 4, and a destination address 5. In this case, the first multicast message is transmitted to the 1 st node (i.e., node 1) of the 5 nodes (node 1, node 2, node 3, node 4, node 5), and 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; transmitting the first multicast message received by the 2 nd node to the 3 rd node through the address (namely, the node address 3) of the 3 rd node (namely, the node address 3) stored in the 2 nd node; transmitting the first multicast message on the 3 rd node to the 4 th node through the address (i.e. the node address 4) of the 4 th node (i.e. the node 4) stored on the 3 rd node (i.e. the node 3); the first multicast message on the 4 th node is transmitted to the 5 th node through the address (i.e., node address 5) of the 5 th (i.e., node 5) node stored on the 4 th node (i.e., node 5). Through the multicast leaf address (multicast leaf 1 address, multicast leaf 2 address, multicast leaf 3 address, multicast leaf 4 address, multicast leaf 5 address) stored in 5 nodes (node 1, node 2, node 3, node 4, multicast leaf 5 address), 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). 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, but is not limited to, to be transmitted to the destination address 1, the destination address 2, and the destination address 3, that is, the first multicast message includes multicast leaves required for transmission of the second multicast message. In this case, the second multicast packet is transmitted to the 1 st node (i.e., node 1) of the 3 nodes (node 1, node 2, node 3), and the second multicast packet 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 transmitting the second multicast message received by the 2 nd node to the 3 rd node through the address (namely, the node address 3) of the 3 rd node (namely, the node address 3) stored on the 2 nd node. Through the 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 messages on the 3 nodes (node 1, node 2, node 3) are transmitted to the 3 multicast leaves (multicast leaf 1, multicast leaf 2, multicast leaf 3). And transmitting the second multicast messages received by each multicast leaf in the 3 multicast leaves (multicast leaf 1, multicast leaf 2 and multicast leaf 3) to 3 destination addresses (destination address 1, destination address 2 and destination address 3).
The third multicast message may be obtained but not limited to 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 packet is transmitted to the 1 st node (i.e., node 1) of the 2 nodes (node 1, node 2), and the third multicast packet 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 in the 1 st node. Through the multicast leaf addresses (multicast leaf 1 address, multicast leaf 2 address) stored in 2 nodes (node 1, node 2), the third multicast message on 2 nodes (node 1, node 2) is transmitted to 2 multicast leaves (multicast leaf 1, multicast leaf 2). And transmitting the third multicast message received by each multicast leaf in the 2 multicast leaves (multicast leaf 1 and multicast leaf 2) to 2 destination addresses (destination address 1 and 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 part of the same destination address, 5 multicast leaves are required to be allocated in total; in the prior art, 5 multicast leaves need to be allocated for transmitting the first multicast message, 3 multicast leaves need to be allocated for transmitting the second multicast message, and 2 multicast leaves need to be allocated for transmitting the third multicast message, so that 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 need to be allocated in the prior art. Compared with the prior art, the method in the embodiment of the application has the advantages that under the condition that the destination addresses transmitted by the multicast messages are the same, the consumption of the multicast leaves is greatly reduced, the cost of a network chip is reduced, and the competitiveness of the product is improved through multiplexing of the multicast leaves.
Furthermore, there are generally 4096 interfaces in a typical network device, and for three-layer multicast, all 4096 interfaces may be leaves of a multicast group. In the prior art, if 10000 multicast groups need to be supported and each multicast group has 4000 multicast leaves, 10000 × 4000=40000000 multicast leaves are required under the limit condition, and the network chip in the prior art cannot support such a 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 can be supported, the number of the multicast groups which can be supported by the network chip is greatly increased.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 8 is a block diagram of a data transmission apparatus according to an embodiment of the present application; as shown in fig. 8, includes: 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, a node address stored in an ith node in the N nodes includes an address of an i +1 th node in the N nodes, a 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, a 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 to 1 and less than N;
a first transmission module 806, configured to transmit the first multicast packet received by each multicast leaf of the N multicast leaves to the N destination addresses.
By the 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 address 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 relation between the multicast leaves is eliminated, and the multicast messages are prevented from being transmitted through different multicast leaves even if the destination addresses transmitted by different multicast messages comprise the same destination address in the process of transmitting the multicast messages; the multicast message is transmitted to the corresponding multicast leaf through the multicast leaf address stored in the node according to the destination address required to be transmitted by the multicast message, and then the multicast message is transmitted to the destination address corresponding to the multicast leaf, so that the number of the multicast leaves required to be distributed in the transmission process of the multicast message is greatly reduced. By adopting the technical scheme, the problems that the utilization rate of the multicast leaves is low and the like in the multicast process 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: transmitting the first multicast message to a 1 st node of the N nodes and performing, by an ith node of the N nodes: and transmitting the first multicast message received by the ith node to the (i + 1) th node through the address of the (i + 1) th node stored on the ith node.
In one exemplary embodiment, the apparatus further comprises: a second processing module, configured to create N nodes for transmitting the first multicast packet before the first multicast packet on the N nodes is transmitted to N multicast leaves through a node address stored in N nodes connected in series and a multicast leaf address stored in the N nodes, store an address of an i +1 th node of the N nodes and an address of an i-th multicast leaf of the N multicast leaves in an i-th node of the N nodes, and store an address of an N-th multicast leaf of the N multicast leaves in an N-th node of the N nodes.
In one exemplary embodiment, the apparatus further comprises:
a selecting module, configured to, before copying the first multicast packet to N nodes through node addresses stored in N nodes connected in series and transmitting the first multicast packet on the N nodes to N multicast leaves through multicast leaf addresses stored in the N nodes, select N nodes corresponding to the N multicast leaves from a group of nodes according to the N destination addresses, where each node in the group of nodes stores in advance an address of a multicast leaf corresponding to each node, one destination address corresponding to the address of the multicast leaf corresponding to each node, an address of a multicast leaf stored in advance 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 stored in advance in an nth node in the N nodes is an address of an nth multicast leaf in the N multicast leaves;
a storage module, configured to store, in an ith node of the N nodes, an address of an (i + 1) th node of the N nodes.
In one exemplary embodiment, the apparatus further comprises:
a second obtaining module, configured to obtain a second multicast packet to be multicast to M destination addresses, where 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 the second multicast packet to M nodes through node addresses stored in M nodes connected in series, and transmit the second multicast packet on the M nodes to M multicast leaves through multicast leaf addresses stored in the M nodes, where the M multicast leaves correspond to the M destination addresses, the M multicast leaves are partial multicast leaves in the N multicast leaves, a node address stored in a jth node in the M nodes includes addresses of j +1 nodes in the M nodes, a multicast leaf address stored in a jth node in the M nodes includes an address of a jth multicast leaf in the M multicast leaves, a multicast leaf address stored in an mth node in the M nodes includes an address of an mth multicast leaf in the M multicast leaves, and 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 messages 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: encapsulating the first multicast message and the ith destination address in the N destination addresses into an ith first message through 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; the second transmission module is configured to: encapsulating the second multicast message and a jth destination address in the M destination addresses into a jth second message through a message processing module in a jth multicast leaf in the M multicast leaves, and transmitting the jth second message to the jth destination address; when the ith multicast leaf and the jth multicast leaf are the same multicast leaf, a message processing module in the same multicast leaf is used for encapsulating the first multicast message and the ith destination address into the ith first message, and encapsulating the second multicast message and the jth destination address into the jth second message.
Embodiments of the present application also provide a storage medium including a stored program, where the program performs any one of the methods described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
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 the 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 multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in an ith node in the N nodes comprises the address of an i +1 th node in the N nodes, the multicast leaf address stored in an ith node in the N nodes comprises the address of an ith multicast leaf in the N multicast leaves, the multicast leaf address stored in an Nth node in the N nodes comprises the address of an Nth 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 messages received by each multicast leaf in the N multicast leaves to the N destination addresses.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the 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 the 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 multicast leaf addresses stored in the N nodes, wherein the N multicast leaves correspond to the N destination addresses, the node address stored in an ith node in the N nodes comprises the address of an i +1 th node in the N nodes, the multicast leaf address stored in an ith node in the N nodes comprises the address of an ith multicast leaf in the N multicast leaves, the multicast leaf address stored in an Nth node in the N nodes comprises the address of an Nth 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 messages received by each multicast leaf in the N multicast leaves to the N destination addresses.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for transmitting data, comprising:
acquiring 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, and 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 address stored in an ith node in the N nodes includes an address of an i +1 th 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 to 1 and less than N;
and transmitting the first multicast messages received by each multicast leaf in the N multicast leaves to the N destination addresses.
2. The method according to claim 1, wherein the copying the first multicast packet to N nodes through node addresses stored in the N nodes in series comprises:
transmitting the first multicast message to a 1 st node of the N nodes and performing, by an ith node of the N nodes:
and transmitting the first multicast message received by the ith node to the (i + 1) th node through the address of the (i + 1) th node stored on the ith node.
3. The method of claim 1, wherein before copying the first multicast messages to N nodes via node addresses stored in the N nodes in series and transmitting the first multicast messages on the N nodes to N multicast leaves via multicast leaf addresses stored in the N nodes, the method further comprises:
creating the N nodes for transmitting the first multicast packet, and storing an address of an i +1 th node of the N nodes and an address of an i multicast leaf of the N multicast leaves in an i node of the N nodes, and storing an address of an N multicast leaf of the N multicast leaves in the N node.
4. The method of claim 1, wherein before copying the first multicast message to N nodes via node addresses stored in the N nodes in the series and transmitting the first multicast message on the N nodes to N multicast leaves via 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 stores an address of a multicast leaf corresponding to the each node in advance, one destination address corresponding to the address of the multicast leaf corresponding to the each node, the address of the multicast leaf stored in advance in an 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 stored in advance in the Nth node in the N nodes is the address of the Nth multicast leaf in the N multicast leaves;
storing an address of an (i + 1) th node of the N nodes in an ith node of the N nodes.
5. The method according to any one of claims 1 to 4, further comprising: 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;
copying the second multicast message to the M nodes through node addresses stored in M nodes connected in series, and 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 address stored in a jth node in the M nodes includes addresses of j +1 nodes in the M nodes, the multicast leaf address stored in a jth node in the M nodes includes an address of a jth multicast leaf in the M multicast leaves, the multicast leaf address stored in an mth node in the M nodes includes an address of an mth multicast leaf in the M multicast leaves, j is a positive integer greater than or equal to 1 and less than M;
and transmitting the second multicast messages received by each multicast leaf in the M multicast leaves to the M destination addresses.
6. The method of claim 5,
the transmitting the first multicast packet received by each of the N multicast leaves to the N destination addresses includes: encapsulating the first multicast message and the ith destination address in the N destination addresses into an ith first message through a message processing module in the ith multicast leaf in the N multicast leaves, and transmitting the ith first message to the ith destination address;
the transmitting the second multicast packet received by each multicast leaf in the M multicast leaves to the M destination addresses includes: encapsulating the second multicast message and a jth destination address in the M destination addresses into a jth second message through a message processing module in a jth multicast leaf in the M multicast leaves, and transmitting the jth second message to the jth destination address;
wherein, when 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 used for encapsulating the first multicast message and the ith destination address into the ith first message and encapsulating the second multicast message and the jth destination address into the jth second message.
7. An apparatus for transmitting data, comprising:
the first obtaining module is used for obtaining a first multicast message to be multicast to N destination addresses, wherein N is a positive integer greater than or equal to 2;
a first processing module, 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, a node address stored in an ith node in the N nodes includes an address of an i +1 th node in the N nodes, a 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, a 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 to 1 and less than N;
a first transmission module, configured to transmit the first multicast packet received by each multicast leaf in the N multicast leaves to the N destination addresses.
8. The apparatus of claim 7, wherein the first processing module is configured to:
transmitting the first multicast message to a 1 st node of the N nodes and performing, by an ith node of the N nodes:
and transmitting the first multicast message received by the ith node to the (i + 1) th node through the address of the (i + 1) th node stored on the ith node.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202211578122.XA 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device Pending CN115914083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211578122.XA CN115914083A (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 CN115914083A (en) 2022-12-05 2022-12-05 Data transmission method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115914083A true CN115914083A (en) 2023-04-04

Family

ID=86485436

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN115914083A (en)

Similar Documents

Publication Publication Date Title
CN110896355B (en) Network slice selection method and device
CN101897131B (en) Method, system and device of mapping system information block
CN103346974B (en) Controlling method of service process and network device
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN111163130B (en) Network service system and data transmission method thereof
CN109995588B (en) Flexible Ethernet link management method and system
CN107040899A (en) System information update method and device
CN108090142A (en) Card sort method, device, server and storage medium
CN105490843A (en) Information processing method and system
CN110856052B (en) Flexe implementation method and device supporting multiple granularities and electronic equipment
CN104410675A (en) Data transmission method, data system and related devices
CN101764756A (en) Method and device for pruning forwarding path of multicast data and network equipment
CN112822646B (en) Message processing method and device, electronic equipment and computer readable storage medium
CN115914083A (en) Data transmission method and device, storage medium and electronic device
CN116233200A (en) Electric energy meter communication method and system based on subsequent frame dynamic registration
Dimitriou et al. Sensenet: a wireless sensor network testbed
CN105634999A (en) Aging method and device for medium access control address
CN112188562B (en) Multicast scheduling method and device for relay base station, storage medium and electronic device
CN108574637B (en) Address self-learning method and device and switch
CN106714258B (en) Channel switching method and device
CN115328457A (en) Method and device for realizing form page based on parameter configuration
CN101909283B (en) M2M (Machine-to-Machine) platform and method for sharing load downloaded with in high capacity
CN113434598B (en) Method, device and electronic device for realizing data double writing
CN106332123B (en) Method and device for testing expansion of number of users
CN112822112B (en) Routing address storage 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