A two-dimensional RS code encoding and decoding method for streaming media data transmission

By dynamically setting encoding parameters and constructing a set of inverse Vandermonde matrices for finite fields one and two, the problem of insufficient adaptability of two-dimensional RS codes in dynamic network environments is solved, and efficient error correction and continuous transmission of streaming media data in unstable network environments are achieved.

CN120979605BActive Publication Date: 2026-04-10WUHU SIMBA NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing two-dimensional RS codes lack adaptability when facing dynamic network environments and complex application requirements, making it difficult to optimize coding strength and improve transmission performance in resource-constrained scenarios. In particular, they are unable to guarantee the continuous transmission of streaming media data in high packet loss environments such as 5G.

Method used

A dynamic two-dimensional RS code encoding and decoding method based on network status and application service data is adopted. By dynamically setting the encoding parameter set, the inverse matrix set of the Vandermonde matrix of finite field one and finite field two is constructed to generate the RS code generation matrix. Two-dimensional encoding and decoding recovery operations are then performed, and the data packet is recovered using the recoding coefficient matrix and the recovery matrix.

Benefits of technology

It achieves highly fault-tolerant and elastic scheduling in scenarios with limited transmission resources, improves coding utilization and error correction capabilities, ensures continuous transmission of streaming media data in unstable network environments, and significantly enhances the ability to recover from local packet loss and regional bit errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979605B_ABST
    Figure CN120979605B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electric communication, and discloses a two-dimensional RS code encoding and decoding method for streaming media data transmission; the method comprises the following steps: dynamically setting an encoding parameter set based on network state data and application service data; constructing a finite field one and a finite field two based on the encoding parameter set; constructing a Vandermonde matrix inverse matrix set based on the finite field two; constructing an RS code generation matrix based on the finite field one, the finite field two and the Vandermonde matrix inverse matrix set; performing two-dimensional encoding on K original data packets based on the RS code generation matrix and the Vandermonde matrix inverse matrix set, and generating R redundant data packets; a receiving end decodes according to the received original data packets and redundant data packets, if the received data packets are K original data packets, directly restores the K original data packets, if V redundant data packets and K-V original data packets are received, performs a decoding recovery operation; the application realizes accurate error correction and controllable fault tolerance of streaming media data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of electric communication technology, more particularly, the present application relates to a two-dimensional RS code encoding and decoding method for streaming media data transmission. BACKGROUND

[0002] With the rapid development of streaming media services, data transmission has higher requirements for anti-packet loss capability, delay tolerance capability and continuous availability. In order to ensure transmission reliability, RS code is widely used in data channel coding, distributed storage, broadcast communication and other scenarios due to its good error correction capability. As an extended form, two-dimensional RS code has been gradually applied to large-capacity transmission and network video fault-tolerant field, aiming to realize higher order recovery capability in data dimension structure.

[0003] However, the existing two-dimensional RS code still has deficiencies when facing dynamic network environment and complex application requirements. Specifically, the traditional encoding parameters such as the number of original packets, the number of redundant packets, and the finite field dimension are mostly fixed configurations, which lack joint perception and adaptive ability with real-time network state and application scenario characteristics, making it difficult to realize flexible scheduling and coding strength optimization in resource-constrained scenarios. The existing two-dimensional RS code usually relies on a higher-dimensional finite field for encoding, resulting in large computational overhead, which affects the transmission performance in multi-path heterogeneous networks.

[0004] Therefore, there is an urgent need for a dynamic two-dimensional RS coding scheme that models the network and service cooperatively, which has parameter adaptive adjustment capability and redundancy structure controllability while improving error correction capability, to meet the continuous transmission requirements of streaming services such as audio and video in high packet loss environments such as 5G. In view of this, the present application proposes a two-dimensional RS code encoding and decoding method for streaming media data transmission to solve the above problems. SUMMARY

[0005] In order to overcome the above-mentioned defects of the prior art and achieve the above-mentioned purposes, the present application provides the following technical scheme: a two-dimensional RS code encoding and decoding method for streaming media data transmission, comprising:

[0006] Based on network state data and application service data, a set of encoding parameters is dynamically set; the set of encoding parameters includes the number of original data packets K, the number of redundant data packets R, the finite field dimension parameter L1 and the finite field dimension parameter L2;

[0007] Based on the set of encoding parameters, a finite field one and a finite field two Based on the finite field two A set of Vandermonde matrix inverse matrices required for constructing a two-dimensional RS code structure is constructed;

[0008] Based on the finite field one finite field two and Vandermonde matrix inverse matrix set to construct RS code generator matrix;

[0009] Based on the RS code generator matrix and the Vandermonde matrix inverse matrix set, two-dimensional encoding is performed on the K original data packets to generate R redundant data packets;

[0010] The receiving end decodes the received original data packets and redundant data packets, and if the received data packets are K original data packets, the K original data packets are directly recovered; if V redundant data packets and K-V original data packets are received, decoding recovery operation is performed.

[0011] Further, the method of performing decoding recovery operation comprises:

[0012] The received K-V original data packets are denoted as m h , 1≤h≤K-V; the received V redundant data packets are denoted as S g , 1≤g≤V; h and g are both index variables;

[0013] A re-encoding coefficient matrix with a size of (K-V)×V is constructed;

[0014] The re-encoding coefficient matrix is used to perform two-dimensional nested finite field encoding on m h to generate a re-encoding result F h ;

[0015] F h and S g are converted into corresponding binary matrices and bit XOR operation is performed to obtain a data transmission error information matrix, and the data transmission error information matrix is converted into an error information finite field element;

[0016] A recovery matrix with a size of V×V is constructed, and the inverse of the recovery matrix is obtained to obtain a recovery matrix inverse matrix;

[0017] The error information finite field element is subjected to two-dimensional finite field encoding operation with the recovery matrix inverse matrix to obtain all the original data packets that have not been received, and decoding recovery is completed.

[0018] Further, the method of generating R redundant data packets comprises:

[0019] Define τ is the finite field coding cutoff index of the finite field GF (2

[0020] Based on the RS code generator matrix, the finite field GF (2 τ and ω, a first intermediate packet encoding formula is constructed; based on the RS code generator matrix, the finite field GF (2 Finite field one Linear combination element of finite field one and finite field two The second intermediate packet encoding formula is constructed based on the linear combination element τ and ω of finite field one and finite field two;

[0021] If The K original data packets are encoded based on the first intermediate packet encoding formula to generate R first intermediate data packets; and the R first intermediate data packets and the Vandermonde matrix inverse matrix set are used to generate R redundant data packets.

[0022] If The K original data packets are encoded based on the second intermediate packet encoding formula to generate R second intermediate data packets; and the R second intermediate data packets and the Vandermonde matrix inverse matrix set are used to generate R redundant data packets.

[0023] Further, the construction method of the RS code generation matrix comprises:

[0024] Initialize the RS code generation matrix G = [I k×k |A]; I k×k is a K×K identity matrix, and A is a two-dimensional nested finite field coding coefficient matrix;

[0025] Define a two-dimensional nested finite field extension generation matrix with a dimension of The two-dimensional nested finite field extension generation matrix is constructed based on a primitive element of finite field one , a primitive element of finite field two , and a linear combination element of finite field one and finite field two.

[0026] The first K rows of the two-dimensional nested finite field extension generation matrix are intercepted to form a finite field extension generation submatrix; an R×R dimensional Vandermonde matrix inverse matrix is obtained from the Vandermonde matrix inverse matrix set, which is denoted as an R-order Vandermonde matrix inverse matrix.

[0027] The finite field extension generation submatrix is multiplied by the R-order Vandermonde matrix inverse matrix to obtain a two-dimensional nested finite field coding coefficient matrix, and the two-dimensional nested finite field coding coefficient matrix is introduced into the initialized RS code generation matrix to obtain an RS code generation matrix.

[0028] Further, the construction method of the Vandermonde matrix inverse matrix set comprises:

[0029] S100: An initial Vandermonde matrix with a dimension of is constructed based on a primitive element of finite field two; the initial value of a count variable j s is 1; the initial value of an index variable t is 2, and the value range of t is 2 to

[0030] ​S101: Extract the first t rows and the first t column elements from the initial Vandermonde matrix to obtain a Vandermonde matrix of dimension t x t, and obtain the inverse matrix of the Vandermonde matrix to obtain the jth Vandermonde matrix inverse matrix;

[0031] S102: Let t = t + 1; if t is less than or equal to Let js = js + 1, and return to S101 to continue execution; if t is greater than Then get Vandermonde matrix inverse matrices, and The Vandermonde matrix inverse matrices are constructed into a Vandermonde matrix inverse matrix set, and the current process is ended.

[0032] Further, the construction method of the finite field one and the finite field two includes:

[0033] Obtain the finite field dimension parameter one L1 and the finite field dimension parameter two L2 from the code parameter set;

[0034] Construct the finite field one based on the finite field dimension parameter one L1; Construct the finite field two based on the finite field dimension parameter two L2.

[0035] Further, the method for constructing the finite field one based on the finite field dimension parameter one L1 includes:

[0036] According to the value of the finite field dimension parameter one L1, a primitive polynomial p1(x) defined on the GF(2) field is selected, and the order of the primitive polynomial p1(x) is equal to L1; all binary polynomials with degrees less than L1 are defined as a candidate element set of the finite field one as a modulus, and there are candidate elements, including one zero element and non-zero elements; The candidate elements are constructed into the finite field one

[0037] Further, the method for constructing the finite field two based on the finite field dimension parameter two L2 includes:

[0038] According to the value of the finite field dimension parameter two L2, a primitive polynomial p2(x) defined on the GF(2) field is selected, and the order of the primitive polynomial p2(x) is equal to L2; all binary polynomials with degrees less than L2 are defined as a candidate element set of the finite field two as a modulus, and there are candidate elements, including one zero element and non-zero elements; one candidate element is constructed into a finite field two

[0039] Further, the setting method of the encoding parameter set comprises:

[0040] input network state data and application service data into an encoding parameter setting model to obtain a corresponding encoding parameter set; the network state data comprises a packet loss rate, an average round-trip delay, an available bandwidth, a bandwidth fluctuation rate and a network type; the application service data comprises a flow type, a resolution, a maximum allowed delay and a maximum allowed packet loss rate.

[0041] Further, the training method of the encoding parameter setting model comprises:

[0042] an encoding parameter setting data set containing network state data and application service data is constructed and divided into a training set and a verification set; a multilayer perceptron neural network is used as the encoding parameter setting model to perform feature extraction and encoding parameter set prediction on the standardized network state data and application service data, a Softmax activation function is used in the output layer to obtain a probability distribution of the encoding parameter set, and the encoding parameter set corresponding to the maximum probability is selected as the prediction result; a cross-entropy is used as a loss function, a gradient descent type optimization algorithm is combined for weight updating, and an early stopping strategy is set, and the training is terminated when the accuracy of the verification set reaches a threshold.

[0043] Compared with the prior art, the technical effects and advantages of the two-dimensional RS code encoding and decoding method for streaming media data transmission are:

[0044] The application introduces a two-dimensional RS code dynamic encoding and decoding mechanism oriented to network state and application feature joint driving, improves the error correction efficiency and parameter adaptation, and realizes accurate error correction and controllable fault tolerance capability for multi-scene streaming media data transmission requirements. Based on network state data and application service data, the system dynamically sets the number of original data packets K, the number of redundant data packets R, the finite field dimension parameter one L1 and the finite field dimension parameter two L2, realizes high fault tolerance elastic scheduling in the transmission resource limited scene, improves the encoding utilization rate, and effectively supports the continuous transmission demand in unstable network environment such as 5G, Wi-Fi and the like. The system combines the low-dimensional finite field nested structure, uses the nested combination of finite field one and finite field two , improves the linear independence between data blocks under the premise of controlled computing overhead, significantly enhances the recovery capability of the two-dimensional RS structure to local concentrated packet loss and regional error code, and still has stable redundancy coverage capability in a small bandwidth scene, and can still guarantee the service continuity and user experience of real-time audio and video tasks in a multi-path packet loss environment. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 FIG. 1 is a schematic diagram of a two-dimensional RS code encoding and decoding system for streaming media data transmission according to an embodiment of the present application;

[0046] Figure 2 FIG. 2 is a flowchart of a two-dimensional RS code encoding and decoding method for streaming media data transmission according to an embodiment of the present application;

[0047] Figure 3 FIG. 3 is a flowchart of a method for performing decoding recovery operation according to an embodiment of the present application;

[0048] Figure 4 FIG. 4 is a flowchart of a method for constructing a Vandermonde matrix inverse matrix set according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described in detail, clearly and completely below with reference to the drawings in the embodiments of the present application. It should be particularly noted that the specific embodiments described below are only used to better illustrate and describe the technical solutions of the present application, and are intended to enable those skilled in the art to better understand and implement the present application, and should not be understood as limiting the protection scope of the present application. Those skilled in the art can modify, adjust or equivalently replace the present application according to the content disclosed in the present application without departing from the spirit and essence of the present application, and these should be regarded as the protection scope of the present application.

[0050] Embodiment 1:

[0051] Please refer to Figure 1 As shown in FIG. 1, the embodiment discloses a two-dimensional RS code encoding and decoding system for streaming media data transmission, which comprises an encoding parameter setting module, a first matrix construction module, a second matrix construction module, a data packet processing module and a decoding recovery module. Each module is connected through wired and / or wireless connection to realize data transmission.

[0052] The encoding parameter setting module sets a set of encoding parameters based on network state data and application service data. The set of encoding parameters includes the number of original data packets K, the number of redundant data packets R, finite field dimension parameter one L1 and finite field dimension parameter two L2. The finite field dimension parameter one and the finite field dimension parameter two satisfy the co-prime relationship.

[0053] The network state data includes packet loss rate, average round-trip delay, available bandwidth, bandwidth fluctuation rate and network type. The network type includes 5G, Wi-Fi and Ethernet. The application service data includes stream type, resolution, maximum allowed delay and upper limit of tolerance packet loss rate. The stream type includes video, audio and control signal.

[0054] The setting method of the set of encoding parameters includes:

[0055] Input the network state data and application service data into the encoding parameter setting model to obtain a corresponding encoding parameter set.

[0056] The training method of the encoding parameter setting model comprises:

[0057] An encoding parameter setting dataset is constructed in advance, the encoding parameter setting dataset comprises BM group encoding parameter setting data and an encoding parameter set corresponding to the BM group encoding parameter setting data, BM is a positive integer; the encoding parameter setting data comprises network state data and application service data; the encoding parameter setting dataset is divided into a training set and a verification set, the training set is used for device operation diagnosis model parameter learning, and the verification set is used for real-time monitoring of the generalization performance and overfitting degree of the device operation diagnosis model;

[0058] A deep neural network with a multilayer perceptron as the core is used as the device operation diagnosis model, the encoding parameter setting data is input into the deep neural network after being standardized and vectorized, and the deep neural network comprises an input layer, a hidden layer and an output layer; each hidden layer uses a nonlinear activation function to extract features, and the output layer uses a Softmax activation function to obtain a probability distribution corresponding to each encoding parameter set, and finally the encoding parameter set corresponding to the maximum probability is taken as the prediction result of the device operation diagnosis model; in the training process, a cross-entropy loss function is used as the optimization target, a gradient descent type optimization algorithm is used to update the network weights, and an early stopping strategy is set: when the prediction accuracy on the verification set reaches or exceeds a preset threshold, it is determined that the device operation diagnosis model has converged and the training is terminated.

[0059] It should be noted that the packet loss rate can be obtained by a sliding window statistical mechanism maintained between the sending end and the receiving end. The system can calculate the current packet loss rate based on the difference between the number of sent packets and the number of successfully confirmed received packets within a certain time interval (such as 1 second); the average round-trip delay can be obtained from the TCP handshake response time in the network protocol stack or the ICMP Echo message (ping) measurement; the system periodically initiates a round-trip detection request to the target receiving end, and the average time of multiple responses is taken as the average round-trip delay; the available bandwidth can be estimated based on the comparison relationship between the sending rate and the actual throughput rate, or can be measured by a probe type algorithm; the bandwidth fluctuation rate is calculated based on the standard deviation or change rate of the bandwidth change within a continuous time window, and is used to reflect the stability degree of the current channel bandwidth; the network type is obtained from the system bottom layer network interface, and can be directly identified and numerically processed by the network interface device type or network access identifier, for example, 5G is numerically processed as 1, Wi-Fi is numerically processed as 2, and Ethernet is numerically processed as 3.

[0060] The packet loss rate, as a core indicator of channel reliability, has a significant positive correlation with the number of redundant data packets. When the detected packet loss rate increases, the system needs to increase the number of redundant packets to enhance the error correction capability of the encoding block, to ensure that the receiving end can still recover the original information completely in the case of partial original data loss; on the contrary, in the case of stable channel quality and low packet loss rate, appropriately reducing the number of redundant data packets can avoid unnecessary redundancy overhead and improve bandwidth utilization efficiency. The average round-trip delay is inversely related to the number of original data packets. Higher round-trip delay usually reflects network congestion or complex link conditions, in which case the system tends to choose a smaller number of original data packets to reduce the cumulative data volume required for each round of encoding, speed up the processing period, and reduce the overall transmission delay; while in a low-delay environment, the value range of the number of original data packets can be appropriately expanded to improve the encoding throughput efficiency and the overall encoding block size.

[0061] The available bandwidth is related to the setting of the number of original data packets and the number of redundant data packets. High available bandwidth conditions allow larger original data aggregation size and moderate redundant packet allocation, thereby improving the utilization rate and error correction capability of the overall data block; when the available bandwidth is limited, the number of original data packets and the number of redundant data packets need to be appropriately reduced to avoid the reverse rise of the packet loss rate due to overload. Bandwidth fluctuation rate, as a network stability indicator, directly affects the selection strategy of the first finite field dimension parameter and the second finite field dimension parameter. In a high fluctuation scenario, the system is more suitable for encoding with a low-dimensional finite field to reduce the domain operation complexity and fault tolerance risk, such as GF(2 3 ) or GF(2 4 ), GF(2 3 ) or GF(2 4 ) represent two different dimension finite field structures, respectively used for row vector encoding dimension and column vector encoding dimension in two-dimensional encoding structure, GF(2 3 ) represents a finite field with a size of 8, containing 8 elements in the finite field, used for column direction data encoding operation; GF(2 4 ) represents a finite field with a size of 16, containing 16 elements in the finite field, used for row direction data encoding operation.

[0062] The network type, as an important basis for judging the connection quality and access architecture, can be used as a global auxiliary feature to participate in joint decision-making. Specifically, the 5G network is often accompanied by high packet loss rate and volatility due to frequent handover and weak signal coverage, and is suitable for small original packet quantity, large redundant packet quantity, low finite field dimension parameter one and finite field dimension parameter two; the Wi-Fi network usually has moderate bandwidth and volatility, which needs to be adjusted flexibly according to the context; and the Ethernet connection has high stability and sufficient bandwidth, and is suitable for configuring large original packet quantity, moderate redundant packet quantity, and high finite field dimension parameter one and finite field dimension parameter two to obtain optimal performance.

[0063] In summary, the network state data not only has real-time collectability, but also plays a decision-making basis role in dynamic encoding parameter setting. Through joint analysis and model training mapping of various network state features, the application realizes the transformation of parameter setting from static artificial configuration to intelligent adaptive optimization, effectively improving the flexibility and transmission performance of the coding and decoding system in multiple scene environments.

[0064] It should be noted that the flow type is extracted from the system application layer or the media transmission protocol identifier, such as video, audio, control signal, etc. The data stream has explicit type description information in the protocol header, which can also be uniformly identified and mapped into a numerical feature by the service scheduling management unit; for example, the video is valued as 11, the audio is valued as 12, and the control signal is valued as 13. The resolution is usually obtained from the stream media meta information or the media description protocol, and the resolution is used to evaluate the data density and complexity of the current service; the maximum allowed delay is determined by the service QoS policy configuration or the service negotiation interface, which can be obtained by analyzing the delay budget set in the real-time communication protocol or the content distribution strategy. The upper limit of the tolerant packet loss rate can be obtained from the service type preset strategy.

[0065] The dynamic configuration of the encoding parameter set not only needs to be adjusted adaptively according to the network state, but also needs to fully consider the application service type and quality of service requirements currently served. Therefore, the application introduces application service data as an important input feature of the encoding parameter setting model to support the intelligent setting of the original packet quantity, redundant packet quantity, finite field dimension parameter one and finite field dimension parameter two by the system.

[0066] The flow type, as a functional attribute identifier of application data, directly affects the structure and redundancy tolerance of the encoding block. For example, video data usually has the characteristics of large volume, high code rate, and a certain degree of tolerance to distortion but strong continuity requirement, so it is suitable to set a larger number of original data packets to improve the encoding throughput efficiency, and at the same time, cooperate with a moderate number of redundant data packets to ensure the error correction performance; relatively speaking, audio data is sensitive to delay but has small transmission volume, and is suitable for a moderate number of original data packets and a small number of redundant data packets; and control signal data such as remote operation instructions are extremely sensitive to packet loss and require low latency and fast response, so the system will preferentially allocate a smaller number of original data packets, a minimum delay path, and increase the number of redundant data packets to achieve high-intensity error correction.

[0067] The resolution reflects the data density and the data block size per unit time of the streaming media service, and is an important reference index for setting the number of original data packets and the finite field dimension parameters. High-resolution video (such as 1080p, 4K) requires the encoder to process more original data per unit time, and is suitable for configuring a larger number of original data packets and selecting a higher finite field dimension (finite field dimension parameter one is set to 4, finite field dimension parameter two is set to 5) to accommodate enough independent encoding coefficients; while low-resolution or compressed encoding services can use smaller original data packet numbers and lower-dimensional finite fields (for example, GF(2 3 )) to reduce the encoding calculation burden.

[0068] The maximum allowed delay is a key QoS index that affects the setting of encoding parameters, especially for control signal and audio services with strong real-time scenarios. To meet the delay requirement, the system will actively reduce the encoding block size, i.e., reduce the number of original data packets, to reduce the encoding waiting period, and preferentially use a low-dimensional finite field, i.e., a smaller finite field dimension parameter one and finite field dimension parameter two to compress the calculation delay; in services with higher delay tolerance, such as video buffer playback, larger encoding blocks and stronger error correction fields can be selected to improve overall throughput efficiency and anti-interference ability.

[0069] The upper limit of the packet loss rate tolerance is used to define the acceptable error code range of the application in the data transmission process, and is an important basis for setting the number of redundant data packets. For example, when a service indicates that it can tolerate a packet loss of no more than 5%, the system will dynamically set the number of redundant data packets that match it in combination with network state data and application service data to ensure that the decoding success rate meets the service requirements under the target transmission conditions.

[0070] In summary, the application service data not only serves as a static description feature input of the encoding parameter setting model, but also participates in forming a dynamic context-aware input together with the network state data, thereby providing comprehensive encoding parameter setting basis for the application. With the mechanism, the system can make targeted parameter adjustment according to different service flow characteristics, achieve optimal balance between transmission efficiency, fault tolerance and computing overhead, and be suitable for high-performance data transmission requirements in various complex application scenarios.

[0071] It should be noted that in the two-dimensional RS code encoding and decoding method of the present application, the number of original data packets K does not refer to the total amount of data in the entire streaming media transmission process, but indicates the number of original data packets protected in one encoding processing period (i.e., an RS code encoding unit). Since the streaming media data usually has a large volume, the system will segment the data to be transmitted according to the preset block length in the actual transmission process, and perform two-dimensional RS encoding operation in batches. Specifically, the sending end divides the data to be transmitted into multiple encoding units (also referred to as erasure code blocks), and each encoding unit contains K original data packets. For the K original data packets, the system will generate R redundant data packets according to the set number of redundant data packets R, forming a complete encoding group containing K+R data packets, which is sent to the receiving end as a logically independent data protection unit in the transmission process. On the receiving end side, if the number of data packets received in the complete encoding group is not less than K, that is, any K data packets (any combination of original data packets and redundant data packets) are received in the K+R transmitted data packets, the entire original data content of the batch can be completely recovered through the RS decoding process.

[0072] For example, if there are a total of 1000 data packets to be sent, the number of original data packets K is set to 20, and the number of redundant data packets R is set to 4, then the 1000 data packets will be divided into 50 batches (i.e., 1000 / 20=50), and each batch of 20 data packets will generate 4 redundant data packets after two-dimensional RS encoding, i.e., a total of 24 data packets will be sent.

[0073] The finite field dimension parameter one L1 and the finite field dimension parameter two L2 are respectively used to specify the dimensions of two finite fields used in the two-dimensional encoding process. The setting of the finite field dimension parameter one L1 and the finite field dimension parameter two L2 is different from the single high-dimensional finite field encoding mode of the traditional RS code, and a two-dimensional nested finite field structure is used for encoding, aiming to effectively reduce the encoding and decoding calculation complexity on the basis of guaranteeing the data error correction performance, and improve the adaptation ability of the system to resource-limited terminals or high-concurrency application scenarios. Among them, the finite field dimension parameter one L1 is used to define the encoding domain of the original data packet in the column vector direction, and determines the type of encoding coefficient available in the single-row encoding process and the linear independence requirement, so as to ensure that the generated matrix constructed has full rank in this direction. The finite field dimension parameter two L2 is used to define the finite field used when encoding in the row vector direction, so as to ensure that any column in the redundancy packet generated matrix constructed in the column dimension has linear independence. It is required to satisfy

[0074] In order to ensure that the two-dimensional RS code encoding matrix constructed has good linear independence and operation separation in the row dimension and the column dimension, the prime relationship between the finite field dimension parameter one and the finite field dimension parameter two is set in the present application. By performing the nested encoding operation of the column vector and the row vector in the two structure-independent finite fields respectively, and The rank overlap and coefficient collinearity phenomenon in the generated matrix structure can be effectively avoided by performing the nested encoding operation of the column vector and the row vector in the two structure-independent finite fields respectively, the independent contribution of the redundancy packet under the multi-path recovery condition is enhanced, and the overall decoding success rate is improved.

[0075] The redundancy data packet number R represents the number of redundancy data packets generated in each round of RS encoding operation to enhance the fault tolerance of data transmission. The design purpose of the redundancy data packet number R is to use the redundancy information to recover the original data packet when the data packet is lost or the channel quality decreases at the receiving end, so as to guarantee the continuity and reliability of the streaming media service. Specifically, the encoding process takes K original data packets as input, and generates R redundancy packets on this basis to form an encoding group of K+R data packets. In the encoding group, as long as any K data packets (any combination of original data packets and redundancy data packets) are successfully received at the receiving end, the RS decoding algorithm can accurately restore all K original data packets of the batch. Therefore, the setting of the redundancy data packet number R directly determines the upper limit of the packet loss tolerance of the system, that is, the maximum tolerable packet loss number does not exceed R. The present application specially takes the redundancy data packet number as a dynamically adjustable control quantity, which can be adaptively set according to network state data and application service data.

[0076] The first matrix construction module constructs the finite field one and the finite field two based on the finite field two a set of Vandermonde inverse matrices required for constructing the two-dimensional RS encoding structure; the set of Vandermonde inverse matrices has Vandermonde inverse matrices.

[0077] a finite field one and a finite field two The construction method comprises:

[0078] obtaining a finite field dimension parameter one L1 and a finite field dimension parameter two L2 from the set of encoding parameters;

[0079] constructing the finite field one based on the finite field dimension parameter one L1;

[0080] constructing the finite field two based on the finite field dimension parameter two L2. The method comprises:

[0081] According to the value of the finite field dimension parameter one L1, the system selects a primitive polynomial p1(x) defined on the GF(2) field, and the order of the primitive polynomial p1(x) is equal to L1; the set of binary polynomials with degrees less than L1 is defined as the candidate element set of the finite field one with the primitive polynomial p1(x) as the modulus, and there are candidate elements, including one zero element and non-zero elements; the primitive polynomial needs to satisfy the irreducibility and the generation to ensure that the non-zero elements in the constructed finite field form a multiplicative cyclic group; The candidate elements are constructed into the finite field one

[0082] The method for constructing the finite field two based on the finite field dimension parameter two L2 comprises:

[0083] According to the value of the finite field dimension parameter two L2, the system selects a primitive polynomial p2(x) defined on the GF(2) field, and the order of the primitive polynomial p2(x) is equal to L2; the set of binary polynomials with degrees less than L2 is defined as the candidate element set of the finite field two with the primitive polynomial p2(x) as the modulus, and there are candidate elements, including one zero element and non-zero elements; The candidate elements are constructed into the finite field two

[0084] It should be noted that, for example, when the finite field dimension parameter one L1 is 3, the primitive polynomial p1(x) can be constructed as p1(x) = x 3+x+1; all elements in the finite field L2 are (0, 1, x, x 2 , x+1, x 2 +1, x 2 +x, x 2 +x+1); for example, when the dimension parameter of the finite field L2 is 4, the primitive polynomial p2(x) can be constructed as p2(x) = x 4 +x+1; all elements in the finite field L2 are (0, 1, x, x 2 , x 3 , x+1, x 2 +x, x 3 +x 2 , x 3 +x+1, x 2 +1, x 3 +x, x 2 +x+1, x 3 +x 2 +x, x 3 +x 2 +x+1, x 3 +x 2 +1, x 3 +1).

[0085] As shown in the method for constructing the Vandermonde matrix inverse matrix set, the method comprises the following steps: Figure 4

[0086] S100: constructing an initial Vandermonde matrix of dimension n based on the primitive element of the finite field L2; setting the initial value of a counting variable js as 1; setting the initial value of an index variable t as 2, and the value range of t is 2 to

[0087] S101: extracting the first t rows and the first t columns of the initial Vandermonde matrix to obtain a Vandermonde matrix of dimension t x t, and then inverting the Vandermonde matrix to obtain the jst Vandermonde matrix inverse matrix;

[0088] S102: setting t = t + 1; if t is less than or equal to n, setting js = js + 1, and returning to S101 to continue execution; if t is greater than n, obtaining Vandermonde matrix inverse matrices, and constructing the Vandermonde matrix inverse matrices into a Vandermonde matrix inverse matrix set, and ending the current process. The Vandermonde matrix of dimension n is as follows:

[0089]

[0090]

[0091] ​​​​​​Wherein, a2 is a primitive element of finite field two. In the finite field two, a primitive element d2 is selected for the encoding processing in the row direction; the primitive element a2 of the finite field two is obtained by consulting a public primitive element lookup table, or is calculated by a primitive element discrimination algorithm known in the art. Since the discrimination and selection of the primitive element belong to the public knowledge in the finite field encoding technology, the skilled person can realize based on the existing algorithm and tool, and therefore the specific implementation process is not described herein.

[0092] A second matrix construction module, which constructs the RS code generation matrix based on the Vandermonde matrix inverse matrix set;

[0093] The construction method of the RS code generation matrix comprises:

[0094] Initializing the RS code generation matrix G = [I k×k |A]; the RS code generation matrix is a block matrix, I k×k is a K×K identity matrix, and A is a two-dimensional nested finite field coding coefficient matrix;

[0095] defining a two-dimensional nested finite field extended generation matrix with dimensions ; the two-dimensional nested finite field extended generation matrix is constructed based on a primitive element of a finite field one , a primitive element of a finite field two , and a linear combination element of the finite field one and the finite field two;

[0096] The first K rows of the two-dimensional nested finite field extended generation matrix are intercepted to form a finite field extended generation submatrix to adapt to the number K of original data packets, a R×R dimensional Vandermonde matrix inverse matrix is obtained from the Vandermonde matrix inverse matrix set, and is denoted as a R-order Vandermonde matrix inverse matrix;

[0097] The finite field extended generation submatrix is multiplied by the R-order Vandermonde matrix inverse matrix to obtain a two-dimensional nested finite field coding coefficient matrix, and the two-dimensional nested finite field coding coefficient matrix is introduced into the initialized RS code generation matrix to obtain the RS code generation matrix.

[0098] The two-dimensional nested finite field extended generation matrix is as follows:

[0099]

[0100] Wherein, a1 is a primitive element of a finite field one , and the power of a1 can traverse all non-zero elements of the finite field one ; a2 is a primitive element of a finite field two , and the power of a2 can traverse all non-zero elements of the finite field two ; y i is selected from the set According to the set The number of middle items from the set Select elements from the set i ; y i Is a linear combination element of finite field one and finite field two.

[0101] The set The meaning of the set is the set of elements obtained by excluding the elements in the set From the set .

[0102] It should be noted that in the streaming media data transmission scenario, the traditional RS code on a single finite field is difficult to adapt to the dynamic change of network packet loss rate and low latency demand due to high computational complexity and static redundancy strategy. To break through this limitation, the application uses the primitive element of finite field one, the primitive element of finite field two, and the linear combination element of finite field one and finite field two to construct a two-dimensional nested finite field extension generator matrix, and with the power iteration of each of and the supplement of the combination element to the remaining elements in the high-dimensional space, the two-dimensional nested finite field extension generator matrix can break through the dimension limitation of the traditional single finite field coding on the number of data packets K+R, and adapt to the scene of dynamic change of data quantity in streaming media transmission.

[0103] On this basis, by intercepting the first K rows of the two-dimensional nested finite field extension generator matrix to obtain a finite field extension generator submatrix, and multiplying it with the inverse matrix of the Vandermonde matrix of R×R dimension, a two-dimensional nested finite field coding coefficient matrix is obtained. The two-dimensional nested finite field coding coefficient matrix serves as the redundancy coefficient part of the RS code generator matrix G=[I k×k |A], and undertakes the coding mapping function from the original data to the redundant packet. With the element characteristics of the two-dimensional nested finite field, the coding calculation complexity is reduced while the adaptation range of the redundant packet to different packet loss scenarios is expanded, so that in the process of streaming media transmission, even if the network packet loss rate fluctuates, the lost data can be effectively recovered using the redundant packet according to the coding relationship constructed by the matrix, ensuring the reliability and real-time performance of the transmission, and meeting the transmission requirements of low latency and high reliability of streaming media.

[0104] In the present application, the RS code generator matrix is defined in the form of a block matrix, and the core of the RS code generator matrix is to define the encoding rule, support dynamic adaptation, and ensure decoding recovery. Specifically, the definition of the encoding rule refers to fixing the original data position with an identity matrix, using the coefficients of the two-dimensional nested finite field coefficient matrix as "recipes" to guide the linear combination of the original data packets to generate redundant data packets, and to realize the redundancy protection required for streaming media data transmission. The support of dynamic adaptation refers to the characteristics of two-dimensional finite field nested coverage of high-dimensional space, so that the RS code generator matrix can adapt to different numbers of original data packets K and redundant packets R. The guarantee of decoding recovery refers to the linear relationship between the original data packets and the redundant data packets recorded by the RS code generator matrix during the encoding process, which provides the "inverse operation basis" for the decoding of the receiving end. When network packet loss causes data packet loss, the receiving end can use redundant data packets to restore the lost original data through matrix inversion and linear equation system solving operations, to ensure the reliability and continuity of streaming media transmission.

[0105] The data packet processing module performs two-dimensional encoding on the K original data packets based on the RS code generator matrix and the Vandermonde matrix inverse matrix set to generate R redundant data packets; wherein K and R need to satisfy and

[0106] The method for generating R redundant data packets comprises:

[0107] Step one: defining τ represents the finite field two The finite field coding cutoff index indicates the number of original packets encoded only with α2power coefficients; ω represents the switching threshold of two-dimensional nested coding;

[0108] Step two: based on the RS code generator matrix, the finite field one The finite field two τ and ω are used to construct the first intermediate packet encoding formula; based on the RS code generator matrix, the linear combination elements of the finite field one The finite field two The finite field one and the finite field two τ and ω are used to construct the second intermediate packet encoding formula;

[0109] Step three: if then encode the K original data packets based on the first intermediate packet encoding formula to generate R first intermediate data packets; and generate R redundant data packets based on the R first intermediate data packets and the Vandermonde matrix inverse matrix set;

[0110] Step four: if Then, the K original data packets are encoded based on the second intermediate packet encoding formula to generate R second intermediate data packets, and R redundant data packets are generated based on the R second intermediate data packets and the Vandermonde matrix inverse matrix set.

[0111] The first intermediate packet encoding formula is:

[0112]

[0113] wherein, is the i1th first intermediate data packet obtained by the first intermediate packet encoding formula, 1≤i1≤R; m j is the jth original data packet, 1≤j≤K, the original data packet m j is expressed as an L1×L2-dimensional binary row vector, the binary row vector is divided into L1L2-dimensional binary row vectors m tj , 1≤t≤L1, for all m tj is obtained by juxtaposing in rows to obtain an L1×L2 original data packet matrix represents the (i1-1)(R-1+j)th power of α2, represents the (i1-1)(j-τ)th power of α1.

[0114] The second intermediate packet encoding formula is:

[0115]

[0116] wherein, is the i2th second intermediate data packet obtained by the second intermediate packet encoding formula, 1≤i2≤R; is the (i2-1)th power of the j-ωth element in the set . represents a linear combination element encoding item of the finite field GF(2) . represents a linear combination element encoding item of the finite field GF(2) . represents a linear combination element encoding item of the finite field GF(2) and the finite field GF(2) .

[0117] It should be noted that the core innovation of the first and second intermediate packet encoding formulas lies in dynamically switching the encoding domain. By utilizing two thresholds, τ and ω, the source of the encoding coefficients is bound to the dimensional characteristics of the finite field. This avoids the complexity of high-dimensional computations while ensuring that the encoding covers the characteristics of the elements in the two-dimensional nested finite field encoding coefficient matrix A of the RS code generation matrix, defining a linear combination relationship from the original data packet to the redundant data packet. Theoretically, redundant data packets can be generated by matrix multiplication of the original data vector and the two-dimensional nested finite field encoding coefficient matrix A. However, due to the high computational complexity and insufficient dynamic adaptability of high-dimensional finite field operations, this invention introduces the first and second intermediate packet encoding formulas to achieve optimization.

[0118] Methods for generating R redundant data packets based on R first intermediate data packets and the set of inverse Vandermonde matrices include:

[0119]

[0120] in, For the i1th redundant data packet, Let q′ represent the element in the t-th row and i-th column of the R×R dimension Vandermonde matrix inverse matrix set. t1 Let t represent the t-th first intermediate data packet out of R first intermediate data packets, where 1 ≤ t ≤ R.

[0121] Methods for generating R redundant data packets based on R first intermediate data packets and the set of inverse Vandermonde matrices include:

[0122]

[0123] in, For the i2th redundant data packet, Let q′ represent the element in the t-th row and i-th column of the R×R Vandermonde matrix inverse matrix set. t2 Let t represent the t-th second intermediate data packet out of R second intermediate data packets, where 1 ≤ t ≤ R.

[0124] It should be noted that in this application, the relationship between the number of original data packets K and the number of redundant data packets R is distinguished and limited, that is, based on K+R and... The size comparison is used to divide the coding scenarios into two categories. This limitation stems from the need to balance the spatial coverage characteristics of two-dimensional nested finite fields with the coding complexity requirement. Specifically, since this application adopts a finite field... and finite field 2 Nested construction of high-dimensional finite fields High-dimensional finite field The element space can be covered by powers and linear combinations of primitives in a low-dimensional field. When time, low-dimensional finite field one and the primitive element power set of finite field two , which has been able to independently cover the coefficient space required for coding, at this time, a one-dimensional coding strategy is adopted, that is, the coding operation is performed in finite field one and finite field two , which can simplify the calculation complexity to the greatest extent while ensuring the error correction capability, and adapt to the low latency transmission requirements of streaming media. When , the low-dimensional field alone power coverage exists a space gap, and a two-dimensional nested coding mechanism needs to be started, which needs to supplement the high-dimensional space coverage through the linear combination elements of finite field one and finite field two , that is, y i , so as to expand the coding adaptation ability to more data packets and avoid coding failure caused by insufficient finite field element coverage.

[0125] The setting of the boundary condition is essentially the independent coverage threshold of the element space of finite field one and finite field two . The derivation process is specifically that finite field one contains elements, finite field one contains a zero element and non-zero elements, of which contains a number 1; finite field two contains elements, finite field two contains a zero element and non-zero elements, of which contains a number 1; the number 0 does not participate in coding, and the repeated number 1 is removed, and one number 1 is reserved, that is, two numbers 0 and one number 1 are excluded, to obtain the boundary condition

[0126] When , low-dimensional field independent coding can meet the requirements; when , two-dimensional nested combination coding must be introduced to completely cover the element space of high-dimensional finite field , so as to ensure the linear independence and error correction capability of the coding matrix. In this application, the boundary condition The setting accurately divides the applicable scene of low-dimensional independent coding and high-dimensional nested coding, realizes the dynamic balance of coding complexity and adaptation ability, and enables the two-dimensional RS code encoding and decoding method to flexibly switch strategies according to the number of data packets, to adapt to low-redundancy high-efficiency transmission in network stability, and to meet high-redundancy reliable transmission in network fluctuation, to meet the real-time and reliability requirements of streaming media data transmission.

[0127] The specific process of the third and fourth steps includes:

[0128] Step S601: constructing a finite field one based on an L1-order primitive polynomial and a primitive element , and constructing an L1xL1-dimensional finite field one friendly matrix P1 corresponding to the L1-order primitive polynomial and the primitive element; the finite field one friendly matrix P1 refers to a finite field one corresponding to the friendly matrix;

[0129] Constructing a finite field two based on an L2-order primitive polynomial and a primitive element , and constructing an L2xL2-dimensional finite field two friendly matrix P2 corresponding to the L2-order primitive polynomial and the primitive element; the finite field two friendly matrix P2 refers to a finite field two corresponding to the friendly matrix;

[0130] It should be noted that in the field algebra and coding theory, the friendly matrix is a special constructed square matrix, which is used to convert polynomial operation into matrix operation, to realize the equivalent mapping of the algebraic properties of finite field elements and matrix linear transformation.

[0131] Step S602: when , the tth row of the original data packet matrix M j is multiplied by the L2xL2-dimensional matrix corresponding to the coding coefficient to obtain an L2-dimensional binary row vector S' t , and the S' t is juxtaposed by row to obtain a binary matrix M' j ; , and the S' t is juxtaposed by row to obtain a binary matrix M' j ;

[0132] Step S603: when τ+1≤j≤ω, the tth column of the original data packet matrix M j is left multiplied by the transpose of the L1xL1-dimensional matrix corresponding to the coding coefficient to obtain an L1-dimensional binary column vector S' t , and the S' t is juxtaposed by column to obtain a binary matrix M' j ;

[0133] Step S604: when , the tth column of the original data packet matrix M t is left multiplied by the transpose of the L1xL1-dimensional matrix corresponding to the coding coefficient to obtain an L1-dimensional binary column vector S' t , and the S' t is juxtaposed by column to obtain a binary matrix M' j ;Corresponding encoding coefficients is a monomial where 1≤t1≤L1-1, Original data packet m j Corresponding original data packet matrix M j The tth row of M Corresponding L2×L2 matrix Multiplied by the tth row of M t , the S′ t Obtained by concatenating S′ j in row direction is the encoded binary matrix M′ j The tth column of M′ Corresponding L1×L1 matrix Multiplied by the tth column of M′ t , the S′ t Obtained by concatenating S′ j in column direction is the encoded binary matrix M′ j ;

[0134] Step S605: When , the original data packet m j Corresponding encoding coefficients is a polynomial, at this time, each monomial is taken as the encoding coefficient to add the original data packet matrix M j encoded in two dimensions according to step S603 to obtain the encoded binary matrix M′ j ;

[0135] Step S606: Obtain the L1×L2 binary matrix and store it;

[0136] Step S607: For 1≤i1≤r, repeat steps S602-S606 to obtain all binary matrices

[0137] Step S608: When 1≤u≤r, the tth row of Q′ u Multiplied by the element corresponding to the L2×L2 matrix in the uth row and the i2th column of the R×R Vandermonde inverse matrix in the Vandermonde inverse matrix set, an L2-dimensional binary row vector S′ t is obtained, and S′ t Obtained by concatenating S′ u in row direction is the encoded binary matrix Q″ 3 , where 1≤t≤L1;

[0138] Step S609: Obtain the L1×L2 binary matrix

[0139] Step S610: The binary row vector of L1L2 dimensions is obtained by row splicing, that is, the generated redundant data packet after encoding

[0140] Step S611: for 1≤i2≤r, repeat steps S608-S610 to obtain all redundant data packets.

[0141] The L1 order primitive polynomial is All elements in GF(2) belong to GF(2).

[0142] The finite field one friend matrix P1 is:

[0143] The L2 order primitive polynomial is All elements in GF(2) belong to GF(2).

[0144] The finite field two friend matrix P2 is:

[0145] It should be noted that GF(2) is the smallest finite field containing elements 0 and 1, which is suitable for the binary transmission characteristics of adaptive streaming media data. Streaming media data exists in the form of binary stream, and GF(2) domain operation can be directly mapped to logical operation of original data, avoiding the overhead of number system conversion. The nested construction of finite field one and finite field two depends on the primitive polynomial with GF(2) as the base field, which ensures that the finite field operation can be efficiently implemented through digital circuit.

[0146] For example, assuming that L1 is 3, the corresponding primitive polynomial is P1(x)=x 3 +x+1; the corresponding finite field one friend matrix P1 is:

[0147] Assuming that L2 is 4, the corresponding primitive polynomial is P2(x)=x 4 +x+1; the corresponding finite field two friend matrix P2 is:

[0148] The decoding recovery module receives the original data packet and the redundant data packet, and performs decoding according to the received original data packet and the redundant data packet. If the received data packet is K original data packets, the K original data packets are directly recovered. If V redundant data packets and K-V original data packets are received, 1≤V≤R, the decoding recovery operation is performed.

[0149] As shown in Figure 3 , the method for performing the decoding recovery operation comprises:

[0150] Let the received K-V original data packets be denoted as m h ; m h represents the hth original data packet received by the receiving end, 1≤h≤K-V; let the received V redundant data packets be denoted as S g , S g represents the gth redundant data packet received by the receiving end, 1≤g≤V; both h and g are index variables;

[0151] Select the element corresponding to the received original data packet row index h and the received redundant data packet column index g in the two-dimensional nested finite field coding coefficient matrix A to form a re-coding coefficient matrix with a scale of (K-V)×V; the re-coding coefficient matrix reuses the primitive elements of finite field one and finite field two to ensure consistency with the coding logic.

[0152] Perform two-dimensional nested finite field coding on the K-V original data packets using the re-coding coefficient matrix to generate a re-coding result F h ; F h represents the hth re-coded original data packet;

[0153] Convert the re-coding result F h into a corresponding binary matrix JZF h , convert the redundant data packet S g into a corresponding binary matrix JZS g ; perform bit exclusive OR operation on the binary matrix JZF h and the binary matrix JZS g to obtain a data transmission error information matrix, and convert the data transmission error information matrix into error information finite field elements; the error information finite field elements are used to reflect error information in data transmission;

[0154] Select the row index of the unreceived original data packet and the column index of the received redundant data packet in the two-dimensional nested finite field coding coefficient matrix A to form a recovery matrix with a scale of V×V, and obtain the inverse matrix of the recovery matrix by inverting the recovery matrix; the recovery matrix is used to extract a coding coefficient sub-matrix formed by the unreceived original data packet and the received redundant data packet, and provides a basis for subsequent inversion recovery. The construction of the recovery matrix utilizes the coding information of the received redundant data packet, and ensures that the recovery process only depends on available data, thereby adapting to the dynamic packet loss scenario of streaming media transmission.

[0155] Perform two-dimensional finite field coding operation on the error information finite field elements and the inverse matrix of the recovery matrix to obtain all unreceived original data packets, and complete decoding recovery.

[0156] Embodiment 2:

[0157] Please refer toFigure 2 As shown, the embodiment provides a two-dimensional RS code encoding and decoding method for streaming media data transmission, comprising:

[0158] Based on the network state data and the application service data, the encoding parameter set is dynamically set, and the encoding parameter set comprises the original data packet quantity K, the redundant data packet quantity R, the finite field dimension parameter L1 and the finite field dimension parameter L2.

[0159] Based on the encoding parameter set, the finite field one is constructed and the finite field two Based on the finite field two The Vandermonde matrix inverse matrix set required for constructing the two-dimensional RS code structure is constructed.

[0160] Based on the finite field one the finite field two and the Vandermonde matrix inverse matrix set, the RS code generation matrix is constructed.

[0161] Based on the RS code generation matrix and the Vandermonde matrix inverse matrix set, the K original data packets are two-dimensionally encoded, and the R redundant data packets are generated.

[0162] The receiving end decodes according to the received original data packets and redundant data packets, if the received data packets are K original data packets, directly restores the K original data packets, if V redundant data packets and K-V original data packets are received, the decoding recovery operation is performed.

[0163] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be limited by the protection scope of the claims.

[0164] Finally: the above is only a preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A two-dimensional RS code encoding and decoding method for streaming media data transmission, characterized in that, include: Dynamically set the encoding parameter set based on network status data and application service data; The encoding parameter set includes the number of original data packets K, the number of redundant data packets R, and the finite field dimension parameter 1. and finite field dimension parameter two Among them, K and R need to satisfy and The method for setting the encoding parameter set includes: Network status data and application service data are input into the coding parameter setting model to obtain the corresponding coding parameter set; the network status data includes packet loss rate, average round-trip time, available bandwidth, bandwidth fluctuation rate, and network type; the application service data includes flow type, resolution, maximum allowable latency, and upper limit of tolerable packet loss rate; Constructing a finite field based on the set of encoding parameters and finite field 2 Based on finite field two The set of Vandermonde matrix inverses required to construct a two-dimensional RS encoding structure; Based on finite field 1 Finite field 2 The RS code generation matrix is ​​constructed using the set of inverses of the Vandermonde matrix; methods for constructing the RS code generation matrix include: Initialize RS code generation matrix ; Let A be a K×K identity matrix, and let A be a two-dimensional nested finite field coding coefficient matrix. Define dimension as A two-dimensional nested finite field extended generator matrix; the two-dimensional nested finite field extended generator matrix is ​​based on a finite field... The fundamental element, finite field two The primitive element and linear combination elements of finite field one and finite field two are constructed; Extract the first K rows of the two-dimensional nested finite field extended generator matrix to form the finite field extended generator submatrix. Obtain the R×R dimension Vandermonde matrix inverse from the set of Vandermonde matrix inverses, denoted as the R-order Vandermonde matrix inverse. Multiplying the finite field extended generator matrix with the inverse of the R-order Vandermonde matrix yields a two-dimensional nested finite field coding coefficient matrix. This two-dimensional nested finite field coding coefficient matrix is ​​then introduced into the initialized RS code generator matrix to obtain the RS code generator matrix. Based on the RS code generation matrix and the set of Vandermonde matrix inverses, K original data packets are encoded in two dimensions to generate R redundant data packets. The receiving end decodes the received original data packets and redundant data packets. If the received data packets consist of K original data packets, the K original data packets are directly recovered. If V redundant data packets and KV original data packets are received, a decoding recovery operation is performed. The methods for performing the decoding recovery operation include: The received KV raw data packets are denoted as , The received V redundant data packets are denoted as... , h and g are both index variables; Construction scale is The recoding coefficient matrix; Using the recoding coefficient matrix Perform two-dimensional nested finite field encoding to generate recoded results. ; Will and Convert the data transmission error information matrix into the corresponding binary matrix and perform bit XOR operation to obtain the data transmission error information matrix. Then convert the data transmission error information matrix into error information finite field elements. Construct a recovery matrix of size V×V, and invert the recovery matrix to obtain the inverse matrix of the recovery matrix; The error information finite field elements and the inverse of the recovery matrix are used to perform a two-dimensional finite field encoding operation to obtain all the unreceived original data packets, thus completing the decoding and recovery.

2. The two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 1, characterized in that, Methods for generating R redundant data packets include: definition , ; For finite field 2 Finite field encoding cutoff index; The switching threshold for two-dimensional nested encoding; Based on RS code generation matrix, finite field one Finite field 2 , and The first intermediate packet encoding formula is constructed; based on the RS code generation matrix and finite field one Finite field 2 Finite field one With finite field 2 linear combination elements, and The second intermediate package encoding formula is constructed; like Then, based on the first intermediate packet encoding formula, K original data packets are encoded to generate R first intermediate data packets; R redundant data packets are generated based on the R first intermediate data packets and the set of inverse Vandermonde matrices. like Then, based on the second intermediate packet encoding formula, K original data packets are encoded to generate R second intermediate data packets, and R redundant data packets are generated based on the R second intermediate data packets and the set of inverse Vandermonde matrices.

3. The two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 1, characterized in that, The method for constructing the set of inverse Vandermonde matrices includes: S100: Primitive Element Construction Based on Finite Field Two Initialize the Vandermonde matrix of dimension 1; initialize the count variable js to 1; initialize the index variable t to 2, with t ranging from 2 to 1. ; S101: Extract the first t rows and first t columns from the initial Vandermonde matrix to obtain the dimension. Find the Vandermonde matrix and find its inverse to obtain the inverse of the js-th Vandermonde matrix; S102: Let t = t + 1; if t is less than or equal to 1... If t is greater than 1, then set js = js + 1 and return to S101 to continue execution; if t is greater than 1, then js = js + 1 and return to S101 to continue execution. Then we get The inverse of the Vandermonde matrix, The inverses of the Vandermonde matrices are constructed into a set of Vandermonde matrices, and the current process ends.

4. The two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 1, characterized in that, Finite field one and finite field 2 The construction methods include: Obtain the finite field dimension parameter from the encoding parameter set. With finite field dimension parameter two ; Based on the finite field dimension parameter one Constructing a finite field Based on the finite field dimension parameter two Constructing a finite field II .

5. A two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 4, characterized in that, Based on the finite field dimension parameter one Constructing a finite field The methods include: Based on the finite field dimension parameter one The value of is chosen by selecting a primitive polynomial defined on the field GF(2). primitive polynomial The order is equal to ; using primitive polynomials For modulo, define all powers less than The set of binary polynomials is used as the candidate element set for finite field one, totaling [number missing]. There are candidate elements, including a zero element and One non-zero element; The candidate elements construct a finite field. .

6. A two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 4, characterized in that, Based on the finite field dimension parameter two Constructing a finite field II The methods include: Based on the finite field dimension parameter two The value of is chosen by selecting a primitive polynomial defined on the field GF(2). primitive polynomial The order is equal to ; using primitive polynomials For modulo, define all powers less than The set of binary polynomials is used as the candidate element set for the finite field 2, totaling [number missing]. There are candidate elements, including a zero element and One non-zero element; The candidate elements are used to construct a finite field 2. .

7. A two-dimensional RS code encoding and decoding method for streaming media data transmission according to claim 1, characterized in that, The training method for the encoding parameter setting model includes: A dataset for setting encoding parameters, containing network state data and application business data, is constructed and divided into training and validation sets. A multilayer perceptron neural network is used as the encoding parameter setting model to extract features and predict encoding parameter sets from the standardized network state data and application business data. The output layer uses the Softmax activation function to obtain the probability distribution of the encoding parameter sets, and selects the encoding parameter set corresponding to the highest probability as the prediction result. Cross-entropy is used as the loss function, combined with gradient descent-like optimization algorithms for weight updates, and an early stopping strategy is set to terminate training when the validation set accuracy reaches a threshold.

Citation Information

Patent Citations

  • RS code forward error correction method and device

    CN111935485A

  • Raid card adaptive fault-tolerant optimization method and system based on erasure codes

    CN118708121A