Adaptive FEC decoding method and device

By introducing the verification update generation matrix into the FEC decoding process of the receiver, the problem that it is difficult for the sending and receiving end to agree on the same FEC parameters is solved, and the adaptive decoding of FEC technology and the expansion of application scenarios are realized.

CN119652468APending Publication Date: 2025-03-18SHENZHEN PERFECT STAR TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411848783.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the prior art, it is difficult for the sending end and the receiving end of data communication to agree on the same FEC parameters, resulting in the receiving end being unable to correct errors in data transmission.

Method used

The process of verification update generation matrix is ​​introduced in the FEC decoding process at the receiving end to realize FEC adaptive decoding. The receiver can adapt to multiple transmitters of different generation matrices and dynamically adjust the generation matrices.

Benefits of technology

Adaptive decoding of FEC technology is realized, the application scenario is expanded, and the efficiency of the receiver in the development docking stage is improved without knowing the generation matrix used by the transmitter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652468A_ABST
    Figure CN119652468A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive FEC (Forward Error Correction) decoding method and a self-adaptive FEC decoding device, which are applied to a receiving end and comprise the following steps: judging whether a group of data packets and redundant coding packets sent by a sending end are received or not; if a group of data packets and redundant coding packets are received, judging whether the data packets are complete or not; if the data packet is complete, sending the data packet to a data processing module of an application layer for processing, and verifying and updating the generated matrix; if the data packet is incomplete, judging whether a generation matrix exists or not; if the generation matrix exists, recovering the data packet and the redundant coding packet through the generation matrix to obtain a lost data packet; forming a complete data packet by the lost data packet and the received data packet, and sending the complete data packet to an application layer for processing; if the generation matrix does not exist, the data packet is sent to an application layer for processing; the FEC self-adaptive decoding is realized by introducing a verification updating generation matrix process into an FEC decoding process of a receiving end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an adaptive FEC decoding method and device. Background Art

[0002] Forward Error Correction (FEC) is a mechanism that provides reliability for data sent over a communication link. The sender sends the data to be sent together with the corresponding redundant coded information. When the receiver finds that the received data is lost, it can recover the lost data without the data sender having to retransmit the data. Standardized FEC codes include Reed-Solomon, Raptor, RaptorQ, and Low-Density Parity Check (LDPC) codes.

[0003] IPTV live broadcasts mostly use multicast to transmit program streams, which can save a lot of bandwidth. However, when the network environment is poor, packet loss may cause screen distortion and freezes. Using FEC technology in multicast live broadcasts can reduce packet loss errors and improve the playback experience. IPTV multicast uses the Reed-Solomon FEC algorithm.

[0004] Reed-Solomon FEC communication technology Figure 1 As shown, the sending end generates original data by the data generation module of the application layer (such as a video encoder), and after a group of data is assembled, it is encoded by the FEC encoding module to obtain the data to be sent (including the original data and redundant encoded data), and finally sent out by the data sending module.

[0005] After the receiving end receives a set of complete or partial original data and redundant coded data through the data receiving module, it recovers the original data that may be lost through the FEC decoding module, obtains the complete original data, and finally sends it to the data processing module (such as video decoder) of the application layer for processing. When the two communicating parties agree on the generation matrix GM, forward error correction can be achieved.

[0006] However, the existing technology requires that the data communication sender and receiver agree on the same FEC parameters. In the real environment, it is often difficult for both parties to agree on the parameters. Specifically: 1) The lack of R&D technical support at the sender makes it impossible for the receiver to know the generation matrix; 2) The receiver is connected to multiple senders, each of which has a different generation matrix, and the receiver cannot distinguish between different senders; 3) The sender modifies the generation matrix and the receiver does not have time to update it synchronously. In this case, when errors occur in the data transmission between the two parties, the receiver will not be able to correct the errors. Summary of the invention

[0007] In view of this, the purpose of the present invention is to provide an adaptive FEC decoding method and device, which realizes FEC adaptive decoding by introducing a check and update generation matrix process in the FEC decoding process of the receiving end; the receiving end can adapt to multiple senders with different generation matrices and adaptively and dynamically adjust the sender of the generation matrix, thereby expanding the application scenarios of FEC technology; the receiving end does not need to know the generation matrix used by the sending end during the development and docking stage, thereby improving the docking efficiency.

[0008] In a first aspect, an embodiment of the present invention provides an adaptive FEC decoding method, which is applied to a receiving end. The method includes:

[0009] Determine whether a group of data packets and redundant coded packets sent by a sender are received;

[0010] If a group of the data packet and the redundant coded packet is received, determining whether the data packet is complete;

[0011] If the data packet is complete, the data packet is sent to a data processing module of the application layer for processing, and the generation matrix is ​​updated and verified;

[0012] If the data packet is incomplete, determining whether the generator matrix exists;

[0013] If the generator matrix exists, the data packet and the redundant coded packet are restored by using the generator matrix to obtain the lost data packet;

[0014] The lost data packet and the received data packet are combined into a complete data packet, and the complete data packet is sent to the application layer for processing;

[0015] If the generator matrix does not exist, the data packet is sent to the application layer for processing.

[0016] Furthermore, the verification update generates a matrix, including:

[0017] Determining whether the redundant coding packet is complete;

[0018] If the redundant coding packet is incomplete, then end;

[0019] If the redundant coding packet is complete, determining whether the generator matrix exists;

[0020] If the generator matrix does not exist, calculate the generator matrix and update it locally;

[0021] If the generator matrix exists, the generator matrix and the data packet matrix are calculated to obtain a local redundant coding packet;

[0022] Determining whether the local redundant coding packet and the redundant coding packet are the same;

[0023] If they are the same, then end;

[0024] If they are different, the generator matrix is ​​calculated and updated to the local.

[0025] Further, calculating the generator matrix includes:

[0026] The data packets are sequentially constructed into a first matrix, where the size of the first matrix is ​​m*l;

[0027] The redundant coded packets are sequentially constructed into a second matrix, where the size of the second matrix is ​​n*l;

[0028] Extract m non-repeating numbers from columns 1 to l to form a set of subscripts;

[0029] Extract m columns from the first matrix according to the subscript to form a first submatrix;

[0030] Extracting the m columns from the second matrix according to the subscripts to form a second submatrix;

[0031] Determine whether the first submatrix has an inverse matrix;

[0032] If the inverse matrix exists, calculating the second submatrix and the inverse matrix to obtain the generator matrix;

[0033] If the inverse matrix does not exist, continue to extract the m non-repeating numbers from the 1 to l columns, and repeat the above steps until the generator matrix exists.

[0034] Furthermore, after the data packet is complete and the data packet is sent to a data processing module of the application layer for processing, the method further includes:

[0035] When a single check is performed, determining whether the generator matrix has passed the check;

[0036] If the verification fails, the generator matrix is ​​verified and updated, and a verification pass flag of the generator matrix is ​​set.

[0037] Furthermore, after the data packet is complete and the data packet is sent to a data processing module of the application layer for processing, the method further includes:

[0038] When periodic verification is performed, the first time is recorded;

[0039] Determine whether the generation matrix fails to pass the verification or whether the time interval is greater than a preset detection interval;

[0040] If yes, verify and update the generator matrix, set a verification pass flag of the generator matrix, and record the second time;

[0041] The time interval is the interval between the first time and the second time, the first time is the time corresponding to the current cycle, and the second time is the time corresponding to the previous cycle.

[0042] In a second aspect, an embodiment of the present invention provides an adaptive FEC decoding device, which is applied to a receiving end, and the device includes:

[0043] A first judgment module is used to judge whether a group of data packets and redundant coded packets sent by a sending end are received;

[0044] A second judgment module is used to judge whether the data packet is complete when a group of the data packet and the redundant coded packet are received;

[0045] A verification and updating module, used for sending the data packet to the data processing module of the application layer for processing when the data packet is complete, and verifying and updating the generation matrix;

[0046] A third judgment module is used to judge whether the generation matrix exists when the data packet is incomplete;

[0047] A recovery module, used for recovering the data packet and the redundant coded packet by using the generation matrix to obtain the lost data packet when the generation matrix exists;

[0048] a constituting module, configured to constitute a complete data packet by combining the lost data packet and the received data packet, and send the complete data packet to the application layer for processing;

[0049] The processing module is used to send the data packet to the application layer for processing when the generation matrix does not exist.

[0050] Furthermore, the verification update module is specifically used for:

[0051] Determining whether the redundant coding packet is complete;

[0052] If the redundant coding packet is incomplete, then end;

[0053] If the redundant coding packet is complete, determining whether the generator matrix exists;

[0054] If the generator matrix does not exist, calculate the generator matrix and update it locally;

[0055] If the generator matrix exists, the generator matrix and the data packet matrix are calculated to obtain a local redundant coding packet;

[0056] Determining whether the local redundant coding packet and the redundant coding packet are the same;

[0057] If they are the same, then end;

[0058] If they are different, the generator matrix is ​​calculated and updated to the local.

[0059] Furthermore, the verification update module is specifically used for:

[0060] The data packets are sequentially constructed into a first matrix, where the size of the first matrix is ​​m*l;

[0061] The redundant coded packets are sequentially constructed into a second matrix, where the size of the second matrix is ​​n*l;

[0062] Extract m non-repeating numbers from columns 1 to l to form a set of subscripts;

[0063] Extract m columns from the first matrix according to the subscript to form a first submatrix;

[0064] Extracting the m columns from the second matrix according to the subscripts to form a second submatrix;

[0065] Determine whether the first submatrix has an inverse matrix;

[0066] If the inverse matrix exists, calculating the second submatrix and the inverse matrix to obtain the generator matrix;

[0067] If the inverse matrix does not exist, continue to extract the m non-repeating numbers from the 1 to l columns, and repeat the above steps until the generator matrix exists.

[0068] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described above when executing the computer program.

[0069] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute the method as described above.

[0070] The embodiment of the present invention provides an adaptive FEC decoding method and device, which is applied to a receiving end, including: judging whether a group of data packets and redundant coding packets sent by a sending end are received; if a group of data packets and redundant coding packets are received, judging whether the data packets are complete; if the data packets are complete, sending the data packets to a data processing module of an application layer for processing, and verifying and updating a generation matrix; if the data packets are incomplete, judging whether a generation matrix exists; if a generation matrix exists, recovering the data packets and redundant coding packets through the generation matrix to obtain the lost data packets; forming a complete data packet with the lost data packets and the received data packets, and sending the complete data packet to the application layer for processing; if the generation matrix does not exist, sending the data packets to the application layer for processing; by introducing a verification and updating generation matrix process in the FEC decoding process of the receiving end, FEC adaptive decoding is realized; the receiving end can adapt to multiple sending ends with different generation matrices and the sending end of the generation matrix adaptively and dynamically adjusts, thereby expanding the application scenarios of the FEC technology; the receiving end does not need to know the generation matrix adopted by the sending end in the development and docking stage, thereby improving the docking efficiency.

[0071] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0072] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0074] Figure 1 A schematic diagram of FEC communication technology provided by the prior art;

[0075] Figure 2 A flow chart of an adaptive FEC decoding method provided in Embodiment 1 of the present invention;

[0076] Figure 3 A schematic diagram of a check update generation matrix process provided in the first embodiment of the present invention;

[0077] Figure 4 A schematic diagram of a calculation matrix generation process provided in the first embodiment of the present invention;

[0078] Figure 5 A flow chart of a single-check adaptive FEC decoding method provided in Embodiment 2 of the present invention;

[0079] Figure 6 A flow chart of an adaptive FEC decoding method for periodic check provided in Embodiment 3 of the present invention;

[0080] Figure 7 A schematic diagram of an adaptive FEC decoding device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0081] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0082] The FEC coding algorithm can be obtained from formula (1):

[0083]

[0084] Among them, m is the number of a group of data, l is the length of a single data, n is the number of a group of encoded data, s is an m*l matrix composed of a group of original data, E is the m*m unit matrix, GM is the n*m ​​generator matrix, and e is the n*l redundant encoded data matrix obtained by multiplying the matrix GM and the matrix s.

[0085] The calculation of the redundant coding data matrix refers to formula (2):

[0086] GM n×m ×s m×l =e n×l (2)

[0087] The FEC decoding algorithm can be obtained from formula (3):

[0088]

[0089] Among them, subs are the r data received. When r = m, it means a group of complete data is received and no recovery processing is required; when r < m, it means the received data is incomplete and recovery processing is needed. If the number of received redundant encoded data is greater than or equal to (m - r), the complete original data matrix s can be calculated and recovered through the above formula, where sube is an (m - r) * l matrix formed by selecting (m - r) from the received redundant encoded data, subE is a sub-matrix formed by extracting the r rows corresponding to subs from the identity matrix E, and subGM is a sub-matrix formed by extracting the (m - r) rows corresponding to sube from the generating matrix GM.

[0090] In network communication, the above formula often adopts the operation rules of the Galois finite field GF(2 8 ).

[0091] For the convenience of understanding this embodiment, the embodiments of the present invention will be introduced in detail below.

[0092] Embodiment 1:

[0093] Figure 2 It is a flowchart of the adaptive FEC decoding method provided by Embodiment 1 of the present invention.

[0094] Referring to Figure 2 , applied to the receiving end, the method includes the following steps:

[0095] Step S101, determine whether a group of data packets and redundant encoded packets sent by the sending end are received;

[0096] Step S102, if a group of the data packets and redundant encoded packets are received, determine whether the data packets are complete;

[0097] Step S103, if the data packets are complete, send the data packets to the data processing module of the application layer for processing,

[0098] Step S104, verify and update the generating matrix;

[0099] Step S105, if the data packets are incomplete, determine whether there is a generating matrix;

[0100] Step S106, if there is a generating matrix, recover the lost data packets by passing the data packets and redundant encoded packets through the generating matrix; form a complete data packet with the lost data packets and the received data packets, and send the complete data packet to the application layer for processing;

[0101] Step S107, if there is no generating matrix, send the data packets to the application layer for processing.

[0102] The present application is applied to the receiving end without adjusting the sending end. The scheme adds an adaptive generation and update generation matrix sub-process to the receiving data and recovery data process of the receiving end. It is judged whether the received data packet is complete. If so, the data packet is sent to the data processing module of the application layer for processing, and the generation matrix is ​​updated; if not, the generation matrix is ​​used to recover the lost data packet from the received data packet and the redundant coding packet; the received data packet and the lost data packet are combined into a complete data packet.

[0103] Further, see Figure 3 , the verification update generation matrix includes the following steps:

[0104] Step S201, determining whether the redundant coding packet is complete; if the redundant coding packet is incomplete, executing step S202; if the redundant coding packet is complete, executing step S203;

[0105] Step S202, end;

[0106] Step S203, determine whether there is a generator matrix; if there is no generator matrix, execute step S204; if there is a generator matrix, execute step S205;

[0107] Step S204, calculate the generation matrix and update it locally;

[0108] Step S205, calculating the generation matrix and the data packet matrix to obtain a local redundant coding packet;

[0109] Step S206, determining whether the local redundant coding package and the redundant coding package are the same; if they are the same, executing step S202; if they are different, executing step S204.

[0110] After receiving the complete data packet and the redundant coded packet, the check generator matrix can be updated. When the generator matrix does not exist, the generator matrix can be directly calculated.

[0111] When a generator matrix exists, the generator matrix and the data packet matrix are multiplied to obtain a local redundant coding packet, which is then compared with the received redundant coding packet; if they are the same, it means that the generator matrix of the receiving end is consistent with the generator matrix of the sending end and no update is required; if they are different, the generator matrix needs to be calculated.

[0112] Further, see Figure 4 , the calculation of the generator matrix includes the following steps:

[0113] Step S301, sequentially constructing a first matrix of data packets, the size of the first matrix being m*l;

[0114] The redundant code packets are sequentially constructed into a second matrix, the size of the second matrix is ​​n*l;

[0115] Step S302, extract m non-repeating numbers from columns 1 to l to form a set of subscripts;

[0116] Step S303, extract m columns from the first matrix according to the subscript to form a first submatrix; extract m columns from the second matrix according to the subscript to form a second submatrix;

[0117] Step S304, determining whether the first submatrix has an inverse matrix; if the inverse matrix does not exist, continuing to execute step S302;

[0118] Here, if the inverse matrix does not exist, continue to execute step S302, that is, continue to extract m non-repeating numbers from columns 1 to l, where the m non-repeating numbers extracted here are different from the m non-repeating numbers extracted for the first time; then repeat the above steps until a generating matrix exists.

[0119] Step S305: If an inverse matrix exists, the second submatrix and the inverse matrix are calculated to obtain a generated matrix.

[0120] Specifically, the calculation process of the redundant coding matrix refers to formula (2). The above formula extracts m columns from the matrix s to form the first submatrix subs, and extracts m columns from the matrix e in the same way to form the second submatrix sube, and formula (4) can be obtained:

[0121] GM n×m ×subs m×m =sube n×m (4)

[0122] When the first submatrix subs is invertible, the generator matrix GM can be calculated, referring to formula (5):

[0123]

[0124] Figure 4 Where m is the number of a group of data packets, n is the number of corresponding redundant coding packets, and l is the length of the data packet / redundant coding packet.

[0125] Figure 4 A simple method of extracting subscripts is used in the method, which is as follows: select a starting subscript sidx, and select m consecutive numbers starting from sidx. After each round of extraction, sidx is increased by 1 until (lm) rounds are completed. In the first round, sidx can be set to 0.

[0126] Verifying the generated matrix requires matrix multiplication, which has low overhead, while calculating the generated matrix requires inverse matrix calculation and matrix multiplication, which has high overhead. The probability of the generated matrix changing between the two communicating parties during a communication process is very low. This application adopts an update verification mechanism, and only needs to calculate the generated matrix when the verification fails with a low probability, which can significantly reduce the computational overhead.

[0127] Furthermore, after the data packet is complete and sent to the data processing module of the application layer for processing, the method further includes the following steps:

[0128] Step S401, when a single check is performed, it is determined whether the generated matrix has passed the check; if it has not passed the check, step S402 is executed;

[0129] Step S402, verify and update the generator matrix, and set a generator matrix verification pass flag.

[0130] Furthermore, after the data packet is complete and sent to the data processing module of the application layer for processing, the method further includes the following steps:

[0131] Step S501, when periodic verification is performed, the first time t1 is recorded;

[0132] Step S502, determining whether the generated matrix has not been verified or whether the time interval (t1-t2) is greater than the preset detection interval T; if yes, executing step S503;

[0133] Step S503, verify and update the generator matrix, set a generator matrix verification pass flag, and record the second time t2;

[0134] The time interval is the interval between the first time and the second time, the first time is the time corresponding to the current cycle, and the second time is the time corresponding to the previous cycle.

[0135] Embodiment 2:

[0136] Figure 5 This is a flow chart of the adaptive FEC decoding method for single check provided in Embodiment 2 of the present invention.

[0137] In order to further reduce the computing resource consumption of the receiving end, the matrix can be conditionally checked and updated in the above adaptive FEC decoding process, such as detecting once after the system is started, and not continuing to detect after the correct value is detected, refer to Figure 5 , the method comprises the following steps:

[0138] Step S601, receiving a data packet and a redundant coded packet;

[0139] Step S602, determining whether a group of data packets and redundant coded packets sent by a transmitting end are received;

[0140] Step S603, if a group of data packets and redundant coded packets are received, determining whether the received data packets are complete;

[0141] Step S604, if the data packet is complete, the data packet is sent to the data processing module of the application layer for processing;

[0142] Step S605, if the data packet is incomplete, determining whether there is a generator matrix;

[0143] Step S606, if a generator matrix exists, the data packet and the redundant coded packet are restored by the generator matrix to obtain the lost data packet; the lost data packet and the data packet are combined to form a complete data packet;

[0144] Step S607, if the generation matrix does not exist, the data packet is sent to the application layer for processing;

[0145] Step S608, determining whether the generated matrix has passed the verification; if it has passed the verification, executing step S601; if it has not passed the verification, executing step S609;

[0146] Step S609, verify and update the generation matrix;

[0147] Step S610, setting a generated matrix check pass flag.

[0148] Embodiment three:

[0149] Figure 6 Flow chart of the adaptive FEC decoding method with periodic check provided in the third embodiment of the present invention; in order to update the generation matrix in time and take into account the computational efficiency, the generation matrix can be periodically checked and updated in the above adaptive FEC decoding process. When the system is started, it detects once, and then periodically detects and updates, refer to Figure 6 , the method comprises the following steps:

[0150] Step S701, receiving a data packet and a redundant coded packet;

[0151] Step S702, determining whether a group of data packets and redundant coded packets sent by a transmitting end are received;

[0152] Step S703, if a group of data packets and redundant coded packets are received, determining whether the received data packets are complete;

[0153] Step S704, if the data packet is complete, the data packet is sent to the data processing module of the application layer for processing;

[0154] Step S705, if the data packet is incomplete, determine whether there is a generator matrix;

[0155] Step S706, if a generator matrix exists, the data packet and the redundant coded packet are restored by the generator matrix to obtain the lost data packet; the lost data packet and the data packet are combined to form a complete data packet;

[0156] Step S707, if the generation matrix does not exist, the data packet is sent to the application layer for processing;

[0157] Step S708, recording the first time t1;

[0158] Step S709, determining whether the generated matrix has not been verified or whether the time interval (t1-t2) is greater than the preset detection interval T; if not, executing step S701; if yes, executing step S710;

[0159] Step S710, verify and update the generation matrix;

[0160] Step S711, setting a generated matrix check pass flag and saving the second time t2.

[0161] Embodiment 4:

[0162] Figure 7 A schematic diagram of an adaptive FEC decoding device provided in Embodiment 4 of the present invention.

[0163] Reference Figure 7 , applied to a receiving end, the device comprises:

[0164] A first judgment module is used to judge whether a group of data packets and redundant coded packets sent by a sending end are received;

[0165] A second judgment module is used to judge whether the data packet is complete when a group of data packets and redundant coded packets are received;

[0166] A verification and update module is used to send the data packet to the data processing module of the application layer for processing when the data packet is complete, and to verify and update the generation matrix;

[0167] A third judgment module is used to judge whether there is a generation matrix when the data packet is incomplete;

[0168] A recovery module, used for recovering the data packet and the redundant coded packet by using the generation matrix to obtain the lost data packet when there is a generation matrix;

[0169] A construction module, used for forming a complete data packet from the lost data packet and the received data packet, and sending the complete data packet to the application layer for processing;

[0170] The processing module is used to send the data packet to the application layer for processing when there is no generation matrix.

[0171] Furthermore, the verification update module is specifically used for:

[0172] Determine whether the redundant coding packet is complete;

[0173] If the redundant coding packet is incomplete, then end;

[0174] If the redundant code packet is complete, determine whether a generator matrix exists;

[0175] If the generator matrix does not exist, calculate the generator matrix and update it locally;

[0176] If a generator matrix exists, the generator matrix and the data packet matrix are calculated to obtain a local redundant coding packet;

[0177] Determine whether the local redundant code packet and the redundant code packet are the same;

[0178] If they are the same, then end;

[0179] If they are different, the generator matrix is ​​calculated and updated locally.

[0180] Furthermore, the verification update module is specifically used for:

[0181] The data packets are sequentially constructed into a first matrix, the size of the first matrix is ​​m*l;

[0182] The redundant code packets are sequentially constructed into a second matrix, the size of the second matrix is ​​n*l;

[0183] Extract m non-repeating numbers from columns 1 to l to form a set of subscripts;

[0184] Extract m columns from the first matrix according to the subscript to form the first submatrix;

[0185] Extracting the m columns from the second matrix according to the subscripts to form a second submatrix;

[0186] Determine whether the first submatrix has an inverse matrix;

[0187] If the inverse matrix exists, the second submatrix and the inverse matrix are calculated to obtain a generator matrix;

[0188] If the inverse matrix does not exist, continue to extract m non-repeating numbers from columns 1 to l and repeat the above steps until a generating matrix exists.

[0189] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the adaptive FEC decoding method provided in the above embodiment are implemented.

[0190] An embodiment of the present invention further provides a computer-readable medium having a non-volatile program code executable by a processor, wherein a computer program is stored on the computer-readable medium, and when the computer program is executed by the processor, the steps of the adaptive FEC decoding method of the above embodiment are executed.

[0191] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.

[0192] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0193] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0194] 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 invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including 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 each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0195] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0196] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. An adaptive FEC decoding method, characterized in that: Applied to the receiving end, the method comprises: Determine whether a group of data packets and redundant coded packets sent by a sender are received; If a group of the data packet and the redundant coded packet is received, determining whether the data packet is complete; If the data packet is complete, the data packet is sent to a data processing module of the application layer for processing, and the generation matrix is ​​updated and verified; If the data packet is incomplete, determining whether the generator matrix exists; If the generator matrix exists, the data packet and the redundant coded packet are restored by using the generator matrix to obtain the lost data packet; The lost data packet and the received data packet are combined into a complete data packet, and the complete data packet is sent to the application layer for processing; If the generator matrix does not exist, the data packet is sent to the application layer for processing.

2. The adaptive FEC decoding method according to claim 1, characterized in that: Verify update generation matrix, including: Determining whether the redundant coding packet is complete; If the redundant coding packet is incomplete, then end; If the redundant coding packet is complete, determining whether the generator matrix exists; If the generator matrix does not exist, calculate the generator matrix and update it locally; If the generator matrix exists, the generator matrix and the data packet matrix are calculated to obtain a local redundant coding packet; Determining whether the local redundant coding packet and the redundant coding packet are the same; If they are the same, then end; If they are different, the generator matrix is ​​calculated and updated to the local.

3. The adaptive FEC decoding method according to claim 2, characterized in that: Calculating the generator matrix includes: The data packets are sequentially constructed into a first matrix, where the size of the first matrix is ​​m*l; The redundant coded packets are sequentially constructed into a second matrix, where the size of the second matrix is ​​n*l; Extract m non-repeating numbers from columns 1 to l to form a set of subscripts; Extract m columns from the first matrix according to the subscript to form a first submatrix; Extracting the m columns from the second matrix according to the subscripts to form a second submatrix; Determine whether the first submatrix has an inverse matrix; If the inverse matrix exists, calculating the second submatrix and the inverse matrix to obtain the generator matrix; If the inverse matrix does not exist, continue to extract the m non-repeating numbers from the 1 to l columns, and repeat the above steps until the generator matrix exists.

4. The adaptive FEC decoding method according to claim 1, characterized in that: After the data packet is complete, the data packet is sent to a data processing module of the application layer for processing, the method further includes: When a single check is performed, determining whether the generator matrix has passed the check; If the verification fails, the generator matrix is ​​verified and updated, and a verification pass flag of the generator matrix is ​​set.

5. The adaptive FEC decoding method according to claim 1, characterized in that: After the data packet is complete, the data packet is sent to a data processing module of the application layer for processing, the method further includes: When periodic verification is performed, the first time is recorded; Determine whether the generation matrix fails to pass the verification or whether the time interval is greater than a preset detection interval; If yes, verify and update the generator matrix, set a verification pass flag of the generator matrix, and record the second time; The time interval is the interval between the first time and the second time, the first time is the time corresponding to the current cycle, and the second time is the time corresponding to the previous cycle.

6. An adaptive FEC decoding device, characterized in that: Applied to a receiving end, the device comprises: A first judgment module is used to judge whether a group of data packets and redundant coded packets sent by a sending end are received; A second judgment module is used to judge whether the data packet is complete when a group of the data packet and the redundant coding packet are received; A verification and updating module, used for sending the data packet to the data processing module of the application layer for processing when the data packet is complete, and verifying and updating the generation matrix; A third judgment module is used to judge whether the generation matrix exists when the data packet is incomplete; A recovery module, used for recovering the data packet and the redundant coded packet by using the generation matrix to obtain the lost data packet when the generation matrix exists; a constituting module, configured to constitute a complete data packet by combining the lost data packet and the received data packet, and send the complete data packet to the application layer for processing; The processing module is used to send the data packet to the application layer for processing when the generation matrix does not exist.

7. The adaptive FEC decoding device according to claim 6, characterized in that: The verification and update module is specifically used for: Determining whether the redundant coding packet is complete; If the redundant coding packet is incomplete, then end; If the redundant coding packet is complete, determining whether the generator matrix exists; If the generator matrix does not exist, calculate the generator matrix and update it locally; If the generator matrix exists, the generator matrix and the data packet matrix are calculated to obtain a local redundant coding packet; Determining whether the local redundant coding packet and the redundant coding packet are the same; If they are the same, then end; If they are different, the generator matrix is ​​calculated and updated to the local.

8. The adaptive FEC decoding device according to claim 7, characterized in that: The verification and update module is specifically used for: The data packets are sequentially constructed into a first matrix, where the size of the first matrix is ​​m*l; The redundant coded packets are sequentially constructed into a second matrix, where the size of the second matrix is ​​n*l; Extract m non-repeating numbers from columns 1 to l to form a set of subscripts; Extract m columns from the first matrix according to the subscript to form a first submatrix; Extracting the m columns from the second matrix according to the subscripts to form a second submatrix; Determine whether the first submatrix has an inverse matrix; If the inverse matrix exists, calculating the second submatrix and the inverse matrix to obtain the generator matrix; If the inverse matrix does not exist, continue to extract the m non-repeating numbers from the 1 to l columns, and repeat the above steps until the generator matrix exists.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 5.