CN116527202A - Method and system for data transmission - Google Patents
Method and system for data transmission Download PDFInfo
- Publication number
- CN116527202A CN116527202A CN202310565301.8A CN202310565301A CN116527202A CN 116527202 A CN116527202 A CN 116527202A CN 202310565301 A CN202310565301 A CN 202310565301A CN 116527202 A CN116527202 A CN 116527202A
- Authority
- CN
- China
- Prior art keywords
- data
- protocol
- redundant
- original data
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000004806 packaging method and process Methods 0.000 claims abstract description 9
- 238000004422 calculation algorithm Methods 0.000 claims description 62
- 238000011084 recovery Methods 0.000 claims description 30
- 238000012545 processing Methods 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 12
- 238000012217 deletion Methods 0.000 claims description 7
- 230000037430 deletion Effects 0.000 claims description 7
- 230000007246 mechanism Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 5
- 238000005538 encapsulation Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 4
- 230000000903 blocking effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0041—Arrangements at the transmitter end
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0045—Arrangements at the receiver end
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2212/00—Encapsulation of packets
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Communication Control (AREA)
Abstract
The embodiment of the application provides a method and a system for data transmission, comprising the following steps: generating redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; and transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream. Therefore, the data are transmitted by utilizing unreliable transmission streams connected by the QUIC protocol, the data not only comprise the original data, but also comprise redundant data generated according to the original data to be transmitted, if data packet loss occurs during network transmission, a receiving end can recover the original data through the redundant data, the lost data packet can be obtained without a retransmission mechanism, and the efficiency and the stability of network transmission are improved.
Description
Technical Field
The embodiments of the present application relate to the field of network communications technologies, and in particular, to a method, a system, a computer device, and a computer readable storage medium for data transmission.
Background
In a weak network environment, if the TCP protocol is adopted to transmit data, the connection needs to be established in a three-way handshake mode, the process is complicated, and a plurality of data packets need to be transmitted, so that the TCP connection is established for a long time. In a weak network environment, the TCP connection establishment time is longer due to higher network delay and packet loss rate, so that the efficiency and stability of network transmission are affected; due to the problem of TCP queue head blocking, the subsequent data packets can continue to be transmitted after the retransmission of the data packet lost before is completed, so that the transmission efficiency is greatly reduced; the TCP protocol adopts a retransmission mechanism for each data packet to ensure the reliability of data transmission, and once the data packet is lost or damaged, the TCP protocol retransmits the data packet, however, in a weak network environment, the retransmission mechanism of the TCP protocol can cause delay increase of data transmission due to common conditions of data packet loss and damage, thereby influencing the efficiency of network transmission.
If the UDP protocol is adopted, the UDP protocol does not provide reliability guarantee of data transmission, and once the data packet is lost or damaged, the UDP protocol does not retransmit, but directly discards the data packet. In a weak network environment, the reliability of data transmission is lower due to higher network delay and packet loss rate by directly discarding the data packet.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, a system, a computer device and a computer readable storage medium for data transmission, which are used for solving the following problems: how to ensure the reliability of data transmission while improving the efficiency of data transmission in a weak network environment.
An aspect of an embodiment of the present application provides a data transmission method, applied to a transmitting end, where the transmitting end and a receiving end establish a connection based on a quit protocol, where the connection based on the quit protocol includes an unreliable transport stream, and the method includes:
generating redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data;
packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol;
and transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream.
Optionally, the generating redundant data according to the plurality of original data includes:
and generating redundant data according to the plurality of original data based on a preset FEC algorithm.
Optionally, the encapsulating the plurality of original data and redundant data to obtain a data packet based on the quitc protocol includes:
encapsulating header data based on a preset protocol in the plurality of original data and redundant data; the header data based on the preset protocol comprises an FEC algorithm type field;
and configuring the FEC algorithm type field according to the preset FEC algorithm to obtain a data message based on the QUIC protocol.
Optionally, the header data based on the preset protocol further includes an FEC group number field, a recoverable packet number field and an FEC sequence number field.
Optionally, the encapsulating the original data and the redundant data to obtain a data packet based on the QUIC protocol further includes:
and encapsulating the header data based on the UDP protocol and the header data based on the QUIC protocol in the original data and the redundant data.
An aspect of the embodiments of the present application further provides a data transmission method, applied to a receiving end, where the receiving end establishes a connection based on a qic protocol with a transmitting end, where the connection based on the qic protocol includes an unreliable transport stream, and the method includes:
Receiving a data message based on a QUIC protocol transmitted by the transmitting end through the unreliable transmission stream;
analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data;
and under the condition that the plurality of original data are missing, recovering the plurality of original data according to the redundant data.
Optionally, parsing the QUIC protocol-based data packet further obtains header data based on a preset protocol; the header data based on the preset protocol comprises an FEC algorithm type field;
the recovering processing of the plurality of original data according to the redundant data includes:
determining a target FEC algorithm according to the FEC algorithm type field;
and carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm.
Optionally, the header data based on the preset protocol further includes a recoverable packet number field; the recovering processing of the plurality of original data according to the redundant data based on the target FEC algorithm includes:
if the plurality of original data meet the recovery condition according to the recoverable data packet number field, carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm;
And if the plurality of original data do not meet the recovery condition according to the recoverable data packet number field, acquiring the data message based on the QUIC protocol from the transmitting end again.
Optionally, the header data based on the preset protocol further includes an FEC group number field and an FEC sequence number field; after the step of parsing the QUIC protocol-based data packet to obtain a plurality of original data and redundant data, the method further includes:
and judging whether the plurality of original data have the deletion or not according to the FEC group number field and the FEC sequence number field.
Optionally, the method further comprises:
and discarding the redundant data in the case that the plurality of original data do not have the deletion.
An aspect of embodiments of the present application further provides a system for data transmission, comprising a transmitting end and a receiving end, the transmitting end and the receiving end establishing a quit protocol based connection, the quit protocol based connection comprising an unreliable transport stream, wherein,
the sending end is used for generating redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream;
The receiving end is used for receiving the QUIC protocol-based data message transmitted by the transmitting end through the unreliable transmission stream; analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data; and under the condition that the plurality of original data are missing, recovering the plurality of original data according to the redundant data.
An aspect of the embodiments of the present application further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of data transmission as described above when the computer program is executed.
An aspect of the embodiments of the present application further provides a computer-readable storage medium having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the method for data transmission as described above when the computer program is executed.
The method, the system, the equipment and the computer readable storage medium for data transmission provided by the embodiment of the application generate redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; and transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream. Therefore, the data are transmitted by utilizing unreliable transmission streams connected by the QUIC protocol, the data not only comprise the original data, but also comprise redundant data generated according to the original data to be transmitted, if data packet loss occurs during network transmission, a receiving end can recover the original data through the redundant data, the lost data packet can be obtained without a retransmission mechanism, and the efficiency and the stability of network transmission are improved.
Drawings
Fig. 1 schematically illustrates an application environment diagram of a method of data transmission according to an embodiment of the present application;
fig. 2 schematically shows a flow chart of a method of data transmission according to an embodiment of the present application;
FIG. 3 schematically illustrates a schematic diagram of a QUIC protocol based connection under a C/S software architecture;
fig. 4 schematically shows a schematic diagram of header data based on a preset protocol;
FIG. 5 schematically illustrates a data structure of a data packet;
fig. 6 schematically shows a flow chart of a method of data transmission according to a second embodiment of the present application;
fig. 7 schematically shows a block diagram of a system for data transmission according to embodiment three of the present application;
fig. 8 schematically shows a block diagram of an apparatus for data transmission according to a fourth embodiment of the present application;
fig. 9 schematically shows a block diagram of an apparatus for data transmission according to embodiment five of the present application; and
Fig. 10 schematically illustrates a hardware architecture diagram of a computer device adapted to implement a method for data transmission according to a sixth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that the descriptions of "first," "second," etc. in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
In the prior art, with the continuous development of the internet, the network transmission speed is greatly improved, but under some poor network conditions, network transmission still has some bottlenecks, such as high delay, packet loss and the like, and the problems can lead to unstable and slow network transmission. Some traditional network transmission protocols, such as TCP and UDP, have some limitations, for example, under the condition that the network environment is relatively poor, the TCP protocol causes the problems of network transmission speed reduction, high transmission delay and the like due to high handshake delay, blocking of a queue head and the like; and the UDP protocol can have the problems of packet loss and the like under the condition of unstable network environment, thereby influencing the reliability of data transmission. However, the QUIC protocol is a network transmission protocol based on UDP protocol, which has a faster transmission speed and lower delay, and also supports the characteristics of 0-RTT establishment, multiplexing, flow control, etc. In addition, the QUIC protocol also supports a Forward Error Correction (FEC) technology, so that the reliability of data transmission is improved, the packet loss phenomenon in the data transmission process is reduced and the retransmission times are reduced by adding redundant data in the data transmission process.
In view of this, the present application aims to propose a method for data transmission based on the QUIC protocol, by generating redundant data from a plurality of raw data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; and transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream. Therefore, the data are transmitted by utilizing unreliable transmission streams connected by the QUIC protocol, the data not only comprise original data, but also comprise redundant data generated according to the data to be transmitted, if data packet loss occurs in the network, the receiving end can recover the original data through the redundant data, the lost data packet can be recovered without a retransmission mechanism, and the efficiency and the stability of network transmission are improved.
In addition, according to the scheme for data transmission, based on the QUIC protocol as a transmission protocol, compared with the scheme that 1.5-RTT is needed for each connection establishment of TCP, after the QUIC is established by 1-RTT handshake for the first time, only 0-RTT is needed for subsequent handshake reconnection, so that handshake delay in a weak network environment can be effectively reduced; the QUIC protocol has the characteristics of multiplexing and the like, can support single-connection multi-stream independent transmission, greatly improves the transmission efficiency in the weak network environment, and does not have the problems of slow weak network transmission speed and the like caused by single-connection queue head blocking of the TCP protocol; the QUIC is a network transmission protocol based on UDP protocol, and utilizes the characteristics of retransmission mechanism, congestion control, flow control and the like to realize reliable transmission, and also can support unreliable transmission of the QUIC connection level, and compared with the completely unreliable UDP protocol, the QUIC can effectively ensure the reliability of data.
Various embodiments are provided to further describe schemes for data transmission, with particular reference to the following.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but are only used for convenience in describing the present application and distinguishing each step, and thus should not be construed as limiting the present application.
The following is a term explanation of the present application:
weak network environment: refers to an environment where network bandwidth is small or network signal strength is poor, for example: underground garages, high-speed rail, remote mountain areas and other places.
QUIC is called Quick UDP Internet Connection, which is a UDP-based low-latency Internet transport layer protocol formulated by Google in early stage, and IETF (Internet Engineering Task Force) has issued standardized version RFC 9000.
FEC-forward error correction (Forward Error Correction, FEC) is a commonly used technique for error correction in data transmission, which implements the function of detecting and correcting errors during data transmission by adding certain redundant information to the data.
RTT: the full name is Round Trip Time. Representing the network data round trip delay. The 0-RTT represents that application data can be sent during the handshake phase.
Fig. 1 schematically shows an environmental application schematic according to an embodiment of the present application. As shown in fig. 1:
the computer device 10000 can be connected to the client 30000 via a network 20000.
The computer device 10000 can provide services such as network debugging, or return result data of data transmission to the client 30000, or the like.
The computer device 10000 can be located in a data center such as a single venue or distributed in different geographic locations (e.g., in multiple venues). The computer device 10000 can provide services via one or more networks 20000. Network 20000 includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. Network 20000 may include physical links such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and the like. Network 20000 may include wireless links such as cellular links, satellite links, wi-Fi links, and the like.
The computer device 10000 can be implemented by one or more computing nodes. One or more computing nodes may include virtualized computing instances. Virtualized computing instances may comprise emulation of virtual machines, e.g., computer systems, operating systems, servers, etc. The computing node may load the virtual machine by the computing node based on the virtual image and/or other data defining the particular software (e.g., operating system, dedicated application, server) used for the emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and/or terminated on one or more computing nodes. A hypervisor may be implemented to manage the use of different virtual machines on the same computing node.
The client 30000 may be configured to access the content and services of the computer device 10000. Client 30000 can include any type of electronic device, such as a mobile device, tablet device, laptop computer, workstation, virtual reality device, gaming device, set top box, digital streaming media device, vehicle terminal, smart television, set top box, and the like.
The client 30000 can output (e.g., display, render, present) result data of the data transmission, etc., to a user.
The network debugging scheme will be described below by way of various embodiments. The scheme may be implemented by the computer device 10000.
Example 1
Fig. 2 schematically shows a flow chart of a method of data transmission according to an embodiment of the present application. Applied to a sender, said sender and receiver establishing a quit protocol based connection comprising an unreliable transport stream, said method comprising the steps S202-S206, wherein,
step S202, redundant data are generated according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data;
the data transmission scheme of the embodiment can be used for data types based on a C/S software architecture, and is not limited to network transmission, wherein a sending end is responsible for sending data, and a receiving end is responsible for receiving data. In a specific implementation, the sending end may be a server end or a client end, and similarly, the receiving end may be a server end or a client end, which is not limited in this embodiment.
In this embodiment, after the sending end obtains or generates multiple original data to be transmitted, redundant data corresponding to the original data may be generated, for example, calculation may be performed based on an FEC algorithm to generate redundant data, where the redundant data is used to recover the multiple original data, that is, when there is packet loss in data received by the receiving end in a weak network environment, the receiving end may directly perform data recovery through the redundant data, so that the receiving end is prevented from needing to obtain complete original data by retransmitting the data.
Step S204, packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol;
specifically, by defining these raw data and redundant data as a set of data, the set of data is encapsulated based on the QUIC protocol, i.e., header data of the QUIC protocol is encapsulated for the set of data, so that these data can be transmitted based on the QUIC protocol.
Step S206, transmitting the data message based on QUIC protocol to the receiving end through the unreliable transmission stream.
In this embodiment, after the data is encapsulated, the data packet based on the qic protocol may be transmitted to the receiving end through an unreliable transport stream based on the qic protocol connection. Because the data packet contains the redundant data generated according to the original data, if the data packet received by the receiving end loses packets, the receiving end can directly recover the data according to the redundant data, for example, the redundant data is calculated and generated based on the FEC algorithm, and the same FEC algorithm as that used for generating the redundant data can be used for calculation to recover the original data.
In one example, as shown in fig. 3, assuming that the server end is a transmitting end and the client is a receiving end, 1 Connection of the quit is established between the server end and the client end, the Connection of the quit includes two streams, namely an unreliable transport stream quitagram+fec and a reliable transport stream quitam, where a data packet carrying redundant data is transmitted by using the quitagram, so that the receiving end can directly recover data according to the redundant data under the condition that the received data packet loses packets, and the lost data packet can be recovered without a retransmission mechanism, thereby improving the efficiency and stability of network transmission.
Several alternative embodiments are provided below for the method of optimizing the data transmission, in particular as follows:
in a preferred embodiment of the present application, the generating redundant data according to the plurality of original data includes:
and generating redundant data according to the plurality of original data based on a preset FEC algorithm.
In this embodiment, the transmitting end may generate redundant data according to multiple original data based on a preset FEC algorithm, where the preset FEC algorithm is a preset FEC algorithm, for example, the preset FEC algorithm may be an m+1 series exclusive-or algorithm, an m+n series RS matrix algorithm, or the like, which is not limited in this embodiment.
In a preferred embodiment of the present application, the step S204 may include the steps of:
encapsulating header data based on a preset protocol in the plurality of original data and redundant data; the header data based on the preset protocol comprises an FEC algorithm type field; and configuring the FEC algorithm type field according to the preset FEC algorithm to obtain a data message based on the QUIC protocol.
The preset protocol is a self-defined protocol and is mainly used for identifying related information of the data message between the sending end and the receiving end, and the related information comprises information such as message type, message length, FEC group number, FEC recoverable data packet number, sequence number of current FEC data and the like, so that the data message can be directly transmitted between the sending end and the receiving end without redundant handshake interaction.
In this embodiment, by defining a plurality of original data and redundant data as a set of data, header data based on a preset protocol is encapsulated in the plurality of original data and redundant data contained in the set of data, where the header data based on the preset protocol contains an FEC algorithm type field; and configuring an FEC algorithm type field according to a preset FEC algorithm to obtain a data message based on the QUIC protocol. The FEC algorithm type field, fectype, is used to specify the data packet type and FEC algorithm type, so that the receiving end can use the same FEC algorithm to recover data according to the redundant data when the data packet is lost.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes an FEC group number field, a recoverable packet number field and an FEC sequence number field.
In this embodiment, the header data based on the preset protocol may further include an FEC group number field, a recoverable packet number field, a sequence number field and a variable length field of the current FEC packet, and so on. The FEC group number field seq number is used for designating the FEC group number corresponding to the current message; a recoverable data packet number field, configured to specify the number of data packets that can be recovered by the current redundant data; the FEC sequence number field FEC count is used for specifying the FEC sequence number corresponding to the current message.
In addition, the header data based on the preset protocol may further include a variable length field length, for specifying the data length of the message; r field, which is used to specify the data type of the current message, wherein a value of 1 indicates that the packet is a fec redundant packet, and a value of 0 indicates that the packet is an original data packet; and an l field, for specifying the number of bytes occupied by the length field, wherein a value of 1 indicates that the length field occupies 16bits, and 0 indicates that the length field occupies 8bits.
In a specific implementation, r, l and the fec type field occupy 1 byte altogether; the l field occupies 1bit, the value of 1 indicates that the length field occupies 16bits, and 0 indicates that the length field occupies 8bits; the fec type field occupies 6 bits; the length field depends on the custom protocol header and payload size; the seq number field occupies 1 byte, represents the sequence number of the current group of fec data packets, and a plurality of original data packets and a plurality of redundant data packets are grouped, and the sequence numbers are the same; the recovernums occupies 1 byte, if the value is K, the value is less than the sum of the original data packet and the redundant data packet, and the value indicates that the group of fec data packets can be completely recovered after at least receiving K packets; the fec count occupies 1 byte, which indicates that the sequence number of the data packet in the same seq number can be used for intra-group ordering.
As an example, fig. 4 is a schematic diagram of header data based on a preset protocol, including an r field accounting for 1bit; the l field occupies 1bit; the fec type field occupies 8 bits; the length field occupies 8bits or 16bits; the seq number field occupies 8 bits; the recovernum field occupies 8 bits; the fec count takes up 8 bits; payload is the message body.
In a preferred embodiment of the present application, the encapsulating the original data and the redundant data to obtain a data packet based on the QUIC protocol further includes:
and encapsulating the header data based on the UDP protocol and the header data based on the QUIC protocol in the original data and the redundant data.
In this embodiment, header data based on UDP and header data based on qic may also be encapsulated in the original data and the redundant data, so that the encapsulated packet may be transmitted based on qic.
Fig. 5 shows a schematic data structure of a data packet, which includes a Header data UDP Header based on the UDP protocol, a Header data quitc Header based on the quitc protocol, a preset protocol Header and a packet content data payload. The QUIC Header accords with the RFC 9000 standard, and a preset protocol Header part can define each field according to requirements, and is mainly used for identifying the payload message type at the Client and the Server, the message length, the FEC group number, the number of FEC recoverable data packets, the sequence number of the current FEC data and other information, so that redundant handshake interaction is not needed at both ends, and data information is directly transmitted; the payload message part carries the original data and the redundant data sent by the sending end.
Example two
Fig. 6 schematically shows a flow chart of a method of data transmission according to a second embodiment of the present application. Is applied to a receiving end, the receiving end establishes a connection based on the QUIC protocol with a transmitting end, the connection based on the QUIC protocol contains unreliable transport streams, the method comprises steps S602-S606, wherein,
step S602, receiving a data message based on a QUIC protocol transmitted by the transmitting end through the unreliable transmission stream;
in this embodiment, 1 Connection based on the QUIC protocol is established between the sending end and the receiving end, where the Connection based on the QUIC protocol includes an unreliable transport stream, and the receiving end may receive the data packet based on the QUIC protocol transmitted by the sending end through the unreliable transport stream.
Step S604, analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data;
in this embodiment, the data packet includes redundant data corresponding to the original data, and the receiving end may obtain a plurality of original data and redundant data by parsing the data packet based on the QUIC protocol.
Step S606, in the case that the plurality of original data have a missing, performing recovery processing on the plurality of original data according to the redundant data.
In this embodiment, the receiving end may detect the multiple pieces of original data obtained by parsing, determine whether the received multiple pieces of original data have a missing, if so, perform recovery processing on the multiple pieces of original data according to the redundant data, for example, the redundant data is generated by performing calculation based on an FEC algorithm, and may use the same FEC algorithm as that used to generate the redundant data to perform calculation so as to recover the original data.
Several alternative embodiments are provided below for the method of optimizing the data transmission, in particular as follows:
in a preferred embodiment of the present application, parsing the QUIC protocol-based data packet further obtains header data based on a preset protocol; the header data based on the preset protocol comprises an FEC algorithm type field;
the step S606 may include the steps of:
determining a target FEC algorithm according to the FEC algorithm type field; and carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm.
In this embodiment, the receiving end may further obtain header data based on a preset protocol by parsing a data packet based on the QUIC protocol, where the header data based on the preset protocol includes an FEC algorithm type field. And under the condition that the original data is missing, the receiving end can determine a target FEC algorithm according to the FEC algorithm type field, and recover the plurality of original data according to the redundant data based on the target FEC algorithm.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes a recoverable packet number field; the recovering processing of the plurality of original data according to the redundant data based on the target FEC algorithm includes:
if the plurality of original data meet the recovery condition according to the recoverable data packet number field, carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm;
and if the plurality of original data do not meet the recovery condition according to the recoverable data packet number field, acquiring the data message based on the QUIC protocol from the transmitting end again.
In this embodiment, the header data based on the preset protocol may further include a recoverable data packet number field, the receiving end may determine that the plurality of original data meets a recovery condition according to the recoverable data packet number field, that is, count the number of data packets currently received, compare the number of data packets currently received with the recoverable data packet number, if the number of data packets currently received is less than or equal to the recoverable data packet number, it indicates that the plurality of received original data meets the recovery condition, and may perform recovery processing on the plurality of original data according to the redundant data based on a target FEC algorithm. If the number of the currently received data packets is larger than the number of the recoverable data packets, the received plurality of original data cannot meet the recovery condition, the redundant data cannot be directly utilized to recover the original data, and the data message based on the QUIC protocol needs to be acquired from the transmitting end again through a retransmission mechanism.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes an FEC group number field and an FEC sequence number field; after the step of parsing the QUIC protocol-based data packet to obtain a plurality of original data and redundant data, the method further includes:
and judging whether the plurality of original data have the deletion or not according to the FEC group number field and the FEC sequence number field.
In this embodiment, the header data based on the preset protocol may further include an FEC group number field and an FEC sequence number field, and after the receiving end parses the data packet based on the QUIC protocol, the receiving end may determine whether a plurality of original data have a loss according to the FEC group number field and the FEC sequence number field, so as to perform data recovery when the data are lost, and ensure reliability of the data.
In a preferred embodiment of the present application, the method further comprises:
and discarding the redundant data in the case that the plurality of original data do not have the deletion.
In this embodiment, in the case where the receiving end determines that there is no loss in the received plurality of original data, the redundant data may be directly discarded.
Example III
Fig. 7 schematically shows a block diagram of a system for data transmission according to embodiment three of the present application, the means of which may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to complete the embodiments of the present application. Program modules in the embodiments of the present application refer to a series of computer program instruction segments capable of implementing specific functions, and the following description specifically describes the functions of each program module in the embodiments of the present application.
As shown in fig. 7, the system 700 for data transmission may include a sender 710 and a receiver 720, the sender and receiver establishing a quit protocol based connection, the quit protocol based connection comprising an unreliable transport stream, wherein,
the transmitting end 710 is configured to generate redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream;
the receiving end 720 is configured to receive, through the unreliable transport stream, a data packet based on the QUIC protocol transmitted by the sending end; analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data; and under the condition that the plurality of original data are missing, recovering the plurality of original data according to the redundant data.
Example IV
Fig. 8 schematically shows a block diagram of an apparatus for data transmission according to the fourth embodiment of the present application, which may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to complete the embodiments of the present application. Program modules in the embodiments of the present application refer to a series of computer program instruction segments capable of implementing specific functions, and the following description specifically describes the functions of each program module in the embodiments of the present application.
Applied to a transmitting end, the transmitting end establishes a connection based on the QUIC protocol with a receiving end, the connection based on the QUIC protocol contains unreliable transport streams, as shown in FIG. 8, the data transmission device 800 may include the following modules:
a redundant data generating module 810, configured to generate redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data;
the data encapsulation module 820 is configured to encapsulate the plurality of original data and redundant data to obtain a data packet based on the QUIC protocol;
and a message transmission module 830, configured to transmit the QUIC protocol-based data message to the receiving end through the unreliable transport stream.
In a preferred embodiment of the present application, the redundant data generation module 810 includes:
and the redundant data generation sub-module is used for generating redundant data according to the plurality of original data based on a preset FEC algorithm.
In a preferred embodiment of the present application, the data encapsulation module 820 includes:
a preset protocol encapsulation sub-module for encapsulating header data based on a preset protocol in the plurality of original data and redundant data; the header data based on the preset protocol comprises an FEC algorithm type field; and configuring the FEC algorithm type field according to the preset FEC algorithm to obtain a data message based on the QUIC protocol.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes an FEC group number field, a recoverable packet number field and an FEC sequence number field.
In a preferred embodiment of the present application, the data encapsulation module 820 further includes:
and the QUIC protocol encapsulation sub-module is used for encapsulating the head data based on the UDP protocol and the head data based on the QUIC protocol in the original data and the redundant data.
Example five
Fig. 9 schematically shows a block diagram of an apparatus for data transmission according to the fifth embodiment of the present application, which may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to complete the embodiments of the present application. Program modules in the embodiments of the present application refer to a series of computer program instruction segments capable of implementing specific functions, and the following description specifically describes the functions of each program module in the embodiments of the present application.
As shown in fig. 9, the apparatus 900 for data transmission may include the following modules:
a message receiving module 910, configured to receive, through the unreliable transport stream, a data message based on the QUIC protocol transmitted by the sender;
The message parsing module 920 is configured to parse the QUIC protocol-based data message to obtain a plurality of original data and redundant data;
and the data recovery module 930 is configured to perform recovery processing on the plurality of original data according to the redundant data if there is a loss in the plurality of original data.
In a preferred embodiment of the present application, parsing the QUIC protocol-based data packet further obtains header data based on a preset protocol; the header data based on the preset protocol comprises an FEC algorithm type field;
the data recovery module 930 includes:
the FEC algorithm determining submodule is used for determining a target FEC algorithm according to the FEC algorithm type field;
and the data recovery sub-module is used for carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes a recoverable packet number field; the data recovery sub-module comprises:
the data recovery unit is used for carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm if the plurality of original data are determined to meet the recovery condition according to the recoverable data packet number field;
And the data re-acquisition unit is used for re-acquiring the data message based on the QUIC protocol from the transmitting end if the plurality of original data do not meet the recovery condition according to the recoverable data packet number field.
In a preferred embodiment of the present application, the header data based on the preset protocol further includes an FEC group number field and an FEC sequence number field; the apparatus further comprises:
and the judging module is used for judging whether the plurality of original data have the deletion or not according to the FEC group number field and the FEC sequence number field.
In a preferred embodiment of the present application, the apparatus further comprises:
and the redundant data discarding module is used for discarding the redundant data under the condition that the plurality of original data are not missing.
Example six
Fig. 10 schematically illustrates a hardware architecture diagram of a computer device 10000 adapted to implement a method for data transmission according to a sixth embodiment of the present application. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a cabinet server (including a FEN independent server or a server cluster formed by a plurality of servers), etc. As shown in fig. 10, the computer device 10000 includes at least, but is not limited to: the memory 10010, processor 10020, network interface 10030 may be communicatively linked to each other via a system bus. Wherein:
Memory 10010 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, memory 10010 may be an internal storage module of computer device 10000, such as a hard disk or memory of computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Of course, the memory 10010 may also include both an internal memory module of the computer device 10000 and an external memory device thereof. In this embodiment, the memory 10010 is typically used for storing an operating system installed on the computer device 10000 and various application software, such as program codes of a data transmission method. In addition, the memory 10010 may be used to temporarily store various types of data that have been output or are to be output.
The processor 10020 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 10020 is typically configured to control overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is configured to execute program codes or process data stored in the memory 10010.
The network interface 10030 may comprise a wireless network interface or a wired network interface, which network interface 10030 is typically used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 10000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 10 only shows a computer device having components 10010-10030, but it should be understood that not all of the illustrated components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the method of data transmission stored in the memory 10010 may also be divided into one or more program modules and executed by one or more processors (the processor 10020 in this embodiment) to complete the embodiments of the present application.
Example seven
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of data transmission in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer-readable storage medium is typically used to store an operating system and various types of application software installed on a computer device, such as program codes of a method for data transmission in the embodiment, and the like. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.
Claims (13)
1. A method for data transmission, applied to a transmitting end, the transmitting end and a receiving end establishing a connection based on a QUIC protocol, the connection based on the QUIC protocol containing unreliable transport streams, the method comprising:
Generating redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data;
packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol;
and transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream.
2. The method of data transmission of claim 1, wherein said generating redundant data from said plurality of raw data comprises:
and generating redundant data according to the plurality of original data based on a preset FEC algorithm.
3. The method for data transmission according to claim 2, wherein said encapsulating said plurality of original data and redundant data to obtain a QUIC protocol-based data packet comprises:
encapsulating header data based on a preset protocol in the plurality of original data and redundant data; the header data based on the preset protocol comprises an FEC algorithm type field;
and configuring the FEC algorithm type field according to the preset FEC algorithm to obtain a data message based on the QUIC protocol.
4. A method of data transmission according to claim 3, wherein the header data based on the predetermined protocol further comprises an FEC group number field, a recoverable packet number field and an FEC sequence number field.
5. A method of data transmission according to claim 3, wherein said encapsulating said original data and redundant data to obtain a quac protocol based data message further comprises:
and encapsulating the header data based on the UDP protocol and the header data based on the QUIC protocol in the original data and the redundant data.
6. A method of data transmission, applied to a receiving end, the receiving end and a transmitting end establishing a connection based on a QUIC protocol, the connection based on the QUIC protocol containing unreliable transport streams, the method comprising:
receiving a data message based on a QUIC protocol transmitted by the transmitting end through the unreliable transmission stream;
analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data;
and under the condition that the plurality of original data are missing, recovering the plurality of original data according to the redundant data.
7. The method for data transmission according to claim 6, wherein parsing the QUIC protocol-based data message also results in header data based on a preset protocol; the header data based on the preset protocol comprises an FEC algorithm type field;
The recovering processing of the plurality of original data according to the redundant data includes:
determining a target FEC algorithm according to the FEC algorithm type field;
and carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm.
8. The method of claim 7, wherein the header data based on a predetermined protocol further comprises a recoverable packet count field; the recovering processing of the plurality of original data according to the redundant data based on the target FEC algorithm includes:
if the plurality of original data meet the recovery condition according to the recoverable data packet number field, carrying out recovery processing on the plurality of original data according to the redundant data based on the target FEC algorithm;
and if the plurality of original data do not meet the recovery condition according to the recoverable data packet number field, acquiring the data message based on the QUIC protocol from the transmitting end again.
9. The method according to claim 7, wherein the header data based on the preset protocol further comprises an FEC group number field and an FEC sequence number field; after the step of parsing the QUIC protocol-based data packet to obtain a plurality of original data and redundant data, the method further includes:
And judging whether the plurality of original data have the deletion or not according to the FEC group number field and the FEC sequence number field.
10. The method of data transmission of claim 6, further comprising:
and discarding the redundant data in the case that the plurality of original data do not have the deletion.
11. A system for data transmission, comprising a transmitting end and a receiving end, wherein the transmitting end and the receiving end establish a QUIC protocol-based connection, the QUIC protocol-based connection comprising an unreliable transport stream, and wherein,
the sending end is used for generating redundant data according to a plurality of original data to be transmitted; wherein the redundant data is used for recovering the plurality of original data; packaging the plurality of original data and redundant data to obtain a data message based on a QUIC protocol; transmitting the data message based on the QUIC protocol to the receiving end through the unreliable transmission stream;
the receiving end is used for receiving the QUIC protocol-based data message transmitted by the transmitting end through the unreliable transmission stream; analyzing the data message based on the QUIC protocol to obtain a plurality of original data and redundant data; and under the condition that the plurality of original data are missing, recovering the plurality of original data according to the redundant data.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program for carrying out the steps of the method of data transmission according to any one of claims 1 to 5 or 6 to 10.
13. A computer-readable storage medium, in which a computer program is stored, the computer program being executable by at least one processor to cause the at least one processor to perform the steps of the method of data transmission according to any one of claims 1 to 5 or 6 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310565301.8A CN116527202A (en) | 2023-05-18 | 2023-05-18 | Method and system for data transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310565301.8A CN116527202A (en) | 2023-05-18 | 2023-05-18 | Method and system for data transmission |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116527202A true CN116527202A (en) | 2023-08-01 |
Family
ID=87392099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310565301.8A Pending CN116527202A (en) | 2023-05-18 | 2023-05-18 | Method and system for data transmission |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116527202A (en) |
-
2023
- 2023-05-18 CN CN202310565301.8A patent/CN116527202A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111083161A (en) | Data transmission processing method and device and Internet of things equipment | |
CN110505123B (en) | Packet loss rate calculation method, server and computer-readable storage medium | |
CN110943800A (en) | Method, device and system for sending data packet, storage medium and electronic device | |
US11023412B2 (en) | RDMA data sending and receiving methods, electronic device, and readable storage medium | |
US11196792B2 (en) | Method, device and system for transmitting data | |
EP4429137A1 (en) | Data packet processing method, communication apparatus and communication system | |
CN113301007A (en) | Data transmission method, computing device and storage medium | |
CN110138635B (en) | Protocol conversion function verification device and method supporting FC and Ethernet | |
EP4131817A1 (en) | Data transmission method and network device | |
CN112003816B (en) | Data transmission method, device, equipment and storage medium | |
CN110149242B (en) | Protocol conversion function verification device and method supporting SRIO and Ethernet | |
US20230057487A1 (en) | Data packet format to communicate across different networks | |
CN116527202A (en) | Method and system for data transmission | |
US11489947B2 (en) | Relay node and method for encapsulating a packet based on tunneling protocol | |
CN115314544A (en) | TCP data one-way transmission method, device, equipment and medium | |
US8279891B2 (en) | Techniques for ethernet optical reach improvement | |
CN104796735B (en) | A kind of method of transmitting video data and device | |
CN111865884B (en) | Message processing method, device and equipment | |
CN116527787A (en) | Audio and video data transmission method and system | |
CN114465694B (en) | Message transmission method and device | |
CN116233563A (en) | Method and system for transmitting audio and video data | |
WO2024032297A1 (en) | Service information processing method, network device, and storage medium | |
CN117834095B (en) | Method for retransmitting message, electronic equipment and storage medium | |
WO2023016265A1 (en) | Data coding method, data decoding method, and related device | |
CN118054885A (en) | Data retransmission method, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |