Data transmission method and apparatus, electronic device, and computer-readable storage medium
By selecting the primary and secondary transmission links at the sending end, generating redundant data packets, and transmitting them in a differentiated manner, the problems of resource waste and packet loss caused by the instability of a single wireless network are solved, thereby achieving reliable data transmission and saving traffic.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-06-09
Smart Images

Figure CN122179911A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and more specifically to a data transmission method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Current applications (apps) generally run on a single network, such as a 5G mobile communication network or a Wi-Fi network. However, due to issues such as signal fluctuations in wireless networks and terminal mobility switching, the instability of a single wireless network has a significant impact on services. For example, real-time games are very sensitive to latency; as latency increases, the user experience will noticeably deteriorate. Similarly, live streaming services require stable network bandwidth; insufficient network capacity or fluctuating speeds can lead to decreased video bitrate or stuttering.
[0003] To improve the user experience, multiple network transmission methods can be used to address the instability or unreliability of a single network. Common multi-network transmission solutions mainly include redundant transmission and aggregated transmission. For example... Figure 1 As shown, the basic principle of redundant transmission is to send data packets simultaneously on multiple network links. Successful reception is achieved as long as any data packet is transmitted correctly on any one link, thereby reducing network latency and jitter. In other words, it ensures data transmission latency and reliability by consuming more network resources. Figure 2 As shown, the basic principle of aggregation transmission is to distribute different data packets of the same service to different networks for transmission based on the quality of different network links. The multi-network transmission gateway then performs aggregation processing, restoring the original service data stream before transmitting it to the final service origin station. Although aggregation transmission can fully utilize the capacity of multiple networks, providing greater network bandwidth for services and saving network traffic, if packet loss occurs during data transmission, retransmission is required. Summary of the Invention
[0004] This application provides a data transmission method, apparatus, electronic device, and computer-readable storage medium that can adaptively encode and transmit data according to network conditions, effectively saving network transmission data volume while ensuring data transmission reliability and reducing redundant transmission schemes.
[0005] In a first aspect, embodiments of this application provide a data transmission method applied at a sending end, comprising:
[0006] Obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current time;
[0007] Obtain the network quality detection result for each of the data transmission links, and based on the network quality detection result, select at least one primary transmission link and at least one secondary transmission link from the data transmission links, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link.
[0008] Based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted, at least one redundant data packet is generated. The redundant data packet is used by the receiving end to recover the data of the data packet to be transmitted after receiving the redundant data packet.
[0009] The data packet to be transmitted is transmitted to the receiving end via the main transmission link, and the redundant data packet is transmitted to the receiving end via the secondary transmission link.
[0010] Accordingly, embodiments of this application provide a data transmission apparatus, including:
[0011] The data acquisition unit is used to acquire at least one data packet to be transmitted corresponding to the data stream to be transmitted, and to determine at least two data transmission links corresponding to the data stream to be transmitted at the current time.
[0012] A link segmentation unit is used to obtain the network quality detection result of each data transmission link, and based on the network quality detection result, to select at least one primary transmission link and at least one secondary transmission link in the data transmission links, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link.
[0013] The data generation unit is used to generate at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted. The redundant data packet is used by the receiving end to recover the data of the data packet to be transmitted after receiving the redundant data packet.
[0014] The data transmission unit is used to transmit the data packet to be transmitted to the receiving end according to the main transmission link, and to transmit the redundant data packet to the receiving end according to the secondary transmission link.
[0015] In some embodiments, the data acquisition unit may be specifically used to acquire a preset data transmission link and detect the network status of the preset data transmission link at the current time; if the network status indicates that the preset data transmission link is an available link, then the preset data transmission link is used as the data transmission link corresponding to the data stream to be transmitted.
[0016] In some embodiments, the link segmentation unit can be specifically used to obtain transmission attribute information of the data transmission link; if the transmission attribute information indicates that the data transmission link has a preset link priority, based on the network quality detection result and the preset link priority, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission link; if the transmission attribute information indicates that the data transmission link does not have the preset link priority, the link priority of the data transmission link is sorted according to the network quality detection result, and at least one primary transmission link and at least one secondary transmission link are selected from the data transmission link according to the sorting result.
[0017] In some embodiments, the link segmentation unit may be specifically used to obtain network indicator parameters corresponding to the preset first priority, and to filter out data transmission links with a preset link priority of the preset first priority from the data transmission links to obtain a preset main transmission link; to use the network quality detection result corresponding to the preset main transmission link as a first network quality detection result; to compare the detection data corresponding to the first network quality detection result with the network indicator parameters to obtain a first comparison result; and to filter out at least one main transmission link and at least one auxiliary transmission link from the data transmission links according to the first comparison result.
[0018] In some embodiments, the link partitioning unit may be specifically used to, if the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network indicator parameter, designate the preset primary transmission link as the primary transmission link; and designate the data transmission link with the preset link priority as the preset second priority as the secondary transmission link.
[0019] In some embodiments, the link segmentation unit may be specifically used to: if the first comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the network indicator parameter, select a data transmission link with a preset link priority of the preset second priority from the data transmission links to obtain a preset secondary transmission link; use the network quality detection result corresponding to the preset secondary transmission link as a second network quality detection result; compare the detection data corresponding to the second network quality detection result with the network indicator parameter to obtain a second comparison result; and select at least one primary transmission link and at least one secondary transmission link from the data transmission links according to the second comparison result.
[0020] In some embodiments, the link partitioning unit may be specifically used to, if the second comparison result indicates that the detection data corresponding to the second network quality detection result is higher than the network indicator parameter, designate the preset secondary transmission link as the primary transmission link; and designate the preset primary transmission link corresponding to the first network quality detection result as the secondary transmission link.
[0021] In some embodiments, the link segmentation unit may be specifically used to compare the first network quality detection result with the second network quality detection result to obtain a third comparison result if the second comparison result indicates that the detection data corresponding to the second network quality detection result is lower than the network indicator parameter; based on the third comparison result, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links.
[0022] In some embodiments, the link partitioning unit can be specifically used to: if the third comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the detection data corresponding to the second network quality detection result, use the preset primary transmission link as the primary transmission link and the preset secondary transmission link as the secondary transmission link; if the third comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result, use the preset primary transmission link as the secondary transmission link and the preset secondary transmission link as the primary transmission link.
[0023] In some embodiments, the data generation unit may be specifically used to determine the redundancy ratio corresponding to the data transmission process based on the network quality detection result corresponding to the main transmission link, wherein the redundancy ratio indicates the ratio of the redundant data packets to the data packets to be transmitted; and generate at least one redundant data packet according to the redundancy ratio and the data packets to be transmitted.
[0024] In some embodiments, the data generation unit may be specifically used to obtain a network quality index threshold and an initial redundancy ratio, take the network quality detection result corresponding to the main transmission link as the target detection result, compare the detection data corresponding to the target detection result with the network quality index threshold to obtain a fourth comparison result, and determine the redundancy ratio corresponding to the data transmission process based on the fourth comparison result.
[0025] In some embodiments, the data generation unit may be specifically used to increase the initial redundancy ratio to obtain the redundancy ratio if the detection data corresponding to the target detection result is lower than the network quality index threshold; if the detection data corresponding to the target detection result is equal to the network quality index threshold, use the initial redundancy ratio as the redundancy ratio; and if the detection data corresponding to the target detection result is higher than the network quality index threshold, decrease the initial redundancy ratio to obtain the redundancy ratio.
[0026] In some embodiments, the data generation unit may be specifically used to determine a second number of redundant data packets based on a first number of data packets to be transmitted and the redundancy ratio; select at least one data packet to be transmitted from the data packets to be transmitted as the original data packet of the redundant data packet based on the second number; and encode the original data packet according to a forward error correction algorithm to obtain the redundant data packet.
[0027] In some embodiments, the data transmission unit may be specifically used to acquire the main link network quality detection result of the main transmission link during transmission and the auxiliary link network quality detection result of the auxiliary transmission link during transmission; compare the main link network quality detection result with the auxiliary link network quality detection result to obtain a fifth comparison result; if the fifth comparison result shows that the auxiliary link network quality detection result is better than the main link network quality detection result within a preset time range, update the main transmission link to the auxiliary transmission link to obtain an updated auxiliary transmission link, and update the auxiliary transmission link to the main transmission link to obtain an updated main transmission link; transmit the remaining untransmitted data packets to the receiving end according to the updated main transmission link, and transmit the remaining untransmitted redundant data packets to the receiving end according to the updated auxiliary transmission link.
[0028] Secondly, embodiments of this application provide a data transmission method applied at a receiving end, comprising:
[0029] The receiver receives the data packet to be transmitted through the main transmission link, obtains the received data packet, and receives the redundant data packet transmitted through the secondary transmission link, obtains the received redundant data packet.
[0030] Based on the received data packets, the data integrity of the data stream to be transmitted is detected;
[0031] If the data stream to be transmitted has missing data, determine the missing data packets of the data stream to be transmitted;
[0032] Based on the received data packets and the received redundant data packets, data recovery is performed on the missing data packets to obtain the data corresponding to the missing data packets.
[0033] Accordingly, embodiments of this application provide a data transmission apparatus, including:
[0034] The data receiving unit is used to receive the data packet to be transmitted by the sending end through the main transmission link, obtain the received data packet, and receive the redundant data packet transmitted by the sending end through the secondary transmission link, obtain the received redundant data packet.
[0035] A data detection unit is used to detect the data integrity of the data stream to be transmitted based on the received data packets;
[0036] A data determination unit is used to determine the missing data packets of the data stream to be transmitted if there are missing data packets in the data stream to be transmitted.
[0037] The data recovery unit is used to recover the missing data packet based on the received data packet and the received redundant data packet, so as to obtain the data corresponding to the missing data packet.
[0038] In some embodiments, the data recovery unit may be specifically used to filter out target data packets that are associated with the missing data packets from the received data packets; filter out target redundant data packets that are associated with the missing data packets from the received redundant data packets; and perform decoding calculations based on the target data packets and the target redundant data packets to obtain the data corresponding to the missing data packets.
[0039] Furthermore, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the data transmission method provided in embodiments of this application.
[0040] Furthermore, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the data transmission method provided in embodiments of this application.
[0041] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the data transmission methods provided in embodiments of this application.
[0042] In this embodiment, the sending end obtains at least one data packet corresponding to the data stream to be transmitted and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time. Then, it obtains the network quality detection result of each data transmission link and, based on the network quality detection result, selects at least one primary transmission link and at least one secondary transmission link from the data transmission links, with the primary transmission link having a higher link priority than the secondary transmission link. Then, based on the network quality detection result corresponding to the primary transmission link and the data packet to be transmitted, at least one redundant data packet is generated. The redundant data packet is used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet. Finally, the data packet to be transmitted is transmitted to the receiving end according to the primary transmission link, and the redundant data packet is transmitted to the receiving end according to the secondary transmission link. This scheme can be used in multi-network transmission communication scenarios. It adaptively adjusts the link priority of each data transmission link according to the network status of each link at the current moment, and uses the data transmission link with higher link priority as the main transmission link. Based on the network status of the main transmission link and the data packet to be transmitted, it adaptively encodes and generates redundant data packets. Finally, the data packet to be transmitted is transmitted to the receiving end through the main transmission link, and the redundant data packet is transmitted to the receiving end through the auxiliary transmission link. This allows the data packet to be transmitted and the redundant data packet to be aggregated at the receiving end. The above scheme can effectively save the amount of network transmission data of the redundant transmission scheme without significantly affecting the performance of the redundant transmission. It can ensure the reliability of data transmission, effectively alleviate users' concerns about traffic consumption, and reduce the network cost of the cloud gateway. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram illustrating the principle of redundant transmission schemes in existing technologies;
[0045] Figure 2 This is a schematic diagram illustrating the principle of an aggregation transmission scheme in existing technology;
[0046] Figure 3 A schematic diagram of an Internet connection based on the Fast User Datagram Protocol in a traditional Hypertext Transfer Protocol stack;
[0047] Figure 4 This is a schematic diagram of an application scenario of the data transmission method provided in the embodiments of this application;
[0048] Figure 5This is a flowchart illustrating a data transmission method provided in an embodiment of this application;
[0049] Figure 6 This is a schematic diagram illustrating the process of determining the primary transmission link and the secondary transmission link provided in an embodiment of this application;
[0050] Figure 7 This is a schematic diagram of the data transmission paths corresponding to different data packets provided in the embodiments of this application;
[0051] Figure 8 This is another schematic flowchart of the data transmission method provided in the embodiments of this application;
[0052] Figure 9 This is a schematic diagram illustrating another application scenario of the data transmission method provided in the embodiments of this application;
[0053] Figure 10 This is a data interaction diagram of the data transmission method provided in the embodiments of this application;
[0054] Figure 11 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;
[0055] Figure 12 This is a schematic diagram of another data transmission device provided in an embodiment of this application;
[0056] Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0057] The technical solutions described below, with reference to the accompanying drawings, will be clearly and completely described. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0058] Before introducing the technical solution of this application, the redundant transmission scheme and aggregated transmission scheme in the prior art will be described below, and the relevant knowledge of the technical solution of this application will be explained.
[0059] Figure 1 A schematic diagram illustrating the principle of redundant transmission schemes in the prior art is shown. Taking game application software as an example, such as... Figure 1As shown, game accelerator applications generally incorporate 5G+WIFI redundancy. The basic principle is as follows: In the uplink direction, the accelerator application on the terminal copies the game data packets and sends them simultaneously to the game acceleration gateway via both 5G and WIFI links. The game acceleration gateway then performs deduplication and sends the correctly received data packets to the game server. The downlink direction is similar.
[0060] The principle of redundant transmission is that data packets are sent simultaneously on two network links, such as... Figure 1 In this system, data packets 1 and 2 can be successfully received if either packet is transmitted correctly, thus reducing network latency and jitter. This means that more network resources are consumed to ensure data transmission performance and reliability. However, considering that gaming services are not sensitive to packet loss, an unreliable transmission mode is generally used. In redundant transmission schemes, as the name suggests, the amount of data transmitted is directly doubled, resulting in a significant waste of network resources. Especially since data transmission must be done through mobile cellular networks (such as 5G), this leads to increased cellular data consumption and increased phone power consumption, potentially causing user concerns and resistance to this feature.
[0061] Figure 2 A schematic diagram illustrating the principle of an existing aggregation transmission scheme is shown. Taking a live streaming application as an example, such as... Figure 2 As shown, the aggregation transmission scheme allocates different data packets for the same service to different networks for transmission based on the quality of different network links. For example... Figure 2 For live video data, the multi-network transmission application transmits data packets 1 and 3 via the 5G network, while data packets 2 and 4 are transmitted via the WiFi network. The multi-network transmission gateway then aggregates the data, restoring it to the original business data stream before transmitting it to the final business origin server (such as the live streaming server). The advantage of aggregated transmission is that it can fully utilize the capacity of both networks, providing greater network bandwidth for the business, and avoids redundant data transmission, saving network traffic. However, if packet loss occurs during data transmission, the lost data packets or all data packets need to be retransmitted.
[0062] Quick UDP Internet Connection (QUIC) is a low-latency internet transport layer protocol based on the User Datagram Protocol (UDP). QUIC primarily addresses issues encountered by the Transmission Control Protocol (TCP) in practical applications, such as header blocking, low congestion control efficiency, connection termination due to changes in Internet Protocol (IP) / port, three-way handshake overhead, and relatively low out-of-band control efficiency. In summary, QUIC can essentially be seen as a transport protocol to replace TCP. It is based on the User Datagram Protocol (UDP) and generally operates in user space. QUIC's advantages include: 1-Round-Trip Time (RTT) connection establishment (0-RTT direct packet transmission with a pre-shared secret (PSK) buffer); flexible congestion control mechanisms with customizable congestion control algorithms; multiplexing to alleviate head-of-line blocking symptoms; support for connection migration; and superior performance compared to TCP.
[0063] Figure 3 This diagram illustrates an Internet connection based on the Fast User Datagram Protocol (HUDP) within a traditional Hypertext Transfer Protocol (HTP) stack. Figure 3 This diagram illustrates QUIC in a traditional HTTPS protocol stack. Figure 3 The protocol stack shown indicates that QUIC = HTTP / 2 + TLS + UDP.
[0064] Among them, Hypertext Transfer Protocol version 2 (HTTP / 2): HTTP / 2 can be simply referred to as h2 (encrypted connection based on TLS / 1.2 or above) or h2c (unencrypted connection), and is the second major version of the HTTP protocol used on the World Wide Web.
[0065] HTTP / 2shim: HTTP / 2shim is HTTP / 2 with a shim. A shim is a small function library used to transparently intercept API calls, modify passed parameters, process operations themselves, or redirect operations elsewhere. Shims are primarily used to solve compatibility issues of legacy applications on newer Windows systems, but they can also be used for other purposes.
[0066] Transport Layer Security (TLS) is a protocol built on top of the TCP protocol in the transport layer. It serves the application layer and its predecessor was Secure Socket Layer (SSL). It implements the function of encrypting application layer messages before handing them over to TCP for transmission.
[0067] Datagram Transport Layer Security (DTLS) is a protocol that extends the existing TLS protocol architecture to support UDP, as TLS cannot guarantee the security of data transmitted over UDP. In other words, it becomes a version of TLS that supports data packet transport.
[0068] User Datagram Protocol (UDP) is a simple datagram-oriented transport layer protocol. IETF RFC 768 is the official specification for UDP. In the TCP / IP model, UDP provides a simple interface between the network layer and above the application layer. UDP only provides unreliable data delivery; once it sends the data sent to the network layer by the application, it does not retain a backup (therefore, UDP is sometimes considered an unreliable datagram protocol). UDP only adds multiplexing and data checksum fields to the header of IP datagrams. Due to its lack of reliability, UDP applications must generally allow for a certain amount of packet loss, errors, and duplication.
[0069] Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol defined by IETF RFC 793. In the simplified OSI model of computer networks, it performs the functions specified by Layer 4, the transport layer. User Datagram Protocol (UDP) is another important transport protocol within the same layer. In the Internet protocol suite, the TCP layer is an intermediate layer above the IP layer and below the application layer. Application layers on different hosts often require reliable, pipe-like connections, but the IP layer does not provide such a streaming mechanism; instead, it provides unreliable packet switching.
[0070] The Internet Protocol (IP) is a protocol used in packet-switched data networks. Its sole task is to transmit data based on the addresses of the source and destination hosts. The Internet Protocol defines the addressing methods and the datagram encapsulation structure.
[0071] Therefore, the QUIC protocol provides a secure, multiplexed connection for transmitting reliable streams of application data, which are sent using streaming data frames (STREAM frames). However, some applications, especially those requiring real-time data transmission, are better suited to unreliable data transmission. Accordingly, QUIC extensions support unreliable data transmission by defining new data frame types. Transmitting unreliable data via QUIC offers the following advantages: (1) Reliable QUIC streams and unreliable QUIC datagrams can share handshakes and authentication, reducing handshake latency compared to TLS / DTLS connections; (2) QUIC uses a more granular packet loss recovery mechanism than DTLS handshakes, enabling faster packet loss recovery for QUIC data; (3) Although QUIC datagrams are unreliable, they support acknowledgments, allowing applications to know whether they have successfully received the datagram; (4) QUIC has congestion control mechanisms. These features are very useful for optimizing gaming applications and other real-time applications (such as instant audio / video streaming applications).
[0072] MPQUIC (Multipath QUIC) is a multipath transmission technology based on the QUIC protocol. MP-QUIC is a multipath version of single-path QUIC. MPQUIC supports multipath transmission on the basis of the QUIC protocol, similar to MPTCP, but with better performance and security. At present, the mainstream multi-network infrastructure framework in the industry has the MP-QUIC protocol, which has basic functions such as packet encapsulation, packet loss recovery, buffer management, and multipath management. As an extension of QUIC, Multipath QUIC is designed with the following considerations: (1) reuse the original QUIC as much as possible, such as reusing the path validation mechanism and connection migration mechanism of QUIC; (2) use the same packet header as QUIC; (3) congestion control, round-trip time measurement, and path maximum transmission unit (PMTU) detection are implemented on a per-physical-link basis; (4) the path is uniquely identified by an IP quadruple.
[0073] In terms of path management, MPQUIC can use multiple paths simultaneously for data transmission, dynamically adjusting based on path quality assessments (such as packet loss rate and latency). Regarding connection management, MPQUIC's fast connection recovery and encrypted transmission features give it an advantage in path switching and fault recovery; even when paths change, connections can be quickly restored, ensuring continuous data transmission. In terms of traffic allocation, MPQUIC can flexibly allocate traffic and optimize transmission performance through real-time path monitoring. Its flexible flow control mechanism can adjust data transmission strategies in real time based on path conditions.
[0074] This application provides a data transmission method, apparatus, electronic device, and computer-readable storage medium. The data transmission apparatus can be integrated into an electronic device, which may be a server or a terminal, etc. Specifically, this application provides a data transmission apparatus suitable for a first electronic device (which may be referred to as a transmitting end for distinction) and a data transmission apparatus suitable for a second electronic device (which may be referred to as a receiving end for distinction).
[0075] The first electronic device can be a device for sending data, such as a router, gateway, etc. The first electronic device also supports multiple network transmission protocols based on MPQUIC. For example, the first electronic device can support the simultaneous transmission of the data stream to be transmitted using network transmission methods such as wireless network communication network (WiFi) and cellular network (such as 4G, 5G, etc.).
[0076] The second electronic device can be a device used to receive data sent by the first electronic device, such as a router, gateway, or service server. For example, when the first electronic device is a router, the second electronic device can be a gateway. The second electronic device also supports multiple network transmission protocols based on MPQUIC. For example, the second electronic device can simultaneously receive data streams to be transmitted through wireless network communication networks (WiFi) and cellular networks (such as 4G, 5G, etc.).
[0077] The first electronic device and the second electronic device can establish a communication connection through the MPQUIC protocol. For example, the first electronic device and the second electronic device can simultaneously establish a communication connection through wireless network communication network, cellular network, and other networks.
[0078] This application embodiment will use an example of a first electronic device as an end-side multi-network transmission device (transmitter) in the uplink direction and a second electronic device as a cloud transmission device (receiver) in the uplink direction to describe the data transmission method. It should be understood that in the downlink direction, the cloud transmission device can act as the transmitter, while the end-side multi-network transmission device can act as the receiver.
[0079] Figure 4 A schematic diagram illustrating an application scenario of the data transmission method provided in an embodiment of this application is shown. For example... Figure 4 As shown, the sending end can establish a communication connection with the receiving end via the MPQUIC protocol. The sending end and the receiving end can establish communication connections through two or more networks, where n is a natural number greater than 1. The networks between the sending end and the receiving end can be wireless network communication networks, cellular networks, and other network types. Furthermore, the sending end can also establish a communication connection with a multi-network transmission controller, and the receiving end can also establish a communication connection with the multi-network transmission controller. The multi-network transmission controller is generally centrally deployed in the cloud and can interact with the sending end and the receiving end through signaling, primarily responsible for configuration management, authentication, and other functions.
[0080] Based on this, the sending end can obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current moment; obtain the network quality detection result of each data transmission link, and based on the network quality detection result, select at least one primary transmission link and at least one secondary transmission link among the data transmission links, with the primary transmission link having a higher link priority than the secondary transmission link; generate at least one redundant data packet according to the network quality detection result corresponding to the primary transmission link and the data packet to be transmitted, the redundant data packet being used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet; transmit the data packet to be transmitted to the receiving end according to the primary transmission link, and transmit the redundant data packet to the receiving end according to the secondary transmission link.
[0081] For the receiving end, it can receive the data packets to be transmitted from the sending end through the main transmission link to obtain the received data packets, and receive the redundant data packets transmitted from the sending end through the secondary transmission link to obtain the received redundant data packets; based on the received data packets, it can detect the data integrity of the data stream to be transmitted; if there is data missing in the data stream to be transmitted, it can determine the missing data packets of the data stream to be transmitted; based on the received data packets and the received redundant data packets, it can perform data recovery on the missing data packets to obtain the data corresponding to the missing data packets.
[0082] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0083] This embodiment will be described from the perspective of a data transmission device, which can be integrated into a first electronic device. The first electronic device can be an end-side multi-network transmission device in the uplink direction, i.e., a sending end. The end-side multi-network transmission device and the cloud transmission device establish an MP-QUIC tunnel for multi-network transmission communication.
[0084] A data transmission method includes: acquiring at least one data packet to be transmitted corresponding to a data stream to be transmitted, and determining at least two data transmission links corresponding to the data stream to be transmitted at the current time; detecting the network quality of the data transmission links to obtain a network quality detection result for each data transmission link; based on the network quality detection result, dividing the data transmission links into a primary transmission link and a secondary transmission link, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link; generating at least one redundant data packet according to the network quality detection result corresponding to the primary transmission link and the data packet to be transmitted, wherein the redundant data packet is used to recover data from data packets to be transmitted lost during data transmission; transmitting the data packet to be transmitted to the receiving end according to the primary transmission link, and transmitting the redundant data packet to the receiving end according to the secondary transmission link.
[0085] Figure 5 A flowchart illustrating a data transmission method provided in an embodiment of this application is shown. Figure 5 As shown, the specific process of this data transmission method is as follows:
[0086] 101. Obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current time.
[0087] A data stream is an ordered sequence of bytes with a start and an end. In this embodiment, the data stream to be transmitted can be understood as the data stream that the sending end is about to transmit. The type of data stream to be transmitted can be various, such as video data, audio data, image data, text data, etc.
[0088] In packet-switched networks, messages are divided into multiple data blocks, called data packets. These data packets are then transmitted along different paths in one or more networks and reassembled at their destination. In this embodiment, the data packet to be transmitted can be understood as at least two data blocks obtained by dividing the data stream to be transmitted.
[0089] A data transmission link can be understood as a network available for multi-network transmission and communication between the sending and receiving ends via an MP-QUIC tunnel. Data transmission links can be wireless network communication networks (WiFi), cellular networks (such as 4G, 5G, etc.), and other types of networks.
[0090] Determining at least two data transmission links corresponding to the data stream to be transmitted at the current moment may include: obtaining a preset data transmission link and detecting the network status of the preset data transmission link at the current moment; if the network status indicates that the preset data transmission link is an available link, then the preset data transmission link is used as the data transmission link corresponding to the data stream to be transmitted.
[0091] Preset data transmission links can include wireless network communication networks (WiFi), cellular networks (such as 4G, 5G, etc.), and other types of networks. The difference between a preset data transmission link and a data transmission link is that a data transmission link is selected from the preset data transmission links, and only preset data transmission links whose network status is currently available can be used as data transmission links. That is, if there are three preset data transmission links, namely preset data transmission link 1, preset data transmission link 2, and preset data transmission link 3, if all three are currently available in the network status, then preset data transmission link 1, preset data transmission link 2, and preset data transmission link 3 are all data transmission links. If only two of the preset data transmission links are currently available in the network status, for example, preset data transmission link 1 and preset data transmission link 2 are currently available in the network status, then preset data transmission link 1 and preset data transmission link 2 can be used as data transmission links, while preset data transmission link 3 cannot be used as a data transmission link.
[0092] It should be noted that if only one of the multiple preset data transmission links is in a network state that is available at the current time, then since there is only one preset data transmission link in a state that is available, it does not meet the basic requirement of multi-network transmission communication through MP-QUIC tunnel in this application embodiment. In this case, the data transmission method provided in this application embodiment cannot be started.
[0093] 102. Obtain the network quality detection results for each data transmission link, and based on the network quality detection results, select at least one primary transmission link and at least one secondary transmission link from the data transmission links, with the primary transmission link having a higher link priority than the secondary transmission link.
[0094] After identifying at least two data transmission links, the network quality detection results for each data transmission link can be obtained. In this embodiment, there are several ways to obtain the network quality detection results for each data transmission link. For example, the sending end can directly detect the network quality of each data transmission link to obtain the network quality detection results for each link. During the network quality detection process for each data transmission link, several network metrics can be used, such as transmission rate and network latency. Alternatively, the sending end can send a network quality detection request for the data transmission link to the multi-network transmission controller. Upon receiving the request, the multi-network transmission controller will perform real-time network quality detection and return the results to the sending end, thus providing the sending end with the network quality detection results for each data transmission link. During the network quality detection process for each data transmission link using the multi-network transmission controller, network metrics such as transmission rate and network latency can also be detected.
[0095] After determining the network quality detection results for each data transmission link, at least one primary transmission link and at least one secondary transmission link can be selected from the data transmission links based on these results. In this embodiment, selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links can be understood as dividing the data transmission links into two types: primary transmission links and secondary transmission links. Figure 6 A schematic diagram illustrating the process of determining the primary and secondary transmission links provided in an embodiment of this application is shown. Figure 6 As shown, based on the network quality detection results, the data transmission links are divided into primary transmission links and secondary transmission links, which can be further divided into the following two cases:
[0096] The first scenario: Obtain the transmission attribute information of the data transmission link; if the transmission attribute information indicates that the data transmission link has a preset link priority, based on the network quality detection results and the preset link priority, select at least one primary transmission link and at least one secondary transmission link from the data transmission links.
[0097] The transmission attribute information can be understood as the link allocation information pre-configured for the data transmission link. For example, for any data transmission link, it is pre-configured as either a primary transmission link type or a secondary transmission link type.
[0098] If each data transmission link has been pre-configured to indicate its type, the transmission attribute information indicates that the data transmission link has a preset link priority (corresponding to the first case); otherwise, if each data transmission link has not been pre-configured to indicate its type, the transmission attribute information indicates that the data transmission link does not have a preset link priority (corresponding to the second case, which will be introduced later).
[0099] In the first case, when the transmission attribute information indicates that there is a preset link priority for the data transmission link, the data transmission link can be divided into a main transmission link and a secondary transmission link based on the network quality detection result and the preset link priority corresponding to each data transmission link.
[0100] In this embodiment, the preset link priority includes a preset first priority. The data transmission link corresponding to the preset first priority is a preset primary transmission link. Based on this, and based on the network quality detection result and the preset link priority, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links. This can include: obtaining the network indicator parameters corresponding to the preset first priority, and selecting the data transmission links with the preset link priority as the preset first priority from the data transmission links to obtain the preset primary transmission links; using the network quality detection result corresponding to the preset primary transmission link as the first network quality detection result; comparing the detection data corresponding to the first network quality detection result with the network indicator parameters to obtain a first comparison result; and selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the first comparison result.
[0101] The network metric parameters corresponding to the preset first priority can be understood as the network metric requirements configured for the data transmission link of the preset first priority. These requirements may include transmission rate requirements, network latency requirements, etc. The network metric parameters can be configured according to actual conditions. Due to the specific nature of network metrics, these parameters can be range-defined, for example, network latency ≤ 50ms, speed ≥ 10Mbps, etc. After configuration, the network metric parameters can be adjusted according to actual conditions.
[0102] In this embodiment, the data transmission link with a preset link priority of first preset priority is designated as the preset primary transmission link. Taking two communication links—a WiFi network and a 5G cellular network—as an example, if the preset link priority of the WiFi network is first preset priority, then the WiFi network is the preset primary transmission link. Similarly, if the preset link priority of the 5G cellular network is first preset priority, then the 5G cellular network is the preset primary transmission link. It should be noted that, given two data transmission links, only one of them can be designated as the preset primary transmission link, not both simultaneously. Generally, the WiFi network is configured as the preset primary transmission link.
[0103] After determining the preset primary transmission link, to facilitate differentiation, the network quality detection result corresponding to the preset primary transmission link can be used as the first network quality detection result. Network indicator parameters can then be compared with the detection data corresponding to the first network quality detection result to determine whether the preset primary transmission link can be used as the actual primary transmission link. Taking WiFi as the preset primary transmission link as an example, the detection data in the first network quality detection result corresponding to the WiFi network can be compared with the network indicator parameters to obtain the first comparison result. Based on the first comparison result, the WiFi network and the 5G cellular network can be divided into primary transmission links and secondary transmission links.
[0104] The preset link priority also includes a preset second priority. The data transmission link corresponding to the preset second priority is the preset secondary transmission link. For example, if the preset link priority of a WiFi network is the preset first priority, and the preset link priority of a 5G cellular network is the preset second priority, then the 5G cellular network is the preset secondary transmission link. Based on this, according to the first comparison result, dividing the data transmission link into a primary transmission link and a secondary transmission link can have two possibilities:
[0105] (1) If the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network index parameter, the preset main transmission link is used as the main transmission link; the data transmission link with the preset link priority as the preset second priority is used as the auxiliary transmission link.
[0106] For example, if the detection data in the first network quality test result for the WiFi network is: network latency = 30ms, transmission rate = 15Mbps, as mentioned earlier, since the network indicator parameters are configured as: network latency ≤ 50ms, transmission rate ≥ 10Mbps, after comparing the detection data in the first network quality test result with the network indicator parameters, it can be determined that the detection data corresponding to the first network quality test result is higher than the network indicator parameters. In this case, the WiFi network can be directly used as the primary transmission link, and the 5G cellular network as the secondary transmission link.
[0107] It should be noted that the "higher than" in the network indicator parameters for the first network quality test result can be understood as "better than" or "meets" the requirements. That is, the test data for the first network quality test result does not necessarily mean that the numerical value is greater than the network indicator parameters, but rather that the data demonstrates better or equal performance in the corresponding performance indicators. For example, for network latency, a higher value indicates longer latency and worse network quality. Similarly, for transmission rate, a higher value indicates higher network quality. The network indicator parameters configured as network latency ≤ 50ms and transmission rate ≥ 10Mbps mean that the maximum latency is limited to 50ms and the minimum transmission rate is limited to 10Mbps. Since the test data in the first network quality test result shows a network latency of 30ms and a transmission rate of 15Mbps, this network latency is less than the maximum latency specified in the network indicator parameters, and the transmission rate is higher than the minimum transmission rate specified in the network indicator parameters. Therefore, it can be determined that the test data for the first network quality test result is better than the network indicator parameters.
[0108] Furthermore, in comparing the detection data corresponding to the first network quality detection result with the network indicator parameters, each performance item in the detection data corresponding to the first network quality detection result must be higher than the performance of the corresponding item in the network indicator parameters. For example, if the detection data in the first network quality detection result for a WiFi network is: network latency = 30ms, transmission rate = 8Mbps, then because the transmission rate is lower than the lower limit of the transmission rate in the network indicator parameters, the detection data in the first network quality detection result is lower than the network indicator parameters.
[0109] Furthermore, if the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network indicator parameters, then there is no need to compare the detection data in the network quality detection result corresponding to the preset secondary transmission link with the network indicator parameters. The preset secondary transmission link can be directly determined as the secondary transmission link.
[0110] (2) If the first comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the network index parameter, select the data transmission link with the preset link priority as the preset second priority from the data transmission links to obtain the preset auxiliary transmission link; take the network quality detection result corresponding to the preset auxiliary transmission link as the second network quality detection result; compare the detection data corresponding to the second network quality detection result with the network index parameter to obtain the second comparison result; according to the second comparison result, select at least one main transmission link and at least one auxiliary transmission link from the data transmission links.
[0111] For example, if the detection data in the first network quality test result for a WiFi network is: network latency = 55ms, speed = 8Mbps, and as mentioned earlier, the network indicator parameters are configured as: network latency ≤ 50ms, transmission speed ≥ 10Mbps. After comparing the detection data in the first network quality test result with the network indicator parameters, it can be determined that the detection data corresponding to the first network quality test result is lower than the network indicator parameters. In this case, the network quality test result corresponding to the preset secondary transmission link needs to be used as the second network quality test result, and it needs to be determined whether the detection data corresponding to the second network quality test result is higher than the network indicator parameters, so as to distinguish between the primary transmission link and the secondary transmission link based on different results.
[0112] Specifically, the detection data corresponding to the second network quality detection result can be compared with the network indicator parameters to obtain a second comparison result. Based on the second comparison result, at least one primary transmission link and at least one secondary transmission link can be selected from the data transmission links. For example, the detection data in the second network quality detection result corresponding to the 5G cellular network can be compared with the network indicator parameters to obtain a second comparison result. Based on the second comparison result, it can be determined whether the WiFi network or the 5G cellular network is the primary transmission link and the secondary transmission link.
[0113] It should be noted that the "lower than" in the network index parameters, corresponding to the first network quality test result, can be understood as "inferior to", "worse than", or "not meeting". That is, the test data corresponding to the first network quality test result is not numerically less than the network index parameters, but rather shows a worse performance than the network index parameters in the corresponding performance indicators.
[0114] Based on the second comparison result, selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links may also present two possibilities:
[0115] (2A) If the second comparison result indicates that the detection data corresponding to the second network quality detection result is higher than the network index parameter, the preset secondary transmission link is used as the primary transmission link; the preset primary transmission link corresponding to the first network quality detection result is used as the secondary transmission link.
[0116] For example, if the detection data in the second network quality test result for the 5G cellular network is: network latency = 45ms, transmission rate = 12Mbps, as mentioned earlier, since the network indicator parameters are configured as: network latency ≤ 50ms, transmission rate ≥ 10Mbps, after comparing the detection data in the second network quality test result with the network indicator parameters, it can be determined that the detection data corresponding to the second network quality test result is higher than the network indicator parameters. In this case, the 5G cellular network can be directly used as the primary transmission link, and the WiFi network as the secondary transmission link.
[0117] It should be noted that the "higher than" in the network index parameters for the second network quality test results can be understood as "better than" or "satisfied with". That is, the test data corresponding to the second network quality test results is not numerically greater than the network index parameters, but rather shows better or equal performance than the network index parameters in the corresponding performance indicators.
[0118] Furthermore, in the process of comparing the detection data corresponding to the second network quality detection result with the network index parameters, each performance item in the detection data corresponding to the second network quality detection result needs to be higher than the performance of the corresponding item in the network index parameters.
[0119] (2B) If the second comparison result indicates that the detection data corresponding to the second network quality detection result is lower than the network index parameter, the first network quality detection result is compared with the second network quality detection result to obtain the third comparison result; based on the third comparison result, at least one main transmission link and at least one auxiliary transmission link are selected in the data transmission link.
[0120] For example, if the detection data in the second network quality test result for a 5G cellular network is: network latency = 70ms, transmission rate = 5Mbps. As mentioned earlier, since the network indicator parameters are configured as: network latency ≤ 50ms, transmission rate ≥ 10Mbps, after comparing the detection data in the second network quality test result with the network indicator parameters, it can be determined that the detection data corresponding to the second network quality test result is lower than the network indicator parameters. At this time, it is necessary to perform a horizontal comparison between the first network quality test result and the second network quality test result to obtain a third comparison result. Based on the third comparison result, at least one primary transmission link and at least one secondary transmission link are selected in the data transmission links.
[0121] It should be noted that the "lower than" in the network index parameters for the second network quality test result can be understood as "inferior to", "worse than", or "not meeting". That is, the test data corresponding to the second network quality test result is not numerically less than the network index parameters, but rather shows worse performance than the network index parameters in the corresponding performance indicators.
[0122] Based on the third comparison result, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links. This process may involve two scenarios:
[0123] (2B-1) If the third comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the detection data corresponding to the second network quality detection result, the preset main transmission link is used as the main transmission link, and the preset secondary transmission link is used as the secondary transmission link.
[0124] For example, if the first network quality test result for the WiFi network shows network latency of 55ms and a data rate of 8Mbps, and the second network quality test result for the 5G cellular network shows network latency of 70ms and a data rate of 5Mbps, comparing the data from the first and second network quality test results shows that the data from the first network quality test is higher than that from the second. In this case, the preset primary transmission link (WiFi network) can be used as the primary transmission link, and the preset secondary transmission link (5G cellular network) can be used as the secondary transmission link.
[0125] (2B-2) If the third comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result, the preset main transmission link is used as the secondary transmission link, and the preset secondary transmission link is used as the main transmission link.
[0126] For example, if the first network quality test result for the WiFi network shows network latency of 55ms and transmission rate of 8Mbps, and the second network quality test result for the 5G cellular network shows network latency of 52ms and transmission rate of 9Mbps, comparing the data from the first and second network quality test results shows that the data from the first network quality test is lower than that from the second. In this case, the preset primary transmission link (WiFi network) can be used as the secondary transmission link, and the preset secondary transmission link (5G cellular network) can be used as the primary transmission link.
[0127] It should be noted that when comparing the detection data corresponding to the first network quality detection result with the detection data corresponding to the second network quality detection result, if each network quality detection result includes at least two network performance data points—for example, if the first and second network quality detection results include detection data corresponding to network latency and detection data corresponding to transmission rate—then the detection data corresponding to network latency in the first network quality detection result can be compared with the detection data corresponding to network latency in the second network quality detection result, and the detection data corresponding to transmission rate in the first network quality detection result can be compared with the detection data corresponding to transmission rate in the second network quality detection result. The two comparison results are then weighted and summed. The primary transmission link and secondary transmission link are determined based on the weighted sum. The weighting coefficients for each comparison result can be configured according to actual conditions. For example, if the detection data in the first network quality detection result for a WiFi network is: network latency = 55ms, transmission rate = 8Mbps; and the detection data in the second network quality detection result for a 5G cellular network is: network latency = 52ms, transmission rate = 15Mbps. The difference between the first network quality detection result and the second network quality detection result can be calculated. The difference in network latency is 55 - 52 = 3, and the difference in transmission rate is 8 - 15 = -7. If the weighting coefficient for the network latency difference is 0.6 and the weighting coefficient for the transmission rate difference is 0.4, then the weighted sum of the network latency difference and the transmission rate difference is: 3 * 0.6 + (-7) * 0.4 = 1.8 - 2.8 = -1. Since -1 < 0, it means that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result. In this case, the preset primary transmission link (WiFi network) can be used as the primary transmission link, and the preset secondary transmission link (5G cellular network) can be used as the secondary transmission link.
[0128] The second scenario: Obtain the transmission attribute information of the data transmission link; if the transmission attribute information indicates that the data transmission link does not have a preset link priority, sort the link priorities of the data transmission links according to the network quality detection results, and select at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the sorting results.
[0129] like Figure 6As shown, if each data transmission link is not pre-configured to determine its type, the transmission attribute information indicates that there is no preset link priority for the data transmission links. In this case, the link priorities of the data transmission links are directly sorted according to the network quality detection results, and the data transmission links are divided into primary transmission links and secondary transmission links based on the sorting results. Taking a data transmission link consisting of two transmission links, WiFi and 5G cellular networks, as an example, the network quality detection results corresponding to the WiFi network and the 5G cellular network can be directly compared. If the network quality detection result of the WiFi network is better than that of the 5G cellular network, then the WiFi network is designated as the primary transmission link and the 5G cellular network as the secondary transmission link; conversely, if the network quality detection result of the 5G cellular network is better than that of the WiFi network, then the 5G cellular network is designated as the primary transmission link and the WiFi network as the secondary transmission link.
[0130] When comparing the test data corresponding to each network quality test result, you can refer to the weighted summation method in step 2B-2 above, which will not be elaborated here.
[0131] It should be understood that when there are three or more data transmission links, the number of data transmission links corresponding to the primary transmission link and the number of data transmission links corresponding to the secondary transmission links can be pre-configured. Then, the primary and secondary transmission links are determined based on the link priority ranking. For example, if there are three data transmission links: data transmission link 1, data transmission link 2, and data transmission link 3, the number of data transmission links corresponding to the primary transmission link can be flexibly configured to be 1, and the number of data transmission links corresponding to the secondary transmission links can be configured to be 2. Based on this, if the link priorities of the three data transmission links are, from highest to lowest, as follows: data transmission link 2, data transmission link 3, and data transmission link 1, then data transmission link 2 can be determined as the primary transmission link, and data transmission link 3 and data transmission link 1 as secondary transmission links.
[0132] 103. Based on the network quality detection results corresponding to the main transmission link and the data packets to be transmitted, generate at least one redundant data packet. The redundant data packet is used by the receiving end to recover the data packets to be transmitted after receiving the redundant data packet.
[0133] Among them, redundant data packets are called redundant packets. Redundant packets, also known as backup packets, are a data backup mechanism outside the main data transmission path. They can recover data packets lost on the main transmission link when the data packets to be transmitted fail, thereby ensuring data integrity and avoiding data loss.
[0134] In this embodiment of the application, generating at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted may include: determining the redundancy ratio corresponding to the data transmission process based on the network quality detection result corresponding to the main transmission link, wherein the redundancy ratio indicates the ratio of the redundant data packet to the data packet to be transmitted; and generating at least one redundant data packet based on the redundancy ratio and the data packet to be transmitted.
[0135] The redundancy ratio is determined based on the network quality test results of the main transmission link. Generally, if the network quality test results indicate that the network quality of the main transmission link is better, the redundancy ratio is lower, meaning that with a fixed number of data packets to be transmitted, fewer redundant data packets need to be generated. Conversely, if the network quality test results indicate that the network quality of the main transmission link is better, the redundancy ratio is higher, meaning that with a fixed number of data packets to be transmitted, more redundant data packets need to be generated.
[0136] The process of determining the redundancy ratio of the data transmission process based on the network quality detection results corresponding to the main transmission link may include: obtaining the network quality index threshold and the initial redundancy ratio; using the network quality detection results corresponding to the main transmission link as the target detection results; comparing the detection data corresponding to the target detection results with the network quality index threshold to obtain a fourth comparison result; and determining the redundancy ratio of the data transmission process based on the fourth comparison result.
[0137] Network quality indicator thresholds can be understood as the network quality indicators that the main transmission link should possess, matching the initial redundancy ratio. Different initial redundancy ratios result in different network quality indicator thresholds. The initial redundancy ratio can be configured according to actual conditions, and correspondingly, the network quality indicator thresholds are determined after the initial redundancy ratio is configured.
[0138] In this embodiment, the redundancy ratio needs to be determined based on the network quality corresponding to the main transmission link. For ease of differentiation, the network quality detection result corresponding to the main transmission link is used as the target detection result. Then, the detection data corresponding to the target detection result can be compared with the network quality index threshold, and the redundancy ratio is determined based on the fourth comparison result obtained from this comparison.
[0139] Specifically, determining the redundancy ratio corresponding to the data transmission process based on the fourth comparison result may include: if the detection data corresponding to the target detection result is lower than the network quality index threshold, increasing the initial redundancy ratio to obtain the redundancy ratio; if the detection data corresponding to the target detection result is equal to the network quality index threshold, using the initial redundancy ratio as the redundancy ratio; if the detection data corresponding to the target detection result is higher than the network quality index threshold, decreasing the initial redundancy ratio to obtain the redundancy ratio.
[0140] The following example illustrates the situation with an initial redundancy ratio of 1 / 2 and network quality metric thresholds matching this initial redundancy ratio: network latency = 60ms and transmission rate = 10Mbps.
[0141] If the target detection result corresponds to the following detection data: network latency = 70ms, transmission rate = 8Mbps, it means that the target detection result corresponds to a detection data below the network quality index threshold. In this case, the redundancy ratio can be increased based on the initial redundancy ratio, for example, it can be increased to 2 / 3, and the redundancy ratio will be 2 / 3.
[0142] If the detection data corresponding to the target detection result is: network latency = 70ms, transmission rate = 12Mbps, although the transmission rate in the detection data corresponding to the target detection result is higher than the transmission rate in the network quality index threshold, the network latency in the detection data corresponding to the target detection result is longer. Therefore, it is still determined that the detection data corresponding to the target detection result is lower than the network quality index threshold. In this case, the initial redundancy ratio can be increased, for example, to 2 / 3 or another ratio value, resulting in a redundancy ratio of 2 / 3 or another ratio value. Similarly, if any network performance in the detection data corresponding to the target detection result is lower than the network performance corresponding to the network quality index, it is determined that the detection data corresponding to the target detection result is lower than the network quality index threshold. Therefore, the initial redundancy ratio needs to be increased to obtain the redundancy ratio.
[0143] If the detection data corresponding to the target detection result is: network latency = 60ms, transmission rate = 10Mbps, it means that the detection data corresponding to the target detection result is equal to the network quality index threshold. In this case, the initial redundancy ratio can be directly used as the redundancy ratio, which is 1 / 2.
[0144] If the detection data corresponding to the target detection result is: network latency = 50ms, transmission rate = 12Mbps, it means that the detection data corresponding to the target detection result is higher than the network quality index threshold. In this case, the redundancy ratio can be reduced from the initial redundancy ratio, for example, it can be reduced to 1 / 3, and the redundancy ratio is 1 / 3.
[0145] When the redundancy ratio is 1 / 2, it means that one redundant data packet needs to be generated for every two data packets to be transmitted. When the redundancy ratio is 2 / 3, it means that two redundant data packets need to be generated for every three data packets to be transmitted.
[0146] The process of generating at least one redundant data packet based on the redundancy ratio and the data packets to be transmitted may include: determining a second number of redundant data packets based on a first number of data packets to be transmitted and the redundancy ratio; selecting at least one data packet to be transmitted from the data packets to be transmitted as the original data packet of the redundant data packet based on the second number; and encoding and calculating the original data packet according to the forward error correction algorithm to obtain the redundant data packet.
[0147] Once the redundancy ratio is determined, a corresponding number of redundant data packets can be generated based on the number of data packets to be transmitted and the redundancy ratio. For ease of distinction, the number of data packets to be transmitted is referred to as the first quantity, and the number of redundant data packets to be generated is referred to as the second quantity.
[0148] For example, when the first quantity is 2 and the redundancy ratio is 1 / 2, the second quantity can be determined to be 1 based on the first quantity and the redundancy ratio. As another example, when the first quantity is 3 and the redundancy ratio is 2 / 3, the second quantity can be determined to be 2 based on the first quantity and the redundancy ratio.
[0149] After determining the second quantity, at least one data packet can be selected from the data packets to be transmitted as the original data packet for the redundant data packet. The original data packet can be determined using a forward error correction (FEC) algorithm. FEC is a channel coding algorithm that recovers lost data packets by adding redundant data. Specifically, the sender performs FEC encoding on the original data to generate redundant parity data packets. The original data and redundant data packets are combined and called an FEC data block. The ratio of the original data packets to the redundant data packets is fixed. The sender transmits the FEC data block. After receiving the FEC data block, the receiver recovers the lost or erroneous data packets using the redundant data packets and the original data packets. Currently, relatively mature FEC encoding and decoding algorithms include the Reeds-Solomon (RS) algorithm, the Raptor algorithm (an abbreviation for forward error correction), and the Tornado algorithm (an abbreviation for forward error correction).
[0150] For example, when the first quantity is 2, the redundancy ratio is 1 / 2, and the second quantity is 1, both data packets to be transmitted can be used as the original data packets of the redundant data packet. Specifically, if the two data packets to be transmitted are represented as X1 and X2 respectively, and the redundant data packet is represented as Y1, then X1 and X2 are both the original data packets of Y1.
[0151] For example, when the first quantity is 3, and the three data packets to be transmitted are represented as X1, X2, and X3, with a redundancy ratio of 2 / 3, the second quantity, determined by the first quantity and redundancy ratio, is 2, and the two redundant data packets are represented as Y1 and Y2. In this case, the allocation of the original data packets can be varied. For instance, X1 and X2 can both be used as the original data packets for Y1, or X1, X2, and X3 can both be used as the original data packets for Y2. Alternatively, X1 can be used as the original data packet for Y1, or X1, X2, and X3 can both be used as the original data packets for Y2. Or, X1 and X3 can both be used as the original data packets for Y1, or X2 and X3 can both be used as the original data packets for Y2, and so on.
[0152] Once the original data packet corresponding to the redundant data packet is determined, the original data packet can be encoded and calculated according to the algorithm logic of the forward error correction algorithm to generate the redundant data packet.
[0153] 104. Transmit the data packets to be transmitted to the receiving end according to the main transmission link, and transmit the redundant data packets to the receiving end according to the secondary transmission link.
[0154] Figure 7 This illustration shows a schematic diagram of the data transmission paths corresponding to different data packets provided in embodiments of this application. For example... Figure 7 As shown, the primary transmission link is used to transmit the data packets to be transmitted, while the secondary transmission link is used to transmit redundant data packets. The sending end transmits the data packets to be transmitted to the receiving end via the primary transmission link, and transmits the redundant data packets to the receiving end via the secondary transmission link. The transmitted data packets and redundant data packets are finally aggregated at the receiving end to restore the original data stream to be transmitted.
[0155] During data transmission, the sending end can continuously monitor the network quality of the main transmission link and the secondary transmission link. If the main link is better than the secondary link by a certain threshold and the duration exceeds a preset time threshold, the main transmission link and the secondary transmission link can be swapped. Accordingly, after transmitting the data packets to be transmitted to the receiving end via the main transmission link and transmitting the redundant data packets to the receiving end via the secondary transmission link, or, alternatively, during the steps of transmitting the data packets to be transmitted to the receiving end via the main transmission link and transmitting the redundant data packets to the receiving end via the secondary transmission link, the process may include: obtaining the main link network quality detection result during the transmission process of the main transmission link and the secondary link network quality detection result during the transmission process of the secondary transmission link; comparing the main link network quality detection result with the secondary link network quality detection result to obtain a fifth comparison result; if the fifth comparison result shows that the secondary link network quality detection result is better than the main link network quality detection result within a preset time range, updating the main transmission link to the secondary transmission link to obtain the updated secondary transmission link, and updating the secondary transmission link to the main transmission link to obtain the updated main transmission link; transmitting the remaining untransmitted data packets to the receiving end via the updated main transmission link and transmitting the remaining untransmitted redundant data packets to the receiving end via the updated secondary transmission link.
[0156] During data transmission, the sending end can obtain the network quality detection results for each primary transmission link and each secondary transmission link. For ease of explanation, the network quality detection results for the primary transmission links during data transmission are referred to as primary link network quality detection results, and the network quality detection results for the secondary transmission links are referred to as secondary link network quality detection results. Specifically, the sending end can directly detect the network quality of each primary transmission link to obtain the primary link network quality detection result, and directly detect the network quality of each secondary transmission link to obtain the secondary link network quality detection result. Alternatively, the sending end can send network quality detection requests for the primary and secondary transmission links to the multi-network transmission controller. Upon receiving the network quality detection request, the multi-network transmission controller will perform real-time detection of the network quality of the primary and secondary transmission links and return the detected primary link network quality detection results and secondary link network quality detection results to the sending end. The sending end can then obtain the network quality detection results for each primary transmission link and each secondary transmission link.
[0157] After obtaining the main link network quality detection results during transmission and the auxiliary link network quality detection results during transmission, the main link network quality detection results and the auxiliary link network quality detection results can be compared to obtain the fifth comparison result. If the fifth comparison result shows that the main link network quality detection result (corresponding detection data) is consistently better than the auxiliary link network quality detection result (corresponding detection data), it can be determined that the current main and auxiliary links remain unchanged, and the data packets to be transmitted continue to be transmitted to the receiving end according to the main transmission link, while the redundant data packets are transmitted to the receiving end according to the auxiliary transmission link.
[0158] If the fifth comparison result shows that the secondary link network quality detection result (corresponding detection data) is better than the primary link network quality detection result (corresponding detection data) within the preset time range, then the primary transmission link and the secondary transmission link can be swapped. That is, the primary transmission link can be updated to the secondary transmission link to obtain the updated secondary transmission link, and the secondary transmission link can be updated to the primary transmission link to obtain the updated primary transmission link. Then, the data packets to be transmitted are transmitted to the receiving end according to the updated primary transmission link, and the redundant data packets are transmitted to the receiving end according to the updated secondary transmission link.
[0159] The preset time range can be set according to the actual situation, such as 1 second, 10 seconds, 30 seconds, 1 minute, etc. This application does not impose any restrictions.
[0160] It should be understood that during the process of transmitting the data packets to be transmitted to the receiving end according to the updated primary transmission link and transmitting the redundant data packets to the receiving end according to the updated secondary transmission link, the sending end can also obtain the network quality detection results corresponding to the updated primary transmission link and the updated secondary transmission link in real time, and determine whether to switch and update the updated primary transmission link and the updated secondary transmission link again based on the network quality detection results corresponding to the updated primary transmission link and the updated secondary transmission link. If it is necessary to switch and update again, the remaining untransmitted data packets to be transmitted are transmitted according to the updated primary transmission link and the remaining untransmitted redundant data packets are transmitted according to the updated secondary transmission link, until the data packets to be transmitted and the redundant data packets are transmitted.
[0161] Furthermore, during data transmission, the sending end can utilize the Adaptive Forward Error Correction (A-FEC) mechanism to detect the transmission quality of the data packets to be transmitted and adjust the redundancy ratio accordingly. A-FEC is a data encoding technique that increases the reliability of data communication and is a type of FEC technology. A-FEC identifies specified data streams through flow classification, adds redundant packets carrying verification information, and performs verification at the receiving end. If packet loss or damage occurs in the network, the receiving end can decode the lost packets using the redundant packets, thus achieving "adaptive" functionality based on forward error correction. The working principle of A-FEC is as follows:
[0162] Initiating end: Receives traffic packets and identifies packets requiring packet loss mitigation optimization. Performs FEC encoding on the original packets to generate redundant packets, and sends both the original packets and the redundant packets to the receiving end.
[0163] Receiver: During the reception process, if packet loss is detected, the received redundant packets can be used for FEC decoding to recover the lost packets. The receiver also continuously monitors the packet loss rate and feeds it back to the initiator. The initiator adjusts the number of redundant packets based on the packet loss situation to achieve adaptive operation.
[0164] For example, if the transmission quality of the data packet to be transmitted meets the business performance requirements after multi-channel transmission and continues to exceed a pre-set time threshold, the redundancy ratio can be reduced according to preset rules, such as reducing the original redundancy ratio 1 / X to 1 / (X+1), where X is generally an integer greater than 0. If the transmission quality of the data packet to be transmitted does not fully meet the business performance requirements after multi-channel transmission, the redundancy ratio can be increased according to preset rules, such as increasing the original redundancy ratio 1 / X to 1 / (X-2). Of course, minimum and maximum redundancy ratios can be set in advance. When the maximum redundancy ratio is 1, it automatically degrades to... Figure 1 The traditional redundant dual-transmission mode is shown.
[0165] As described above, this embodiment of the application obtains at least one data packet corresponding to the data stream to be transmitted by the sending end, and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time; then, it obtains the network quality detection result of each data transmission link, and based on the network quality detection result, selects at least one main transmission link and at least one secondary transmission link in the data transmission links, with the link priority of the main transmission link being higher than that of the secondary transmission link; then, according to the network quality detection result corresponding to the main transmission link and the data packet to be transmitted, at least one redundant data packet is generated, which is used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet; finally, the data packet to be transmitted is transmitted to the receiving end according to the main transmission link, and the redundant data packet is transmitted to the receiving end according to the secondary transmission link. This scheme can be used in multi-network transmission communication scenarios. It adaptively adjusts the link priority of each data transmission link according to the network status of each link at the current moment, and uses the data transmission link with higher link priority as the main transmission link. Based on the network status of the main transmission link and the data packet to be transmitted, it adaptively encodes and generates redundant data packets. Finally, the data packet to be transmitted is transmitted to the receiving end through the main transmission link, and the redundant data packet is transmitted to the receiving end through the auxiliary transmission link. This allows the data packet to be transmitted and the redundant data packet to be aggregated at the receiving end. The above scheme can effectively save the amount of network transmission data of the redundant transmission scheme without significantly affecting the performance of the redundant transmission. It can ensure the reliability of data transmission, effectively alleviate users' concerns about traffic consumption, and reduce the network cost of the cloud gateway.
[0166] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0167] This embodiment will be described from the perspective of a data transmission device, which can be integrated into a second electronic device. The second electronic device can be a cloud transmission device in the uplink direction, i.e., a receiving end. The receiving end can be a multi-network transmission gateway. The multi-network transmission gateway and the end-side multi-network transmission device establish an MP-QUIC tunnel for multi-network transmission communication.
[0168] A data transmission method includes: receiving a data packet to be transmitted from a sending end via a main transmission link to obtain a received data packet, and receiving a redundant data packet transmitted from the sending end via a secondary transmission link to obtain a received redundant data packet; detecting the data integrity of the data stream to be transmitted based on the received data packet; determining the missing data packet of the data stream to be transmitted if there is data loss in the data stream; and recovering the missing data packet based on the received data packet and the received redundant data packet to obtain the data corresponding to the missing data packet.
[0169] Figure 8Another flowchart illustrating the data transmission method provided in an embodiment of this application is shown. Figure 8 As shown, the specific process of this data transmission method is as follows:
[0170] 201. Receive the data packet to be transmitted from the sending end through the main transmission link, obtain the received data packet, and receive the redundant data packet transmitted from the sending end through the secondary transmission link, obtain the received redundant data packet.
[0171] The primary transmission link is used to transmit the data packets to be transmitted, while the secondary transmission link is used to transmit redundant data packets. The receiving end receives the data packets to be transmitted via the primary transmission link; for ease of description, the data packets received by the receiving end are referred to as received data packets. The receiving end receives redundant data packets via the secondary transmission link; for ease of description, the redundant data packets received by the receiving end are referred to as received redundant data packets. After receiving the data packets to be transmitted, the receiving end can aggregate the received data packets to restore the original data stream to be transmitted.
[0172] 202. Based on the received data packets, check the data integrity of the data stream to be transmitted.
[0173] During the aggregation process of received data packets, the receiving end can determine the integrity of the data stream to be transmitted based on the received data. For example, it can compare the received data packets with the data packets to be transmitted. If the received data packets match, it can be determined that the data stream to be transmitted has been completely transmitted to the receiving end through the main transmission link, meaning the receiving end has now received all the data packets of the data stream to be transmitted. Based on this, the received data packets can be directly aggregated to obtain the complete data stream to be transmitted.
[0174] If the received data packets are inconsistent with the data packets to be transmitted, for example, if the sequence number of the received data packets does not match the sequence number of the data packets to be transmitted, or if the number of received data packets is less than the number of data packets to be transmitted, then it can be determined that the data packets to be transmitted have been lost during transmission through the main transmission link, that is, the data stream to be transmitted received by the receiving end at this time is missing.
[0175] 203. If there are missing data packets in the data stream to be transmitted, determine the missing data packets in the data stream to be transmitted.
[0176] When data is missing from a data stream during transmission, the receiving end needs to identify the missing data packets. There are several ways to identify missing data packets, such as comparing the sequence numbers of received data packets with the sequence numbers of the data packets to be transmitted, and identifying the data packets with the extra sequence numbers in the data packets to be transmitted as the missing data packets, and so on.
[0177] 204. Based on the received data packets and the received redundant data packets, perform data recovery on the missing data packets to obtain the data corresponding to the missing data packets.
[0178] Once the missing data packet is identified, it can be recovered from the received data packet and the received redundant data packet to obtain the data in the missing data packet. Then, the recovered missing data packet can be aggregated with the received data packet to obtain the complete data stream to be transmitted.
[0179] The process of recovering data from missing data packets based on received data packets and received redundant data packets to obtain the data corresponding to the missing data packets may include: filtering out target data packets that are related to the missing data packets from received data packets; filtering out target redundant data packets that are related to the missing data packets from received redundant data packets; and performing decoding calculations based on the target data packets and target redundant data packets to obtain the data corresponding to the missing data packets.
[0180] For example, if the data stream to be transmitted includes two data packets, denoted as X1 and X2, and a redundant data packet, denoted as Y1, if a packet loss is detected during data transmission (let's say X2), it means that X1 is a received data packet, X2 is a missing data packet, and Y1 is a received redundant data packet. In this case, based on the received data packet (X1) and the received redundant data packet (Y1), a forward error correction algorithm can be used for decoding to obtain the data corresponding to the missing data packet (X2), thereby achieving data recovery of the missing data packet (X2).
[0181] For example, if the data stream to be transmitted includes three data packets, denoted as X1, X2, and X3, and two redundant data packets are generated, denoted as Y1 and Y2, then X1 and X2 simultaneously serve as the original data packets of Y1 (i.e., Y1 is calculated based on X1 and X2), and X1, X2, and X3 simultaneously serve as the original data packets of Y2 (i.e., Y2 is calculated based on X1, X2, and X3). If a missing X3 is detected during data transmission, it means that X1 and X2 are received data packets, X3 is a missing data packet, and Y1 and Y2 are received redundant data packets. In this case, based on the received data packets (X1 and X2) and the received redundant data packet (Y2), a forward error correction algorithm can be used for decoding calculation to obtain the data corresponding to the missing data packet (X3), thereby achieving data recovery of the missing data packet (X3).
[0182] As described above, this embodiment of the application obtains received data packets by receiving data packets to be transmitted from the sending end via the main transmission link, and obtains received redundant data packets by receiving redundant data packets from the sending end via the secondary transmission link. Then, based on the received data packets, the data integrity of the data stream to be transmitted is detected. If there is data loss in the data stream to be transmitted, the missing data packets of the data stream to be transmitted are determined. Finally, based on the received data packets and the received redundant data packets, data recovery is performed on the missing data packets to obtain the data corresponding to the missing data packets. Since this scheme can be used in multi-network transmission communication scenarios, the data packets to be transmitted are transmitted to the receiving end via the main transmission link, and the redundant data packets are transmitted to the receiving end via the secondary transmission link. The data packets to be transmitted and the redundant data packets are finally aggregated at the receiving end. If there is packet loss in the data packets to be transmitted during data transmission, data recovery can be performed based on the received data packets and the received redundant data packets. The above scheme can effectively save the network transmission data volume of the redundant transmission scheme without significantly affecting the performance of redundant transmission. It can ensure the reliability of data transmission, effectively alleviate users' concerns about traffic consumption, and reduce the network cost of the cloud gateway.
[0183] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0184] Figure 9 This illustration shows another application scenario of the data transmission method provided in this application. For example... Figure 9 As shown, this embodiment will use the data transmission process between the end-side multi-network transmission device and the multi-network transmission gateway as an example for explanation. The end-side multi-network transmission device and the multi-network transmission gateway can establish a communication connection through the MPQUIC protocol. The end-side multi-network transmission device can be a multi-network router, and the multi-network transmission gateway can be deployed in a distributed manner in the cloud. The end-side multi-network transmission device can also establish a communication connection with the multi-network transmission controller, and the multi-network transmission gateway can also establish a communication connection with the multi-network transmission controller. The multi-network transmission controller is generally centrally deployed in the cloud and can interact with the end-side multi-network transmission device and the multi-network transmission gateway through signaling. It is mainly responsible for configuration management, authentication and detection functions.
[0185] The data transmission process between end-side multi-network transmission devices and multi-network transmission gateways can be divided into uplink and downlink transmission processes. In the uplink transmission process, the end-side multi-network transmission device acts as the sender, transmitting the data stream to be transmitted from the end-side service terminal to the multi-network transmission gateway; the multi-network transmission gateway, acting as the receiver, forwards the data stream to the final service server after receiving it. In the downlink transmission process, the multi-network transmission gateway again acts as the sender, transmitting the data stream to be transmitted from the service server to the end-side multi-network transmission device; the end-side multi-network transmission device, acting as the receiver, forwards the data stream to the end-side service terminal after receiving it.
[0186] In this embodiment, the transmission process in the uplink direction is used as an example for explanation. Accordingly, the end-side multi-network transmission device is the sending end, and the multi-network transmission gateway is the receiving end. Figure 10 A schematic diagram illustrating the data interaction of the data transmission method provided in an embodiment of this application is shown. For example... Figure 10 As shown, a data transmission method has the following specific process:
[0187] 301. The sending end obtains at least one data packet corresponding to the data stream to be transmitted, and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time.
[0188] For example, the sending end can obtain a preset data transmission link and detect the network status of the preset data transmission link at the current time; if the network status indicates that the preset data transmission link is an available link, then the preset data transmission link is used as the data transmission link corresponding to the data stream to be transmitted.
[0189] 302. The sending end obtains the network quality test results for each data transmission link.
[0190] For example, after identifying at least two data transmission links, the sending end can test the network quality of each data transmission link and obtain the network quality test results for each link. During the network quality test of each data transmission link, several network metrics can be used, such as transmission rate and network latency.
[0191] For example, the sending end can directly detect the network quality of each data transmission link, thereby obtaining the network quality detection results for each data transmission link.
[0192] For example, the sending end can also send a network quality detection request for the data transmission link to the multi-network transmission controller. After receiving the network quality detection request, the multi-network transmission controller can perform real-time detection of the network quality of the data transmission link and return the detected network quality detection result to the sending end. The sending end can then obtain the network quality detection result for each data transmission link.
[0193] In the process of detecting the network quality of each data transmission link, the following network indicators can be used for detection, such as transmission rate and network latency.
[0194] 303. Based on the network quality detection results, the sending end divides the data transmission link into a main transmission link and a secondary transmission link.
[0195] For example, the sending end can obtain the transmission attribute information of the data transmission link; if the transmission attribute information indicates that the data transmission link has a preset link priority, the data transmission link is divided into a main transmission link and a secondary transmission link based on the network quality detection result and the preset link priority; if the transmission attribute information indicates that the data transmission link does not have a preset link priority, the link priority of the data transmission link is sorted according to the network quality detection result, and the data transmission link is divided into a main transmission link and a secondary transmission link according to the sorting result.
[0196] For example, the sending end can obtain the network indicator parameters corresponding to the preset first priority, and filter out the data transmission links with the preset link priority as the preset first priority from the data transmission links to obtain the preset main transmission link; take the network quality detection result corresponding to the preset main transmission link as the first network quality detection result; compare the detection data corresponding to the first network quality detection result with the network indicator parameters to obtain the first comparison result; and divide the data transmission link into the main transmission link and the auxiliary transmission link according to the first comparison result.
[0197] For example, if the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network indicator parameters, the sending end can use the preset main transmission link as the main transmission link and the data transmission link with the preset link priority as the preset second priority as the secondary transmission link.
[0198] For example, if the first comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the network indicator parameters, the sending end can select a data transmission link with a preset link priority of the second preset priority from the data transmission links to obtain a preset secondary transmission link; take the network quality detection result corresponding to the preset secondary transmission link as the second network quality detection result; compare the detection data corresponding to the second network quality detection result with the network indicator parameters to obtain a second comparison result; and divide the data transmission link into a primary transmission link and a secondary transmission link according to the second comparison result.
[0199] For example, if the second comparison result indicates that the detection data corresponding to the second network quality detection result is higher than the network index parameters, the sending end can use the preset secondary transmission link as the primary transmission link; and use the preset primary transmission link corresponding to the first network quality detection result as the secondary transmission link.
[0200] For example, if the second comparison result indicates that the detection data corresponding to the second network quality detection result is lower than the network indicator parameters, the sending end can compare the first network quality detection result with the second network quality detection result to obtain the third comparison result; based on the third comparison result, the data transmission link is divided into the main transmission link and the auxiliary transmission link.
[0201] For example, if the third comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the detection data corresponding to the second network quality detection result, the sending end can use the preset main transmission link as the main transmission link and the preset secondary transmission link as the secondary transmission link; if the third comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result, the sending end can use the preset main transmission link as the secondary transmission link and the preset secondary transmission link as the main transmission link.
[0202] 304. The sending end generates at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted.
[0203] For example, the sending end can determine the redundancy ratio corresponding to the data transmission process based on the network quality detection results of the main transmission link. The redundancy ratio indicates the ratio of redundant data packets to data packets to be transmitted. Based on the redundancy ratio and the data packets to be transmitted, at least one redundant data packet is generated.
[0204] For example, the sending end can obtain the network quality index threshold and the initial redundancy ratio, and use the network quality detection result corresponding to the main transmission link as the target detection result; compare the detection data corresponding to the target detection result with the network quality index threshold to obtain the fourth comparison result; and determine the redundancy ratio corresponding to the data transmission process based on the fourth comparison result.
[0205] For example, if the detection data corresponding to the target detection result is lower than the network quality index threshold, the sending end can increase the initial redundancy ratio to obtain the redundancy ratio; if the detection data corresponding to the target detection result is equal to the network quality index threshold, the sending end can use the initial redundancy ratio as the redundancy ratio; if the detection data corresponding to the target detection result is higher than the network quality index threshold, the sending end can decrease the initial redundancy ratio to obtain the redundancy ratio.
[0206] For example, the sending end can determine a second number of redundant data packets based on a first number of data packets to be transmitted and a redundancy ratio; based on the second number, at least one data packet to be transmitted is selected from the data packets to be transmitted as the original data packet of the redundant data packet; the original data packet is encoded and calculated according to the forward error correction algorithm to obtain the redundant data packet.
[0207] 305. The sending end transmits the data packets to be transmitted to the receiving end according to the main transmission link, and transmits the redundant data packets to the receiving end according to the secondary transmission link.
[0208] For example, the primary transmission link is used to transmit the data packets to be transmitted, while the secondary transmission link is used to transmit redundant data packets. The sending end can transmit the data packets to be transmitted to the receiving end through the primary transmission link, and transmit the redundant data packets to the receiving end through the secondary transmission link, so that the transmitted data packets and redundant data packets can be finally aggregated at the receiving end to restore the original data stream to be transmitted.
[0209] 306. The receiving end receives the data packet to be transmitted from the sending end through the main transmission link, obtains the received data packet, and receives the redundant data packet transmitted from the sending end through the secondary transmission link, obtains the received redundant data packet.
[0210] 307. The receiving end checks the data integrity of the data stream to be transmitted based on the received data packets.
[0211] For example, the receiving end can compare the received data packets with the data packets to be transmitted. If the received data packets match, it can be determined that the data stream to be transmitted has been completely transmitted to the receiving end through the main transmission link, meaning the receiving end has received all the data packets of the data stream to be transmitted. Based on this, the received data packets can be directly aggregated to obtain the complete data stream to be transmitted. If the received data packets do not match the data packets to be transmitted—for example, the sequence numbers of the received data packets do not match the sequence numbers of the data packets to be transmitted, or the number of received data packets is less than the number of data packets to be transmitted—the receiving end can determine that packet loss occurred during the transmission of the data stream to be transmitted through the main transmission link.
[0212] 308. If there is missing data in the data stream to be transmitted, the receiving end determines the missing data packets in the data stream to be transmitted.
[0213] For example, the receiving end can compare the sequence number of the received data packet with the sequence number of the data packet to be transmitted, and treat the data packet corresponding to the extra sequence number in the data packet to be transmitted as the missing data packet, and so on.
[0214] 309. The receiving end performs data recovery on the received data packets and the received redundant data packets to obtain the data corresponding to the missing data packets.
[0215] For example, the receiving end can filter out target data packets that are related to the missing data packets from the received data packets; filter out target redundant data packets that are related to the missing data packets from the received redundant data packets; and perform decoding calculations based on the target data packets and target redundant data packets to obtain the data corresponding to the missing data packets.
[0216] 310. The sending end adjusts the main transmission link and the secondary transmission link according to the transmission quality and network quality, and adjusts the redundancy ratio according to the transmission quality of the data packets to be transmitted.
[0217] For example, during data transmission, the sending end can continuously monitor the network quality of the main transmission link and the secondary transmission link. If the main link is better than the secondary link by a certain threshold and the duration exceeds a preset time threshold, the main transmission link and the secondary transmission link can be swapped.
[0218] For example, during data transmission, the sending end can use an adaptive forward error correction mechanism to detect the transmission quality of the data packets to be transmitted. If the transmission quality of the data packets to be transmitted meets the business indicator requirements after multi-channel transmission and continues to exceed the preset time threshold, the redundancy ratio can be reduced according to preset rules. If the transmission quality of the data packets to be transmitted does not fully meet the business indicator requirements after multi-channel transmission, the redundancy ratio can be increased according to preset rules.
[0219] As described above, in this embodiment, the sending end obtains at least one data packet corresponding to the data stream to be transmitted and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time. Then, the sending end obtains the network quality detection result of each data transmission link. Afterward, based on the network quality detection result, the sending end divides the data transmission links into a main transmission link and a secondary transmission link. Then, based on the network quality detection result of the main transmission link and the data packet to be transmitted, the sending end generates at least one redundant data packet. The sending end then transmits the data packet to be transmitted to the receiving end according to the main transmission link and the redundant data packet to the receiving end according to the secondary transmission link. The receiving end receives the transmitted data. The receiving end receives the data packets to be transmitted through the main transmission link, obtains the received data packets, and receives the redundant data packets transmitted by the sending end through the secondary transmission link, obtains the received redundant data packets. Then, based on the received data packets, the receiving end checks the data integrity of the data stream to be transmitted. If there is missing data in the data stream to be transmitted, the receiving end determines the missing data packets. Then, based on the received data packets and the received redundant data packets, the receiving end performs data recovery on the data packets to obtain the data corresponding to the missing data packets. Afterwards, the sending end adjusts the main transmission link and the secondary transmission link according to the transmission quality and network quality, and adjusts the redundancy ratio according to the transmission quality of the data packets to be transmitted. This scheme can be used in multi-network transmission communication scenarios. It adaptively adjusts the link priority of each data transmission link based on the current network conditions, designating the data transmission link with higher priority as the primary transmission link. Redundant data packets are generated through adaptive encoding based on the network conditions of the primary transmission link and the data packets to be transmitted. Finally, the data packets to be transmitted are transmitted to the receiving end through the primary transmission link, while the redundant data packets are transmitted to the receiving end through the secondary transmission link. The data packets to be transmitted and the redundant data packets are finally aggregated at the receiving end. If packet loss occurs during data transmission, data recovery can be performed based on the received data packets and the received redundant data packets. This scheme effectively saves network transmission data volume in redundant transmission schemes without significantly affecting the performance of redundant transmission. It ensures data transmission reliability, effectively alleviates user concerns about traffic consumption, and reduces the network cost of the cloud gateway.
[0220] To better implement the above methods, this application also provides a data transmission device, which can be integrated into a first electronic device. The first electronic device can be a device for sending data, such as a router, gateway, etc. The first electronic device also supports multiple network transmission protocols based on MPQUIC. For example, the first electronic device can support the simultaneous transmission of the data stream to be transmitted using network transmission methods such as wireless network communication network (WiFi) and cellular network (such as 4G, 5G, etc.).
[0221] Figure 11A schematic diagram of the structure of a data transmission device provided in an embodiment of this application is shown. Figure 11 As shown, the data transmission device may include a data acquisition unit 401, a link division unit 402, a data generation unit 403, and a data transmission unit 404, as follows:
[0222] (1) Data acquisition unit 401;
[0223] The data acquisition unit 401 is used to acquire at least one data packet to be transmitted corresponding to the data stream to be transmitted, and to determine at least two data transmission links corresponding to the data stream to be transmitted at the current time.
[0224] For example, the data acquisition unit 401 can be used to acquire a preset data transmission link and detect the network status of the preset data transmission link at the current time; if the network status indicates that the preset data transmission link is an available link, then the preset data transmission link is used as the data transmission link corresponding to the data stream to be transmitted.
[0225] (2) Link partitioning unit 402;
[0226] The link segmentation unit 402 is used to obtain the network quality detection result of each data transmission link, and based on the network quality detection result, to select at least one primary transmission link and at least one secondary transmission link in the data transmission links, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link.
[0227] For example, the link segmentation unit 402 can be used to detect the network quality of each data transmission link after at least two data transmission links have been determined, and obtain the network quality detection result for each data transmission link. In the process of detecting the network quality of each data transmission link, the following network indicators can be used for detection, such as transmission rate and network latency.
[0228] For example, the link segmentation unit 402 can be used to obtain the transmission attribute information of the data transmission link; if the transmission attribute information indicates that the data transmission link has a preset link priority, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links based on the network quality detection results and the preset link priority; if the transmission attribute information indicates that the data transmission link does not have a preset link priority, the link priority of the data transmission link is sorted according to the network quality detection results, and at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links according to the sorting results.
[0229] For example, the link segmentation unit 402 can be used to obtain network indicator parameters corresponding to a preset first priority, and to select data transmission links with a preset link priority of the preset first priority from the data transmission links to obtain a preset main transmission link; to use the network quality detection result corresponding to the preset main transmission link as the first network quality detection result; to compare the detection data corresponding to the first network quality detection result with the network indicator parameters to obtain a first comparison result; and to select at least one main transmission link and at least one auxiliary transmission link from the data transmission links based on the first comparison result.
[0230] For example, the link partitioning unit 402 can be used to, if the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network index parameter, designate the preset main transmission link as the main transmission link and designate the data transmission link with the preset link priority as the preset second priority as the auxiliary transmission link.
[0231] For example, the link segmentation unit 402 can be specifically used to: if the first comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the network indicator parameters, select a data transmission link with a preset link priority of a preset second priority from the data transmission links to obtain a preset secondary transmission link; use the network quality detection result corresponding to the preset secondary transmission link as the second network quality detection result; compare the detection data corresponding to the second network quality detection result with the network indicator parameters to obtain a second comparison result; and select at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the second comparison result.
[0232] For example, the link partitioning unit 402 can be used to, if the second comparison result indicates that the detection data corresponding to the second network quality detection result is higher than the network index parameter, use the preset secondary transmission link as the primary transmission link; and use the preset primary transmission link corresponding to the first network quality detection result as the secondary transmission link.
[0233] For example, the link segmentation unit 402 can be used to compare the first network quality detection result with the second network quality detection result if the second comparison result indicates that the detection data corresponding to the second network quality detection result is lower than the network index parameter, and obtain a third comparison result; based on the third comparison result, at least one main transmission link and at least one auxiliary transmission link are selected in the data transmission link.
[0234] For example, the link partitioning unit 402 can be specifically used to: if the third comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the detection data corresponding to the second network quality detection result, use the preset main transmission link as the main transmission link and the preset secondary transmission link as the secondary transmission link; if the third comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result, use the preset main transmission link as the secondary transmission link and the preset secondary transmission link as the main transmission link.
[0235] (3) Data generation unit 403;
[0236] The data generation unit 403 is used to generate at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted. The redundant data packet is used to recover the data packet to be transmitted that was lost during the data transmission process.
[0237] For example, the data generation unit 403 can be used to determine the redundancy ratio corresponding to the data transmission process based on the network quality detection results corresponding to the main transmission link. The redundancy ratio indicates the ratio of redundant data packets to data packets to be transmitted. Based on the redundancy ratio and the data packets to be transmitted, at least one redundant data packet is generated.
[0238] For example, the data generation unit 403 can be used to obtain the network quality index threshold and the initial redundancy ratio, take the network quality detection result corresponding to the main transmission link as the target detection result, compare the detection data corresponding to the target detection result with the network quality index threshold to obtain the fourth comparison result, and determine the redundancy ratio corresponding to the data transmission process based on the fourth comparison result.
[0239] For example, the data generation unit 403 can be used to increase the initial redundancy ratio to obtain the redundancy ratio if the detection data corresponding to the target detection result is lower than the network quality index threshold; if the detection data corresponding to the target detection result is equal to the network quality index threshold, the initial redundancy ratio is used as the redundancy ratio; if the detection data corresponding to the target detection result is higher than the network quality index threshold, the initial redundancy ratio is decreased to obtain the redundancy ratio.
[0240] For example, the data generation unit 403 can be used to determine a second number of redundant data packets based on a first number of data packets to be transmitted and a redundancy ratio; select at least one data packet to be transmitted from the data packets to be transmitted as the original data packet of the redundant data packet based on the second number; and encode the original data packet according to the forward error correction algorithm to obtain the redundant data packet.
[0241] (4) Data transmission unit 404.
[0242] The data transmission unit 404 is used to transmit the data packet to be transmitted to the receiving end according to the main transmission link, and to transmit the redundant data packet to the receiving end according to the auxiliary transmission link.
[0243] For example, the data transmission unit 404 can be used to transmit the data packet to be transmitted to the receiving end through the main transmission link, and to transmit the redundant data packet to the receiving end through the auxiliary transmission link, so that the transmitted data packet and the redundant data packet can be finally aggregated at the receiving end to restore the original data stream to be transmitted.
[0244] For example, the data transmission unit 404 can be specifically used to acquire the main link network quality detection result during the transmission process of the main transmission link and the auxiliary link network quality detection result during the transmission process of the auxiliary transmission link; compare the main link network quality detection result with the auxiliary link network quality detection result to obtain a fifth comparison result; if the fifth comparison result shows that the auxiliary link network quality detection result is better than the main link network quality detection result within a preset time range, update the main transmission link to the auxiliary transmission link to obtain the updated auxiliary transmission link, and update the auxiliary transmission link to the main transmission link to obtain the updated main transmission link; transmit the remaining untransmitted data packets to the receiving end according to the updated main transmission link, and transmit the remaining untransmitted redundant data packets to the receiving end according to the updated auxiliary transmission link.
[0245] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0246] As can be seen from the above, in this embodiment of the application, the data acquisition unit 401 acquires at least one data packet corresponding to the data stream to be transmitted and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time; then, the link division unit 402 acquires the network quality detection result of each data transmission link, and based on the network quality detection result, selects at least one main transmission link and at least one auxiliary transmission link in the data transmission links, with the link priority of the main transmission link being higher than that of the auxiliary transmission link; the data generation unit 403 then generates at least one redundant data packet according to the network quality detection result corresponding to the main transmission link and the data packet to be transmitted, the redundant data packet being used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet; finally, the data transmission unit 404 transmits the data packet to be transmitted to the receiving end according to the main transmission link and transmits the redundant data packet to the receiving end according to the auxiliary transmission link. This scheme can be used in multi-network transmission communication scenarios. It adaptively adjusts the link priority of each data transmission link according to the network status of each link at the current moment, and uses the data transmission link with higher link priority as the main transmission link. Based on the network status of the main transmission link and the data packet to be transmitted, it adaptively encodes and generates redundant data packets. Finally, the data packet to be transmitted is transmitted to the receiving end through the main transmission link, and the redundant data packet is transmitted to the receiving end through the auxiliary transmission link. This allows the data packet to be transmitted and the redundant data packet to be aggregated at the receiving end. The above scheme can effectively save the amount of network transmission data of the redundant transmission scheme without significantly affecting the performance of the redundant transmission. It can ensure the reliability of data transmission, effectively alleviate users' concerns about traffic consumption, and reduce the network cost of the cloud gateway.
[0247] To better implement the above methods, embodiments of this application also provide a data transmission device, which can be integrated into a second electronic device. The second electronic device can be a device for receiving data sent by a first electronic device, such as a router, gateway, service server, etc. For example, when the first electronic device is a router, the second electronic device can be a gateway. The second electronic device also supports multiple network transmission protocols based on MPQUIC. For example, the second electronic device can support simultaneously receiving data streams to be transmitted through wireless network communication networks (WiFi) and cellular networks (such as 4G, 5G, etc.).
[0248] Figure 12 A schematic diagram of another data transmission device provided in an embodiment of this application is shown. For example... Figure 12 As shown, the data transmission device may include a data receiving unit 501, a data detection unit 502, a data determination unit 503, and a data recovery unit 504, as follows:
[0249] (1) Data receiving unit 501;
[0250] The data receiving unit is used to receive the data packets to be transmitted by the sending end through the main transmission link, obtain the received data packets, and receive the redundant data packets transmitted by the sending end through the secondary transmission link, obtain the received redundant data packets.
[0251] (2) Data detection unit 502;
[0252] The data detection unit 502 is used to detect the data integrity of the data stream to be transmitted based on the received data packets.
[0253] For example, the data detection unit 502 can specifically compare the received data packets with the data packets to be transmitted. If the received data packets match, it can be determined that the data stream to be transmitted has been completely transmitted to the receiving end through the main transmission link. Based on this, the received data packets can be directly aggregated to obtain the complete data stream to be transmitted. If the received data packets do not match the data packets to be transmitted, for example, if the sequence number of the received data packets does not match the sequence number of the data packets to be transmitted, or if the number of received data packets is less than the number of data packets to be transmitted, it can be determined that packet loss occurred during the transmission of the data packets to be transmitted through the main transmission link.
[0254] (3) Data determination unit 503;
[0255] The data determination unit 503 is used to determine the missing data packets in the data stream to be transmitted if there are missing data packets in the data stream to be transmitted.
[0256] For example, the data determination unit 503 can be used to compare the sequence number of the received data packet with the sequence number of the data packet to be transmitted, and to take the data packet to be transmitted corresponding to the extra sequence number in the data packet to be transmitted as the missing data packet, and so on.
[0257] (4) Data recovery unit 504.
[0258] The data recovery unit 504 is used to recover the missing data packets based on the received data packets and the received redundant data packets, so as to obtain the data corresponding to the missing data packets.
[0259] For example, the data recovery unit 504 can be used to filter out target data packets that are related to the missing data packets from the received data packets; to filter out target redundant data packets that are related to the missing data packets from the received redundant data packets; and to perform decoding calculations based on the target data packets and the target redundant data packets to obtain the data corresponding to the missing data packets.
[0260] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0261] As can be seen from the above, in this embodiment of the application, the data receiving unit 501 receives the data packet to be transmitted from the sending end through the main transmission link to obtain the received data packet, and receives the redundant data packet transmitted from the sending end through the secondary transmission link to obtain the received redundant data packet; then, the data detection unit 502 detects the data integrity of the data stream to be transmitted based on the received data packet; if there is data missing in the data stream to be transmitted, the data determination unit 503 determines the missing data packet of the data stream to be transmitted; finally, the data recovery unit 504 performs data recovery on the missing data packet based on the received data packet and the received redundant data packet to obtain the data corresponding to the missing data packet. This solution can be used in multi-network transmission communication scenarios. It transmits the data packets to be transmitted to the receiving end through the main transmission link and the redundant data packets to the receiving end through the secondary transmission link. The data packets to be transmitted and the redundant data packets are finally aggregated at the receiving end. If there is packet loss in the data packets to be transmitted during data transmission, data recovery can be performed based on the received data packets and the received redundant data packets. The above solution can effectively save the amount of network transmission data in the redundant transmission scheme without significantly affecting the performance of redundant transmission. It can ensure the reliability of data transmission, effectively alleviate users' concerns about traffic consumption, and reduce the network cost of the cloud gateway.
[0262] This application also provides an electronic device, such as... Figure 13 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0263] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 13 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0264] The processor 601 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.
[0265] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0266] The electronic device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0267] The electronic device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0268] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 runs the applications stored in the memory 602 to realize various functions, as follows:
[0269] Obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current time; obtain the network quality detection result of each data transmission link, and based on the network quality detection result, select at least one primary transmission link and at least one secondary transmission link from the data transmission links, with the primary transmission link having a higher link priority than the secondary transmission link; generate at least one redundant data packet according to the network quality detection result corresponding to the primary transmission link and the data packet to be transmitted, the redundant data packet being used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet; transmit the data packet to be transmitted to the receiving end according to the primary transmission link, and transmit the redundant data packet to the receiving end according to the secondary transmission link.
[0270] or,
[0271] The system receives the data packets to be transmitted from the sending end via the main transmission link, obtains the received data packets, and receives the redundant data packets transmitted from the sending end via the secondary transmission link, obtains the received redundant data packets. Based on the received data packets, the system checks the data integrity of the data stream to be transmitted. If there is data loss in the data stream to be transmitted, the system determines the missing data packets. Based on the received data packets and the received redundant data packets, the system recovers the data from the missing data packets, obtaining the data corresponding to the missing data packets.
[0272] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0273] As described above, this embodiment of the application obtains at least one data packet corresponding to the data stream to be transmitted by the sending end, and determines at least two data transmission links corresponding to the data stream to be transmitted at the current time; then, it obtains the network quality detection result of each data transmission link, and based on the network quality detection result, selects at least one main transmission link and at least one auxiliary transmission link among the data transmission links; then, the sending end generates at least one redundant data packet according to the network quality detection result corresponding to the main transmission link and the data packet to be transmitted; the sending end then transmits the data packet to be transmitted to the receiving end according to the main transmission link, and transmits the redundant data packet to the receiving end according to the auxiliary transmission link; the receiving end receives the transmitted data packet. The sending end receives the data packets to be transmitted via the main transmission link, obtains the received data packets, and receives the redundant data packets transmitted by the sending end via the secondary transmission link, obtains the received redundant data packets. Then, the receiving end checks the data integrity of the data stream to be transmitted based on the received data packets. If there is missing data in the data stream to be transmitted, the receiving end determines the missing data packets. Then, the receiving end recovers the data from the data packets based on the received data packets and the received redundant data packets, obtaining the data corresponding to the missing data packets. Afterwards, the sending end adjusts the main transmission link and the secondary transmission link according to the transmission quality and network quality, and adjusts the redundancy ratio according to the transmission quality of the data packets to be transmitted. This scheme can be used in multi-network transmission communication scenarios. It adaptively adjusts the link priority of each data transmission link according to the network status of each link at the current moment, and uses the data transmission link with higher priority as the main transmission link. Based on the network status of the main transmission link and the data to be transmitted, it adaptively encodes and generates redundant data packets. Finally, the data to be transmitted is transmitted to the receiving end through the main transmission link, and the redundant data packets are transmitted to the receiving end through the secondary transmission link. The data to be transmitted and the redundant data packets are finally aggregated at the receiving end. If there is packet loss during the data transmission process, data recovery can be performed based on the received data packets and the received redundant data packets. The above scheme can effectively save the amount of network transmission data of the redundant transmission scheme without significantly affecting the performance of redundant transmission, thereby effectively alleviating users' concerns about traffic consumption and reducing the network cost of the cloud gateway.
[0274] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0275] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the data transmission methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0276] Obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current time; obtain the network quality detection result of each data transmission link, and based on the network quality detection result, select at least one primary transmission link and at least one secondary transmission link from the data transmission links, with the primary transmission link having a higher link priority than the secondary transmission link; generate at least one redundant data packet according to the network quality detection result corresponding to the primary transmission link and the data packet to be transmitted, the redundant data packet being used by the receiving end to recover the data packet to be transmitted after receiving the redundant data packet; transmit the data packet to be transmitted to the receiving end according to the primary transmission link, and transmit the redundant data packet to the receiving end according to the secondary transmission link.
[0277] or,
[0278] The system receives the data packets to be transmitted from the sending end via the main transmission link, obtains the received data packets, and receives the redundant data packets transmitted from the sending end via the secondary transmission link, obtains the received redundant data packets. Based on the received data packets, the system checks the data integrity of the data stream to be transmitted. If there is data loss in the data stream to be transmitted, the system determines the missing data packets. Based on the received data packets and the received redundant data packets, the system recovers the data from the missing data packets, obtaining the data corresponding to the missing data packets.
[0279] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0280] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0281] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the data transmission methods provided in the embodiments of this application, the beneficial effects that any of the data transmission methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0282] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various alternative implementations of the data access aspect described above.
[0283] The foregoing has provided a detailed description of a data transmission method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data transmission method, characterized in that, Applied to the sending end, including: Obtain at least one data packet corresponding to the data stream to be transmitted, and determine at least two data transmission links corresponding to the data stream to be transmitted at the current time; Obtain the network quality detection result for each of the data transmission links, and based on the network quality detection result, select at least one primary transmission link and at least one secondary transmission link from the data transmission links, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link. Based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted, at least one redundant data packet is generated. The redundant data packet is used by the receiving end to recover the data of the data packet to be transmitted after receiving the redundant data packet. The data packet to be transmitted is transmitted to the receiving end via the main transmission link, and the redundant data packet is transmitted to the receiving end via the secondary transmission link.
2. The data transmission method as described in claim 1, characterized in that, Based on the network quality detection results, selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links includes: Obtain the transmission attribute information of the data transmission link; If the transmission attribute information indicates that the data transmission link has a preset link priority, based on the network quality detection result and the preset link priority, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links. If the transmission attribute information indicates that the preset link priority does not exist in the data transmission link, the link priorities of the data transmission links are sorted according to the network quality detection results, and at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links according to the sorting results.
3. The data transmission method as described in claim 2, characterized in that, The preset link priority includes a preset first priority. The step of selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the network quality detection results and the preset link priority includes: Obtain the network indicator parameters corresponding to the preset first priority, and filter out the data transmission links with the preset link priority as the preset first priority from the data transmission links to obtain the preset main transmission link; The network quality detection result corresponding to the preset main transmission link is taken as the first network quality detection result; The detection data corresponding to the first network quality detection result is compared with the network index parameters to obtain the first comparison result; Based on the first comparison result, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links.
4. The data transmission method as described in claim 3, characterized in that, The preset link priority also includes a preset second priority. The step of selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the first comparison result includes: If the first comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the network indicator parameter, the preset main transmission link is used as the main transmission link. The data transmission link with the preset link priority of the second preset priority is used as the secondary transmission link.
5. The data transmission method as described in claim 4, characterized in that, The step of selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the first comparison result further includes: If the first comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the network indicator parameter, a data transmission link with the preset link priority of the preset second priority is selected from the data transmission links to obtain a preset auxiliary transmission link; The network quality detection result corresponding to the preset secondary transmission link is used as the second network quality detection result; The detection data corresponding to the second network quality detection result is compared with the network index parameters to obtain the second comparison result; Based on the second comparison result, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links.
6. The data transmission method as described in claim 5, characterized in that, The step of selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the second comparison result includes: If the second comparison result indicates that the detection data corresponding to the second network quality detection result is higher than the network indicator parameter, the preset secondary transmission link will be used as the primary transmission link. The preset primary transmission link corresponding to the first network quality detection result is used as the secondary transmission link.
7. The data transmission method as described in claim 6, characterized in that, The step of selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links based on the second comparison result further includes: If the second comparison result indicates that the detection data corresponding to the second network quality detection result is lower than the network index parameter, the first network quality detection result is compared with the second network quality detection result to obtain a third comparison result; Based on the third comparison result, at least one primary transmission link and at least one secondary transmission link are selected from the data transmission links.
8. The data transmission method as described in claim 7, characterized in that, Based on the third comparison result, selecting at least one primary transmission link and at least one secondary transmission link from the data transmission links includes: If the third comparison result indicates that the detection data corresponding to the first network quality detection result is higher than the detection data corresponding to the second network quality detection result, the preset main transmission link is used as the main transmission link, and the preset secondary transmission link is used as the secondary transmission link. If the third comparison result indicates that the detection data corresponding to the first network quality detection result is lower than the detection data corresponding to the second network quality detection result, the preset primary transmission link is used as the secondary transmission link, and the preset secondary transmission link is used as the primary transmission link.
9. The data transmission method as described in claim 1, characterized in that, The step of generating at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted includes: Based on the network quality detection results corresponding to the main transmission link, the redundancy ratio corresponding to the data transmission process is determined, wherein the redundancy ratio indicates the ratio of the redundant data packets to the data packets to be transmitted. At least one redundant data packet is generated based on the redundancy ratio and the data packet to be transmitted.
10. The data transmission method as described in claim 9, characterized in that, The determination of the redundancy ratio corresponding to the data transmission process based on the network quality detection results corresponding to the main transmission link includes: Obtain the network quality index threshold and initial redundancy ratio, and use the network quality detection result corresponding to the main transmission link as the target detection result; The detection data corresponding to the target detection result is compared with the network quality index threshold to obtain a fourth comparison result; Based on the fourth comparison result, the redundancy ratio corresponding to the data transmission process is determined.
11. The data transmission method as described in claim 10, characterized in that, Determining the redundancy ratio corresponding to the data transmission process based on the fourth comparison result includes: If the detection data corresponding to the target detection result is lower than the network quality index threshold, the initial redundancy ratio is increased to obtain the redundancy ratio. If the detection data corresponding to the target detection result is equal to the network quality index threshold, the initial redundancy ratio shall be used as the redundancy ratio. If the detection data corresponding to the target detection result is higher than the network quality index threshold, the initial redundancy ratio is reduced to obtain the redundancy ratio.
12. The data transmission method as described in claim 9, characterized in that, The step of generating at least one redundant data packet based on the redundancy ratio and the data packet to be transmitted includes: Based on the first number of data packets to be transmitted and the redundancy ratio, a second number of redundant data packets is determined; Based on the second quantity, at least one data packet to be transmitted is selected from the data packets to be transmitted as the original data packet of the redundant data packet; The original data packet is encoded and calculated using a forward error correction algorithm to obtain the redundant data packet.
13. The data transmission method as described in claim 1, characterized in that, Determining at least two data transmission links corresponding to the data stream to be transmitted at the current moment includes: Obtain a preset data transmission link and detect the network status of the preset data transmission link at the current moment; If the network status indicates that the preset data transmission link is an available link, then the preset data transmission link is used as the data transmission link corresponding to the data stream to be transmitted.
14. The data transmission method as described in claim 1, characterized in that, After transmitting the data packet to be transmitted to the receiving end via the primary transmission link and the redundant data packet to the receiving end via the secondary transmission link, the method further includes: Obtain the main link network quality detection result during the transmission process of the main transmission link, and the auxiliary link network quality detection result during the transmission process of the auxiliary transmission link; The main link network quality detection result is compared with the auxiliary link network quality detection result to obtain the fifth comparison result; If the fifth comparison result shows that the secondary link network quality detection result is better than the primary link network quality detection result within a preset time range, the primary transmission link is updated to the secondary transmission link to obtain the updated secondary transmission link, and the secondary transmission link is updated to the primary transmission link to obtain the updated primary transmission link. The remaining untransmitted data packets to be transmitted are transmitted to the receiving end according to the updated main transmission link, and the remaining untransmitted redundant data packets are transmitted to the receiving end according to the updated secondary transmission link.
15. A data transmission method, characterized in that, Applied to the receiving end, including: The receiver receives the data packet to be transmitted through the main transmission link, obtains the received data packet, and receives the redundant data packet transmitted through the secondary transmission link, obtains the received redundant data packet. Based on the received data packets, the data integrity of the data stream to be transmitted is detected; If the data stream to be transmitted has missing data, determine the missing data packets of the data stream to be transmitted; Based on the received data packets and the received redundant data packets, data recovery is performed on the missing data packets to obtain the data corresponding to the missing data packets.
16. The data transmission method as described in claim 15, characterized in that, The step of recovering data from the missing data packets based on the received data packets and the received redundant data packets to obtain the data corresponding to the missing data packets includes: Filter out target data packets that are related to the missing data packets from the received data packets; Filter out target redundant data packets that are related to the missing data packets from the received redundant data packets; Decoding calculations are performed based on the target data packet and the target redundant data packet to obtain the data corresponding to the missing data packet.
17. A data transmission device, characterized in that, include: The data acquisition unit is used to acquire at least one data packet to be transmitted corresponding to the data stream to be transmitted, and to determine at least two data transmission links corresponding to the data stream to be transmitted at the current time. A link segmentation unit is used to obtain the network quality detection result of each data transmission link, and based on the network quality detection result, to select at least one primary transmission link and at least one secondary transmission link in the data transmission links, wherein the link priority of the primary transmission link is higher than that of the secondary transmission link. The data generation unit is used to generate at least one redundant data packet based on the network quality detection result corresponding to the main transmission link and the data packet to be transmitted. The redundant data packet is used by the receiving end to recover the data of the data packet to be transmitted after receiving the redundant data packet. The data transmission unit is used to transmit the data packet to be transmitted to the receiving end according to the main transmission link, and to transmit the redundant data packet to the receiving end according to the secondary transmission link.
18. A data transmission device, characterized in that, include: The data receiving unit is used to receive the data packet to be transmitted by the sending end through the main transmission link, obtain the received data packet, and receive the redundant data packet transmitted by the sending end through the secondary transmission link, obtain the received redundant data packet. A data detection unit is used to detect the data integrity of the data stream to be transmitted based on the received data packets; A data determination unit is used to determine the missing data packets of the data stream to be transmitted if there are missing data packets in the data stream to be transmitted. The data recovery unit is used to recover the missing data packet based on the received data packet and the received redundant data packet, so as to obtain the data corresponding to the missing data packet.
19. An electronic device, characterized in that, It includes a processor and a memory, the memory storing an application program, and the processor running the application program within the memory to perform the steps of the data transmission method according to any one of claims 1 to 16.
20. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the data transmission method according to any one of claims 1 to 16.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data transmission method according to any one of claims 1 to 16.