Data transmission method and device based on multicast tunnel
By constructing a multicast tunnel in the video network and replicating the data stream at the first core server close to the receiving device, the high network bandwidth consumption problem caused by unicast tunnels is solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN202510974705.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, routers carry multicast messages through unicast tunnels, resulting in high network bandwidth utilization and reduced data transmission efficiency.
By using a multicast tunnel, a tree-like logical channel is constructed from the sending device to the receiving device through a first core server and a second core server. The data stream is replicated at the first core server close to the receiving device, reducing redundant transmission in the network.
It reduces network bandwidth utilization and improves data transmission efficiency, especially in high real-time scenarios such as security monitoring and telemedicine in video networks.
Smart Images

Figure CN120956715A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and in particular to a data transmission method, apparatus, electronic device, and readable storage medium based on multicast tunnels. Background Technology
[0002] In scenarios such as live video streaming, online classes, and multi-terminal monitoring, audio and video data sent by the source device are encapsulated into multicast messages. A multicast message is a network data unit oriented towards a specific multicast group. Its destination address is a multicast address, and it is specifically designed to achieve efficient data transmission from one sender to multiple receivers. All terminals that have joined the multicast group can receive these messages.
[0003] As a core forwarding device in a network, a router's key function in distributing data across multiple devices is carrying multicast packets. In current technology, routers often use unicast tunnels to carry multicast packets. A unicast tunnel is essentially a point-to-point virtual link established between two network nodes. The router encapsulates multicast packets within unicast packets and transmits them through this virtual link. The number of unicast tunnels corresponds to the number of devices, with each tunnel representing a copy of the packet. Therefore, this consumes a significant amount of network bandwidth and reduces data transmission efficiency. Summary of the Invention
[0004] This application provides a data transmission method, apparatus, electronic device, and readable storage medium based on multicast tunnels, which can reduce network bandwidth occupancy and improve data transmission efficiency.
[0005] In a first aspect, embodiments of this application disclose a data transmission method based on a multicast tunnel, applied to a first core server, the first core server being connected to multiple receiving devices, the method comprising:
[0006] Obtain the multicast group joining requests sent by each of the multiple receiving devices;
[0007] The request to join the multicast group is sent to the second core server, so that the second core server constructs a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and adds the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices;
[0008] The data stream sent by the second core server is received through the multicast tunnel; the data stream is provided by the sending device.
[0009] According to the number of receiving devices, the data stream is copied into multiple streams, and the copied multiple data streams are sent to their respective receiving devices.
[0010] Secondly, embodiments of this application disclose a data transmission method based on a multicast tunnel, applied to a second core server, the method comprising:
[0011] Receive a request to join a multicast group sent by the first core server; the request to join a multicast group is provided by the receiving device.
[0012] Based on the request to join the multicast group and the network topology, a multicast tunnel is constructed between the sending device and the receiving device, and the receiving device is added to the multicast group;
[0013] The multicast tunnel receives data streams sent to the multicast group by the sending device or other second core server.
[0014] The data stream is sent to the first core server through the multicast tunnel, so that the first core server can replicate the data stream into multiple streams according to the number of receiving devices, and send the replicated multiple data streams to their respective corresponding receiving devices.
[0015] Thirdly, embodiments of this application disclose a data transmission device based on a multicast tunnel, applied to a first core server, the first core server being connected to multiple receiving devices, the device comprising:
[0016] The request acquisition module is used to acquire the multicast group joining requests sent by each of the multiple receiving devices;
[0017] The request sending module is used to send the request to join the multicast group to the second core server, so that the second core server can construct a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and add the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices;
[0018] The first receiving module is used to receive a data stream sent by the second core server through the multicast tunnel; the data stream is provided by the sending end device.
[0019] The copying module is used to copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.
[0020] Fourthly, embodiments of this application disclose a data transmission device based on a multicast tunnel, applied to a second core server, the device comprising:
[0021] The request receiving module is used to receive a request to join a multicast group sent by the first core server; the request to join a multicast group is provided by the receiving device.
[0022] A tunnel construction module is used to construct a multicast tunnel between the sending device and the receiving device based on the request to join the multicast group and the network topology, and to add the receiving device to the multicast group;
[0023] The second receiving module is used to receive data streams sent to the multicast group by the sending end device or other second core server through the multicast tunnel;
[0024] The data stream sending module is used to send the data stream to the first core server through the multicast tunnel, so that the first core server can copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.
[0025] Fifthly, embodiments of this application disclose an electronic device, which includes a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface communicate with each other through the communication bus. The memory is used to store executable instructions, which cause the processor to execute the aforementioned data transmission method based on multicast tunnels.
[0026] Sixthly, embodiments of this application disclose a readable storage medium, which, when the instructions in the readable storage medium are executed by the processor of an electronic device, enables the electronic device to execute the aforementioned data transmission method based on a multicast tunnel.
[0027] The embodiments of this application include the following advantages: acquiring multicast group joining requests sent by multiple receiving devices; sending the multicast group joining requests to a second core server, so that the second core server constructs a multicast tunnel between the sending and receiving devices based on the multicast group joining requests and the network topology, and adds the receiving devices to the multicast group; receiving the data stream sent by the second core server through the multicast tunnel; replicating the data stream into multiple paths according to the number of receiving devices, and sending the replicated multiple data streams to their respective corresponding receiving devices. Replicating the data stream through a first core server directly connected to the receiving devices reduces the occupancy of core network bandwidth and improves data transmission efficiency. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart illustrating the steps of an embodiment of a data transmission method based on a multicast tunnel according to the present invention.
[0030] Figure 2 This is a flowchart illustrating the steps of another embodiment of the data transmission method based on multicast tunnels according to the present invention;
[0031] Figure 3 This is a flowchart of the interactive steps of an embodiment of a data transmission method based on a multicast tunnel according to the present invention;
[0032] Figure 4 This is a flowchart of the interactive steps of another embodiment of the data transmission method based on multicast tunnel of the present invention;
[0033] Figure 5 This is an architecture diagram of a data transmission system based on a multicast tunnel according to the present invention;
[0034] Figure 6 This is a structural block diagram of a data transmission device based on a multicast tunnel according to the present invention;
[0035] Figure 7 This is a structural block diagram of another data transmission device based on a multicast tunnel according to the present invention;
[0036] Figure 8 This is a structural block diagram of an electronic device provided by an example of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, the first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In embodiments of this invention, the term "multiple" refers to two or more, and other quantifiers are similar.
[0039] Method Implementation Examples
[0040] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of a data transmission method based on a multicast tunnel according to the present invention, applied to a first core server, and specifically includes the following steps:
[0041] Step 101: Obtain the multicast group joining requests sent by each of the multiple receiving devices;
[0042] Step 102: Send the request to join the multicast group to the second core server, so that the second core server can construct a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and add the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices;
[0043] Step 103: Receive the data stream sent by the second core server through the multicast tunnel; the data stream is provided by the sending device.
[0044] Step 104: According to the number of receiving devices, the data stream is copied into multiple streams, and the copied multiple data streams are sent to their respective receiving devices.
[0045] Regarding steps 101-104, the data transmission method based on multicast tunnels provided in this application embodiment can be applied to video networks. A video network is a dedicated network based on Ethernet, employing a real-time transmission protocol to ensure low-latency and high-reliability transmission of audio and video data. It is typically used in scenarios with high real-time requirements, such as security monitoring and telemedicine. It should be noted that a video network differs from a traditional Internet Protocol (IP) network. Specifically, a video network uses service identifiers instead of IP addresses to locate resources. Before communication can occur within a video network, a connection needs to be established. The video network relies on a core server for routing calculations, connection establishment, resource management, and control.
[0046] In a video network, core servers act as control and forwarding nodes, responsible for network topology maintenance, route calculation, connection establishment and management, resource scheduling, policy enforcement, and security control. In multicast services, core servers handle receiving multicast group joining requests, establishing multicast tunnels, and replicating and forwarding data. The first core server directly receives multicast group joining requests from receiving devices. Typically, it acts as a regional or edge core server in the video network, located close to the receiving devices, and is responsible for receiving these requests and replicating data, thus reducing the burden on higher-level core servers. The second core server, responsible for path calculation, multicast tunnels, and case studies, consists of all other core servers besides the first core server. It receives multicast group joining requests from the first core server, possesses global or regional network topology information, and calculates the optimal multicast path from the sender to all receivers based on the topology and request information. It then configures each node on the path—the core server—to join the multicast tunnel.
[0047] A receiving device refers to a terminal device that wants to receive multicast data streams, such as a video network set-top box, a video conferencing terminal, or a personal computer (PC) client that supports the video network protocol. The receiving device actively initiates a multicast group join request to subscribe to a specific data stream, such as a television channel, a conference stream, or a surveillance video feed. The multicast group join request is a control signaling message sent by the receiving device to the first core server. This message triggers the first and second core servers to establish a multicast tunnel for receiving the data stream and add the device to the multicast group's member list. The content of the multicast group join request explicitly states, "I want to receive the data stream from the multicast group identified as XXX."
[0048] A multicast group is a logical group consisting of multiple receiving devices. Members within the group can receive the same data stream, and a multicast group is identified by a unique group identifier. The sending end only needs to send one copy of the data stream to this group identifier, and the core servers are responsible for copying and transmitting this data to all receivers within the group.
[0049] A multicast tunnel is a logical channel established for transmitting specific multicast group data. Essentially, it's a series of forwarding states configured by various network nodes, i.e., the core server, defining the replication points and transmission paths of the data stream from the sending device to each receiving device. After the data stream enters the tunnel entrance—that is, after the sending device sends the data stream to the second core server—the data stream will be transmitted along the branches of the multicast tunnel.
[0050] In this embodiment, a first core server receives multicast group joining requests from multiple receiving devices. Each multicast group request contains information about the multicast group the receiving device wants to join. The first core server sends the collected multicast group joining requests to a second core server. Upon receiving the requests, the second core server makes a decision based on the current network topology, that is, by understanding the locations and connections of all core servers, sending devices, and receiving devices. Based on the location of the receiving devices and the network conditions, the second core server calculates and constructs a multicast tunnel from the sending device through the second core server and the first core server to all receiving devices requesting to join the multicast group. It should be noted that the multicast tunnel is a one-to-many tree-like logical channel, not a point-to-point linear path.
[0051] After the multicast tunnel is successfully established, both the first and second core servers receive data streams through this tunnel. The multicast tunnel is a tree-like logical channel composed of core servers, receiving devices, and sending devices. The second core server receives the data stream transmitted from the upstream server and transmits it along the tunnel branches of the multicast tunnel. Finally, the data stream reaches the first core server, which, based on the number of receiving devices, replicates the received single data stream into multiple identical copies. Each replicated data stream is then sent to its corresponding receiving device. It's important to note that the replication operation based on the number of receiving devices occurs on the first core server, not at the source of the data stream.
[0052] In this embodiment, if the data stream is replicated by a core server located near the sending device, multiple identical data streams need to traverse the entire network backbone to reach each receiving device, wasting significant network bandwidth. Compared to replicating data streams at the sending device or a core server directly connected to it, in this application, the first core server is a direct access point for the receiving devices, typically an edge core server. Replicating the data stream by the first core server means the replicated data stream only needs to travel a short distance to reach the receiving device, reducing the consumption of core network bandwidth in the entire network / video network architecture. The sending device only needs to send one original data stream to the multicast tunnel entrance. Before reaching the first core server, the data stream is transmitted as a single copy in the network, and the sending device and upstream network links do not need to handle the load of a large number of duplicate data streams. This layered replication strategy reduces network bandwidth occupancy and improves data transmission efficiency.
[0053] Reference Figure 2 The flowchart illustrates another data transmission method based on a multicast tunnel according to the present invention, applied to a second core server, and specifically includes the following steps:
[0054] Step 201: Receive a request to join a multicast group from the first core server; the request to join a multicast group is provided by the receiving device.
[0055] Step 202: Based on the request to join the multicast group and the network topology, construct a multicast tunnel between the sending device and the receiving device, and add the receiving device to the multicast group;
[0056] Step 203: Receive the data stream sent to the multicast group by the sending device or other second core server through the multicast tunnel;
[0057] Step 204: Send the data stream to the first core server through the multicast tunnel, so that the first core server replicates the data stream into multiple streams according to the number of receiving devices, and sends the replicated multiple data streams to their respective corresponding receiving devices.
[0058] For steps 201-204, the second core server receives multicast group join requests forwarded by the first core server. These requests are initially initiated by the receiving devices, indicating their desire to join a specific multicast group. The receiving devices can be set-top boxes or video terminals. Based on the join requests, the second core server determines the multicast groups each receiving device wants to join, as well as the receiving device's topology location. Using a pre-stored global topology map, with the sending device as the root and the requesting receiving devices as leaves, and based on routing strategies such as minimum latency and load balancing, it calculates the multicast distribution tree from the sending device to each receiving device. At each node in the multicast distribution tree, i.e., each core server, a multicast forwarding state is configured. This multicast forwarding state binds the current core server to the multicast group and instructs downstream devices.
[0059] Multicast tunnels are one-to-many tree-structured logical channels, rather than the point-to-point linear paths of unicast. When a new receiver joins a multicast tunnel, typically only a new branch node needs to be added to the multicast distribution tree; the entire tunnel does not need to be rebuilt. The established multicast distribution tree defines the forwarding rules for data flow from the sending device to the receiving device.
[0060] Through the established multicast tunnel, the second core server receives data streams from the sending device or other upstream second core servers. Since each core server binds the multicast group address to itself via multicast forwarding status and instructs downstream devices, the sending device sends a single data stream to the multicast group address. The data stream is then transmitted to the second core server at the multicast tunnel entrance. This second core server, based on the multicast forwarding status, sequentially transmits the data to the corresponding downstream devices for that multicast group, thus enabling the data stream to be passed downstream along the multicast distribution tree. It should be noted that when the data stream is transmitted in the multicast distribution tree, replication only occurs at branch nodes. For example, when the second core server sends a data stream to two first core servers, the data stream is replicated.
[0061] Each secondary core server sends the received single data stream to the corresponding primary core server via a multicast tunnel. The primary core server, acting as an edge replication point, performs the final replication and distribution based on the number of directly connected receiving devices. The secondary core servers only handle cross-domain backbone transmissions, avoiding excessive replication in the core network area.
[0062] In this embodiment, compared to the point-to-point linear path of a unicast tunnel, a multicast tunnel is a tree-like, one-to-many logical channel. In a unicast tunnel, when a sender wants to send a data stream to various receivers, the sender device or the core server directly connected to the sender device needs to copy an independent data stream for each receiver device, transmitting multiple copies of the same data throughout the network link. For N receivers, N data streams are transmitted throughout the network link. Each time a new receiver device is added, a new tunnel needs to be established between the sender and receiver devices. However, in this embodiment, the sender device only needs to send one copy of the data, and each core server copies it as needed, depending on whether it is at a branch point. The core link in the network transmits only one copy of the data, reducing redundant traffic in the backbone network. When adding a new receiver device, only the edge branches need to be expanded, reducing the load on the core servers and effectively saving network bandwidth. Furthermore, multicast tunnels are dynamic and scalable.
[0063] Reference Figure 3 The diagram illustrates the interactive steps of a data transmission method based on a multicast tunnel according to the present invention, which may specifically include the following steps:
[0064] Step 301: The first core server obtains the multicast group joining requests sent by each of the multiple receiving devices.
[0065] For details of this step, please refer to step 101 above, which will not be repeated here.
[0066] Optionally, multiple receiving devices are connected to the first router respectively to obtain multiple multicast group joining requests sent by the first router; the multicast group requests are sent by the receiving devices to the first router.
[0067] In this system, the first router acts as an access layer device, collecting multicast group joining requests sent by the receiving devices, and each first router forwards the multicast group joining requests to the first core server.
[0068] Step 302: The first core server parses the multicast group identifier from the request to join the multicast group.
[0069] Step 303: The first core server determines the multicast group based on the multicast group identifier.
[0070] Step 304: The first core server determines the second core server corresponding to the multicast group based on the mapping relationship between the multicast group and the multicast tunnel, and sends the request to join the multicast group to the second core server.
[0071] For steps 302-304, the multicast group join request carries a multicast group identifier so that the core server receiving the join multicast group request can determine which multicast group the receiving device wants to join. Each multicast group corresponds to a unique identifier.
[0072] It's important to clarify that the mapping between multicast groups and multicast tunnels refers to the mapping between the multicast group and the core servers at the multicast tunnel's entry point. The core server corresponding to the tunnel's entry point for each multicast group is pre-specified, and each core server knows which core server is the tunnel's entry point for that multicast group. Each core server pre-stores globally reachable paths, thus, given that the core server at the tunnel's entry point is determined, it can identify all the core servers between that second core server and the tunnel's entry point, thereby determining the second core server corresponding to that multicast group.
[0073] Step 305: The second core server receives the request to join the multicast group sent by the first core server.
[0074] Step 306: The second core server constructs a multicast tunnel between the sending device and the receiving device based on the request to join the multicast group and the network topology, and adds the receiving device to the multicast group.
[0075] Step 307: The second core server receives the data stream sent to the multicast group by the sending device or other second core servers through the multicast tunnel;
[0076] Steps 305-307 can be referred to in detail to steps 201-203 above, and will not be repeated here.
[0077] Optionally, the sending device is connected to the second router, and receiving the data stream sent to the multicast group by the sending device or other second core server through the multicast tunnel includes:
[0078] Receive data packets sent to the multicast group by the second router or other second core server; the data packets are encapsulated by the second router.
[0079] The data stream directly sent by the sending device is encapsulated by a second router. This encapsulated data packet carries a multicast group identifier, enabling the core server receiving the packet to determine which multicast group and tunnel the packet should be transmitted through. The purpose of encapsulation is not only to allow the core server to identify the packet's destination, but also to encapsulate the original multicast data stream into a unicast tunnel format to solve cross-domain transmission problems, and to maintain compatibility with the underlying network by disguising the multicast data stream as a unicast stream.
[0080] Step 308: The second core server sends the data stream to the first core server through the multicast tunnel.
[0081] For details of this step, please refer to step 204 above, which will not be repeated here.
[0082] Optionally, step 308 may specifically include:
[0083] Sub-step 3081: The second core server determines the next-hop device of the second core server; the next-hop device is the device that is the next transmission node of the second core server in the network topology.
[0084] Sub-step 3082: The second core server replicates the data stream according to the number of next-hop devices.
[0085] Sub-step 3083: If the next-hop device is the first core server, the second core server sends the replicated data stream to the first core server through the physical port; if the next-hop device is another second core server, the second core server transmits the replicated data stream to the other second core server through the physical port.
[0086] For sub-steps 3081-3083, each core server establishes a multicast forwarding state during the creation of a multicast tunnel, recording the downstream devices of the current core server. When the current core server receives a data stream from an upstream device, it determines the downstream device based on the multicast forwarding state. Since a multicast tunnel is a tree-structured logical channel, replication occurs at branch points, meaning replication is based on the number of next-hop devices for the current server. The number of next-hop devices determines the number of tunnel branches in the multicast tunnel. For example, if the next hop is three first core servers, the current second core server will replicate the original data stream into three copies.
[0087] If the next-hop device is the primary core server, the primary core server performs edge distribution, which means replicating the data based on the number of receiving devices it has connected to and sending it to each receiving device. If the next-hop device is another secondary core server, the other secondary core server continues to perform the same operation as the current secondary core server, transmitting the data to the remote area of the multicast tunnel until it reaches the receiving device.
[0088] Step 309: The first core server receives the data stream sent by the second core server through the multicast tunnel;
[0089] Step 310: The first core server copies the data stream into multiple streams according to the number of receiving devices, and sends the copied multiple data streams to their respective receiving devices.
[0090] Steps 309 and 310 can be referred to in detail in steps 103 and 104 above, and will not be repeated here.
[0091] Optionally, the first core server copies the data stream into multiple streams according to the number of receiving devices, and sends the copied multiple data streams to the first router corresponding to the receiving device, so that the first router sends the data stream to the receiving device.
[0092] Optionally, the data stream is an encapsulated data packet; the step of sending the copied multiple data streams to the router corresponding to the receiving device, so that the router sends the data stream to the receiving device, includes:
[0093] The copied multi-channel data packets are sent to the router corresponding to the receiving device, so that the router can decapsulate the data packets to obtain a data stream, and send the data stream to the receiving device.
[0094] like Figure 5 The illustrated data transmission system is based on a multicast tunnel. Each receiving device connects to the core server through a corresponding router. Requests to join a multicast group sent by the receiving device are forwarded by the router to the first core server. Similarly, when the first core server sends a data stream to the receiving device, it first sends the data stream to the router, which then forwards it to the receiving device. The router also decapsulates the encapsulated data packets, stripping the transmission header to restore the original data stream, which is then sent to the receiving device.
[0095] It should be noted that the encapsulation rules of the router directly connected to the sending device and the decapsulation rules of the router directly connected to the receiving device are corresponding.
[0096] In this embodiment, data stream encapsulation via routers enables cross-domain multicast support. The second core server at the core layer replicates the data stream based on the number of next-hop devices, rather than the number of receiving devices, reducing core network bandwidth consumption. The first core server at the edge layer replicates the data stream based on the number of receiving devices, preventing traffic from multiple receiving devices from overwhelming the main network and reducing the risk of access network congestion.
[0097] Reference Figure 4 The diagram illustrates an interactive step flowchart of another data transmission method based on a multicast tunnel according to the present invention, which may specifically include the following steps:
[0098] Step 401: The first core server obtains the multicast group joining requests sent by each of the multiple receiving devices.
[0099] Step 402: The first core server parses the multicast group identifier from the request to join the multicast group.
[0100] Step 403: The first core server determines the multicast group based on the multicast group identifier.
[0101] Steps 401-403 can be referred to in detail as steps 301-303 above, and will not be repeated here.
[0102] Step 404: The first core server determines the second core server corresponding to the root node in the tree structure as the aggregation point server.
[0103] Step 405: The first core server determines the routing path between the first core server and the aggregation point server based on the network topology.
[0104] Step 406: The first core server determines the second core server between the first core server and the aggregation point server as the second core server corresponding to the multicast group based on the routing path.
[0105] Regarding steps 404-406, it should be noted that the multicast tunnel is a tree structure. A pre-defined and built-in mapping relationship between multicast groups and their corresponding root nodes can be established. The root node is the second core server at the entry point of the sending device, i.e., the second core server at the multicast tunnel entry point. When the first core server receives a request to join a multicast group, it parses the multicast group identifier from the request, determines the multicast group based on the identifier, and determines the root node based on the mapping relationship between the multicast group and the root node. The root node is the core server where other second core servers converge.
[0106] The first core server reads the global network topology according to the video network protocol and executes a routing algorithm to calculate the optimal path between the first core server and the aggregation server. For example, Dijkstra's algorithm is used to calculate the shortest path from the first core server to the aggregation server. Second core servers are extracted from the path excluding the origin and destination. Following a preset selection strategy, the upstream second core server adjacent to the first core server is selected from among multiple second core servers; that is, the next second core server to which the first core server will send its multicast group joining request. The selection strategy can be based on proximity, choosing the node closest to the first core server; or it can be based on load balancing, selecting the core server with the lowest load if multiple paths exist.
[0107] Step 407: The first core server sends the request to join the multicast group to the second core server.
[0108] Step 408: The second core server determines the root node of the tree structure based on the multicast group request.
[0109] Step 409: The second core server determines the other second core servers between the root node and the second core server based on the network topology.
[0110] Step 410: The second core server constructs a multicast tunnel between the sending device and the receiving device based on the root node server and each of the second core servers; each of the second core servers is a node in the tree structure.
[0111] Regarding steps 407-410, upon receiving a request to join a multicast group, the second core server determines the second core server at the multicast tunnel entrance, i.e., the root node of the tree structure, based on the pre-defined and built-in mapping relationship between multicast groups and their corresponding root nodes. The second core server then executes a routing algorithm based on the root node address, the current second core server address, and the global network topology to determine the routing path between itself and the aggregation point server. From the routing path, it extracts second core servers other than the origin and destination nodes. Following a preset selection strategy, it selects the adjacent upstream second core server from among the multiple second core servers—that is, the next second core server to which the second core server will send the join multicast group request. The selection strategy can be based on proximity, choosing the node closest to the first core server; or it can be based on load balancing, selecting the core server with the lowest load if multiple paths exist.
[0112] For example, the sending device is a Beijing studio, the receiving device is a Nanjing user, the multicast group identifier is V2V-MCAST-005, and the root node corresponding to this multicast group is pre-specified as the Beijing core server. The first core server directly connected to by the receiving device is the Nanjing core server. The Nanjing user sends a join request carrying the multicast group identifier to the first core server. Upon receiving the request from the Nanjing user, the first core server determines that the root node corresponding to this multicast group is the Beijing core server and calculates the shortest path between the Nanjing core server and the Beijing core server based on the global network topology. The shortest path is a direct connection between the Nanjing core server and the Beijing core server, without any intermediate forwarding nodes. The Nanjing core server then sends the join request to the Beijing core server. Upon receiving the join request, the Beijing core server determines that its own root node is itself and stops transmitting join requests upwards.
[0113] Step 411: The second core server receives the data stream sent to the multicast group by the sending device or other second core servers through the multicast tunnel.
[0114] Step 412: The second core server sends the data stream to the first core server through the multicast tunnel.
[0115] Step 413: The first core server receives the data stream sent by the second core server through the multicast tunnel; the data stream is provided by the sending device.
[0116] Step 414: The first core server copies the data stream into multiple streams according to the number of receiving devices, and sends the copied multiple data streams to their respective receiving devices.
[0117] Steps 411-414 can be referred to in detail to steps 307-310 above, and will not be repeated here.
[0118] Optionally, step 414 may specifically include:
[0119] Sub-step 4141: Determine the physical port through which the first core server sends the data stream to the receiving device according to the entry corresponding to the multicast group in the first core server; the entry records the correspondence between the multicast group and the physical port;
[0120] Sub-step 4142: Send the copied multiple data streams to their respective receiving devices through the physical port.
[0121] Regarding sub-steps 4141 and 4142, it should be noted that the essence of each entry is a mapping table between multicast groups and ports, recording the multicast group identifier, physical port, number of receivers, and the current working status of the core server. When a downstream core server sends a join multicast group request upwards, triggering the construction of a multicast tunnel, it records the physical port on which the current core server receives the join multicast group request, as well as the multicast group identifier carried in the multicast group request and the number of receiver devices. The working status refers to whether the current core server is in a normally active state or an abnormally idle state.
[0122] As described above, the process of constructing a multicast tunnel in this embodiment is a bottom-up, progressive process. The receiving device sends a request to join the multicast group to the first core server. The first core server then determines the next core server to receive the request, and so on, until a pre-specified root node is identified. During the forwarding of the multicast group join request, the first and second core servers record the multicast group identifier, their downstream devices, and the physical ports corresponding to the data streams sent to downstream devices, thus adding each core server to the multicast tunnel and completing its construction.
[0123] Optionally, the method further includes:
[0124] Step A11: Upon receiving the request to join the multicast group, query whether there is an entry corresponding to the multicast group in the first core server;
[0125] Step A12: If no entry exists for the multicast group, create an entry for the multicast group based on the multicast group request and the physical port that received the request to join the multicast group.
[0126] Step A13: If an entry corresponding to the multicast group exists, update the entry corresponding to the multicast group according to the multicast group request and the physical port that received the request to join the multicast group.
[0127] Regarding steps A11-A13, it should be noted that when the core server receives a join request for a multicast group for the first time, a new entry is created, recording the multicast group identifier and the physical port from which the request originated. When the core server receives requests for the same multicast group, the physical port and the number of receivers are added to the existing entry. Similarly, when a receiver device leaves the multicast group, the corresponding physical interface is deleted from the existing entry, and the number of receiver devices is reduced.
[0128] In this embodiment, the receiving device sends a request to join the multicast group, triggering the construction of a multicast tunnel. The first core server and the second core server construct the multicast tunnel from bottom to top. After the multicast tunnel is constructed, the data stream sent by the sending device is transmitted from top to bottom along the multicast tunnel until it reaches the receiving device. The data stream is only replicated on the first core server directly connected to by the receiving device according to the number of receiving devices, reducing the occupancy of global network bandwidth and improving data transmission efficiency.
[0129] Reference Figure 6 The diagram illustrates a structural block diagram of a data transmission device based on a multicast tunnel according to the present invention, applied to a first core server, and specifically may include the following modules:
[0130] The request acquisition module 610 is used to acquire the multicast group joining requests sent by each of the multiple receiving devices.
[0131] The request sending module 620 is used to send the request to join the multicast group to the second core server, so that the second core server can construct a multicast tunnel between the sending device and the receiving device according to the request to join the multicast group and the network topology, and add the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices;
[0132] The first receiving module 630 is used to receive a data stream sent by the second core server through the multicast tunnel; the data stream is provided by the sending end device.
[0133] The copying module 640 is configured to copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.
[0134] Optionally, the request sending module includes:
[0135] The parsing module is used to parse the multicast group identifier from the request to join the multicast group;
[0136] The determination module is used to determine the multicast group based on the multicast group identifier;
[0137] The sending submodule is used to determine the second core server corresponding to the multicast group based on the mapping relationship between the multicast group and the multicast tunnel, and send the request to join the multicast group to the second core server.
[0138] Optionally, the sending submodule includes:
[0139] The aggregation point determination module is used to determine the second core server corresponding to the root node in the tree structure as the aggregation point server;
[0140] The path determination module is used to determine the routing path between the first core server and the aggregation point server based on the network topology.
[0141] The server determination module is used to determine, based on the routing path, the second core server between the first core server and the aggregation point server as the second core server corresponding to the multicast group.
[0142] Optionally, the replication module includes:
[0143] The port determination module is used to determine the physical port through which the first core server sends data streams to the receiving device, according to the entries corresponding to the multicast groups in the first core server; the entries record the correspondence between the multicast groups and the physical ports.
[0144] The first replication submodule is used to send the replicated multiple data streams to their respective corresponding receiving devices through the physical port.
[0145] Optionally, the device further includes:
[0146] The query entry module is used to query whether there is an entry corresponding to the multicast group in the first core server when the request to join the multicast group is received.
[0147] An entry creation module is used to create an entry corresponding to the multicast group based on the multicast group request and the physical port that received the request to join the multicast group, when no entry corresponding to the multicast group exists.
[0148] The entry update module is used to update the entry corresponding to the multicast group based on the multicast group request and the physical port that received the request to join the multicast group, when an entry corresponding to the multicast group exists.
[0149] Optionally, the request acquisition module includes:
[0150] The acquisition submodule is used to acquire multiple multicast group join requests sent by the first router; the multicast group requests are sent to the first router by the receiving device.
[0151] Optionally, the replication module includes:
[0152] The second replication submodule is used to send the replicated multiple data streams to the first router corresponding to the receiving device, so that the first router sends the data streams to the receiving device.
[0153] Optionally, the second copy submodule includes:
[0154] The decapsulation module is used to send the copied multi-channel data packets to the router corresponding to the receiving device, so that the router can decapsulate the data packets to obtain a data stream and send the data stream to the receiving device.
[0155] In summary, the data transmission apparatus based on a multicast tunnel provided in this application can acquire multicast group joining requests sent by multiple receiving devices; send the multicast group joining requests to a second core server, so that the second core server constructs a multicast tunnel between the sending and receiving devices according to the multicast group joining requests and the network topology, and adds the receiving devices to the multicast group; receive the data stream sent by the second core server through the multicast tunnel; and replicate the data stream into multiple paths according to the number of receiving devices, and send the replicated multiple data streams to their respective corresponding receiving devices. By replicating the data stream through a first core server directly connected to the receiving devices, the bandwidth occupancy of the core network area is reduced, and the efficiency of data transmission is improved.
[0156] Reference Figure 7 The diagram illustrates a structural block diagram of a data transmission device based on a multicast tunnel according to the present invention, applied to a second core server, and specifically may include the following modules:
[0157] The request receiving module 710 is used to receive a request to join a multicast group sent by the first core server; the request to join a multicast group is provided by the receiving device.
[0158] A tunnel construction module 720 is used to construct a multicast tunnel between the sending end device and the receiving end device according to the request to join the multicast group and the network topology, and to add the receiving device to the multicast group;
[0159] The second receiving module 730 is used to receive data streams sent to the multicast group by the sending end device or other second core server through the multicast tunnel;
[0160] The data stream sending module 740 is used to send the data stream to the first core server through the multicast tunnel, so that the first core server can copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.
[0161] Optionally, the tunnel construction module includes:
[0162] A node determination module is used to determine the root node of the tree structure based on the multicast group request.
[0163] The second server determination module is used to determine other second core servers between the root node and the second core server based on the network topology.
[0164] A submodule is constructed to build a multicast tunnel between the sending device and the receiving device based on the root node server and each of the second core servers; each of the second core servers is a node in the tree structure.
[0165] Optionally, the data stream transmission module includes:
[0166] The device determination module is used to determine the next-hop device of the second core server; the next-hop device is the device that is the next transmission node of the second core server in the network topology.
[0167] A data stream replication module is used to replicate the data stream according to the number of next-hop devices;
[0168] The first sending submodule is used to send the replicated data stream to the first core server through the physical port when the next-hop device is the first core server;
[0169] The second sending submodule is used to transmit the copied data stream to the other second core server through the physical port when the next-hop device is another second core server.
[0170] In summary, the data transmission device based on a multicast tunnel provided in this application can receive a request to join a multicast group sent by a first core server; construct a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and add the receiving device to the multicast group; receive data streams sent to the multicast group by the sending device or other second core servers through the multicast tunnel; and send the data streams to the first core server through the multicast tunnel, so that the first core server can replicate the data streams into multiple paths according to the number of receiving devices, and send the replicated multiple data streams to their respective corresponding receiving devices, thereby reducing the bandwidth occupancy of the core network area and improving the efficiency of data transmission.
[0171] The data transmission device based on multicast tunnels in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a GPU BOX, mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific implementation.
[0172] The data transmission device based on multicast tunnels provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0173] Optionally, such as Figure 8 As shown in the figure, this application embodiment also provides an electronic device, including a processor and a memory. The memory stores a program or instructions that can run on the processor. When the program or instructions are executed by the processor, they implement the various steps of the above-described data transmission method embodiment based on multicast tunnel and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0174] In embodiments of this application, the memory can be used to store software programs and various data. The memory may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0175] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.
[0176] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described data transmission method embodiments based on multicast tunnels and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0177] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0178] This application provides a computer program product stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-described multicast tunnel-based data transmission method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0179] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0180] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0181] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A data transmission method based on multicast tunnels, characterized in that, Applied to a first core server, which is connected to multiple receiving devices, the method includes: Obtain the multicast group joining requests sent by each of the multiple receiving devices; The request to join the multicast group is sent to the second core server, so that the second core server can construct a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and add the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices; The data stream sent by the second core server is received through the multicast tunnel; the data stream is provided by the sending device. According to the number of receiving devices, the data stream is copied into multiple streams, and the copied multiple data streams are sent to their respective receiving devices.
2. The method according to claim 1, characterized in that, Sending the request to join the multicast group to the second core server includes: The multicast group identifier is parsed from the request to join the multicast group; The multicast group is determined based on the multicast group identifier; Based on the mapping relationship between the multicast group and the multicast tunnel, the second core server corresponding to the multicast group is determined, and the request to join the multicast group is sent to the second core server.
3. The method according to claim 2, characterized in that, The multicast tunnel has a tree structure; determining the second core server corresponding to the multicast group based on the mapping relationship between the multicast group and the second core server includes: The second core server corresponding to the root node in the tree structure is determined as the aggregation point server; Based on the network topology, determine the routing path between the first core server and the aggregation point server; Based on the routing path, the second core server between the first core server and the aggregation point server is determined to be the second core server corresponding to the multicast group.
4. The method according to claim 1, characterized in that, The step of sending the copied multiple data streams to their respective corresponding receiving devices includes: According to the entry corresponding to the multicast group in the first core server, determine the physical port through which the first core server sends the data stream to the receiving device; the entry records the correspondence between the multicast group and the physical port; The copied multiple data streams are sent to their respective receiving devices via the physical port.
5. The method according to claim 4, characterized in that, The method further includes: Upon receiving the request to join the multicast group, query whether there is an entry for the multicast group in the first core server; If no entry exists for the multicast group, create an entry for the multicast group based on the multicast group request and the physical port that received the request to join the multicast group; If an entry for the multicast group exists, the entry for the multicast group is updated according to the multicast group request and the physical port that received the request to join the multicast group.
6. The method according to claim 1, characterized in that, The plurality of receiving devices are respectively connected to the first router, and the step of obtaining the multicast group joining request sent by each of the plurality of receiving devices includes: Receive multiple join multicast group requests sent by the first router; the multicast group requests are sent from the receiving device to the first router; The step of sending the copied multiple data streams to their respective corresponding receiving devices includes: The copied multiple data streams are sent to the first router corresponding to the receiving device, so that the first router sends the data streams to the receiving device.
7. The method according to claim 6, characterized in that, The data stream is an encapsulated data packet; the step of sending the copied multiple data streams to the router corresponding to the receiving device, so that the router sends the data stream to the receiving device, includes: The copied multi-channel data packets are sent to the router corresponding to the receiving device, so that the router can decapsulate the data packets to obtain a data stream, and send the data stream to the receiving device.
8. A data transmission method based on multicast tunnels, characterized in that, Applied to a second core server, the method includes: Receive a request to join a multicast group sent by the first core server; the request to join a multicast group is provided by the receiving device. Based on the request to join the multicast group and the network topology, a multicast tunnel is constructed between the sending device and the receiving device, and the receiving device is added to the multicast group; The multicast tunnel receives data streams sent to the multicast group by the sending device or other second core server. The data stream is sent to the first core server through the multicast tunnel, so that the first core server can replicate the data stream into multiple streams according to the number of receiving devices, and send the replicated multiple data streams to their respective corresponding receiving devices.
9. The method according to claim 8, characterized in that, The multicast tunnel has a tree structure; the construction of the multicast tunnel between the sending device and the receiving device based on the multicast group joining request and the network topology includes: The root node of the tree structure is determined based on the multicast group request; Based on the network topology, other second core servers between the root node and the second core server are determined; Based on the root node server and each of the second core servers, a multicast tunnel is constructed between the sending device and the receiving device; each of the second core servers is a node in the tree structure.
10. The method according to claim 8, characterized in that, Sending the data stream to the first core server through the multicast tunnel includes: Determine the next-hop device of the second core server; the next-hop device is the device that is the next transmission node of the second core server in the network topology. The data stream is copied according to the number of next-hop devices; If the next-hop device is the first core server, the replicated data stream is sent to the first core server through the physical port; If the next-hop device is another second core server, the replicated data stream is transmitted to the other second core server through the physical port.
11. The method according to claim 8, characterized in that, The sending device is connected to the second router, and the step of receiving the data stream sent to the multicast group by the sending device or other second core server through the multicast tunnel includes: Receive data packets sent to the multicast group by the second router or other second core server; the data packets are encapsulated by the second router.
12. A data transmission device based on a multicast tunnel, characterized in that, The device is applied to a first core server, which is connected to multiple receiving devices, and includes: The request acquisition module is used to acquire the multicast group joining requests sent by each of the multiple receiving devices; The request sending module is used to send the request to join the multicast group to the second core server, so that the second core server can construct a multicast tunnel between the sending device and the receiving device according to the request and the network topology, and add the receiving device to the multicast group; the network topology includes a first core server, a second core server, a sending device, and multiple receiving devices; The first receiving module is used to receive a data stream sent by the second core server through the multicast tunnel; the data stream is provided by the sending end device. The copying module is used to copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.
13. A data transmission device based on a multicast tunnel, characterized in that, The device, applied to a second core server, includes: The request receiving module is used to receive a request to join a multicast group sent by the first core server; the request to join a multicast group is provided by the receiving device. A tunnel construction module is used to construct a multicast tunnel between the sending device and the receiving device based on the request to join the multicast group and the network topology, and to add the receiving device to the multicast group; The second receiving module is used to receive data streams sent to the multicast group by the sending end device or other second core server through the multicast tunnel; The data stream sending module is used to send the data stream to the first core server through the multicast tunnel, so that the first core server can copy the data stream into multiple streams according to the number of receiving devices, and send the copied multiple data streams to their respective corresponding receiving devices.