A decoding method, device, computer device, and storage medium for a polar code
By building a complete binary tree and determining the non-complete binary tree and target node, multiple penalty values are calculated to determine the decoding results of the polarization code, the problem of excessive consumption of polarization code resource in the prior art is solved, and the decoding efficiency is improved.
Patent Information
- Application Number
- CN202011011357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Existing polarization coding algorithms such as FSCL and NEW-FSCL consume a lot of resources during the decoding process, resulting in waste of resources and inefficiency of hardware devices during the decoding process.
By building a complete binary tree corresponding to the target polarization code, starting from the lowest leaf node, the non-complete binary tree and target node are determined based on the number of information bits, and multiple penalty values are calculated layer by layer to determine the decoding result.
This method can save resources consumed by hardware devices during the decoding process, improve the decoding efficiency of polarized code, and reduce resource waste.
Smart Images

Figure CN114257252B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of encoding and decoding, and in particular, to a decoding method, device, computer device and storage medium for polar codes. Background Art
[0002] Communication systems usually adopt channel coding to improve the reliability of data transmission and ensure the quality of communication. The polar code is the first code that has been theoretically proven to achieve the Shannon capacity and has a low decoding complexity. The existing methods for polar codes usually use the successive cancellation list (SCL) algorithm for decoding. Since this algorithm uses a serial decoding method and needs to traverse the entire complete binary tree of decoding, it is easy to cause too high decoding delay, and the node lengths of each layer of the binary tree are different, which limits the efficiency of parallel processing.
[0003] Currently, the algorithms that can achieve the performance of the SCL algorithm are all algorithms that simplify the serial cancellation algorithm, which are called SC-based algorithms. The improvement of such algorithms is mainly to prune the complete decoding binary tree of the SCL into an incomplete binary tree. For example, the FSCL decoding algorithm proposes a method for fast decoding by setting four types (Rate0, Rate1, SPC, and REP) of special points (such as Figure 1 the nodes that are not expanded in the middle). By marking various types of special nodes on the complete decoding binary tree, it can be shrunk into Figure 1 the incomplete binary tree shown. Since hard decisions are directly made at the special nodes without continuing to traverse their child nodes, compared with the SCL algorithm, the FSCL algorithm can reduce the decoding delay with very little performance loss. Currently, the algorithm that improves the FSCL algorithm is the NEW-FSCL algorithm, which adds five additional types (TYPEI, TYPEII, TYPEIII, TYPEIV, and TYPEV) of special points. The generated incomplete binary tree is as shown in Figure 2 shown, which can achieve less performance loss while reducing the delay.
[0004] However, in the FSCL decoding algorithm and the NEW-FSCL decoding algorithm, due to the large number of special nodes set, the resources consumed by the hardware device during the decoding process are relatively large. Summary of the Invention
[0005] The embodiments of the present invention provide a decoding method, device, computer device and storage medium for polar codes, which save the resources consumed by the hardware device during the decoding process.
[0006] In a first aspect, an embodiment of the present invention provides a decoding method for a polar code. The method includes:
[0007] Obtain a target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code;
[0008] Starting from the bottommost leaf nodes of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node;
[0009] Starting from the root node of the incomplete binary tree, calculate multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes;
[0010] Determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes.
[0011] In a second aspect, an embodiment of the present invention further provides a decoding device for a polar code. The device includes:
[0012] A complete binary tree construction module, configured to obtain a target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code;
[0013] An incomplete binary tree determination module, configured to start from the bottommost leaf nodes of the complete binary tree, and determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node;
[0014] A penalty value calculation module, configured to start from the root node of the incomplete binary tree, and calculate multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes;
[0015] A decoding result determination module, configured to determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device. The computer device includes:
[0017] One or more processors;
[0018] A storage device, configured to store one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors execute the decoding method for a polar code provided in any embodiment of the present invention.
[0020] Fourthly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the decoding method of the polar code provided in any embodiment of the present invention is implemented.
[0021] The technical solution of the embodiment of the present invention obtains a target polar code and the code length of the target polar code, constructs a complete binary tree corresponding to the target polar code according to the code length of the target polar code, and then starts from the leaf nodes at the bottom layer of the complete binary tree, and determines an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node. Starting from the root node of the incomplete binary tree, the multiple penalty values corresponding to each target node are calculated layer by layer according to the information bits and frozen bits included in each target node, and finally, according to the multiple penalty values corresponding to each target node, the decoding result of the polar code is determined. The technical solution of the embodiment of the present invention can save the resources consumed by the hardware device during the decoding process and improve the decoding efficiency of the polar code. Description of the Drawings
[0022] Figure 1 It is a schematic diagram of the code tree constructed when decoding the polar code using the FSCL algorithm;
[0023] Figure 2 It is a schematic diagram of the code tree constructed when decoding the polar code using the NEW-FSCL algorithm;
[0024] Figure 3a It is a flowchart of a decoding method of a polar code in Embodiment 1 of the present invention;
[0025] Figure 3b It is a schematic diagram of the complete binary tree in Embodiment 1 of the present invention;
[0026] Figure 3c It is a schematic diagram of the incomplete binary tree in Embodiment 1 of the present invention;
[0027] Figure 4 It is a flowchart of a decoding method of a polar code in Embodiment 2 of the present invention;
[0028] Figure 5 It is a flowchart of a decoding method of a polar code in Embodiment 3 of the present invention;
[0029] Figure 6 It is a structural diagram of a decoding device of a polar code in Embodiment 4 of the present invention;
[0030] Figure 7 It is a schematic diagram of the structure of a computer device in Embodiment 5 of the present invention. Detailed Embodiments
[0031] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the convenience of description, only the parts related to the present invention rather than all the structures are shown in the drawings.
[0032] Embodiment 1
[0033] Figure 3a FIG. is a flowchart of a decoding method for a polar code provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where after obtaining a signal encoded by a polar code, the polar code is automatically decoded. This method can be executed by a decoding device for a polar code. The device can be implemented by software and / or hardware and is generally integrated in a computer device. The specific steps are as follows:
[0034] Step 110: Obtain a target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code.
[0035] In this step, optionally, after obtaining a signal encoded by a polar code, the polar code to be decoded is used as the target polar code, and then starting from the root node of the binary tree, a complete binary tree corresponding to the target polar code is constructed. Among them, assuming that the code length of the target polar code is N and the number of layers of the complete binary tree is N1, then:
[0036] N1 = log2N + 1
[0037] Assume that the code length of the target polar code is 8, and the constructed complete binary tree is as Figure 3b shown.
[0038] Step 120: Starting from the leaf nodes at the bottom layer of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and a target node according to the number of information bit positions in each leaf node.
[0039] In this embodiment, when the polar code to be decoded is obtained, the number of information bit positions in each leaf node corresponding to the polar code can be directly obtained. Optionally, it can be determined whether the number of information bit positions in each leaf node meets a preset numerical requirement. If so, it can be determined that the leaf node is a valid node and the leaf node is retained; if not, the leaf node is discarded to obtain an incomplete binary tree corresponding to the target polar code.
[0040] In an implementation manner of the embodiment of the present invention, optionally, starting from the leaf nodes at the bottom layer of the complete binary tree, determining an incomplete binary tree corresponding to the target polar code and a target node according to the number of information bit positions in each leaf node includes:
[0041] Step 121: Starting from the bottom layer of the full binary tree, sequentially obtain one level in the full binary tree as the current processing level, and obtain the number of information bits in each left leaf node and the corresponding right leaf node in the current processing level;
[0042] In this step, as Figure 3b shown, assuming that the fourth level is the current processing level, when a left leaf node in the current processing level is node 15, the right leaf node corresponding to this left leaf node is node 16.
[0043] Step 122: If the sum of the number of information bits in the left leaf node and the number of information bits in the corresponding right leaf node is less than a preset threshold, discard the left leaf node and the right leaf node;
[0044] In this step, the preset threshold can be set to 7, and the specific value is preset according to the actual situation, and this embodiment does not limit this. As Figure 3b shown, optionally, assuming that the sum of the number of information bits in node 15 and node 16 is less than 7, then discard node 15 and node 16; if the sum of the number of information bits in node 15 and node 16 is greater than or equal to 7, then retain node 15 and node 16.
[0045] Step 123: Return to execute the operation of sequentially obtaining one level in the full binary tree as the current processing level, and obtaining the number of information bits in each left leaf node and right leaf node in the current processing level, until the processing of all levels in the full binary tree is completed, and a non-full binary tree corresponding to the target polar code is obtained;
[0046] In this step, as Figure 3b shown, assuming that after the processing of each leaf node in the fourth level is completed, then return to the third level, use the third level as the current processing level, and execute step 121 until the processing of all levels in the full binary tree is completed, and a non-full binary tree corresponding to the target polar code is obtained, as Figure 3c shown.
[0047] Step 124: Use the nodes in the non-full binary tree that have not been binary-expanded as target nodes.
[0048] In this step, as Figure 3c shown, the target nodes are node 3, node 5, node 9, node 10, node 14, node 27, and node 28.
[0049] Thus, through the number of information bits in the leaf nodes, fewer target nodes can be determined, reducing the processing of other nodes, and thereby saving the resources consumed by the hardware device during the decoding process.
[0050] Step 130: Starting from the root node of the non-full binary tree, calculate the multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes.
[0051] In this step, optionally, the penalty value corresponding to the target node can be calculated according to the relationship between the information bits and the frozen bits in the target node. Among them, the smaller the penalty value corresponding to the target node, the more accurate the decoding result determined by using this target node.
[0052] In an implementation manner of the embodiment of the present invention, optionally, starting from the root node of the non-full binary tree, calculating the multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes includes:
[0053] Step 131: Starting from the root node of the non-full binary tree, traverse and calculate the log-likelihood ratio of each node in the non-full binary tree;
[0054] In this step, optionally, the log-likelihood ratio algorithm (LLR, Log Likelihood Ratio) can be used to calculate the log-likelihood ratio of each node.
[0055] Step 132: Calculate the multiple hard decision expected values corresponding to the target node according to the information bit positions and frozen bit positions included in each of the target nodes;
[0056] Among them, optionally, calculating the multiple hard decision expected values corresponding to the target node according to the information bit positions and frozen bit positions included in each of the target nodes includes: combining the information bits and frozen bits included in the target node to obtain multiple corresponding codewords under different combinations; calculating the multiple hard decision expected values corresponding to the target node according to the multiple codewords and the layer number corresponding to the target node.
[0057] In this step, optionally, assuming that the number of information bit positions and frozen bit positions in the target node is both M, then after combining the information bits and frozen bits, 2 M items of codewords can be obtained. Specifically, assuming that the information bits are (0 1 0 1) and the frozen bits are (0 0 0 0), then one item of the combined codeword u1 can be (0 1 0 1 0 0 0 0). Assuming that the layer number corresponding to the target node is n and the codeword is u1, then the following formula is used to calculate the hard decision expected value λ1 corresponding to the target node:
[0058]
[0059] Among them, F is the Kronecker transform matrix of the Kronecker product. Specifically,
[0060] Thus, through the above method, the multiple hard decision expected values corresponding to multiple codewords can be calculated.
[0061] Step 133: Calculate the multiple penalty values corresponding to the multiple hard decision expected values according to the log-likelihood ratio of the target node and the multiple hard decision expected values corresponding to the target node.
[0062] In this step, optionally, assuming that the log-likelihood ratio of the target node is α and the corresponding one hard decision expected value is λ1, the penalty value PM1 corresponding to the hard decision expected value λ1 can be calculated according to the following formula:
[0063]
[0064] Thus, the multiple penalty values corresponding to the multiple hard decision expected values can be calculated through the above formula.
[0065] In this embodiment, the multiple hard decision expected values corresponding to the target nodes can be stored in a preset storage area. Since each hard decision expected value is independent, parallel calculation of multiple target nodes can be realized, thereby improving the decoding efficiency of the polar code.
[0066] Step 140: Determine the decoding result of the polar code according to the multiple penalty values corresponding to each target node.
[0067] In an implementation manner of the embodiment of the present invention, optionally, the multiple penalty values corresponding to all target nodes can be used as the decoding result of the polar code.
[0068] The technical solution of the embodiment of the present invention obtains the target polar code and the code length of the target polar code, constructs a complete binary tree corresponding to the target polar code according to the code length of the target polar code, then starts from the leaf nodes at the bottom layer of the complete binary tree, determines the non-complete binary tree corresponding to the target polar code and the target nodes according to the number of information bit positions in each leaf node, and starts from the root node of the non-complete binary tree, calculates the multiple penalty values corresponding to each target node layer by layer according to the information bits and frozen bits included in each target node, and finally determines the decoding result of the polar code according to the multiple penalty values corresponding to each target node. The technical solution of the embodiment of the present invention can save the resources consumed by the hardware device during the decoding process and improve the decoding efficiency of the polar code.
[0069] Embodiment 2
[0070] This embodiment is a further refinement of the above-mentioned Embodiment 1. For the same or corresponding term explanations as those in the above-mentioned embodiment, they will not be repeated in this embodiment. Figure 4 FIG. 2 is a flowchart of a decoding method for a polar code provided in Embodiment 2 of the present invention. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the above-mentioned embodiment. In this embodiment, as Figure 4 shown, the method provided in the embodiment of the present invention may further include:
[0071] Step 210: Obtain a target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code.
[0072] Step 220: Starting from the leaf nodes at the bottom layer of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node.
[0073] Step 230: Starting from the root node of the incomplete binary tree, calculate the multi-term penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes.
[0074] Step 240: Sort the multi-term penalty values corresponding to the target nodes, and select the smallest preset number of penalty values from the sorted multi-term penalty values as the target penalty values.
[0075] In this step, optionally, the multi-term penalty values can be sorted in ascending order, and from the sorted multi-term penalty values, the preset number of penalty values are intercepted from the front to the back as the target penalty values.
[0076] In this embodiment, optionally, a bitonic sorting hardware can be used to sort the multi-term penalty values. Specifically, when the number of multi-term penalty values is less than the number required by the bitonic sorting hardware, a method of supplementing extremely large values (such as 999) in the multi-term penalty values can be adopted to enable the bitonic sorting hardware to sort the supplemented multi-term penalty values.
[0077] Step 250: Use the target penalty values and the corresponding hard decision expected values as the decoding results corresponding to the target nodes.
[0078] Thus, by obtaining the penalty values with smaller values corresponding to the target nodes and the corresponding hard decision expected values, the accuracy of the decoding results corresponding to the target nodes can be ensured.
[0079] Step 260: Use the decoding results corresponding to all the target nodes as the decoding result of the polar code.
[0080] The technical solution of the embodiment of the present invention constructs a complete binary tree corresponding to the target polar code. Starting from the bottom-layer leaf nodes of the complete binary tree, according to the number of information bit positions in each leaf node, an incomplete binary tree corresponding to the target polar code and target nodes are determined. Then, starting from the root node of the incomplete binary tree, according to the information bits and frozen bits included in each target node, the multiple penalty values corresponding to each target node are calculated layer by layer. The multiple penalty values corresponding to the target nodes are sorted, and the smallest preset number of penalty values are selected from the sorted multiple penalty values as the target penalty values. The target penalty values and the corresponding hard decision expected values are used as the decoding results corresponding to the target nodes, and the decoding results corresponding to all target nodes are used as the decoding result of the polar code. The technical solution of the embodiment of the present invention can save the resources consumed by the hardware device during the decoding process, improve the decoding efficiency of the polar code, and ensure the accuracy of the decoding result.
[0081] Embodiment III
[0082] This embodiment is a further refinement of the above Embodiment II. For the same or corresponding term explanations as those in the above embodiment, they will not be repeated in this embodiment. Figure 5 The flowchart of a decoding method for a polar code provided by Embodiment III of the present invention is shown. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the solutions of the above embodiments. In this embodiment, as Figure 5 shown, the method provided by the embodiment of the present invention may further include:
[0083] Step 310: Obtain the target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code.
[0084] Step 320: Starting from the bottom-layer leaf nodes of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node.
[0085] Step 330: Starting from the root node of the incomplete binary tree, determine whether each node is a left leaf node layer by layer. If yes, execute Step 340; if not, execute Step 350.
[0086] Step 340: Calculate the log-likelihood ratio of the node according to the node length of the parent node corresponding to the node and the log-likelihood ratio of the parent node.
[0087] In this step, if a node in the incomplete binary tree is a left leaf node, such as Figure 3c node 27 in, assume that the node length of the parent node corresponding to this node is N v , and the log-likelihood ratio of the parent node is α v , The log-likelihood ratio α of the node can be calculated according to the following formula l :
[0088]
[0089] Step 350: Obtain the hard decision value of the left leaf node corresponding to the node. According to the hard decision value of the left leaf node, the node length of the parent node corresponding to the node, and the log-likelihood ratio of the parent node, calculate the log-likelihood ratio of the node.
[0090] In this step, if a node in the non-full binary tree is a right leaf node, such as Figure 3c node 28 in, it is necessary to obtain the hard decision value of the left leaf node (i.e., node 27) corresponding to the node. In this embodiment, optionally, assume that the log-likelihood ratio of the left leaf node is α l , then the hard decision value β of the left leaf node can be obtained through the following formula l :
[0091]
[0092] In this step, after obtaining the hard decision value β of the left leaf node l , the node length of the parent node corresponding to the node is N v , the log-likelihood ratio α of the parent node v , then calculate the log-likelihood ratio of the node according to the following formula
[0093]
[0094] In an implementation manner of the embodiment of the present invention, if a node in the non-full binary tree is a right leaf node, after calculating the log-likelihood ratio of the node, it further includes: calculating the hard decision value corresponding to the node according to the log-likelihood ratio of the node; updating the hard decision value of the parent node corresponding to the node according to the hard decision value of the left leaf node corresponding to the node and the hard decision value corresponding to the node, so as to traverse and calculate the log-likelihood ratios of the leaf nodes at the same level corresponding to the parent node.
[0095] Among them, as Figure 3c shown, assuming that the log-likelihood ratio α of node 28 is calculated r After that, the hard decision value β corresponding to node 28 is calculated in the same way as above r , then according to the hard decision value β of node 27 l , and the hard decision value β corresponding to node 28 r , update the hard decision value of the parent node corresponding to the node, so as to traverse and calculate the leaf nodes at the same level corresponding to the parent node (such asFigure 3c The log-likelihood ratio of node 14) in
[0096] In this embodiment, optionally, the hard decision value of the parent node can be updated according to the following formula:
[0097]
[0098] where β v is the hard decision value of the parent node.
[0099] Thus, by adopting algorithms that respectively match the left leaf node and the right leaf node, calculating the log-likelihood ratio corresponding to each node in the non-full binary tree can improve the accuracy of the subsequent penalty value calculation result, and further improve the accuracy of the polar code decoding result.
[0100] Step 360: Calculate the multiple hard decision expected values corresponding to the target nodes according to the information bits and frozen bits included in each target node.
[0101] Step 370: Calculate the multiple penalty values corresponding to the multiple hard decision expected values according to the log-likelihood ratio of the target node and the multiple hard decision expected values corresponding to the target node.
[0102] Step 380: Determine the decoding result of the polar code according to the multiple penalty values corresponding to each target node.
[0103] The technical solution of the embodiment of the present invention constructs a full binary tree corresponding to the target polar code, starts from the bottommost leaf nodes of the full binary tree, determines the non-full binary tree corresponding to the target polar code and the target nodes according to the number of information bit positions in each leaf node; then starts from the root node of the non-full binary tree, layer by layer, determines whether each node is a left leaf node. If so, calculates the log-likelihood ratio of the node according to the node length of the parent node and the log-likelihood ratio of the parent node; if not, obtains the hard decision value of the left leaf node corresponding to the node, and calculates the log-likelihood ratio of the node according to the hard decision value of the left leaf node, the node length of the parent node, and the log-likelihood ratio of the parent node; finally, calculates the multiple hard decision expected values corresponding to the target nodes according to the information bits and frozen bits included in each target node, calculates the multiple penalty values corresponding to the multiple hard decision expected values according to the log-likelihood ratio of the target node and the multiple hard decision expected values corresponding to the target node, and determines the decoding result of the polar code according to the multiple penalty values corresponding to each target node. The technical solution of the embodiment of the present invention can save the resources consumed by the hardware device during the decoding process, improve the decoding efficiency of the polar code, and improve the accuracy of the decoding result.
[0104] Embodiment Four
[0105] Figure 6The figure is a structural diagram of a decoding device for a polar code provided in the fourth embodiment of the present invention. The device includes: a full binary tree construction module 410, an incomplete binary tree determination module 420, a penalty value calculation module 430, and a decoding result determination module 440.
[0106] Among them, the full binary tree construction module 410 is configured to obtain a target polar code and the code length of the target polar code, and construct a full binary tree corresponding to the target polar code according to the code length of the target polar code; the incomplete binary tree determination module 420 is configured to start from the bottommost leaf nodes of the full binary tree, and determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node; the penalty value calculation module 430 is configured to start from the root node of the incomplete binary tree, and layer by layer calculate multiple penalty values corresponding to each of the target nodes according to the information bits and frozen bits included in each of the target nodes; the decoding result determination module 440 is configured to determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes.
[0107] The technical solution of the embodiment of the present invention obtains a target polar code and the code length of the target polar code, constructs a full binary tree corresponding to the target polar code according to the code length of the target polar code, then starts from the bottommost leaf nodes of the full binary tree, determines an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node, and starts from the root node of the incomplete binary tree, layer by layer calculates multiple penalty values corresponding to each of the target nodes according to the information bits and frozen bits included in each of the target nodes, and finally determines the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes. The technical solution of the embodiment of the present invention can save the resources consumed by the hardware device during the decoding process and improve the decoding efficiency of the polar code.
[0108] Based on the above embodiments, the incomplete binary tree determination module 420 may include:
[0109] An information bit position acquisition unit, configured to start from the bottommost layer of the full binary tree, sequentially acquire one layer in the full binary tree as the current processing layer, and acquire the number of information bit positions in each left leaf node and the corresponding right leaf node in the current processing layer;
[0110] A discard unit, configured to discard the left leaf node and the right leaf node if the sum of the number of information bit positions in the left leaf node and the number of information bit positions in the corresponding right leaf node is less than a preset threshold;
[0111] A return execution unit, configured to return and execute an operation of sequentially obtaining one layer of the complete binary tree as the current processing layer, and obtaining the number of information bits in each left leaf node and right leaf node in the current processing layer, until the processing of all levels of the complete binary tree is completed, so as to obtain an incomplete binary tree corresponding to the target polar code;
[0112] A target node determination unit, configured to use a node in the incomplete binary tree that has not undergone binary expansion as the target node.
[0113] A penalty value calculation module 430 may include:
[0114] A log-likelihood ratio calculation unit, configured to start from the root node of the incomplete binary tree, and traverse and calculate the log-likelihood ratio of each node in the incomplete binary tree;
[0115] A hard decision expected value calculation unit, configured to calculate multiple hard decision expected values corresponding to the target node according to the information bits and frozen bits included in each target node;
[0116] A multiple penalty value calculation unit, configured to calculate multiple penalty values corresponding to the multiple hard decision expected values according to the log-likelihood ratio of the target node and the multiple hard decision expected values corresponding to the target node;
[0117] A left leaf node processing unit, configured to, if the node is a left leaf node, calculate the log-likelihood ratio of the node according to the node length of the parent node corresponding to the node and the log-likelihood ratio of the parent node;
[0118] A right leaf node processing unit, configured to, if the node is a right leaf node, obtain the hard decision value of the left leaf node corresponding to the node, and calculate the log-likelihood ratio of the node according to the hard decision value of the left leaf node, the node length of the parent node corresponding to the node, and the log-likelihood ratio of the parent node;
[0119] A hard decision value calculation unit, configured to, if the node is a right leaf node, after calculating the log-likelihood ratio of the node, calculate the hard decision value corresponding to the node according to the log-likelihood ratio of the node;
[0120] A hard decision value update unit, configured to, if the node is a right leaf node, update the hard decision value of the parent node corresponding to the node according to the hard decision value of the left leaf node corresponding to the node and the hard decision value of the node, so as to traverse and calculate the log-likelihood ratio of the leaf nodes at the same level corresponding to the parent node;
[0121] A codeword generation unit, configured to combine the information bits and frozen bits included in the target node to obtain multiple codewords corresponding to different combinations;
[0122] A multiple hard decision expected value calculation unit, configured to calculate a multiple hard decision expected value corresponding to the target node according to the multiple codewords and the layer number corresponding to the target node.
[0123] The decoding result determination module 440 may include:
[0124] A penalty value sorting unit, configured to sort the multiple penalty values corresponding to the target node, and select the smallest preset number of penalty values from the sorted multiple penalty values as the target penalty value;
[0125] A target node decoding result determination unit, configured to use the target penalty value and the corresponding hard decision expected value as the decoding result corresponding to the target node;
[0126] A polar code decoding result determination unit, configured to use the decoding results corresponding to all target nodes as the decoding result of the polar code.
[0127] The decoding device of the polar code provided by the embodiment of the present invention can execute the decoding method of the polar code provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0128] Embodiment 5
[0129] Figure 7 FIG. is a schematic structural diagram of a computer device provided by Embodiment 5 of the present invention. As Figure 7 shown, the computer device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the computer device may be one or more. Figure 7 Taking one processor 510 as an example; the processor 510, the memory 520, the input device 530, and the output device 540 in the computer device may be connected through a bus or other means. Figure 7 Taking the connection through the bus as an example. The memory 520, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to a decoding method of a polar code in any embodiment of the present invention (for example, the complete binary tree construction module 410, the non-complete binary tree determination module 420, the penalty value calculation module 430, and the decoding result determination module 440 in a decoding device of a polar code). The processor 510 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 520, that is, implements the above-mentioned decoding method of a polar code. That is, when the program is executed by the processor, it realizes:
[0130] Obtain the target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code;
[0131] Starting from the bottommost leaf nodes of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node;
[0132] Starting from the root node of the incomplete binary tree, calculate the multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes;
[0133] Determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes.
[0134] The memory 520 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 520 may further include a memory remotely provided relative to the processor 510, and these remote memories may be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The input device 530 may be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the computer device, and may include a keyboard, a mouse, etc. The output device 540 may include a display device such as a display screen.
[0135] Embodiment Six
[0136] Embodiment Six of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method described in any embodiment of the present invention. Of course, a computer-readable storage medium provided by an embodiment of the present invention can perform related operations in a decoding method of a polar code provided by any embodiment of the present invention. That is, when the program is executed by a processor, it implements:
[0137] Obtain the target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code;
[0138] Starting from the bottommost leaf nodes of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and target nodes according to the number of information bit positions in each leaf node;
[0139] Starting from the root node of the non-full binary tree, according to the information bits and frozen bits included in each of the target nodes, calculate the multiple penalty values corresponding to each of the target nodes layer by layer;
[0140] Determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes.
[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disc of a computer, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0142] It should be noted that in the above embodiments of a positioning device for testing anomalies, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0143] Note that the above is only the preferred embodiment of the present invention and the applied technical principle. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A decoding method for polar codes, characterized in that obtain a target polar code and the code length of the target polar code, and construct a complete binary tree corresponding to the target polar code according to the code length of the target polar code; starting from the bottommost leaf nodes of the complete binary tree, determine an incomplete binary tree corresponding to the target polar code and determine target nodes according to the number of information bit positions in each leaf node; starting from the root node of the incomplete binary tree, calculate the multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes; determine the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes; the step of starting from the bottommost leaf nodes of the complete binary tree, determining an incomplete binary tree corresponding to the target polar code and determining target nodes according to the number of information bit positions in each leaf node includes: starting from the bottommost layer of the complete binary tree, sequentially obtain one layer of the complete binary tree as the current processing layer, and obtain the number of information bit positions in each left leaf node and the corresponding right leaf node in the current processing layer; if the sum of the number of information bit positions in the left leaf node and the number of information bit positions in the corresponding right leaf node is less than a preset threshold, discard the left leaf node and the right leaf node; return to execute the operation of sequentially obtaining one layer of the complete binary tree as the current processing layer, and obtaining the number of information bit positions in each left leaf node and right leaf node in the current processing layer until the processing of all layers in the complete binary tree is completed, to obtain an incomplete binary tree corresponding to the target polar code; take the nodes in the incomplete binary tree that have not been binary-expanded as target nodes.
2. The method according to claim 1, wherein starting from the root node of the incomplete binary tree, calculating the multiple penalty values corresponding to each of the target nodes layer by layer according to the information bits and frozen bits included in each of the target nodes includes: starting from the root node of the incomplete binary tree, traverse and calculate the log-likelihood ratio of each node in the incomplete binary tree; calculate the multiple hard decision expected values corresponding to the target nodes according to the information bits and frozen bits included in each of the target nodes; calculate the multiple penalty values corresponding to the multiple hard decision expected values according to the log-likelihood ratio of the target nodes and the multiple hard decision expected values corresponding to the target nodes.
3. The method according to claim 2, characterized in that determining the decoding result of the polar code according to the multiple penalty values corresponding to each of the target nodes includes: sort the multiple penalty values corresponding to the target nodes, and select the smallest preset number of penalty values in the sorted multiple penalty values as target penalty values; take the target penalty values and the corresponding hard decision expected values as the decoding results corresponding to the target nodes; take the decoding results corresponding to all target nodes as the decoding result of the polar code.
4. The method according to claim 2, wherein starting from the root node of the incomplete binary tree, traversing and calculating the log-likelihood ratio of each node in the incomplete binary tree includes: If the node is a left leaf node, calculate the log-likelihood ratio of the node according to the node length of the parent node corresponding to the node and the log-likelihood ratio of the parent node. If the node is a right leaf node, obtain the hard decision value of the left leaf node corresponding to the node, and calculate the log-likelihood ratio of the node according to the hard decision value of the left leaf node, the node length of the parent node corresponding to the node, and the log-likelihood ratio of the parent node.
5. The method according to claim 4, wherein If the node is a right leaf node, after calculating the log-likelihood ratio of the node, it further includes: Calculate the hard decision value corresponding to the node according to the log-likelihood ratio of the node. Update the hard decision value of the parent node corresponding to the node according to the hard decision value of the left leaf node corresponding to the node and the hard decision value of the node, so as to traverse and calculate the log-likelihood ratios of the leaf nodes at the same level corresponding to the parent node.
6. The method according to claim 2, wherein Calculate multiple hard decision expected values corresponding to the target node according to the information bits and frozen bits included in the target node, including: Combine the information bits and frozen bits included in the target node to obtain multiple codewords corresponding to different combinations. Calculate multiple hard decision expected values corresponding to the target node according to the multiple codewords and the layer number corresponding to the target node.
7. A decoding device for a polar code, characterized in that, It includes: A full binary tree construction module, configured to obtain a target polar code and the code length of the target polar code, and construct a full binary tree corresponding to the target polar code according to the code length of the target polar code. An incomplete binary tree determination module, configured to start from the bottommost leaf nodes of the full binary tree, determine an incomplete binary tree corresponding to the target polar code and determine a target node according to the number of information bit positions in each leaf node. A penalty value calculation module, configured to start from the root node of the incomplete binary tree, and calculate multiple penalty values corresponding to each target node layer by layer according to the information bits and frozen bits included in each target node. A decoding result determination module, configured to determine the decoding result of the polar code according to the multiple penalty values corresponding to each target node. The incomplete binary tree determination module includes: An information bit position acquisition unit, configured to start from the bottommost layer of the full binary tree, sequentially acquire a layer in the full binary tree as the current processing layer, and acquire the number of information bit positions in each left leaf node and the corresponding right leaf node in the current processing layer. A discard unit, configured to discard the left leaf node and the right leaf node if the sum of the number of information bit positions in the left leaf node and the number of information bit positions in the corresponding right leaf node is less than a preset threshold. A return execution unit, configured to return and execute the operation of sequentially acquiring a layer in the full binary tree as the current processing layer, and acquiring the number of information bit positions in each left leaf node and right leaf node in the current processing layer until the processing of all layers in the full binary tree is completed, to obtain an incomplete binary tree corresponding to the target polar code. A target node determination unit, configured to use the nodes in the non-full binary tree that have not been binary-expanded as target nodes.
8. A computer device, comprising: One or more processors; A storage device, configured to store one or more programs; When the one or more programs are executed by the one or more processors, such that the one or more processors execute the programs, the decoding method of the polar code as described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the decoding method of the polar code as described in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Polar code decoding method, decoder and computer storage medium
CN111404558A
Dynamic threshold-based splitting-reduced splitting list decoder
CN111654292A