Coding and decoding method and device of convolutional code, computer equipment and storage medium
By grouping and filtering the encoder states, the Viterbi decoding algorithm was optimized, solving the problems of high computational load and hardware resource consumption, and achieving high-efficiency decoding performance.
Patent Information
- Application Number
- CN202511328435.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-01-23
AI Technical Summary
Traditional Viterbi decoding algorithms are computationally intensive and consume a lot of hardware resources, resulting in low decoding efficiency.
By grouping the encoder's states into similar state groups and calculating only the branch metric for each group, the target path can be filtered out, reducing unnecessary computation and hardware resource consumption.
It reduces the complexity of the decoding algorithm, improves decoding efficiency and running speed, reduces the consumption of hardware resources, and at the same time ensures decoding performance.
Smart Images

Figure CN121396231A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, and particularly relates to a convolutional code encoding and decoding method and device, a computer device and a storage medium. BACKGROUND
[0002] The convolutional code encoding and decoding technology in channel coding can be applied to wireless communication, ad hoc network system, satellite navigation, satellite communication, deep space communication and the like. The central proposition of Shannon is that if the transmission rate of a system is less than the channel capacity, reliable communication can be realized by selecting appropriate encoding and decoding technology, and channel coding is developed.
[0003] In the past 20 years, the theory and application of error correction code have made many breakthroughs, and the latest error correction coding technology has been very close to the theoretical limit pointed out by Shannon, and at the same time, the error correction coding technology has also deeply influenced the design of actual systems, and has been widely applied in the fields of high-speed modulation and demodulation, mobile communication, satellite and space communication, data storage and the like.
[0004] Convolutional code is a kind of error correction code with strong error correction capability. Since the Viterbi algorithm is simple and easy to implement, and can obtain large coding gain, the convolutional code based on the Viterbi decoding algorithm has been widely applied. The difference between convolutional code and traditional block code is that the encoder of convolutional code has memory, and the output of the encoder depends on the input at the time and also depends on the outputs at the previous time, so that the output bits, the input code words at the previous time, the input code word at the current time and the coding register structure have strong correlation, and then the effectiveness and reliability of data transmission are improved through the strong correlation.
[0005] The convolutional code encoder will form a transition path with the input of information bits according to different state jumps and transitions. The Viterbi decoding algorithm is essentially a maximum likelihood decoding, and its basic idea is to gradually remove the impossible transmission paths on the trellis diagram, and finally only one path is reserved, which is called the surviving path, which is briefly described as follows: first, the branch metric BM of each state is calculated, then the branch metric value is added to the state metric value at the previous time to obtain the state path metric value PM at the current time, the metric value is equivalent to the confidence degree, and the path metric values entering the same state path are compared, the larger result is reserved to enter the next path judgment, and the state and judgment bits of the reserved path are stored, this process is called add-compare-select ACS, and finally when the decoding depth is reached, the path backtracking is performed to output the judgment bits.
[0006] The traditional Viterbi decoding needs to traverse all state values when performing ACS at each time, and therefore the traditional Viterbi decoding algorithm scheme has the following disadvantages: on the one hand, a large number of multiplication and addition operations are performed at ACS, which increases the calculation amount and the time of signal processing of the terminal device; on the other hand, all state numbers are traversed at ACS, and then a large number of multiplication and addition operations are performed, which consumes a large amount of hardware resources in hardware implementation. SUMMARY
[0007] Therefore, the present application provides a convolutional code encoding and decoding method, device, computer equipment and storage medium to solve the problem of low decoding efficiency caused by large calculation amount and large consumption of hardware resources of the traditional Viterbi decoding algorithm.
[0008] In a first aspect, the present application provides a convolutional code encoding and decoding method, which comprises:
[0009] obtaining a convolutional code corresponding to an encoder and a generating polynomial corresponding to the convolutional code;
[0010] grouping each state corresponding to the encoder based on the generating polynomial to obtain a plurality of similar state groups;
[0011] calculating branch metric values corresponding to each similar state group;
[0012] selecting a target path based on the branch metric values;
[0013] outputting a decoding result corresponding to the target path when the backtracking depth of the target path is greater than a preset value.
[0014] The convolutional code encoding and decoding method provided by the present application groups each state corresponding to the encoder to obtain a plurality of similar state groups, and each state group only needs to calculate a BM value once, thereby reducing the complexity of the decoding algorithm and improving the decoding efficiency. The above scheme reduces the number of states to be processed, optimizes the path selection process, can reduce the consumption of computing resources while ensuring decoding performance, and improves the running speed.
[0015] In an optional embodiment, grouping each state corresponding to the encoder based on the generating polynomial to obtain a plurality of similar state groups comprises:
[0016] determining a plurality of similar states associated with the first state according to the first state and the number of bit positions different from the first state for the encoder;
[0017] confirming the first state and the plurality of similar states associated with the first state as a similar state group.
[0018] The convolutional code encoding and decoding method provided by the embodiment of the present application provides a specific and operable grouping method, that is, for the first state of the encoder, a similar state associated with the first state is determined according to the first state and the number of bit positions different from the first state, and the similar states are grouped into a similar state group, thereby enhancing the practicability of the decoding method, and by grouping the states corresponding to the encoder, the BM value needs to be calculated only once for each state group, thereby reducing the number of states to be processed, optimizing the path screening process, and realizing the significant reduction of the consumption of computing resources while ensuring the decoding performance.
[0019] In an alternative embodiment, for the first state of the encoder, a plurality of similar states associated with the first state are determined according to the first state and the input bit positions of the encoder, including:
[0020] Based on the generation polynomial, various state combinations are generated;
[0021] Based on the number of bit positions different from the first state, the number of similar states associated with the first state is determined in the various state combinations.
[0022] The convolutional code encoding and decoding method provided by the embodiment of the present application can more accurately identify which bit positions have the same or similar influence in the state transition process. Therefore, the similar states can be more accurately divided when grouping, thereby improving the accuracy of decoding. The number of similar states associated with the first state is determined based on the number of bit positions different from the first state, thereby avoiding the waste of computing resources or the decline of decoding performance caused by random grouping or too many / too few groups, ensuring the optimization of the grouping strategy, further reducing unnecessary calculations, reducing the computational complexity and decoding time.
[0023] The convolutional code encoding and decoding method provided by the embodiment of the present application, when the difference between states is 2 bits or more, the output relationship of the state transition of the encoder satisfied between the similar states in the similar state group, then the number of similar states in the similar state group can be at least 8, which can further reduce the number of operations of the BM value to improve the decoding efficiency, and further improve the operation speed and save the hardware resources.
[0024] In an alternative embodiment, based on the branch metric value, a target path is screened out, including:
[0025] Based on the branch metric value corresponding to the similar state group, the confidence of each path is calculated;
[0026] Based on the confidence of each path, a comparison is made to retain the path with the maximum confidence among the paths reaching the same state as the target path.
[0027] The method for encoding and decoding convolutional codes provided by the embodiment of the present application can calculate the confidence of each path through the add-compare-select process to evaluate the reliability of the path, retain the path with the maximum confidence in each state, effectively reduce the number of paths that need to be processed subsequently, and thus reduce the complexity of the overall decoding algorithm, while the path with higher confidence is more likely to contain decoding information close to the original data, thus improving the accuracy of decoding.
[0028] In a second aspect, the present application provides a device for encoding and decoding convolutional codes, the device comprising:
[0029] an acquisition module configured to acquire a convolutional code corresponding to an encoder and a generator polynomial corresponding to the convolutional code;
[0030] a grouping module configured to group paths between states corresponding to the encoder based on the generator polynomial to obtain a plurality of similar state groups;
[0031] a calculation module configured to calculate branch metric values corresponding to the similar state groups;
[0032] a screening module configured to screen a target path based on the branch metric values;
[0033] an output module configured to output a decoding result corresponding to the target path until the backtracking depth of the target path is greater than a preset value.
[0034] In an optional implementation, the grouping module is configured to:
[0035] determine a plurality of similar states associated with a first state of the encoder according to the first state and a number of bit positions different from the first state;
[0036] confirm the first state and the plurality of similar states associated with the first state as a similar state group.
[0037] In an optional implementation, the grouping module is configured to:
[0038] generate various state combinations based on the generator polynomial;
[0039] determine the number of similar states associated with the first state in the various state combinations based on the number of bit positions different from the first state.
[0040] In an optional implementation, the screening module is configured to:
[0041] calculate a confidence corresponding to each path based on the branch metric values corresponding to the similar state groups;
[0042] Based on the confidence degrees corresponding to the paths, a comparison is made to retain a path with the maximum confidence degree among paths reaching the same state as the target path.
[0043] In a third aspect, the present application provides a computer device, comprising: a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions; the processor executes the computer instructions to perform the convolutional code encoding and decoding method of the first aspect or any of the corresponding embodiments.
[0044] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions for making a computer perform the convolutional code encoding and decoding method of the first aspect or any of the corresponding embodiments.
[0045] In a fifth aspect, the present application provides a computer program product, which comprises computer instructions for making a computer perform the convolutional code encoding and decoding method of the first aspect or any of the corresponding embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Figure 1 is a flowchart of the convolutional code encoding and decoding method according to an embodiment of the present application;
[0048] Figure 2 is a schematic diagram of an encoder according to an embodiment of the present application;
[0049] Figure 3 is a schematic diagram of an encoder state transition according to an embodiment of the present application;
[0050] Figure 4 is another schematic diagram of an encoder state transition according to an embodiment of the present application;
[0051] Figure 5 is still another schematic diagram of an encoder state transition according to an embodiment of the present application;
[0052] Figure 6 is a schematic diagram of similar states according to an embodiment of the present application;
[0053] Figure 7 is another schematic diagram of similar states according to an embodiment of the present application;
[0054] Figure 8 is a structure block diagram of a convolutional code encoding and decoding device according to an embodiment of the present application;
[0055] Figure 9 is a hardware structure schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0056] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0057] Convolutional code is a kind of error correction code with strong error correction capability. Since the Viterbi algorithm is simple and easy to implement and can obtain large coding gain, the convolutional code based on the Viterbi decoding algorithm has been widely applied. The convolutional code is different from the traditional block code in that the encoder of the convolutional code has memory. In a given time unit, the output of the encoder depends not only on the input at the moment, but also on the outputs at previous moments, so that the output bits, the input code words at previous moments, the input code word at the current moment and the encoding register structure have strong correlation, and then the effectiveness and reliability of data transmission are improved through the strong correlation.
[0058] The convolutional code encoder forms a transition path according to different state jumps and transitions with the input of information bits. The Viterbi decoding algorithm is essentially a maximum likelihood decoding. The basic idea is to gradually remove the impossible transmission paths on the trellis diagram, and finally only one path is reserved.
[0059] In the traditional Viterbi decoding, when the addition and comparison selection at each moment is performed, all state values need to be traversed. The number of state values is determined by the constraint length K. For example, when K = 9, the number of states to be traversed is 256, that is, 256 times of addition and comparison selection. The main operation of addition and comparison selection is the exclusive or of the generator polynomial and the state value, the correlation of the soft information and the calculation and comparison of PM (the actual operation is multiplication, addition and comparison operation). Therefore, the traditional Viterbi decoding will perform a large number of multiplication and addition operations when traversing the ACS of the state, which increases the time of the terminal device in signal processing, and also consumes a large amount of hardware resources.
[0060] According to the embodiment of the present application, a coding method of convolutional code is provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.
[0061] In the embodiment, a coding method of convolutional code is provided, which can be used in mobile terminals such as mobile phones, tablets and the like. Figure 1 The flowchart of the coding method of convolutional code according to the embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 1 The flowchart of the coding method of convolutional code according to the embodiment of the present application is shown in FIG. 1, which includes the following steps:
[0062] In step S101, the convolutional code corresponding to the encoder is obtained, and the generating polynomial corresponding to the convolutional code is obtained.
[0063] Specifically, the general form of the convolutional code is (n, m, k), where the number of input bits of the encoder is usually denoted as m, the number of output bits after encoding is usually denoted as n, and the memory depth of the encoder, i.e. the constraint length of the convolutional code, is usually denoted as k. These parameters together define the basic characteristics of the convolutional code.
[0064] The generating polynomial of the convolutional code is a key element in the encoding process of the convolutional code, which represents the association between the encoding generated bits and the input information bits. The generating polynomial of the convolutional code can be looked up or customized, and the generating polynomial can usually be represented as a series of binomial coefficients, where each polynomial generates the output bits in one or more state transition processes of the encoder. Corresponding to n output bits, there are usually n polynomials, each polynomial containing k+1 coefficients.
[0065] Optionally, a state transition graph corresponding to the encoder is obtained, which is used to represent how the encoder transitions from one state to another state under a given input sequence, i.e. the transition relationship between states.
[0066] In step S102, based on the generating polynomial, the states corresponding to the encoder are grouped to obtain a plurality of similar state groups.
[0067] Specifically, since each term in the generating polynomial corresponds to a possible output when the encoder state transitions, these outputs determine the similarity or difference between states. By summarizing the output relationship of the compiler to the same state, adjacent state, intermediate state and multi-bit difference state with input, different input and different position, the similarity relationship between states can be obtained, and the states are grouped based on these rules to obtain similar state groups.
[0068] Further, similar states refer to states that can generate similar or identical output sequences under given input conditions.
[0069] In some optional embodiments, the step S102 comprises:
[0070] In step S1021, for a first state of the encoder, a plurality of similar states associated with the first state are determined according to the first state and input bits of the encoder.
[0071] In step S1022, the first state and the plurality of similar states associated with the first state are confirmed as a group of similar state groups.
[0072] A starting point is selected from all possible states of the encoder, and the starting point is taken as the first state. For each input bit combination, a generator polynomial is used to simulate the process of the encoder transferring from the current first state to the next state. In the simulation of state transition, the output sequence generated by each new state is recorded, and the output sequence is compared with the output sequence that can be generated by the first state under the same input or relative input. If the output sequence generated by the new state under the given input is similar to the first state (for example, the output values are the same or opposite), the new state is considered to be similar to the first state, and is added to the similar state group associated with the first state.
[0073] Optionally, a state transition graph of the encoder is obtained, and a plurality of similar states of the first state are found according to the state transition graph.
[0074] In step S103, branch metric values corresponding to each similar state group are calculated.
[0075] Specifically, the branch metric value is used to measure the difference between the received code word and the output code word expected to be generated by the encoder when transferring from one state to another state under a given received sequence. The difference is usually calculated based on a certain distance metric.
[0076] Further, according to the rule of the similar state group obtained in step S102, the branch metric values of the transition paths between the states in the similar state group have strong correlation, that is, the absolute values are equal, and the specific branch metric values can be the same or opposite. Therefore, for any group of similar state groups, only the BM value of one path needs to be calculated, without traversing each path in the similar state group, thereby reducing the number of calculations, improving the running speed of decoding, and reducing the hardware resources required by the branch metric.
[0077] In step S104, a target path is selected based on the branch metric value.
[0078] Specifically, in the Viterbi algorithm, each state is associated with a path metric value. After calculating the branch metric BM of each state according to step S103, the branch metric value is added to the state metric value of the previous time to obtain the state path metric PM of the current time. Each state is associated with a path metric value. The result with a larger path metric value is retained as the target path, and the next determination is entered.
[0079] In some optional embodiments, the step S104 includes:
[0080] Step S1041, based on the branch metric values corresponding to the similar state groups, calculate the confidence of each path;
[0081] Step S1042, based on the confidence of each path, perform add-compare-select to retain the path with the maximum confidence among the paths reaching the same state as the target path.
[0082] First, the branch metric BM of each state is calculated, and then the branch metric value is added to the state metric value of the previous time to obtain the state path metric PM of the current time. The path metric value is equivalent to the confidence. By comparing the confidence of the paths entering the same state, the confidence with the maximum confidence is selected as the surviving state of the current state, and the best path reaching the surviving state is retained as the target path, and the next path determination is entered. At the same time, the state and the determination bit of the retained path are stored. This process is the add-compare-select ACS (Add-Compare-Select).
[0083] Step S105, when the backtracking depth of the target path is greater than the preset value, output the decoding result corresponding to the target path.
[0084] Specifically, before outputting the decoding result according to the algorithm, it is necessary to check whether the backtracking depth of the target path is greater than the preset value. This preset value is usually related to the constraint length of the encoder or the design parameter of the decoder, and is used to ensure that the decoding process has been deep enough to accurately recover the original data. If the backtracking depth does not meet the condition, i.e., is less than or equal to the preset value, it may be necessary to continue the decoding process, continue to increase the number of iterations, or adjust the decoding parameters, etc.
[0085] Further, backtracking starts from the state with the maximum confidence at the end of decoding, i.e., the terminal point of the target path, and follows the previously recorded predecessor state sequence back to the initial state. Therefore, by tracking the state transition on the backtracking path, the original transmitted data sequence can be gradually constructed. When the backtracking process is completed, the complete decoding result is obtained.
[0086] In summary, this invention provides an optimized scheme for the Viterbi decoding algorithm. By analyzing the state between the generator polynomial and the state, it outputs the same or opposite bits for similar states, further optimizing the output operation relationship of BM and PM between states. This effectively reduces the amount of computation of BM and PM, reduces the amount of stored output values, improves hardware processing efficiency, and reduces hardware computational complexity.
[0087] Specifically, such as Figure 2 As shown, taking the (2, 1, 9) convolutional code as an example, the code rate of this convolutional code is 1 / 2, the constraint length is 9, and the generator matrix is:
[0088]
[0089] It can be expressed using a generating polynomial as:
[0090] g0(D)=1+D 2 +D 3 +D 4 +D 7 +D 8
[0091] g1(D) = 1 + D + D 2 +D 3 +D 5 +D 7 +D 8
[0092] Convolutional code encoder D represents XOR modulo 2 addition. i Let represent the i-th information bit input into the encoder, u(k) represent the input information bit at the current time, and c(2k) / c(2k+1) represent the output bit at the current time.
[0093] Next, by summarizing the compiler's output relationships for states with the same input, different input, different positions, and multiple positional differences, including states with the same input, adjacent states, states between states, and states with multiple positional differences, we can derive the similarity relationship rules between states. Based on these rules, we can group the states to obtain groups of similar states. Figure 2 For the example encoder, the following pattern can be observed:
[0094] (1) Inputting different values in the same state:
[0095] The current state value is S = (D1D2D3D4D5D6D7D8). When the input values are different, i.e., when u(k) is 0 and 1 respectively, the output values of the two codes are:
[0096]
[0097] It can be seen that when the first term in the generating polynomial participates in the XOR operation, the encoding output result is negated, and for the same reason, when the first term does not participate in the operation, the encoding output result is the same.
[0098] (2) When the input is the same in the adjacent state:
[0099] The adjacent state values at the current moment are S0=(D1D2D3D4D5D6D70) and S1=(D1D2D3D4D5D6D71), respectively, and the output values of the two encoders are:
[0100]
[0101] It can be seen that when the last term in the generating polynomial participates in the XOR operation, the encoding output result is negated, and for the same reason, when the last term does not participate in the operation, the encoding output result is the same.
[0102] The above two rules apply to encoders of various specifications, and the corresponding state transition diagrams are as shown in ,
[0103] The state transition diagram for state 0, according to rule (1), the branch metric BM of the two paths is negated in size, so only the BM value of one path needs to be calculated; Figure 3 The state transition diagram for state 1, according to rule (1), the branch metric BM of the two paths is negated in size, according to rule (2), and in combination with the butterfly structure of Figure 3 , Figure 4 When input 0 or input 1, the branch metric BM of the state 0 and state 1 paths is negated in size, so only the BM value of one path needs to be calculated for the four paths. Figure 3 Figure 4 (3) When the input is the same in the adjacent state:
[0104] The adjacent state values at the current moment are S0=(D1D2D3D4D5D60D8) and S1=(D1D2D3D4D5D61D8), respectively, and the output values of the two encoders are:
[0105]
[0106] It can be seen that when the last term in the generating polynomial participates in the XOR operation, the encoding output result is negated, and for the same reason, when the last term does not participate in the operation, the encoding output result is the same.
[0107] (4) Relationship between outputs of different 2-bit and above:
[0108] (4) Relationship between outputs of different 2-bit and above:
[0109] If only one bit participates in the XOR operation, the conclusion is the same as rule (3). When two bits participate in the XOR operation, the output values of the two encodings are the same when the inputs are the same (assuming that D2D3 is opposite):
[0110]
[0111] It can be seen that the results are the same, and the results are negated if the inputs are different. Similarly, when there are more than two bits, there will be corresponding output relationships, which are not described here.
[0112] Figure 5 The state transition diagram for states 1 and 2 can be seen. States 0 and 2 are a pair of inter-state states. According to rule (3), the branch metric BM of the path of states 0 and 2 is negated. According to rules (1) and (2), the branch metric BM of the path of state 2 to state 1 can be used to obtain the metric results of the other three paths. These states can be considered as similar states and combined into a similar state group.
[0113] Therefore, by summarizing the above rules, each state can be grouped according to similar states to greatly reduce the calculation amount of BM values, thereby improving the running speed of the algorithm.
[0114] After grouping, the branch metric values corresponding to each similar state group are calculated, and then each branch metric value is added to the state metric value at the previous time to obtain the path metric PM (Path Metric) at the current time. The path metric is equivalent to the confidence. By comparing the confidence of the paths entering the same state, the confidence with the largest confidence is selected as the surviving state of the current state, and the best path to the surviving state is reserved as the target path and enters the next path determination. The state and the determination bits of the reserved path are stored, and when the backtracking depth of the target path is greater than a preset value, the decoding result is output.
[0115] In some optional embodiments, for a first state of an encoder, a number of similar states associated with the first state are determined according to the first state and a number of bit positions different from the first state, including:
[0116] The number of similar states associated with the first state is determined based on the number of bit positions different from the first state.
[0117] Taking a (2, 1, 9) convolutional code as an example, the convolutional code has a code rate of 1 / 2, a constraint length of 9, and a generator matrix of:
[0118]
[0119] The generator polynomial can be expressed as:
[0120] g0(D) = 1 + D2 +D 3 +D 4 +D 7 +D 8
[0121] g1(D) = 1 + D + D 2 +D 3 +D 5 +D 7 +D 8
[0122] The decoder at least meets the above rules (1) and rules (2), please refer to the local state transition diagram shown in Figure 6 , Figure 6 , that is, two butterfly structures, only need to calculate the branch metric value of any one path of any one state to get the branch metric value of all eight paths, if Figure 6 S0 is the first state, then at least three other states (that is, S1, S2 and S3 here) can be identified as similar states of the first state, so taking the above (2, 1, 9) convolution code as an example, originally a total of 256 state values need to be traversed, if according to the special structure of the generator polynomial, every four states are divided into a similar state group, then only 64 times of BM value need to be calculated at each time, greatly reducing the number of calculations, that is, the number of multiplication and addition, greatly improving the running speed of decoding, and reducing the hardware resources required for branch metric. Similarly, since the generator matrix is that is, D 5 The structure participating in the XOR calculation is also the same, and state 0 and state 4 are also a pair of interval states, and their branch metric results are also negated, and the local state transition diagram is shown in Figure 7 , Figure 7 The state transition of the eight states only needs to calculate the branch metric of any one path of any one state. It can be seen that the BM values between states with similar numbers have strong correlation. For a convolution code with a constraint length of 9, there are a total of 256 state values, according to the special structure of the generator polynomial, a plurality of states can be divided into a group, taking the above as an example, every four states are divided into a group and every eight states are divided into a group, only 64 times and 32 times of BM value need to be calculated at each time, greatly reducing the number of calculations, that is, the number of multiplication and addition, greatly improving the running speed of decoding and reducing the hardware resources required for branch metric, while also ensuring the effectiveness and reliability of communication. According to different generator polynomials, the BM value relationship between different states will be different, the same or opposite, the larger the intersection between the generator polynomials, the more the operation speed is improved.
[0123] A coding and decoding apparatus of a convolutional code is also provided in the embodiments, which is configured to implement the above-described embodiments and preferred implementation manners, and details of which have been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0124] The embodiments provide a coding and decoding apparatus of a convolutional code, which comprises, as shown in Figure 8
[0125] The obtaining module 801 is configured to obtain a convolutional code corresponding to an encoder and a generator polynomial corresponding to the convolutional code.
[0126] The grouping module 802 is configured to group each state corresponding to the encoder based on the generator polynomial to obtain a plurality of similar state groups.
[0127] The calculating module 803 is configured to calculate branch metric values corresponding to each similar state group.
[0128] The screening module 804 is configured to screen a target path based on the branch metric values.
[0129] The output module 805 is configured to output a decoding result corresponding to the target path until a backtracking depth of the target path is greater than a preset value.
[0130] In an optional implementation, the grouping module is configured to:
[0131] determine a plurality of similar states associated with a first state of the encoder according to the first state and a number of bit positions different from the first state;
[0132] confirm the first state and the plurality of similar states associated with the first state as a similar state group.
[0133] In an optional implementation, the grouping module is configured to:
[0134] generate various state combinations based on the generator polynomial;
[0135] determine a number of similar states associated with the first state in the various state combinations based on the number of bit positions different from the first state.
[0136] In an optional implementation, the screening module is configured to:
[0137] calculate a confidence degree corresponding to each path based on the branch metric values corresponding to the similar state groups;
[0138] Based on the confidence level of each path, a comparison and selection process is performed to retain the path with the highest confidence level among all paths that lead to the same state as the target path.
[0139] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0140] In this embodiment, the convolutional code encoding and decoding device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0141] This invention also provides a computer device having the above-described features. Figure 8 The shown is a codec encoding and decoding device for convolutional codes.
[0142] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.
[0143] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0144] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0145] The memory 20 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required for at least one function, and the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0146] The memory 20 can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk, and can also include a combination of the above-mentioned types of memories.
[0147] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected by a bus or other means, Figure 9 The connection by the bus is taken as an example.
[0148] The input device 30 can receive inputted digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen.
[0149] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0150] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the way of executing computer program instructions by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0151] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope of protection of the present application.
Claims
1. A method of encoding and decoding a convolutional code, characterized by, The method comprises: acquiring a convolution code corresponding to an encoder and a generating polynomial corresponding to the convolution code; grouping each state corresponding to the encoder based on the generating polynomial to obtain a plurality of similar state groups; calculating branch metric values corresponding to each of the similar state groups; filtering out a target path based on the branch metric values; outputting a decoding result corresponding to the target path when a backtracking depth of the target path is greater than a preset value.
2. The method of claim 1, wherein, The grouping of each state corresponding to the encoder based on the generating polynomial to obtain a plurality of similar state groups comprises: for a first state of the encoder, determining a plurality of similar states associated with the first state according to the first state and a number of bit positions different from the first state; confirming the first state and the plurality of similar states associated with the first state as a group of similar state groups.
3. The method of claim 2, wherein, For a first state of the encoder, determining a plurality of similar states associated with the first state according to the first state and the input bit position of the encoder comprises: generating various state combinations based on the generating polynomial; determining the number of similar states associated with the first state in the various state combinations based on the number of bit positions different from the first state.
4. The method according to any one of claims 1 to 3, characterized in that, The filtering out of a target path based on the branch metric values comprises: calculating a confidence degree corresponding to each path based on the branch metric values corresponding to the similar state groups; performing a sum-comparison selection based on the confidence degrees corresponding to each path to retain a path with the highest confidence degree among paths reaching the same state as the target path.
5. A coding and decoding apparatus for convolutional codes, characterized in that The apparatus comprises: an acquisition module configured to acquire a convolution code corresponding to an encoder and a generating polynomial corresponding to the convolution code; a grouping module configured to group each state corresponding to the encoder based on the generating polynomial to obtain a plurality of similar state groups; a calculation module configured to calculate branch metric values corresponding to each of the similar state groups; a filtering module configured to filter out a target path based on the branch metric values; and an output module configured to output a decoding result corresponding to the target path when a backtracking depth of the target path is greater than a preset value.
6. The apparatus of claim 5, wherein, The grouping module is configured to: for a first state of the encoder, determine a plurality of similar states associated with the first state according to the first state and a number of bit positions different from the first state; confirm the first state and the plurality of similar states associated with the first state as a group of similar state groups.
7. The apparatus of claim 6, wherein, The grouping module is configured to: generate various state combinations based on the generating polynomial; determine the number of similar states associated with the first state in the various state combinations based on the number of bit positions different from the first state.
8. The apparatus of any one of claims 5 to 7, wherein, The filtering module is configured to: calculate a confidence degree corresponding to each path based on the branch metric values corresponding to the similar state groups; perform a sum-comparison selection based on the confidence degrees corresponding to each path to retain a path with the highest confidence degree among paths reaching the same state as the target path.
9. A computer device, comprising: The apparatus comprises: A memory and a processor, which are connected in communication with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for encoding and decoding the convolutional code according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to perform the method for encoding and decoding the convolutional code according to any one of claims 1 to 4.