Coding method, decoding method and computing device

The coding method generates diverse redundant data packets to balance network bandwidth and packet loss resistance, enhancing audio and video transmission reliability.

CN119135931APending Publication Date: 2024-12-13HUAWEI TECH CO LTD

Patent Information

Application Number
CN202310695127.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Current coding technologies struggle to balance low network bandwidth occupancy with high resistance to both continuous and random packet loss, failing to meet all four conditions simultaneously.

Method used

A coding method that generates multiple coded data packets, including first and second types of redundant data packets, determined by original and calculated data packets, to reduce network bandwidth occupancy while enhancing anti-packet loss capabilities.

Benefits of technology

The method effectively reduces network bandwidth usage while maintaining strong resistance to packet loss, improving the reliability of audio and video transmission systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135931A_ABST
    Figure CN119135931A_ABST
Patent Text Reader

Abstract

The invention provides a coding method, a decoding method and computing equipment, in the coding method, on one hand, each sent coding data packet comprises a plurality of data packets, namely, the plurality of data packets can be stacked into a large coding data packet to be sent, so that the network bandwidth can be saved; and on the other hand, the plurality of sent coded data packets comprise the coded data packets of the second type, the coded data packets of the second type comprise the redundant data packets of the second type, and the redundant data packets of the second type are determined by performing operation on the plurality of original data packets, so that the packet loss resistance is relatively high. In other words, the coding method provided by the invention can ensure that the occupied network bandwidth is relatively small and has relatively high packet loss resistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of encoding and decoding, and more specifically, to an encoding method, a decoding method and a computing device. Background Art

[0002] In the era of big data, audio and video applications are becoming more and more widespread, becoming an important way for people to obtain, publish and exchange information. At present, the scale of online audio-visual users in China is approaching saturation, and users are more concerned about the experience of audio and video services. This has also prompted the development of audio and video service systems from on-demand and live broadcast to real-time audio and video, with the aim of providing users with low latency, high definition and high fluency experience. In order to better transmit and store these data, audio and video encoding technology is required. Generally, it is expected that the encoding scheme can meet the following four conditions at the same time: low network bandwidth occupancy, low encoding and decoding complexity, high resistance to continuous packet loss, and high resistance to random packet loss.

[0003] However, among the current coding technologies, either the performance of anti-packet loss of data packets is outstanding, or the performance of reducing network bandwidth occupancy is outstanding. There is no coding method that can achieve both good anti-packet loss performance and good network bandwidth occupancy performance.

[0004] Therefore, a coding method is needed that can simultaneously ensure anti-packet loss performance and network bandwidth occupancy performance. Summary of the invention

[0005] The present application provides a coding method that can both ensure anti-packet loss performance and reduce network bandwidth occupancy.

[0006] In the first aspect, a coding method is provided, which can be executed by a computing device, or by a component of the computing device (such as a chip or circuit), or by each server or virtual machine in a cloud service system, without limitation.

[0007] The method comprises: generating a plurality of coded data packets according to a plurality of original data packets, the plurality of coded data packets comprising a first type of coded data packets and a second type of coded data packets, wherein the first type of coded data packets are determined according to the plurality of original data packets, the second type of coded data packets are determined according to a first type of redundant data packets and a second type of redundant data packets, the first type of redundant data packets are determined by an original data packet, and the second type of redundant data packets are determined by performing calculations on a plurality of original data packets; and sending a plurality of coded data packets.

[0008] Optionally, generating multiple encoded data packets based on multiple original data packets includes: generating multiple redundant data packets based on the multiple original data packets, the multiple redundant data packets including redundant data packets of a first type and redundant data packets of a second type; encapsulating the multiple original data packets and the multiple redundant data packets to generate the multiple encoded data packets.

[0009] In the present application, the "first type of redundant data packet" is actually an original data packet among multiple original data packets. For example, the redundant data packet #R1 can actually be the original data packet #S3; for another example, the redundant data packet #R2 can actually be the original data packet #S4.

[0010] In the present application, the "second type of redundant data packet" can be understood as being determined by performing operations (e.g., algebraic operations) between multiple original data packets. For example, the second type of redundant data packet can be determined by performing a modulo-2 addition operation on multiple original data packets. Exemplarily, assuming that redundant data packet #R1 is a double redundant data packet, for example, original data packet #S1 and original data packet #S3 can be used to determine redundant data packet #R1, for example, original data packet #S1 is "100" and original data packet #S2 is "010", and original data packet #S1 and original data packet #S2 perform a modulo-2 addition operation to obtain redundant data packet #R1 as "110". In the present application, the operation between multiple original data packets can also be, for example, a binary multiplication operation, etc., without limitation.

[0011] In the present application, "a first type of coded data packet is determined based on the multiple original data packets" means that each of the first type of coded data packets in the first type of coded data packets is determined based on the multiple original data packets. Similarly, "a second type of coded data packet is determined based on the first type of redundant data packet and the second type of redundant data packet" means that each of the second type of coded data packets in the second type of coded data packets is determined based on the first type of redundant data packet and the second type of redundant data packet.

[0012] Based on the above technical solution, on the one hand, since each coded data packet sent includes multiple data packets, that is, multiple data can be piled into a large coded data packet for sending, network bandwidth can be saved. On the other hand, since the multiple coded data packets sent include coded data packets of the second type, the coded data packets of this type include redundant data packets of the second type, and the redundant data packets of the second type are determined by calculation of multiple original data packets, it has a strong anti-packet loss capability. In other words, the encoding method provided by the present application can ensure that a smaller network bandwidth is occupied and has a strong anti-packet loss capability.

[0013] In combination with the first aspect, in a possible implementation method, the code rate of the multiple encoded data packets is Q2 / Q1, the number of original data packets is N, and multiple encoded data packets are generated based on the multiple original data packets, including: encapsulating the N original data packets into K first-type encoded data packets, wherein each first-type encoded data packet includes N / K different original data packets; determining the number of second-type encoded data packets based on the number of original data packets, the code rate and the number of first-type encoded data packets, wherein the number of second-type encoded data packets is [K÷(Q2 / Q1)-K], and the number of first-type redundant data packets and the number of second-type redundant data packets included in each second-type encoded data packet is N / K; wherein Q1 and Q2 are both integers greater than 0 and Q1 is greater than Q2, and N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

[0014] In the present application, the code rate may be determined by a person skilled in the art. For example, the code rate Q2 / Q1 is an even number. For example, the code rate Q2 / Q1 is 1 / 4 or 1 / 6. For example, the number of original data packets may also be predetermined.

[0015] In the present application, the number of data packets included in each coded data packet can be determined first, for example, it can be recorded as m, and then the total number of first type coded data packets can be determined based on the total number of original data packets, and the number of second type coded data packets can be determined based on the code rate. Generally, the number of data packets included in each coded data packet is related to the code rate. For example, when the code rate is 1 / 4, m is 2 and N is 8; for another example, when the code rate is 1 / 6, m is 3 and N is 9. When the code rate is relatively small, the value of m will increase. This is because considering that the smaller the code rate, the more redundant data packets there are, in order to reduce the occupancy of network bandwidth, more data packets can be placed in each coded packet.

[0016] Based on the above technical solution, in the present application, the number of encoded data packets of the first type can be determined first, and then the number of original data packets of the second type can be determined based on the number of original data packets, the bit rate and the number of encoded data packets of the first type.

[0017] In combination with the first aspect, in a possible implementation manner, the multiple encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type are determined based on redundant data packets of the second type.

[0018] In combination with the first aspect, in a possible implementation manner, the code rate of the multiple encoded data packets is L2 / L1, the number of original data packets is N, and the multiple encoded data packets are generated according to the multiple original data packets, including: encapsulating the N original data packets into K first-type encoded data packets, wherein each first-type encoded data packet includes N / K different original data packets; determining the number of second-type encoded data packets and the number of third-type encoded data packets according to the number of original data packets, the code rate and the number of first-type encoded data packets, wherein the number of third-type encoded data packets is (K-1), the number of second-type encoded data packets is [K÷(L2 / L1)-K-(K-1)], the number of second-type redundant data packets included in each third-type encoded data packet is N / K, and the number of first-type redundant data packets and second-type redundant data packets included in each second-type encoded data packet is N / K; wherein L1 and L2 are both integers greater than 0 and L1 is greater than L2, and N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

[0019] In the present application, the code rate may be determined by a person skilled in the art. For example, the code rate L2 / L1 is an odd number. For example, the code rate L2 / L1 is 1 / 5 or 1 / 7. For example, the number of original data packets may also be predetermined.

[0020] In the present application, for example, the number of original data packets included in each first-type coded data packet can be determined first (for example, each first-type coded data packet includes N / K original data packets), and then the number of second-type coded data packets can be further determined, and finally the number of third-type coded data packets can be increased according to the code rate. It should be noted that when the code rate is an even number, when the coded data packets are added later, the second-type coded data packets are not added, but the third-type coded packets are added (it can also be understood as pure L data packets, that is, the redundant data packets of the second type are added). This is to increase the anti-packet loss performance, so the L packets are determined by algebraic operations on multiple original data packets, so that the coded packets constructed in this way have a strong anti-packet loss capability.

[0021] In combination with the first aspect, in a possible implementation, the number of original data packets is P, the bit rate of the multiple encoded data packets is R2 / R1, and multiple encoded data packets are generated based on the multiple original data packets, including: generating P first-type encoded data packets according to the redundant audio data RED encoding method and the number of original data packets; determining the number of second-type encoded data packets according to the number of original data packets, the bit rate and the number of first-type encoded data packets, wherein the number of second-type encoded data packets is [(P / m)÷(R2 / R1)-P], and each second-type encoded data packet includes a number of first-type redundant data packets and a number of second-type redundant data packets of P / m; wherein R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

[0022] In combination with the first aspect, in a possible implementation, the number of original data packets is P, the bit rate of the multiple encoded data packets is R2 / R1, and multiple encoded data packets are generated according to the multiple original data packets, including: generating P first-type encoded data packets according to the redundant audio data RED encoding method and the number of original data packets; determining the number of second-type encoded data packets and the number of third-type encoded data packets according to the number of original data packets, the bit rate and the number of first-type encoded data packets, wherein the number of third-type encoded data packets is (P-1), the number of second-type encoded data packets is [(P / m)÷(R2 / R1)-P-(P-1)], the number of first-type redundant data packets and the number of second-type redundant data packets included in each second-type encoded data packet is P / m, and the number of second-type redundant data packets included in each third-type encoded data packet is P / m; wherein R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

[0023] In this application, the value of m is generally related to the bit rate. For example, when the bit rate is 1 / 4, m is 2 and N is 8; for another example, when the bit rate is 1 / 6, m is 3 and N is 9. When the bit rate is relatively small, the value of m will increase. This is because the smaller the bit rate, the more redundant data packets there are. In order to reduce the occupation of network bandwidth, more data packets can be placed in each coded packet.

[0024] Considering the delay problem, the technical solution of the present application can be further optimized. In the above scheme, the RED scheme and the encoding method provided by the present application can be combined. Specifically, in the early stage of data packet generation, when there are fewer data blocks, the RED scheme can be selected for encoding first, and in the middle and late stages, when there are sufficient data blocks, the encoding method proposed by the present application can be used. This can not only reduce the transmission delay of data packets, but also effectively improve the encoding efficiency and improve the user experience.

[0025] In combination with the first aspect, in a possible implementation manner, a header of each encoded data packet in the multiple encoded data packets carries a mask table, where the mask table is used to indicate the type of each encoded data packet.

[0026] In a second aspect, a decoding method is provided, the method comprising: receiving a plurality of encoded data packets, the plurality of encoded data packets including a first type of encoded data packet and a second type of encoded data packet, wherein the first type of encoded data packet is determined based on a plurality of original data packets, the second type of encoded data packet is determined based on a first type of redundant data packet and a second type of redundant data packet, the first type of redundant data packet is determined by an original data packet, and the second type of redundant data packet is determined by performing operations on a plurality of original data packets; decoding the plurality of encoded data packets to obtain a plurality of original data packets.

[0027] In combination with the second aspect, in a possible implementation manner, the second type of redundant data packet is determined by multiple original data packets, including: the second type of redundant data packet is determined by performing a modulo-2 addition operation on the multiple original data packets.

[0028] In combination with the second aspect, in a possible implementation manner, the multiple encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type include redundant data packets of the second type.

[0029] In combination with the second aspect, in a possible implementation manner, a header of each encoded data packet in the multiple encoded data packets carries a mask table, where the mask table is used to indicate the type of each encoded data packet.

[0030] In the present application, the packet header of each encoded data packet sent will carry a mask table, which can indicate whether each encoded packet sent is a first type of encoded packet or a second type of encoded packet, thereby assisting the receiving end to decode different types of received encoded data packets.

[0031] Exemplarily, the receiving end can decode the received second type of redundant data packets according to the first type of coded data packets and the first type of redundant data packets, so as to obtain more original data packets. In this way, when the network state is poor, the original data packets lost in the network during the process of sending the coded data packets can be obtained by decoding the second type of redundant data packets. In other words, based on the method provided by the present application, the receiving end can recover the original data packets.

[0032] In a third aspect, the present application proposes a computing device, which is used to execute the method of the first aspect. Specifically, the device may include units and / or modules, such as a transceiver unit and / or a processing unit, for executing the encoding method proposed in the present application.

[0033] In a fourth aspect, the present application proposes a computing device, which is used to execute the method of the second aspect. Specifically, the device may include units and / or modules, such as a transceiver unit and / or a processing unit, for executing the decoding method proposed in the present application.

[0034] In a fifth aspect, a computing device is provided, the device comprising: at least one processor, configured to execute a computer program or instruction stored in a memory to perform the method of the first aspect. Optionally, the device further comprises a memory, configured to store a computer program or instruction. Optionally, the device further comprises a communication interface, and the processor reads the computer program or instruction stored in the memory through the communication interface.

[0035] In one implementation, the device is a functional computing device for implementing the encoding method provided in the present application in a chip.

[0036] In another implementation, the device is a functional chip, chip system or circuit used to implement the encoding method provided in the present application in a chip.

[0037] In a sixth aspect, a computing device is provided, the device comprising: at least one processor, configured to execute a computer program or instruction stored in a memory to perform the method of the second aspect. Optionally, the device further comprises a memory, configured to store a computer program or instruction. Optionally, the device further comprises a communication interface, and the processor reads the computer program or instruction stored in the memory through the communication interface.

[0038] In one implementation, the device is a functional computing device for implementing the decoding method provided in the present application in a chip.

[0039] In another implementation, the device is a functional chip, chip system or circuit for implementing the decoding method provided in the present application in a chip.

[0040] In a seventh aspect, the present application provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of the first aspect or the second aspect.

[0041] In the specific implementation process, the processor can be one or more chips, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a transceiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0042] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or unless they conflict with their actual function or internal logic in the relevant description, they can be understood as operations such as processor output, reception, input, etc., or as sending and receiving operations performed by the radio frequency circuit and antenna, and this application does not limit this.

[0043] In an eighth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter to execute the method of the first aspect or the second aspect.

[0044] Optionally, the number of the processors is one or more, and the number of the memories is one or more.

[0045] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0046] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0047] It should be understood that the related data interaction process, such as sending indication information, can be a process of outputting indication information from the processor, and receiving capability information can be a process of receiving input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Among them, the transmitter and the transceiver can be collectively referred to as a transceiver.

[0048] The processing device in the fifth aspect may be one or more chips. The processor in the processing device may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.

[0049] In a ninth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method described in any possible implementation manner in the first aspect, or so that the computing device cluster executes the method described in the second aspect.

[0050] Optionally, the processor may be a general-purpose processor, which may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.

[0051] In a tenth aspect, a computer-readable storage medium is provided, which stores a program code for execution by a device, wherein the program code includes a method for executing the first aspect or the second aspect.

[0052] In an eleventh aspect, a computer program product comprising instructions is provided, and when the computer program product is run on a computer, the computer is caused to execute the method of the first aspect.

[0053] In a twelfth aspect, a chip system is provided, comprising a processor for calling and running a computer program from a memory, so that a device equipped with the chip system executes the method of the first or second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic flow chart of the HME audio link is shown.

[0055] Figure 2 It is a schematic diagram of FEC encoding shown in this application.

[0056] Figure 3 is a schematic diagram of ULP FEC encoding shown in this application.

[0057] Figure 4is a schematic diagram of the RED encoding scheme shown in this application.

[0058] Figure 5 It is a schematic flowchart of the encoding method 500 provided in this application.

[0059] Figure 6 It is a schematic diagram of the encoding method shown in this application.

[0060] Figure 7 It is another schematic diagram of the encoding method shown in the present application.

[0061] Figure 8 This is another schematic diagram of the encoding method provided by this application.

[0062] Fig. 9 It is a schematic diagram of a coding structure provided by this application.

[0063] Fig.10 It is a schematic diagram of another encoding structure provided by this application.

[0064] Fig.11 This is a schematic diagram of another coding structure provided by this application.

[0065] Fig.12 This is another schematic diagram of the encoding method provided by this application.

[0066] Fig.13 It is a schematic block diagram of the computing device 101 provided in this application.

[0067] Fig.14 is a schematic block diagram of the computing device 102 provided in the present application.

[0068] Fig.15 is a schematic block diagram of a computing device 200 provided in the present application. DETAILED DESCRIPTION

[0069] In the era of big data, audio and video applications are becoming more and more widespread, becoming an important way for people to obtain, publish and exchange information. At present, the scale of online audio-visual users in China is approaching saturation, and users are more concerned about the experience of audio and video services. This has also prompted the development of audio and video service systems from on-demand and live broadcast to real-time audio and video, with the aim of providing users with low latency, high definition and high fluency experience. In order to better transmit and store these data, audio and video encoding technology is needed.

[0070] Generally speaking, audio / video transmission systems focus on high-quality services. It is not feasible to transmit data without encoding. When the network environment is poor (also known as "weak network"), a large number of original data packets will be lost when sending data packets. If retransmission occurs, it will cause a huge delay problem, which seriously affects the user experience. The current mainstream practice is to perform FEC encoding on data packets, so that even if the receiving end loses some encoded data packets, the remaining encoded data packets can still be used to restore the original data. Figure 1 shows an audio / video link, such as Figure 1 As shown in the figure, the traditional hundred meg Ethernet (HME) audio link is divided into two stages: uplink and downlink. In the uplink stage, the collected data can be downsampled first, and then needs to be packaged and forward error correction (FEC) encoded through the real-time transport protocol (RTP) before being uploaded to the network for transmission. Network transmission has the characteristics of instability, and network packet loss often occurs. The role of FEC encoding here is to resist the data loss caused by packet loss. In the downlink stage, the received data packet needs to be FEC decoded first, then RTP unpacked, and then upsampled to obtain the original data.

[0071] "Weak network" refers to a situation where the network status is poor, which often occurs in a network environment one kilometer away from the user's terminal device. "Weak network" can be caused by both normal low-quality networks and sudden unstable networks. How to resist the impact of weak network environments on users' audio or video service experience has become an urgent problem to be solved, and FEC coding technology is the key technology to solve this problem. The following is a brief introduction to FEC coding technology.

[0072] FEC coding uses algebraic means to linearly combine data packets and generate some additional redundant data packets. Figure 2 As shown in the figure, S1, S2, S3 are the original data packets, and R1, R2, R3 are the additional redundant data packets. Assume that R1 = S1, R2 = S1 + S2, R3 = S2 + S3, where "+" represents the addition XOR operation of the computer modulo 2. It can be found that any continuous (for example, end-to-end) reception of 3 coded data packets can restore all the original data. In other words, Figure 2 The FEC coding shown is able to withstand the situation of 3 consecutive packet losses.

[0073] Different FEC coding methods will produce different coding gains. Generally, it is expected that the coding scheme can meet the following four conditions at the same time: low network bandwidth occupancy, low encoding and decoding complexity, high resistance to continuous packet loss, and high resistance to random packet loss. A coded data packet usually includes two parts: a header and data. The header contains some scheduling and coding information. However, audio data is often very small. When generating a coded data packet, the proportion of the header is very close to that of the data. Therefore, the more redundant data packets generated by FEC coding, the more obvious the header overhead will be, and the greater the network bandwidth occupancy. Usually, the FEC coding process involves two operations, addition and multiplication. However, the complexity of multiplication operations in finite fields is extremely high. Therefore, in many delay-sensitive scenarios, efficient binary codes (i.e., the coding process only involves addition operations but no multiplication operations) are more popular. Generally speaking, the continuous / random packet loss resistance is proportional to the number of redundant data packets, i.e., the more redundant data packets, the stronger the packet loss resistance. It can be seen from this that low network bandwidth occupancy and high packet loss resistance restrict each other, and it is difficult for current FEC coding to take both into account at the same time. The following mainly introduces two typical encoding methods and bit rates.

[0074] 1. Uneven level protection (ULP FEC)

[0075] ULP FEC is a typical out-of-band redundancy scheme, which is also a traditional block code. Figure 3 As shown in the figure, the coded data packets can be divided into two layers, one layer is the original data packets (S1~S9), and the other layer is the redundant data packets generated by coding (R1~R9). The two layers of coded data packets can jointly resist the data loss problem caused by packet loss, significantly improving the reliability of data. Among them, S1, S2, ..., S9 are data packets, and R1, R2, ..., R9 are redundant data packets. This solution can have a strong ability to resist continuous packet loss, for example Figure 3 In the FEC code, 18 coded data packets can be lost continuously for a maximum of 9. However, the disadvantages of this solution are also significant. The out-of-band redundancy solution needs to generate as much redundant data as the proportion of redundant data packets. Therefore, in a weak network environment, the increase in the redundancy ratio will lead to obvious waste of network bandwidth.

[0076] In other words, if we directly use the out-of-band redundancy solution to resist weak network environments, we need to add enough redundant data packets, which will occupy more network bandwidth, cause serious network congestion, and ultimately fail to achieve the desired effect. Therefore, in the face of weak network environments, the out-of-band redundancy solution is not advisable. In addition, this out-of-band redundancy coding method has limited ability to resist random packet loss.

[0077] 2. Sound coding format forward error correction code

[0078] In order to save network bandwidth, in-band redundancy schemes have emerged, such as the redundant audio data (RED) encoding scheme. The practical feasibility of in-band redundancy is that the audio packet is small. Generally speaking, the data in each packet is only a few dozen bytes, which is equivalent to the packet header. Therefore, when RTP is packaged, multiple small packets can be aggregated into a large packet and then sent to the network for transmission. In particular, this method can undoubtedly significantly reduce the overhead of the packet header and reduce the network bandwidth.

[0079] The in-band redundancy scheme has obvious benefits in terms of network bandwidth savings, but it also has significant disadvantages. Specifically, the existing in-band redundancy coding scheme does not use algebraic methods, that is, the in-band redundant data packets are pure data packets and do not require operations between data packets. Figure 4 The figure shows a 400% redundancy scheme, where each data packet will be aggregated with at most 4 previously generated data packets into a large packet for transmission, so that 9 original data packets can generate 13 encoded large packets. Although this encoding method is simple to encode and decode and does not require algebraic operations, it also results in its extremely weak ability to resist continuous and random packet loss, such as Figure 4 As shown, only 4 of the 13 coded packets can be lost consecutively.

[0080] 3. Bit rate

[0081] Bit rate, also called coding efficiency, refers to the ratio of useful information to total information in the encoded data stream. For example, Figure 2 The coding method shown has a code rate of 1 / 2; Figure 3 The coding method shown also has a code rate of 1 / 2; Figure 4 The coding method shown has a code rate of 9 / 45 (i.e., 1 / 5) because Figure 4 There are a total of 45 original data packets related to S1~S9. Among them, the blank parts in the first 4 coded packets and the last four coded packets do not mean that there are no original data packets, which can be understood as other original data included.

[0082] In view of this, the present application proposes a coding method which not only effectively reduces the network bandwidth occupancy, but also has better performance in anti-packet loss.

[0083] For example, the technical solution of the present application can be applied to an audio / video communication system to improve the reliability of the transmission system by performing FEC encoding on audio data.

[0084] Figure 5 is a schematic flow chart of an encoding method 500 proposed in this application, such as Figure 5 As shown, the method includes:

[0085] 501, generate multiple encoded data packets according to multiple original data packets.

[0086] In the present application, the plurality of coded data packets include a first type of coded data packet and a second type of coded data packet, wherein the first type of coded data packet is determined based on a plurality of original data packets, and the second type of coded data packet is determined based on a first type of redundant data packet and a second type of redundant data packet. The first type of redundant data packet is determined by an original data packet, and the second type of redundant data packet is determined by calculating a plurality of original data packets.

[0087] Optionally, in a possible implementation, generating multiple coded data packets according to multiple original data packets includes: generating multiple redundant data packets according to the multiple original data packets, wherein the multiple redundant data packets include redundant data packets of a first type and redundant data packets of a second type. Encapsulating the multiple original data packets and the multiple redundant data packets to generate the multiple coded data packets.

[0088] The first type of redundant data packet is determined by one original data packet, and the second type of redundant data packet is determined by multiple original data packets.

[0089] Exemplarily, the second type of redundant data packet is determined by performing a modulo-2 addition operation on a plurality of original data packets.

[0090] In the present application, when more than one original data packet is generated, the remaining original data packets and the combination of the original data packets can be understood as redundant data packets. For example, the first type of redundant data packet can be understood as a data packet that is completely consistent with the original data packet, and the second type of redundant data packet can be understood as a data packet generated by at least two original data packets through some algebraic operations.

[0091] Exemplarily, a "data packet" can be understood as a binary number or a binary sequence. For example, original data packet #1 can be understood as "100", original data packet #2 can be understood as "010", and original data packet #3 can be understood as "001". For example, the original data packet #1 and the original data packet #2 can perform a modulo-2 addition operation to generate a redundant data packet #1, and the redundant data packet #1 is "110"; for another example, the original data packet #1 and the original data packet #3 can perform a modulo-2 addition operation to generate a redundant data packet #2, and the redundant data packet #2 is "101"; for another example, the original data packet #2 and the original data packet #3 can perform a modulo-2 addition operation to generate a redundant data packet #3, and the redundant data packet #3 is "011". At this time, redundant data #1 to redundant data packet #3 can be understood as an example of the second type of redundant data packets.

[0092] Of course, the original data packet #1 can be directly used as a redundant data packet, for example, the redundant data packet #4 is "100", and the original data packet #2 can also be directly used as another redundant data packet, for example, the redundant data packet #5 is "010". At this time, the redundant data packets #4 to #5 can be understood as an example of the first type of redundant data packets.

[0093] In this application, the generated encoded data packets can have the following three situations:

[0094] Case 1:

[0095] In a possible implementation, the generated multiple coded data packets include two types of coded data packets, including: a first type of coded data packet and a second type of coded data packet, wherein the first type of coded data packet is determined based on multiple original data packets, and the second type of coded data packet is determined based on a first type of redundant data packet and a second type of redundant data packet.

[0096] Assuming that the code rate of the multiple coded data packets is preset to be Q2 / Q1, and the number of original data packets is N, the N original data packets can be encapsulated into K first-type coded data packets, wherein each first-type coded data packet includes N / K different original data packets. At this time, the number of second-type coded data packets can be determined according to the number of original data packets, the code rate, and the number of first-type coded data packets, wherein the number of second-type coded data packets is [K÷(Q2 / Q1)-K], and the number of first-type redundant data packets and second-type redundant data packets respectively included in each of the [K÷(Q2 / Q1)-K] second-type coded data packets is N / K.

[0097] In the present application, Q1 and Q2 are both integers greater than 0 and Q1 is greater than Q2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

[0098] Case 2

[0099] In another possible implementation, the generated multiple coded data packets include three types of coded data packets, including: a first type of coded data packet, a second type of coded data packet, and a third type of coding. The first type of coded data packet is determined based on multiple original data packets; the second type of coded data packet is determined based on a first type of redundant data packet and a second type of redundant data packet; and the third type of coded data packet is determined based on the second type of redundant data packet.

[0100] Assuming that the code rate of the multiple encoded data packets is preset to L2 / L1, and the number of original data packets is N, the N original data packets can be encapsulated into K first-type encoded data packets, wherein each first-type encoded data packet includes N / K different original data packets, and then the number of second-type encoded data packets and the number of third-type encoded data packets are determined according to the number of original data packets, the code rate and the number of first-type encoded data packets, wherein the number of third-type encoded data packets is (K-1), the number of second-type encoded data packets is [K÷(L2 / L1)-K-(K-1)], the number of second-type redundant data packets included in each third-type encoded data packet is N / K, and the number of first-type redundant data packets and second-type redundant data packets included in each second-type encoded data packet is N / K.

[0101] In the present application, L1 and L2 are both integers greater than 0 and L1 is greater than L2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

[0102] Case 3

[0103] The present application proposes that the existing RED method can be combined with the method of the above-mentioned case 1 or case 2 described in the present application when generating a coded data packet.

[0104] In one possible implementation, the number of original data packets is P, and assuming that the bit rate of the multiple encoded data packets is R2 / R1, P first-type encoded data packets can be generated according to the redundant audio data RED encoding method and the number of original data packets; the number of second-type encoded data packets is determined according to the number of original data packets, the bit rate and the number of first-type encoded data packets, wherein the number of second-type encoded data packets is [(P / m)÷(R1 / R2)-P], and the number of first-type redundant data packets and the number of second-type redundant data packets included in each of the [(P / m)÷(R1 / R2)-P] second-type encoded data packets is P / m.

[0105] In another possible implementation, the number of original data packets is P, and assuming that the bit rate of the multiple encoded data packets is R2 / R1, P first type encoded data packets are generated according to the redundant audio data RED encoding method and the number of original data packets; the number of second type encoded data packets and the number of third type encoded data packets are determined according to the number of original data packets, the bit rate and the number of first type encoded data packets, wherein the number of third type encoded data packets is (P-1), the number of second type encoded data packets is [(P / m)÷(R2 / R1)-P-(P-1)], the number of first type redundant data packets and the number of second type redundant data packets included in each second type encoded data packet is P / m, and the number of second type redundant data packets included in the third type encoded data packet is P / m.

[0106] In the present application, R1 and R2 are both integers greater than 0 and R1 is greater than R2, P is an integer greater than or equal to 2 and P is greater than or equal to m.

[0107] In the present application, the code rate can be determined by a person skilled in the art. For example, the code rate Q2 / Q1 is an even number. For example, the code rate Q2 / Q1 is 1 / 4, 1 / 6. For example, the number of original data packets can also be predetermined. In the present application, the number of data packets included in each coded data packet can be determined first, for example, it can be recorded as m, and then the total number of coded data packets of the first type can be determined based on the total number of original data packets, and the number of coded data packets of the second type can be determined based on the code rate. Generally, the number of data packets included in each coded data packet is related to the code rate. For example, when the code rate is 1 / 4, m is 2, N=8; for another example, when the code rate is 1 / 6, m is 3, N=9 (wherein the value of N will affect the delay, generally N is less than or equal to 15). When the code rate is relatively small, the value of m will increase. This is because considering that the smaller the code rate, the more redundant data packets there are, in order to reduce the occupancy of network bandwidth, more data packets can be placed in each coded packet.

[0108] In the present application, based on the above technical solution, on the one hand, since each coded data packet sent includes multiple data packets, that is, multiple data can be piled into a large coded data packet for sending, network bandwidth can be saved. On the other hand, since the multiple coded data packets sent include the second type of coded data packets and the third type of coded data packets, both types of coded data packets include the second type of redundant data packets, and the second type of redundant data packets are determined by calculation of multiple original data packets, so they have strong anti-packet loss capability. In other words, the encoding method provided by the present application can ensure that a smaller network bandwidth is occupied and has a stronger anti-packet loss capability.

[0109] Exemplarily, the following specifically introduces which data packets each generated encoded data packet is composed of for the above different situations.

[0110] Case 1:

[0111] Assume that the bit rate is an odd number, for example, Assuming that a total of N original data packets are input (N is an integer greater than or equal to 2), those skilled in the art can predetermine the number of data packets included in each large coded packet, for example, m. Then, it can be further determined that the number of coded data packets of the first type is k = N / m. In this application, the mk original data packets can be respectively recorded as S1, S2, S3, ..., S mk At this time, based on the code rate and the number of original data packets, it is determined that a total of (2m-1)k coded data packets can be generated (the total number of data packets is (2m-1)km. Specifically, Figure 6 It shows which data packets each coded data packet may be composed of. Figure 6 As shown in the figure, the first k coded data packets in the coded data packet are pure original data packets. For example, the m different original data packets included in the coded data packet #1 are S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15, S16, S17, S18, S19, S20, S21, S22, S23, k+1 ,S 2k+1 ,S 3k+1 ,...,S (m-1)k+1 , the m different original data packets included in the encoded data packet #2 are S2, S k+2 ,S 2k+2 ,S 3k+2 ,...,S (m-1)k+2 For example, the m different original data packets included in the encoded data packet #3 are S3, S k+3 ,S 2k+3 ,S 3k+3 ,...,S (m-1)k+3 , the m different original data packets included in the encoded data packet #k are S k ,S k+k ,S 2k+k ,S 3k+k ,...,S (m-1)k+k .from Figure 6 It can be seen that the data packets in each of the k+1th coded data packets to (2m-1)k coded data packets designed in this application can be understood as "redundant data packets", and these redundant data packets include both pure original data packets and L packets constructed by algebraic operations on multiple original data packets.

[0112] from Figure 6It can be seen that there are two types of redundant data packets. The first type of redundant data packets are pure original data packets, and the second type of redundant data packets are determined by algebraic operations on multiple original data packets. For example, the second type of redundant data packet is L packet, from Figure 6 It can be seen that there can be mk L packets, for example, L1, L2, L3, ..., L k ,L k+1 ,L k+2 ,L k+3 ,L k+k ,L 2k+1 ,L 2k+2 ,L 2k+3 ,L 2k+k ...,L (m-1)k+1 ,L (m-1)k+2 ,...,L (m-1)k+k Among them, any data packet L i =S (i-1modmk)+1 +S (imodmk)+1 ,1≤i≤mk,L i It is a redundant packet obtained by XOR operation of two original data packets. For example, assuming that m = 3, k = 3, then L3 = S [(3-1)mod9]+1 +S (3mod9)+1 =S3+S4. It should be noted that the L given in this application i The formula is only an example. The L shown in this application i The second type of redundant data packet is a double redundant data packet. This is because L i is determined by performing algebraic operations on two original data packets. Of course, the present application does not exclude that the second type of redundant data packet is determined by performing algebraic operations on more than two original data packets. For example, L i It can be a triple redundant data packet or a quadruple redundant data packet, etc., without limitation.

[0113] Figure 6 A schematic diagram of the encoding method provided by the present application is shown, which has the strongest ability to resist continuous packet loss, that is, any continuous (including the case of continuous tail) k encoded data packets can reconstruct all original data packets, so it can resist any continuous (including the case of continuous tail) loss of (2m-2)k large encoded data packets.

[0114] Figure 6 Each coded data packet shown can also be represented by a mask table. Usually, the mask table is attached to the header of each packet. Figure 6 The structure of the coded data packet in is converted into a mask table for representation. Wherein, the following matrix (1) and matrix (2) are both matrices with m rows and columns. The matrix can be understood as a matrix consisting of m row vectors et composed of, among which, e t =e ik+j , 1≤ik+j≤mk, only one element in the row vector is "1", and the rest are "0". Among them, matrix (1) can be used to represent any one of the first mk coded data packets, and matrix (2) can be used to represent any one of the (mk+1)~(2m-1)k coded data packets.

[0115] (1) The mask table of the t=ik+jth coded data packet is shown in the following matrix (1). In the matrix (1), 0≤i≤m-1, 1≤j≤k. It can also be understood as, Figure 6 The first mk coded data packets in can be represented by the following matrix (1).

[0116]

[0117] It should be noted that in this application, for the matrix similar to "e k+j +e k+j+1 " can be understood as L package. As mentioned earlier, L i =S (i-1modmk)+1 +S (imodmk)+1 ,1≤i≤mk, for the matrix "e (i-1)k+j +e (i-1)k+j+1 "(i-1)k+j" can be understood as L i The i in the formula.

[0118] It should be noted that, in this application, i and j are also determined for a specific coded data packet. Figure 6 For the 2kth coded data packet in , the value of i is 1 and the value of j is k. For another example, Figure 6 For the mk+2th encoded data packet in, the value of i is m and the value of j is 2.

[0119] (2) The mask table of the t=ik+jth coded data packet is shown in the following matrix (2). In the matrix (2), m≤i≤2m-2, 1≤j≤k. It can also be understood as, Figure 6 The mk+1th coded data packet to the (2m-1)kth coded data packet in can be represented by the following matrix (2).

[0120]

[0121] It should be noted that in this application, for the “e (i-1)k+j +e (i-1)k+j+1 ", when the subscript i+j>mk, according to L i The formula needs to be modulo mk. For example, assuming i = mk, j = 1, then ei+j =e [(mk+1-1)modmk]+1 =e1.

[0122] Case 2:

[0123] Assume that the bit rate is an even number, for example, Assume that a total of N (i.e., mk) original data packets are input, denoted as S1, S2, S3, ..., S mk At this time, based on the bit rate and the number of original data packets, it is determined that a total of 2mk coded data packets can be generated (the total number of data packets is 2m·k·m). Specifically, Figure 7 It shows which data packets each coded data packet may be composed of. Figure 7 As shown, there are three types of coded data packets. The first type is the first k coded data packets, which are all pure original data packets. The second type of coded data packets are the k+1th coded data packets to the mkth coded data packets, and the (m+1)kth coded data packets to the 2mkth coded data packets, which include both pure original data packets and L packets. The third type of coded data packets is composed entirely of L packets, for example, the (mk+1)th coded data packet, the (mk+2)th coded data packet, and so on.

[0124] in, Figure 7 The first k encoded packets in the encoded packets are all pure original packets. Figure 7 The first k coded packets and Figure 6 The first k coded data packets are similar to the original data packets. The k+1th coded data packets to the mkth coded data packets are similar to Figure 6 The corresponding coded data packets in are similar, the (m+1)kth coded data packets to the 2mkth coded data packets, the mk+2th coded data packets and Figure 6 The (mk+1)th to (2m-1)kth coded data packets in are similar. Figure 6 The difference is that, in case 2, the number also includes a third type of coded data packet, which is composed of L packets, for example, the (mk+1)th coded data packet and the mk+2th coded data packet.

[0125] Figure 7 Each coded data packet shown can also be represented by a mask table. Usually, the mask table is attached to the header of each packet. Figure 7 The structure of the coded data packet in is converted into a mask table for representation. Among them, the following matrices (3) to (6) are all matrices with m rows and mk columns. The matrix can be understood as a matrix consisting of m row vectors e t composed of, among which, e t =eik+j , 1≤ik+j≤mk, only one element in the row vector is "1", and the rest are "0". Among them, matrix (3) can be used to represent any one of the first mk coded data packets; matrix (4) and matrix (5) can be used to represent any one of the coded data packets from (mk+1) to (m+1)k; matrix (6) represents any one of the coded data packets from the (m+1)k+1th coded data packet to the 2mkth coded data packets.

[0126] (1) The mask table of the t=ik+jth coded data packet is shown in the following matrix (3). In the matrix (1), 0≤i≤m-1, 1≤j≤k. It can also be understood as, Figure 7 The first mk coded data packets in can be represented by the following matrix (3).

[0127]

[0128] (2) The mask table of the t=ik+jth coded data packet is shown in the following matrix (4) and matrix (5), where 1≤j≤k. Specifically, in matrix (4), the case of j≠2 is ​​described, and in matrix (5), the case of j=2 is described. It can also be understood that, Figure 7 The (mk+2)th coded data packet can be represented by the following matrix (5), and the (mk+1)th to (m+1)kth coded data packets except the (mk+2)th coded data packet can be represented by the following matrix (4).

[0129]

[0130]

[0131] (3) The mask table of the t=ik+jth encoded data packet is shown in the following matrix (6), where m≤i≤2m-1, 1≤j≤k.

[0132] It can also be understood as, Figure 7 The (m+1)k+1th to 2mkth coded data packets can be represented by the following matrix (6).

[0133]

[0134] Case 3:

[0135] For the case where the RED encoding method is combined with the solution of the present application, the form of the mask matrix can be understood by referring to the above case 1 or the above case 2 and is not shown again.

[0136] 502, sending multiple encoded data packets.

[0137] In the present application, the coded data packets may be sent in the network in the order of the coded data packets. For example, in case 1, the first k coded data packets of the first type may be sent first, and then the following coded data packets of the second type may be sent. For another example, in case 2, k coded data packets of the first type may be sent first, and then the following coded data packets of the second type and the third type may be sent.

[0138] Specifically, a packet header of each of the multiple encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

[0139] Step 503: Receive multiple encoded data packets.

[0140] In the present application, the receiving end may receive multiple encoded data packets sent from the sending end.

[0141] In a possible implementation, a header of each encoded data packet in the plurality of encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

[0142] The receiving end can determine whether the coded data packet is a first type coded data packet or a second type coded data packet according to the mask packet carried in the packet header of each received coded data packet. The first type coded data packet includes multiple original data packets, and the second type coded data packet includes a first type redundant data packet and a second type redundant data packet, wherein the first type redundant data packet includes an original data packet, and the second type redundant data packet is determined by algebraic operation of the multiple original data packets.

[0143] Specifically, the form of the mask table of each type of encoded data packet can refer to the description in the above step 501, which will not be repeated here.

[0144] Step 504: decode the multiple encoded data packets to obtain multiple original data packets.

[0145] In the present application, the packet header of each encoded data packet sent will carry a mask table, which can indicate whether each encoded packet sent is a first type of encoded packet or a second type of encoded packet, thereby assisting the receiving end to decode different types of received encoded data packets.

[0146] Exemplarily, the receiving end can decode the received second type of redundant data packets according to the first type of coded data packets and the first type of redundant data packets, so as to obtain more original data packets. In this way, when the network state is poor, the original data packets lost in the network during the process of sending the coded data packets can be obtained by decoding the second type of redundant data packets. In other words, based on the method provided by the present application, the receiving end can recover the original data packets.

[0147] In this application, the "transmitter" may be understood as the "encoder", and the "receiver" may be understood as the "decoder". For example, 501 to 502 in method 500 may be understood as actions performed by the encoder, and 503 to 504 in method 500 may be understood as actions performed by the decoder.

[0148] Figure 8 is a schematic flow chart of the encoding method proposed in this application, such as Figure 8 As shown in the figure, in order to deal with the packet loss problem during the transmission process, when the user generates the original data packet, the original data packet can be encoded to generate a redundant data packet, and then multiple small packets can be encapsulated to generate a new encoded data packet (that is, encapsulated into an encoded large packet), and finally the encapsulated encoded large packet is sent. When the receiving end loses packets, the original data packet can be read from the received encoded data packet ( Figure 8 Data packets shown in solid lines) and / or redundant data packets ( Figure 8 The data packets (data packets shown by the dotted lines) are decoded by FEC to recover the lost data packets, thereby maintaining the reliability of the audio transmission system.

[0149] In order to further understand the three situations introduced in the above method 500 of the present application, a description is given below through specific examples.

[0150] Example 1

[0151] For case 1 in method 500, in this example, it is assumed that m=3, k=3, and the code rate is From the formula introduced above, we can know that L i =S (i-1mod9)+1 +S (imod9)+9 ,1≤1≤9, in this example, L i It is a double redundant data packet. Fig. 9 shows a structure of a coded data packet, such as Fig. 9 As shown, the first three coded data packets are composed of pure original data packets, that is, the first type of coded data packets; each of the following 12 coded data packets includes both the first type of redundant data packets and the second type of redundant data packets, that is, the second type of coded data packets. Fig. 9The coding structure shown has the strongest ability to resist continuous packet loss, that is, by receiving any three encoded data packets in succession (including the case of continuous tail), all original data packets, namely, S1 to S9, can be restored. It can also be understood that it can resist the continuous loss of 12 data packets.

[0152] Furthermore, you can test Fig. 9 The random packet loss capability of the coding structure shown. The test idea is as follows: Assume that each coded data packet is subjected to packet loss processing with a probability of p, decode it with the total coded data packets received last, and then count the ratio of the original data packets that cannot be recovered after decoding, and repeat the above process 1 million times. The following Table 1 shows that, under a redundancy of 400%, the ratio of data packets that cannot be recovered after data packet reconstruction under different packet loss rates p for the RED code and the coding method provided in this application. It can be seen from Table 1 that when the packet loss rate p≤40%, the ratio of data packets that cannot be recovered after data packet reconstruction according to the coding method provided in this application is reduced by an order of magnitude; when the packet loss rate p>40%, the ratio of data packets that cannot be recovered after reconstruction is also significantly reduced. "Reconstruction" in this application can also be understood as the process in which the decoding end decodes the coded data packet to obtain the original data packet.

[0153] Table 1

[0154]

[0155] In this example, the process of generating redundant data packets is only based on the XOR operation of the finite field, and does not involve the multiplication operation of the finite field. Therefore, the encoding and decoding process is simple and the complexity is low. In addition, small packets (including the original data packets and the redundant data packets generated by algebraic operations on multiple original data packets) can be encapsulated into large coded data packets, which can effectively save the header overhead and make the network bandwidth occupancy low. In addition, the coding structure designed according to this example sends the coded data packets in the network in sequence, which can have the strongest ability to resist continuous packet loss. For example, in this example, the 15 coded data packets sent can tolerate a maximum of 12 consecutive data packets. In other words, only 3 coded data packets need to be received out of the 15 coded data packets to reconstruct all the data packets. Moreover, it can be seen from the above Table 1 that under the same data redundancy, the coding scheme provided by the present application has a significant gain in resistance to random packet loss compared with the RED code.

[0156] Example 2

[0157] For the second case in method 500, in this example, it is assumed that m=3, k=3, and the code rate is From the formula introduced above, we can know that L i =S (i-1mod9)+1 +S (imod9)+9 ,1≤1≤9, in this example, Li It is a double redundant data packet. Fig.10 shows a structure of a coded data packet, such as Fig.10 As shown, the first three coded data packets are composed of pure original data packets, that is, the first type of coded data packets; each of the 13 coded data packets includes both the first type of redundant data packets and the second type of redundant data packets, that is, the second type of coded data packets; and 2 coded data packets are composed of the second type of redundant data packets, that is, the third type of coded data packets. Fig.10 The coding structure shown has the strongest ability to resist continuous packet loss, that is, by receiving any three encoded data packets in succession (including the case of continuous tail), all original data packets, namely, S1 to S9, can be restored. It can also be understood that it can resist the continuous loss of 15 data packets.

[0158] Furthermore, you can test Fig.10 The random packet loss capability of the coding structure shown. The test idea is as follows: Assume that each coded data packet is subjected to packet loss processing with a probability of p, decode it with the total coded data packets received last, and then count the ratio of the original data packets that cannot be recovered after decoding, and repeat the above process 1 million times. The following Table 2 shows that at a redundancy of 500%, the ratio of data packets that cannot be recovered after data packet reconstruction under different packet loss rates p for the RED code and the coding method provided in this application. It can be seen from Table 2 that when the packet loss rate p≤50%, the ratio of data packets that cannot be recovered after data packet reconstruction according to the coding method provided in this application is reduced by an order of magnitude; when the packet loss rate p>50%, the ratio of data packets that cannot be recovered after reconstruction is also significantly reduced.

[0159] Table 2

[0160]

[0161] In this example, the process of generating redundant data packets is only based on the XOR operation of the finite field, and does not involve the multiplication operation of the finite field. Therefore, the encoding and decoding process is simple and the complexity is low. In addition, small packets (including the original data packets and the redundant data packets generated by algebraic operations on multiple original data packets) can be encapsulated into large coded data packets, which can effectively save the header overhead and make the network bandwidth occupancy low. In addition, the coding structure designed according to this example sends the coded data packets in the network in sequence, which can have the strongest ability to resist continuous packet loss. For example, in this example, the 18 coded data packets sent can tolerate a maximum of 15 consecutive data packets. In other words, only 3 coded data packets need to be received out of the 18 coded data packets to reconstruct all the data packets. Moreover, it can be seen from the above Table 2 that under the same data redundancy, the coding scheme provided in this application has a significant gain in resistance to random packet loss compared with the RED code.

[0162] Example 3

[0163] Taking into account the delay problem, the technical solution of this application can be further optimized. Fig. 9 or Fig.10 It can be found that each of the first three coded data packets needs to completely receive the corresponding original data packet before the coded data packet can be sent out. In other words, the first three coded data packets cannot be sent out in real time. For example, Fig. 9 In the coded data packets shown, the first coded data packet includes the original data packets S1, S4, and S7. Therefore, the first coded data packet must wait until the original data packets S1, S4, and S7 are completely received before it can be sent out; the second coded data packet includes the original data packets S2, S5, and S8. Therefore, the second coded data packet must wait until the original data packets S2, S5, and S8 are completely received before it can be sent out; the third coded data packet is similar. In this way, each of the first three coded data packets needs to wait until the corresponding coded data packet is completely received before it can be sent, and the delay will be relatively large. However, from Figure 4 From the technical solution of RED encoding shown, it can be seen that in the RED solution, the original data packet included in the first encoded data packet is S1, the original data packets included in the second encoded data packet are S1 and S2, the original data packets included in the third encoded data packet are S1, S2 and S3, and so on. It can be found that in the RED solution, each encoded data packet in the RED solution does not need to wait for the subsequent original data packets, so the delay in the RED solution is smaller.

[0164] In order to solve the problem in this application Fig. 9 , Fig.10 To solve the problem of large delay in the coding structure shown, you can choose to combine the RED scheme with the coding method provided by this application. In the early stage of data packet generation, when there are fewer data blocks, you can choose to use the RED scheme for encoding first, and in the middle and late stages, when there are sufficient data blocks, you can use the coding method proposed by this application. This can not only solve the problem of real-time transmission, but also effectively improve the coding efficiency.

[0165] It should be noted that in this application Fig. 9 , Fig.10 The coding structure shown is also just an example. For example, Fig.11 Can be Fig. 9 A deformation of Fig.11 The original data included in each encoded data packet is Fig. 9 The original data packets included in each encoded data packet are different. Fig.11 In, L i It is still a double redundant data packet, but Fig.11 Middle composition L i Multiple original packets with Fig. 9 Middle composition L i The multiple original data packets are different.

[0166] Fig.12 The coding method combining the RED scheme with the scheme of the present application is shown. Fig. 9 Compared with the method Fig.12 In the coding scheme shown, the first two coded data packets can be sent out in real time without waiting for the following original data packets, and the 4th coded data packet and the 5th coded data packet, as well as the 7th coded data packet and the 8th coded data packet can be sent out in real time without waiting for the following data packets. Fig.12 The coding scheme shown solves the delay problem, and each coded data packet can be generated and sent out in real time. Of course, the combination of the two coding methods will inevitably sacrifice the bit rate, but Fig.12 The code rate of the coding method is still higher than that of the RED code. Therefore, for delay-sensitive scenarios, Fig.12 The encoding method shown.

[0167] In this example, the process of generating redundant data packets is only based on the XOR operation of the finite field, and does not involve the multiplication operation of the finite field. Therefore, the encoding and decoding process is simple and the complexity is low. In addition, small packets (including the original data packets and the redundant data packets generated by algebraic operations on multiple original data packets) can be encapsulated into large coded data packets, which can effectively save the header overhead and make the network bandwidth occupancy lower. In addition, according to the coding structure designed in this example, the coded data packets do not need to wait and can be sent out in real time, which reduces the delay and improves the user experience. Moreover, the coding resistance of this method to continuous packet loss is significantly higher than that of the RED scheme, and 21 coded data packets can tolerate up to 12 consecutive losses. In addition, its resistance to random packet loss performance is also significantly better than that of the RED code.

[0168] It can be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0169] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0170] The embodiment of the present application can divide the computing device into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0171] Fig.13 1 is a schematic block diagram of a computing device 101 provided in an embodiment of the present application. Fig.13 As shown, the computing device 101 may include: a generating module 110A and a sending module 120A.

[0172] The above modules are respectively used to execute the steps 501 to 502 in the above encoding method 500, which will not be described in detail here.

[0173] Fig.14 1 is a schematic block diagram of a computing device 102 provided in an embodiment of the present application. Fig.14 As shown, the computing device 102 may include: a decoding module 110B and a receiving module 120B.

[0174] The above modules are respectively used to execute the steps 503 to 504 in the above encoding method 500, which will not be described in detail here.

[0175] It should also be understood that the computing devices 101, 102 herein are embodied in the form of functional units. The term "unit" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0176] The computing devices 101 and 102 of the above-mentioned various solutions have the function of implementing the corresponding steps of the above-mentioned method 500. The functions can be implemented by hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above-mentioned functions; for example, the determination unit and the like can be replaced by a processor to respectively perform the transceiver operations and related processing operations in each method embodiment. In addition, the determination unit can be a processing circuit.

[0177] It should be pointed out that Fig.13 , Fig.14 The computing device in the above method embodiment may be a computing device, or a chip or chip system of a computing device, such as a system on chip (SoC). The processing unit is a processor or microprocessor or integrated circuit integrated on the chip. This is not limited here.

[0178] Fig.15 2 is a schematic block diagram of another computing device 200 provided by an embodiment of the present application. As shown in the figure, the device 200 includes: at least one processor 220. The processor 220 is coupled to the memory and is used to execute instructions stored in the memory to send signals and / or receive signals. Optionally, the device 200 also includes a memory 230 for storing instructions. Optionally, the device 200 also includes a transceiver 210, and the processor 220 controls the transceiver 210 to send signals and / or receive signals.

[0179] It should be understood that the processor 220 and the memory 230 can be combined into one processing device, and the processor 220 is used to execute the program code stored in the memory 230 to implement the above functions. In specific implementation, the memory 230 can also be integrated into the processor 220, or independent of the processor 220.

[0180] It should also be understood that the transceiver 210 may include a transceiver (or receiver) and a transmitter (or transmitter). The transceiver may further include an antenna, and the number of antennas may be one or more. The transceiver 210 may also be a communication interface or an interface circuit.

[0181] Specifically, the processor 220 in the device 200 may correspond to the generating module 110A in the computing device 101. The transceiver 210 in the device 200 may correspond to the sending module 120A in the computing device 101.

[0182] As a solution, the computing device 200 is used to implement 501 to 502 in the above method 500 embodiment.

[0183] For example, the processor 220 is used to execute the computer program or instructions stored in the memory 230 to implement 501 to 502 in the above method 500 .

[0184] Specifically, the processor 220 in the device 200 may correspond to the decoding module 110B in the computing device 102. The transceiver 210 in the device 200 may correspond to the receiving module 120B in the computing device 102.

[0185] As a solution, the computing device 200 is used to implement 503 to 504 in the above method 500 embodiment.

[0186] For example, the processor 220 is used to execute the computer program or instructions stored in the memory 230 to implement 503 to 504 in the above method 500 .

[0187] It should be noted that the computing device provided in this application may also be a computing device deployed on the cloud, for example, a server or a virtual machine in a cloud system.

[0188] According to the method provided in the embodiment of the present application, the present application also provides a computer program product, on which a computer program code is stored. When the computer program code is run on a computer, the computer executes 501 to 502 in the embodiment of the method 500, or the computer executes 503 to 504 in the embodiment of the method 500.

[0189] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable medium, which stores a program code. When the program code runs on a computer, the computer executes 501 to 502 in the above-mentioned method 500 embodiment, or the computer executes 503 to 504 in the above-mentioned method 500 embodiment.

[0190] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.

[0191] It should be understood that the specific process of each transceiver and processor executing the above corresponding steps has been described in detail in the above method embodiment, and for the sake of brevity, it will not be repeated here.

[0192] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0193] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (digitalsignal processor, DSP), an application-specific integrated circuit (application-specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0194] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0195] In the above-mentioned various device embodiments, the corresponding modules or units perform the corresponding steps. For example, the transceiver unit (transceiver) performs the steps of receiving or sending in the method embodiment, and other steps except sending and receiving can be performed by the processing unit (processor). The functions of the specific units can refer to the corresponding method embodiments. Among them, there can be one or more processors.

[0196] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0197] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0198] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0202] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0203] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A coding method, characterized in that: include: Generate multiple coded data packets according to multiple original data packets, wherein the multiple coded data packets include a first type of coded data packets and a second type of coded data packets, wherein the first type of coded data packets are determined according to the multiple original data packets, and the second type of coded data packets are determined according to a first type of redundant data packets and a second type of redundant data packets, the first type of redundant data packets are determined by one original data packet, and the second type of redundant data packets are determined by performing calculations on the multiple original data packets; The plurality of encoded data packets are transmitted.

2. The method according to claim 1, characterized in that The second type of redundant data packet is determined by performing a modulo-2 addition operation on the plurality of original data packets.

3. The method according to claim 1 or 2, characterized in that: The code rate of the multiple encoded data packets is Q2 / Q1, the number of the original data packets is N, The step of generating a plurality of encoded data packets according to a plurality of original data packets comprises: Encapsulating the N original data packets into K coded data packets of the first type, wherein each coded data packet of the first type includes N / K different original data packets; Determine the number of the second type of coded data packets according to the number of the original data packets, the code rate, and the number of the first type of coded data packets, wherein the number of the second type of coded data packets is [K÷(Q2 / Q1)-K], and the number of the first type of redundant data packets and the second type of redundant data packets included in each second type of coded data packet is N / K; Among them, Q1 and Q2 are both integers greater than 0 and Q1 is greater than Q2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

4. The method according to any one of claims 1 to 3, characterized in that The plurality of encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type are determined based on the redundant data packets of the second type.

5. The method according to claim 4, characterized in that The code rate of the multiple encoded data packets is L2 / L1, the number of the original data packets is N, The step of generating a plurality of encoded data packets according to a plurality of original data packets comprises: Encapsulating the N original data packets into K coded data packets of the first type, wherein each coded data packet of the first type includes N / K different original data packets; Determine, according to the number of the original data packets, the code rate, and the number of the first type of coded data packets, the number of the second type of coded data packets and the number of the third type of coded data packets, wherein the number of the third type of coded data packets is (K-1), the number of the second type of coded data packets is [K÷(L2 / L1)-K-(K-1)], the number of the first type of redundant data packets and the second type of redundant data packets included in each second type of coded data packet is N / K, and the number of the second type of redundant data packets included in each third type of coded data packet is N / K; Wherein, L1 and L2 are both integers greater than 0 and L1 is greater than L2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

6. The method according to any one of claims 1 to 3, characterized in that The number of the original data packets is P, the code rate of the multiple encoded data packets is R2 / R1, The step of generating a plurality of encoded data packets according to a plurality of original data packets comprises: Generate P first type encoded data packets according to the redundant audio data RED encoding method and the number of the original data packets; Determine the number of the second-type coded data packets according to the number of the original data packets, the code rate, and the number of the first-type coded data packets, wherein the number of the second-type coded data packets is [(P / m)÷(R2 / R1)-P], and the number of the first-type redundant data packets and the number of the second-type redundant data packets included in each second-type coded data packet is P / m; Wherein, R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

7. The method according to claim 4 or 5, characterized in that: The number of the original data packets is P, the code rate of the multiple encoded data packets is R2 / R1, The step of generating a plurality of encoded data packets according to a plurality of original data packets comprises: Generate P first type encoded data packets according to the redundant audio data RED encoding method and the number of the original data packets; Determine the number of the second type of coded data packets and the number of the third type of coded data packets according to the number of the original data packets, the code rate, and the number of the first type of coded data packets, wherein the number of the third type of coded data packets is (P-1), the number of the second type of coded data packets is [(P / m)÷(R2 / R1)-P-(P-1)], the number of the first type of redundant data packets and the number of the second type of redundant data packets included in each second type of coded data packet is P / m, and the number of the second type of redundant data packets included in each third type of coded data packet is P / m; Wherein, R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

8. The method according to any one of claims 1 to 7, characterized in that The header of each encoded data packet in the multiple encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

9. A decoding method, characterized in that: include: Receive a plurality of coded data packets, wherein the plurality of coded data packets include a first type of coded data packet and a second type of coded data packet, wherein the first type of coded data packet is determined according to a plurality of original data packets, the second type of coded data packet is determined according to a first type of redundant data packet and a second type of redundant data packet, the first type of redundant data packet is determined by an original data packet, and the second type of redundant data packet is determined by performing calculations on the plurality of original data packets; The multiple encoded data packets are decoded to obtain the multiple original data packets.

10. The method according to claim 9, characterized in that The second type of redundant data packet is determined by performing a modulo-2 addition operation on a plurality of original data packets.

11. The method according to claim 9 or 10, characterized in that: The plurality of encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type include redundant data packets of the second type.

12. The method according to any one of claims 9 to 11, characterized in that The header of each encoded data packet in the multiple encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

13. A computing device, characterized in that: include: Generate module, send module, among which, The generating module is used to generate a plurality of coded data packets according to a plurality of original data packets, wherein the plurality of coded data packets include a first type of coded data packets and a second type of coded data packets, wherein the first type of coded data packets are determined according to the plurality of original data packets, the second type of coded data packets are determined according to a first type of redundant data packets and a second type of redundant data packets, the first type of redundant data packets are determined by one original data packet, and the second type of redundant data packets are determined by performing calculations on the plurality of original data packets; The sending module is used to send the multiple encoded data packets.

14. The computing device according to claim 12, wherein: The second type of redundant data packet is determined by performing a modulo-2 addition operation on a plurality of original data packets.

15. The computing device according to claim 13 or 14, characterized in that The code rate of the multiple encoded data packets is Q2 / Q1, the number of the original data packets is N, The generating module is used to generate a plurality of coded data packets according to a plurality of original data packets, including: The generating module is used to encapsulate the N original data packets into K coded data packets of the first type, wherein each coded data packet of the first type includes N / K different original data packets; The generating module is used to determine the number of the second type of coded data packets according to the number of the original data packets, the code rate and the number of the first type of coded data packets, wherein the number of the second type of coded data packets is [K÷(Q2 / Q1)-K], and the number of the first type of redundant data packets and the second type of redundant data packets included in each second type of coded data packet is N / K; Among them, Q1 and Q2 are both integers greater than 0 and Q1 is greater than Q2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

16. The computing device according to any one of claims 13 to 15, characterized in that: The plurality of encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type are determined based on redundant data packets of the second type.

17. The computing device according to claim 16, characterized in that The code rate of the multiple encoded data packets is L2 / L1, the number of the original data packets is N, The generating module is used to generate a plurality of coded data packets according to a plurality of original data packets, including: The generating module is used to encapsulate the N original data packets into K coded data packets of the first type, wherein each coded data packet of the first type includes N / K different original data packets; The generating module is used to determine the number of the second type of coded data packets and the number of the third type of coded data packets according to the number of the original data packets, the code rate and the number of the first type of coded data packets, wherein the number of the third type of coded data packets is (K-1), the number of the second type of coded data packets is [K÷(L2 / L1)-K-(K-1)], the number of the second type of redundant data packets included in each third type of coded data packet is N / K, and the number of the first type of redundant data packets and the number of the second type of redundant data packets included in each second type of coded data packet is N / K; Wherein, L1 and L2 are both integers greater than 0 and L1 is greater than L2, N and K are both integers greater than or equal to 2 and N is greater than or equal to K.

18. The computing device according to any one of claims 13 to 15, characterized in that: The number of the original data packets is P, the code rate of the multiple encoded data packets is R2 / R1, The generating module is used to generate a plurality of coded data packets according to a plurality of original data packets, including: The generating module is used to generate P first type encoded data packets according to the redundant audio data RED encoding method and the number of the original data packets; The generating module is used to determine the number of the second type of coded data packets according to the number of the original data packets, the code rate and the number of the first type of coded data packets, wherein the number of the second type of coded data packets is [(P / m)÷(R2 / R1)-P], and the number of the first type of redundant data packets and the number of the second type of redundant data packets included in each second type of coded data packet is P / m; Wherein, R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

19. The computing device according to claim 16 or 17, characterized in that The number of the original data packets is P, the code rate of the multiple encoded data packets is R2 / R1, The generating module is used to generate a plurality of coded data packets according to the original data packet, including: The generating module is used to generate P first type encoded data packets according to the redundant audio data RED encoding method and the number of the original data packets; The generating module is used to determine the number of the second type of coded data packets and the number of the third type of coded data packets according to the number of the original data packets, the code rate and the number of the first type of coded data packets, wherein the number of the third type of coded data packets is (P-1), the number of the second type of coded data packets is [(P / m)÷(R2 / R1)-P-(P-1)], the number of the first type of redundant data packets and the second type of redundant data packets included in each second type of coded data packet is P / m, and the number of the second type of redundant data packets included in each third type of coded data packet is P / m; Wherein, R1 and R2 are both integers greater than 0 and R1 is greater than R2, and P is an integer greater than or equal to 2 and P is greater than or equal to m.

20. The computing device according to any one of claims 13 to 19, characterized in that The plurality of encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type include redundant data packets of the second type.

21. The computing device according to any one of claims 13 to 20, characterized in that The header of each encoded data packet in the multiple encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

22. The computing device according to any one of claims 13 to 21, characterized in that The computing device is deployed on a cloud server for artificial intelligence (AI) applications.

23. A computing device, characterized in that include: Receiving module, decoding module, wherein, The receiving module is used to receive a plurality of coded data packets, wherein the plurality of coded data packets include a first type of coded data packet and a second type of coded data packet, wherein the first type of coded data packet is determined according to a plurality of original data packets, the second type of coded data packet is determined according to a first type of redundant data packet and a second type of redundant data packet, the first type of redundant data packet is determined by an original data packet, and the second type of redundant data packet is determined by performing calculations on the plurality of original data packets; The decoding module is used to decode the multiple encoded data packets to obtain the multiple original data packets.

24. The computing device of claim 23, wherein: The second type of redundant data packet is determined by performing a modulo-2 addition operation on a plurality of original data packets.

25. The computing device according to claim 23 or 24, characterized in that The plurality of encoded data packets further include encoded data packets of a third type, wherein the encoded data packets of the third type include redundant data packets of the second type.

26. The computing device according to any one of claims 23 to 25, characterized in that The header of each encoded data packet in the multiple encoded data packets carries a mask table, and the mask table is used to indicate the type of each encoded data packet.

27. The computing device according to any one of claims 23 to 26, characterized in that The computing device is deployed on a cloud server for artificial intelligence (AI) applications.

28. A computing device, characterized in that The method comprises a processor and a memory, wherein the processor runs instructions in the memory, so that the processor executes the method according to any one of claims 1 to 8, or the processor executes the method according to any one of claims 9 to 12.

29. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method as claimed in any one of claims 1 to 8, or so that the computing device cluster executes the method as claimed in any one of claims 9 to 12.

30. A computer program product comprising instructions, characterized in that When the instruction is executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 8, or the computing device cluster executes the method according to any one of claims 9 to 12.

31. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 8, or causes the computing device cluster to execute the method according to any one of claims 9 to 12.

Citation Information

Patent Citations

  • Method, apparatus and system for data packet redundant encoding and decoding

    CN101359981A

  • Streaming media transmission fault-tolerant control method and system

    CN115314479A

  • Method and device for imparting and interpreting error tolerance

    JP2002204220A

  • Video transmission device and program

    JP2016119557A

  • Non-repeating random values in user specified formats and character sets

    US20090271361A1

Cited By

  • Feature interleaving and entropy coding packet loss resistant transmission method for 5G-R scene

    CN122293882A

  • Feature adaptive hierarchical protection and packet loss repair method for real-time video session

    CN122534227A

  • Coding method, decoding method, and computing device

    EP4712482A1

  • Coding method, decoding method, and computing device

    WO2024255297A1