CN112583524A - Data packet recovery method and device - Google Patents

Data packet recovery method and device Download PDF

Info

Publication number
CN112583524A
CN112583524A CN201910945466.1A CN201910945466A CN112583524A CN 112583524 A CN112583524 A CN 112583524A CN 201910945466 A CN201910945466 A CN 201910945466A CN 112583524 A CN112583524 A CN 112583524A
Authority
CN
China
Prior art keywords
data packet
original data
encoded
original
packets
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.)
Granted
Application number
CN201910945466.1A
Other languages
Chinese (zh)
Other versions
CN112583524B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910945466.1A priority Critical patent/CN112583524B/en
Publication of CN112583524A publication Critical patent/CN112583524A/en
Application granted granted Critical
Publication of CN112583524B publication Critical patent/CN112583524B/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
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0041Arrangements at the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data packet recovery method and device, and belongs to the technical field of communication. The method comprises the following steps: sending an original data packet; pre-coding each original data packet in the sent original data packet group to obtain a first coded data packet group, wherein the byte number of each first coded data packet in the first coded data packet group is the same; forward error correction coding is carried out on the first coding data packet group to obtain a second coding data packet group; and sending the second encoding data packet group, wherein the original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group are used for recovering the original data packet of the original data packet group which is lost in the transmission process. The method and the device can complete the recovery of the original data packet lost in the transmission process, and avoid data loss.

Description

Data packet recovery method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for recovering a data packet.
Background
With the continuous development of multicast technology, it is widely used in various fields. For example, a multicast technique may be used for video conferencing or video on demand, where one device may send video data to multiple devices simultaneously. The multicast technology can greatly save the data transmission time and improve the data transmission efficiency.
The multicast technique often uses UDP (User Datagram Protocol) for data transmission. UDP does not provide a guaranteed mechanism for data transmission, i.e. if a data packet is lost during data transmission from a sender to a receiver, UDP does not provide any detection or indication.
Disclosure of Invention
The application provides a data packet recovery method and a data packet recovery device, which can recover lost original data packets.
The technical scheme is as follows:
in a first aspect, a method for recovering a data packet is provided, where the method includes:
sending an original data packet;
pre-coding each original data packet in the sent original data packet group to obtain a first coded data packet group, wherein the byte number of each first coded data packet in the first coded data packet group is the same;
forward error correction coding is carried out on the first coding data packet group to obtain a second coding data packet group;
and sending the second encoding data packet group, wherein the original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group are used for recovering the original data packet of the original data packet group which is lost in the transmission process.
Optionally, the pre-coding each original data packet in the sent original data packet group to obtain a first coded data packet group includes:
determining a first byte number, wherein the first byte number is greater than or equal to the maximum byte number in the byte numbers of each original data packet in the original data packet group;
for any original data packet in the original data packet group, adding a first data block at the tail end of the original data packet according to the first byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the first byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block to obtain a first encoded data packet in the first encoded data packet group, wherein the byte number of the second data block is a preset byte number, and the second data block comprises the byte number of the first data block.
Optionally, the predetermined position of the original data packet is a head end of the original data packet.
Optionally, before the pre-encoding each original packet in the transmitted original packet group to obtain the first encoded packet group, the pre-encoding further includes:
dividing all original data packets of a sent I frame into a plurality of original data packet groups, and dividing all original data packets of a sent P frame into one original data packet group, wherein the packet sequence of all original data packets in each original data packet group is continuous.
Optionally, before the sending the second encoded data packet group, the method further includes:
for any one second coded data packet in the second coded data packet group, adding a coded information data block in the second coded data packet;
the coding information data block comprises position information of the second coding data packet in the second coding data packet group, the packet sequence of the first original data packet in the original data packet group, the number of data packets in the original data packet group and the number of data packets in the second coding data packet group.
Optionally, the forward error correction coding is a cauchy matrix based RS-FEC coding.
In a second aspect, a method for recovering a data packet is provided, the method comprising:
receiving an original data packet and a second coded data packet;
acquiring a plurality of second encoded data packets from the received second encoded data packets, and acquiring a plurality of original data packets from the received original data packets, wherein a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong, the second encoded data packet group is obtained by performing forward error correction encoding on a first encoded data packet group, the first encoded data packet group is obtained by performing pre-encoding on each original data packet in the original data packet group, and the byte number of each first encoded data packet in the first encoded data packet group is the same;
when the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the transmission process of the original data packet group;
and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, restoring the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
Optionally, the obtaining of the plurality of second encoded data packets from the received second encoded data packet and the obtaining of the plurality of original data packets from the received original data packet include:
determining that a plurality of second encoding data packets containing the same target packet sequence in the received second encoding data packets belong to a second encoding data packet group;
determining a target packet sequence range according to a target packet sequence and the number of target data packets contained in any one of the second encoding data packets;
and determining that a plurality of original data of which the packet sequence is in the target packet sequence range in the received original data packet belong to one original data packet group corresponding to the second coded data packet group.
Optionally, when the plurality of second encoded data packets and the plurality of original data packets satisfy a preset condition, before restoring original data packets, which are lost in a transmission process, of the original data packet group according to the plurality of second encoded data packets and the plurality of original data packets, the method further includes:
acquiring the number of target data packets contained in any one second encoding data packet in the plurality of second encoding data packets;
subtracting the number of the original data packets from the number of the obtained target data packets to obtain the number of lost data packets;
and when the number of the lost data packets is smaller than the number of the second coding data packets, determining that the second coding data packets and the original data packets meet preset conditions.
Optionally, the recovering the original data packet lost in the original data packet group in the transmission process according to the plurality of second encoded data packets and the plurality of original data packets includes:
acquiring the number of data packets of the second encoded data packet group contained in any one of the second encoded data packets, and acquiring the position information of each second encoded data packet contained in the second encoded data packet group;
removing the coded information data block in each of the plurality of second coded data packets;
taking the byte number of any one of the second encoded data packets from which the encoded information data block is removed as a second byte number, wherein the second byte number is the byte number of each first encoded data packet in the first encoded data packet group;
pre-coding each original data packet in the plurality of original data packets according to the second byte number to obtain a plurality of first coded data packets belonging to the first coded data packet group;
according to the position information of each second encoding data packet in the plurality of second encoding data packets in the second encoding data packet group and the number of data packets of the second encoding data packet group, carrying out forward error correction decoding on the plurality of first encoding data packets and the plurality of second encoding data packets with the encoding information data blocks removed to obtain the first encoding data packet group;
predecoding each first encoded data packet in the first encoded data packet group to obtain the original data packet group.
Optionally, the pre-encoding each original data packet in the plurality of original data packets according to the second number of bytes to obtain a plurality of first encoded data packets belonging to the first encoded data packet group includes:
for any original data packet in the plurality of original data packets, adding a first data block at the tail end of the original data packet according to the second byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the second byte number and subtracting a preset byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first encoded data packet belonging to the first encoded data packet group, wherein the byte number of the second data block is the preset byte number, and the second data block comprises the byte number of the first data block.
Optionally, the predecoding each first encoded data packet in the first encoded data packet group to obtain the original data packet group includes:
for any one first coded data packet in the first coded data packet group, removing a first data block from the end of the first coded data packet according to the number of bytes contained in a second data block at a preset position in the first coded data packet;
and removing the second data block from a preset position in the first coded data packet from which the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
In a third aspect, a method for recovering a data packet is provided, where the method includes:
the method comprises the steps that first equipment sends original data packets to second equipment, and each original data packet in an original data packet group which is sent is pre-coded to obtain a first coded data packet group, wherein the number of bytes of each first coded data packet in the first coded data packet group is the same;
the first device performs forward error correction coding on the first coded data packet group to obtain a second coded data packet group, and sends the second coded data packet group to the second device;
when the second device receives an original data packet and a second coded data packet sent by the first device, obtaining a plurality of second coded data packets from the received second coded data packet, and obtaining a plurality of original data packets from the received original data packet, wherein the plurality of second coded data packets belong to the second coded data packet group, and the plurality of original data packets belong to the original data packet group;
when the packet sequence of the plurality of original data packets is discontinuous, the second device determines that the original data packets are lost in the transmission process of the original data packet group;
and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, the second device recovers the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
In a fourth aspect, there is provided a packet recovery apparatus, the apparatus comprising:
the first sending module is used for sending an original data packet;
the first encoding module is used for pre-encoding each original data packet in the sent original data packet group to obtain a first encoded data packet group, wherein the byte number of each first encoded data packet in the first encoded data packet group is the same;
a second encoding module, configured to perform forward error correction encoding on the first encoded data packet group to obtain a second encoded data packet group;
and the second sending module is used for sending the second encoding data packet group, and the original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group are used for recovering the original data packet of the original data packet group which is lost in the transmission process.
Optionally, the first encoding module comprises:
a determining unit, configured to determine a first number of bytes, where the first number of bytes is greater than or equal to a maximum number of bytes in the number of bytes of each original data packet in the original data packet group;
a first adding unit, configured to add, to any one original packet in the original packet group, a first data block at the end of the one original packet according to the first byte number, where the byte number of the first data block is obtained by subtracting the byte number of the one original packet from the first byte number;
and a second adding unit, configured to add a second data block at a preset position in the original data packet after the first data block is added according to the number of bytes of the first data block, so as to obtain a first encoded data packet in the first encoded data packet group, where the number of bytes of the second data block is a preset number of bytes, and the second data block includes the number of bytes of the first data block.
Optionally, the predetermined position of the original data packet is a head end of the original data packet.
Optionally, the I frame in the video image comprises a plurality of original data packets, and the P frame in the video image comprises one or more original data packets, the apparatus further comprising:
the dividing module is used for dividing all original data packets of one sent I frame into a plurality of original data packet groups, dividing all original data packets of a plurality of sent P frames into one original data packet group, and enabling the packet sequence of all original data packets in each original data packet group to be continuous.
Optionally, the apparatus further comprises:
an adding module, configured to add, to any one second encoded packet in the second encoded packet group, an encoded information data block in the one second encoded packet;
the coding information data block comprises position information of the second coding data packet in the second coding data packet group, the packet sequence of the first original data packet in the original data packet group, the number of data packets in the original data packet group and the number of data packets in the second coding data packet group.
Optionally, the forward error correction coding is a cauchy matrix based RS-FEC coding.
In a fifth aspect, there is provided a packet recovery apparatus, the apparatus comprising:
the receiving module is used for receiving the original data packet and the second coded data packet;
a first obtaining module, configured to obtain a plurality of second encoded data packets from a received second encoded data packet, and obtain a plurality of original data packets from a received original data packet, where a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong, the second encoded data packet group is obtained by performing forward error correction encoding on a first encoded data packet group, the first encoded data packet group is obtained by performing pre-encoding on each original data packet in the original data packet group, and the number of bytes of each first encoded data packet in the first encoded data packet group is the same;
a first determining module, configured to determine that an original data packet of the original data packet group is lost in a transmission process when packet orders of the plurality of original data packets are not consecutive;
and the recovery module is used for recovering the original data packet lost in the transmission process of the original data packet group according to the plurality of second coded data packets and the plurality of original data packets when the plurality of second coded data packets and the plurality of original data packets meet preset conditions.
Optionally, the second encoded data packet includes an encoded information data block, a target packet sequence included in the encoded information data block in the second encoded data packet is a packet sequence of a first original data packet in a corresponding original data packet group, and a number of target data packets included in the encoded information data block in the second encoded data packet is a number of data packets of the corresponding original data packet group, where the obtaining module includes:
a first determining unit, configured to determine that a plurality of second encoded data packets containing the same target packet order in the received second encoded data packet belong to a second encoded data packet group;
a second determining unit configured to determine a target packet order range according to a target packet order and a target data packet number included in any one of the plurality of second encoded data packets;
and a third determining unit, configured to determine that a plurality of original data packets, whose packet order is within the target packet order range, in the received original data packet belong to one original data packet group corresponding to the one second encoded data packet group.
Optionally, the apparatus further comprises:
a second obtaining module, configured to obtain the number of target data packets included in any one of the second encoded data packets;
the calculation module is used for subtracting the number of the original data packets from the number of the obtained target data packets to obtain the number of the lost data packets;
a second determining module, configured to determine that the plurality of second encoded data packets and the plurality of original data packets satisfy a preset condition when the number of the lost data packets is smaller than the number of the plurality of second encoded data packets.
Optionally, the second encoded data packet includes an encoded information data block, where the encoded information data block in the second encoded data packet includes position information of the second encoded data packet group to which the second encoded data packet belongs and the number of data packets of the second encoded data packet group to which the second encoded data packet belongs, and the recovering module includes:
an obtaining unit, configured to obtain the number of data packets of the second encoded data packet group included in any one of the plurality of second encoded data packets, and obtain position information of each second encoded data packet included in the plurality of second encoded data packets in the second encoded data packet group;
a removal unit configured to remove the encoded information data block in each of the plurality of second encoded packets;
a fourth determining unit, configured to use, as a second byte number, a byte number of any one of the plurality of second encoded packets from which the encoded information data block is removed, where the second byte number is a byte number of each first encoded packet in the first encoded packet group;
an encoding unit, configured to precode each original data packet in the multiple original data packets according to the second number of bytes to obtain multiple first encoded data packets belonging to the first encoded data packet group;
a first decoding unit, configured to perform forward error correction decoding on the plurality of first encoded data packets and the plurality of second encoded data packets from which the encoded information data block is removed according to position information of each of the plurality of second encoded data packets in the second encoded data packet group and the number of data packets of the second encoded data packet group, so as to obtain the first encoded data packet group;
and the second decoding unit is used for pre-decoding each first encoding data packet in the first encoding data packet group to obtain the original data packet group.
Optionally, the encoding unit is configured to:
for any original data packet in the plurality of original data packets, adding a first data block at the tail end of the original data packet according to the second byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the second byte number and subtracting a preset byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first encoded data packet belonging to the first encoded data packet group, wherein the byte number of the second data block is the preset byte number, and the second data block comprises the byte number of the first data block.
Optionally, the second decoding unit is configured to:
for any one first coded data packet in the first coded data packet group, removing a first data block from the end of the first coded data packet according to the number of bytes contained in a second data block at a preset position in the first coded data packet;
and removing the second data block from a preset position in the first coded data packet from which the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
In a sixth aspect, there is provided a packet recovery system, the system comprising: a first device and a second device;
the first device is configured to send an original data packet to the second device, and precode each original data packet in an original data packet group that has been sent, so as to obtain a first encoded data packet group, where the number of bytes of each first encoded data packet in the first encoded data packet group is the same; forward error correction coding is carried out on the first coding data packet group to obtain a second coding data packet group, and the second coding data packet group is sent to the second equipment;
the second device is configured to, when receiving an original data packet and a second encoded data packet sent by the first device, obtain a plurality of second encoded data packets from the received second encoded data packet, and obtain a plurality of original data packets from the received original data packet, where the plurality of second encoded data packets belong to the second encoded data packet group, and the plurality of original data packets belong to the original data packet group; when the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the transmission process of the original data packet group; and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, restoring the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
In a seventh aspect, there is provided a packet recovery apparatus, including:
a processor and a memory;
wherein the memory has at least one instruction stored therein, and the at least one instruction is loaded and executed by the processor to implement the packet recovery method according to the first aspect.
In an eighth aspect, there is provided a packet recovery apparatus, the apparatus comprising:
a processor and a memory;
wherein the memory has at least one instruction stored therein, and the at least one instruction is loaded and executed by the processor to implement the packet recovery method according to the second aspect.
In a ninth aspect, a computer-readable storage medium is provided, in which instructions are stored, and when executed, the method for recovering a data packet according to the first aspect is performed.
A tenth aspect provides a computer-readable storage medium having stored therein instructions that, when executed, perform the packet recovery method of the second aspect.
In an eleventh aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the packet recovery method according to the first aspect.
In a twelfth aspect, a computer program product is provided comprising instructions which, when run on a computer, cause the computer to perform the steps of the packet recovery method according to the second aspect.
The technical scheme provided by the application can at least bring the following beneficial effects:
after original data is sent, each original data packet in the sent original data packet group is pre-coded to obtain a first coded data packet group, and then forward error correction coding is carried out on the first coded data packet group to obtain a second coded data packet group. Finally, the second encoded data packet group is transmitted. The original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group can restore the original data packet of the original data packet group which is lost in the transmission process. Therefore, the original data packet lost in the transmission process can be recovered, and the data loss is avoided.
Drawings
Fig. 1 is a flowchart of a first packet recovery method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a precoding process provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a forward error correction coding process according to an embodiment of the present application;
fig. 4 is a schematic diagram of a format of an encoded information data block according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a format of a second encoded data packet according to an embodiment of the present application;
fig. 6 is a flowchart of a second data packet recovery method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a transmission sequence and a reception sequence of data packets according to an embodiment of the present application;
fig. 8 is a flowchart of a third data packet recovery method according to an embodiment of the present application;
fig. 9 is a schematic diagram of a first data transmission manner provided in an embodiment of the present application;
fig. 10 is a schematic diagram of a second data transmission manner provided by an embodiment of the present application;
fig. 11 is a schematic diagram of a third data transmission manner provided in the embodiment of the present application;
fig. 12 is a schematic diagram of a functional module in a first device according to an embodiment of the present disclosure;
fig. 13 is a schematic diagram of a functional module in a second device according to an embodiment of the present disclosure;
fig. 14 is a schematic structural diagram of a first packet recovery apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a second packet recovery apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a packet recovery system according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a third packet recovery apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a fourth packet recovery apparatus according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application in detail, application scenarios of the embodiments of the present application will be described.
In a unicast scenario or a multicast scenario, when one device transmits data to another device, UDP is often used for data transmission. Since UDP by itself does not provide a guaranteed mechanism for data transmission, UDP does not provide any detection or indication when a packet loss occurs during data transmission from a sender to a receiver. In this case, if a data packet is lost during data transmission, data loss on the receiving side may result. Therefore, the embodiment of the present application provides a data packet recovery method, which can recover a lost data packet.
Fig. 1 is a flowchart of a data packet recovery method according to an embodiment of the present application. Referring to fig. 1, the method includes:
step 101: and transmitting the original data packet.
It should be noted that the original data packet is a data packet containing original data, and the original data may be audio data, video data, and the like. When the data transmission protocols are different, the format of the original data packet may be different. For example, when the data transmission Protocol is RTP (Real-time Transport Protocol), the format of the original data packet may be as shown in fig. 2, and the original data packet may include RTP Header (RTP Header) and Payload (Payload), which is original data.
It should be noted that when an original packet is transmitted, the original packet may be transmitted every time an original packet is generated. Moreover, after each original data packet is sent, the original data packet may be stored in the cache, and then the original data packets in the cache may be grouped according to actual requirements. For example, when the original data packets include video data, an I frame in a video image may include a plurality of original data packets, and a P frame in a video image may include one or more original data packets, all the original data packets of one I frame that have been transmitted may be divided into a plurality of original data packet groups, and all the original data packets of a plurality of P frames that have been transmitted may be divided into one original data packet group. The packet sequence of all original data packets in each original data packet group is continuous, that is, one original data packet group includes a plurality of continuously transmitted original data packets.
Step 102: each original data packet in the transmitted original data packet group is precoded to obtain a first coded data packet group.
It should be noted that the pre-coding is to process the original data packet group to obtain the first encoded data packet group that can be used for forward error correction encoding. The number of bytes of each first encoded packet in the first encoded packet group is the same.
In addition, since the number of bytes of each of the plurality of data packets participating in forward error correction coding must be the same, in the embodiment of the present application, the first encoded data packet group with the same number of bytes is obtained by pre-encoding the original data packet group, which may facilitate the subsequent forward error correction coding of the first encoded data packet group.
Specifically, the operation of step 102 may be: determining a first byte number; adding a first data block at the tail end of any one original data packet in the original data packet group according to the first byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the first byte number; and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block to obtain a first coded data packet in the first coded data packet group, wherein the byte number of the second data block is the preset byte number.
It should be noted that the first byte number is greater than or equal to the maximum byte number in the byte numbers of each original data packet in the original data packet group. That is, the first byte number may be the maximum byte number in the byte numbers of each original data packet in the original data packet group, or may be any byte number greater than the maximum byte number in the byte numbers of each original data packet in the original data packet group.
In addition, the first data block is a data block for byte stuffing, which may not contain any meaningful information, and is added only to ensure that the number of bytes of the first encoded data packet group subsequently participating in forward error correction encoding is the same. At this time, a first data block is added at the end of an original data packet, that is, a data block with the number of bytes obtained by subtracting the number of bytes of the original data packet from the first number of bytes is added at the end of the original data packet. In this way, after the corresponding first data block is added to the end of each original data packet in the original data packet group, the number of bytes of each original data packet in the original data packet group to which the first data block is added is the same and is the first number of bytes.
Further, the second data block is a data block for determining the number of bytes of the first data block, and the second data block added to an original data packet contains the number of bytes of the first data block added to the original data packet. For example, when the number of bytes of the first data block added to an original data packet is 5, the data contained in the second data block added to the original data packet may be 5. Since the byte number of the second data block is the preset byte number, after the second data block is added to the preset position in each original data packet in the original data packet group to which the first data block is added, the obtained byte numbers of the first coded data packet group are the same and are the sum of the preset byte number and the first byte number.
Finally, the preset byte number can be preset, as long as the byte number of the preset byte number can be used for representing the byte number of the second data block. The preset position may also be preset, for example, the preset position may be the end of the original data packet after the first data block is added, or may be an intermediate position of the original data packet (for example, a position between the header and the payload of the original data packet), or may be the head end of the original data packet.
For example, as shown in fig. 2, a first data block may be added at the end of each original data packet in the original data packet group, and then a second data block with the preset number of bytes is added at the head of each original data packet in the original data packet group to obtain a first encoded data packet group, where the number of bytes of the first encoded data packet group is the same and is the sum of the preset number of bytes and the first number of bytes.
Step 103: forward error correction encoding is performed on the first encoded data packet set to obtain a second encoded data packet set.
It should be noted that the forward error correction coding refers to coding a data packet to obtain a redundant data packet. In the embodiment of the present application, forward error correction coding is performed on the first encoded data packet group to obtain a group of redundant data packets as the second encoded data packet group. For example, the Forward Error Correction coding may be RS (Reed-solomon) coding in FEC (Forward Error Correction), that is, RS-FEC coding, and may be RS-FEC coding based on cauchy matrix; of course, the forward error correction coding may also be other codes, and the embodiment of the present application does not limit this.
In addition, when forward error correction coding is performed, the k: and (5) configuring the redundancy ratio of m. That is, the k first encoded data packets may be forward error correction encoded to obtain m second encoded data packets. For example, as shown in fig. 3, when forward error correction coding is performed, the forward error correction coding may be performed according to the following scheme 4: 3, that is, the first encoded Data packet group may include four first encoded Data packets, and RS-FEC encoding may be performed on the four first encoded Data packets to obtain three RS Data (redundant Data packets) as the second encoded Data packet group.
After the second encoded data packet group is obtained, the number of bytes of each second encoded data packet in the second encoded data packet group is also the same, and the number of bytes of any second encoded data packet in the second encoded data packet group is the same as the number of bytes of any first encoded data packet in the first encoded data packet group.
The operation of performing forward error correction coding on the first encoded data packet group to obtain the second encoded data packet group is similar to the operation of performing forward error correction coding on a plurality of data packets to obtain a plurality of redundant data packets in the related art, which is not described in detail in this embodiment of the present application.
It should be noted that the second encoded data packet group corresponds to the original data packet group, and the second encoded data packet group is used to implement loss protection on the original data packet group, that is, the second encoded data packet group is used to recover the original data packet lost by the original data packet group in the transmission process.
Step 104: and transmitting the second encoded data packet group.
It should be noted that the original data packet of the original data packet group that is not lost during transmission and the second encoded data packet group are used to recover the original data packet of the original data packet group that is lost during transmission.
Further, before step 104, in order to facilitate the recovery of the lost original data packet according to the second encoded data packet, for any one second encoded data packet in the second encoded data packet group, the encoding information data block may be added to the one second encoded data packet.
It should be noted that, as shown in fig. 4, the coding information data block added to the one second coded data packet may include position information of the one second coded data packet in the second coded data packet group, a packet order of the first original data packet in the original data packet group, a number of data packets in the original data packet group, and a number of data packets in the second coded data packet group. In this way, the original data packet group that can be used for restoration of the second encoded data packet can be determined according to the packet sequence of the first original data packet in the original data packet group and the number of data packets of the original data packet group included in the encoding information data block in the second encoded data packet, and forward error correction decoding can be performed on the second encoded data packet according to the position information of the second encoded data packet in the second encoded data packet group and the number of data packets of the second encoded data packet group.
Further, the format of the second encoded data packet may be different when the data transmission protocols are different. For example, when the data transmission protocol is RTP, an RTP Header may be added to the second encoded packet before sending the second encoded packet.
For example, as shown in fig. 5, before the second coded packet group is transmitted, an EI (encoding information) data block may be added to the head end of each second coded packet in the second coded packet group, and then an RTP Header may be added to each second coded packet in the second coded packet group.
It should be noted that, when the original data packet and the second encoded data packet are transmitted, the original data packet and the second encoded data packet may be transmitted through the same port; alternatively, the original data packet and the second encoded data packet may be transmitted through different ports, respectively.
In this embodiment of the present application, after original data is sent, each original data packet in an original data packet group that has been sent is precoded to obtain a first encoded data packet group, and then forward error correction coding is performed on the first encoded data packet group to obtain a second encoded data packet group. Finally, the second encoded data packet group is transmitted. The original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group can restore the original data packet of the original data packet group which is lost in the transmission process. Therefore, the original data packet lost in the transmission process can be recovered, and the data loss is avoided.
Fig. 6 is a flowchart of a data packet recovery method according to an embodiment of the present application. Referring to fig. 6, the method includes:
step 601: an original data packet and a second encoded data packet are received.
It should be noted that the order of receiving the original data packet and the second encoded data packet does not necessarily coincide with the order of transmitting the original data packet and the second encoded data packet. For example, as shown in fig. 7, D1 and D2 are original packets, D1 and D2 belong to two different original packet groups, R1 and R2 are second encoded packets, R1 and R2 belong to two different second encoded packet groups, one group of D1 corresponds to one group of R1, and one group of D2 corresponds to one group of R2. A set of D1 may be sent first, a set of R1, then a set of D2, and finally a set of R2. Later, cross-ordering may occur at reception, i.e., R1 is received when a group of D1 has not been completely received; alternatively, cross-group misordering may occur upon reception, i.e., either D2 or R2 is received when a group of D1 and a group of R1 have not been completely received.
In this case, when the original data packet and the second encoded data packet are received, the original data packet and the second encoded data packet need to be sorted first. Specifically, when the original data packet and the second encoded data packet are received, the received original data packet may be inserted into the first buffer according to the packet order thereof, and the received second encoded data packet may be inserted into the second buffer according to the packet order thereof. For example, when an original data packet and a second encoded data packet are received through the same port, whether the data packet is the original data packet or the second encoded data packet may be determined according to the type of the data packet carried in the packet header of the received data packet, and after the determination, the original data packet may be inserted into the first buffer according to the packet order thereof, and the second encoded data packet may be inserted into the second buffer according to the packet order thereof; when the original data packet is received through the first port and the second encoded data packet is received through the second port, the data packet received through the first port may be directly inserted into the first buffer according to the packet order thereof, and the data packet received through the second port may be directly inserted into the second buffer according to the packet order thereof.
In addition, in order to avoid the data output delay from being too high, when the number of the original data packets stored in the first buffer memory reaches a certain number, the original data packet with the smallest packet order stored in the first buffer memory may be output. Meanwhile, in order to avoid the overlarge data storage pressure, when the number of the second encoded data packets stored in the second cache reaches a certain number, the second encoded data packets with the minimum packet order stored in the second cache can be cleared.
In the process of sequencing the received original data packets, when the packet sequence of the received original data packets is found to be discontinuous, it may be determined that the original data packets are lost, and at this time, the original data packets whose packet sequence is located behind the packet sequence of the lost original data packets may be stored in the third cache. And after the lost original data packet is subsequently recovered, uniformly outputting or storing the recovered original data packet and the original data packet in the third cache. In addition, in order to avoid the data output delay from being too high, the waiting time of the original data packet stored in the third buffer memory may be limited, that is, if the lost original data packet is not recovered after a certain time, the original data packet stored in the third buffer memory may be directly output or stored.
Step 602: the plurality of second encoded data packets are obtained from the received second encoded data packets, and the plurality of original data packets are obtained from the received original data packets.
It should be noted that the second encoded data packet group to which the plurality of second encoded data packets belong corresponds to the original data packet group to which the plurality of original data packets belong. The second encoded data packet group is obtained by performing forward error correction encoding on the first encoded data packet group, the first encoded data packet group is obtained by performing pre-encoding on each original data packet in the original data packet group, and the byte number of each first encoded data packet in the first encoded data packet group is the same.
In this case, the plurality of second encoded data packets belong to a second encoded data packet group, the plurality of original data packets belong to an original data packet group, and the second encoded data packet group corresponds to the original data packet group, and the second encoded data packet group is used to implement loss protection for the original data packet group. That is, according to the second encoded data packet in the second encoded data packet group and the original data packet in the original data packet group, the original data packet lost in the transmission process of the original data packet group can be recovered.
It should be noted that the second encoded data packet may include the encoded information data block, a target packet sequence included in the encoded information data block in the second encoded data packet is a packet sequence of a first original data packet in the corresponding original data packet group, and the number of target data packets included in the encoded information data block in the second encoded data packet is the number of data packets of the corresponding original data packet group.
Specifically, the operation of step 602 may be: determining that a plurality of second encoding data packets containing the same target packet sequence in the received second encoding data packets belong to a second encoding data packet group; determining a target packet sequence range according to a target packet sequence and the number of target data packets contained in any one of the plurality of second encoded data packets; and determining that a plurality of original data packets of which the packet sequence is in the range of the target packet sequence in the received original data packets belong to an original data packet group corresponding to the second coded data packet group.
When determining the target packet order range according to the target packet order and the number of target data packets included in the second encoded data packet, the target packet order may be set as a first packet order, a value obtained by adding the target packet order to the number of target data packets may be set as a second packet order, and a packet order range that is greater than or equal to the first packet order and less than or equal to the second packet order may be determined as the target packet order range.
When the target packet sequence contained in each of the second encoded data packets in the plurality of second encoded data packets is the same, it indicates that the plurality of second encoded data packets all correspond to the same original data packet group, so that it can be determined that the plurality of second encoded data packets belong to one second encoded data packet group. Furthermore, since the target packet sequence included in the encoded information data block in the second encoded data packet is the packet sequence of the first original data packet in the original data packet group, and the number of the target data packets included is the number of data packets of the original data packet group, the packet sequence range (i.e., the target packet sequence range) of the original data packet group can be determined based on the target packet sequence and the number of the target data packets included in the encoded information data block in the second encoded data packet. And all the received original data packets with the packet sequence within the range of the target packet sequence belong to the original data packet group.
Step 603: when the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the original data packet group in the transmission process.
It should be noted that, since the packet sequence of all the original data packets in the original data packet group is continuous, and the original data packets belong to the original data packet group, when the packet sequence of the original data packets is discontinuous, it can be determined that the original data packets are lost in the transmission process of the original data packet group. At this point, subsequent recovery operations for the original packet may be performed.
Step 604: and judging whether the plurality of second coded data packets and the plurality of original data packets meet preset conditions.
The number of the plurality of second encoded packets is the number of received second encoded packets in the second encoded packet group to which the plurality of second encoded packets belongs. The number of the original data packets is the number of the received original data packets in the original data packet group to which the original data packets belong.
In addition, a preset condition may be set in advance, and the preset condition is a condition to be satisfied when forward error correction decoding is performed. Whether the original data packet group can be recovered by using the plurality of second coded data packets and the plurality of original data packets can be determined through judgment of preset conditions. That is, the original data packet group can be recovered only when the plurality of second encoded data packets and the plurality of original data packets satisfy a predetermined condition, otherwise, the original data packet group cannot be recovered. For example, the preset condition may be that the number of original data packets lost in the transmission process of the original data packet group is less than or equal to the number of received second encoded data packets in the corresponding second encoded data packet group.
Specifically, the operation of step 604 may be: acquiring the number of target data packets contained in any one second encoding data packet in the plurality of second encoding data packets; subtracting the number of the original data packets from the number of the obtained target data packets to obtain the number of lost data packets; when the number of the lost data packets is smaller than the number of the second coding data packets, determining that the second coding data packets and the original data packets meet preset conditions; and when the number of the lost data packets is greater than or equal to the number of the second coding data packets, determining that the second coding data packets and the original data packets do not meet the preset condition.
It should be noted that, since the number of target data packets included in the coding information data block in any one of the second encoded data packets is the number of data packets of the corresponding original data packet group, the number of original data packets lost in the transmission process of the original data packet group (i.e., the number of lost data packets) can be obtained by subtracting the number of the plurality of original data packets from the number of target data packets.
When the plurality of second encoded data packets and the plurality of original data packets satisfy the predetermined condition, the following step 605 may be continuously performed to recover the lost original data packets. When the plurality of second encoded data packets and the plurality of original data packets do not satisfy the preset condition, the lost original data packet cannot be recovered, and at this time, the second encoded data packets and the original data packet need to be continuously received, and then the step 602 is returned to continuously obtain the plurality of second encoded data packets belonging to the same second encoded data packet group and the plurality of original data packets belonging to the same original data packet group.
Step 605: and when the plurality of second coding data packets and the plurality of original data packets meet the preset conditions, recovering the original data packets lost in the transmission process of the original data packet group according to the plurality of second coding data packets and the plurality of original data packets.
The second encoded packet includes the encoded information block, and the encoded information block in the second encoded packet includes the position information of the second encoded packet group to which the second encoded packet belongs and the number of packets of the second encoded packet group to which the second encoded packet belongs.
Wherein, according to the plurality of second encoded data packets and the plurality of original data packets, the operation of recovering the original data packets lost in the transmission process of the original data packet group may include the following steps (1) - (5):
(1) acquiring the number of data packets of a second encoded data packet group contained in any one of the second encoded data packets, and acquiring the position information of each second encoded data packet in the second encoded data packet group contained in each second encoded data packet in the second encoded data packets.
(2) Removing the coded information data block in each of the plurality of second coded data packets; and taking the byte number of any one of the second coded data packets without the coded information data block as a second byte number, wherein the second byte number is the byte number of each first coded data packet in the first coded data packet group.
It should be noted that, when removing the coding information data block in each of the plurality of second coded data packets, if the second coded data packet further includes a header, the header of each of the plurality of second coded data packets may be removed at the same time as removing the coding information data block.
In addition, after the forward error correction coding is carried out on the first coded data packet group, a group of second coded data packets which do not contain the coding information data blocks can be obtained, and the byte number of the first coded data packets is the same as the byte number of the second coded data packets which do not contain the coding information data blocks. Therefore, the byte number of any one of the second encoded data packets after the encoded information data block is removed is the byte number of the first encoded data packet (i.e., the second byte number).
(3) And pre-coding each original data packet in the plurality of original data packets according to the second byte number to obtain a plurality of first coded data packets belonging to the first coded data packet group.
It should be noted that, since the second byte number is the byte number of each first encoded data packet in the first encoded data packet group, and the multiple original data packets belong to the original data packet group, each original data packet in the multiple original data packets may be precoded according to the second byte number, so as to obtain the multiple first encoded data packets in the first encoded data packet group.
Specifically, for any one of the original data packets, a first data block may be added to the end of the one original data packet according to the second byte number, where the byte number of the first data block is obtained by subtracting the byte number of the one original data packet from the second byte number and subtracting a preset byte number; and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block to obtain a first coded data packet belonging to the first coded data packet group, wherein the byte number of the second data block is the preset byte number.
It should be noted that the second byte number minus the preset byte number is the first byte number, and the first byte number is the sum of the byte number of the original data packet and the byte number of the first data block to be added.
In addition, the first data block is a data block for byte stuffing, which may not contain any meaningful information therein. After a corresponding first data block is added at the end of each original data packet in the plurality of original data packets, the number of bytes of each original data packet in the plurality of original data packets after the first data block is added is the same and is the first number of bytes.
Furthermore, the second data block added to an original data packet contains the number of bytes of the first data block added to the original data packet. Since the byte number of the second data block is the preset byte number, after the second data block is added at the preset position in each original data packet in the plurality of original data packets added with the first data block, a plurality of first coded data packets of which the byte numbers are the sum of the preset byte number and the first byte number can be obtained.
(4) And according to the position information of each second encoding data packet in the plurality of second encoding data packets in the second encoding data packet group and the number of data packets of the second encoding data packet group, carrying out forward error correction decoding on the plurality of first encoding data packets and the plurality of second encoding data packets with the encoding information data blocks removed to obtain a first encoding data packet group.
Since the first encoded data packet group is forward error correction encoded to obtain a group of second encoded data packets not including the encoded information block, the first encoded data packet group can be obtained by performing forward error correction decoding on the plurality of first encoded data packets and the plurality of second encoded data packets from which the encoded information block is removed.
In addition, the operation of performing forward error correction decoding on the plurality of first encoded data packets and the plurality of second encoded data packets after removing the encoded information data blocks to obtain the first encoded data packet group is similar to the operation of performing forward error correction decoding on the plurality of data packets in a group of data packets and the plurality of redundant data packets in a group of redundant data packets to obtain the group of data packets in the related art, which is not described in detail in this embodiment of the present application.
(5) Each first encoded packet in the first set of encoded packets is predecoded to obtain an original set of packets.
It should be noted that, since each original data packet in the original data packet group is pre-encoded to obtain the first encoded data packet group, the original data packet group can be obtained after each first encoded data packet in the first encoded data packet group is pre-decoded. In this way, recovery of the original data packets lost during transmission of the original data packet group is accomplished.
Specifically, for any one first encoded packet in the first encoded packet group, the first data block may be removed from the end of the one first encoded packet according to the number of bytes contained in the second data block at the preset position in the one first encoded packet; and removing the second data block from the preset position in the first coded data packet after the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
It should be noted that, according to the number of bytes contained in the second data block at the preset position in the first encoded data packet, the first data block is removed from the end of the first encoded data packet, that is, the byte of the number of bytes is removed from the end of the first encoded data packet, so that the removal of the first data block can be realized.
In addition, according to the preset byte number, the second data block is removed from the preset position in the first coded data packet after the first data block is removed, namely, the byte with the preset byte number is removed from the preset position in the first coded data packet after the first data block is removed, so that the removal of the second data block can be realized.
In this embodiment, after receiving the original data packet and the second encoded data packet, a plurality of second encoded data packets may be obtained from the received second encoded data packet, and a plurality of original data packets may be obtained from the received original data packet, where a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong. When the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the original data packet group in the transmission process. And when the plurality of second coding data packets and the plurality of original data packets meet the preset conditions, recovering the original data packets lost in the transmission process of the original data packet group according to the plurality of second coding data packets and the plurality of original data packets. Therefore, the original data packet lost in the transmission process can be recovered, and the data loss is avoided.
Fig. 8 is a flowchart of a data packet recovery method according to an embodiment of the present application. Referring to fig. 8, the method includes:
step 801: the first device sends the original data packet to the second device.
It should be noted that the first device is a data sending end, and the second device is a data receiving end. In a unicast scenario, a first device may send data to one second device, and in a multicast scenario, the first device may send data to multiple second devices.
When the first device transmits data, different data may be transmitted through different ports, or different data may be transmitted through the same port. When receiving data, the second device may receive different data through different ports, or may receive different data through the same port. For example, as shown in fig. 9, a first device may send different data to a second device through the same port, and the second device may receive the different data sent by the first device through the same port; alternatively, as shown in fig. 10, the first device may send different data to the second device through different ports, and the second device may receive the different data sent by the first device through the same port; alternatively, as shown in fig. 11, the first device may send different data to the second device through different ports, and the second device may receive the different data sent by the first device through different ports.
In addition, the operation of step 801 is the same as the operation of step 101, and the description of the embodiment of the present application is omitted here.
Step 802: the first device precodes each original data packet in the transmitted original data packet group to obtain a first encoded data packet group.
It should be noted that the operation of step 802 is the same as the operation of step 102, and the description of the embodiment of the present application is omitted here.
Step 803: the first device forward error correction encodes the first set of encoded data packets to obtain a second set of encoded data packets.
It should be noted that the operation of step 803 is the same as the operation of step 103, and the description of the embodiment of the present application is omitted here.
Step 804: the first device transmits the second encoded data packet group to the second device.
It should be noted that the operation of step 804 is the same as the operation of step 104, and the description of the embodiment of the present application is omitted here.
It should be noted that, when the first device sends the original data packet and the second encoded data packet to the second device, the first device may send the original data packet and the second encoded data packet to the second device through the same port, and at this time, the second device may receive the original data packet and the second encoded data packet sent by the first device through the same port; or, the first device may send the original data packet and the second encoded data packet to the second device through different ports, where the second device may receive the original data packet and the second encoded data packet sent by the first device through the same port, or the second device may receive the original data packet and the second encoded data packet sent by the first device through different ports.
When the second device receives the original data packet in the original data packet group and the second encoded data packet in the second encoded data packet group, the second device may recover the original data packet lost in the transmission process of the original data packet group, which may specifically be implemented by the following steps 805 to 809.
Step 805: the second device receives the original data packet and the second coded data packet sent by the first device.
It should be noted that the operation of step 805 is the same as the operation of step 601, and the description of the embodiment of the present application is omitted here.
Step 806: the second device obtains a plurality of second encoded data packets from the received second encoded data packets, and obtains a plurality of original data packets from the received original data packets.
It should be noted that the operation of step 806 is the same as the operation of step 602, and details of this embodiment are not described herein.
Step 807: and the second device determines that the original data packet group loses the original data packet in the transmission process when the packet sequence of the plurality of original data packets is discontinuous.
It should be noted that the operation in step 807 is the same as the operation in step 603, and the description of the embodiments of the present application is omitted here.
Step 808: the second device determines whether the plurality of second encoded data packets and the plurality of original data packets satisfy a predetermined condition.
It should be noted that the operation of step 808 is the same as the operation of step 604, and the description of the embodiments of the present application is omitted here.
Step 809: and when the plurality of second coding data packets and the plurality of original data packets meet the preset conditions, the second device recovers the original data packets lost in the transmission process of the original data packet group according to the plurality of second coding data packets and the plurality of original data packets.
It should be noted that the operation of step 809 is the same as the operation of step 605, and details of the embodiment of the present application are not described herein.
For ease of understanding, the above-described packet recovery method is exemplified below with reference to fig. 12 and 13.
Referring to fig. 12, the first device may include an original packet packaging module, an original packet transmitting module, an original packet grouping module, an original packet pre-coding module, a forward error correction coding module, a second coded packet packaging module, and a second coded packet transmitting module, and the operations on the first device may include the following steps (1) to (7):
(1) the original data packet packaging module adds an RTP Header to original data to obtain an original data packet;
(2) the original data packet sending module sends the original data packet to the second device;
(3) the original data packet grouping module sends the sent original data packets into a cache and performs grouping;
(4) the original data packet pre-coding module pre-codes an original data packet group stored in the cache to obtain a first coded data packet group;
(5) the forward error correction coding module carries out forward error correction coding on the first coding data packet group to obtain a second coding data packet group;
(6) the second coding data packet packaging module adds an RTP Header and a coding information data block to each second coding data packet in the second coding data packet group;
(7) and the second coding data packet sending module sends the second coding data packet group to the second equipment.
Referring to fig. 13, the second device may include a receiving module, a buffering module, a protection relationship mapping module, a recovery packet module, a forward error correction decoding module, and a recovery data output module, and the operations on the second device may include the following steps (1) to (6):
(1) the receiving module receives an original data packet and a second coded data packet sent by first equipment;
(2) the cache module inserts the received original data packet into a first cache and inserts the received second coded data packet into a second cache;
(3) the protection relation mapping module acquires a plurality of second coded data packets from the received second coded data packets and acquires a plurality of original data packets from the received original data packets;
(4) when the packet sequence of the plurality of original data packets is discontinuous, the recovery grouping module determines that the original data packets are lost in the transmission process of the original data packet group, and then judges whether the plurality of second coded data packets and the plurality of original data packets meet preset conditions or not;
(5) when the plurality of second coded data packets and the plurality of original data packets meet preset conditions, the forward error correction decoding module performs forward error correction decoding according to the plurality of second coded data packets and the plurality of original data packets to obtain an original data packet group so as to recover original data packets lost in the transmission process of the original data packet group;
(6) and the recovery data output module outputs the original data packet group.
In this embodiment, after the first device sends the original data packet to the second device, the first device performs pre-coding on each original data packet in the sent original data packet group to obtain a first encoded data packet group, and then performs forward error correction coding on the first encoded data packet group to obtain a second encoded data packet group. Finally, the first device sends the second encoded data packet group to the second device. After receiving the original data packet and the second encoded data packet sent by the first device, the second device may obtain a plurality of second encoded data packets from the received second encoded data packet, and obtain a plurality of original data packets from the received original data packet. And when the plurality of second coded data packets and the plurality of original data packets meet preset conditions, recovering the lost original data packets in the original data packet group according to the plurality of second coded data packets and the plurality of original data packets. Therefore, the original data packet lost in the transmission process can be recovered in the second device, and the data loss of the second device is avoided.
Fig. 14 is a schematic structural diagram of a packet recovery apparatus according to an embodiment of the present application. Referring to fig. 14, the apparatus includes:
a first sending module 1401 for sending an original data packet;
a first encoding module 1402, configured to precode each original data packet in the sent original data packet group to obtain a first encoded data packet group, where byte numbers of each first encoded data packet in the first encoded data packet group are the same;
a second encoding module 1403, configured to perform forward error correction encoding on the first encoded data packet group to obtain a second encoded data packet group;
a second sending module 1404, configured to send a second encoded data packet group, where an original data packet of the original data packet group that is not lost in the transmission process and the second encoded data packet group are used to recover an original data packet of the original data packet group that is lost in the transmission process.
Optionally, the first encoding module 1402 comprises:
the determining unit is used for determining a first byte number, wherein the first byte number is larger than or equal to the maximum byte number in the byte numbers of each original data packet in the original data packet group;
a first adding unit, configured to add, to any one original data packet in the original data packet group, a first data block at an end of the one original data packet according to a first number of bytes, where the number of bytes of the first data block is obtained by subtracting the number of bytes of the one original data packet from the first number of bytes;
and the second adding unit is used for adding a second data block at a preset position in an original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first coded data packet in the first coded data packet group, wherein the byte number of the second data block is a preset byte number, and the second data block comprises the byte number of the first data block.
Optionally, the predetermined location of an original data packet is a head end of an original data packet.
Optionally, when the I frame in the video image includes a plurality of original data packets, and the P frame in the video image includes one or more original data packets, the apparatus further includes:
the dividing module is used for dividing all original data packets of one sent I frame into a plurality of original data packet groups, dividing all original data packets of a plurality of sent P frames into one original data packet group, and enabling the packet sequence of all original data packets in each original data packet group to be continuous.
Optionally, the apparatus further comprises:
the adding module is used for adding the coding information data block in one second coding data packet for any one second coding data packet in the second coding data packet group;
the coding information data block comprises position information of a second coding data packet in a second coding data packet group, a packet sequence of a first original data packet in an original data packet group, the number of data packets in the original data packet group and the number of data packets in the second coding data packet group.
Optionally, the forward error correction coding is a Cauchy matrix based RS-FEC coding.
In this embodiment of the present application, after original data is sent, each original data packet in an original data packet group that has been sent is precoded to obtain a first encoded data packet group, and then forward error correction coding is performed on the first encoded data packet group to obtain a second encoded data packet group. Finally, the second encoded data packet group is transmitted. The original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group can restore the original data packet of the original data packet group which is lost in the transmission process. Therefore, the original data packet lost in the transmission process can be recovered, and the data loss is avoided.
Fig. 15 is a schematic structural diagram of a packet recovery apparatus according to an embodiment of the present application. Referring to fig. 15, the apparatus includes:
a receiving module 1501, configured to receive an original data packet and a second encoded data packet;
a first obtaining module 1502, configured to obtain a plurality of second encoded data packets from a received second encoded data packet, and obtain a plurality of original data packets from a received original data packet, where a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong, the second encoded data packet group is obtained by performing forward error correction coding on a first encoded data packet group, the first encoded data packet group is obtained by performing precoding on each original data packet in the original data packet group, and the number of bytes of each first encoded data packet in the first encoded data packet group is the same;
a first determining module 1503, configured to determine that an original data packet group loses an original data packet in a transmission process when packet orders of a plurality of original data packets are discontinuous;
a recovering module 1504, configured to recover, when the plurality of second encoded data packets and the plurality of original data packets satisfy a preset condition, an original data packet of the original data packet group that is lost in the transmission process according to the plurality of second encoded data packets and the plurality of original data packets.
Optionally, the second encoded data packet includes an encoded information data block, a target packet sequence included in the encoded information data block in the second encoded data packet is a packet sequence of a first original data packet in a corresponding original data packet group, and a number of target data packets included in the encoded information data block in the second encoded data packet is a number of data packets of the corresponding original data packet group, where the first obtaining module 1502 includes:
a first determining unit, configured to determine that a plurality of second encoded data packets containing the same target packet order in the received second encoded data packet belong to a second encoded data packet group;
a second determining unit configured to determine a target packet order range from a target packet order and a target packet number included in any one of the plurality of second encoded packets;
and a third determining unit, configured to determine that a plurality of original data packets, of which packet order is within the target packet order range, in the received original data packet belong to an original data packet group corresponding to a second encoded data packet group.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the number of target data packets contained in any one second encoding data packet in the plurality of second encoding data packets;
the calculation module is used for subtracting the number of the plurality of original data packets from the number of the obtained target data packets to obtain the number of the lost data packets;
and the second determining module is used for determining that the plurality of second encoding data packets and the plurality of original data packets meet the preset condition when the number of the lost data packets is less than the number of the plurality of second encoding data packets.
Optionally, the second encoded data packet includes an encoded information data block, where the encoded information data block in the second encoded data packet includes position information of itself in the second encoded data packet group to which the encoded information data block belongs and the number of data packets of the second encoded data packet group to which the encoded information data block belongs, and the recovering module 1504 includes:
the acquiring unit is used for acquiring the number of data packets of a second encoding data packet group contained in any one of the second encoding data packets and acquiring the position information of each second encoding data packet contained in each second encoding data packet in the second encoding data packet group;
a removal unit configured to remove the encoded information data block in each of the plurality of second encoded packets;
a fourth determining unit, configured to use the number of bytes of any one of the plurality of second encoded packets from which the encoded information data block is removed as a second number of bytes, where the second number of bytes is the number of bytes of each first encoded packet in the first encoded packet group;
the encoding unit is used for pre-encoding each original data packet in the plurality of original data packets according to the second byte number to obtain a plurality of first encoded data packets belonging to the first encoded data packet group;
a first decoding unit, configured to perform forward error correction decoding on the plurality of first encoded data packets and the plurality of second encoded data packets from which the encoded information data blocks are removed according to position information of each of the plurality of second encoded data packets in the second encoded data packet group and the number of data packets of the second encoded data packet group, so as to obtain a first encoded data packet group;
and the second decoding unit is used for predecoding each first coded data packet in the first coded data packet group to obtain an original data packet group.
Optionally, the encoding unit is configured to:
for any original data packet in the plurality of original data packets, adding a first data block at the tail end of the original data packet according to the second byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the second byte number and subtracting a preset byte number;
and adding a second data block at a preset position in an original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first coded data packet belonging to the first coded data packet group, wherein the byte number of the second data block is a preset byte number, and the second data block comprises the byte number of the first data block.
Optionally, the second decoding unit is configured to:
removing a first data block from the end of a first encoded packet in response to the number of bytes contained in a second data block at a predetermined position in the first encoded packet for any one of the first encoded packet groups;
and removing the second data block from a preset position in a first coded data packet after the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
In this embodiment, after receiving the original data packet and the second encoded data packet, a plurality of second encoded data packets may be obtained from the received second encoded data packet, and a plurality of original data packets may be obtained from the received original data packet, where a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong. When the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the original data packet group in the transmission process. And when the plurality of second coding data packets and the plurality of original data packets meet the preset conditions, recovering the original data packets lost in the transmission process of the original data packet group according to the plurality of second coding data packets and the plurality of original data packets. Therefore, the original data packet lost in the transmission process can be recovered, and the data loss is avoided.
Fig. 16 is a schematic structural diagram of a packet recovery system according to an embodiment of the present application. Referring to fig. 16, the system includes: a first device 1601 and a second device 1602.
The first device 1601 is configured to perform the packet recovery method provided in the embodiment of fig. 1, and the second device 1602 is configured to perform the packet recovery method provided in the embodiment of fig. 6.
In this embodiment, after the first device sends the original data packet to the second device, the first device performs pre-coding on each original data packet in the sent original data packet group to obtain a first encoded data packet group, and then performs forward error correction coding on the first encoded data packet group to obtain a second encoded data packet group. Finally, the first device sends the second encoded data packet group to the second device. After receiving the original data packet and the second encoded data packet sent by the first device, the second device may obtain a plurality of second encoded data packets from the received second encoded data packet, and obtain a plurality of original data packets from the received original data packet. And when the plurality of second coded data packets and the plurality of original data packets meet preset conditions, recovering the lost original data packets in the original data packet group according to the plurality of second coded data packets and the plurality of original data packets. Therefore, the original data packet lost in the transmission process can be recovered in the second device, and the data loss of the second device is avoided.
Fig. 17 is a schematic structural diagram of a packet recovery apparatus according to an embodiment of the present application, where the apparatus may be applied to a first device. Referring to fig. 17, the apparatus may be a terminal 1700, and the terminal 1700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1700 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
In general, terminal 1700 includes: a processor 1701 and a memory 1702.
The processor 1701 may include one or more processing cores, such as 4-core processors, 8-core processors, and the like. The processor 1701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1701 may also include a main processor, which is a processor for Processing data in an awake state, also called a Central Processing Unit (CPU), and a coprocessor; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory 1702 may include one or more computer-readable storage media, which may be non-transitory. The memory 1702 may also include high speed random access memory as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1702 is used to store at least one instruction for execution by the processor 1701 to implement the packet recovery method provided by the embodiment of FIG. 1.
In some embodiments, terminal 1700 may also optionally include: a peripheral interface 1703 and at least one peripheral. The processor 1701, memory 1702 and peripheral interface 1703 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 1703 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 17017, touch display screen 1705, camera 1706, audio circuitry 1707, positioning components 1708, and power source 1709.
The peripheral interface 1703 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1701 and the memory 1702. In some embodiments, the processor 1701, memory 1702, and peripheral interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 1701, the memory 1702, and the peripheral interface 1703 may be implemented on separate chips or circuit boards, which are not limited in this application.
The Radio Frequency circuit 1704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1704 communicates with a communication network and other communication devices via electromagnetic signals. The rf circuit 1704 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, etc. The radio frequency circuit 1704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1704 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1705 is a touch display screen, the display screen 1705 also has the ability to capture touch signals on or above the surface of the display screen 1705. The touch signal may be input as a control signal to the processor 1701 for processing. At this point, the display 1705 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1705 may be one, disposed on a front panel of terminal 1700; in other embodiments, display 1705 may be at least two, each disposed on a different surface of terminal 1700 or in a folded design; in still other embodiments, display 1705 may be a flexible display disposed on a curved surface or a folded surface of terminal 1700. Even further, the display screen 1705 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1705 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 1706 is used to capture images or video. Optionally, camera assembly 1706 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1706 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1707 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, inputting the electric signals to the processor 1701 for processing, or inputting the electric signals to the radio frequency circuit 17017 for realizing voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1707 may also include a headphone jack.
The positioning component 1708 is used to locate the current geographic Location of the terminal 1700 to implement navigation or LBS (Location Based Service). The Positioning component 1708 may be a Positioning component based on a GPS (Global Positioning System) in the united states, a beidou System in china, a greiner System in russia, or a galileo System in the european union.
Power supply 1709 is used to power the various components in terminal 1700. The power supply 1709 may be ac, dc, disposable or rechargeable. When power supply 1709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1700 also includes one or more sensors 1710. The one or more sensors 1710 include, but are not limited to: acceleration sensor 1711, gyro sensor 1712, pressure sensor 1713, fingerprint sensor 1714, optical sensor 1715, and proximity sensor 1716.
The acceleration sensor 1711 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established with the terminal 1700. For example, the acceleration sensor 1711 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1701 may control the touch display screen 1705 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1711. The acceleration sensor 1711 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1712 may detect a body direction and a rotation angle of the terminal 1700, and the gyro sensor 1712 may cooperate with the acceleration sensor 1711 to acquire a 3D motion of the user on the terminal 1700. The processor 1701 may perform the following functions based on the data collected by the gyro sensor 1712: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 1713 may be disposed on the side frames of terminal 1700 and/or underlying touch display 1705. When the pressure sensor 1713 is disposed on the side frame of the terminal 1700, the user's grip signal to the terminal 1700 can be detected, and the processor 1701 performs left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 1713. When the pressure sensor 1713 is disposed at the lower layer of the touch display screen 1705, the processor 1701 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1705. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1714 is configured to capture a fingerprint of the user, and the processor 1701 is configured to identify the user based on the fingerprint captured by the fingerprint sensor 1714, or the fingerprint sensor 1714 is configured to identify the user based on the captured fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1701 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1714 may be disposed on the front, back, or side of terminal 1700. When a physical key or vendor Logo is provided on terminal 1700, fingerprint sensor 1714 may be integrated with the physical key or vendor Logo.
The optical sensor 1715 is used to collect the ambient light intensity. In one embodiment, the processor 1701 may control the display brightness of the touch display screen 1705 based on the ambient light intensity collected by the optical sensor 1715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1705 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1705 is turned down. In another embodiment, the processor 1701 may also dynamically adjust the shooting parameters of the camera assembly 1706 according to the ambient light intensity collected by the optical sensor 1715.
Proximity sensor 1716, also known as a distance sensor, is typically located on the front panel of terminal 1700. Proximity sensor 1716 is used to gather the distance between the user and the front face of terminal 1700. In one embodiment, when proximity sensor 1716 detects that the distance between the user and the front surface of terminal 1700 is gradually reduced, processor 1701 controls touch display 1705 to switch from a bright screen state to a dark screen state; when proximity sensor 1716 detects that the distance between the user and the front surface of terminal 1700 is gradually increased, processor 1701 controls touch display 1705 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 17 is not intended to be limiting of terminal 400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 18 is a schematic structural diagram of a packet recovery apparatus according to an embodiment of the present invention, where the apparatus may be applied to a second device. Referring to fig. 18, the apparatus may be a terminal 1800, and the terminal 1800 may be: a smartphone, a tablet, an MP3 player, an MP4 player, a laptop, or a desktop computer. The terminal 1800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
Generally, the terminal 1800 includes: a processor 1801 and a memory 1802.
The processor 1801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1801 may be implemented in at least one hardware form of DSP, FPGA, or PLA. The processor 1801 may also include a main processor and a coprocessor, where the main processor is a processor, also called a CPU, for processing data in an awake state; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1801 may be integrated with a GPU, which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1801 may further include an AI processor to process computing operations related to machine learning.
Memory 1802 may include one or more computer-readable storage media, which may be non-transitory. Memory 1802 may also include high speed random access memory as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1802 is configured to store at least one instruction for execution by the processor 1801 to implement the packet recovery method provided by the embodiment of fig. 6.
In some embodiments, the terminal 1800 may further optionally include: a peripheral interface 1803 and at least one peripheral. The processor 1801, memory 1802, and peripheral interface 1803 may be connected by a bus or signal line. Each peripheral device may be connected to the peripheral device interface 1803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1804, touch screen display 1805, camera 1806, audio circuitry 1807, positioning components 1808, and power supply 1809.
Peripheral interface 1803 may be used to connect at least one peripheral associated with I/O to processor 1801 and memory 1802. In some embodiments, the processor 1801, memory 1802, and peripheral interface 1803 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 1801, the memory 1802, and the peripheral device interface 1803 may be implemented on separate chips or circuit boards, which are not limited in this application.
The radio frequency circuitry 1804 is used for receiving and transmitting RF signals, also called electromagnetic signals. The radio frequency circuitry 1804 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 1804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuitry 1804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, etc. The radio frequency circuitry 1804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 18G, and 5G), wireless local area networks, and/or WiFi4 networks. In some embodiments, the radio frequency circuitry 1804 may also include NFC4 related circuitry, which is not limited in this application.
The display 1805 is for displaying the UI 4. The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1805 is a touch display screen, the display screen 1805 also has the ability to capture touch signals on or over the surface of the display screen 1805. The touch signal may be input to the processor 1801 as a control signal for processing. At this point, the display 1805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1805 may be one, disposed on a front panel of the terminal 1800; in other embodiments, the number of the display screens 1805 may be at least two, and each of the display screens is disposed on a different surface of the terminal 1800 or is in a foldable design; in still other embodiments, the display 1805 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 1800. Even more, the display 1805 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The display 1805 may be made of LCD, OLED, or other materials.
The camera assembly 1806 is used to capture images or video. Optionally, the camera assembly 1806 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and the rear cameras are respectively any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1801 for processing or inputting the electric signals to the radio frequency circuit 1804 to achieve voice communication. The microphones may be provided in a plurality, respectively, at different positions of the terminal 1800 for the purpose of stereo sound collection or noise reduction. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1801 or the radio frequency circuitry 1804 to sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 1807 may also include a headphone jack.
The location component 1808 is employed to locate a current geographic location of the terminal 1800 for navigation or LBS. The positioning component 1808 may be a positioning component based on the united states GPS, the chinese beidou system, the russian graves system, or the european union's galileo system.
The power supply 1809 is used to power various components within the terminal 1800. The power supply 1809 may be ac, dc, disposable or rechargeable. When the power supply 1809 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 1800 also includes one or more sensors 1810. The one or more sensors 1810 include, but are not limited to: acceleration sensor 1811, gyro sensor 1812, pressure sensor 1813, fingerprint sensor 1814, optical sensor 1815, and proximity sensor 1816.
The acceleration sensor 1811 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the terminal 1800. For example, the acceleration sensor 1811 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1801 may control the touch display 1805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1811. The acceleration sensor 1811 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1812 may detect a body direction and a rotation angle of the terminal 1800, and the gyro sensor 1812 may cooperate with the acceleration sensor 1811 to collect a 3D motion of the user on the terminal 1800. The processor 1801 may implement the following functions according to the data collected by the gyro sensor 1812: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 1813 may be disposed on a side bezel of the terminal 1800 and/or on a lower layer of the touch display 1805. When the pressure sensor 1813 is disposed on a side frame of the terminal 1800, a user's grip signal on the terminal 1800 can be detected, and the processor 1801 performs left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 1813. When the pressure sensor 1813 is disposed at the lower layer of the touch display screen 1805, the processor 1801 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1814 is used to collect the fingerprint of the user, and the processor 1801 identifies the user according to the fingerprint collected by the fingerprint sensor 1814, or the fingerprint sensor 1814 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1801 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 1814 may be disposed at the front, rear, or side of the terminal 1800. When a physical key or vendor Logo is provided on the terminal 1800, the fingerprint sensor 1814 may be integrated with the physical key or vendor Logo.
The optical sensor 1815 is used to collect the ambient light intensity. In one embodiment, the processor 1801 may control the display brightness of the touch display 1805 based on the ambient light intensity collected by the optical sensor 1815. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1805 is increased; when the ambient light intensity is low, the display brightness of the touch display 1805 is turned down. In another embodiment, the processor 1801 may also dynamically adjust the shooting parameters of the camera assembly 1806 according to the intensity of the ambient light collected by the optical sensor 1815.
A proximity sensor 1816, also known as a distance sensor, is typically disposed on the front panel of the terminal 1800. The proximity sensor 1816 is used to collect the distance between the user and the front surface of the terminal 1800. In one embodiment, when the proximity sensor 1816 detects that the distance between the user and the front surface of the terminal 1800 gradually decreases, the processor 1801 controls the touch display 1805 to switch from the bright screen state to the dark screen state; when the proximity sensor 1816 detects that the distance between the user and the front surface of the terminal 1800 becomes gradually larger, the processor 1801 controls the touch display 1805 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 18 is not intended to be limiting of terminal 1800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In some embodiments, a computer readable storage medium is also provided, in which a computer program is stored, and the computer program is executed by a processor to implement the steps of the data packet recovery method in the above embodiments. For example, the computer readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It is noted that the computer-readable storage medium referred to herein may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps for implementing the above embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
That is, in some embodiments, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the packet recovery method described above.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (26)

1. A method for packet recovery, the method comprising:
sending an original data packet;
pre-coding each original data packet in the sent original data packet group to obtain a first coded data packet group, wherein the byte number of each first coded data packet in the first coded data packet group is the same;
forward error correction coding is carried out on the first coding data packet group to obtain a second coding data packet group;
and sending the second encoding data packet group, wherein the original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group are used for recovering the original data packet of the original data packet group which is lost in the transmission process.
2. The method of claim 1, wherein said pre-encoding each original packet in the transmitted set of original packets to obtain a first encoded set of packets comprises:
determining a first byte number, wherein the first byte number is greater than or equal to the maximum byte number in the byte numbers of each original data packet in the original data packet group;
for any original data packet in the original data packet group, adding a first data block at the tail end of the original data packet according to the first byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the first byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block to obtain a first encoded data packet in the first encoded data packet group, wherein the byte number of the second data block is a preset byte number, and the second data block comprises the byte number of the first data block.
3. The method of claim 2, wherein the predetermined location of the one original data packet is a head end of the one original data packet.
4. The method of any of claims 1-3, wherein an I-frame in a video picture comprises a plurality of original packets, wherein a P-frame in the video picture comprises one or more original packets, and wherein pre-encoding each original packet in a set of original packets that have been transmitted to obtain a first set of encoded packets further comprises:
dividing all original data packets of a sent I frame into a plurality of original data packet groups, and dividing all original data packets of a sent P frame into one original data packet group, wherein the packet sequence of all original data packets in each original data packet group is continuous.
5. The method of any of claims 1-3, wherein prior to said transmitting said second encoded data packet set, further comprising:
for any one second coded data packet in the second coded data packet group, adding a coded information data block in the second coded data packet;
the coding information data block comprises position information of the second coding data packet in the second coding data packet group, the packet sequence of the first original data packet in the original data packet group, the number of data packets in the original data packet group and the number of data packets in the second coding data packet group.
6. The method of claim 1, wherein the forward error correction coding is cauchy matrix based RS-FEC coding.
7. A method for packet recovery, the method comprising:
receiving an original data packet and a second coded data packet;
acquiring a plurality of second encoded data packets from the received second encoded data packets, and acquiring a plurality of original data packets from the received original data packets, wherein a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong, the second encoded data packet group is obtained by performing forward error correction encoding on a first encoded data packet group, the first encoded data packet group is obtained by performing pre-encoding on each original data packet in the original data packet group, and the byte number of each first encoded data packet in the first encoded data packet group is the same;
when the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the transmission process of the original data packet group;
and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, restoring the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
8. The method of claim 7, wherein the second encoded data packet includes the encoded information data block, the encoded information data block in the second encoded data packet includes a target packet sequence of a first original data packet in the corresponding original data packet group, the encoded information data block in the second encoded data packet includes a target data packet number of the corresponding original data packet group, the obtaining the plurality of second encoded data packets from the received second encoded data packet and the obtaining the plurality of original data packets from the received original data packet comprise:
determining that a plurality of second encoding data packets containing the same target packet sequence in the received second encoding data packets belong to a second encoding data packet group;
determining a target packet sequence range according to a target packet sequence and the number of target data packets contained in any one of the second encoding data packets;
and determining that a plurality of original data of which the packet sequence is in the target packet sequence range in the received original data packet belong to one original data packet group corresponding to the second coded data packet group.
9. The method of claim 8, wherein when the plurality of second encoded data packets and the plurality of original data packets satisfy a predetermined condition, before recovering original data packets of the original data packet group lost during transmission based on the plurality of second encoded data packets and the plurality of original data packets, further comprising:
acquiring the number of target data packets contained in any one second encoding data packet in the plurality of second encoding data packets;
subtracting the number of the original data packets from the number of the obtained target data packets to obtain the number of lost data packets;
and when the number of the lost data packets is smaller than the number of the second coding data packets, determining that the second coding data packets and the original data packets meet preset conditions.
10. The method according to any one of claims 7 to 9, wherein the second encoded data packet includes an encoded information data block, the encoded information data block in the second encoded data packet includes position information of itself in the second encoded data packet group to which the encoded information data block belongs and the number of data packets of the second encoded data packet group to which the encoded information data block belongs, and the recovering the original data packet lost in the transmission process of the original data packet group according to the plurality of second encoded data packets and the plurality of original data packets includes:
acquiring the number of data packets of the second encoded data packet group contained in any one of the second encoded data packets, and acquiring the position information of each second encoded data packet contained in the second encoded data packet group;
removing the coded information data block in each of the plurality of second coded data packets;
taking the byte number of any one of the second encoded data packets from which the encoded information data block is removed as a second byte number, wherein the second byte number is the byte number of each first encoded data packet in the first encoded data packet group;
pre-coding each original data packet in the plurality of original data packets according to the second byte number to obtain a plurality of first coded data packets belonging to the first coded data packet group;
according to the position information of each second encoding data packet in the plurality of second encoding data packets in the second encoding data packet group and the number of data packets of the second encoding data packet group, carrying out forward error correction decoding on the plurality of first encoding data packets and the plurality of second encoding data packets with the encoding information data blocks removed to obtain the first encoding data packet group;
predecoding each first encoded data packet in the first encoded data packet group to obtain the original data packet group.
11. The method of claim 10, wherein the pre-encoding each of the plurality of original packets according to the second number of bytes to obtain a plurality of first encoded packets belonging to the first encoded packet group comprises:
for any original data packet in the plurality of original data packets, adding a first data block at the tail end of the original data packet according to the second byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the second byte number and subtracting a preset byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first encoded data packet belonging to the first encoded data packet group, wherein the byte number of the second data block is the preset byte number, and the second data block comprises the byte number of the first data block.
12. The method of claim 11, wherein predecoding each first encoded packet in the first set of encoded packets to obtain the original set of packets comprises:
for any one first coded data packet in the first coded data packet group, removing a first data block from the end of the first coded data packet according to the number of bytes contained in a second data block at a preset position in the first coded data packet;
and removing the second data block from a preset position in the first coded data packet from which the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
13. A method for packet recovery, the method comprising:
the method comprises the steps that first equipment sends original data packets to second equipment, and each original data packet in an original data packet group which is sent is pre-coded to obtain a first coded data packet group, wherein the number of bytes of each first coded data packet in the first coded data packet group is the same;
the first device performs forward error correction coding on the first coded data packet group to obtain a second coded data packet group, and sends the second coded data packet group to the second device;
when the second device receives an original data packet and a second coded data packet sent by the first device, obtaining a plurality of second coded data packets from the received second coded data packet, and obtaining a plurality of original data packets from the received original data packet, wherein the plurality of second coded data packets belong to the second coded data packet group, and the plurality of original data packets belong to the original data packet group;
when the packet sequence of the plurality of original data packets is discontinuous, the second device determines that the original data packets are lost in the transmission process of the original data packet group;
and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, the second device recovers the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
14. A packet recovery apparatus, the apparatus comprising:
the first sending module is used for sending an original data packet;
the first encoding module is used for pre-encoding each original data packet in the sent original data packet group to obtain a first encoded data packet group, wherein the byte number of each first encoded data packet in the first encoded data packet group is the same;
a second encoding module, configured to perform forward error correction encoding on the first encoded data packet group to obtain a second encoded data packet group;
and the second sending module is used for sending the second encoding data packet group, and the original data packet of the original data packet group which is not lost in the transmission process and the second encoding data packet group are used for recovering the original data packet of the original data packet group which is lost in the transmission process.
15. The apparatus of claim 14, wherein the first encoding module comprises:
a determining unit, configured to determine a first number of bytes, where the first number of bytes is greater than or equal to a maximum number of bytes in the number of bytes of each original data packet in the original data packet group;
a first adding unit, configured to add, to any one original packet in the original packet group, a first data block at the end of the one original packet according to the first byte number, where the byte number of the first data block is obtained by subtracting the byte number of the one original packet from the first byte number;
and a second adding unit, configured to add a second data block at a preset position in the original data packet after the first data block is added according to the number of bytes of the first data block, so as to obtain a first encoded data packet in the first encoded data packet group, where the number of bytes of the second data block is a preset number of bytes, and the second data block includes the number of bytes of the first data block.
16. The apparatus of claim 15, wherein the predetermined location of the one original data packet is a head end of the one original data packet.
17. The apparatus of any of claims 14-16, wherein an I-frame in a video picture comprises a plurality of raw data packets, and a P-frame in the video picture comprises one or more raw data packets, the apparatus further comprising:
the dividing module is used for dividing all original data packets of one sent I frame into a plurality of original data packet groups, dividing all original data packets of a plurality of sent P frames into one original data packet group, and enabling the packet sequence of all original data packets in each original data packet group to be continuous.
18. The apparatus of any of claims 14-16, wherein the apparatus further comprises:
an adding module, configured to add, to any one second encoded packet in the second encoded packet group, an encoded information data block in the one second encoded packet;
the coding information data block comprises position information of the second coding data packet in the second coding data packet group, the packet sequence of the first original data packet in the original data packet group, the number of data packets in the original data packet group and the number of data packets in the second coding data packet group.
19. The apparatus of claim 14, wherein the forward error correction coding is cauchy matrix based RS-FEC coding.
20. A packet recovery apparatus, the apparatus comprising:
the receiving module is used for receiving the original data packet and the second coded data packet;
a first obtaining module, configured to obtain a plurality of second encoded data packets from a received second encoded data packet, and obtain a plurality of original data packets from a received original data packet, where a second encoded data packet group to which the plurality of second encoded data packets belong corresponds to an original data packet group to which the plurality of original data packets belong, the second encoded data packet group is obtained by performing forward error correction encoding on a first encoded data packet group, the first encoded data packet group is obtained by performing pre-encoding on each original data packet in the original data packet group, and the number of bytes of each first encoded data packet in the first encoded data packet group is the same;
a first determining module, configured to determine that an original data packet of the original data packet group is lost in a transmission process when packet orders of the plurality of original data packets are not consecutive;
and the recovery module is used for recovering the original data packet lost in the transmission process of the original data packet group according to the plurality of second coded data packets and the plurality of original data packets when the plurality of second coded data packets and the plurality of original data packets meet preset conditions.
21. The apparatus of claim 20, wherein the second encoded data packet includes an encoded information data block, a target packet sequence included in the encoded information data block in the second encoded data packet is a packet sequence of a first original data packet in a corresponding original data packet group, and a number of target data packets included in the encoded information data block in the second encoded data packet is a number of data packets of the corresponding original data packet group, and the obtaining module includes:
a first determining unit, configured to determine that a plurality of second encoded data packets containing the same target packet order in the received second encoded data packet belong to a second encoded data packet group;
a second determining unit configured to determine a target packet order range according to a target packet order and a target data packet number included in any one of the plurality of second encoded data packets;
and a third determining unit, configured to determine that a plurality of original data packets, whose packet order is within the target packet order range, in the received original data packet belong to one original data packet group corresponding to the one second encoded data packet group.
22. The apparatus of claim 21, wherein the apparatus further comprises:
a second obtaining module, configured to obtain the number of target data packets included in any one of the second encoded data packets;
the calculation module is used for subtracting the number of the original data packets from the number of the obtained target data packets to obtain the number of the lost data packets;
a second determining module, configured to determine that the plurality of second encoded data packets and the plurality of original data packets satisfy a preset condition when the number of the lost data packets is smaller than the number of the plurality of second encoded data packets.
23. The apparatus according to any one of claims 20-22, wherein the second encoded data packet includes an encoded information data block, the encoded information data block in the second encoded data packet includes position information of itself in the second encoded data packet group and the number of data packets of the second encoded data packet group, and the recovery module includes:
an obtaining unit, configured to obtain the number of data packets of the second encoded data packet group included in any one of the plurality of second encoded data packets, and obtain position information of each second encoded data packet included in the plurality of second encoded data packets in the second encoded data packet group;
a removal unit configured to remove the encoded information data block in each of the plurality of second encoded packets;
a fourth determining unit, configured to use, as a second byte number, a byte number of any one of the plurality of second encoded packets from which the encoded information data block is removed, where the second byte number is a byte number of each first encoded packet in the first encoded packet group;
an encoding unit, configured to precode each original data packet in the multiple original data packets according to the second number of bytes to obtain multiple first encoded data packets belonging to the first encoded data packet group;
a first decoding unit, configured to perform forward error correction decoding on the plurality of first encoded data packets and the plurality of second encoded data packets from which the encoded information data block is removed according to position information of each of the plurality of second encoded data packets in the second encoded data packet group and the number of data packets of the second encoded data packet group, so as to obtain the first encoded data packet group;
and the second decoding unit is used for pre-decoding each first encoding data packet in the first encoding data packet group to obtain the original data packet group.
24. The apparatus of claim 23, wherein the encoding unit is to:
for any original data packet in the plurality of original data packets, adding a first data block at the tail end of the original data packet according to the second byte number, wherein the byte number of the first data block is obtained by subtracting the byte number of the original data packet from the second byte number and subtracting a preset byte number;
and adding a second data block at a preset position in the original data packet after the first data block is added according to the byte number of the first data block so as to obtain a first encoded data packet belonging to the first encoded data packet group, wherein the byte number of the second data block is the preset byte number, and the second data block comprises the byte number of the first data block.
25. The apparatus of claim 24, wherein the second decoding unit is to:
for any one first coded data packet in the first coded data packet group, removing a first data block from the end of the first coded data packet according to the number of bytes contained in a second data block at a preset position in the first coded data packet;
and removing the second data block from a preset position in the first coded data packet from which the first data block is removed according to the preset byte number to obtain an original data packet belonging to the original data packet group.
26. A packet recovery system, the system comprising: a first device and a second device;
the first device is configured to send an original data packet to the second device, and precode each original data packet in an original data packet group that has been sent, so as to obtain a first encoded data packet group, where the number of bytes of each first encoded data packet in the first encoded data packet group is the same; forward error correction coding is carried out on the first coding data packet group to obtain a second coding data packet group, and the second coding data packet group is sent to the second equipment;
the second device is configured to, when receiving an original data packet and a second encoded data packet sent by the first device, obtain a plurality of second encoded data packets from the received second encoded data packet, and obtain a plurality of original data packets from the received original data packet, where the plurality of second encoded data packets belong to the second encoded data packet group, and the plurality of original data packets belong to the original data packet group; when the packet sequence of the plurality of original data packets is discontinuous, determining that the original data packets are lost in the transmission process of the original data packet group; and when the plurality of second encoding data packets and the plurality of original data packets meet preset conditions, restoring the original data packets lost in the transmission process of the original data packet group according to the plurality of second encoding data packets and the plurality of original data packets.
CN201910945466.1A 2019-09-30 2019-09-30 Data packet recovery method and device Active CN112583524B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910945466.1A CN112583524B (en) 2019-09-30 2019-09-30 Data packet recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910945466.1A CN112583524B (en) 2019-09-30 2019-09-30 Data packet recovery method and device

Publications (2)

Publication Number Publication Date
CN112583524A true CN112583524A (en) 2021-03-30
CN112583524B CN112583524B (en) 2022-08-05

Family

ID=75116902

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910945466.1A Active CN112583524B (en) 2019-09-30 2019-09-30 Data packet recovery method and device

Country Status (1)

Country Link
CN (1) CN112583524B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933342A (en) * 2016-06-24 2016-09-07 浙江宇视科技有限公司 Video monitoring data transmission method and device
CN109547467A (en) * 2018-12-19 2019-03-29 北京东土科技股份有限公司 Media data error correction transmission and error correction method, device, equipment and storage medium
EP3484155A1 (en) * 2016-07-07 2019-05-15 Tencent Technology (Shenzhen) Company Limited Method and device for processing video data
CN109862440A (en) * 2019-02-22 2019-06-07 深圳市凯迪仕智能科技有限公司 Audio video transmission forward error correction, device, computer equipment and storage medium
CN110087140A (en) * 2018-01-26 2019-08-02 腾讯科技(深圳)有限公司 A kind of method, apparatus, medium and equipment for transmitting stream medium data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933342A (en) * 2016-06-24 2016-09-07 浙江宇视科技有限公司 Video monitoring data transmission method and device
EP3484155A1 (en) * 2016-07-07 2019-05-15 Tencent Technology (Shenzhen) Company Limited Method and device for processing video data
CN110087140A (en) * 2018-01-26 2019-08-02 腾讯科技(深圳)有限公司 A kind of method, apparatus, medium and equipment for transmitting stream medium data
CN109547467A (en) * 2018-12-19 2019-03-29 北京东土科技股份有限公司 Media data error correction transmission and error correction method, device, equipment and storage medium
CN109862440A (en) * 2019-02-22 2019-06-07 深圳市凯迪仕智能科技有限公司 Audio video transmission forward error correction, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112583524B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN113411592B (en) Method and device for decoding and encoding prediction mode
CN108966008B (en) Live video playback method and device
CN110022489B (en) Video playing method, device and storage medium
CN108391127B (en) Video encoding method, device, storage medium and equipment
CN110830819B (en) Encoding method, decoding method, encoding end and decoding end
CN108616776B (en) Live broadcast analysis data acquisition method and device
CN110121084B (en) Method, device and system for switching ports
CN110149491B (en) Video encoding method, video decoding method, terminal and storage medium
CN111586413B (en) Video adjusting method and device, computer equipment and storage medium
CN111432218B (en) Video encoding and decoding method, device, terminal and storage medium
CN112583524B (en) Data packet recovery method and device
CN113192519B (en) Audio encoding method and apparatus, and audio decoding method and apparatus
CN112153404B (en) Code rate adjusting method, code rate detecting method, code rate adjusting device, code rate detecting device, code rate adjusting equipment and storage medium
CN110636326A (en) Live video processing method and device and storage medium
CN111064782B (en) Method and device for transmitting data, electronic equipment and storage medium
CN114301884A (en) Audio data transmitting method, receiving method, device, terminal and storage medium
CN115811615A (en) Screen video coding method and device, computer equipment and storage medium
CN114900704A (en) Video processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant