Transmission method and device, equipment and storage medium

By dynamically switching multicast and unicast modes between the sending end and the receiving end, and judging according to the network quality and the number of receiving ends, the problem of poor reliability of multicast transmission mode is solved, and the reliability and quality of data transmission is improved. Reduced resource waste.

CN119316245APending Publication Date: 2025-01-14HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310863208.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The multicast transmission method has poor reliability in communication, resulting in poor transmission quality of data streams.

Method used

By dynamically switching reliable multicast mode and unicast mode between the sending end and the receiving end, judging according to the network quality and the number of receiving ends, service data is sent by multicast transmission method and retransmission is processed through unicast transmission, or by using a multicast transmission method. The unicast transmission method sends service data and processes retransmission through multicast transmission.

Benefits of technology

It improves the reliability and quality of data transmission, reduces resource waste, and takes advantage of the respective advantages of multicast and unicast modes to adapt to changes in different network environments and the number of receivers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316245A_ABST
    Figure CN119316245A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a transmission method and device and a storage medium, and belongs to the technical field of communication. According to the method, when the multicast transmission condition is met, the service data is sent in a multicast transmission mode, retransmission is processed in a unicast transmission mode, packet loss can be effectively reduced through retransmission, the data transmission reliability is improved, and the transmission quality is ensured. And when the multicast transmission condition is not met, the service data is sent in a unicast transmission mode and retransmission is processed, so that packet loss can be effectively reduced, the data transmission reliability is improved, and the transmission quality is ensured. Besides, according to the scheme, each receiving end is controlled to be dynamically switched between the reliable multicast mode and the unicast mode by judging the multicast transmission condition, and the aim of reducing resource waste can be achieved by utilizing the respective advantages of the reliable multicast mode and the unicast mode through reasonable setting of the multicast transmission condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a transmission method, apparatus, device, and storage medium. Background Art

[0002] In everyday applications, a sender often sends the same service data stream, such as video, audio, or text, to multiple receivers. Multicast transmission is increasingly adopted because it saves processing and transmission resources. However, multicast transmission suffers from poor reliability, resulting in poor data transmission quality. Summary of the Invention

[0003] To solve related technical problems, the present disclosure provides a transmission method, apparatus, device, and storage medium. The technical solution is as follows:

[0004] In a first aspect, a transmission method is provided, which is executed by a transmitting end, the transmitting end being configured to send a service message to one or more receiving ends. The method includes: when a first receiving end meets multicast transmission conditions, the transmitting end adopts a reliable multicast mode to the first receiving end, that is, transmits the service message to the first receiving end via multicast transmission, and transmits a retransmitted service message to the first receiving end via unicast transmission; when the first receiving end does not meet the multicast transmission conditions, the transmitting end adopts a unicast mode to the first receiving end, that is, transmits the service message and the retransmitted service message to the first receiving end via unicast transmission.

[0005] In the solution shown in the embodiment of the present disclosure, the transmitting end can detect the multicast transmission condition at the beginning of the service and periodically detect the multicast transmission condition during the service.

[0006] At the start of the service, for the receiving ends in the service group that are determined to adopt the unicast mode, the sending end can initiate the process of establishing a unicast connection to each receiving end separately to transmit data through the unicast mode; for the receiving ends in the service group that are determined to adopt the reliable multicast mode, the sending end can initiate the process of establishing a multicast connection to these receiving ends, and initiate the process of establishing a unicast connection to each receiving end separately to transmit data through the reliable multicast mode.

[0007] During the service process, for a receiving end that meets the multicast transmission conditions in both the previous cycle and the current cycle, or does not meet the multicast transmission conditions in both the previous cycle and the current cycle, no processing is required. For a receiving end that met the multicast transmission conditions in the previous cycle but does not meet the multicast transmission conditions in the current cycle, the sending end will switch the transmission mode for the receiving end from reliable multicast mode to unicast mode. For a receiving end that did not meet the multicast transmission conditions in the previous cycle but meets the multicast transmission conditions in the current cycle, the sending end will switch the transmission mode for the receiving end from unicast mode to reliable multicast mode.

[0008] In this way, when multicast transmission conditions are met, service data is sent using multicast transmission, and retransmissions are handled through unicast transmission. Retransmissions can effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality. When multicast transmission conditions are not met, service data is sent using unicast transmission and retransmissions are handled, which can also effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality.

[0009] In addition, this solution controls the dynamic switching of each receiving end between reliable multicast mode and unicast mode by judging the multicast transmission conditions. By reasonably setting the multicast transmission conditions, the respective advantages of reliable multicast mode and unicast mode can be utilized (for example, in an environment with poor network quality, unicast mode is more resource-saving than reliable multicast mode; when there are many receiving ends, reliable multicast mode is more resource-saving than unicast mode, etc.) to achieve the purpose of reducing resource waste.

[0010] In a possible implementation, the multicast transmission condition includes at least one of a network quality condition and a receiving terminal number condition.

[0011] The network quality condition may include at least one of a first receiving end packet loss rate being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

[0012] In this way, when the network quality of the first receiving end is poor, regardless of whether the reliable multicast mode or the unicast mode is used, the sending end will frequently retransmit messages to the first receiving end. Then the advantage of the reliable multicast mode in saving network resources and processing resources is very weak and can be basically ignored. However, in the reliable multicast mode, maintaining a multicast socket and a unicast socket for a receiving end at the same time, maintaining the multicast message sequence number and the unicast message sequence number, and maintaining the correspondence between the two sequence numbers, requires wasting more processing resources and storage resources than the unicast mode. Therefore, setting the network quality condition can enable the use of the reliable multicast mode when the receiving end network quality is good, and the use of the unicast mode when the receiving end network quality is poor, which can better reduce resource waste.

[0013] The receiving terminal number condition may include that the number of receiving terminals in the service group to which the first receiving terminal belongs is greater than a number threshold, or the number of receiving terminals in the service group to which the first receiving terminal belongs is equal to a target value.

[0014] Because multicast requires only 1 / n of the network resources required for unicast (n is the number of receivers), multicast can save a significant amount of network resources when the number of receivers is large. However, when the number of receivers is small, the network resources that multicast can save are very limited. Moreover, in reliable multicast mode, maintaining both multicast and unicast sockets for a single receiver, maintaining both multicast and unicast message sequence numbers, and maintaining the correspondence between the two sequence numbers, requires more processing and storage resources than unicast mode. Therefore, setting the receiver number condition allows reliable multicast mode to be used when the number of receivers is large, and unicast mode to be used when the number of receivers is small, which can further reduce resource waste.

[0015] In addition, if there is only one receiving end in the system (for example, only one receiving end is powered on), the various possible multicast transmission conditions mentioned above can be used for judgment. If the multicast transmission conditions include the number of receiving ends, then this receiving end will be determined to not meet the multicast transmission conditions. Alternatively, if there is only one receiving end in the system, unicast transmission can be used directly.

[0016] In one possible implementation, if a first receiving end meets multicast transmission conditions, a service message is transmitted to the first receiving end via the UDP protocol, and a retransmission service message is transmitted to the first receiving end via the TCP protocol. The service group is a group of devices receiving the same service data. If the first receiving end does not meet the multicast transmission conditions, the service message and the retransmission service message are transmitted to the first receiving end via the TCP protocol.

[0017] In addition, for multicast transmission, in addition to the UDP protocol, other multicast protocols can also be used. For unicast transmission, in addition to the TCP protocol, other reliable unicast protocols can also be used, which are not listed here one by one.

[0018] In this way, when multicast transmission conditions are met, using the UDP protocol to send service messages and combining it with the TCP protocol for retransmission can improve resource utilization while ensuring transmission reliability. When multicast transmission conditions are not met, using the TCP protocol to send service messages can also improve resource utilization while ensuring transmission reliability.

[0019] In one possible implementation, when the first receiving end meets the multicast transmission conditions, the sending end sends sequence number mapping information to the first receiving end, and the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number during the subsequent transmission process. The sending end sends a service message carrying the first multicast message sequence number to the first receiving end via a multicast transmission method. Within a specified period of time after sending the service message, if a response message for the service message sent by the first receiving end is not received, a corresponding retransmitted service message is sent to the first receiving end via a unicast transmission method. The retransmitted service message carries the first unicast message sequence number, and the first unicast message sequence number corresponds to the first multicast message sequence number.

[0020] The sequence number mapping information is related to the second multicast message sequence number and the second unicast message sequence number currently at the first receiving end (i.e., when the multicast transmission condition is determined to be met). The pair of the second multicast message sequence number and the second unicast message sequence number can be directly used as the sequence number mapping information, or the pair of sequence numbers and the calculated relationship can be used together as the sequence number mapping information. The first unicast message sequence number can be obtained by mapping the first multicast message sequence number based on the sequence number mapping information.

[0021] This allows the sender and receiver to synchronize multicast and unicast message sequence numbers during subsequent reliable multicast data transmissions by sending only the sequence number mapping information once, upon entering reliable multicast mode. This eliminates the need to carry the unicast message sequence number each time a service message is sent via multicast transmission, thereby reducing network resource usage.

[0022] In one possible implementation, the difference between the first unicast message sequence number and the second unicast message sequence number is equal to the difference between the first multicast message sequence number and the second multicast message sequence number. The second unicast message sequence number and the second multicast message sequence number are, respectively, the unicast message sequence number and the multicast message sequence number corresponding to the first receiving end when it is determined that the first receiving end meets the multicast transmission condition.

[0023] The sending end may determine a sum of a difference between the second multicast message sequence number and the first multicast message sequence number and the first unicast message sequence number as the second unicast message sequence number.

[0024] In this way, the corresponding unicast message sequence number can be determined simply and quickly based on the current multicast message sequence number.

[0025] In one possible implementation, when the first receiving end meets the multicast transmission conditions, the transmitting end sends a multicast transmission notification to the first receiving end, where the multicast transmission notification is used to instruct the first receiving end to adopt a reliable multicast mode; when the first receiving end does not meet the multicast transmission conditions, the transmitting end sends a unicast transmission notification to the first receiving end, where the unicast transmission notification is used to instruct the first receiving end to adopt a unicast mode.

[0026] In this way, the sending end cooperates with the first receiving end to improve data transmission reliability, ensure transmission quality, and reduce resource waste.

[0027] In a second aspect, a transmission method is provided, which is executed by a first receiving end, the first receiving end being configured to receive a service message sent by a sending end. The method is configured to: when the first receiving end meets multicast transmission conditions, the first receiving end adopts a reliable multicast mode, that is, receives the service message sent by the sending end through multicast transmission, and sends a response message corresponding to the service message to the sending end through unicast transmission; when the first receiving end does not meet the multicast transmission conditions, the first receiving end adopts a unicast mode, that is, receives the service message sent by the sending end through unicast transmission, and sends a response message corresponding to the service message to the sending end through unicast transmission.

[0028] The processing related to the judgment of the multicast transmission conditions performed by the receiving end is similar to the processing of the sending end in the first aspect.

[0029] In this way, when multicast transmission conditions are met, service data is sent using multicast transmission, and retransmissions are handled through unicast transmission. Retransmissions can effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality. When multicast transmission conditions are not met, service data is sent using unicast transmission and retransmissions are handled, which can also effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality.

[0030] In addition, this solution controls the dynamic switching of each receiving end between reliable multicast mode and unicast mode by judging the multicast transmission conditions. By reasonably setting the multicast transmission conditions, the respective advantages of reliable multicast mode and unicast mode can be utilized (for example, in an environment with poor network quality, unicast mode is more resource-saving than reliable multicast mode; when there are many receiving ends, reliable multicast mode is more resource-saving than unicast mode, etc.) to achieve the purpose of reducing resource waste.

[0031] In a possible implementation, the multicast transmission condition includes at least one of a network quality condition and a receiving terminal number condition.

[0032] The network quality condition may include at least one of a first receiving end packet loss rate being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

[0033] In this way, when the network quality of the first receiving end is poor, regardless of whether the reliable multicast mode or the unicast mode is used, the sending end will frequently retransmit messages to the first receiving end. Then the advantage of the reliable multicast mode in saving network resources and processing resources is very weak and can be basically ignored. However, in the reliable multicast mode, maintaining a multicast socket and a unicast socket for a receiving end at the same time, maintaining the multicast message sequence number and the unicast message sequence number, and maintaining the correspondence between the two sequence numbers, requires wasting more processing resources and storage resources than the unicast mode. Therefore, setting the network quality condition can enable the use of the reliable multicast mode when the receiving end network quality is good, and the use of the unicast mode when the receiving end network quality is poor, which can better reduce resource waste.

[0034] The receiving terminal number condition may include that the number of receiving terminals in the service group to which the first receiving terminal belongs is greater than a number threshold, or the number of receiving terminals in the service group to which the first receiving terminal belongs is equal to a target value.

[0035] Because multicast requires only 1 / n of the network resources required for unicast (n is the number of receivers), multicast can save a significant amount of network resources when the number of receivers is large. However, when the number of receivers is small, the network resources that multicast can save are very limited. Moreover, in reliable multicast mode, maintaining both multicast and unicast sockets for a single receiver, maintaining both multicast and unicast message sequence numbers, and maintaining the correspondence between the two sequence numbers, requires more processing and storage resources than unicast mode. Therefore, setting the receiver number condition allows reliable multicast mode to be used when the number of receivers is large, and unicast mode to be used when the number of receivers is small, which can further reduce resource waste.

[0036] In one possible implementation, when a first receiving end meets multicast transmission conditions, the first receiving end obtains sequence number mapping information from a transmitting end. The sequence number mapping information is used to map the multicast message sequence number to a unicast message sequence number during subsequent transmission. After receiving a service message sent by the transmitting end via multicast transmission, the first receiving end transmits a response message corresponding to the service message to the transmitting end via unicast transmission.

[0037] The service message carries a service message with a first multicast message sequence number. The response message carries a first unicast message sequence number. The first unicast message sequence number corresponds to the first multicast message sequence number. The first unicast message sequence number may be obtained by mapping the first multicast message sequence number based on sequence number mapping information. The first receiving end may proactively send a message to the sending end to request the sequence number mapping information.

[0038] This can reduce network resource usage.

[0039] In one possible implementation, the sequence number mapping information includes the second multicast message sequence number and the second unicast message sequence number. The pair of the second multicast message sequence number and the second unicast message sequence number can be used directly as the sequence number mapping information, or the pair of sequence numbers and the calculation relationship can be used together as the sequence number mapping information.

[0040] In a possible implementation, a difference between the second unicast message sequence number and the first unicast message sequence number is equal to a difference between the second multicast message sequence number and the first multicast message sequence number.

[0041] The first receiving end may determine a sum of a difference between the second multicast message sequence number and the first multicast message sequence number and the first unicast message sequence number as the second unicast message sequence number.

[0042] In this way, the corresponding unicast message sequence number can be determined simply and quickly based on the current multicast message sequence number.

[0043] In one possible implementation, the method is further used to: when the first receiving end meets the multicast transmission conditions, send a multicast transmission notification to the sending end, the multicast transmission notification is used to instruct the sending end to adopt a reliable multicast mode for the first receiving end; when the first receiving end does not meet the multicast transmission conditions, send a unicast transmission notification to the sending end, the unicast transmission notification is used to instruct the sending end to adopt a unicast mode for the first receiving end.

[0044] In this way, the sending end cooperates with the first receiving end to improve data transmission reliability, ensure transmission quality, and reduce resource waste.

[0045] In a third aspect, a transmission device is provided, which is applied to a transmitting end and is used to implement the method provided by the first aspect and its possible implementation methods.

[0046] In a fourth aspect, a transmission device is provided, which is applied to a first receiving end and is used to implement the method provided by the above-mentioned second aspect and its possible implementation methods.

[0047] In a fifth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory is configured to store computer instructions. The processor executes the computer instructions stored in the memory to cause the computer device to perform the methods provided in the first and second aspects and possible implementations thereof.

[0048] In a sixth aspect, a computer-readable storage medium is provided, which stores computer program code. In response to the computer program code being executed by a computer device, the computer device executes the method provided by the first aspect, the second aspect and their possible implementation methods.

[0049] In a seventh aspect, a computer program product is provided, which includes a computer program code. In response to the computer program code being executed by a computer device, the computer device executes the method provided by the first aspect, the second aspect and possible implementations thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of the structure of a transmission system provided in an embodiment of the present application;

[0051] Figure 2 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0052] Figure 3 This is a flow chart of a transmission method provided by an embodiment of the present application;

[0053] Figure 4 1 is a schematic diagram of switching a reliable multicast mode to a unicast mode provided in an embodiment of the present application;

[0054] Figure 5 This is a schematic diagram of message sequence number mapping processing during transmission provided by an embodiment of the present application;

[0055] Figure 6 This is a flow chart of a transmission method provided by an embodiment of the present application;

[0056] Figure 7 This is a schematic structural diagram of a transmission device provided in an embodiment of the present application;

[0057] Figure 8 It is a structural diagram of a transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The embodiment of the present disclosure provides a transmission method. The method can be applied to a transmission system. The transmission system includes a transmitting end and one or more receiving ends, such as Figure 1As shown. The transmission system can use wired communication or wireless communication for data transmission. The embodiment of the present disclosure takes wireless communication as an example to explain the solution in detail. Other situations are similar and will not be described in detail. The sending end and the receiving end can communicate through a routing device, or a routing device may not be set, and communication can be performed through hardware such as a wireless network card installed on the sending end. The sending end and the receiving end can be computer devices such as terminals or servers, and the terminals can be mobile phones, tablets, laptops, vehicle-mounted terminals (central control terminals, co-pilot terminals, rear-seat terminals, etc.), smart screens, desktop computers, wearable terminals, etc.

[0059] From the perspective of hardware composition, the structure of the above-mentioned computer device (sending end or receiving end) can be as follows Figure 2 As shown, it includes a processor 210 , a memory 220 and a communication component 230 .

[0060] The processor 210 may be a central processing unit (CPU) or a system on chip (SoC), etc. The processor 210 may be configured to execute various instructions involved in the method.

[0061] The memory 220 may include various volatile memories or non-volatile memories, such as solid-state disks (SSDs) and dynamic random access memory (DRAM). The memory 220 may be used to store pre-stored data, intermediate data, and result data during business processing, such as data to be transmitted.

[0062] The communication component 230 may be a wired network connector, a wireless fidelity (WiFi) module, a Bluetooth module, a cellular network communication module, etc. The communication component may be used to perform data transmission with other devices.

[0063] Some terms involved in the embodiments of the present disclosure are explained below.

[0064] Multicast (also known as groupcast): A sender sends a message that can be received by all participating receivers. This transmission method is called multicast. The destination address of a multicast message is a multicast address agreed upon by the sender and receiver, such as 224.0.1.0. A receiver can determine that the message is intended for it as long as it receives a message destined for that multicast address.

[0065] Unicast: A message sent by a sender can only be received by one receiver. The destination address of a unicast message is the address of the receiver.

[0066] Reliable multicast: Reliable multicast is a combination of unicast and multicast modes, using multicast to send messages and unicast for message retransmission.

[0067] Socket: A socket can be considered a logical interface for data transmission between devices. A device typically stores a corresponding socket for each other device it communicates with. A socket can be associated with information such as the Internet Protocol (IP) address of the corresponding device. Sockets can be categorized as multicast sockets or unicast sockets. Multicast sockets are used when the sender and receiver transmit service data via multicast, while unicast sockets are used when the sender and receiver transmit service data via unicast.

[0068] Service Group: A service group is a group of devices that receive the same service data. For example, if a video stream needs to be sent to multiple terminals simultaneously for playback, these multiple terminals constitute a device group. In the embodiments of the present disclosure, the receiving end in the transmission system can be a device group. In related technologies, devices in the same service group generally use either multicast or unicast transmission. In the embodiments of the present disclosure, devices in the same service group may partially use multicast transmission and partially use unicast transmission.

[0069] Service messages: Different from control messages, service messages are used to transmit service data. Service data can be media streams such as video, audio, and text. Unlike service messages, control messages are used to transmit control instructions.

[0070] Retransmitted service message: a retransmitted message corresponding to a service message.

[0071] In daily applications, it is often necessary for a transmitter to send the same business data to multiple receivers at the same time. The business data can be in various data forms. The embodiments of this disclosure take business data streams as examples, such as video streams, audio streams, text streams, etc. For example, inside a vehicle, the central control terminal can send the same video stream to the passenger terminal and the rear-seat terminals. Then, the passenger terminal and the rear-seat terminals form a business group. For another example, in an online conference, the speaker's terminal sends the speaker's audio stream to all participating terminals. These participating terminals form a business group.

[0072] Multicast and unicast transmission modes each have their advantages and disadvantages. Multicast transmission is more resource-efficient, while unicast transmission is more reliable. Different transmission modes are suitable for different application scenarios. In related technologies, technicians will uniformly set the transmission mode for each receiving end in a service group to multicast or unicast based on the characteristics of the application scenario, and the transmission mode remains unchanged during the service operation. However, in actual service operations, network and system conditions may change dynamically, and the status of different receiving ends may also vary. Therefore, a fixed and unified transmission mode may not be conducive to transmission for a certain receiving end at a certain moment.

[0073] The disclosed embodiments provide a transmission method that dynamically switches the transmission mode for each receiving end during the transmission of a service data stream. This method can be implemented by a transport layer plug-in in the system programs of the sending and receiving ends, or by hardware in the sending and receiving ends, such as a network card. The disclosed embodiments use the transport layer plug-in as an example to illustrate the solution in detail; other scenarios are similar and will not be further described.

[0074] In the transmission method provided in the embodiments of the present disclosure, either the sending end or the receiving end can perform conditional judgment to trigger either receiving end to switch between reliable multicast mode and unicast mode. Alternatively, both the sending end and the receiving end can perform conditional judgment, with the one that first determines that the condition is met triggering the switch first.

[0075] The following is a detailed description of the processing flow triggered by the sender. Figure 3 As shown, the following steps are included:

[0076] 301. The transmitting end detects whether each receiving end in the service group meets the multicast transmission conditions. When the first receiving end meets the multicast transmission conditions, steps 302-305 are executed. When the first receiving end does not meet the multicast transmission conditions, steps 306-309 are executed.

[0077] The multicast transmission condition may include a network quality condition and / or a receiving end number condition. The first receiving end is any one of the one or more receiving ends mentioned above.

[0078] There are multiple possible detection parameters for network quality conditions, such as packet loss rate, transmission delay, delay jitter, etc. The corresponding network quality condition may include at least one of a packet loss rate less than a packet loss rate threshold, a transmission delay less than a delay threshold, and a delay jitter less than a jitter threshold.

[0079] The condition for the number of receiving terminals can be that the number of receiving terminals in the service group to which the first receiving terminal belongs is greater than a threshold value, for example, the number of receiving terminals is greater than 2. Alternatively, the condition can be that the number of receiving terminals in the service group to which the first receiving terminal belongs is equal to a target value, for example, the number of receiving terminals is equal to 1. The threshold value can be determined by technical personnel based on experience weighing the advantages and disadvantages of unicast and multicast, or through experimentation.

[0080] When executing a service, the sender sends service data streams to each receiver in the service group. During this process, the sender can periodically check whether each receiver in the service group meets the multicast transmission conditions. The following describes the two stages: service start and service process.

[0081] Business starts

[0082] The sending end will first establish unicast connections with all the receiving ends in the business group, record the unicast socket corresponding to each receiving end, and the receiving end will also store the corresponding unicast socket during this process. Then, when the sending end is ready to start sending business data streams to the business group, the sending end can detect whether each receiving end in the business group (including the first receiving end, the second receiving end, etc.) meets the multicast transmission conditions, and select the transmission method based on the judgment results. If a certain receiving end meets the multicast transmission conditions, a reliable multicast mode can be used. In the reliable multicast mode, business messages are transmitted through the multicast transmission mode, and retransmission processing is performed through the unicast transmission mode. If a certain receiving end does not meet the multicast transmission conditions, a unicast mode can be used. In the unicast mode, business messages are transmitted through the unicast transmission mode, and retransmission processing is performed through the unicast transmission mode.

[0083] For receivers in the service group that are determined to use reliable multicast mode, the sender joins the same multicast group with these receivers through a locally stored multicast socket (generated at service start or pre-stored). The sender can also establish a unicast member list corresponding to its multicast socket and record the unicast sockets corresponding to these receivers in the unicast member list. The function of the unicast member list is described in the following section on service message transmission.

[0084] Business Process

[0085] The sender begins communicating with the receiver in reliable multicast mode and / or unicast mode, transmitting the service data stream. Subsequently, after a preset period, the sender can recheck whether each receiver in the service group meets the multicast transmission conditions. For receivers that meet the multicast transmission conditions in both the previous and current periods, or for receivers that do not meet the multicast transmission conditions in both the previous and current periods, no action is taken.

[0086] For a receiver that met the multicast transmission conditions in the previous cycle but no longer meets them in the current cycle, the sender switches the transmission mode for that receiver from reliable multicast to unicast. The sender removes the receiver's unicast socket from the unicast member list. The sender continues to use that unicast socket for unicast transmission with the receiver.

[0087] For a receiver that did not meet the multicast transmission conditions in the previous cycle but meets the multicast transmission conditions in the current cycle, the sender will switch the transmission mode for that receiver from unicast mode to reliable multicast mode. The sender will add the unicast socket of the receiver to the unicast member list corresponding to the multicast socket.

[0088] Figure 4 An example of switching from reliable multicast mode to unicast mode is given. In the figure, the network quality of receiver 3 deteriorates, so receiver 3 is switched from reliable multicast mode to unicast mode.

[0089] In addition, if there is only one receiving end in the system (for example, only one receiving end is powered on), the various possible multicast transmission conditions mentioned above can be used for judgment. If the multicast transmission conditions include the number of receiving ends, then this receiving end will be determined to not meet the multicast transmission conditions. Alternatively, if there is only one receiving end in the system, unicast transmission can be used directly.

[0090] 302. The sending end sends a multicast transmission notification to the first receiving end.

[0091] After determining that the first receiving end meets the multicast transmission conditions, the sending end can send a multicast transmission notification to the first receiving end. The multicast transmission notification can be sent through unicast transmission, that is, through the first unicast socket corresponding to the first receiving end. In the embodiment of the present disclosure, various control messages are sent through unicast transmission. After receiving the multicast transmission notification, the first receiving end joins the above-mentioned multicast group through the locally stored multicast socket (generated at the beginning of the service or pre-stored), and at the same time establishes a unicast member list, and adds the locally stored unicast socket to the unicast member list. In addition, the first receiving end can send a response message of the multicast transmission notification to the sending end through the unicast socket. The response message is also called an acknowledgement character (ACK).

[0092] An optional solution is that when entering reliable multicast mode, the sender can establish sequence number mapping information and include this information in a multicast transmission notification sent to the receiver. This sequence number mapping information is used to map the multicast message sequence number to a unicast message sequence number. This multicast message sequence number is used for service messages, while the unicast message sequence number is used for the corresponding response message and retransmission of the service message. In reliable multicast mode, the multicast message sequence number and the unicast message sequence number have a one-to-one correspondence.

[0093] The process of determining the serial number mapping information may be as follows:

[0094] Step 1: When the first receiving end meets the multicast transmission condition, obtain the current first multicast message sequence number of the multicast socket and the current first unicast message sequence number of the first unicast socket.

[0095] The current first multicast message sequence number may be the next multicast message sequence number to be used, and the current first unicast message sequence number may be the next unicast message sequence number to be used.

[0096] In the case where both multicast and unicast are just established, the first multicast message sequence number is the initial first multicast message sequence number, and the first unicast message sequence number is the initial first unicast message sequence number.

[0097] If multicast has just been established and unicast has been established and used for some time, the first multicast message sequence number is the initial first multicast message sequence number. Alternatively, the next unicast message sequence number after the last used unicast message sequence number can be determined in order as the first unicast message sequence number. For example, before switching to reliable multicast mode, if the last unicast message sequence number is 88, the first unicast message sequence number is 89.

[0098] Step 2: Determine sequence number mapping information based on the first multicast message sequence number and the first unicast message sequence number.

[0099] The sequence number pair of the first multicast message sequence number and the first unicast message sequence number can be directly used as the sequence number mapping information. Alternatively, the sequence number pair and the calculation equation can be used together as the sequence number mapping information. In the former case, the calculation equation can be pre-stored on various devices in the transmission system, including the transmitting end and the receiving end. In the latter case, the calculation equation only needs to be pre-stored on the transmitting end, which then sends the sequence number pair and the calculation equation to the receiving end.

[0100] The calculation relationship can be:

[0101] Second unicast message sequence number = second multicast message sequence number - first multicast message sequence number + first unicast message sequence number

[0102] The second multicast message sequence number is a real-time multicast message sequence number during transmission of the service data stream in the reliable multicast mode, and the second unicast message sequence number is a unicast message sequence number corresponding to the real-time multicast message sequence number.

[0103] 303. The sending end sends the service message to the first receiving end through multicast transmission.

[0104] At the sending end, the application sends the service data to be sent (such as a frame of a video stream) and the corresponding service group identifier to the transport layer plug-in (the plug-in mentioned above for executing this method). The service group identifier corresponds one-to-one to the service group.

[0105] The transport layer plugin pre-creates a table of service group ID-to-socket mappings, which is used to find sockets using service group IDs. This table records the unicast and multicast sockets corresponding to each service group, excluding the unicast members corresponding to the multicast sockets. Table 1 below provides an example of this mapping table.

[0106] Table 1

[0107]

[0108] Among the receiving ends of the above-mentioned service group S1, some receiving ends adopt reliable multicast and some receiving ends adopt unicast. For example, service group S1 includes receiving ends T1, T2, T3, and T4. T1, T2, and T3 adopt reliable multicast and use multicast socket A, while T4 adopts unicast and uses unicast socket B.

[0109] All receiving terminals in the service group S2 adopt reliable multicast and use multicast socket C. For example, service group S2 includes receiving terminals T5, T6, and T7, which adopt reliable multicast and use multicast socket C.

[0110] Both receivers in service group S3 use unicast, using unicast socket D and unicast socket E respectively. For example, service group S3 includes receivers T8 and T9. T8 uses unicast and unicast socket D, while T9 uses unicast and unicast socket E.

[0111] After receiving the service data and service group identifier sent by the application, the transport layer plug-in can use the service group identifier to search in the above-mentioned correspondence table to determine its corresponding socket. Then, the transport layer plug-in calls the transmission function module of the system program (used for standardized multicast and unicast transmission), inputs the service data and the found socket. The transmission function module sends the service data through multicast or unicast, using the corresponding socket. If the above-mentioned first receiving end is set to reliable multicast mode, then the socket found in the table includes at least a multicast socket, and the transmission function module can use the multicast socket to send the service data, that is, send the service data through multicast transmission, and the service data will be sent to the first receiving end. If there is a second receiving end in the service group that is set to unicast mode, then the socket found in the table will also include a unicast socket, and the transmission function module can use the unicast socket to send the service data, that is, send the service data to the second receiving end through unicast transmission.

[0112] The multicast transmission may adopt the User Datagram Protocol (UDP), and the unicast transmission may adopt the Transmission Control Protocol (TCP).

[0113] 304. After receiving the service message, the first receiving end sends a response message corresponding to the service message to the sending end through unicast transmission.

[0114] After receiving the service message, the first receiving end may send a response message corresponding to the service message to the sending end through the locally stored unicast socket.

[0115] In addition, the first receiving end sends the service data in the service message to the application for processing. For example, the application can splice the service data into video frames for video playback.

[0116] 305. If the sending end does not receive a response message corresponding to the service message sent by the first receiving end within a specified time period after sending the service message, the sending end sends a retransmission service message corresponding to the service message to the first receiving end via unicast transmission.

[0117] The sender can send the retransmission service message through the first unicast socket.

[0118] The following combination Figure 5 The specific process of the above steps 303-305 is described.

[0119] The sending end sends a service message carrying the second multicast message sequence number to the first receiving end through the multicast socket. The sending end maps the second multicast message sequence number based on the sequence number mapping information (specifically, the first multicast message sequence number, the first unicast message sequence number and the second multicast message sequence number can be substituted into the above calculation formula "second unicast message sequence number = second multicast message sequence number - first multicast message sequence number + first unicast message sequence number") to obtain the second unicast message sequence number. The sending end replaces the second multicast message sequence number in the service message with the second unicast message sequence number to obtain a unicast message. The unicast message is then added to the unanswered message queue.

[0120] The first receiving end obtains the second multicast message sequence number from the received service message, maps the second multicast message sequence number based on the sequence number mapping information previously received from the sending end, and obtains the second unicast message sequence number. The first receiving end sends a response message carrying the second unicast message sequence number to the sending end via a locally stored unicast socket.

[0121] When the sending end receives a reply message carrying the second unicast message sequence number, the unicast message carrying the second unicast message sequence number is deleted from the unanswered message queue. If the sending end does not receive a reply message carrying the second unicast message sequence number sent by the first receiving end within a specified time period after sending the service message, the unicast message carrying the second unicast message sequence number is obtained from the unanswered message queue, and is added to the retransmission queue as a retransmission service message of the above service message, and then sent to the first receiving end through the first unicast socket.

[0122] 306. The sending end sends a unicast transmission notification to the first receiving end.

[0123] At the start of the service, if the sender determines that the first receiving end does not meet the multicast transmission conditions, the sender can send a unicast transmission notification to the first receiving end via the first unicast socket. In this case, the unicast transmission notification may not be sent.

[0124] During a service, if the sender decides to switch the first receiver from reliable multicast mode to unicast mode, the sender can send a unicast transmission notification to the first receiver via the first unicast socket. This unicast transmission notification is also called a multicast exit notification. In this case, after receiving the unicast transmission notification, the first receiver can exit the multicast group and remove the corresponding unicast member list.

[0125] In addition, after receiving the unicast transmission notification, the first receiving end may send a response message of the unicast transmission notification to the sending end through the stored unicast socket.

[0126] 307. The sending end sends the service message to the first receiving end through unicast transmission.

[0127] The processing of this step is similar to that of step 303, except that, if the first receiving end is set to unicast mode, then the socket found by the sending end in the table includes at least the first unicast socket, and the transmission function module can use the first unicast socket to send the above-mentioned service data, that is, send the service data to the first receiving end via unicast transmission.

[0128] 308. After receiving the service message, the first receiving end sends a response message corresponding to the service message to the sending end through unicast transmission.

[0129] After receiving the service message, the first receiving end may send a response message corresponding to the service message to the sending end through the locally stored unicast socket.

[0130] In addition, the first receiving end sends the service data in the service message to the application program for processing.

[0131] 309. If the sending end does not receive a response message corresponding to the service message sent by the first receiving end within a specified time period after sending the service message, the sending end sends a retransmission service message corresponding to the service message to the first receiving end via unicast transmission.

[0132] The sender can send the retransmission service message through the first unicast socket.

[0133] Regarding the maintenance of the correspondence table between the business group identifier and the socket used in the above process, the following are some additional explanations:

[0134] At the start of a service, the transmitter determines the multicast sockets of the reliable multicast mode receivers and the unicast sockets of the unicast mode receivers for all receivers in a service group, and adds the multicast sockets, unicast sockets, and corresponding service group identifiers to the above correspondence table. Of course, it is also possible to include only reliable multicast mode receivers or only unicast mode receivers, in which case only the corresponding multicast sockets or unicast sockets can be added. Taking Table 1 as an example, when the service of service group S1 has not yet started, S1, multicast socket A, and unicast socket B are not included in Table 1. When the service of service group S1 starts, S1, multicast socket A, and unicast socket B are added to Table 1.

[0135] In a business process, in one case, when the sending end determines that a certain receiving end in a certain business group switches from reliable multicast mode to unicast mode, the corresponding unicast socket can be added to the socket corresponding to the corresponding business group identifier in the correspondence table. Taking Table 1 as an example, when the receiving end T3 in the business group S1 switches from reliable multicast mode to unicast mode, the unicast socket F (the unicast socket of the receiving end T3) can be added to the socket corresponding to S1. If there is no receiving end in reliable multicast mode in a certain business group at a certain moment, the multicast socket corresponding to the corresponding business group identifier can be deleted in the correspondence table. Taking Table 1 as an example, when the receiving ends T1, T2, and T3 in the business group S1 all switch from reliable multicast mode to unicast mode, the multicast socket A can be deleted.

[0136] In another case, when the sending end determines that a certain receiving end in a certain business group switches from unicast mode to reliable multicast mode, the unicast socket corresponding to the receiving end can be deleted in the corresponding relationship table. Taking Table 1 as an example, when the receiving end T4 in business group S1 switches from unicast mode to reliable multicast mode, the unicast socket B can be deleted. If a new multicast socket needs to be created during this switching process, the multicast socket can be added to the socket corresponding to the corresponding business group identifier in the corresponding relationship table. Taking Table 1 as an example, when the receiving end T8 in business group S3 switches from unicast mode to reliable multicast mode, while deleting the unicast socket D, the multicast socket G (the newly created multicast socket) can also be added to the socket corresponding to S3.

[0137] The processing on the receiving end is similar to that on the sending end. When the receiving end determines to use reliable multicast mode, the corresponding table can store the sending end's multicast socket and service group identifier. When the receiving end determines to use unicast mode, the corresponding table can store the sending end's unicast socket and service group identifier. When the reliable multicast mode is switched to unicast mode, the sending end's multicast socket in the table can be replaced with a unicast socket. When the unicast mode is switched to reliable multicast mode, the sending end's unicast socket can be replaced with a multicast socket.

[0138] The following is a detailed description of the processing flow triggered by the receiving end. Figure 6 As shown, the following steps are included:

[0139] 601. The first receiving end detects whether it meets the multicast transmission conditions. When the first receiving end meets the multicast transmission conditions, steps 602-605 are executed. When the first receiving end does not meet the multicast transmission conditions, steps 606-609 are executed.

[0140] The receiving end's detection and processing of multicast transmission conditions is similar to that of the sending end. For the corresponding processing, refer to the description of step 301. The number of receiving ends in the service group can be obtained from the sending end, the packet loss rate can be detected by the receiving end itself or obtained from the sending end, and the number of retransmissions per unit time can be obtained from the sending end.

[0141] 602. The first receiving end sends a multicast transmission notification to the sending end.

[0142] At the beginning of the service, regardless of whether the sending end detects the multicast transmission conditions, it can initiate the process of establishing a unicast connection to all receiving ends to determine the unicast socket corresponding to each receiving end, and each receiving end also stores the unicast socket separately. After the first receiving end determines to adopt the reliable multicast mode, it can send a multicast transmission notification to the sending end through the locally stored unicast socket. After the other receiving ends determine to adopt the reliable multicast mode, they can also send a multicast transmission notification to the sending end through their respective stored unicast sockets. The sending end can send a response message of the multicast transmission notification to these receiving ends. For all receiving ends that send multicast transmission notifications, the sending end can add these receiving ends to the same multicast. The sending end and each receiving end will respectively store the corresponding multicast socket for subsequent multicast transmission. In addition, similar to the processing of the sending end, the receiving ends can establish a unicast member list corresponding to their respective multicast sockets, and record the unicast sockets stored locally in the unicast member list.

[0143] Furthermore, after receiving the multicast transmission notification, the transmitting end can determine the sequence number mapping information and send it to the receiving end using the reliable multicast mode. The specific process for determining the sequence number mapping information is similar to that in the above-described flow, and can be found in the description of step 302. Alternatively, the receiving end can request the sequence number mapping information from the transmitting end via other messages, for example, by sending a separate mapping information acquisition notification.

[0144] 603. The sending end sends a service message to the first receiving end through multicast transmission.

[0145] 604. After receiving the service message, the first receiving end sends a response message corresponding to the service message to the sending end through unicast transmission.

[0146] 605. If the sending end does not receive a response message corresponding to the service message sent by the first receiving end within a specified time period after sending the service message, the sending end sends a retransmission service message corresponding to the service message to the first receiving end via unicast transmission.

[0147] The processing of steps 603-605 is similar to that of steps 303-305. Please refer to the relevant description of steps 303-305, which will not be repeated here.

[0148] 606. The first receiving end sends a unicast transmission notification to the sending end.

[0149] Based on the description of step 602, at the start of the service, the sending end establishes a unicast connection with each receiving end and stores the corresponding unicast socket. After the first receiving end determines to use unicast mode, it can send a unicast transmission notification to the sending end via its locally stored unicast socket. After the other receiving ends determine to use unicast mode, they can also send unicast transmission notifications to the sending end via their respective stored unicast sockets. The sending end can send a response message to the corresponding receiving end regarding the unicast transmission notification. For the receiving end that sent the unicast transmission notification, the sending end can record the use of unicast mode for data transmission with the receiving end.

[0150] 607. The sending end sends the service message to the first receiving end through unicast transmission.

[0151] 608. After receiving the service message, the first receiving end sends a response message corresponding to the service message to the sending end through unicast transmission.

[0152] 609. If the sending end does not receive a response message corresponding to the service message sent by the first receiving end within a specified time period after sending the service message, the sending end sends a retransmission service message corresponding to the service message to the first receiving end via unicast transmission.

[0153] The processing of steps 607-609 is similar to that of steps 307-309. Please refer to the relevant description of steps 307-309 and will not be repeated here.

[0154] The non-satisfaction of the multicast transmission conditions mentioned in the above processing flows can also be considered to satisfy the unicast transmission conditions. If the multicast transmission condition is that the packet loss rate is less than the packet loss rate threshold, the corresponding unicast transmission condition can be that the packet loss rate is greater than or equal to the packet loss rate threshold. If the multicast transmission condition is that the number of receiving terminals in the service group is greater than the number threshold, the corresponding unicast transmission condition can be that the number of receiving terminals in the service group is less than or equal to the number threshold. If the multicast transmission condition is that the packet loss rate is less than the packet loss rate threshold and the number of receiving terminals in the service group is greater than the number threshold, the corresponding unicast transmission condition can be that the packet loss rate is greater than or equal to the packet loss rate threshold, or the number of receiving terminals in the service group is less than or equal to the number threshold.

[0155] With the disclosed embodiments, when multicast transmission conditions are met, service data is sent using multicast transmission, and retransmissions are handled using unicast transmission. Retransmissions can effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality. When multicast transmission conditions are not met, unicast transmission can be used to send service data and handle retransmissions, which can also effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality.

[0156] In addition, this solution controls the dynamic switching of each receiving end between reliable multicast mode and unicast mode by judging the multicast transmission conditions. By reasonably setting the multicast transmission conditions, the respective advantages of reliable multicast mode and unicast mode can be utilized (for example, in an environment with poor network quality, unicast mode is more resource-saving than reliable multicast mode; when there are many receiving ends, reliable multicast mode is more resource-saving than unicast mode, etc.) to achieve the purpose of reducing resource waste.

[0157] Based on the same technical concept, the embodiment of the present disclosure provides a transmission device, which is applied to the sending end in the above transmission system, such as Figure 7 As shown, the device includes:

[0158] Reliable multicast module 710 is configured to transmit a service message to a first receiving end among one or more receiving ends via multicast transmission, and to transmit a retransmitted service message to the first receiving end via unicast transmission, if the first receiving end among the one or more receiving ends meets the multicast transmission conditions. Specifically, this module implements the processing functions of steps 301, 303, 304, and 305 above, as well as other implicit steps.

[0159] The unicast module 720 is used to transmit the service message and retransmit the service message to the first receiving end through unicast transmission when the first receiving end does not meet the multicast transmission conditions. Specifically, it can implement the processing functions of the above steps 301, 307, 308, and 309, as well as other implicit steps.

[0160] In a possible implementation, the multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

[0161] In a possible implementation, the network quality condition includes at least one of a packet loss rate at the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

[0162] In a possible implementation, the receiving terminal number condition includes that the number of receiving terminals in the service group to which the first receiving terminal belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

[0163] In one possible implementation, the reliable multicast module 710 is used to: transmit a service message to the first receiving end via the UDP protocol, and transmit a retransmitted service message to the first receiving end via the TCP protocol, wherein the service group is a group of devices receiving the same service data.

[0164] The unicast module 720 is configured to transmit and retransmit service messages to the first receiving end via the TCP protocol.

[0165] In a possible implementation, the reliable multicast module 710 is further configured to send sequence number mapping information to the first receiving end when the first receiving end meets the multicast transmission conditions, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number.

[0166] The reliable multicast module 710 is used to: send a service message carrying a first multicast message sequence number to a first receiving end via a multicast transmission mode; and if a response message to the service message sent by the first receiving end is not received within a specified time period after sending the service message, send a retransmitted service message corresponding to the service message to the first receiving end via a unicast transmission mode, wherein the retransmitted service message carries a first unicast message sequence number, and the first unicast message sequence number corresponds to the first multicast message sequence number.

[0167] In one possible implementation, the reliable multicast module 710 is further configured to: ensure that a difference between the first unicast message sequence number and the second unicast message sequence number is equal to a difference between the first multicast message sequence number and the second multicast message sequence number, wherein the second unicast message sequence number and the second multicast message sequence number are, respectively, the unicast message sequence number and the multicast message sequence number corresponding to the first receiving end when it is determined that the first receiving end meets the multicast transmission condition.

[0168] In one possible implementation, the apparatus further includes a notification module 730 configured to: if the first receiving end meets multicast transmission conditions, send a multicast transmission notification to the first receiving end, wherein the multicast transmission notification instructs the first receiving end to receive the service message sent by the sending end via multicast transmission and to send a response message corresponding to the service message to the sending end via unicast transmission; and if the first receiving end does not meet the multicast transmission conditions, send a unicast transmission notification to the first receiving end, wherein the unicast transmission notification instructs the first receiving end to receive the service message sent by the sending end via unicast transmission and to send a response message corresponding to the service message to the sending end via unicast transmission. Specifically, the processing functions of steps 302 and 306 above, as well as other implicit steps, can be implemented.

[0169] The above-mentioned reliable multicast module 710, unicast module 720, and notification module 730 can be implemented by a processor, or by a processor in conjunction with a memory and a communication component.

[0170] Based on the same technical concept, the embodiment of the present disclosure provides a transmission device, which is applied to the first receiving end mentioned above, such as Figure 8 As shown, the device includes:

[0171] Reliable multicast module 810 is configured to receive the service message sent by the sender via multicast transmission, and to send a corresponding response message to the sender via unicast transmission, if the first receiving end meets the multicast transmission conditions. Specifically, it implements the processing functions of steps 601, 603, 604, and 605 above, as well as other implicit steps.

[0172] Unicast module 820 is configured to receive the service message sent by the sender via unicast transmission, and to send a response message corresponding to the service message to the sender via unicast transmission, if the first receiving end does not meet the multicast transmission conditions. Specifically, it can implement the processing functions of steps 601, 607, 608, and 609 above, as well as other implicit steps.

[0173] In a possible implementation, the multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

[0174] In a possible implementation, the network quality condition includes at least one of a packet loss rate at the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

[0175] In a possible implementation, the receiving terminal number condition includes that the number of receiving terminals in the service group to which the first receiving terminal belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

[0176] In a possible implementation, the reliable multicast module 810 is further configured to obtain sequence number mapping information from the sending end, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number.

[0177] The reliable multicast module 810 is configured to: when the multicast transmission conditions are met at the first receiving end, receive a service message carrying a second multicast message sequence number from the sending end through a multicast transmission method; map the second multicast message sequence number based on the sequence number mapping information to obtain a second unicast message sequence number; and send a response message carrying the second unicast message sequence number to the sending end through a unicast transmission method.

[0178] In a possible implementation, the sequence number mapping information includes the second multicast message sequence number and the second unicast message sequence number.

[0179] In a possible implementation, the reliable multicast module 810 is configured to: ensure that a difference between the second unicast message sequence number and the first unicast message sequence number is equal to a difference between the second multicast message sequence number and the first multicast message sequence number.

[0180] In one possible implementation, the apparatus further includes a notification module 830 configured to: if the first receiving end meets the multicast transmission conditions, send a multicast transmission notification to the sending end, wherein the multicast transmission notification instructs the sending end to transmit a service message to the first receiving end via multicast transmission and to transmit a retransmission service message to the first receiving end via unicast transmission; and if the first receiving end does not meet the multicast transmission conditions, send a unicast transmission notification to the sending end, wherein the unicast transmission notification instructs the sending end to transmit a service message and a retransmission service message to the first receiving end via unicast transmission. Specifically, the processing functions of steps 602 and 606 above, as well as other implicit steps, can be implemented.

[0181] The above-mentioned reliable multicast module 810, unicast module 820, and notification module 830 can be implemented by a processor, or by a processor in conjunction with a memory and a communication component.

[0182] With the disclosed embodiments, when multicast transmission conditions are met, service data is sent using multicast transmission, and retransmissions are handled using unicast transmission. Retransmissions can effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality. When multicast transmission conditions are not met, unicast transmission can be used to send service data and handle retransmissions, which can also effectively reduce packet loss, improve data transmission reliability, and ensure transmission quality.

[0183] In addition, this solution controls the dynamic switching of each receiving end between reliable multicast mode and unicast mode by judging the multicast transmission conditions. By reasonably setting the multicast transmission conditions, the respective advantages of reliable multicast mode and unicast mode can be utilized (for example, in an environment with poor network quality, unicast mode is more resource-saving than reliable multicast mode; when there are many receiving ends, reliable multicast mode is more resource-saving than unicast mode, etc.) to achieve the purpose of reducing resource waste.

[0184] The transmission apparatus provided in the above embodiments is illustrated only by the division of the above functional modules when performing transmission. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the transmission apparatus provided in the above embodiments and the transmission method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0185] The embodiments of the present disclosure also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform a business processing method, or instructs a computing device to perform a business processing method.

[0186] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A transmission method, characterized in that: The method is performed by a sending end, and the sending end is used to send a service message to one or more receiving ends. The method includes: When a first receiving end among the one or more receiving ends meets the multicast transmission condition, transmitting a service message to the first receiving end by multicast transmission, and transmitting a retransmission service message to the first receiving end by unicast transmission; When the first receiving end does not meet the multicast transmission condition, the service message and the retransmission service message are transmitted to the first receiving end through unicast transmission.

2. The method according to claim 1, characterized in that The multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

3. The method according to claim 2, characterized in that The network quality condition includes at least one of a packet loss rate of the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

4. The method according to claim 2 or 3, characterized in that: The receiving end number condition includes that the number of receiving ends in the service group to which the first receiving end belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

5. The method according to any one of claims 1 to 4, characterized in that: The transmitting of the service message to the first receiving end by multicast transmission, and the transmitting of the retransmission service message to the first receiving end by unicast transmission, comprises: Transmitting a service message to the first receiving end through the UDP protocol, and transmitting a retransmitted service message to the first receiving end through the TCP protocol, wherein the service group is a group of devices receiving the same service data; The transmitting the service message and the retransmitting service message to the first receiving end by unicast transmission includes: The service message and the retransmitted service message are transmitted to the first receiving end through the TCP protocol.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the first receiving end meets the multicast transmission condition, sending sequence number mapping information to the first receiving end, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number; The transmitting of the service message to the first receiving end by multicast transmission, and the transmitting of the retransmission service message to the first receiving end by unicast transmission, comprises: Sending a service message carrying a first multicast message sequence number to the first receiving end by multicast transmission; Within a specified time period after sending the service message, if a response message to the service message sent by the first receiving end is not received, a retransmitted service message corresponding to the service message is sent to the first receiving end via a unicast transmission mode, wherein the retransmitted service message carries a first unicast message sequence number, and the first unicast message sequence number corresponds to the first multicast message sequence number.

7. The method according to claim 6, characterized in that A difference between the first unicast message sequence number and the second unicast message sequence number is equal to a difference between the first multicast message sequence number and the second multicast message sequence number, wherein the second unicast message sequence number and the second multicast message sequence number are respectively the unicast message sequence number and the multicast message sequence number corresponding to the first receiving end when it is determined that the first receiving end meets the multicast transmission condition.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: When the first receiving end meets the multicast transmission condition, sending a multicast transmission notification to the first receiving end, wherein the multicast transmission notification is used to instruct the first receiving end to receive the service message sent by the sending end through the multicast transmission mode, and to send a response message corresponding to the service message to the sending end through the unicast transmission mode; When the first receiving end does not meet the multicast transmission condition, a unicast transmission notification is sent to the first receiving end, wherein the unicast transmission notification is used to instruct the first receiving end to receive the service message sent by the sending end via unicast transmission, and to send a response message corresponding to the service message to the sending end via unicast transmission.

9. A transmission method, characterized in that: The method is performed by a first receiving end, the first receiving end is used to receive a service message sent by a sending end, and the method includes: When the first receiving end meets the multicast transmission condition, receiving the service message sent by the sending end through the multicast transmission mode, and sending a response message corresponding to the service message to the sending end through the unicast transmission mode; When the first receiving end does not meet the multicast transmission condition, the service message sent by the sending end is received through a unicast transmission mode, and a response message corresponding to the service message is sent to the sending end through a unicast transmission mode.

10. The method according to claim 9, characterized in that The multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

11. The method according to claim 10, characterized in that The network quality condition includes at least one of a packet loss rate of the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

12. The method according to claim 10 or 11, characterized in that: The receiving end number condition includes that the number of receiving ends in the service group to which the first receiving end belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

13. The method according to any one of claims 9 to 12, characterized in that: The method further comprises: Obtaining sequence number mapping information from the sending end, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number; The receiving, by means of a multicast transmission mode, a service message sent by the sending end, and sending, by means of a unicast transmission mode, a response message corresponding to the service message to the sending end, comprises: Receiving, by multicast transmission, a service message carrying a first multicast message sequence number sent by the sending end; Mapping the first multicast message sequence number based on the sequence number mapping information to obtain a first unicast message sequence number; A response message carrying the first unicast message sequence number is sent to the sending end through a unicast transmission mode.

14. The method according to claim 13, characterized in that The sequence number mapping information includes a second multicast message sequence number and a second unicast message sequence number.

15. The method according to claim 14, characterized in that A difference between the second unicast message sequence number and the first unicast message sequence number is equal to a difference between the second multicast message sequence number and the first multicast message sequence number.

16. The method according to any one of claims 9 to 15, characterized in that: The method further comprises: When the first receiving end meets the multicast transmission condition, sending a multicast transmission notification to the sending end, wherein the multicast transmission notification is used to instruct the sending end to transmit a service message to the first receiving end through a multicast transmission mode, and to transmit a retransmission service message to the first receiving end through a unicast transmission mode; When the first receiving end does not meet the multicast transmission condition, a unicast transmission notification is sent to the sending end, wherein the unicast transmission notification is used to instruct the sending end to transmit service messages and retransmit service messages to the first receiving end via unicast transmission.

17. A transmission device, characterized in that: The device is applied to a sending end, and the sending end is used to send a service message to one or more receiving ends. The device includes: A reliable multicast module, configured to transmit a service message to a first receiving end among the one or more receiving ends through a multicast transmission mode, and transmit a retransmission service message to the first receiving end through a unicast transmission mode, if the first receiving end among the one or more receiving ends meets the multicast transmission condition; The unicast module is used to transmit service messages and retransmit service messages to the first receiving end through unicast transmission when the first receiving end does not meet the multicast transmission condition.

18. The device according to claim 17, characterized in that The multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

19. The device according to claim 18, characterized in that The network quality condition includes at least one of a packet loss rate of the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

20. The device according to claim 18 or 19, characterized in that The receiving end number condition includes that the number of receiving ends in the service group to which the first receiving end belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

21. The device according to any one of claims 17 to 20, characterized in that The reliable multicast module is used for: Transmitting a service message to the first receiving end through the UDP protocol, and transmitting a retransmitted service message to the first receiving end through the TCP protocol, wherein the service group is a group of devices receiving the same service data; The unicast module is used for: The service message and the retransmitted service message are transmitted to the first receiving end through the TCP protocol.

22. The device according to any one of claims 17 to 21, characterized in that The reliable multicast module is further used for: When the first receiving end meets the multicast transmission condition, sending sequence number mapping information to the first receiving end, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number; The reliable multicast module is used for: Sending a service message carrying a first multicast message sequence number to the first receiving end by multicast transmission; Within a specified time period after sending the service message, if a response message to the service message sent by the first receiving end is not received, a retransmitted service message corresponding to the service message is sent to the first receiving end via a unicast transmission mode, wherein the retransmitted service message carries a first unicast message sequence number, and the first unicast message sequence number corresponds to the first multicast message sequence number.

23. The device according to claim 22, characterized in that A difference between the first unicast message sequence number and the second unicast message sequence number is equal to a difference between the first multicast message sequence number and the second multicast message sequence number, wherein the second unicast message sequence number and the second multicast message sequence number are respectively the unicast message sequence number and the multicast message sequence number corresponding to the first receiving end when it is determined that the first receiving end meets the multicast transmission condition.

24. The device according to any one of claims 17 to 23, characterized in that The device also includes a notification module, which is used to: When the first receiving end meets the multicast transmission condition, sending a multicast transmission notification to the first receiving end, wherein the multicast transmission notification is used to instruct the first receiving end to receive the service message sent by the sending end through the multicast transmission mode, and to send a response message corresponding to the service message to the sending end through the unicast transmission mode; When the first receiving end does not meet the multicast transmission condition, a unicast transmission notification is sent to the first receiving end, wherein the unicast transmission notification is used to instruct the first receiving end to receive the service message sent by the sending end via unicast transmission, and to send a response message corresponding to the service message to the sending end via unicast transmission.

25. A transmission device, characterized in that: The device is applied to a first receiving end, the first receiving end is used to receive a service message sent by a sending end, and the device includes: A reliable multicast module, configured to receive the service message sent by the sending end through a multicast transmission mode when the first receiving end meets the multicast transmission condition, and send a response message corresponding to the service message to the sending end through a unicast transmission mode; The unicast module is used to receive the service message sent by the sending end through a unicast transmission mode when the first receiving end does not meet the multicast transmission condition, and send a response message corresponding to the service message to the sending end through a unicast transmission mode.

26. The device according to claim 25, characterized in that The multicast transmission condition includes a network quality condition and / or a receiving terminal number condition.

27. The device according to claim 26, characterized in that The network quality condition includes at least one of a packet loss rate of the first receiving end being less than a packet loss rate threshold, a transmission delay being less than a delay threshold, and a delay jitter being less than a jitter threshold.

28. The device according to claim 26 or 27, characterized in that The receiving end number condition includes that the number of receiving ends in the service group to which the first receiving end belongs is greater than a number threshold, and the service group is a group of devices that receive the same service data.

29. The device according to any one of claims 25 to 28, characterized in that The reliable multicast module is further used for: Obtaining sequence number mapping information from the sending end, wherein the sequence number mapping information is used to map the multicast message sequence number to the unicast message sequence number; The reliable multicast module is used for: Receiving, by multicast transmission, a service message carrying a first multicast message sequence number sent by the sending end; Mapping the first multicast message sequence number based on the sequence number mapping information to obtain a first unicast message sequence number; A response message carrying the first unicast message sequence number is sent to the sending end through a unicast transmission mode.

30. The device according to claim 29, characterized in that The sequence number mapping information includes a second multicast message sequence number and a second unicast message sequence number.

31. The device according to claim 30, characterized in that A difference between the second unicast message sequence number and the first unicast message sequence number is equal to a difference between the second multicast message sequence number and the first multicast message sequence number.

32. The device according to any one of claims 25 to 31, characterized in that The device also includes a notification module, which is used to: When the first receiving end meets the multicast transmission condition, sending a multicast transmission notification to the sending end, wherein the multicast transmission notification is used to instruct the sending end to transmit a service message to the first receiving end through a multicast transmission mode, and to transmit a retransmission service message to the first receiving end through a unicast transmission mode; When the first receiving end does not meet the multicast transmission condition, a unicast transmission notification is sent to the sending end, wherein the unicast transmission notification is used to instruct the sending end to transmit service messages and retransmit service messages to the first receiving end via unicast transmission.

33. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory is used to store computer instructions; The processor executes the computer instructions stored in the memory to enable the computer device to perform the method according to any one of claims 1 to 16.

34. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code. In response to the computer program code being executed by a computer device, the computer device executes the method according to any one of claims 1 to 16.

Citation Information

Cited By

  • Transmission method, apparatus, device, storage medium and program product

    EP4723561A1

  • Transmission method, apparatus, device, storage medium and program product

    WO2025011488A1