CN114513418B - Data processing method and related equipment - Google Patents

Data processing method and related equipment Download PDF

Info

Publication number
CN114513418B
CN114513418B CN202210418803.3A CN202210418803A CN114513418B CN 114513418 B CN114513418 B CN 114513418B CN 202210418803 A CN202210418803 A CN 202210418803A CN 114513418 B CN114513418 B CN 114513418B
Authority
CN
China
Prior art keywords
data packet
packet
target
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.)
Active
Application number
CN202210418803.3A
Other languages
Chinese (zh)
Other versions
CN114513418A (en
Inventor
包增辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210418803.3A priority Critical patent/CN114513418B/en
Publication of CN114513418A publication Critical patent/CN114513418A/en
Application granted granted Critical
Publication of CN114513418B publication Critical patent/CN114513418B/en
Priority to PCT/CN2023/079758 priority patent/WO2023202243A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/083Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for increasing network speed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Abstract

The embodiment of the application provides a data processing method and related equipment, wherein the data processing method comprises the following steps: acquiring an original data packet group comprising M original data packets, wherein the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, and each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing; acquiring a first redundancy recovery parameter corresponding to each original data packet in an original data packet group, wherein the first redundancy recovery parameter refers to a parameter which needs to be contained in a data packet supporting redundancy recovery processing; splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group; and sending the target data packet group to the data receiving equipment. By adopting the embodiment of the application, the data transmission time delay under the condition of packet loss can be reduced, and the data transmission efficiency is improved.

Description

Data processing method and related equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data processing method and related device.
Background
With the rapid development of internet technology, the demand of internet services (such as game services, audio/video services, etc.) on data transmission is increasing. A data sender generally encapsulates data into one or more data packets to send, and a data receiver reconstructs transmitted data by analyzing the data packets; in the transmission process of a data packet, packet loss (i.e., data packet loss) may be caused by conditions such as a weak network (e.g., poor network signals), network congestion (e.g., congestion caused by a large amount of data transmitted in the network), and the like, and data reconstructed by a data receiver is incomplete due to the packet loss.
At present, the technical means for solving the problem of data packet loss in the transmission process is ARQ (Automatic Repeat-reQuest), which specifies that a data receiver immediately returns an acknowledgement frame of a data packet to a data sender after receiving the data packet from the data sender, and if the data sender does not receive the acknowledgement frame of the data packet after sending the data packet for a period of time, the data sending is convenient to think that the data packet is lost in the transmission process, and the data packet is resent. Although ARQ can overcome the problem of packet loss during transmission, it introduces very high transmission delay (including the delay of detecting packet loss and the delay of retransmitting packets), resulting in low data transmission efficiency.
Disclosure of Invention
The embodiment of the application provides a data processing method and related equipment, which can reduce data transmission delay under the condition of packet loss and improve data transmission efficiency.
In one aspect, an embodiment of the present application provides a data processing method, where the data processing method includes:
acquiring an original data packet group, wherein the original data packet group comprises M original data packets, the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer; acquiring a first redundancy recovery parameter corresponding to each original data packet in an original data packet group, wherein the first redundancy recovery parameter refers to a parameter which needs to be included in a data packet supporting redundancy recovery processing; splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group, wherein the target data packet group comprises M target data packets; and sending the target data packet group to data receiving equipment so that the data receiving equipment obtains the lost data packet through redundancy recovery processing when detecting that the data packet in the target data packet group is lost.
In the embodiment of the application, the first redundancy recovery parameter refers to a parameter that a data packet supporting redundancy recovery processing needs to contain, each original data packet in an original data packet group does not support redundancy recovery processing, and the data sending device splices each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to enable each target data packet in a target data packet group obtained through splicing processing to support redundancy recovery processing.
In one aspect, an embodiment of the present application provides another data processing method, where the data processing method includes:
in the process of receiving a target data packet group from data sending equipment, if data packet loss exists in the target data packet group, obtaining the lost data packet through redundancy recovery processing; the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in the original data packet group and the corresponding first redundancy recovery parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, a first redundancy recovery parameter refers to a parameter which needs to be contained by the data packet supporting the redundancy recovery processing, and M is a positive integer.
In the embodiment of the application, in the process of receiving a target data packet group from a data sending device, if it is detected that a data packet in the target data packet group is lost, the data receiving device can recover the lost data packet through redundancy recovery processing; the data receiving equipment can recover lost data packets through redundancy recovery processing on the premise that a target data packet in a target data packet group supports redundancy recovery processing, the target data packet group is obtained by splicing each original data packet in an original data packet group with a corresponding first redundancy recovery parameter, each original data packet in the original data packet group does not support redundancy recovery processing, and the first redundancy recovery parameter refers to a parameter which needs to be contained in the data packet supporting the redundancy recovery processing; that is to say, the data receiving device can directly and quickly recover the lost data packet without waiting for the data sending device to retransmit the lost data packet, so that the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency can be improved.
Accordingly, an embodiment of the present application provides a data processing apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an original data packet group, the original data packet group comprises M original data packets, the M original data packets are obtained by packaging target service data to be transmitted according to a target protocol, each original data packet obtained by packaging the target protocol does not support redundancy recovery processing, and M is a positive integer; acquiring a first redundancy recovery parameter corresponding to each original data packet in an original data packet group, wherein the first redundancy recovery parameter refers to a parameter which needs to be included in a data packet supporting redundancy recovery processing;
the processing unit is used for splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group, and the target data packet group comprises M target data packets; and sending the target data packet group to data receiving equipment so that the data receiving equipment obtains the lost data packet through redundancy recovery processing when detecting that the data packet in the target data packet group is lost.
In one implementation, the processing unit is configured to perform splicing processing on each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to obtain the target data packet group, and specifically configured to perform the following steps:
generating an mth data packet body corresponding to the mth original data packet aiming at the mth original data packet in the original data packet group, wherein the mth data packet body comprises a head and a main body, and M is a positive integer less than or equal to M; and adding the first redundancy recovery parameter corresponding to the mth original data packet to the head of the mth data packet body, and adding the mth original data packet to the main body of the mth data packet body to obtain the mth target data packet corresponding to the mth original data packet.
In one implementation manner, the first redundancy recovery parameter corresponding to the mth original data packet includes a format identification parameter, and the header of the mth data packet includes a format identification field; the processing unit is configured to, when adding the first redundancy recovery parameter corresponding to the mth original data packet to the header of the mth data packet, specifically execute the following steps:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the mth target data packet supports redundancy recovery processing.
In one implementation manner, the first redundancy restoration parameter corresponding to the mth original data packet further includes any one or both of a sequence number parameter and a type parameter; the head of the mth data packet body also comprises any one or two of a sequence number field or a type field; the processing unit is configured to, when adding the first redundancy recovery parameter corresponding to the mth original data packet to the header of the mth data packet, further execute the following steps:
when the first redundancy processing parameter corresponding to the mth original data packet further comprises a sequence number parameter and the head of the mth data packet further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying that the mth target data packet belongs to the target data packet group; and when the first redundancy processing parameter corresponding to the mth original data packet further comprises a type parameter and the header of the mth data packet further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the mth target data packet as the data packet type.
In one implementation, the processing unit is further configured to perform the following steps:
generating N target redundant packets of a target data packet group, wherein N is a positive integer less than or equal to M; and sending the N target redundant packets to the data receiving equipment so that the data receiving equipment performs redundancy recovery processing according to the N target redundant packets to obtain the lost data packets.
In one implementation, the processing unit, when configured to generate N target redundant packets of a target data packet group, is specifically configured to execute the following steps:
generating N original redundant packets according to the M original data packets; acquiring a second redundancy recovery parameter corresponding to each original redundancy packet in the N original redundancy packets; and splicing each original redundant packet in the N original redundant packets and a corresponding second redundant recovery parameter to obtain N target redundant packets, wherein the second redundant recovery parameter refers to a parameter which needs to be contained in the redundant packet supporting the redundant recovery processing.
In one implementation manner, the processing unit is configured to perform splicing processing on each original redundant packet in the N original redundant packets and the corresponding second redundancy recovery parameter to obtain N target redundant packets, and is specifically configured to perform the following steps:
generating an nth redundant packet body corresponding to the nth original redundant packet aiming at the nth original redundant packet in the N original redundant packets, wherein the nth redundant packet body comprises a head and a main body, and N is a positive integer less than or equal to N; and adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to the head of the nth redundancy packet body, and adding the nth original redundancy packet to the main body of the nth redundancy packet body to obtain the nth target redundancy packet corresponding to the nth original redundancy packet.
In one implementation manner, the second redundancy recovery parameter corresponding to the nth original redundancy packet includes a format identification parameter, and the header of the nth redundancy packet body includes a format identification field; the processing unit is configured to, when adding the second redundancy recovery parameter corresponding to the nth original redundancy packet to the header of the nth redundancy packet, specifically execute the following steps:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the nth target redundant packet supports redundancy recovery processing.
In one implementation, the second redundancy recovery parameter corresponding to the nth original redundant packet further includes at least one of: a sequence number parameter, a type parameter, a data packet quantity parameter, and a redundant packet quantity parameter; the header of the nth redundant enclosure further includes at least one of: a sequence number field, a type field, a number of packets field, and a number of redundant packets field; the processing unit is configured to, when adding the second redundancy recovery parameter corresponding to the nth original redundant packet to the header of the nth redundant packet, further perform the following steps:
when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a sequence number parameter and the head of the nth redundancy packet body further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying the nth target redundancy packet as a redundancy packet of the target data packet group; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a type parameter and the header of the nth redundancy packet body further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the nth target redundancy packet as the redundancy packet type; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a data packet quantity parameter and the head of the nth redundancy packet body further comprises a data packet quantity field, adding the data packet quantity parameter into the data packet quantity field, wherein the data packet quantity parameter is used for identifying the quantity M of the target data packets contained in the target data packet group; and when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a redundancy packet quantity parameter and the header of the nth redundancy packet body further comprises a redundancy packet quantity field, adding the redundancy packet quantity parameter into the redundancy packet quantity field, wherein the redundancy packet quantity parameter is used for identifying the quantity N of the target redundancy packet of the target data packet group.
In one implementation, the original data packet group is configured to include X original data packets, where X is a positive integer; a processing unit further configured to perform the steps of: comparing the magnitude relationship between M and X; determining the generation time of N target redundant packets according to the size relationship between M and X;
a processing unit, configured to, when generating N target redundant packets of a target data packet group, specifically execute the following steps: and generating N target redundant packets of the target data packet group according to the determined generation time.
In one implementation, when determining the generation times of the N target redundant packets according to the size relationship between M and X, the processing unit is specifically configured to execute the following steps:
if M is equal to X, determining the time for obtaining M original data packets by encapsulation as the generation time of N target redundant packets; if M is smaller than X, determining the time of sending overtime of the last target data packet in the M target data packets as the generation time of the N target redundant packets; wherein, the sending timeout of the last target data packet means: and after the last target data packet is sent to the target time interval, the acknowledgement frame sent by the data receiving equipment is not received.
In one implementation, the processing unit is further configured to perform the following steps:
carrying out key agreement with the data receiving equipment to obtain a key, wherein the key is used for encrypting in the process of packaging the M original data packets; detecting the redundancy recovery capability of the data receiving equipment in the key negotiation process with the data receiving equipment; and if the data receiving equipment is determined to have the redundancy recovery capability, triggering and executing the step of acquiring the original data packet group.
Accordingly, an embodiment of the present application provides another data processing apparatus, including:
the processing unit is used for obtaining a lost data packet through redundancy recovery processing if detecting that the data packet in the target data packet group is lost in the process of receiving the target data packet group from the data sending equipment; the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in the original data packet group and the corresponding first redundancy parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, a first redundancy recovery parameter refers to a parameter which needs to be contained by the data packet supporting the redundancy recovery processing, and M is a positive integer.
In one implementation, the receiving unit is further configured to perform the following steps: receiving a target packet from a data transmission device, and reading a header and a body of the target packet;
a processing unit further configured to perform the steps of: if the target packet is determined to be the target data packet in the target data packet group according to the head of the target packet, determining that the main body of the target packet is the corresponding original data packet in the original data packet group, and copying the original data packet in the target packet to a queue; and according to the number of the original data packets in the original data packet group contained in the queue, carrying out packet loss detection on the target data packet group.
In one implementation, the header of the target packet includes a format identification field, a sequence number field, and a type field; the value of the format identification field is used for identifying that the target packet supports redundancy recovery processing or does not support redundancy recovery processing, the value of the sequence number field is used for identifying a data packet group to which the target packet belongs, and the value of the type field is used for identifying the packet type of the target packet; a processing unit further configured to perform the steps of:
and if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field identifies that the packet type of the target packet is the data packet type, determining that the target packet is the target data packet in the target data packet group.
In one implementation manner, the processing unit is configured to, when performing packet loss detection on a target packet group according to the number of original packets in an original packet group included in a queue, specifically perform the following steps:
acquiring the number M of target data packets in a target data packet group sent by data sending equipment, wherein the number M is read from a data packet number field of the header of a target redundant packet of the received target data packet group; and if the number of the original data packets in the original data packet group contained in the queue is less than the number M, determining that the data packet loss exists in the target data packet group.
In an implementation manner, when obtaining a lost data packet through redundancy recovery processing, the processing unit is specifically configured to perform the following steps:
acquiring the number N of target redundant packets of a target data packet sent by data sending equipment, wherein the number N is read from a redundant packet number field of the header of the target redundant packet of a received target data packet group, and N is a positive integer less than or equal to M; receiving N target redundant packets of a target data packet group sent by the data sending equipment according to the quantity N; and carrying out redundancy recovery processing on the lost data packet according to the N target redundancy packets to obtain the lost data packet.
Accordingly, embodiments of the present application provide a computer device comprising a processor and a computer-readable storage medium. Wherein:
the processor is adapted to implement a computer program, the computer readable storage medium having stored thereon the computer program, the computer program being adapted to be loaded by the processor and to perform the above-mentioned data processing method.
Accordingly, embodiments of the present application provide a computer-readable storage medium, which stores a computer program, and when the computer program is read and executed by a processor of a computer device, the computer program causes the computer device to execute the data processing method described above.
Accordingly, embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing method.
In the embodiment of the application, the first redundancy recovery parameter refers to a parameter that a data packet supporting redundancy recovery processing needs to contain, and an original data packet which does not support redundancy recovery processing in an original data packet group and a corresponding first redundancy recovery parameter are spliced to enable a target data packet in a target data packet group obtained through splicing processing to support redundancy recovery processing, so that when the data packet is lost in the process of transmitting the target data packet group to the data receiving equipment, the data receiving equipment can quickly recover the lost data packet through redundancy recovery processing, and thus transmission delay under the condition of packet loss can be reduced, and data transmission efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic diagram of a process for recovering a lost packet according to an embodiment of the present application;
fig. 1b is a schematic diagram of another process for recovering a lost packet according to an embodiment of the present application;
FIG. 2 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 3 is a schematic diagram of a data transmission process of a cloud game scene according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a data processing method according to an embodiment of the present application;
fig. 5a is a schematic structural diagram of an original data packet according to an embodiment of the present application;
fig. 5b is a schematic structural diagram of another original data packet provided in this embodiment of the present application;
fig. 5c is a schematic structural diagram of another original data packet provided in the embodiment of the present application;
fig. 6 is a schematic structural diagram of a destination data packet according to an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram of another data processing method provided in the embodiments of the present application;
fig. 8a is a schematic structural diagram of a target redundant packet according to an embodiment of the present application;
fig. 8b is a schematic structural diagram of another target redundant packet provided in the embodiment of the present application;
fig. 9a is a schematic flowchart of a key agreement process provided in an embodiment of the present application;
fig. 9b is a schematic flowchart of another key agreement process provided in the embodiment of the present application;
fig. 10 is a schematic flowchart of another data processing method provided in an embodiment of the present application;
fig. 11 is an interaction flow diagram of a data processing method according to an embodiment of the present application;
fig. 12 is a schematic diagram of a generation process of an original redundant packet according to an embodiment of the present application;
fig. 13 is a schematic diagram of a memory allocation policy according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
FIG. 15 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to more clearly understand the technical solutions provided by the embodiments of the present application, the key terms related to the embodiments of the present application are described first:
(1) the embodiment of the application relates to a data transmission technology. The data transmission technology refers to a technology for performing data transmission between a data sending party and a data receiving party by jointly following a transmission protocol through one or more data channels or links. The data transmission process based on the data transmission technology can be more specifically understood as follows: the data transmitting side encapsulates data to be transmitted into one or more data packets according to a transmission protocol, then transmits the one or more data packets to the data receiving side, and the data receiving side reconstructs the transmitted data by analyzing the one or more data packets. The transmission protocol refers to rules and conventions that must be followed for data transmission between a data sender and a data receiver, and the format of a data packet used for encapsulating data is defined in the transmission protocol.
(2) Embodiments of the present application relate to FEC. FEC (Forward Error Correction) is an Error control method, which refers to a technique that a signal is encoded according to a certain algorithm before being sent to a transmission channel, a redundant code with the characteristics of the signal itself is added, and a received signal is decoded according to a corresponding algorithm at a receiving side, so as to find out and correct an Error code generated in the transmission process. In the embodiment of the present application, the FEC is used to perform redundancy recovery processing to recover a data packet lost in a data transmission process. Specifically, the data sending party packages the data to be transmitted into one or more data packets according to the transmission protocol, the data sending party can also generate one or more redundant packets of the data packets based on the FEC algorithm, and send the data packets and the redundant packets to the data receiving party, and when the data receiving party detects that the data packets are lost, the data receiving party can recover the lost data packets according to the redundant packets and the data packets which are not lost. ARQ and FEC are compared below with fig. 1a and 1 b:
fig. 1a shows the process of ARQ recovery of lost packets: and the data sending party transmits the data packet A, the data packet B and the data packet C to the data receiving party, the data packet B is lost in the data transmission process, and the data sending party retransmits the data packet B to the data receiving party after detecting that the data packet B is lost (the data sending party does not receive a confirmation frame returned by the data receiving party after sending the data packet B for a period of time). In the above process, the transmission delay includes at least the delay of detecting the loss of the data packet B and the delay of retransmitting the data packet B (RTT/2), and the data transmission efficiency is not high. The RTT (Round-Trip Time) is a Time delay generated from a data sender sending a data packet to a data sender receiving an acknowledgement frame of the data packet from a data receiver.
Fig. 1b shows the process of FEC recovery of lost packets: the data transmitting side generates redundant packets of a data packet A, a data packet B and a data packet C based on an FEC algorithm, the data packet A, the data packet B, the data packet C and the redundant packets are transmitted to a data receiving side, when the data receiving side detects that the data packet B is lost, the lost data packet B can be recovered according to the data packet A, the data packet C and the redundant packets, the data packet B does not need to be retransmitted, the transmission time delay under the condition of packet loss is reduced, and the data transmission efficiency is improved.
(3) The embodiment of the application relates to a cloud game. The cloud game is a game mode based on cloud computing, all games run in a game server in a running mode of the cloud game, the game server compresses rendered game media data (such as game pictures, game audio and the like) and transmits the compressed data to a game client through a network, and the game client presents the game media data to game players; the operation data of the game player in the game client can be transmitted to the game server through the network, so that the purpose of operating the game is achieved. Among them, Cloud Computing (Cloud Computing) is a Computing model that distributes Computing tasks over a resource pool formed by a large number of computers, so that various application systems can acquire Computing power, storage space, and information services as needed.
Based on the related description of the above key terms, the embodiments of the present application provide a data processing scheme, in which a data sending party performs a splicing process on a redundancy recovery parameter (the redundancy recovery parameter refers to a parameter that is required to be included in a data packet that supports the redundancy recovery process) and an original data packet that does not support the redundancy recovery process, so that a target data packet obtained by the splicing process supports the redundancy recovery process; the data packet supporting the redundancy recovery processing means that: when detecting that the data packet is lost in the transmission process, the data packet can be recovered through the corresponding redundant packet; the data packet does not support the redundancy recovery processing means that: when detecting that the data packet is lost in the transmission process, the data packet cannot be recovered through the corresponding redundant packet; that is to say, in the embodiment of the present application, after the data sending party sends the target data packet supporting the redundancy recovery processing and the corresponding redundancy packet to the data receiving party, if the data receiving party detects that the data packet is lost, the data receiving party can recover the lost data packet through the corresponding redundancy packet, so that the data transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency is improved.
In addition, the data processing capability provided by the data processing scheme in the embodiment of the present application may be encapsulated in a data processing toolkit, and the data processing capability may specifically include: the redundancy recovery parameters are spliced with the original data packet which does not support the redundancy recovery processing, so that the spliced target data packet has the capacity of supporting the redundancy recovery processing, or the capacity of recovering the lost data packet through the redundancy recovery processing when the loss of the target data packet supporting the redundancy recovery processing is detected. The data processing tool Kit may be, for example, an SDK (Software Development Kit), and the data processing tool Kit may be accessed into an application, Software, a device, and the like to enable the application, Software, device, and the like to have data processing capability; for example, after the data processing toolkit is accessed to a data sending party, the data sending conveniently has the capacity of enabling a target data packet obtained by splicing to support redundancy recovery processing by splicing the redundancy recovery parameters with an original data packet which does not support redundancy recovery processing; after the data processing tool packet is accessed to a data receiving party, the data receiving party conveniently has the capability of recovering a lost data packet through redundancy recovery processing when detecting that a target data packet supporting the redundancy recovery processing is lost.
A data processing system suitable for implementing the data processing scheme provided by embodiments of the present application is described below in conjunction with fig. 2. As shown in fig. 2, the data processing system 20 may include a data sending device 201 and a data receiving device 202, the data sending device 201 may be a terminal or a server, the data receiving device 202 may be a terminal or a server, and the data sending device 201 and the data receiving device 202 may be directly or indirectly connected in communication through a wired communication manner or a wireless communication manner. The terminal mentioned in the embodiment of the present application may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart sound box, a smart watch, a smart television, a vehicle-mounted terminal, a game pad, and the like, but is not limited thereto; the server mentioned in the embodiment of the present application may be an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and an artificial intelligence platform. Wherein:
(1) the data transmission apparatus 201. The data sending device corresponds to a data sending party, the data sending device can acquire service data to be transmitted, and then can package the service data to be transmitted according to a target protocol (namely the mentioned transmission protocol) to obtain one or more original data packets, and the one or more original data packets packaged according to the target protocol do not support redundancy recovery processing; the original data packets may be in units of data packet groups, and each time a certain number of original data packets are reached, a data packet group (group) may be formed, and the number of original data packets included in different data packet groups may be the same or different.
For any data packet group (which may be referred to as an original data packet group) obtained by encapsulating service data to be transmitted, the original data packet group may include M original data packets, and none of the M original data packets obtained by encapsulating according to a target encapsulation protocol supports redundancy recovery processing, where M is a positive integer. The data sending device may perform splicing processing on the redundancy recovery parameter and each original data packet in the original data packet group to obtain M target data packets supporting the redundancy recovery processing, where the M target data packets form a target data packet group, and the data sending device may send the target data packet group to the data receiving device. The data sending device may further generate N target redundant packets of the target data packet group, and send the N target redundant packets of the target data packet group to the data receiving device, where the number of generated target redundant packets is less than or equal to the number of original data packets, that is, N is a positive integer less than or equal to M.
(2) A data receiving device 202. The data receiving device corresponds to a data receiving party, and for a target data packet group, the data receiving device may receive the target data packet group from the data sending device, and if the data receiving device detects that there is a data packet loss in the target data packet group, the data receiving device may recover the lost data packet according to the N target redundant packets and the data packet that is not lost received from the data sending device. Therefore, the data receiving device can reconstruct the target service data according to the received data packet and the recovered data packet, and the data receiving device can finally reconstruct the complete service data as the data receiving device continuously receives the data packet group from the data transmitting device.
Through the system architecture shown in fig. 2, when a data packet group sent by a data sending device to a data receiving device has a data packet loss in a transmission process, the data receiving device may quickly recover the lost data packet through redundancy recovery processing, the data sending device does not need to resend the lost data packet, and the data receiving device does not need to wait for the resent lost data packet, so that data transmission delay under a packet loss condition may be reduced, and data transmission efficiency between the data sending device and the data receiving device is improved. It is to be understood that the data processing system described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows that along with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
The data processing scheme provided by the embodiment of the present application can achieve an excellent technical effect when combined with a cloud game, and a specific application of the data processing scheme provided by the embodiment of the present application in a cloud game scene is described below with reference to fig. 3:
in one implementation, a game client of a cloud game may be run in the data sending device, and a game player may operate the cloud game through the game client, or the data sending device may be a gamepad of the cloud game, and the game player may operate the cloud game through the gamepad; the data receiving device may be a Game server of a Cloud Game, in which a Cloud Game Engine is operated, and a Cloud Game is operated in the Cloud Game Engine. When the data sending device detects an operation event (such as a touch screen event, a keyboard and mouse event, a joystick event and the like) of a game player on the cloud game, the data sending device sends operation data (such as touch screen data, keyboard and mouse data, joystick data and the like) corresponding to the operation event to the game server, and therefore the game server can inject the operation data into the cloud game engine to achieve the purpose of operating the game. The cloud game scene is very sensitive to the operation delay of a game player, and the data processing scheme provided by the embodiment of the application can be adopted in the process of sending the operation data to the game server by the game client, so that the lost operation data can be quickly recovered under the condition that partial operation data is lost due to poor network quality, the operation delay of the cloud game can be reduced, and the cloud game experience of the game player can be improved.
In another implementation, the data sending device may be a game server, and the data receiving device may have a game client running therein, and the game client may present game media data including game pictures, game audio, and the like to a game player. The data sending equipment can transmit Game media data such as Game pictures, Game audio and the like obtained by rendering through the Cloud Game Engine to the data receiving equipment, the data receiving equipment can present the Game media data to a Game player through the Game client, and the data processing scheme provided by the embodiment of the application can be adopted in the process that the Game server sends the Game media data to the Game client, so that the lost Game media data can be quickly recovered under the condition that partial Game media data are lost due to poor network quality, the media presentation delay of the Cloud Game can be reduced, and the Cloud Game experience of the Game player can be improved.
The data processing scheme provided by the embodiment of the present application is described in more detail below with reference to the accompanying drawings.
The embodiment of the present application provides a data processing method, where the data processing method mainly introduces contents such as a redundancy recovery parameter and splicing processing of an original data packet that does not support redundancy recovery processing, and the data processing method may be executed by the data sending device 201 (i.e. a data sending party) in the data processing system 20, please refer to fig. 4, and the data processing method may include the following steps S401 to S404:
s401, an original data packet group is obtained, wherein the original data packet group comprises M original data packets.
The data sending device may obtain service data to be transmitted, and then may package the service data to be transmitted according to a target protocol to obtain one or more original data packets, where an original data packet may be a data packet group unit, and each of a certain number of original data packets may form a data packet group, and the number of original data packets included in different data packet groups may be the same or different. In the embodiment of the present application, any data packet group (i.e., an original data packet group) obtained by encapsulating service data to be transmitted is taken as an example, the original data packet group is obtained by encapsulating target service data in the service data according to a target protocol, the original data packet group may include M original data packets, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer.
The packet format defined by the target protocol is a non-redundant recovery format, so that an original data packet obtained by packaging the target protocol does not support redundant recovery processing, namely when the original data packet is detected to be lost in the transmission process, the original data packet cannot be recovered through a corresponding redundant packet. In the embodiment of the present application, the target Protocol is a QUIC (Quick UDP Internet Connection, fast UDP (User data Protocol) Internet Connection) Protocol as an example, and other transmission protocols except the QUIC Protocol may be referred to in the relevant description about the QUIC Protocol in the embodiment of the present application. The QUIC Protocol is a Protocol for multiplex Transmission using UDP, and has many advantages over TCP (Transmission Control Protocol). The QUIC protocol may include at least one of gQUIC protocol, which is an early QUIC version protocol implemented in a specific web browser, or IETF QUIC protocol, which is a QUIC protocol specification of The IETF (Internet Engineering Task Force) standards organization, with some differences in packet formats defined by The gQUIC protocol and The IETF QUIC protocol, which are described below in connection with FIG. 5a and in connection with FIG. 5b and FIG. 5 c:
the gQUIC protocol defines a packet format:
as shown in fig. 5a, the packet format defined by the gquitic protocol includes a packet header and a packet body; the header can include Public Flags field, Connection ID field, Quic Version field, conversion Number field, and Packet Number field; the packet may include payload. Wherein:
public Flags field (Public identification field): indicating a common identification bit, and the Public Flags field has a size of 8 bits. A first bit (bit 0) is a PUBLIC flag VERSION field, when the data transmission equipment is a client, the header of a valued indicating data packet of the PUBLIC flag VERSION field contains a QUIC VERSION number, and when the data transmission equipment is a server, the valued indicating data packet of the PUBLIC flag VERSION field is set as a VERSION data packet; the second bit (bit 1) is a PUBLIC _ FLAGS _ RESET field, and the value of the PUBLIC _ FLAGS _ RESET field is set to indicate that the data packet is a PUBLIC RESET data packet; the third bit (bit 2) is a redirection Nonce field, and setting the value of the redirection Nonce field indicates that the header contains the redirection Nonce field; setting the value of the fourth bit (bit 4) indicates that the packet header contains a 64-bit Connection ID field; the value of the fifth bit (bit 4) and the sixth bit (bit 5) indicates the Number of bytes of the Packet Number field; the seventh bit (bit 6) is currently unused and reserved for multipath use; the eighth bit (bit 7) is currently unused and must be set to 0.
Connection ID field (Connection identification field): the field dereferencing is a connection identifier of the data sending equipment and is used for uniquely identifying the identity of the data sending equipment.
QUIC Version field (protocol Version field): the field values are used to identify the QUIC protocol version.
Diversification Nonce field (diversified Nonce field): the field takes the value of a diversified random number.
Packet Number field (Packet Number field): the field value is used to identify the sequence number of the data packet, and the data sending device assigns a sequence number to each conventional data packet (which is not required for the special common reset data packet and the version negotiation data packet), for example, the sequence number of the first data packet to be sent is 1, and the sequence number of the subsequent data packet is added with 1 on the basis of the previous data packet.
The service data may be encapsulated in a data frame (frame) in the payload, where the payload includes an Authenticated Hash field (Authenticated Hash field) and one or more frames, each frame includes a type field (data frame type field), a frame header and a frame payload, and the service data to be transmitted is actually encapsulated in the frame payload.
② package format defined by IETF QUIC protocol:
the packet format defined by the IETF QUIC protocol includes a long header packet format and a short header packet format; the long headers (long headers) are used for the data packets transmitted and received during the connection establishment process, the data packets with long headers may include an Initial data packet (Initial), a 0-RTT data packet (0-RTT), a Handshake data packet (Handshake), a Retry data packet (Retry), and a Version Negotiation data packet (Version Negotiation), and fig. 5b illustrates the format of the Version Negotiation data packet as an example:
as shown in fig. 5b, the format of the version negotiation packet includes a packet header and a packet body; the packet header can comprise a Public Flags field, a quick Version field, a DCID len field, a Destination Connection ID field, a SCID len field and a Source Connection ID field; the packet may include payload. Wherein:
public Flags field (Public identification field): indicating a common identification bit, and the Public Flags field has a size of 8 bits. When the eighth bit (bit 7) is set to 1, it indicates that the packet is a long header packet; the seventh bit (bit 6) must be set to 1, if the bit is set to 0, the data packet is considered to be invalid and must be directly discarded; values of a sixth bit (bit 5) and a fifth bit (bit 4) are used for identifying specific types of the data packets, for example, 0x0 indicates that the type of the data packet is an original data packet, 0x1 indicates that the type of the data packet is a 0-RTT data packet, 0x2 indicates that the type of the data packet is a handshake data packet, and 0x3 indicates that the type of the data packet is a retry data packet; the fourth bit (bit 3) through the first bit (bit 0) are for a particular type, and different types of packets have different meanings.
QUIC Version field (protocol Version field): the field values are used to identify the QUIC protocol version.
DCID len field (target connection identification length field): the field value is used to identify the length of the Destination Connection ID field.
Destination Connection ID field (Destination Connection identification field): the field dereferencing is a connection identifier of the data receiving device and can be used for uniquely identifying the identity of the data receiving device.
SCID len field (source connection identification length field): the field value is used to identify the Source Connection ID field length.
Source Connection ID field (Source Connection identification field): the field dereferencing is a connection identifier of the data sending equipment and is used for uniquely identifying the identity of the data sending equipment.
Supported versions (Supported Version 1.. Supported Version P, i.e., Supported Version 1.. Supported Version P) may be included in the payload.
The short-header packet is used after version negotiation and 1-RTT key negotiation, and mainly transmits a common data frame. As shown in fig. 5c, the format of the short header packet may include a header and a body; the Packet header may include a Public Flags field, a Destination Connection ID field, and a Packet Number field; the encrypted payload (encrypted data) may be included in the body of the packet. Wherein:
public Flags field (Public identification field): when the eighth bit (bit 7) is set to 0, the data packet is a data packet with a short header; the seventh bit (bit 6) must be set to 1, if the bit is set to 0, the data packet is considered to be an invalid data packet and must be directly discarded; the sixth bit (bit 5) represents a delayed spin bit; the fifth bit (bit 4) and the fourth bit (bit 3) are reserved fields; the value of the third bit (bit 2) is used to identify whether the key has been updated (after the handshake confirmation), and is initially set to 0, and after each key update, the key is inverted, and the data receiving device can determine whether the key has changed through the field; the values of the second bit (bit 1) and the first bit (bit 0) are used to identify the length of the Packet Number field in the Packet header.
Destination Connection ID field (Destination Connection identification field): the field dereferencing is a connection identifier of the data sending equipment and is used for uniquely identifying the identity of the data sending equipment.
Packet Number field (Packet Number field): the field value is used to identify the sequence number of the data packet.
Based on the above description of the packet format defined by the target protocol, the encapsulation process of the original data packet is described herein, and the original data packet may be encapsulated according to a short header format, specifically: the method includes dividing target service data to be transmitted according to a target data length indicated by a Maximum Transmission Unit (MTU), encapsulating the divided data with the target data length, namely, using the divided data with the target data length as an original data packet, encrypting the packet by using a key determined by key negotiation with a data receiving device, and encapsulating the packet header of the encrypted packet to obtain the original data packet. MTU is a concept of a data link layer, and is used to limit the size of a payload of the data link layer.
S402, acquiring a first redundancy recovery parameter corresponding to each original data packet in the original data packet group, wherein the first redundancy recovery parameter refers to a parameter required to be included in a data packet supporting redundancy recovery processing.
Each original data packet in the original data packet group corresponds to a first redundancy recovery parameter, and the first redundancy recovery parameter refers to a parameter that needs to be included in a data packet supporting redundancy recovery processing. In one implementation, the first redundancy recovery parameter may include a format identification parameter, and the format identification parameter may be used to identify a redundancy recovery format (FEC format), that is, when the redundancy identification parameter is included in the data packet, it indicates that the packet format of the data packet is the redundancy recovery format, and the data packet whose packet format is the redundancy recovery format supports redundancy recovery processing. In another implementation manner, the first redundancy restoration parameter may include, in addition to the format identification parameter, any one or both of a sequence number parameter and a type parameter, where the sequence number parameter may be used to identify a data packet group to which the data packet belongs and an arrangement sequence number of the data packet in the data packet group, and the type parameter may be used to identify a packet type of the data packet.
And S403, splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group.
After the first redundancy restoration parameter corresponding to each original data packet in the original data packet group is obtained, each original data packet in the original data packet group and the corresponding first redundancy restoration parameter may be spliced to obtain a target data packet group, where the target data packet group includes M target data packets. For convenience of understanding, here, taking a splicing processing procedure of an mth original data packet in an original data packet group as an example, a first redundancy recovery parameter corresponding to the mth original data packet and the mth original data packet are subjected to splicing processing, so that an mth target data packet corresponding to the mth original data packet can be obtained, where M is a positive integer less than or equal to M. The specific splicing process is as follows: for an mth original data packet in the original data packet group, an mth data packet body corresponding to the mth original data packet may be generated, where the mth data packet body is a packet structure used for performing splicing processing on the mth original data packet and a first redundancy recovery parameter corresponding to the mth original data packet, and the mth data packet body may include a header and a body; then, the first redundancy restoration parameter corresponding to the mth original data packet may be added to the header of the mth data packet, and the mth original data packet may be added to the body of the mth data packet, so as to obtain the mth target data packet corresponding to the mth original data packet.
In one implementation, the first redundancy recovery parameter corresponding to the mth original data packet may include: format identification parameter, sequence number parameter and type parameter, the head of the mth data packet body may include: format identification field (FEC Format Flags), sequence number field (FEC SEQ ID) and Type field (FEC Type). As shown in fig. 6, a format identification parameter may be added to the format identification field, where the format identification parameter may be used to identify that the packet format of the mth target data packet is a redundancy recovery format, where the redundancy recovery format is a main body wrapped by an FEC header, and the mth target data packet whose packet format is the redundancy recovery format supports redundancy recovery processing; a sequence number parameter may be added to the sequence number field, where the sequence number parameter may be used to identify that the mth target packet belongs to the target packet group and an arrangement sequence number of the mth target packet in the target packet group, for example, a sequence number of each packet in the target packet group is 0-7, a sequence number parameter of the mth target packet is 3, to identify that the mth target packet belongs to the target packet group, and the mth target packet is arranged at the 4 th bit in the target packet group; a type parameter may be added to the type field, the type parameter being used to identify the packet type of the mth target data packet as the data packet type; and the mth original data packet can be added to the body of the mth data packet to finally obtain the mth target data packet. In this way, the first redundancy recovery parameter is added to the original data packet in the form of a header without modifying the packet format defined by the target protocol, so that the method can be compatible with various types of target protocols, and is particularly suitable for a transmission protocol of which the packet format does not support an extension field or does not exist.
In another implementation, the first redundancy recovery parameter corresponding to the mth original data packet may include a format identification parameter, and the header of the mth data packet may include a format identification field. The format identification parameter may be added to the format identification field, and the mth original data packet may be added to the body of the mth data packet body, to finally obtain the mth target data packet. In this case, the data transmitting apparatus may transmit the sequence number parameter corresponding to the mth original packet and the type parameter corresponding to the mth original packet to the data receiving apparatus separately, instead of transmitting to the data receiving apparatus through the header added to the mth original packet. Compared with the mode that the format identification parameters, the type parameters and the sequence number parameters are all added to the head of the mth data packet body, the sequence number parameters and the type parameters are independently sent to the data receiving equipment, so that the data volume in the target data packet can be reduced, the transmission efficiency of the target data packet can be improved, and the data transmission efficiency is further improved.
In another implementation manner, the first redundancy recovery parameter corresponding to the mth original data packet includes a format identification parameter, and besides the format identification parameter, the first redundancy recovery parameter corresponding to the mth original data packet may further include any one of a sequence number parameter or a type parameter; the header of the mth data packet body includes a format identification field, and the header of the mth data packet body may include any one of a sequence number field or a type field in addition to the format identification field. Format identification parameters may be added to the format identification field; when the first redundancy recovery parameter corresponding to the mth original data packet further includes a sequence number parameter and the header of the mth data packet further includes a sequence number field, the sequence number parameter may be added to the sequence number field; when the first redundancy recovery parameter corresponding to the mth original data packet further includes a type parameter and the header of the mth data packet further includes a type field, adding the sequence number parameter to the type field; and the mth original data packet can be added to the body of the mth data packet body, and the mth target data packet is finally obtained. For example, the first redundancy restoration parameter corresponding to the mth original data packet may include a format identification parameter and a type parameter, and the header of the mth data packet includes a format identification field and a type field, in which case, the sequence number parameter corresponding to the mth original data packet may be sent to the data receiving apparatus separately, instead of being sent to the data receiving apparatus through the header added to the mth original data packet.
S404, the target data packet group is sent to the data receiving equipment, so that when the data receiving equipment detects that the data packet in the target data packet group is lost, the lost data packet is obtained through redundancy recovery processing.
After each original data packet in the original data packet group and the corresponding first redundancy recovery parameter are spliced to obtain a target data packet group, the data sending device can send the target data packet group to the data receiving device, so that when the data receiving device detects that a data packet in the target data packet group is lost, the lost data packet can be obtained through redundancy recovery processing. The data sending equipment can also generate N target redundant packets of the target data packet group and send the N target redundant packets of the target data packet group to the data receiving equipment, so that when the data receiving equipment detects that the data packet in the target data packet group is lost, the data receiving equipment can perform redundancy recovery processing according to the N target redundant packets to obtain the lost data packet, wherein N is a positive integer less than or equal to M.
In the embodiment of the application, the data sending device can enable each target data packet in the target data packet group obtained through splicing processing to support redundancy recovery processing by splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter, so that when the data packet is lost in the process of transmitting the target data packet group to the data receiving device, the data receiving device can quickly recover the lost data packet through the redundancy recovery processing, the data sending device does not need to retransmit the lost data packet, the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency is improved. In addition, the embodiment of the application adds the first redundancy recovery parameter to the original data packet in the form of the header without modifying the packet format defined by the target protocol, so that the method can be compatible with multiple types of target protocols, for example, the method can be compatible with the packet format defined by the gQUIC protocol and the packet format defined by the IETF QUIC protocol, and is particularly suitable for the transmission protocol in which the defined packet format does not support the extension field or does not have the extension field.
An embodiment of the present application provides a data processing method, where the data processing method mainly introduces a target redundant packet for generating a target data packet group, and determines contents such as redundant processing capability of a data receiving device in a key agreement process, where the data processing method may be executed by a data sending device 201 (i.e., a data sending party) in the data processing system 20, please refer to fig. 7, and the data processing method may include the following steps S701 to S706:
s701, an original data packet group is obtained, wherein the original data packet group comprises M original data packets.
The execution process of step S701 in this embodiment is the same as the execution process of step S401 in the embodiment shown in fig. 4, and reference may be specifically made to the description of step S401 in the embodiment shown in fig. 4, which is not described herein again.
S702, obtain a first redundancy recovery parameter corresponding to each original data packet in the original data packet group, where the first redundancy recovery parameter refers to a parameter that needs to be included in a data packet supporting redundancy recovery processing.
The execution process of step S702 in this embodiment is the same as the execution process of step S402 in the embodiment shown in fig. 4, and reference may be specifically made to the description of step S402 in the embodiment shown in fig. 4, which is not described herein again.
And S703, splicing each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to obtain a target data packet group.
The execution process of step S703 in this embodiment is the same as the execution process of step S403 in the embodiment shown in fig. 4, and reference may be specifically made to the description of step S403 in the embodiment shown in fig. 4, which is not repeated herein.
S704, sending the target data packet group to the data receiving device.
After each original data packet in the original data packet group is spliced with the corresponding first redundancy restoration parameter to obtain the target data packet group, the data sending device may send the target data packet group to the data receiving device.
S705, N target redundant packets of the target packet group are generated.
The data sending device may generate N target redundant packets of the target packet group, where the number of the target redundant packets of the target packet group to be generated may be determined according to the number of the target packets included in the target packet group and the redundancy parameter, and the number of the target redundant packets of the target packet group to be generated may be equal to a product between the number of the target packets included in the target packet group and the redundancy parameter, for example, if the target packet group includes 5 target packets and the redundancy parameter is 60%, then 5 × 60% =3 target redundant packets need to be generated; the redundancy parameter is a positive real number less than or equal to 1, and N is a positive integer less than or equal to M. Wherein generating the N target redundant packets of the target data packet group may comprise the following sub-steps s 11-13:
s11, generating N original redundant packets according to the M original data packets.
The process of generating N original redundant packets from M original data packets may include: and performing redundant coding processing on the M original data packets according to an FEC algorithm to obtain N redundant data, and performing encapsulation processing on the N redundant data according to a target protocol to obtain N original redundant packets.
The FEC algorithm may include many kinds, such as XOR algorithm (exclusive or algorithm), UPLFEC algorithm (one FEC algorithm), FlexFEC algorithm (one FEC algorithm), Reed-Solomon Code algorithm, etc., and the following table 1 shows the characteristics of the above FEC algorithms:
TABLE 1
FEC algorithm Characteristics of
XOR algorithm The advantages are that: the realization is simple and the cost is low. The disadvantages are as follows: only one missing original packet can be recovered.
UPLFEC algorithm The advantages are that: the original data packets are grouped, and one group generates one original redundant packet. The disadvantages are as follows: recovering only one lost original data And (5) packaging.
FlexFEC algorithm The advantages are that: the original data packets are grouped horizontally and vertically, and the algorithm has high repeatability. The disadvantages are as follows: only one lost original can be recovered in both transverse and longitudinal directions And (6) data packet.
Reed-Solomon Code algorithm The advantages are that: the original data packets are grouped, and M original data packets in one group generate N original redundant packets (N is less than or equal to M). The disadvantages are as follows: can recover Any missing N original data packets in a packet are recovered.
Through comparison of several FEC algorithms in table 1, it can be found that the Reed-Solomon Code algorithm is more flexible, and the recovery rate for the lost original data packet is higher, and in the embodiment of the present application, the description is given by taking the example that the FEC algorithm is the Reed-Solomon Code algorithm.
The FEC algorithm stipulates that the data packet lengths of M original data packets used for generating redundant data need to be consistent, so that the maximum data packet length of the M original data packets can be obtained, the M original data packets are filled according to the maximum data packet length, the data packet lengths of the M original data packets after filling are made to be consistent, and then the M original data packets after filling can be subjected to redundant coding processing according to the FEC algorithm to obtain N redundant data; filling M original data packets according to the maximum data packet length means: and for the original data packet with the data packet length smaller than the maximum data packet length in the M original data packets, filling 0 at the tail of the original data packet until the length of the original data packet after filling reaches the maximum data packet length.
Based on the above description of the packet format defined by the target protocol, the encapsulation process of the original redundant packet is introduced here, and the original redundant packet may be encapsulated according to the short header format, specifically: for any one of the N redundant data, the redundant data may be used as a packet body of the original redundant packet, then the packet body may be encrypted by using a key determined after key negotiation with the data receiving device, and then the packet header may be encapsulated in the encrypted packet body, so that one original redundant packet may be obtained, and similarly, the N original redundant packets may be obtained.
s12, obtaining a second redundancy restoration parameter corresponding to each original redundancy packet in the N original redundancy packets.
After generating N original redundant packets according to the M original data packets, a second redundancy restoration parameter corresponding to each of the N original redundant packets may be obtained. In one implementation, the second redundancy recovery parameter may include a format identification parameter, and the format identification parameter may be used to identify a redundancy recovery format (FEC format), that is, when the redundancy packet includes the format identification parameter, it indicates that a packet format of the redundancy packet is the redundancy recovery format, and the redundancy packet whose packet format is the redundancy recovery format supports redundancy recovery processing, where the redundancy packet supports redundancy recovery processing, where: the redundant packets may be used for redundancy recovery processing. In one implementation, the second redundancy restoration parameter may include at least one of the following in addition to the format identification parameter: the data transmission device comprises a sequence number parameter, a type parameter, a data packet quantity parameter, a redundant packet quantity parameter and a connection identification parameter, wherein the sequence number parameter can be used for identifying a data packet group to which a redundant packet belongs and an arrangement sequence number of the redundant packet in the data packet group, the type parameter can be used for identifying a packet type of the redundant packet, the data packet quantity parameter is used for identifying the quantity of data packets contained in the data packet group to which the redundant packet belongs, the redundant packet quantity parameter can be used for identifying the quantity of the redundant packet in the data packet group to which the redundant packet belongs, and the connection identification parameter can be used for uniquely identifying the identity of the data transmission device.
And s13, splicing each original redundant packet in the N original redundant packets with the corresponding second redundant recovery parameter to obtain N target redundant packets.
After N original redundant packets are generated according to the M original data packets and the second redundant recovery parameter corresponding to each original redundant packet in the N original redundant packets is obtained, each original redundant packet in the N original redundant packets and the corresponding second redundant recovery parameter may be spliced to obtain N target redundant packets. For convenience of understanding, taking a splicing process of an nth original redundant packet in the N original redundant packets as an example, the N target redundant packet corresponding to the nth original redundant packet may be obtained by splicing the second redundancy recovery parameter corresponding to the nth original redundant packet and the nth original redundant packet, where N is a positive integer smaller than or equal to N. The specific splicing process is as follows: generating an nth redundant packet body for splicing the nth original redundant packet and a second redundant recovery parameter corresponding to the nth original redundant packet aiming at the nth original redundant packet in the N original redundant packets, wherein the nth redundant packet body comprises a head and a main body; and adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to the head of the nth redundancy packet body, and adding the nth original redundancy packet to the main body of the nth redundancy packet body to obtain an nth target redundancy packet corresponding to the nth original redundancy packet.
It should be noted that, similar to the splicing processing of the original data packet and the first redundancy restoration parameter corresponding to the original data packet, the format identification parameter, the sequence number parameter, the type parameter, the data packet quantity parameter, and the redundancy packet quantity parameter may all be added to the header of the nth redundancy packet body; similar to the original data packet, the second redundancy recovery parameter is added to the original redundancy packet in the form of a header without modifying the packet format defined by the target protocol, so that the method can be compatible with various types of target protocols, and is particularly suitable for a transmission protocol of which the packet format does not support an extension field or does not exist. Or, the format identification parameter identifying the redundant recovery format may be added to the head of the nth redundant inclusion, and the remaining parameters may be sent to the data receiving device separately; or, the format identification parameter for identifying the redundant recovery format may be added to the header of the nth redundant enclosure body, and the rest of the parameters may be partially added to the header of the nth redundant enclosure body, and the rest of the parameters may be separately sent to the data receiving device; similar to the original data packet, any one or more of the serial number parameter, the type parameter, the data packet quantity parameter and the redundant packet quantity parameter are independently sent to the data receiving equipment, so that the data quantity in the target redundant packet can be reduced, the transmission efficiency of the target redundant packet can be improved, and the data transmission efficiency is further improved. The description is given by taking an example in which the format identification parameter, the sequence number parameter, the type parameter, the number of data packets, and the number of redundant packets are all added to the header of the nth redundant packet body, and the rest of the description can be referred to the related description of the splicing process of the original data packets. In particular, when a client operates in the data sending device and the data receiving device is a server, since the server may be connected to a plurality of clients, in order to facilitate the server to distinguish different clients, a connection identification parameter for uniquely identifying the identity of the client operating in the data sending device may be added to the header of the nth redundant bag. The following describes a process of adding the second redundancy restoration parameter corresponding to the nth original redundant packet to the header of the nth redundant packet in conjunction with fig. 8a and 8 b:
in one implementation, when the data sending device is a server and the data receiving device runs a client, the second redundancy recovery parameter corresponding to the nth original redundancy packet may include: format identification parameter, sequence number parameter, type parameter, data packet quantity parameter and redundant packet quantity parameter; the header of the nth redundant enclosure may include: format identification field (FEC Format Flags), sequence number field (FEC SEQ ID), Type field (FEC Type), number of Data packets field (Data share Num), and number of redundant packets field (Parity share Num). As shown in fig. 8a, a format identification parameter may be added to the format identification field, where the format identification parameter may be used to identify that a packet format of an nth target redundant packet is a redundancy recovery format, where the redundancy recovery format is a main body wrapped by an FEC header, and the nth target redundant packet whose packet format is the redundancy recovery format may support redundancy recovery processing, where the nth target redundant packet may support redundancy recovery processing refers to: the nth target redundant packet can be used for redundancy recovery processing; a sequence number parameter may be added to the sequence number field, where the sequence number parameter may be used to identify that the nth target redundant packet belongs to the target data packet group and an arrangement sequence number of the nth target redundant packet in the target data packet group; a type parameter may be added to the type field, and the type parameter may be used to identify the packet type of the nth target redundant packet as a redundant packet type; a packet quantity parameter may be added to the packet quantity field, where the packet quantity parameter may be used to identify the number M of target packets included in the target packet group; a redundant packet number parameter may be added to the redundant packet number field, which may be used to identify the number N of target redundant packets of the target data packet group.
In another implementation manner, when the data sending device runs with a client and the data receiving device is not a server, the second redundancy recovery parameter corresponding to the nth original redundancy packet may include: format identification parameter, sequence number parameter, type parameter, data packet quantity parameter, redundant packet quantity parameter and connection identification parameter; the header of the nth redundant enclosure may include: format identification field (FEC Format Flags), sequence number field (FEC SEQ ID), Type field (FEC Type), number of packets field (Data share Num), number of redundant packets field (Parity share Num), and Connection identification field (Connection ID). As shown in fig. 8b, a format identification parameter may be added to the format identification field, where the format identification parameter may be used to identify that a packet format of an nth target redundant packet is a redundancy recovery format, where the redundancy recovery format is a main body wrapped by an FEC header, and the nth target redundant packet whose packet format is the redundancy recovery format may support redundancy recovery processing, where the nth target redundant packet may support redundancy recovery processing refers to: the nth target redundant packet can be used for carrying out redundancy recovery processing; a sequence number parameter may be added to the sequence number field, where the sequence number parameter may be used to identify that the nth target redundant packet belongs to the target data packet group and an arrangement position of the nth target redundant packet in the target data packet group; a type parameter may be added to the type field, and the type parameter may be used to identify the packet type of the nth target redundant packet as a redundant packet type; a packet quantity parameter may be added to the packet quantity field, where the packet quantity parameter may be used to identify the number M of target packets included in the target packet group; a redundant packet quantity parameter may be added to the redundant packet quantity field, where the redundant packet quantity parameter may be used to identify the number N of target redundant packets of the target data packet group; a connection identification parameter may be added to the connection identification field, which may be used to uniquely identify the identity of the client operating in the data sending device.
As can be seen from the foregoing, the number of target redundant packets of the target packet group to be generated may be determined according to the number of target packets included in the target packet group and the redundancy parameter; before generating the target redundant packets of the target data packet group, a packet loss parameter between the data sending device and the data receiving device may be obtained, where the packet loss parameter refers to a ratio of the current packet loss number to the total number of packets currently transmitted to the data receiving device, and the number of the target redundant packets to be generated for the target data packet group may be adjusted according to the packet loss parameter, so that N target redundant packets of the target data packet group may be generated according to the adjusted number of the target redundant packets to be generated for the target data packet group. The number of target redundant packets to be generated for the target data packet group may be adjusted according to the packet loss parameter, specifically, the redundancy parameter may be adjusted according to the packet loss parameter, and then the number of target redundant packets to be generated for the target data packet group is recalculated according to the adjusted redundancy parameter. The packet loss parameter and the redundancy parameter have a mapping relationship, and the redundancy parameter may be adjusted according to the current packet loss parameter, the mapping relationship between the packet loss parameter and the redundancy parameter, and an exemplary mapping relationship between the packet loss parameter and the redundancy parameter may be referred to as the following table 2:
TABLE 2
Packet loss parameter Redundancy parameter
(0,1%) 25%
[1%,3%) 35%
[3%,5%) 50%
[5%,+∞) 60%
By the method, the number of the target redundant packets generated for the target data packet is adjusted according to the current packet loss parameter, so that the number of the target redundant packets generated for the target data packet can better meet the packet loss condition of the current network, and the situations that redundant packets are generated, the generated redundant packets are not enough to recover all lost data packets and the like can be avoided.
In addition to supporting scaling the number of target redundant packets generated for a target packet group, the number of original packets that need to be included in an original packet group also supports scaling. Specifically, a transmission rate parameter between the data sending device and the data receiving device may be obtained, where the transmission rate parameter may be used to indicate a transmission speed of a transmission network between the data sending device and the data receiving device, and the larger the transmission rate parameter is, the faster the transmission speed of the transmission network between the data sending device and the data receiving device is, and then the number of original data packets to be included in the original data packet group may be adjusted according to the transmission rate parameter. Further, the number of target redundant packets to be generated for the target data packet group corresponding to the original data packet group may be determined according to the number of original data packets to be included in the original data packet group and the redundancy parameter. The transmission rate parameter and the number of original data packets to be included in the original data packet group have a mapping relationship, and the number of original data packets to be included in the original data packet group may be adjusted according to the current transmission rate, the mapping relationship between the transmission rate parameter and the number of original data packets to be included in the original data packet group, and an exemplary mapping relationship between the transmission rate parameter and the number of original data packets to be included in the original data packet group may be referred to as the following table 3:
TABLE 3
Transmission rate parameter Number of original packets to be included in original packet group
(0,1Kbps) 4
[1Kbps,10Kbps) 10
[10Kbps,100Kbps) 20
[100Kbps,1Mbps) 30
[1Mbps,+∞) 40
By the method, the number of the original data packets to be contained in the original data packet group is adjusted according to the current transmission rate parameter, so that the number of the original data packets to be contained in the original data packet group is more consistent with the transmission rate of the current network, packet loss is avoided as much as possible, and the data transmission rate is improved.
It should be noted that X original data packets need to be included in the original data packet group, that is, X target data packet groups need to be included in the target data packet group, the size relationship between the number M of the original data packets included in the original data packet group and X may be compared, the generation time of N target redundant packets is determined according to the size relationship between M and X, and then the N target redundant packets of the target data packet group may be generated according to the determined generation time. If M is equal to X, determining the time for obtaining M original data packets by encapsulation as the generation time of N target redundant packets; that is to say, when the data volume of the service data to be transmitted is large, X (i.e., M) original data packets obtained by encapsulating according to the target protocol are obtained, the M original data packets may be divided into original data packet groups, and N target redundant packets are generated according to the M original data packets. Or if M is smaller than X, determining the time of the overtime transmission of the last target data packet in the M target data packets as the generation time of the N target redundant packets; the last target packet transmission timeout is: after the last target data packet is sent to the target time interval, the acknowledgement frame sent by the data receiving equipment is not received; that is to say, when the data volume of the service data to be transmitted is small, and the original data packet obtained by encapsulation according to the target protocol is not enough to be divided into an original data packet group, a timer may be set in combination with ARQ (a time period set in the timer is a target time period (for example, RTT × 0.25)), if an acknowledgement frame sent by the data receiving device is not received after the last target data packet is sent in the target time period, N target redundant packets of the target data packet group are generated and sent actively, and if an acknowledgement frame sent by the data receiving device is received within the last target data packet sending target time period, it is described that the data packet is not lost in the transmission process, and it is not necessary to generate the target redundant packet. By the method, when the data volume of the service data to be transmitted is small, the redundant packet can be generated when the data packet is confirmed to be lost, and if the data packet is not confirmed to be lost, the target redundant packet does not need to be generated, so that the redundant coding resource of the data sending equipment can be saved.
S706, the N target redundant packets are sent to the data receiving equipment, so that when the data receiving equipment detects that the data packet in the target data packet group is lost, the data receiving equipment performs redundancy recovery processing according to the N target redundant packets to obtain the lost data packet.
After generating the N target redundant packets of the target data packet group, the N target redundant packets of the target data packet group may be sent to the data receiving device, so that when the data receiving device detects that there is a data packet loss in the target data packet group, the data receiving device may perform redundancy recovery processing according to the N target redundant packets to obtain a lost data packet.
It should be noted that, in the embodiment of the present application, steps S701 to S706 are executed under the condition that it is determined that the data receiving device has the redundancy recovery capability, if the data receiving device does not have the redundancy recovery capability, the first redundancy recovery parameter and the original data packet are not spliced, and a corresponding redundancy packet is not generated, and when there is a loss in the original data packet during transmission, the lost original data packet is retransmitted through ARQ; the data receiving apparatus having the redundancy restoration capability means that the data receiving apparatus can be used to perform the redundancy restoration process. In the embodiment of the present application, the redundant recovery capability of the data receiving device may be detected during the key agreement between the data sending device and the data receiving device, and if it is determined that the data receiving device has the redundant recovery capability, steps S701 to S706 in the embodiment of the present application may be executed. The key agreement between the data sending device and the data receiving device occurs before the formal transmission of the service data, and the key agreement may be used to determine a key, and the key may be used to encrypt in the process of encapsulating the M original data packets (specifically, encrypt a packet body of the original data packet or the original redundant packet). The key negotiation process may include a 1RTT process and a 0RTT process, where the 1RTT process may be used to perform key negotiation when the data sending device and the data receiving device are connected for the first time, and the 0RTT process may be used to perform key negotiation when the data sending device and the data receiving device are disconnected and reconnected after the data sending device and the data receiving device are connected for the first time, and the 1RTT process is described below with reference to fig. 9a, and the 0RTT process is described with reference to fig. 9 b:
in the embodiment shown in fig. 9a, a client (client) operates in a data sending device, and a data receiving device is a server (server), for example, a 1RTT process is described: firstly, a Client sends an early invite (Inchoate Client Hello, Inchoate CHLO) message to request to establish connection; the server generates a set of prime numbers p and base points g, then calculates a value a according to the prime numbers p, the base points g and the random generation numbers a, places the value a, the prime numbers p and the base points g in a server configuration, and sends the value a, the prime numbers p and the base points g to the client through a Rejection (REJ) message. Secondly, the Client randomly generates a number B, calculates an initial key K according to the numerical value A, the prime number p and the number B in the serverConfig, sends the public number B and the Data Encrypted by the initial key K to the server through a Complete call (Complete Client Hello) message, and also sends an encryption Request (Encrypted Request) to the server. The Server receives the data from the client, generates the same key by using the public number B sent by the client and the Server config to decrypt the data sent by the client, then sends a call (SHLO) message of the Server, at this time, the Server Hello message carries the public number generated by the Server (the Server updates its own private key, which is actually used to ensure forward security), and the Server also sends an Encrypted Response (Encrypted Response) to the client. After the client receives the public number of the server, both the client and the server update the key, and the encryption algorithm (such as SHA-256 algorithm) is adopted to deduce the key used for encryption between the client and the server, and the client and the server subsequently adopt the key to encrypt and transmit data. In the subsequent connection process, if the local serverConfig of the client is not expired (including the value a, the prime number p, the base point g and other previous negotiation information), the initial key K can be directly calculated and the transmission data is encrypted, so that 0RTT handshake is realized.
In the above 1RTT process, the Client embeds a redundancy recovery capability set (FEC capability set) of the Client into a Complete Client Hello message, and sends the Complete Client Hello message to the server, where the redundancy recovery capability set of the Client may be used to indicate that the Client has redundancy recovery capability and FEC versions supported by the Client. If the Server Hello message sent by the Server and received by the client is embedded with the redundancy recovery capability set of the Server, it may be determined that the Server (i.e., the data receiving device) has the redundancy recovery capability, and the redundancy recovery capability set of the Server may be used to indicate that the Server has the redundancy recovery capability and the FEC version supported by the Server.
In the embodiment shown in fig. 9b, a client (client) runs in the data sending device, and the data receiving device is a server (server), for example, the 0RTT process is described as follows: the premise of 0RTT is that the client must already possess the ServerConfig and verify the ServerConfig by combining with the certificate, the key exchange algorithm and the public key can be obtained after verification is error-free, a brand new key is generated at the moment, and the symmetric key S can be calculated locally according to the DH algorithm (key exchange algorithm) and parametersc. After receiving Client Hello message (CHLO message) of Client, server also contains public key information of Client, and server can calculate out secret key S by combining former public key parameters
In the 0RTT process, the Client embeds a redundancy recovery capability set (FEC capability set) of the Client into a Client Hello message, and sends the Client to the server, where the redundancy recovery capability set of the Client may be used to indicate that the Client has redundancy recovery capability and an FEC version supported by the Client. If the Server Hello message sent by the Server and received by the client is embedded with the redundancy recovery capability set of the Server, it may be determined that the Server (i.e., the data receiving device) has the redundancy recovery capability, and the redundancy recovery capability set of the Server may be used to indicate that the Server has the redundancy recovery capability and the FEC version supported by the Server.
The key negotiation process is a necessary preorder process for data transmission between the data sending equipment and the data receiving equipment, and whether the data receiving equipment has redundancy recovery capability or not is determined in the key negotiation process of the data sending equipment and the data receiving equipment, so that the connection establishment and the packet receiving and sending processes between the data sending equipment and the data receiving equipment can be compatible, no new process is additionally added, the change on the processes can be reduced, and more signaling and links are not added; and hard coding logic is not used, and whether the data receiving equipment has the redundancy recovery capability or not can be determined through a Format identification field (FEC Format Flag), so that the data receiving equipment has stronger expansibility and readability.
In the embodiment of the application, the target redundant packet is generated for the target data packet group, and the generated target redundant packet is sent to the data receiving equipment, so that when the data packet loss occurs in the process of transmitting the target data packet group to the data receiving equipment, the data receiving equipment can perform redundancy recovery processing according to the target redundant packet to quickly recover the lost data packet, and the data sending equipment does not need to retransmit the lost data packet, so that the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency is improved. In addition, the number of the target redundant packets which need to be generated for the target data packet group can be adjusted according to the current packet loss parameter, so that the number of the target redundant packets generated for the target data packet can better meet the packet loss condition of the current network; the number of the data packets to be contained in the data packet group can be adjusted according to the transmission rate parameter of the current network, so that the number of the original data packets to be contained in the original data packet group can better accord with the transmission rate of the current network, packet loss is avoided as much as possible, and the data transmission rate is improved.
The embodiment of the present application provides a data processing method, which mainly introduces determining that there is a data packet loss in a target data packet group and recovering the content such as the lost data packet through a redundancy recovery process, and the data processing method may be executed by the data receiving apparatus 202 (i.e. the data receiving side) in the data processing system 20, please refer to fig. 10, and the data processing method may include step S1001:
s1001, in the process of receiving a target data packet group from a data sending device, if it is detected that a data packet in the target data packet group is lost, obtaining the lost data packet through redundancy recovery processing.
The target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in the original data packet group and a corresponding first redundancy recovery parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, a first redundancy recovery parameter refers to a parameter which needs to be contained by the data packet supporting the redundancy recovery processing, and M is a positive integer.
The data receiving device can receive the target packet from the data sending device and read the header and the body of the target packet; if the target packet is determined to be the target data packet in the target data packet group according to the head of the target packet, determining that the main body of the target packet is the corresponding original data packet in the original data packet group, and copying the original data packet in the target packet to a queue; if the target packet is determined to be the target redundant packet of the target data packet group according to the head of the target packet, determining that the main body of the target packet is the original redundant packet corresponding to the target redundant packet, and copying the original redundant packet in the target packet into a queue; by analogy, each time the data receiving device receives a packet, the data receiving device can process the packet according to the processing logic of the target packet. After that, packet loss detection may be performed on the target packet group according to the number of the original packets in the original packet group included in the queue; if the data packet loss exists in the target data packet group, the lost data packet can be recovered through redundancy recovery processing; if it is determined that no data packet loss exists in the target number packet group, no redundancy recovery processing is required. Finally, for any original data packet, the packet head of the original data packet can be removed to obtain an encrypted packet body in the original data packet, then the encrypted packet body can be decrypted by adopting a key obtained by key negotiation, and the decrypted packet body is removed; for the original data packet group, the data obtained by unpacking may be arranged according to the arrangement position of the original data packet in the original data packet group, and the target service data is obtained by rebuilding.
The header of the target packet may include a format identification field, a sequence number field, and a type field; the value of the format identification field can be used for identifying that the target packet supports redundancy recovery processing or does not support redundancy recovery processing, the value of the sequence number field can be used for identifying a data packet group to which the target packet belongs, and the value of the type field can be used for identifying the packet type of the target packet; if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field is used for identifying that the packet type of the target packet is the data packet type, the main body of the target packet can be determined to be a corresponding original data packet in the original data packet group; if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field is used for identifying that the packet type of the target packet is the redundancy packet type, it can be determined that the main body of the target packet is the original redundancy packet.
Performing packet loss detection on the target data packet group according to the number of the original data packets in the original data packet group contained in the queue, may include: the number M of target data packets in a target data packet group sent by the data sending device may be obtained, where the number M may be read from a header of a target redundant packet of the received target data packet group, that is, the header of the target redundant packet includes a data packet number field, or the number M may be sent by the data sending device alone; if the number of original data packets in the original data packet group contained in the queue is less than the number M, that is, the number of original data packets in the original data packet group and the number of original redundant packets contained in the queue are equal to the number M, it can be determined that a data packet loss exists in the target data packet group; if the number of original packets in the original packet group included in the queue is equal to the number M, it may be determined that there is no packet loss in the target packet group.
If detecting that the data packet loss exists in the target data packet group, acquiring the number N of target redundant packets of the target data packet sent by the data sending equipment, wherein the number N is read from the header of the target redundant packet of the received target data packet group, namely the header of the target redundant packet comprises a redundant packet number field, or the number N can be sent by the data sending equipment alone, and N is a positive integer less than or equal to M; receiving N target redundant packets of a target data packet sent by the data sending equipment according to the quantity N; and then, the lost data packet can be subjected to redundancy recovery processing according to the N target redundant packets of the target data packet group to obtain the lost data packet. Specifically, the main body of each target redundant packet in the N target redundant packets can be read to obtain N original redundant packets; for any original redundant packet, the packet head of the original redundant packet can be removed to obtain an encrypted packet body in the original redundant packet, then the encrypted packet body can be decrypted by adopting a key obtained by key negotiation, the decrypted packet body is removed to obtain corresponding redundant data, and then the lost data packet can be recovered according to the N redundant data and the data packet which is not lost in the M original data packets.
In the embodiment of the application, in the process of receiving the target data packet group from the data sending equipment, if the data packet loss exists in the target data packet group, the data receiving equipment can perform redundancy recovery processing according to the target redundancy packet of the target data packet group to recover the lost data packet; the data receiving equipment can recover lost data packets through redundancy recovery processing on the premise that a target data packet in a target data packet group supports redundancy recovery processing, the target data packet group is obtained by splicing each original data packet in an original data packet group with a corresponding first redundancy recovery parameter, each original data packet in the original data packet group does not support redundancy recovery processing, and the first redundancy recovery parameter refers to a parameter which needs to be contained in the data packet supporting the redundancy recovery processing; that is to say, the data receiving device can directly and quickly recover the lost data packet without waiting for the data sending device to retransmit the lost data packet, so that the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency can be improved.
Based on the above description of the embodiments shown in fig. 4 to fig. 10, the following summarizes the data transmission flow between the data sending device and the data receiving device with reference to fig. 11:
for a data transmission device:
(1) dividing service data to be transmitted according to the target data length indicated by the MTU, encapsulating the data with the length of the target data length obtained by dividing, namely using the data with the length of the target data length obtained by dividing as the packet body of an original data packet, encrypting the packet body by adopting a secret key determined by secret key negotiation with data receiving equipment, and then encapsulating the packet head of the encrypted packet body to obtain the original data packet.
(2) After the original data packet is generated, the original data packet may be copied to the queue, and it should be noted that, in the process of copying the original data packet to the queue, a data packet length field (size field) of 2 bytes may be added to the header of the original data packet, and a value of the size field of 2 bytes is used to indicate the data packet length of the original data packet. The FEC header (i.e., the first redundancy recovery parameter) may then be concatenated (i.e., encapsulated) for the original data packet to obtain a destination data packet, and the destination data packet is sent to the data receiving device.
(3) When the data volume of the service data to be transmitted is large, if the number of the original data packets stored in the queue reaches the number of the original data packets required to be included in the set group of data packet groups, N original redundant packets may be generated according to the original data packets included in the set group of original packet groups, then an FEC header (i.e., a second redundancy recovery parameter) may be spliced (i.e., encapsulated) for each of the N original redundant packets to obtain N target redundant packets, and the N target redundant packets are sent to the data receiving device.
Specifically, the generation process of the original redundant packet is described below with reference to fig. 12, as shown in fig. 12, the current packet group includes 3 original packets, the packet lengths (Data lengths) of the 3 original packets are 50 bytes (Byte), 70 bytes and 100 bytes, respectively, and a size field of 2 bytes is added to the header of each original packet to indicate the packet length; the method includes the steps that 100 bytes of the maximum data packet length (max _ length) in a current data packet group can be obtained, then a memory space (the size of the memory space of the data packet is max _ length multiplied by the number of original data packets contained in the current data packet group, and the size of the memory space of a redundant packet is max _ length multiplied by the number of original redundant packets of the current data packet group) is allocated, the original data packets are copied into the memory space, and in the copying process, as an FEC algorithm (such as a Reed-Solomon Code algorithm) stipulates that the data packet lengths of all original data packets used for redundant coding are required to be consistent, the original data packets with the data packet length less than 100 bytes can be filled according to the max _ length (zero padding at the tail end), so that the data packet lengths of the original data packets in the current data packet group copied into the memory space are consistent and are all 100 bytes; then, 1 original redundant packet may be generated from 3 original data packets based on the FEC algorithm, and the length of the original redundant packet is 100+2=102 bytes.
It should be noted that, as shown in fig. 13, in the embodiment of the present application, when allocating a memory space for an original data packet, several bytes (i.e., reserved (Reserver) spaces) may be allocated at the head and the tail, so that when splicing an FEC header for the original data packet, the Reserver space at the head may be directly used, or when padding the original data packet, the Reserver space at the tail may be directly used, so that the memory space allocation and the number of times of copying may be saved. Similarly, when allocating memory space for the original redundant packet, several more bytes (i.e. Reserver space) may be allocated in the header, so that when splicing the FEC header for the original redundant packet, the Reserver space of the header may be directly used, which may save the memory space allocation and the number of times of copying. In addition, when the FEC algorithm is used for redundancy coding Processing, a CPU SIMD (Central Processing Unit Single Instruction Multiple Data ) Instruction may be used to accelerate redundancy coding, thereby improving the generation efficiency of the redundancy packet and the overall Data transmission efficiency.
It should be noted that, before encapsulating the service data, flow control, congestion control, and Pacing may also be performed. The flow control means that in order to avoid data packet loss, the sending speed of the data sending equipment needs to be controlled, so that the data receiving equipment can receive data in time; the congestion control acts on the network, which means that excessive data is prevented from being injected into the network, and the condition of overlarge network load is avoided; the packing process refers to setting a target frequency so that an original packet can be encapsulated according to the target frequency.
For a data receiving device:
(1) after receiving the destination packet from the data transmission device, the destination packet may be parsed, and the FEC header of the destination packet may be parsed. If the target packet is determined to be the target data packet according to the value of the type field of the FEC header, the main body of the target packet, that is, the original data packet, may be copied to the queue, it should be noted that a size field of 2 bytes needs to be added to the header of the original data packet during copying, and the size field of 2 bytes is used to identify the packet length of the original data packet. If the target packet is determined to be the target redundant packet according to the value of the type field of the FEC header, the main body of the target packet, that is, the original redundant packet, may be copied to the queue.
(2) If the number of original data packets in the latest data packet group in the queue (which may be determined by the sequence number field in the FEC header to belong to the same data packet group) reaches the number of original data packets to be included in the set data packet group (which may be obtained by the value of the data packet number field in the FEC header of the target redundant packet), it may be said that there is no data packet loss and no recovery is required, at this time, the maximum sequence number of the packets in the data packet group may be determined, and if a packet with a sequence number less than or equal to the maximum sequence number is subsequently received, the packet is discarded, and the original data packets and the original redundant packets stored in the queue are deleted.
(3) If the number of original packets in the latest packet group in the queue (which may be determined to belong to the same packet group by the sequence number field in the FEC header) does not reach the number of original packets to be included in the set packet group (the number may be obtained by the value of the packet number field in the FEC header of the target redundant packet), for example, the sum of the number of original packets in the latest packet group and the number of original redundant packets is equal to the number of original packets to be included in the set packet group, it is determined that there is a packet loss, and the lost original packets may be recovered according to the original redundant packets.
(4) For the original data packet which is not lost, the data encapsulated in the original data packet can be obtained by packet unpacking, decryption and unpacking; for the recovered original data packet, the zero value and the size field filled at the tail part can be removed, and the data encapsulated in the original data packet can be obtained through packet decapsulation, decryption and decapsulation. And then, the service data can be reconstructed according to the arrangement position indicated by the value of the sequence number field.
In the embodiment of the application, the FEC header refers to content that a data packet supporting redundancy recovery processing needs to contain, and an original data packet not supporting redundancy recovery processing and a corresponding FEC header are spliced to enable a target data packet obtained through splicing processing to support redundancy recovery processing, so that when a data packet is lost in a process of transmitting the target data packet to a data receiving device, the data receiving device can quickly recover the lost data packet through redundancy recovery processing, so that transmission delay under the condition of packet loss can be reduced, and data transmission efficiency is improved.
The method of the embodiments of the present application is described in detail above, and in order to better implement the above-described solution of the embodiments of the present application, the following provides a device of the embodiments of the present application.
Referring to fig. 14, fig. 14 is a schematic structural diagram of a data processing apparatus provided in this embodiment, where the data processing apparatus may be disposed in a computer device provided in this embodiment, and the computer device may be a data sending device (i.e., a data sending party) mentioned in the foregoing method embodiment. The data processing apparatus shown in fig. 14 may be a computer program (comprising program code) running in a computer device, which may be used to perform some or all of the steps in the method embodiments shown in fig. 4 or fig. 7. Referring to fig. 14, the data processing apparatus may include the following units:
an obtaining unit 1401, configured to obtain an original data packet group, where the original data packet group includes M original data packets, the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer; acquiring a first redundancy recovery parameter corresponding to each original data packet in an original data packet group, wherein the first redundancy recovery parameter refers to a parameter which needs to be included in a data packet supporting redundancy recovery processing;
a processing unit 1402, configured to splice each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to obtain a target data packet group, where the target data packet group includes M target data packets; and sending the target data packet group to data receiving equipment so that the data receiving equipment obtains the lost data packet through redundancy recovery processing when detecting that the data packet in the target data packet group is lost.
In an implementation manner, the processing unit 1402 is configured to perform splicing processing on each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to obtain the target data packet group, and is specifically configured to perform the following steps:
generating an mth data packet body corresponding to the mth original data packet aiming at the mth original data packet in the original data packet group, wherein the mth data packet body comprises a head and a main body, and M is a positive integer less than or equal to M; and adding the first redundancy recovery parameter corresponding to the mth original data packet to the head of the mth data packet body, and adding the mth original data packet to the main body of the mth data packet body to obtain the mth target data packet corresponding to the mth original data packet.
In one implementation manner, the first redundancy recovery parameter corresponding to the mth original data packet includes a format identification parameter, and the header of the mth data packet includes a format identification field; the processing unit 1402 is configured to, when adding the first redundancy recovery parameter corresponding to the mth original data packet to the header of the mth data packet, specifically execute the following steps:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the mth target data packet supports redundancy recovery processing.
In one implementation manner, the first redundancy restoration parameter corresponding to the mth original data packet further includes any one or both of a sequence number parameter and a type parameter; the head of the mth data packet body also comprises any one or two of a sequence number field or a type field; the processing unit 1402, configured to add the first redundancy recovery parameter corresponding to the mth original data packet to the header of the mth data packet, is further configured to perform the following steps:
when the first redundancy processing parameter corresponding to the mth original data packet further comprises a sequence number parameter and the head of the mth data packet further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying that the mth target data packet belongs to the target data packet group; and when the first redundancy processing parameter corresponding to the mth original data packet further comprises a type parameter and the header of the mth data packet further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the mth target data packet as the data packet type.
In one implementation, the processing unit 1402 is further configured to perform the following steps:
generating N target redundant packets of a target data packet group, wherein N is a positive integer less than or equal to M; and sending the N target redundant packets to the data receiving equipment so that the data receiving equipment performs redundancy recovery processing according to the N target redundant packets to obtain the lost data packets.
In one implementation, the processing unit 1402, when configured to generate N target redundant packets of a target data packet group, is specifically configured to perform the following steps:
generating N original redundant packets according to the M original data packets; acquiring a second redundancy recovery parameter corresponding to each original redundancy packet in the N original redundancy packets; and splicing each original redundant packet in the N original redundant packets with a corresponding second redundant recovery parameter to obtain N target redundant packets, wherein the second redundant recovery parameter refers to a parameter which needs to be contained in the redundant packet supporting the redundant recovery processing.
In an implementation manner, the processing unit 1402 is configured to perform splicing processing on each original redundant packet in the N original redundant packets and the corresponding second redundancy recovery parameter to obtain N target redundant packets, and is specifically configured to perform the following steps:
generating an nth redundant packet body corresponding to the nth original redundant packet aiming at the nth original redundant packet in the N original redundant packets, wherein the nth redundant packet body comprises a head and a main body, and N is a positive integer less than or equal to N; and adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to the head of the nth redundancy packet body, and adding the nth original redundancy packet to the main body of the nth redundancy packet body to obtain the nth target redundancy packet corresponding to the nth original redundancy packet.
In one implementation manner, the second redundancy recovery parameter corresponding to the nth original redundancy packet includes a format identification parameter, and the header of the nth redundancy packet body includes a format identification field; the processing unit 1402 is configured to, when adding the second redundancy recovery parameter corresponding to the nth original redundant packet to the header of the nth redundant packet, specifically execute the following steps:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the nth target redundant packet supports redundancy recovery processing.
In one implementation, the second redundancy recovery parameter corresponding to the nth original redundant packet further includes at least one of: a sequence number parameter, a type parameter, a data packet quantity parameter, and a redundant packet quantity parameter; the header of the nth redundant enclosure further includes at least one of: a sequence number field, a type field, a number of packets field, and a number of redundant packets field; the processing unit 1402, configured to add the second redundancy recovery parameter corresponding to the nth original redundant packet to the header of the nth redundant packet, is further configured to perform the following steps:
when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a sequence number parameter and the head of the nth redundancy packet body further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying the nth target redundancy packet as a redundancy packet of the target data packet group; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a type parameter and the header of the nth redundancy packet body further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the nth target redundancy packet as the redundancy packet type; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a data packet quantity parameter and the head of the nth redundancy packet body further comprises a data packet quantity field, adding the data packet quantity parameter into the data packet quantity field, wherein the data packet quantity parameter is used for identifying the quantity M of the target data packets contained in the target data packet group; and when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a redundancy packet quantity parameter and the header of the nth redundancy packet body further comprises a redundancy packet quantity field, adding the redundancy packet quantity parameter into the redundancy packet quantity field, wherein the redundancy packet quantity parameter is used for identifying the quantity N of the target redundancy packet of the target data packet group.
In one implementation, the original data packet group is configured to include X original data packets, where X is a positive integer; the processing unit 1402 is further configured to perform the following steps: comparing the magnitude relationship between M and X; determining the generation time of N target redundant packets according to the size relationship between M and X;
the processing unit 1402, when configured to generate N target redundant packets of a target data packet group, is specifically configured to execute the following steps: and generating N target redundant packets of the target data packet group according to the determined generation time.
In an implementation manner, when determining the generation times of the N target redundant packets according to the size relationship between M and X, the processing unit 1402 is specifically configured to perform the following steps:
if M is equal to X, determining the time for obtaining M original data packets by encapsulation as the generation time of N target redundant packets; if M is smaller than X, determining the time of sending overtime of the last target data packet in the M target data packets as the generation time of the N target redundant packets; wherein, the time-out of the last target data packet transmission means: and after the last target data packet is sent to the target time interval, the acknowledgement frame sent by the data receiving equipment is not received.
In one implementation, the processing unit 1402 is further configured to perform the following steps:
carrying out key agreement with the data receiving equipment to obtain a key, wherein the key is used for encrypting in the process of packaging the M original data packets; detecting the redundancy recovery capability of the data receiving equipment in the key negotiation process with the data receiving equipment; and if the data receiving equipment is determined to have the redundancy recovery capability, triggering and executing the step of acquiring the original data packet group.
According to another embodiment of the present application, the units in the data processing apparatus shown in fig. 14 may be respectively or entirely combined into one or several other units to form one or several other units, or some unit(s) may be further split into multiple functionally smaller units to form one or several other units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical applications, the functions of one unit can also be implemented by a plurality of units, or the functions of a plurality of units can also be implemented by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, the functions may also be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the data processing apparatus shown in fig. 14 may be configured by running a computer program (including program codes) capable of executing each step involved in part or all of the methods shown in fig. 4 or fig. 7 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and the data processing method of the embodiment of the present application may be implemented. The computer program may be embodied on a computer-readable storage medium, for example, and loaded into and executed by the above-described computing apparatus via the computer-readable storage medium.
In the embodiment of the application, the first redundancy recovery parameter refers to a parameter that a data packet supporting redundancy recovery processing needs to contain, each original data packet in an original data packet group does not support redundancy recovery processing, and the data sending device splices each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to enable each target data packet in a target data packet group obtained through splicing processing to support redundancy recovery processing.
Referring to fig. 15, fig. 15 is a schematic structural diagram of another data processing apparatus provided in the embodiment of the present application, where the data processing apparatus may be disposed in a computer device provided in the embodiment of the present application, and the computer device may be a data receiving device (i.e., a data receiving party) mentioned in the above method embodiment. The data processing apparatus shown in fig. 15 may be a computer program (comprising program code) running on a computer device, which may be used to perform some or all of the steps in the method embodiment shown in fig. 10. Referring to fig. 15, the data processing apparatus may include the following units:
a processing unit 1501, configured to, in a process of receiving a target packet group from a data sending apparatus, obtain a lost packet through redundancy recovery processing if it is detected that a packet loss exists in the target packet group; the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in the original data packet group and the corresponding first redundancy parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, a first redundancy recovery parameter refers to a parameter which needs to be contained by the data packet supporting the redundancy recovery processing, and M is a positive integer.
In one implementation, the receiving unit 1502 is further configured to perform the following steps: receiving a target packet from a data transmission device, and reading a header and a body of the target packet;
the processing unit 1501 is further configured to perform the following steps: if the target packet is determined to be the target data packet in the target data packet group according to the head of the target packet, determining that the main body of the target packet is the corresponding original data packet in the original data packet group, and copying the original data packet in the target packet to a queue; and according to the number of the original data packets in the original data packet group contained in the queue, carrying out packet loss detection on the target data packet group.
In one implementation, the header of the target packet includes a format identification field, a sequence number field, and a type field; the value of the format identification field is used for identifying that the target packet supports redundancy recovery processing or does not support redundancy recovery processing, the value of the sequence number field is used for identifying a data packet group to which the target packet belongs, and the value of the type field is used for identifying the packet type of the target packet; the processing unit 1501 is further configured to perform the following steps:
and if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field identifies that the packet type of the target packet is the data packet type, determining that the target packet is the target data packet in the target data packet group.
In an implementation manner, the processing unit 1501 is configured to, when performing packet loss detection on a target packet group according to the number of original packets in an original packet group included in a queue, specifically perform the following steps:
acquiring the number M of target data packets in a target data packet group sent by data sending equipment, wherein the number M is read from a data packet number field of the header of a target redundant packet of the received target data packet group; and if the number of the original data packets in the original data packet group contained in the queue is less than the number M, determining that the data packet loss exists in the target data packet group.
In an implementation manner, the processing unit 1501, when obtaining a lost packet through the redundancy recovery process, is specifically configured to perform the following steps:
acquiring the number N of target redundant packets of a target data packet sent by data sending equipment, wherein the number N is read from a redundant packet number field of the header of the target redundant packet of a received target data packet group, and N is a positive integer less than or equal to M; receiving N target redundant packets of a target data packet group sent by the data sending equipment according to the quantity N; and carrying out redundancy recovery processing on the lost data packet according to the N target redundancy packets to obtain the lost data packet.
According to another embodiment of the present application, the units in the data processing apparatus shown in fig. 15 may be respectively or entirely combined into one or several other units to form one or several other units, or some unit(s) may be further split into multiple functionally smaller units to form one or several other units, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data processing apparatus may also include other units, and in practical applications, the functions may also be implemented by being assisted by other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the data processing apparatus shown in fig. 15 may be constructed by running a computer program (including program codes) capable of executing each step involved in part or all of the method shown in fig. 10 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and the data processing method of the embodiment of the present application may be implemented. The computer program may be embodied on a computer-readable storage medium, for example, and loaded into and executed by the above-described computing apparatus via the computer-readable storage medium.
In the embodiment of the application, in the process of receiving a target data packet group from a data sending device, if it is detected that a data packet in the target data packet group is lost, the data receiving device can recover the lost data packet through redundancy recovery processing; the data receiving equipment can recover lost data packets through redundancy recovery processing on the premise that a target data packet in a target data packet group supports redundancy recovery processing, the target data packet group is obtained by splicing each original data packet in an original data packet group with a corresponding first redundancy recovery parameter, each original data packet in the original data packet group does not support redundancy recovery processing, and the first redundancy recovery parameter refers to a parameter which needs to be contained in the data packet supporting the redundancy recovery processing; that is to say, the data receiving device can directly and quickly recover the lost data packet without waiting for the data sending device to retransmit the lost data packet, so that the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency can be improved.
Based on the above method and apparatus embodiments, the present application provides a computer device, which may be the aforementioned data sending device (i.e., data sending party). Referring to fig. 16, fig. 16 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device shown in fig. 16 includes at least a processor 1601, an input interface 1602, an output interface 1603, and a computer-readable storage medium 1604. The processor 1601, the input interface 1602, the output interface 1603, and the computer-readable storage medium 1604 may be connected by a bus or other means.
A computer-readable storage medium 1604 may be stored in a memory of the computer device, the computer-readable storage medium 1604 for storing a computer program, the computer program comprising computer instructions, the processor 1601 for executing the program instructions stored by the computer-readable storage medium 1604. The processor 1601 (or CPU) is a computing core and a control core of the computer device, and is adapted to implement one or more computer instructions, and specifically, adapted to load and execute the one or more computer instructions so as to implement a corresponding method flow or a corresponding function.
Embodiments of the present application also provide a computer-readable storage medium (Memory), which is a Memory device in a computer device and is used for storing programs and data. It is understood that the computer readable storage medium herein can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores an operating system of the computer device. Also, one or more computer instructions, which may be one or more computer programs (including program code), are stored in the memory space for loading and execution by the processor. It should be noted that the computer-readable storage medium may be a high-speed RAM Memory, or may be a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory; and optionally at least one computer readable storage medium located remotely from the aforementioned processor.
In some embodiments, one or more computer instructions stored in the computer-readable storage medium 1604 may be loaded and executed by the processor 1601 to implement the corresponding steps of the data processing method described above with respect to fig. 4 or fig. 7. In particular implementations, the computer instructions in the computer-readable storage medium 1604 are loaded and executed by the processor 1601 to perform the following steps:
acquiring an original data packet group, wherein the original data packet group comprises M original data packets, the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer; acquiring a first redundancy recovery parameter corresponding to each original data packet in an original data packet group, wherein the first redundancy recovery parameter refers to a parameter which needs to be included in a data packet supporting redundancy recovery processing; splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group, wherein the target data packet group comprises M target data packets; and sending the target data packet group to data receiving equipment so that the data receiving equipment obtains the lost data packet through redundancy recovery processing when detecting that the data packet in the target data packet group is lost.
In one implementation, when the processor 1601 loads and executes the computer instruction in the computer-readable storage medium 1604 to perform a splicing process on each original packet in the original packet group and the corresponding first redundancy restoration parameter, so as to obtain a target packet group, the following steps are specifically executed:
generating an mth data packet body corresponding to the mth original data packet aiming at the mth original data packet in the original data packet group, wherein the mth data packet body comprises a head and a main body, and M is a positive integer less than or equal to M; and adding the first redundancy recovery parameter corresponding to the mth original data packet to the head of the mth data packet body, and adding the mth original data packet to the main body of the mth data packet body to obtain the mth target data packet corresponding to the mth original data packet.
In one implementation manner, the first redundancy recovery parameter corresponding to the mth original data packet includes a format identification parameter, and the header of the mth data packet includes a format identification field; when the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and executed to add the first redundancy restoration parameter corresponding to the mth original data packet to the header of the mth data packet, the following steps are specifically executed:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the mth target data packet supports redundancy recovery processing.
In one implementation manner, the first redundancy restoration parameter corresponding to the mth original data packet further includes any one or both of a sequence number parameter and a type parameter; the head of the mth data packet body also comprises any one or two of a sequence number field or a type field; the computer instructions in the computer-readable storage medium 1604, when loaded and executed by the processor 1601, are further configured to perform the following steps when adding the first redundancy restoration parameter corresponding to the mth original data packet to the header of the mth data packet:
when the first redundancy processing parameter corresponding to the mth original data packet further comprises a sequence number parameter and the head of the mth data packet further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying that the mth target data packet belongs to the target data packet group; and when the first redundancy processing parameter corresponding to the mth original data packet further comprises a type parameter and the header of the mth data packet further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the mth target data packet as the data packet type.
In one implementation, the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and are further configured to perform the steps of:
generating N target redundant packets of a target data packet group, wherein N is a positive integer less than or equal to M; and sending the N target redundant packets to the data receiving equipment so that the data receiving equipment performs redundancy recovery processing according to the N target redundant packets to obtain the lost data packets.
In one implementation, when the processor 1601 loads and executes the computer instructions in the computer-readable storage medium 1604 to generate the N target redundant packets of the target data packet group, the following steps are specifically performed:
generating N original redundant packets according to the M original data packets; acquiring a second redundancy recovery parameter corresponding to each original redundancy packet in the N original redundancy packets; and splicing each original redundant packet in the N original redundant packets with a corresponding second redundant recovery parameter to obtain N target redundant packets, wherein the second redundant recovery parameter refers to a parameter which needs to be contained in the redundant packet supporting the redundant recovery processing.
In one implementation, when the processor 1601 loads and executes the computer instructions in the computer-readable storage medium 1604 to perform the splicing process on each original redundant packet in the N original redundant packets and the corresponding second redundancy restoration parameter, so as to obtain N target redundant packets, the following steps are specifically performed:
generating an nth redundant packet body corresponding to the nth original redundant packet aiming at the nth original redundant packet in the N original redundant packets, wherein the nth redundant packet body comprises a head and a main body, and N is a positive integer less than or equal to N; and adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to the head of the nth redundancy packet body, and adding the nth original redundancy packet to the main body of the nth redundancy packet body to obtain the nth target redundancy packet corresponding to the nth original redundancy packet.
In one implementation manner, the second redundancy recovery parameter corresponding to the nth original redundancy packet includes a format identification parameter, and the header of the nth redundancy packet body includes a format identification field; when the processor 1601 loads and executes the computer instruction in the computer-readable storage medium 1604 to add the second redundancy restoration parameter corresponding to the nth original redundant packet to the header of the nth redundant packet, the following steps are specifically executed:
and adding a format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the nth target redundant packet supports redundancy recovery processing.
In one implementation, the second redundancy recovery parameter corresponding to the nth original redundant packet further includes at least one of: a sequence number parameter, a type parameter, a data packet quantity parameter, and a redundant packet quantity parameter; the header of the nth redundant enclosure further includes at least one of: a sequence number field, a type field, a number of packets field, and a number of redundant packets field; the computer instructions in the computer-readable storage medium 1604, when loaded and executed by the processor 1601, are further configured to perform the following steps when adding the second redundancy restoration parameter corresponding to the nth original redundant packet to the header of the nth redundant packet body:
when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a sequence number parameter and the head of the nth redundancy packet body further comprises a sequence number field, adding the sequence number parameter into the sequence number field, wherein the sequence number parameter is used for identifying the nth target redundancy packet as a redundancy packet of the target data packet group; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a type parameter and the header of the nth redundancy packet body further comprises a type field, adding the type parameter into the type field, wherein the type parameter is used for identifying the packet type of the nth target redundancy packet as the redundancy packet type; when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a data packet quantity parameter and the header of the nth redundancy packet body further comprises a data packet quantity field, adding the data packet quantity parameter to the data packet quantity field, wherein the data packet quantity parameter is used for identifying the quantity M of the target data packets contained in the target data packet group; and when the second redundancy recovery parameter corresponding to the nth original redundancy packet further comprises a redundancy packet quantity parameter and the header of the nth redundancy packet body further comprises a redundancy packet quantity field, adding the redundancy packet quantity parameter into the redundancy packet quantity field, wherein the redundancy packet quantity parameter is used for identifying the quantity N of the target redundancy packet of the target data packet group.
In one implementation, the original data packet group is configured to include X original data packets, where X is a positive integer; the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and are further configured to perform the steps of: comparing the magnitude relationship between M and X; determining the generation time of N target redundant packets according to the size relationship between M and X;
when the processor 1601 loads and executes the computer instructions in the computer-readable storage medium 1604 to generate the N target redundant packets of the target data packet group, the computer instructions are specifically configured to execute the following steps: and generating N target redundant packets of the target data packet group according to the determined generation time.
In one implementation, when the processor 1601 loads and executes the computer instructions in the computer-readable storage medium 1604 to determine the generation time of the N target redundant packets according to the size relationship between M and X, the following steps are specifically executed:
if M is equal to X, determining the time for obtaining M original data packets by encapsulation as the generation time of N target redundant packets; if M is smaller than X, determining the time of sending overtime of the last target data packet in the M target data packets as the generation time of the N target redundant packets; wherein, the sending timeout of the last target data packet means: and after the last target data packet is sent to the target time interval, the acknowledgement frame sent by the data receiving equipment is not received.
In one implementation, the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and are further configured to perform the steps of:
carrying out key agreement with the data receiving equipment to obtain a key, wherein the key is used for encrypting in the process of packaging the M original data packets; detecting the redundancy recovery capability of the data receiving equipment in the key negotiation process with the data receiving equipment; and if the data receiving equipment is determined to have the redundancy recovery capability, triggering and executing the step of acquiring the original data packet group.
In the embodiment of the application, the first redundancy recovery parameter refers to a parameter that a data packet supporting redundancy recovery processing needs to contain, each original data packet in an original data packet group does not support redundancy recovery processing, and the data sending device splices each original data packet in the original data packet group and the corresponding first redundancy recovery parameter to enable each target data packet in a target data packet group obtained through splicing processing to support redundancy recovery processing.
The embodiment of the present application provides a computer device, which may be the aforementioned data receiving device (i.e. data receiving party). Referring to fig. 16, fig. 16 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device shown in fig. 16 includes at least a processor 1601, an input interface 1602, an output interface 1603, and a computer-readable storage medium 1604. The processor 1601, the input interface 1602, the output interface 1603, and the computer-readable storage medium 1604 may be connected by a bus or other means.
A computer-readable storage medium 1604 may be stored in a memory of the computer device, the computer-readable storage medium 1604 for storing a computer program, the computer program comprising computer instructions, the processor 1601 for executing the program instructions stored by the computer-readable storage medium 1604. The processor 1601 (or CPU) is a computing core and a control core of the computer device, and is adapted to implement one or more computer instructions, and specifically, adapted to load and execute the one or more computer instructions so as to implement a corresponding method flow or a corresponding function.
Embodiments of the present application further provide a computer-readable storage medium (Memory), which is a Memory device in a computer device and is used for storing programs and data. It is understood that the computer readable storage medium herein can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores an operating system of the computer device. Also stored in the memory space are one or more computer instructions, which may be one or more computer programs (including program code), adapted to be loaded and executed by the processor. It should be noted that the computer-readable storage medium may be a high-speed RAM Memory, or may be a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory; and optionally at least one computer readable storage medium remotely located from the aforementioned processor.
In some embodiments, one or more computer instructions stored in the computer-readable storage medium 1604 may be loaded and executed by the processor 1601 to implement the respective steps of the data processing method described above with respect to fig. 10. In particular implementations, the computer instructions in the computer-readable storage medium 1604 are loaded and executed by the processor 1601 to perform the following steps:
in the process of receiving a target data packet group from data sending equipment, if detecting that a data packet in the target data packet group is lost, obtaining the lost data packet through redundancy recovery processing; the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in the original data packet group and the corresponding first redundancy parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, a first redundancy recovery parameter refers to a parameter which needs to be contained by the data packet supporting the redundancy recovery processing, and M is a positive integer.
In one implementation, the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and are further configured to perform the steps of: receiving a target packet from a data transmission device, and reading a header and a body of the target packet; if the target packet is determined to be the target data packet in the target data packet group according to the head of the target packet, determining that the main body of the target packet is the corresponding original data packet in the original data packet group, and copying the original data packet in the target packet to a queue; and according to the number of the original data packets in the original data packet group contained in the queue, carrying out packet loss detection on the target data packet group.
In one implementation, the header of the target packet includes a format identification field, a sequence number field, and a type field; the value of the format identification field is used for identifying that the target packet supports redundancy recovery processing or does not support redundancy recovery processing, the value of the sequence number field is used for identifying a data packet group to which the target packet belongs, and the value of the type field is used for identifying the packet type of the target packet; the computer instructions in the computer-readable storage medium 1604 are loaded by the processor 1601 and are further configured to perform the steps of:
and if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field identifies that the packet type of the target packet is the data packet type, determining that the target packet is the target data packet in the target data packet group.
In one implementation, when the processor 1601 loads and executes the computer instructions in the computer-readable storage medium 1604 to perform packet loss detection on a target packet group according to the number of original packets in the original packet group contained in the queue, the following steps are specifically performed:
acquiring the number M of target data packets in a target data packet group sent by data sending equipment, wherein the number M is read from a data packet number field of the header of a target redundant packet of the received target data packet group; and if the number of the original data packets in the original data packet group contained in the queue is less than the number M, determining that the data packet loss exists in the target data packet group.
In one implementation, when the computer instructions in the computer-readable storage medium 1604 are loaded and executed by the processor 1601 to obtain the lost packet through the redundancy recovery process, the following steps are specifically performed:
acquiring the number N of target redundant packets of a target data packet sent by data sending equipment, wherein the number N is read from a redundant packet number field of the header of the target redundant packet of a received target data packet group, and N is a positive integer less than or equal to M; receiving N target redundant packets of a target data packet group sent by the data sending equipment according to the quantity N; and carrying out redundancy recovery processing on the lost data packet according to the N target redundancy packets to obtain the lost data packet.
In the embodiment of the application, in the process of receiving a target data packet group from a data sending device, if it is detected that a data packet in the target data packet group is lost, the data receiving device can recover the lost data packet through redundancy recovery processing; the data receiving equipment can recover lost data packets through redundancy recovery processing on the premise that a target data packet in a target data packet group supports redundancy recovery processing, the target data packet group is obtained by splicing each original data packet in an original data packet group with a corresponding first redundancy recovery parameter, each original data packet in the original data packet group does not support redundancy recovery processing, and the first redundancy recovery parameter refers to a parameter which needs to be contained in the data packet supporting the redundancy recovery processing; that is to say, the data receiving device can directly and quickly recover the lost data packet without waiting for the data sending device to retransmit the lost data packet, so that the transmission delay under the condition of packet loss can be reduced, and the data transmission efficiency can be improved.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing method provided in the above-mentioned various alternative modes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

1. A method of data processing, the method comprising:
acquiring an original data packet group, wherein the original data packet group comprises M original data packets, the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer;
acquiring a first redundancy recovery parameter corresponding to each original data packet in the original data packet group, wherein the first redundancy recovery parameter refers to a parameter required to be included in a data packet supporting redundancy recovery processing;
splicing each original data packet in the original data packet group with a corresponding first redundancy recovery parameter to obtain a target data packet group, wherein the target data packet group comprises M target data packets;
and sending the target data packet group to data receiving equipment so that the data receiving equipment obtains the lost data packet through redundancy recovery processing when detecting that the data packet in the target data packet group is lost.
2. The method of claim 1, wherein the splicing each original packet in the original packet group with the corresponding first redundancy restoration parameter to obtain the target packet group comprises:
generating an mth data packet body corresponding to an mth original data packet in the original data packet group, wherein the mth data packet body comprises a header and a body, and M is a positive integer less than or equal to M;
adding a first redundancy recovery parameter corresponding to the mth original data packet to a header of the mth data packet body, and adding the mth original data packet to a body of the mth data packet body to obtain an mth target data packet corresponding to the mth original data packet.
3. The method of claim 2, wherein the first redundancy recovery parameter corresponding to the mth original packet comprises a format identification parameter, and the header of the mth packet comprises a format identification field; adding a first redundancy recovery parameter corresponding to the mth original data packet to a header of the mth data packet, including:
and adding the format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the mth target data packet supports redundancy recovery processing.
4. The method of claim 3, wherein the first redundancy restoration parameters corresponding to the mth original data packet further include one or both of a sequence number parameter and a type parameter; the header of the mth data packet body further comprises any one or two of a sequence number field or a type field; adding a first redundancy recovery parameter corresponding to the mth original data packet to a header of the mth data packet, further comprising:
when the first redundancy processing parameter corresponding to the mth original data packet further includes the sequence number parameter and the header of the mth data packet further includes the sequence number field, adding the sequence number parameter to the sequence number field, where the sequence number parameter is used to identify that the mth target data packet belongs to the target data packet group;
when the first redundancy processing parameter corresponding to the mth original data packet further includes the type parameter and the header of the mth data packet further includes the type field, adding the type parameter to the type field, where the type parameter is used to identify that the packet type of the mth target data packet is a data packet type.
5. The method of claim 1, wherein the method further comprises:
generating N target redundant packets of the target data packet group, wherein N is a positive integer less than or equal to M;
and sending the N target redundant packets to the data receiving equipment so that the data receiving equipment performs redundancy recovery processing according to the N target redundant packets to obtain the lost data packets.
6. The method of claim 5, wherein said generating N target redundant packets for said target group of packets comprises:
generating N original redundant packets according to the M original data packets;
acquiring a second redundancy recovery parameter corresponding to each original redundancy packet in the N original redundancy packets;
and splicing each original redundant packet in the N original redundant packets with a corresponding second redundant recovery parameter to obtain N target redundant packets, wherein the second redundant recovery parameter refers to a parameter which needs to be contained in a redundant packet supporting redundant recovery processing.
7. The method of claim 6, wherein the splicing each original redundant packet of the N original redundant packets with the corresponding second redundancy recovery parameter to obtain N target redundant packets comprises:
generating an nth redundant packet body corresponding to the nth original redundant packet aiming at the nth original redundant packet in the N original redundant packets, wherein the nth redundant packet body comprises a header and a main body, and N is a positive integer less than or equal to N;
adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to the head of the nth redundancy packet body, and adding the nth original redundancy packet to the main body of the nth redundancy packet body to obtain an nth target redundancy packet corresponding to the nth original redundancy packet.
8. The method of claim 7, wherein the second redundancy recovery parameter corresponding to the nth original redundant packet comprises a format identification parameter, and the header of the nth redundant packet comprises a format identification field; adding a second redundancy recovery parameter corresponding to the nth original redundancy packet to a header of the nth redundancy packet, including:
and adding the format identification parameter into the format identification field, wherein the format identification parameter is used for identifying that the nth target redundant packet supports redundancy recovery processing.
9. The method of claim 8, wherein the second redundancy recovery parameter for the nth original redundant packet further comprises at least one of: a sequence number parameter, a type parameter, a data packet quantity parameter, and a redundant packet quantity parameter; the header of the nth redundant enclosure further comprises at least one of: a sequence number field, a type field, a number of packets field, and a number of redundant packets field; the adding the second redundancy recovery parameter corresponding to the nth original redundant packet to the header of the nth redundant packet further includes:
when the second redundancy recovery parameter corresponding to the nth original redundant packet further includes the sequence number parameter and the header of the nth redundant packet further includes the sequence number field, adding the sequence number parameter to the sequence number field, where the sequence number parameter is used to identify the nth target redundant packet as a redundant packet of the target data packet group;
when the second redundancy recovery parameter corresponding to the nth original redundant packet further includes the type parameter and the header of the nth redundant packet further includes the type field, adding the type parameter to the type field, where the type parameter is used to identify that the packet type of the nth target redundant packet is a redundant packet type;
when the second redundancy recovery parameter corresponding to the nth original redundancy packet further includes the data packet quantity parameter and the header of the nth redundancy packet further includes the data packet quantity field, adding the data packet quantity parameter to the data packet quantity field, where the data packet quantity parameter is used to identify the number M of target data packets included in the target data packet group;
and when the second redundancy recovery parameter corresponding to the nth original redundancy packet further includes the redundancy packet number parameter and the header of the nth redundancy packet body further includes the redundancy packet number field, adding the redundancy packet number parameter to the redundancy packet number field, where the redundancy packet number parameter is used to identify the number N of the target redundancy packets of the target data packet group.
10. The method of claim 5, wherein the original set of packets is configured to include X original packets, X being a positive integer; the method further comprises the following steps:
comparing the magnitude relationship between M and X;
determining the generation time of the N target redundant packets according to the size relationship between M and X;
the generating of the N target redundant packets of the target data packet group includes:
and generating N target redundant packets of the target data packet group according to the determined generation time.
11. The method according to claim 10, wherein said determining the generation time of the N target redundant packets according to the size relationship between M and X comprises:
if M is equal to X, determining the time for obtaining the M original data packets by encapsulation as the generation time of the N target redundant packets;
if M is smaller than X, determining the time of the overtime transmission of the last target data packet in the M target data packets as the generation time of the N target redundant packets; wherein, the sending time-out of the last target data packet refers to: and after the last target data packet is sent to the target time interval, the acknowledgement frame sent by the data receiving equipment is not received.
12. The method of claim 1, wherein the method further comprises:
performing key agreement with the data receiving device to obtain a key, wherein the key is used for encryption in the process of packaging the M original data packets;
detecting the redundancy recovery capability of the data receiving equipment in the key negotiation process with the data receiving equipment;
and if the data receiving equipment is determined to have the redundancy recovery capability, triggering and executing the step of acquiring the original data packet group.
13. A method of data processing, the method comprising:
in the process of receiving a target data packet group from data sending equipment, if detecting that a data packet in the target data packet group is lost, obtaining the lost data packet through redundancy recovery processing;
the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in an original data packet group with a corresponding first redundancy recovery parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by the data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, the first redundancy recovery parameter refers to a parameter which needs to be contained by a data packet supporting the redundancy recovery processing, and M is a positive integer.
14. The method of claim 13, wherein the method further comprises:
receiving a target packet from the data transmission device, and reading a header and a body of the target packet;
if the target packet is determined to be the target data packet in the target data packet group according to the head of the target packet, determining that the main body of the target packet is the corresponding original data packet in the original data packet group, and copying the original data packet in the target packet to a queue;
and performing packet loss detection on the target data packet group according to the number of the original data packets in the original data packet group contained in the queue.
15. The method of claim 14, wherein the header of the target packet includes a format identification field, a sequence number field, and a type field; the value of the format identification field is used for identifying that the target packet supports redundancy recovery processing or does not support redundancy recovery processing, the value of the sequence number field is used for identifying a data packet group to which the target packet belongs, and the value of the type field is used for identifying the packet type of the target packet; the method further comprises the following steps:
and if the value of the format identification field identifies that the target packet supports redundancy recovery processing, the value of the sequence number field identifies that the data packet group to which the target packet belongs is the target data packet group, and the value of the type field identifies that the packet type of the target packet is the data packet type, determining that the target packet is the target data packet in the target data packet group.
16. The method of claim 14, wherein the detecting the packet loss of the target packet group according to the number of original packets in the original packet groups included in the queue comprises:
acquiring the number M of target data packets in a target data packet group sent by the data sending equipment, wherein the number M is read from a data packet number field of the header of a target redundant packet of the received target data packet group;
and if the number of the original data packets in the original data packet group contained in the queue is smaller than the number M, determining that the data packet loss exists in the target data packet group.
17. The method of claim 13, wherein the deriving the missing data packet by the redundancy recovery process comprises:
acquiring the number N of target redundant packets of a target data packet sent by the data sending equipment, wherein the number N is read from a redundant packet number field of the header of the target redundant packet of the received target data packet group, and N is a positive integer less than or equal to M;
receiving N target redundant packets of a target data packet group sent by the data sending equipment according to the quantity N;
and performing redundancy recovery processing on the lost data packet according to the N target redundancy packets to obtain the lost data packet.
18. A data processing apparatus, characterized in that the data processing apparatus comprises:
an obtaining unit, configured to obtain an original data packet group, where the original data packet group includes M original data packets, the M original data packets are obtained by encapsulating target service data to be transmitted according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, and M is a positive integer;
the acquiring unit is further configured to acquire a first redundancy recovery parameter corresponding to each original data packet in the original data packet group, where the first redundancy recovery parameter is a parameter that needs to be included in a data packet that supports redundancy recovery processing;
the processing unit is used for splicing each original data packet in the original data packet group with the corresponding first redundancy recovery parameter to obtain a target data packet group, wherein the target data packet group comprises M target data packets;
the processing unit is further configured to send the target data packet group to a data receiving device, so that when the data receiving device detects that a data packet in the target data packet group is lost, the lost data packet is obtained through redundancy recovery processing.
19. A data processing apparatus, characterized in that the data processing apparatus comprises:
the processing unit is used for obtaining a lost data packet through redundancy recovery processing if detecting that the data packet in the target data packet group is lost in the process of receiving the target data packet group from the data sending equipment;
the target data packet group sent by the data sending equipment comprises M target data packets, and the target data packet group is obtained by splicing each original data packet in an original data packet group and a corresponding first redundancy recovery parameter by the data sending equipment; the original data packet group comprises M original data packets, the original data packet group is obtained by encapsulating target service data to be transmitted by the data transmitting equipment according to a target protocol, each original data packet obtained by encapsulating the target protocol does not support redundancy recovery processing, the first redundancy recovery parameter refers to a parameter which needs to be contained by a data packet supporting the redundancy recovery processing, and M is a positive integer.
20. A computer device, characterized in that the computer device comprises:
a processor adapted to implement a computer program;
computer readable storage medium, having stored thereon a computer program adapted to be loaded by said processor and to execute the data processing method according to any of claims 1 to 12, or the data processing method according to any of claims 13 to 17.
CN202210418803.3A 2022-04-21 2022-04-21 Data processing method and related equipment Active CN114513418B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210418803.3A CN114513418B (en) 2022-04-21 2022-04-21 Data processing method and related equipment
PCT/CN2023/079758 WO2023202243A1 (en) 2022-04-21 2023-03-06 Data processing method and apparatuses, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210418803.3A CN114513418B (en) 2022-04-21 2022-04-21 Data processing method and related equipment

Publications (2)

Publication Number Publication Date
CN114513418A CN114513418A (en) 2022-05-17
CN114513418B true CN114513418B (en) 2022-06-24

Family

ID=81555158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210418803.3A Active CN114513418B (en) 2022-04-21 2022-04-21 Data processing method and related equipment

Country Status (2)

Country Link
CN (1) CN114513418B (en)
WO (1) WO2023202243A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513418B (en) * 2022-04-21 2022-06-24 腾讯科技(深圳)有限公司 Data processing method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7017102B1 (en) * 2001-12-27 2006-03-21 Network Equipment Technologies, Inc. Forward Error Correction (FEC) for packetized data networks
US9967306B1 (en) * 2016-09-08 2018-05-08 Sprint Spectrum L.P. Prioritized transmission of redundancy data for packetized voice communication
CN111181698A (en) * 2019-10-31 2020-05-19 腾讯云计算(北京)有限责任公司 Data processing method, device, equipment and medium
WO2021164303A1 (en) * 2020-02-20 2021-08-26 腾讯科技(深圳)有限公司 Speech transmission method, system, and apparatus, computer readable storage medium, and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616328A (en) * 2016-12-12 2018-10-02 北京视联动力国际信息技术有限公司 A kind of audio/video flow loss recovery method and audio/video flow transmitting terminal and receiving terminal
CN107241166A (en) * 2017-06-12 2017-10-10 京信通信系统(中国)有限公司 A kind of voice Volte Data safeguard method and apparatus on Long Term Evolution
CN113242155A (en) * 2021-03-30 2021-08-10 深圳震有科技股份有限公司 Method and system for recovering packet loss of data packet and computer readable storage medium
CN114513418B (en) * 2022-04-21 2022-06-24 腾讯科技(深圳)有限公司 Data processing method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7017102B1 (en) * 2001-12-27 2006-03-21 Network Equipment Technologies, Inc. Forward Error Correction (FEC) for packetized data networks
US9967306B1 (en) * 2016-09-08 2018-05-08 Sprint Spectrum L.P. Prioritized transmission of redundancy data for packetized voice communication
CN111181698A (en) * 2019-10-31 2020-05-19 腾讯云计算(北京)有限责任公司 Data processing method, device, equipment and medium
WO2021164303A1 (en) * 2020-02-20 2021-08-26 腾讯科技(深圳)有限公司 Speech transmission method, system, and apparatus, computer readable storage medium, and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
分布式文件系统低耦合度高可用性支持模块的实现;史树明等;《计算机研究与发展》;20030830(第08期);全文 *
面向M2M通信的传输控制机制与方法;王群等;《计算机科学》;20131115(第11期);全文 *

Also Published As

Publication number Publication date
CN114513418A (en) 2022-05-17
WO2023202243A1 (en) 2023-10-26

Similar Documents

Publication Publication Date Title
Kumar et al. Implementation and analysis of QUIC for MQTT
US7451381B2 (en) Reliable method and system for efficiently transporting dynamic data across a network
EP2630766B1 (en) Universal file delivery methods for providing unequal error protection and bundled file delivery services
US7502860B1 (en) Method and apparatus for client-side flow control in a transport protocol
EP2437421B1 (en) Method, device and communication system for retransmitting based on forward error correction
US8181077B2 (en) Methods and devices for the dynamic management of transmission errors by network points of interconnections
JP2018528679A (en) Device and method for establishing a connection in a load balancing system
US20090138574A1 (en) Information processing and transportation architecture for data storage
US10225239B2 (en) Method for in-line TLS/SSL cleartext encryption and authentication
US11381339B2 (en) System and technique for generating, transmitting and receiving network coded (NC) quick UDP internet connections (QUIC) packets
CN114513418B (en) Data processing method and related equipment
JP4933666B2 (en) Method and apparatus for calculating available space in a packet for data stream transfer
KR20060091055A (en) Method for lost packet reconstruction and device for carrying out said method
US11082411B2 (en) RDMA-based data transmission method, network interface card, server and medium
EP3672189B1 (en) Data transmission method, device and system
CN115333782A (en) Data transmission method, data reception method, storage medium, and computer device
CN114125080A (en) Message link terminal protocol stack construction method and analysis method, device and terminal
CN115714991A (en) Method, apparatus and storage medium for transmitting time-resolved network packets
WO2023056812A1 (en) Data processing method and device, and computer readable storage medium
CN113765851B (en) Data processing method and equipment thereof
US11588925B2 (en) Method for transferring large amounts of data through a telematic network in an efficient and reliable manner at a high-speed
EP4124117A1 (en) Service transmission method, communication device and storage medium
CN113810357B (en) Distributed gateway system, data interaction method and medium of distributed gateway system
CN115801236A (en) Encryption agent method, encryption agent module, agent device and storage medium
CN112333773A (en) Communication processing method, device, apparatus 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
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40070929

Country of ref document: HK