A fast encoding method and system for polynomial codes
By optimizing polynomial code encoding using the divide-and-conquer method and FFT, the problems of low efficiency and high complexity in polynomial code encoding are solved, realizing an efficient and flexible encoding scheme suitable for large-scale data encoding and modern communication storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2024-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing polynomial codes have low encoding efficiency, high complexity of recursive algorithms, do not fully utilize the structural characteristics of assignment points, lack flexible performance optimization mechanisms, and have insufficient verification and storage of encoding results.
The polynomial code encoding problem is transformed into a multi-point assignment problem using a divide-and-conquer approach. The computation path is optimized through a recursive algorithm and Fast Fourier Transform (FFT). The optimal computation mode is selected by combining a performance optimization module, and a data storage unit is introduced to ensure the integrity and consistency of the results.
It significantly reduces coding complexity, improves coding efficiency, reduces resource consumption, and enhances system robustness, making it suitable for large-scale data coding needs, especially in fields such as secure communication, sensitive information transmission, and cryptography.
Smart Images

Figure CN120017078B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of channel technology, and specifically relates to a fast coding method and system for polynomial codes. Background Technology
[0002] In the field of algebraic coding, there is a class of codewords based on polynomial definitions, including RS codes. RS codes are a class of error-correcting codes described by multi-ary polynomials, discovered by Reed and Solomon in 1960. In particular, RS codes have seen extensive research into their decoding algorithms over the following decades, resulting in highly mature theories and related technologies. Due to their excellent error-correcting performance, they are widely used in fields such as optical discs, QR codes, and satellite communications.
[0003] Generalized RS codes extend the definition of traditional RS codes, enabling transmission in more complex channels. Besides generalized RS codes, another type of codeword introduces randomness into RS codes, creating an encoding scheme with stronger resistance to attacks. This algorithm not only improves encoding security but also enhances its tolerance to noise and data loss. By adding random elements during the encoding process, attackers find it difficult to predict or manipulate the final generated codewords, making the decoding process more complex. Therefore, this randomness-based variant of RS codes shows great application potential in modern communication systems and data storage, especially in high-security applications such as financial transactions and key exchange.
[0004] Technical problems with existing technologies:
[0005] 1) Polynomial codes have low encoding efficiency
[0006] Traditional polynomial coding requires calculating the polynomial assignment result point by point, resulting in a time complexity of O(n log n). In large-scale data applications, this computational method is inefficient and cannot meet real-time requirements.
[0007] 2) Complexity in the application of recursive algorithms
[0008] Polynomial recursive decomposition and recursive calls to assignment points can easily lead to efficiency bottlenecks when performing large-scale, multi-point assignments, especially when the distribution of assignment points is uneven or the number of assignment points is too large, making it difficult to reduce the algorithm complexity.
[0009] 3) The structural characteristics of the assignment point cannot be fully utilized.
[0010] Existing methods often ignore the characteristics of the assignment point vector (such as whether it can be represented by primitives), which leads to the failure to use efficient algorithms such as Fast Fourier Transform (FFT) to complete multi-point assignment.
[0011] 4) Encoding result verification and storage issues
[0012] Traditional coding schemes lack mechanisms for storing and verifying intermediate results, leading to calculation errors or data inconsistencies in subsequent applications.
[0013] 5) Lack of flexible performance optimization mechanisms
[0014] Existing technologies do not flexibly select the optimal computation path based on the characteristics of the input data (such as the size of the polynomial, the distribution of assignment points, etc.), resulting in insufficient performance or waste of resources. Summary of the Invention
[0015] To address the implementation problems of generalized RS codes and Twisted-RS fast coding methods in existing technologies, this invention provides a fast coding method for polynomial codes.
[0016] This invention provides a system for fast encoding of polynomial codes, the system comprising:
[0017] The data input module is used to receive polynomials of degree less than n and assignment point vectors.
[0018] The data processing module is used for:
[0019] Decompose the polynomial into polynomials with even coefficients and polynomials with odd coefficients;
[0020] Recursively call the subvectors after the decomposition of the assignment point vector;
[0021] Constructing sub-multiplication trees under specific conditions to optimize the computation path of assignment points;
[0022] The output module is used to merge the intermediate results of recursive calculations, generate the final encoded vector, and output the completed encoded result by multiplying it with the weight factor matrix.
[0023] The data processing module further includes:
[0024] The recursive processing unit is used to call the decomposed polynomial and assignment point vector through a recursive algorithm to calculate the results of even-degree and odd-degree coefficient polynomials layer by layer.
[0025] The Fast Fourier Transform (FFT) unit is used to efficiently perform multi-point assignment calculations by means of Fast Fourier Transform (FFT) when the assignment points meet specific conditions.
[0026] The merging unit is used to integrate the target encoding vector based on the results of recursive and segmented calculations, ensuring the integrity and consistency of the output data.
[0027] Furthermore, the system also includes a performance optimization module, used to select the optimal computation path based on the characteristics of the input data, specifically including:
[0028] The parameter analysis unit is used to determine the distribution characteristics of the assignment point vector and the scale of the polynomial.
[0029] The mode selection unit is used to select the optimal mode between the recursive algorithm and the fast Fourier transform.
[0030] The time complexity calculation unit is used to compare coding efficiency in different computation paths to ensure that the time complexity is within or better than the required range.
[0031] Furthermore, the output module includes:
[0032] The encoding generation unit is used to receive the calculation results from the data processing module and combine them with the weight factor matrix to generate the encoded output vector.
[0033] Data storage units are used to record intermediate calculation results and final outputs to support result verification and subsequent optimization;
[0034] The data transmission unit is used to output the encoded results to external storage devices or other application modules, and supports the transmission of various communication protocols and data formats.
[0035] This plan will be based on The polynomial code encoding problem is transformed into a polynomial multi-point assignment problem, and then different assignment algorithms are used according to the properties of the assignment points.
[0036] The proof of this algorithm requires some definitions and theorems as follows:
[0037] Definition 1: Definition Let be a finite field consisting of q elements. The number of elements is p m , where p is a prime number, called the field characteristic. Generally, p is usually 2 or 3. This invention will consider the case where p = 2. The elements of a set are described as follows:
[0038] {0,α 0 ,α 1 ,...,α q-2}
[0039] Where α is the primitive element of a finite field, and a power of the primitive element can represent all elements of the set.
[0040] Definition 2: Definition polynomials on Where the coefficient f of the polynomial i All taken from Right now If the highest degree coefficient of the polynomial is f n-1If ≠ 0, then the degree of the polynomial is n-1, denoted as deg(f(x)) = n-1. The set of polynomials of degree n less than n is denoted as
[0041]
[0042] Definition 3: Consider The n points a0, a1, ..., a n-1 Assigning values to polynomials of degree n-1, that is, calculating the polynomial f(x) in a0, a1, ..., a n-1 The value at that location defines the result.
[0043]
[0044] Then the vector y = (y0, y2, ..., y) n-1 The coefficient vector is f = (f0, f2, ..., f...). n-1 The Discrete Fourier Transform (DFT) of y is also denoted as y = DFT. n (f).
[0045] Definition 4: Let k≤n≤q, and assign point vector α=(α0,…,α n-1 ), where α i (1≤i≤n) is The n distinct assignment points, ν = (ν0, ..., ν) n-1 )where ν i (1≤i≤n) is in Given any weight factor chosen above, the generalized RS code of length n and dimension k is defined as follows:
[0046] C GRS (α,ν) n,k ={(f(α0),…,f(α)} n-1 ))·diag(ν0,…,ν n-1 ),f(x)∈
[0047] F q [x] <k}
[0048] Note 5: The above definition shows that the codeword of a generalized RS code can be obtained by first assigning values to a polynomial f(x) of degree less than k, and then multiplying it by a weighting factor diagonal matrix diag(ν0,…,ν). n-1 )get.
[0049] Definition 5: Let n, k, l ∈ N be positive integers, and l be the Twisted-order value. Choose three vectors:
[0050] t = [t1, ..., t l∈ {1, …, n - k} l
[0051] h = [h1, …, h l ∈ {1, …, k - 1} l
[0052]
[0053] where for i = 1, …, l, each (h i , t i ) tuple is pairwise distinct. Define the twisted polynomial as
[0054]
[0055] Since t i < n - k, i = 1, …, l, the degree of the twisted polynomial Let α = (α0, …, α n-1 ), where α i (1 ≤ i ≤ n) are n pairwise distinct evaluation points on F q . The corresponding Twisted - RS code is defined as:
[0056]
[0057] Notation 6: The encodings of the generalized RS code and the Twisted - RS code defined in Definition 4 and Definition 5 can both be transformed into multi - point evaluation of a polynomial with degree less than followed by multiplication by a diagonal matrix diag(ν0, …, ν n-1 ) determined by the weight factors.<00004
[0060]
[0061] Therefore, there is
[0062] f(x)=f0(x 2 )+xf1(x 2 )
[0063] because Therefore, calculate 0, α 0 ,α 1 ,...,α n-1 The value of f(x) is converted to first calculating 0, α 0 ,α 1 ,...,α n / 2-1 The values of f0(x) and f1(x) are then combined to obtain the result. Then, the results are recursively applied to f0(x) and f1(x). By evaluating each point, the problem of assigning values to n points can be transformed into two... The problem of assigning values to individual points.
[0064] Considering that the time complexity of assigning values to n points is T(n), then we have the following recursive formula:
[0065]
[0066] Therefore, FFT can be used to assign values to n points of a polynomial of degree less than n in O(nlgn) time.
[0067] Definition 8: Let s i =x-α i For 0≤i≤r=logn, 0≤j<2 r-i Define subproduct
[0068]
[0069] This polynomial satisfies the recursive equation
[0070] S 0,j =s j ,S i+1,j =S i,2j ·S i,2j+1
[0071] Theorem 9: Divide the set of assigned points into two equal halves and recursively perform the above process on both halves. This will yield a complete binary tree of depth log₂n = r, where the root node is {α₀, ..., αₙ}. n-1}, the leaf nodes are {α} i}, 0 ≤ i < n. Taking the sub-products defined in Definition 8, the time cost required to calculate the sub-products corresponding to all nodes of the binary tree is Ο(M(n)logn), where M(n) represents the upper bound of the number of operations required to multiply two polynomials of degree less than n.
[0072] Prove Theorem 9: For the nodes at the i-th layer, let d i,j = deg(S i,j ). The time cost required to calculate the sub-products of this layer is
[0073]
[0074] independent of the number of layers. Therefore, the total time cost required to calculate all sub-products is rM(n) = M(n)logn = Ο(M(n)logn). The binary tree formed by all sub-products is called the sub-product tree.
[0075] Definition 10: Let D(n) represent the number of operations required to divide a polynomial of degree less than 2n by a monic polynomial of degree n in .
[0076] Theorem 11: Let the code length n = 2 r , r ∈ N * . If the pairwise distinct evaluation points α0, …, α n-1 are randomly selected in , then the time cost required to evaluate the polynomial is at most Ο(D(n)logn). [[ID=3A]]
[0077] Prove Theorem 11: When r = 0, then n = 1, f(x) ∈ F q , and the corresponding output is f(x). When r ≥ 1, first start from the root node S r,0 (x) of the sub-product tree. According to the definition of S i,j , the polynomials corresponding to the children nodes of the root node of the sub-product tree can be obtained. <^ Similarly Let According to the division algorithm, the following relationship can be obtained:
[0078] ]>
[0079] where deg(S r-1,i (x)) = 2 r-1 > deg(r i (x)), i = 0, 1. Therefore, the values of f(x) at α0, α1, …, can be obtained from r0(x), and the values of α n / 2 , α1, …, α n-1 can be obtained from r1(x). Thus, the problem of evaluating n points is decomposed into two The subproblem of assigning values to each point is solved, and then starting from the root node, we reach the next level of the sub-product tree, assigning values to the nodes S at the current level. r-1,0 (x) and S r-1,1 (x) is set as the parent node, and the division with remainder is performed recursively to solve the two subproblems recursively, eventually reaching the bottom layer of the sub-product tree.
[0080] The following recursive formula can be obtained.
[0081]
[0082] Furthermore, if Newton's iteration method is used for division, the maximum overhead required is rD(n)≤r(5M(n)+O(n))=O(M(n)logn).
[0083] In summary, assigning values to a polynomial with n points requires first calculating the sub-product tree before performing the above operations. Therefore, the total time cost is at most O(n).
[0084] M(n)logn+rD(n)≤(6M(n)+Ο(n))logn=Ο(M(n)logn)
[0085] Therefore, this is proven.
[0086] This invention is implemented as follows: a fast encoding method for polynomial codes, aiming to optimize the encoding time complexity of codes based on polynomial definitions, such as generalized RS codes and Twisted-RS codes. The main part of the encoding method is a fast polynomial assignment algorithm, specifically including the following steps:
[0087] Algorithm input: polynomials of degree less than n Assignment point vector α = (α0,…,α) n-1 ).
[0088] Algorithm output: y = (y0, y2, ..., y n-1 ),y i =f(α) i ), i = 0, ..., n-1.
[0089] Step 1: If n = 1, output f(x).
[0090] Step 2: If the assigned point vector α = (α 0 ,α 1 ,...,α n-1 If the condition is met, proceed to the next step; otherwise, proceed to step 5.
[0091] Step 3: Decompose f(x) into an even-degree coefficient polynomial f0(x) and an odd-degree coefficient polynomial f1(x), and a new assignment point vector α′ = ((α0 ) 2 ,(α 1 ) 2 ,...,(α n-1 ) 2 Using y as input to the algorithm, this algorithm is recursively called. The corresponding output is y. [0] =(f0(α0),f0(α1),…,f0(α) n / 2-1 )), y [1] =(f1(α0),f1(α1),…,f1(α) n / 2-1 )).
[0092] Step 4: Using the formula f(α) i )=f0(α i )+α i f1(α i ), f(α) i+n / 2 )=f0(α i )- The merged result is y = (y0, y2, ..., y n-1 ).
[0093] Step 5: Calculate the sub-multiplication tree to obtain S. i,j , 0≤i≤r=logn, 0≤j<2 r-i If the calculation has already been done, skip directly to step 6.
[0094] Step 6: Calculate r0(x) = f(x) mod S i-1,2j (x), r1(x)=f(x)modS i-1,2j+1 (x).
[0095] Step 7: Divide the assignment point vector to obtain α0={α0,α1,…,α n / 2-1}, α1={α n / 2 ,α n / 2+1 ,…,α n-1}
[0096] Step 8: Take r0(x) and α0, r1(x) and α1 as inputs to the algorithm, and record the corresponding outputs as (r0(α0), ..., r0(α1)). n / 2-1 )),(r1(α n / 2 ),…,r1(α n-1 )).
[0097] Step 9: Merge the results and output y = (r0(α0), ..., r0(α0)). n / 2-1 ), r1(α n / 2 ),…,r1(α n-1 )).
[0098] Finally, the algorithm output y = (y0, y2, ..., y...) n-1 Multiply by the weight factor matrix diag(ν0,…,ν) n-1 Complete the encoding.
[0099] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0100] First, this invention, based on the divide-and-conquer approach, accelerates the encoding of polynomials. The key advantages of this algorithm include:
[0101] 1. Reduced encoding complexity: Traditional polynomial code encoding requires a large number of matrix operations to generate check codes, which is computationally intensive, especially when dealing with large amounts of data. The divide-and-conquer method, by dividing a large-scale encoding task into multiple smaller subtasks, with each subtask being encoded independently, can significantly reduce the overall computational complexity and improve encoding efficiency.
[0102] 2. Reduced resource consumption: By using the divide-and-conquer approach and parallel processing, all data does not need to be processed at once during encoding, reducing the consumption of memory and computing resources. Each subtask is relatively small in scale and requires relatively low computing resources, which is especially important for resource-constrained devices or systems.
[0103] 3. Enhanced error propagation isolation: During the encoding process, the data is divided into multiple sub-blocks using a divide-and-conquer approach. If an encoding error occurs in a sub-block, the error will only affect the encoding result of that sub-block and will not affect the entire encoding process. This improves the robustness of the overall encoding system and reduces the occurrence of global errors.
[0104] 4. Optimized Parallel Processing Capabilities: The divide-and-conquer method fully leverages the advantages of modern computing platforms (such as multi-core processors, GPUs, and distributed computing), enabling RS code encoding to process large amounts of data with higher efficiency. This gives this encoding method a significant advantage in the fields of big data storage and high-speed communication.
[0105] 5. Wide applicability: This algorithm is suitable for industrial communication applications with high requirements for encoding time complexity, including but not limited to secure communication, sensitive information transmission and cryptography.
[0106] In summary, this invention effectively addresses the needs of large-scale data encoding by reducing computational complexity, increasing encoding speed, optimizing resource consumption, and enhancing system scalability, and provides a more efficient and flexible encoding solution for modern communication, storage, and other fields.
[0107] Secondly, as supplementary evidence of the inventive step of the claims of this invention, it is also reflected in the following important aspects:
[0108] (1) The expected benefits and commercial value of the technical solution of this invention after transformation are as follows:
[0109] Encoding information using polynomial codes and placing it in a complex channel accelerates the polynomial code encoding process. This technique can be used in fields such as secure communication, sensitive information transmission, and cryptography.
[0110] (2) The technical solution of this invention fills a technical gap in the industry both domestically and internationally:
[0111] Prior to this, a fast encoding method for polynomial codes had not been discovered. To solve this problem, this invention employs the divide-and-conquer approach, which... The problem of multi-point assignment of polynomials is decomposed into two subproblems of halved size. By recursively solving the subproblems and merging the results, this invention significantly reduces the complexity of the encoding method.
[0112] (3) The technical solution of this invention solves a technical problem that people have long desired to solve but have never been able to achieve: Before this, designing a fast encoding algorithm and system for polynomial codes was challenging because traditional methods usually faced problems such as high computational complexity, large resource consumption, and insufficient real-time performance in practical applications. However, this invention proposes an innovative method that significantly reduces computational complexity and improves encoding efficiency and stability by optimizing the encoding structure and introducing efficient algorithm design.
[0113] Specifically, this invention utilizes optimized polynomial factorization techniques and a parallel computing architecture to significantly shorten coding time. Furthermore, the system incorporates a dynamic data storage strategy, effectively reducing memory consumption and enabling efficient operation in embedded systems and resource-constrained devices.
[0114] This technical solution not only solves the core bottleneck of traditional coding algorithms, but also provides higher reliability and flexibility for data transmission and error correction in practical application scenarios, meeting the urgent needs of the industrial and communication fields.
[0115] (4) The technical solution of this invention overcomes technical bias: by adopting innovative mathematical models and optimization algorithm design, it eliminates the dependence on specific polynomial structures or finite field properties in traditional methods. This invention breaks through the limitation of being applicable only to specific types of polynomial codes and can widely support a variety of coding structures, including but not limited to BCH codes, RS codes, and Twisted-RS codes.
[0116] Third, the significant technological advancements achieved by this invention.
[0117] 1) Significantly improve coding efficiency
[0118] By optimizing the computation path through multinomial factorization, Fast Fourier Transform (FFT), and sub-multiplication trees, the time complexity is reduced from \(O(n^2)\) to \(O(n\log n)\).
[0119] When supporting the random distribution of pairwise different assignment points, the encoding is completed with a complexity of O(M(n)\log n)\), further optimizing the computational efficiency of large-scale random assignment points.
[0120] 2) Combination of recursive algorithms and optimized paths
[0121] This invention decomposes large-scale problems into smaller subproblems by recursively decomposing polynomials and assigning point vectors, thus avoiding the inefficiency caused by one-time calculations in traditional methods.
[0122] When the assignment point satisfies the primitive representation condition, the Fast Fourier Transform (FFT) is preferred, which significantly reduces the number of computation steps.
[0123] 3) Identification and efficient utilization of assignment point characteristics
[0124] By analyzing the distribution characteristics of the assignment points and combining the mode selection unit in the performance optimization module, the recursive algorithm or the fast Fourier transform path can be flexibly selected to ensure that the algorithm has optimal performance under various input conditions.
[0125] 4) Complete result verification and storage mechanism
[0126] The output module incorporates a data storage unit to record intermediate results and final output, supporting result verification and subsequent optimization.
[0127] The data transmission unit provides support for multiple communication protocols and data formats, ensuring that the encoded results can be flexibly applied to different systems.
[0128] 5) High adaptability in industrial applications
[0129] In the field of communications, fast encoding enables efficient transmission and error correction of large-scale data.
[0130] In the storage field, it is applied to erasure coding technology to provide highly reliable redundant data storage and a fast recovery mechanism.
[0131] In encryption and decryption technologies, the goal is to achieve fast encoding while supporting complex polynomial operations.
[0132] 6) Significantly improves system performance and cost-effectiveness
[0133] The time complexity optimization significantly reduces the consumption of computing resources, providing a solution for application scenarios with high real-time requirements.
[0134] The flexible optimization mechanism avoids the waste of computing resources, enabling the system to achieve high performance at low cost.
[0135] This invention addresses the problems of low coding efficiency, insufficient utilization of assignment point characteristics, and lack of performance optimization in existing technologies by introducing recursive decomposition, multi-point assignment optimization, fast Fourier transform, and performance optimization modules, thus achieving fast encoding of polynomial codes. Its significant technological advancements lie in the leap in coding efficiency, optimized flexibility, and improved result verification mechanisms, providing an efficient and reliable solution for applications in communications, storage, and other industries. Attached Figure Description
[0136] Figure 1 This is a flowchart of a fast encoding method for polynomial codes provided in an embodiment of the present invention.
[0137] Figure 2 It clearly demonstrates the difference in coding efficiency between traditional algorithms and optimized algorithms, highlighting the significant advantages of optimized algorithms in handling large-scale coding tasks. Detailed Implementation
[0138] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0139] The following is a detailed description of the working principle of a fast polynomial code encoding system based on hardware and software devices:
[0140] 1. Working principle of the data input module
[0141] The data input module mainly consists of an input interface circuit and a memory management unit.
[0142] At the hardware level: The input interface circuit receives external input polynomial data (polynomials with a degree less than n) and assignment point vectors, and stores them in the memory management unit.
[0143] At the software level: The program uses a parser to validate the input data, ensuring that the polynomial and assignment points conform to the system's format requirements. The coefficients of the polynomial are stored as an array, and the assignment point vector is stored as a one-dimensional array for subsequent data processing modules to access.
[0144] 2. Working principle of the data processing module
[0145] The data processing module is the core of the entire system, and it mainly consists of an embedded processor and a dedicated hardware accelerator (such as an FPGA or GPU) working together to perform efficient calculations.
[0146] Step 1: Polynomial factorization
[0147] At the software level: The embedded processor uses a decomposition algorithm to split the input polynomial into polynomials with even coefficients and polynomials with odd coefficients.
[0148] At the hardware level: FPGA modules are used to parallelize the polynomial decomposition process, storing even-degree and odd-degree coefficients in different registers to reduce the latency of the decomposition operation.
[0149] Step 2: Recursively call assignment point vector decomposition
[0150] At the software level: The program decomposes the assignment point vector according to recursive logic, splitting it into sub-vectors for the next step of optimizing the calculation path.
[0151] At the hardware level: Utilize dedicated hardware accelerators (such as GPUs) to perform parallel computations on the decomposition process of multiple subvectors, thereby improving the speed of assignment point decomposition.
[0152] Step 3: Construct the sub-multiplication tree
[0153] At the software level: Under specific conditions (such as a large number of assignment points), the algorithm dynamically constructs a sub-product tree, optimizes the calculation path of the assignment points, and avoids redundant calculations.
[0154] At the hardware level: Hardware accelerators are used to compute sub-tree nodes, and operations between nodes are completed serially in a pipeline manner to ensure that the construction of sub-trees is efficient and accurate.
[0155] 3. Working principle of the output module
[0156] The output module mainly consists of matrix operation hardware units and output interface circuits, which are used to merge intermediate calculation results and generate the final code.
[0157] Step 1: Merge intermediate results of recursive calculations
[0158] At the hardware level: The matrix operation hardware unit performs parallel computations to sequentially merge the recursively generated sub-results. The merging process utilizes hardware pipeline technology to rapidly accumulate intermediate results into the final encoded vector.
[0159] At the software level: The program calls the merged result through the matrix operation library and stores it in the cache.
[0160] Step 2: Multiply with the weight factor matrix
[0161] At the hardware level: FPGAs or GPUs are used to perform matrix multiplication operations, multiplying the encoded vector by the weight factor matrix to generate the complete encoded result. Hardware acceleration significantly reduces the complexity of matrix multiplication, making it suitable for large-scale data processing.
[0162] Step 3: Output the encoding result
[0163] At the hardware level: the final encoded result is transmitted to external devices in the form of digital signals through the output interface circuit.
[0164] At the software level: the program formats the output (e.g., by adding identifiers or checksums) and sends it to a specified device or stores it in a file via a communication protocol.
[0165] 4. System hardware and software collaborative workflow
[0166] 1. The data input module receives and stores polynomials and assignment point vectors through the input interface and memory unit.
[0167] 2. The data processing module, coordinated by the embedded processor and FPGA / GPU, decomposes the polynomial, recursively assigns assignment points, and constructs a sub-product tree to achieve efficient encoding vector generation.
[0168] 3. The output module uses hardware matrix units to quickly perform matrix multiplication and transmits the final encoded result through the output interface circuit.
[0169] 4. The software is responsible for managing the data flow and processing logic, while the hardware module improves the computational efficiency of key steps to achieve real-time processing.
[0170] Technical advantages:
[0171] 1. Parallel acceleration and pipelined computing in hardware (FPGA / GPU) improve system processing speed, making it suitable for large-scale coding tasks.
[0172] 2. Recursive decomposition and sub-tree construction reduce computational redundancy and improve the utilization of computing resources.
[0173] 3. The software and hardware work together, combining flexibility and efficiency to meet coding needs of different scales and complexities.
[0174] The system provided by this invention first receives two types of input signals through a data input module: one is a polynomial f(x) of degree less than n, and the other is an assignment point vector, which consists of multiple points and is used to define the computational range of the polynomial. During initialization, the system verifies the validity of the input parameters, including checking the degree of the polynomial and the dimension of the assignment point vector, to ensure that the input data meets the encoding requirements.
[0175] The data processing module decomposes the input polynomial into polynomials with even and odd coefficients. Simultaneously, it transforms the assignment point vector into a new assignment point vector, which is then used to recursively compute the decomposed sub-polynomials. The recursive process refines the computational scale of the polynomial and assignment points layer by layer until it reaches the lowest level of the polynomial.
[0176] When the recursion condition is not met, the system enters the sub-multiplication tree computation stage. A sub-multiplication tree is a structure used to quickly partition assignment points and their corresponding polynomials, efficiently handling complex assignment point distributions. By dynamically calculating and storing the nodes of the sub-multiplication tree, the system can reuse previously calculated intermediate results in subsequent steps, thereby reducing overall computational overhead and improving processing efficiency.
[0177] When the assignment point vectors satisfy certain characteristics (e.g., primitive representation), the system employs a Fast Fourier Transform (FFT) module to process the polynomial assignments. The FFT module significantly reduces the time required for multi-point polynomial assignments by optimizing the computation path, making it suitable for large-scale, multi-dimensional encoding tasks. This process further optimizes data processing performance, especially for high-density input signals.
[0178] After the recursive calculation is complete, the system integrates the decomposed polynomial values into a single complete result vector y using a merging formula. This process ensures that the results of each layer of calculation accurately map to the final output. Subsequently, the system multiplies the merged result by the weight factor matrix to generate the final encoded output. This weight factor matrix plays a crucial role in correcting and optimizing the encoding results.
[0179] The encoded results are recorded and transmitted through the output module, supporting multiple output formats to meet different application requirements. Furthermore, the system incorporates a performance optimization mechanism that automatically selects the optimal computation mode (e.g., recursive mode or FFT mode) based on the characteristics of the input data. This flexibility ensures that the system can complete encoding with maximum efficiency under various signal conditions, while outputting consistent and reliable encoded results.
[0180] This process effectively combines advanced technologies such as polynomial factorization, sub-multiplex tree computation, and fast Fourier transform, achieving efficient and accurate polynomial code encoding, and has wide applicability and significant advantages in practical applications.
[0181] This invention provides a fast encoding method for polynomial codes, which is based on... The polynomial code encoding problem is transformed into a polynomial multi-point assignment problem, and then different assignment algorithms are used according to the properties of the assignment points.
[0182] The proof of this algorithm requires some definitions and theorems as follows:
[0183] Definition 1: Definition Let be a finite field consisting of q elements. The number of elements is p m , where p is a prime number, called the field characteristic. Generally, p is usually 2 or 3. This invention will consider the case where p = 2. The elements of a set are described as follows:
[0184] {0,α 0 ,α 1 ,...,α q-2}
[0185] Where α is the primitive element of a finite field, and a power of the primitive element can represent all elements of the set.
[0186] Definition 2: Definition polynomials on Where the coefficient f of the polynomial i All taken from Right now If the highest degree coefficient of the polynomial is f n-1 If ≠ 0, then the degree of the polynomial is n-1, denoted as deg(f(x)) = n-1. The set of polynomials of degree n less than n is denoted as
[0187]
[0188] Definition 3: Consider The n points a0, a1, ..., a n-1 Assigning values to polynomials of degree n-1, that is, calculating the polynomial f(x) in a0, a1, ..., a n-1 The value at that location defines the result.
[0189]
[0190] Then the vector y = (y0, y2, ..., y) n-1 The coefficient vector is f = (f0, f2, ..., f...). n-1 The Discrete Fourier Transform (DFT) of y is also denoted as y = DFT. n (f).
[0191] Definition 4: Let k≤n≤q, and assign point vector α=(α0,…,α n-1 ), where α i (1≤i≤n) is The n distinct assignment points, ν = (ν0, ..., ν) n-1 )where ν i (1≤i≤n) is in Given any weight factor chosen above, the generalized RS code of length n and dimension k is defined as follows:
[0192] C GRS (α,ν) n,k ={(f(α0),…,f(α)}n-1 ))·diag(ν0, …, ν n-1 ), f(x) ∈
[0193] F q [x] <k}
[0194] Annotation 5: The above definition shows that the codewords of the generalized RS code can be obtained by first evaluating a polynomial f(x) of degree less than k and then multiplying by a weight factor diagonal matrix diag(ν0, …, ν n-1 ).
[0195] Definition 5: Let n, k, l ∈ N be positive integers, where l is the Twisted-degree. Choose three vectors:
[0196] t = [t1, …, t l ∈ {1, …, n - k} l
[0197] h = [h1, …, h l ∈ {1, …, k - 1} l
[0198]
[0199] where for i = 1, …, l, each (h i , t i ) tuple is pairwise distinct. Define the twisted polynomial as
[0200]
[0201] Since t i < n - k, i = 1, …, l, the degree of the twisted polynomial Let α = (α0, …, α n-1 ), where α i (1 ≤ i ≤ n) are n pairwise distinct evaluation points in F q . The corresponding Twisted-RS code is defined as:
[0202]
[0203] Annotation 6: The encoding of the generalized RS code and the Twisted-RS code defined in Definition 4 and Definition 5 can both be transformed into multi-point evaluation of a polynomial of degree less than in and then multiplying by a diagonal matrix diag(ν0, …, ν n-1 ) determined by the weight factor.
[0204] Theorem 7: Let the code length n = 2 r,r∈N * If the assignment point vector can be derived from... A primitive element α on the surface is represented as α = (α0, ..., α0) n-1 )=(α 0 ,α 1 ,...,α n-1 If we have a polynomial, then we can use the Fast Fourier Transform (FFT) to assign values to the polynomial, and the time cost required is at most O(nlogn).
[0205] Prove Theorem 7: Divide the coefficients of f(x) into odd-indexed and even-indexed coefficients, and define two new coefficients of degree less than 0.5 for each coefficient. Let f0(x) and f1(x) be polynomials, where the coefficient of f0(x) is the coefficient of all even-numbered subscripts of f(x), and the coefficient of f1(x) is the coefficient of all odd-numbered subscripts of f(x).
[0206]
[0207] Therefore, there is
[0208] f(x)=f0(x 2 )+xf1(x 2 )
[0209] because Therefore, calculate 0, α 0 ,α 1 ,...,α n-1 The value of f(x) is converted to first calculating 0, α 0 ,α 1 ,...,α n / 2-1 The values of f0(x) and f1(x) are then combined to obtain the result. Then, the results are recursively applied to f0(x) and f1(x). By evaluating each point, the problem of assigning values to n points can be transformed into two... The problem of assigning values to individual points.
[0210] Considering that the time complexity of assigning values to n points is T(n), then we have the following recursive formula:
[0211]
[0212] Therefore, FFT can be used to assign values to n points of a polynomial of degree less than n in O(nlgn) time.
[0213] Definition 8: Let s i =x-α i For 0≤i≤r=logn, 0≤j<2 r-i Define subproduct
[0214]
[0215] This polynomial satisfies the recurrence equation
[0216] S 0,j = s j , S i+1,j = S i,2j ·S i,2j+1
[0217] Theorem 9: If the set of assignment points is equally divided into two halves and the above process is recursively performed on these two halves, a complete binary tree with a depth of log2n = r can be obtained, where the root node is {α0, …, α n-1}, the leaf nodes are {α i}, 0 ≤ i < n. Taking the sub-products in Definition 8, the time cost required to calculate the sub-products corresponding to all nodes of the binary tree is Ο(M(n)logn), where M(n) represents the upper bound of the number of operations required to multiply two polynomials with degrees less than n.
[0218] Proof of Theorem 9: For the nodes at the i-th layer, let d i,j = deg(S i,j ). The time cost required to calculate the sub-products at this layer is
[0219]
[0220] independent of the number of layers. Therefore, the total time cost required to calculate all sub-products is rM(n) = M(n)logn = Ο(M(n)logn). The binary tree formed by all sub-products is called the sub-product tree.
[0221] Definition 10: Let D(n) represent the number of operations required to divide a polynomial with degree less than 2n by a monic polynomial with degree n in .
[0222] Theorem 11: Let the code length n = 2 r , r ∈ N * . If the pairwise distinct assignment points α0, …, α n-1 are randomly taken on , then the time cost required to assign values to the polynomial is at most Ο(D(n)logn).
[0223] Proof of Theorem 11: When r = 0, then n = 1, f(x) ∈ F q , and the corresponding output is f(x). When r ≥ 1, first start from the root node S r,0 (x) of the sub-product tree. According to the definition of S i,j , the polynomials corresponding to the children nodes of the root node of the sub-product tree can be obtained Similarly make According to the division with remainder method, the following relationship can be obtained:
[0224]
[0225] Where deg(S) r-1,i (x))=2 r-1 >deg(r i (x)), i=0,1. Therefore, f(x) is effective in α0,α1,… The value of α can be obtained from r0(x). n / 2 ,α1,…,α n-1 The value can be obtained from r1(x). This decomposes the problem of assigning values to n points into two... The subproblem of assigning values to each point is solved, and then starting from the root node, we reach the next level of the sub-product tree, assigning values to the nodes S at the current level. r-1,0 (x) and S r-1,1 (x) is set as the parent node, and the division with remainder is performed recursively to solve the two subproblems recursively, eventually reaching the bottom layer of the sub-product tree.
[0226] The following recursive formula can be obtained.
[0227]
[0228] Furthermore, if Newton's iteration method is used for division, the maximum overhead required is rD(n)≤r(5M(n)+O(n))=O(M(n)logn).
[0229] In summary, assigning values to a polynomial with n points requires first calculating the sub-product tree before performing the above operations. Therefore, the total time cost is at most O(n).
[0230] M(n)logn+rD(n)≤(6M(n)+Ο(n))logn=Ο(M(n)logn)
[0231] Therefore, this is proven.
[0232] like Figure 1 As shown, this embodiment of the invention provides a fast encoding method for polynomial codes, specifically including the following steps:
[0233] Algorithm input: polynomials of degree less than n Assignment point vector α = (α0,…,α) n-1 ).
[0234] Algorithm output: y = (y0, y2, ..., y n-1 ),y i =f(α) i ), i = 0, ..., n-1.
[0235] Step 1: If n = 1, output f(x).
[0236] Step 2: If the assigned point vector α = (α 0 ,α 1 ,...,α n-1 If the condition is met, proceed to the next step; otherwise, proceed to step 5.
[0237] Step 3: Decompose f(x) into an even-degree coefficient polynomial f0(x) and an odd-degree coefficient polynomial f1(x), and a new assignment point vector α′ = ((α 0 ) 2 ,(α 1 ) 2 ,...,(α n-1 ) 2 Using y as input to the algorithm, this algorithm is recursively called. The corresponding output is y. [0] =(f0(α0),f0(α1),…,f0(α) n / 2-1 )), y [1] =(f1(α0),f1(α1),…,f1(α) n / 2-1 )).
[0238] Step 4: Using the formula f(α) i )=f0(α i )+α i f1(α i ), The merged result is y = (y0, y2, ..., y n-1 ).
[0239] Step 5: Calculate the sub-multiplication tree to obtain S. i,j , 0≤i≤r=logn, 0≤j<2 r-i If the calculation has already been done, skip directly to step 6.
[0240] Step 6: Calculate r0(x) = f(x) mod S i-1,2j (x), r1(x)=f(x)modS i-1,2j+1 (x).
[0241] Step 7: Divide the assignment point vector to obtain α0={α0,α1,…,α n / 2-1}, α1={α n / 2 ,α n / 2+1 ,…,α n-1}
[0242] Step 8: Take r0(x) and α0, r1(x) and α1 as inputs to the algorithm, and record the corresponding outputs as (r0(α0), ..., r0(α1)). n / 2-1 )),(r1(α n / 2 ),…,r1(α n-1 )).
[0243] Step 9: Merge the results and output y = (r0(α0), ..., r0(α0)). n / 2-1 ), r1(α n / 2 ),…,r1(α n-1 )).
[0244] Finally, the algorithm output y = (y0, y2, ..., y...) n-1 Multiply by the weight factor matrix diag(ν0,…,ν) n-1 Complete the encoding.
[0245] This invention provides a fast encoding method and system for polynomial codes, which has wide application areas and product adaptability, mainly including but not limited to the following aspects:
[0246] 1: Video transmission system
[0247] This invention provides a reliable video transmission scheme for transmitting video in channels with additive noise interference. It is suitable for channels with strong anti-interference capabilities.
[0248] The video information is split into frames, the pixel value sequence of each frame is extracted, and the pixel values are arranged into an information sequence. Then, a q-ary RS code is constructed using a fast coding algorithm. Appropriate weight factors are introduced according to the characteristics of the channel, and then the code is encoded into a more adaptable generalized RS code. Finally, the encoded pixels are transmitted.
[0249] 2: Public-key cryptosystem
[0250] Public-key cryptosystems based on error-correcting codes (such as the McEliece and Niederreiter encryption systems) provide a secure and efficient cryptographic approach.
[0251] By introducing a twisting operation into RS codes, randomness is added to the codeword polynomial, and information is encoded into Twisted-RS codes, which have greater error correction capabilities and can guarantee shorter key lengths, thereby improving the efficiency and security of cryptographic systems.
[0252] 3: Wireless Communication
[0253] In communication systems such as satellite communication and 5G, which have high requirements for data transmission efficiency and real-time performance, information can be encoded into polynomial codes before transmission by a pre-designed channel coding module for wireless communication. This enables transmission in channels with strong interference, improves data transmission efficiency and reliability, and reduces system overhead.
[0254] To demonstrate that the above embodiments have achieved positive results during research and development or use, and indeed possess significant advantages compared to existing technologies, a specific example is presented below to construct a code length of 2. 3 =8, a generalized RS code with a weight vector of (1,...,1).
[0255] Step 1, let the codeword polynomial be 1 + x + x 2 +x 3 +x 4 +x 5 The assignment point is (1,1,...,1).
[0256] Step 2: Since the set of assignment points can be represented by generator 1, the polynomial is decomposed into an odd-degree polynomial 1 + x + x. 2 And the even-degree polynomial 1+x+x 2 Then, recursively solve the two polynomials.
[0257] Step 3, based on 1+x+x 2 +x 3 +x 4 +x 5 =1+x 2 +(x 2 ) 2 +x(1+x 2 +(x 2 ) 2 The merged results yield a codeword of length 8 and dimension 6 (6,6,6,6,6,6,6,6). Multiplying this by the weight vector gives (6,6,6,6,6,6,6,6,6) to complete the encoding.
[0258] The following example demonstrates random selection of assignment points.
[0259] Step 1, let the codeword polynomial be f(x) = 1 + x + x 2 +x 3 +x 4 +x 5 The assignment point is (1,2,…,7,8).
[0260] Step 2, construct the sub-multiplication tree S based on the assigned points. i,j .
[0261] Step 3, calculate r0(x) = 1 + x + x2 +x 3 +x 4 +x 5 mod1+7x 2 +6x 3 =6x 2 +7x 4 +x 5 r1(x) = 1 + x + x 2 +x 3 +x 4 +x 5 mod1+7x 2 +6x 3 +7x 4 =6 2 +6x 5 .
[0262] Step 4: Divide the assignment point vectors a0 = (1,2,3,4) and a1 = (5,6,7,8) and recursively call this algorithm. The corresponding output records are (6,11,0,6) and (1,14,8,11).
[0263] Step 5: The merged output is (6,11,0,6,1,14,8,11), which is multiplied by the weight vector to obtain (6,11,0,6,1,14,8,11), thus completing the encoding.
[0264] The technical solution of this invention fills a technological gap in the industry both domestically and internationally. Figure 2 As can be seen from the above, excluding the results of this work, no fast encoding algorithm for polynomial codes has yet been discovered. Prior to this, it had been found in F... q The operation on the above reaches O(n) 2 To solve this problem, this invention is based on the divide-and-conquer approach, which reduces the encoding complexity of polynomial codes to O(M(n)logn). If the assignment point can be represented by the generator, the complexity is further reduced to O(nlogn).
[0265] Figure 2 It shows a comparison of different encoding algorithms in terms of encoding complexity, specifically comparing the changes in encoding time as the code length \(n\) between the traditional algorithm and two methods based on assignment point optimization (the assignment point is arbitrarily chosen and the assignment point is represented by a generator).
[0266] 1) Horizontal axis (code length (n))
[0267] The horizontal axis represents the length of the code, \(n\), which is the size of the polynomial data to be processed. As \(n\) increases, the computational cost and complexity of the encoding also increase significantly.
[0268] 2) Vertical axis (encoding time)
[0269] The vertical axis represents the time required for encoding, in microseconds. The increase in time reflects the differences in complexity and efficiency of the encoding algorithms.
[0270] 3) Traditional algorithm (red curve)
[0271] The red curve represents the traditional encoding algorithm. As the code length \(n\) increases, the encoding time of the traditional algorithm increases exponentially. This indicates that the traditional algorithm is inefficient and computationally complex when handling large-scale encoding tasks, making it difficult to meet practical needs.
[0272] 4) The assignment point can be chosen arbitrarily (blue curve)
[0273] The blue curve represents the optimized algorithm that employs the "arbitrary assignment point" strategy. Compared to traditional algorithms, this method significantly reduces encoding time, and the curve's growth rate tends to be linear, indicating that this method is more efficient in large-scale data processing.
[0274] 5) Assignment points are represented by generators (green curve)
[0275] The green curve represents the optimized algorithm that uses the strategy of "assignment points represented by generators". This algorithm further reduces computational complexity, and its curve is almost flush with the horizontal axis, indicating that the coding time increases extremely slowly, making it the most efficient of the three methods.
[0276] 6) Comparative Analysis
[0277] The sharp rise of the red curve indicates that traditional algorithms cannot effectively cope with the encoding needs of large-scale data.
[0278] The gradual increase in the blue and green curves indicates that optimizing the assignment point strategy significantly improves coding efficiency. Among them, the strategy of "assignment points are represented by generators" shows the best performance.
[0279] Figure 2 This clearly demonstrates the difference in coding efficiency between traditional and optimized algorithms, highlighting the significant advantages of optimized algorithms in handling large-scale coding tasks. This provides strong support for selecting efficient coding methods in practical applications, especially the strategy of "assignment points represented by generators," which has extremely high practical application value.
[0280] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0281] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A fast encoding method for a polynomial code, characterized by, Fast encoding methods for polynomial codes include: Algorithm input: number of iterations less than polynomial Assignment point vector ; Output of the algorithm: ; Step 1 : If , output ; Step 2: If the assignment point vector , go to next step, otherwise go to step 5; Step 3: Put Decompose into polynomials of even degree coefficients polynomials with odd coefficients and the new assignment point vector As input to the algorithm, this algorithm is recursively called; the corresponding output is... , ; Step 4: Through the process The merged result is as follows: ; Step 5: Compute the product tree of the subtrees, resulting in , If already computed, go directly to Step 6. Step 6: Calculation , ; Step 7: Divide the assignment point vector to get , ; Step 8: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full and , and The corresponding inputs to the algorithm are recorded as follows: ; Step 9: Merged results output , The output of the algorithm is finally multiplied by a weight factor matrix The encoding is completed. 2. A system for fast encoding of a polynomial code using the fast encoding method for a polynomial code according to claim 1, characterized by, The system includes: The data input module is used to receive polynomials of degree less than n and assignment point vectors. The data processing module is used to: decompose a polynomial into polynomials with even coefficients and polynomials with odd coefficients; recursively call the subvectors after the assignment point vector is decomposed; and construct a sub-product tree under specific conditions to optimize the calculation path of the assignment point. The output module is used to merge the intermediate results of recursive calculations, generate the final encoded vector, and output the completed encoded result by multiplying it with the weight factor matrix. The data processing module further includes: The recursive processing unit is used to call the decomposed polynomial and assignment point vector through a recursive algorithm to calculate the results of even-degree and odd-degree coefficient polynomials layer by layer. The Fast Fourier Transform (FFT) unit is used to efficiently perform multi-point assignment calculations by means of Fast Fourier Transform (FFT) when the assignment points meet specific conditions. The merging unit is used to integrate the target encoding vector based on the results of recursive and segmented calculations to ensure the integrity and consistency of the output data; The system also includes a performance optimization module, used to select the optimal computation path based on the characteristics of the input data, specifically including: The parameter analysis unit is used to determine the distribution characteristics of the assignment point vector and the scale of the polynomial. The mode selection unit is used to select the optimal mode between the recursive algorithm and the fast Fourier transform. a time complexity calculation unit for comparing encoding efficiency in different calculation paths, ensuring that the time complexity is in or a more optimal range; The output module includes: The encoding generation unit is used to receive the calculation results from the data processing module and combine them with the weight factor matrix to generate the encoded output vector. Data storage units are used to record intermediate calculation results and final outputs to support result verification and subsequent optimization; The data transmission unit is used to output the encoded results to external storage devices or other application modules, and supports the transmission of various communication protocols and data formats.
3. The system for a polynomial code of claim 2, wherein, The time complexity of the encoding is analyzed as follows: The encoding of polynomial codes is to first perform... The number of times is less than polynomial The multiple assignments are then multiplied by the weight factor matrix. After completing the encoding, the complexity of multiplying by the weight factor matrix is... It can be ignored; if the assignment point vector can be obtained from... A certain fundamental element It means, that is Therefore, the polynomial can be assigned a value using the Fast Fourier Transform (FFT). The time complexity above is at most Complete coding; If two different assignment points In Randomly, the encoding is completed in O (n) time complexity. O (n) time complexity.
Citation Information
Patent Citations
Rapid soft decoding method and device aiming at RS (Reed-Solomon) code
CN114665891A
Rapid polynomial multiplication method based on Vandermonde matrix decomposition and multiplier
CN116756473A