Multicast port number allocation method and apparatus, device, storage medium, and program product
By automatically assigning multicast port numbers by carrying SID identifiers in multicast messages, the problem of difficult port number allocation in multicast scenarios is solved, realizing dynamic allocation and efficient utilization of multicast port numbers, and adapting to the needs of different multicast receiving nodes.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CHINA MOBILE COMM LTD RES INST
- Filing Date
- 2025-09-28
- Publication Date
- 2026-05-15
AI Technical Summary
In multicast scenarios, dynamically allocating multicast port numbers is extremely difficult. It is impossible to confirm whether the port numbers of all multicast receiving nodes that want to join the multicast group are occupied by other applications or services, resulting in low utilization of port number resources.
By carrying the first SID in the multicast message to identify the automatically assigned multicast port number, the multicast receiving node can flexibly and dynamically allocate unused port numbers as the receiving port numbers for the multicast message, decoupling the destination port number carried in the multicast message from the actual receiving port number used, thus achieving dynamic allocation.
It improves the utilization rate of port numbers in multicast scenarios, avoids the waste of port number resources, and adapts to the personalized allocation needs of different multicast receiving nodes.
Smart Images

Figure CN2025124815_15052026_PF_FP_ABST
Abstract
Description
Multicast port number allocation methods, devices, equipment, storage media, and software products
[0001] Cross-reference to related applications
[0002] This application is based on and claims priority to Chinese Patent Application No. 202411586305.5, filed on November 7, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of communication technology, and in particular to a method, apparatus, device, storage medium, and program product for allocating multicast port numbers. Background Technology
[0004] Port numbers are a limited resource, so they need to be used effectively. For unicast services, port numbers are often dynamically allocated. However, for multicast services, dynamic port allocation becomes significantly more difficult because it's impossible to confirm that the ports of all multicast receiving nodes joining the multicast group are not already occupied by other applications or services. Therefore, the method for dynamically allocating port numbers in multicast scenarios needs further improvement. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a multicast port number allocation method, a terminal device, a network device, a chip, and a computer-readable storage medium.
[0006] The multicast port number allocation method provided in this application includes:
[0007] The first node receives a multicast message carrying a first segment ID (SID), which is used to identify the automatically assigned multicast port number.
[0008] The first node assigns a first receiving port number to the multicast message based on the first SID.
[0009] The multicast port number allocation method provided in this application includes:
[0010] The second node receives a multicast message carrying a first SID, which is used to identify the automatically assigned multicast port number.
[0011] The second node queries the second mapping table based on the first SID and modifies the destination port number in the multicast message to the receiving port number obtained from the table lookup.
[0012] The second node sends the modified multicast message.
[0013] The multicast port number allocation method provided in this application includes:
[0014] The third node carries a first SID in the multicast message, which is used to identify the automatically assigned multicast port number.
[0015] The third node sends a multicast message carrying the first SID.
[0016] The multicast port number allocation device provided in this application is applied to a first node, and the device includes:
[0017] The first communication unit is configured to receive multicast messages carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number;
[0018] The first processing unit is configured to allocate a first receiving port number to the multicast message based on the first SID.
[0019] The multicast port number allocation device provided in this application is applied to a second node, and the device includes:
[0020] The second communication unit is configured to receive multicast messages carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number;
[0021] The second processing unit is configured to query a second mapping table based on the first SID and modify the destination port number in the multicast message to the receiving port number obtained by querying the table.
[0022] The second communication unit is also used to send the modified multicast message.
[0023] The multicast port number allocation device provided in this application is applied to a third node, and the device includes:
[0024] The third processing unit is configured to carry a first SID in the multicast message, the first SID being used to identify the automatically assigned multicast port number;
[0025] The third communication unit is configured to send a multicast message carrying the first SID.
[0026] The communication device provided in this application includes a processor and a memory, the memory being used to store computer programs, and the processor being used to call and run the computer programs stored in the memory to execute any of the multicast port number allocation methods described above.
[0027] The computer-readable storage medium provided in this application is used to store a computer program that causes a computer to execute any of the above-described multicast port number allocation methods.
[0028] The computer program product provided in this application includes computer program instructions that cause a computer to execute any of the above-described multicast port number allocation methods.
[0029] In the technical solution of this application, by carrying a first SID in the multicast message to identify the automatically allocated multicast port number, the multicast receiving node can flexibly and dynamically allocate unused port numbers as the receiving port number of the multicast message. Each multicast receiving node does not have to be forced to use the same receiving port number. The destination port number carried in the multicast message is decoupled from the receiving port number actually used by the multicast receiving node, thus achieving the purpose of dynamically allocating port numbers in multicast scenarios. Attached Figure Description
[0030] Figure 1 is a schematic diagram of the SRv6 message format;
[0031] Figure 2 is a schematic diagram of the SID format;
[0032] Figure 3 is a flowchart illustrating the multicast port number allocation method provided in an embodiment of this application.
[0033] Figure 4 is a flowchart illustrating the multicast port number allocation method provided in an embodiment of this application.
[0034] Figure 5 is a flowchart illustrating the multicast port number allocation method provided in this application embodiment.
[0035] Figure 6 is a flowchart of application example one of this application;
[0036] Figure 7 is a flowchart of application example two of this application;
[0037] Figure 8 is a flowchart of application example three of this application;
[0038] Figure 9 is a flowchart of application example four of this application;
[0039] Figure 10 is a schematic diagram of the structure of the multicast port number allocation device provided in an embodiment of this application;
[0040] Figure 11 is a schematic diagram of the structure of the multicast port number allocation device provided in an embodiment of this application;
[0041] Figure 12 is a schematic diagram of the structure of the multicast port number allocation device provided in the embodiment of this application.
[0042] Figure 13 is a schematic structural diagram of a communication device provided in an embodiment of this application;
[0043] Figure 14 is a schematic structural diagram of a chip according to an embodiment of this application. Detailed Implementation
[0044] It should be noted that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship. It should also be understood that "indication" mentioned in this article can be direct indication, indirect indication, or an indication of a related relationship. For example, A indicating B can mean that A directly indicatives B, for example, B can be obtained through A; it can also mean that A indirectly indicatives B, for example, A indicatives C, B can be obtained through C; or it can mean that there is a related relationship between A and B.
[0045] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application will be described below.
[0046] 1. Port
[0047] In the unicast transmission control protocol / internet protocol (TCP / IP) communication process, for the same TCP connection or user datagram protocol (UDP) connection, the source IP address and destination IP address are the same, but different services are distinguished by different port numbers, as shown in Table 1 below. Table 1 lists the port numbers corresponding to several services.
[0048] Table 1. Port Numbers Corresponding to Different Services
[0049] Port numbers can be categorized into the following three types:
[0050] 1) Well-known Ports: Well-known port numbers are port numbers that are widely recognized and assigned to specific services. Examples include the port numbers for HTTP and FTP services. The range of well-known port numbers is 0-1023.
[0051] 2) Registered Ports: Registered port numbers cannot be dynamically adjusted. These port numbers do not explicitly define which specific objects are served. Different programs can define their own registered port numbers according to their needs. The range of registered port numbers is 1024-49151.
[0052] 3) Dynamic, private, or ephemeral port numbers: Dynamic, private, or ephemeral port numbers cannot be registered. These port numbers are used for some private or customized services, and can also be used for dynamic port services. The range of dynamic, private, or ephemeral port numbers is: 49152-65535.
[0053] Port numbers are a valuable resource. For unicast services, port numbers are often allocated dynamically. However, for multicast services, dynamic allocation of port numbers becomes extremely difficult because it is impossible to confirm whether the specific port numbers of all multicast receiving nodes that need to join the multicast group are already occupied by other applications or services.
[0054] IPTV, real-time data transmission, and multimedia conferencing are typical application scenarios for multicast. According to the current multicast interaction process, when a multicast source pushes a multicast service stream, it needs to specify the multicast IP address and multicast UDP port number. However, using both multicast IP addresses and multicast UDP port numbers to differentiate multicast services is redundant. Taking IPTV as an example, different TV channels (i.e., services) generally use different multicast IP addresses, so the multicast UDP port number is not actually very important (or rather, it's not necessary to use the multicast UDP port number to differentiate different services).
[0055] 2. SRv6
[0056] SRv6 enables IPv6-based segment routing by inserting a Segment Routing Header (SRH) into Internet Protocol Version 6 (IPv6) messages.
[0057] Figure 1 illustrates the format of an SRv6 packet. As shown in Figure 1, an SRv6 packet includes an IPv6 header, a Segment Routing Header (SRH), and an IPv6 payload. The SRH includes a Segment List, which consists of a set of Segment IDs (SIDs). The Segment List can also be understood as a list of SIDs. In Figure 1, Segment List [0], Segment List [1], ..., Segment List [n] each represent a SID. Optionally, the SRH also includes a Type Length Value (TLV) field, the length of which is variable. The SID list in the SRH represents path information used to guide packet forwarding. In SRH, the SID list is arranged in order of the nodes on the packet forwarding path from farthest to nearest. That is, segment list [0] represents the SID of the last node on the path, segment list [1] represents the SID of the second to last node on the path, and so on, segment list [n] represents the SID of the first node on the path.
[0058] The SID in SRH uses a 128-bit IPv6 address format and can be called an SRv6 SID.
[0059] Figure 2 illustrates the format of a SID. As shown in Figure 2, a SID consists of a Locator, a Function, and Arguments, where Arguments are optional.
[0060] A Locator is an identifier assigned to a node for routing and forwarding service packets. The length of a Locator is variable to accommodate networks of different sizes.
[0061] Functions are used to identify the forwarding / processing behaviors that a node should perform; different forwarding / processing behaviors are expressed by different Functions.
[0062] Argument is an optional field used to carry parameters required when a node performs a transfer / processing behavior.
[0063] An SRv6 service path (or simply service path) includes the following nodes: a head node, one or more intermediate nodes (i.e., forwarding nodes), and a tail node. When the head node receives a service packet (i.e., an IPv6 packet) from the user, it inserts an SRH (Segment Redirect) into the packet according to the SR policy, forming an SRv6 packet, and then sends the SRv6 packet to the next-hop node. Each intermediate node, upon receiving an SRv6 packet, updates the destination address in the IPv6 header and the segment left (SL) in the SRH to complete hop-by-hop forwarding of the packet.
[0064] To facilitate understanding of the technical solutions of the embodiments of this application, the technical solutions of this application are described in detail below through specific embodiments. The above-mentioned related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0065] It should be noted that the port number described in the embodiments of this application refers to the UDP port number.
[0066] It should be noted that the first SID described in this application embodiment is a novel SID, which is used to identify the automatically allocated multicast port number. The first SID includes a Location field and a Function field, and optionally, an Argument field. The Function field is used to identify the first processing action of the multicast packet, which is the automatic allocation of a multicast port. As shown in Table 2 below, Table 2 lists the meanings of different Function fields. This application embodiment proposes a new Function (i.e., End.MTP) to modify the multicast destination port number by looking up the port mapping table at the edge egress network node or each multicast receiving node, and to update the port mapping table to prevent the new port mapping table from aging. The construction of the port mapping table can be triggered by the first received multicast packet in Mode 1, and by protocol extensions such as IGMP in Mode 2. In this application embodiment, the Function in the first SID is End.MTP, used to identify the processing action of automatically allocating a multicast port number. In some implementations, the first SID can also be described as the automatically allocated SID for multicast ports (e.g., End.MTP sid).
[0067] Table 2. Description of the meaning of different functions
[0068] It should be noted that the technical solution of this application embodiment is applied to a multicast scenario, which involves the following communication nodes: multicast source, edge ingress network node, intermediate network node (optional), edge egress network node, and multicast receiving node (or multicast receiver). The multicast receiving node refers to the receiving node (or member) in the multicast group, and the number of multicast receiving nodes is N, where N is a positive integer. The transmission path of the multicast message is: multicast source → edge ingress network node → intermediate network node (optional) → edge egress network node → multicast receiving node.
[0069] Figure 3 is a flowchart illustrating the multicast port number allocation method provided in this embodiment of the application. As shown in Figure 3, the multicast port number allocation method includes the following steps:
[0070] Step 301: The first node receives a multicast message carrying the first SID, which is used to identify the automatically assigned multicast port number.
[0071] Step 302: The first node assigns a first receiving port number to the multicast message based on the first SID.
[0072] In this embodiment of the application, the first node is a multicast receiving node.
[0073] In some implementations, the first SID is carried in the multicast message by the multicast source node. In other implementations, the first SID is carried in the multicast message by the edge ingress network node.
[0074] In this embodiment, the first SID includes a Location field and a Function field, and optionally, an Argument field. The Function field is used to identify the following processing behavior of the multicast message: automatic multicast port allocation. In some implementations, the Function field is End.MTP, and correspondingly, the first SID is the automatically assigned SID for the multicast port (e.g., End.MTP sid).
[0075] In this embodiment, after parsing the first SID from the multicast message, the first node allocates a first receiving port number to the multicast message (or the multicast service corresponding to the multicast message). It should be noted that the first receiving port number is dynamically allocated by the first node for the multicast message (or multicast service). The first node can allocate idle (or not occupied by other applications or services) port numbers to the multicast message (or multicast service). After the multicast message (or multicast service) transmission ends, the first node releases the allocated port number, thereby improving the utilization rate of the port number.
[0076] It should be noted that different multicast receiving nodes may be assigned different receiving port numbers.
[0077] In some implementations, the first node maintains a first mapping table, which includes a mapping between the destination port number carried in the multicast message and the first receiving port number. Here, the first mapping table can also be described as a port mapping table. Each multicast receiving node maintains a port mapping table, which includes a mapping between the destination port number carried in the multicast message and the receiving port number assigned to that multicast receiving node.
[0078] Figure 4 is a second flowchart illustrating the multicast port number allocation method provided in this application embodiment. As shown in Figure 4, the multicast port number allocation method includes the following steps:
[0079] Step 401: The second node receives a multicast message carrying the first SID, which is used to identify the automatically assigned multicast port number.
[0080] Step 402: The second node queries the second mapping table based on the first SID and modifies the destination port number in the multicast message to the receiving port number obtained from the table lookup.
[0081] Step 403: The second node sends the modified multicast message.
[0082] In this embodiment, the second node is an edge exit network node.
[0083] In some implementations, the first SID is carried in the multicast message by the multicast source node. In other implementations, the first SID is carried in the multicast message by the edge ingress network node.
[0084] In this embodiment, the first SID includes a Location field and a Function field, and optionally, an Argument field. The Function field is used to identify the following processing behavior of the multicast message: automatic multicast port allocation. In some implementations, the Function field is End.MTP, and correspondingly, the first SID is the automatically assigned SID for the multicast port (e.g., End.MTP sid).
[0085] In this embodiment, the second node obtains the receiving port numbers allocated by N multicast receiving nodes for multicast packets, wherein the receiving port numbers allocated to different multicast receiving nodes can be different. The second node constructs a second mapping table based on the receiving port numbers allocated by the N multicast receiving nodes. The second mapping table includes the receiving port numbers corresponding to the N multicast receiving nodes, where N is a positive integer. Here, the second mapping table can also be called a port mapping table. It should be noted that the second mapping table is different from the first mapping table described above.
[0086] In this embodiment, after receiving the multicast message, the second node copies the multicast message to obtain N copies. The second node then queries the second mapping table based on the first SID to obtain the receiving port numbers corresponding to the N multicast receiving nodes. The second node then modifies the destination port numbers in the N copies of the multicast message to the corresponding receiving port numbers of the N multicast receiving nodes. Afterward, the second node sends the modified multicast message to each of the N multicast receiving nodes.
[0087] Figure 5 is a flowchart illustrating the multicast port number allocation method provided in this embodiment of the application. As shown in Figure 5, the multicast port number allocation method includes the following steps:
[0088] Step 501: The third node carries the first SID in the multicast message. The first SID is used to identify the automatically assigned multicast port number.
[0089] Step 502: The third node sends a multicast message carrying the first SID.
[0090] In some implementations, the third node is a multicast source. In other implementations, the third node is an edge ingress network node.
[0091] In this embodiment, the first SID includes a Location field and a Function field, and optionally, an Argument field. The Function field is used to identify the following processing behavior of the multicast message: automatic multicast port allocation. In some implementations, the Function field is End.MTP, and correspondingly, the first SID is the automatically assigned SID for the multicast port (e.g., End.MTP sid).
[0092] The technical solution of this application embodiment automatically assigns a SID (End.MTP sid) to the multicast port carried by the multicast source or edge ingress network node, thereby decoupling the destination port number carried by the multicast source sending the message from the actual receiving port number used by the multicast receiving node. The multicast receiving node can flexibly and dynamically allocate unused port numbers as multicast receiving port numbers, and each multicast receiving node does not have to be forced to use the same receiving port number, thus improving the utilization rate of port numbers.
[0093] The technical solutions of this application embodiment are illustrated below with specific application examples. Depending on whether the end-side server (i.e., multicast source, multicast receiving node) needs to support SRv6 and automatically allocate SID (i.e., the first SID) for the multicast port, the technical solutions of this application embodiment are divided into the following three working modes:
[0094] 1) Working Mode 1: End-to-End Mode. End-to-end mode refers to the multicast source and multicast receiving node completing the technical solution of this application embodiment. In this mode, the multicast source carries the multicast port auto-assignment SID in the multicast message; after parsing the multicast port auto-assignment SID in the multicast message, the multicast receiving node modifies (or replaces) the destination port number in the multicast message with the receiving port number assigned by the multicast receiving node.
[0095] In operating mode 1, both the multicast source and multicast receiver nodes on the endpoint side need to support SRv6 and automatic SID allocation for multicast ports. Furthermore, the multicast receiver nodes need to maintain the mapping relationship between the destination port number (e.g., a port number in the range of 49155 to 50000) carried in the multicast packets sent by the multicast source and its dynamically allocated receiver port number. Network-side devices (e.g., edge ingress network nodes, intermediate network nodes, and edge egress network nodes) do not require upgrades or modifications. Therefore, operating mode 1 can also be referred to as network-side compatibility mode.
[0096] 2) Working Mode 2: Pure Network Side Mode. Pure network side mode refers to the edge ingress network node and edge egress network node completing the technical solution of this application embodiment. Specifically, the edge ingress network node carries the multicast port auto-assignment SID in the multicast message; after parsing the multicast port auto-assignment SID in the multicast message, the edge egress network node modifies (or replaces) the destination port number in the multicast message with the receiving port number assigned by the multicast receiving node obtained from the table by looking up the port mapping table.
[0097] In working mode 2, the multicast source and multicast receiver nodes on the end side do not need to be upgraded or modified. It can be understood that working mode 2 can also be called end-side compatibility mode. Upon receiving a multicast packet, the edge ingress network node closest to the multicast source will automatically assign a SID to the multicast port if it is an SRv6 packet. If it is not an SRv6 packet, it needs to be encapsulated into an SRv6 packet before automatically assigning a SID to the multicast port. Intermediate network nodes will forward the multicast packet according to the normal multicast packet flow. The edge egress network node needs to interact with each of its downstream multicast receiving nodes in advance to obtain the dynamically assigned receiving port number for the multicast packet (or multicast service). It will then build a port mapping table based on the receiving port numbers assigned to each multicast receiving node. After receiving the multicast packet carrying the automatically assigned SID of the multicast port, the edge egress network node will refresh the port mapping table (to prevent aging) and look up the table. It will then modify the destination port number in the multicast packet to the receiving port number obtained from the table lookup. Finally, it will copy the multicast packet and the modified port number to other downstream multicast receiving nodes and forward it to all downstream multicast receiving nodes.
[0098] 3) Working Mode 3: End-to-End Collaboration Mode. There are two end-to-end collaboration modes: one where the multicast source and edge egress network nodes complete the technical solution of this application embodiment, and the other where the edge ingress network nodes and multicast receiving nodes complete the technical solution of this application embodiment. For the former, the multicast source carries the multicast port auto-assignment SID in the multicast packet; after the edge egress network node parses the multicast port auto-assignment SID in the multicast packet, it modifies (or replaces) the destination port number in the multicast packet with the receiving port number assigned by the multicast receiving node obtained by looking up the port mapping table. For the latter, the edge ingress network node carries the multicast port auto-assignment SID in the multicast packet; after the multicast receiving node parses the multicast port auto-assignment SID in the multicast packet, it modifies (or replaces) the destination port number in the multicast packet with the receiving port number assigned by the multicast receiving node.
[0099] In working mode 3, one of the multicast source or multicast receiver nodes supports SRv6 and automatic SID allocation for multicast ports.
[0100] It should be noted that the following application example uses N=4 as an example, that is, the multicast group contains 4 multicast receiving nodes.
[0101] Application Example 1
[0102] This application example describes the technical solution corresponding to the above working mode 1, as shown in Figure 6, including the following steps:
[0103] Step 601: The multicast source carries End.MTP sid in the multicast message and sends a multicast message carrying End.MTP sid with destination port number 49155.
[0104] Here, after the multicast source sends the multicast message, the multicast message is forwarded to multicast receivers 1, 2, 3, and 4 via the edge ingress network node, intermediate network node, and edge egress network node.
[0105] Step 602: After multicast receiver 1 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50000, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50000, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50000.
[0106] Step 603: After multicast receiver 2 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50100, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50100, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50100.
[0107] Step 604: After multicast receiver 3 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50200, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50200, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50200.
[0108] Step 605: After multicast receiver 4 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50400, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50400, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50400.
[0109] It should be noted that the execution order of steps 602 to 605 is not limited and they can be executed in parallel.
[0110] Application Example 2
[0111] This application example describes the technical solution corresponding to the above working mode 2, as shown in Figure 7, including the following steps:
[0112] Step 701: The multicast source sends a multicast message with a destination port number of 49155.
[0113] Here, after the multicast source sends the multicast message, the multicast message is forwarded to the edge ingress network node.
[0114] Step 702: The edge ingress network node carries the End.MTP sid in the multicast message and sends a multicast message carrying the End.MTP sid and a destination port number of 49155.
[0115] Here, after the edge ingress network node sends the multicast message, the multicast message is forwarded to the edge egress network node via the intermediate network node.
[0116] Step 703: After parsing the End.MTP sid from the multicast message, the edge egress network node copies the multicast message and modifies the destination port number of the multicast message to the receiving port number assigned to the specific multicast receiving node, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number and the receiving port number assigned to the specific multicast receiving node.
[0117] Specifically, for multicast receiving node 1, the edge egress network node interacts with multicast receiving node 1 to obtain the dynamically allocated receiving port number 50000 from multicast receiving node 1. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50000 allocated by multicast receiving node 1, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50000 allocated by multicast receiving node 1.
[0118] For multicast receiving node 2, the edge egress network node interacts with multicast receiving node 2 to obtain the dynamically allocated receiving port number 50100 from multicast receiving node 2. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50100 allocated by multicast receiving node 2, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50100 allocated by multicast receiving node 2.
[0119] For multicast receiving node 3, the edge egress network node interacts with multicast receiving node 3 to obtain the dynamically allocated receiving port number 50200 from multicast receiving node 3. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50200 allocated by multicast receiving node 3, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between destination port number 49155 and receiving port number 50200 allocated by multicast receiving node 3.
[0120] For multicast receiving node 4, the edge egress network node interacts with multicast receiving node 4 to obtain the dynamically allocated receiving port number 50300 from multicast receiving node 4. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50300 allocated by multicast receiving node 4, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between destination port number 49155 and receiving port number 50300 allocated by multicast receiving node 4.
[0121] Step 704: The edge egress network node sends a multicast message with a destination port number of 50000 to the multicast receiving node 1.
[0122] Step 705: The edge egress network node sends a multicast message with a destination port number of 50100 to the multicast receiving node 2.
[0123] Step 706: The edge egress network node sends a multicast message with a destination port number of 50200 to the multicast receiving node 3.
[0124] Step 707: The edge egress network node sends a multicast message with a destination port number of 50300 to the multicast receiving node 4.
[0125] It should be noted that the execution order of steps 704 to 707 is not limited and they can be executed in parallel.
[0126] Application Example 3
[0127] This application example describes the technical solution corresponding to the above working mode 3, as shown in Figure 8, including the following steps:
[0128] Step 801: The multicast source carries End.MTP sid in the multicast message and sends a multicast message carrying End.MTP sid with destination port number 49155.
[0129] Here, after the multicast source sends the multicast message, the multicast message is forwarded to the edge egress network node via the edge ingress network node and the intermediate network node.
[0130] Step 802: After parsing the End.MTP sid from the multicast message, the edge egress network node copies the multicast message and modifies the destination port number of the multicast message to the receiving port number assigned by the specific multicast receiving node, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number and the receiving port number assigned by the specific multicast receiving node.
[0131] Specifically, for multicast receiving node 1, the edge egress network node interacts with multicast receiving node 1 to obtain the dynamically allocated receiving port number 50000 from multicast receiving node 1. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50000 allocated by multicast receiving node 1, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50000 allocated by multicast receiving node 1.
[0132] For multicast receiving node 2, the edge egress network node interacts with multicast receiving node 2 to obtain the dynamically allocated receiving port number 50100 from multicast receiving node 2. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50100 allocated by multicast receiving node 2, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50100 allocated by multicast receiving node 2.
[0133] For multicast receiving node 3, the edge egress network node interacts with multicast receiving node 3 to obtain the dynamically allocated receiving port number 50200 from multicast receiving node 3. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50200 allocated by multicast receiving node 3, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between destination port number 49155 and receiving port number 50200 allocated by multicast receiving node 3.
[0134] For multicast receiving node 4, the edge egress network node interacts with multicast receiving node 4 to obtain the dynamically allocated receiving port number 50300 from multicast receiving node 4. The edge egress network node modifies the destination port number 49155 in the multicast message to the receiving port number 50300 allocated by multicast receiving node 4, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between destination port number 49155 and receiving port number 50300 allocated by multicast receiving node 4.
[0135] Step 803: The edge egress network node sends a multicast message with a destination port number of 50000 to the multicast receiving node 1.
[0136] Step 804: The edge egress network node sends a multicast message with a destination port number of 50100 to the multicast receiving node 2.
[0137] Step 805: The edge egress network node sends a multicast message with a destination port number of 50200 to the multicast receiving node 3.
[0138] Step 806: The edge egress network node sends a multicast message with a destination port number of 50300 to the multicast receiving node 4.
[0139] It should be noted that the execution order of steps 803 to 806 is not limited and they can be executed in parallel.
[0140] Application Example 4
[0141] This application example describes the technical solution corresponding to the above working mode 3, as shown in Figure 9, including the following steps:
[0142] Step 901: The multicast source sends a multicast message with a destination port number of 49155.
[0143] Here, after the multicast source sends the multicast message, the multicast message is forwarded to the edge ingress network node.
[0144] Step 902: The edge ingress network node carries the End.MTP sid in the multicast message and sends a multicast message carrying the End.MTP sid and with a destination port number of 49155.
[0145] Here, after the edge ingress network node sends the multicast message, the multicast message is forwarded to multicast receivers 1, 2, 3, and 4 via the intermediate network node and the edge egress network node.
[0146] Step 903: After multicast receiver 1 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50000, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50000, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50000.
[0147] Step 904: After multicast receiver 2 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50100, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50100, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50100.
[0148] Step 905: After multicast receiver 3 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50200, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50200, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50200.
[0149] Step 906: After multicast receiver 4 parses the End.MTP sid from the multicast message, it dynamically allocates the receiving port number 50400, modifies the destination port number 49155 in the multicast message to the allocated receiving port number 50400, and maintains a port mapping table containing the following mapping relationship: the mapping relationship between the destination port number 49155 and the receiving port number 50400.
[0150] It should be noted that the execution order of steps 903 to 906 is not limited and they can be executed in parallel.
[0151] The technical solution of this application embodiment has several advantages. First, it can be extended based on existing protocols, allowing for smooth evolution and low implementation difficulty. Second, it can dynamically and efficiently utilize valuable port resources without increasing programming or usage complexity. Third, the three working modes can fully meet the needs of reusing existing assets on both the terminal and network sides, demonstrating good compatibility.
[0152] Figure 10 is a schematic diagram of the structure of a multicast port number allocation device provided in an embodiment of this application, applied to a first node. As shown in Figure 10, the multicast port number allocation device includes:
[0153] The first communication unit 1001 is configured to receive a multicast message carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number.
[0154] The first processing unit 1002 is configured to allocate a first receiving port number to the multicast message based on the first SID.
[0155] In some implementations, the first processing unit 1002 is configured to maintain a first mapping table, which includes a mapping relationship between the destination port number carried by the multicast message and the first receiving port number.
[0156] In some implementations, the first SID is carried in the multicast message by the multicast source node; or, the first SID is carried in the multicast message by the edge ingress network node.
[0157] In some implementations, the first node is a multicast receiving node.
[0158] Those skilled in the art should understand that the functions of each unit in the multicast port number allocation device shown in Figure 10 can be understood with reference to the relevant description of the aforementioned method. The functions of each unit in the multicast port number allocation device shown in Figure 10 can be implemented by a program running on a processor or by specific logic circuits.
[0159] Figure 11 is a schematic diagram of the structure of the multicast port number allocation device provided in this embodiment of the application, applied to the second node. As shown in Figure 11, the multicast port number allocation device includes:
[0160] The second communication unit 1101 is configured to receive a multicast message carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number.
[0161] The second processing unit 1102 is configured to query a second mapping table based on the first SID and modify the destination port number in the multicast message to the receiving port number obtained by querying the table.
[0162] The second communication unit 1101 is also used to send the modified multicast message.
[0163] In some implementations, the second communication unit 1101 is configured to obtain the receiving port numbers allocated by N multicast receiving nodes for the multicast message, wherein different multicast receiving nodes are allocated different receiving port numbers.
[0164] The second processing unit 1102 is configured to construct the second mapping table based on the receiving port numbers allocated to the N multicast receiving nodes. The second mapping table includes the receiving port numbers corresponding to the N multicast receiving nodes, where N is a positive integer.
[0165] In some embodiments, the second processing unit 1102 is configured to copy the multicast message to obtain N copies of the multicast message; query a second mapping table based on the first SID to obtain the receiving port number corresponding to the N multicast receiving nodes; and modify the destination port number in the N copies of the multicast message to the receiving port number corresponding to the N multicast receiving nodes.
[0166] In some implementations, the first SID is carried in the multicast message by the multicast source node; or, the first SID is carried in the multicast message by the edge ingress network node.
[0167] In some implementations, the second node is an edge egress network node.
[0168] Those skilled in the art should understand that the functions of each unit in the multicast port number allocation device shown in Figure 11 can be understood with reference to the relevant description of the aforementioned method. The functions of each unit in the multicast port number allocation device shown in Figure 11 can be implemented by a program running on a processor, or by specific logic circuits.
[0169] Figure 12 is a schematic diagram of the structure of the multicast port number allocation device provided in this embodiment of the application, applied to the third node. As shown in Figure 12, the multicast port number allocation device includes:
[0170] The third processing unit 1201 is configured to carry a first SID in the multicast message, the first SID being used to identify the automatically assigned multicast port number.
[0171] The third communication unit 1202 is configured to send a multicast message carrying the first SID.
[0172] In some implementations, the first SID includes a Location field and a Function field, wherein the Function field is used to identify a first processing behavior of the multicast message, the first processing behavior being automatic allocation of a multicast port.
[0173] In some implementations, the third node is a multicast source; or, the third node is an edge ingress network node.
[0174] Those skilled in the art should understand that the functions of each unit in the multicast port number allocation device shown in Figure 12 can be understood with reference to the relevant description of the aforementioned method. The functions of each unit in the multicast port number allocation device shown in Figure 12 can be implemented by a program running on a processor, or by specific logic circuits.
[0175] Figure 13 is a schematic structural diagram of a communication device 1300 provided in an embodiment of this application. The communication device 1300 shown in Figure 13 includes a processor 1310, which can call and run computer programs from memory to implement the methods in the embodiments of this application.
[0176] Optionally, as shown in FIG13, the communication device 1300 may further include a memory 1320. The processor 1310 may retrieve and run computer programs from the memory 1320 to implement the methods described in the embodiments of this application.
[0177] The memory 1320 can be a separate device independent of the processor 1310, or it can be integrated into the processor 1310.
[0178] Optionally, as shown in FIG13, the communication device 1300 may further include a transceiver 1330, and the processor 1310 may control the transceiver 1330 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices.
[0179] The transceiver 1330 may include a transmitter and a receiver. The transceiver 1330 may further include an antenna, and the number of antennas may be one or more.
[0180] Optionally, the communication device 1300 may specifically be the first node in the embodiments of this application, and the communication device 1300 may implement the corresponding processes implemented by the first node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0181] Optionally, the communication device 1300 may specifically be the second node in the embodiments of this application, and the communication device 1300 may implement the corresponding processes implemented by the second node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0182] Optionally, the communication device 1300 may specifically be the third node in the embodiments of this application, and the communication device 1300 may implement the corresponding processes implemented by the third node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0183] Figure 14 is a schematic structural diagram of a chip according to an embodiment of this application. The chip 1400 shown in Figure 14 includes a processor 1410, which can call and run computer programs from memory to implement the methods in the embodiments of this application.
[0184] Optionally, as shown in FIG14, chip 1400 may further include memory 1420. Processor 1410 may retrieve and run computer programs from memory 1420 to implement the methods in the embodiments of this application.
[0185] The memory 1420 can be a separate device independent of the processor 1410, or it can be integrated into the processor 1410.
[0186] Optionally, the chip 1400 may also include an input interface 1430. The processor 1410 can control the input interface 1430 to communicate with other devices or chips; specifically, it can acquire information or data sent by other devices or chips.
[0187] Optionally, the chip 1400 may also include an output interface 1440. The processor 1410 can control the output interface 1440 to communicate with other devices or chips, specifically, to output information or data to other devices or chips.
[0188] Optionally, the chip can be applied to the first node in the embodiments of this application, and the chip can implement the corresponding processes implemented by the first node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0189] Optionally, the chip can be applied to the second node in the embodiments of this application, and the chip can implement the corresponding processes implemented by the second node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0190] Optionally, the chip can be applied to the third node in the embodiments of this application, and the chip can implement the corresponding processes implemented by the third node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0191] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0192] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0193] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can 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. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0194] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0195] This application also provides a computer-readable storage medium for storing computer programs.
[0196] Optionally, the computer-readable storage medium can be applied to the first node in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the first node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0197] Optionally, the computer-readable storage medium can be applied to the second node in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the second node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0198] Optionally, the computer-readable storage medium may be applied to the third node in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the third node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0199] This application also provides a computer program product, including computer program instructions.
[0200] Optionally, the computer program product can be applied to the first node in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the first node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0201] Optionally, the computer program product can be applied to the second node in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the second node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0202] Optionally, the computer program product can be applied to the third node in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the third node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0203] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0204] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0205] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0206] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0207] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0208] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0209] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for allocating multicast port numbers, the method comprising: The first node receives a multicast message carrying a first identifier SID, which is used to identify the automatically assigned multicast port number. The first node assigns a first receiving port number to the multicast message based on the first SID.
2. The method according to claim 1, wherein, The method further includes: The first node maintains a first mapping table, which includes the mapping relationship between the destination port number carried by the multicast message and the first receiving port number.
3. The method according to claim 1, wherein, The first SID is carried in the multicast message by the multicast source node; or, The first SID is carried in the multicast message by the edge ingress network node.
4. The method according to any one of claims 1 to 3, wherein, The first node is a multicast receiving node.
5. A method for allocating multicast port numbers, the method comprising: The second node receives a multicast message carrying a first SID, which is used to identify the automatically assigned multicast port number. The second node queries the second mapping table based on the first SID and modifies the destination port number in the multicast message to the receiving port number obtained from the table lookup. The second node sends the modified multicast message.
6. The method according to claim 5, wherein, The method further includes: The second node obtains the receiving port numbers allocated by N multicast receiving nodes for the multicast message, wherein different multicast receiving nodes are allocated different receiving port numbers; The second node constructs the second mapping table based on the receiving port numbers allocated to the N multicast receiving nodes. The second mapping table includes the receiving port numbers corresponding to the N multicast receiving nodes, where N is a positive integer.
7. The method according to claim 6, wherein, The second node queries the second mapping table based on the first SID and modifies the destination port number in the multicast packet to the receiving port number obtained from the table lookup, including: The second node replicates the multicast message to obtain N copies of the multicast message; The second node queries the second mapping table based on the first SID to obtain the receiving port number corresponding to the N multicast receiving nodes; The second node modifies the destination port number in the N multicast messages to the receiving port number corresponding to the N multicast receiving nodes.
8. The method according to claim 5, wherein, The first SID is carried in the multicast message by the multicast source node; or, The first SID is carried in the multicast message by the edge ingress network node.
9. The method according to any one of claims 5 to 8, wherein, The second node is an edge exit network node.
10. A method for allocating multicast port numbers, the method comprising: The third node carries a first SID in the multicast message, which is used to identify the automatically assigned multicast port number. The third node sends a multicast message carrying the first SID.
11. The method according to claim 10, wherein, The first SID includes a Location field and a Function field. The Function field is used to identify the first processing behavior of the multicast message, which is to automatically allocate a multicast port.
12. The method according to claim 10 or 11, wherein, The third node is a multicast source; or... The third node is an edge entry network node.
13. A multicast port number allocation device, applied to a first node, the device comprising: The first communication unit is configured to receive multicast messages carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number; The first processing unit is configured to allocate a first receiving port number to the multicast message based on the first SID.
14. A multicast port number allocation device, applied to a second node, the device comprising: The second communication unit is configured to receive multicast messages carrying a first SID, wherein the first SID is used to identify the automatically assigned multicast port number; The second processing unit is configured to query a second mapping table based on the first SID and modify the destination port number in the multicast message to the receiving port number obtained by querying the table. The second communication unit is also used to send the modified multicast message.
15. A multicast port number allocation device, applied to a third node, the device comprising: The third processing unit is configured to carry a first SID in the multicast message, the first SID being used to identify the automatically assigned multicast port number; The third communication unit is configured to send a multicast message carrying the first SID.
16. A communication device, comprising: A processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the method as described in any one of claims 1 to 12.
17. A computer-readable storage medium for storing a computer program that causes a computer to perform the method as claimed in any one of claims 1 to 12.
18. A computer program product comprising computer program instructions that cause a computer to perform the method as described in any one of claims 1 to 12.