A PC-SCF encoding and decoding method based on genetic algorithm
By using a PC-SCF encoding and decoding method based on genetic algorithms, the optimal placement of PC bits is determined. By combining SC and SCF decoding algorithms, the problem of high decoding complexity of the SCF algorithm is solved, and the decoding performance and error detection capability are improved.
Patent Information
- Application Number
- CN202410845428.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Existing SCF algorithms have high decoding complexity, and their decoding performance is easily affected by error paths when the signal-to-noise ratio is poor.
A PC-SCF encoding and decoding method based on genetic algorithms is adopted. The optimal placement position of the PC bits is determined by genetic algorithms, and combined with SC and SCF decoding algorithms, unnecessary decoding processes are reduced and the error detection capability of the parity bits is improved.
It reduces decoding complexity and improves decoding performance, especially in cases of poor signal-to-noise ratio, by reducing the impact of error paths and improving the overall decoding effect.
Smart Images

Figure CN118694377B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of channel coding, and more specifically to a PC-SCF encoding and decoding method based on a genetic algorithm. Background Technology
[0002] Polar codes are currently the only known channel coding method that has been proven to reach the Shannon limit. They have low encoding and decoding complexity and are widely used in channel coding, source coding, and other fields.
[0003] Successive cancellation (SC) decoding is one of the most classic polar code decoding algorithms. Its derivative algorithms mainly include the successful cancellation list (SCL) and successful cancellation flip (SCF) algorithms.
[0004] The SCL algorithm improves the decoding performance of polar codes by preserving multiple decoding paths during the decoding process. However, in situations with poor signal-to-noise ratios, relying solely on path metric means that even correct decoding paths can be easily affected by incorrect paths, leading to a deterioration in overall decoding performance. The SCF algorithm, on the other hand, flips the decoding result of specific information bits in the decoding sequence when decoding fails, and then proceeds with the decoding of subsequent information bits. This effectively avoids error propagation, thereby improving overall decoding performance, but the decoding complexity remains relatively high. Summary of the Invention
[0005] To address the issue of high decoding complexity in current SCF algorithms, this invention provides a PC-SCF encoding and decoding method based on a genetic algorithm.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A PC-SCF encoding and decoding method based on genetic algorithms includes the following steps:
[0008] S1: The transmitting end performs PC encoding on the information bit sequence and inserts PC bits into the information bit sequence to obtain the first codeword sequence; wherein, the optimal insertion position of the PC bits is determined by a genetic algorithm;
[0009] S2: Perform CRC encoding on the first codeword sequence, and place the CRC check bit at the end of the information bit sequence to obtain the second codeword sequence;
[0010] S3: Encode the second codeword sequence using polar codes to obtain the polar code sequence;
[0011] S4: The receiver performs SC decoding on the polar code sequence to obtain the decoded sequence;
[0012] S5: Determine whether the decoded sequence can pass the PC check and CRC check;
[0013] If possible, output the decoding result and proceed to step S7;
[0014] If not, proceed to step S6;
[0015] S6: Determine whether the current bit flip count is less than the preset maximum bit flip count;
[0016] If so, perform a bit flip, perform SCF decoding based on the bit flip index, and return to step S5;
[0017] If not, proceed to step S7;
[0018] S7: Execution complete.
[0019] In the above scheme, by adopting the PC-SCF decoding algorithm, the error detection capability of the parity check bit can be improved, while unnecessary subsequent decoding processes can be eliminated, reducing decoding complexity. At the same time, the optimal placement position of the PC bit is determined by using a genetic algorithm, which further improves the performance of the decoding algorithm.
[0020] Preferably, in step S1, the specific steps for determining the optimal insertion position of the PC bit using a genetic algorithm are as follows:
[0021] S11: Initialize the population;
[0022] Here, individuals in the population are candidate insertion positions for PC bits, and the population is the set of candidate insertion positions;
[0023] S12: Calculate the fitness function;
[0024] S13: Determine whether the preset termination condition has been met;
[0025] If so, proceed to step S17;
[0026] If not, proceed to step S14;
[0027] S14: Select individuals to constitute the offspring population;
[0028] S15: Pair individuals in the offspring population and perform midpoint crossover. Take the first half of the first parent vector and the second half of the second parent vector to generate the offspring vector, and adjust the number of 1s in the offspring vector according to the code rate.
[0029] S16: Randomly select a position to perform a mutation operation, and then, according to the code rate limit, randomly perform another mutation on a bit other than the mutated bit to obtain offspring individuals, and return to step S12.
[0030] S17: Obtain the set of optimal placement positions.
[0031] Preferably, in step S11, the initialization population is selected as follows:
[0032] Monte Carlo simulation was used to simulate the error scenarios of each information bit channel, and the bit channel with the highest error count was selected at the abrupt change in the number of transmission errors from low to high.
[0033] Preferably, in step S12, the fitness function is the reciprocal of the bit error rate.
[0034] Preferably, in step S13, the preset termination condition is a preset maximum number of generations or a preset fitness threshold.
[0035] Preferably, in step S14, the individuals constituting the offspring population are selected using the roulette wheel selection method. The specific steps are as follows:
[0036] S141: The fitness of the population is summed to obtain the total fitness;
[0037] S142: The probability of an individual being selected is obtained by dividing the fitness of each individual by the total fitness.
[0038] S143: Calculate the cumulative probability of individuals to construct a roulette wheel;
[0039] S144: Generate a random number in the interval [0,1]. If the random number is less than or equal to the cumulative probability of the individual and greater than the cumulative probability of the previous individual, then select the individual to enter the offspring population.
[0040] Preferably, in step S16, the mutation operation is to change 1 to 0, or 0 to 1.
[0041] Preferably, in step S6, from the decoded sequence set P R Select the f-bit information bits with the lowest reliability to form the set Z for bit flipping. f ,
[0042] P R Reliability of the r-th information bit The metric is:
[0043]
[0044] Among them, P r P represents R The r-th element in The absolute values of the log-likelihood ratios at the receiver, ε1, ε2, and ε3, represent the information bits. These represent different parameters, with parameter ε1 = 5 and variable num representing the influence of bit position on reliability measurement, the size of which is equal to the number of information bits.
[0045] Preferably, the value of parameter ε2 is:
[0046]
[0047] Among them, E b / N0 represents the signal-to-noise ratio, and dB represents decibels.
[0048] Preferred parameters The value can be:
[0049]
[0050] Among them, P fail This indicates the position of the check bit when the decoded sequence fails the check during the first SC decoding.
[0051] Beneficial technical effects of the present invention:
[0052] This invention provides a PC-SCF encoding and decoding method based on a genetic algorithm. By employing the PC-SCF decoding algorithm, the error detection capability of the parity check bits is improved, while unnecessary subsequent decoding processes are eliminated, reducing decoding complexity. At the same time, the optimal placement position of the PC bits is determined using a genetic algorithm, further improving the performance of the decoding algorithm. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the QKD post-processing process in this invention;
[0054] Figure 2 This is a flowchart illustrating the implementation steps of the technical solution of the present invention;
[0055] Figure 3 This is a flowchart illustrating how a genetic algorithm is used to determine the optimal placement position of the PC bit in this invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments. However, the scope of protection of this invention is not limited to the specific embodiments described below.
[0057] Example 1
[0058] like Figure 1 As shown, the QKD post-processing procedure is as follows:
[0059] After transmitting information through the quantum channel, Alice at the sending end and Bob at the receiving end each obtain a string of original keys of equal length. and The modulation base is disclosed by the transmitting end and the measurement base is disclosed by the receiving end;
[0060] The sending and receiving ends receive the other party's base information and compare it with their own base information. They discard the original keys with different bases and retain the original keys with the same base to obtain the sieved keys of equal length.
[0061] The sending and receiving ends select a portion of the filtered keys for public comparison to calculate the qubit error rate. If the qubit error rate is higher than or equal to a preset security threshold, all information bits transmitted in this operation are discarded. If it is lower than the preset security threshold, the remaining filtered keys are retained to obtain the local key. and
[0062] S4: A PC-SCF encoding / decoding method based on a genetic algorithm is used to complete key error correction;
[0063] S5: The corrected key is amplified for security. The sender and receiver calculate the security information entropy based on the obtained qubit error rate, and use a cryptographic algorithm to compress the information bits shared by both parties according to the lower limit of the entropy value, to obtain the final security key bit u. a and u b ;
[0064] like Figure 2 As shown, a PC-SCF encoding and decoding method based on genetic algorithms, applied in the QKD post-processing, includes the following steps:
[0065] S1: The transmitting end performs PC encoding on the information bit sequence and inserts PC bits into the information bit sequence to obtain the first codeword sequence; wherein, the optimal insertion position of the PC bits is determined by a genetic algorithm;
[0066] S2: Perform CRC encoding on the first codeword sequence, and place the CRC check bit at the end of the information bit sequence to obtain the second codeword sequence;
[0067] S3: Encode the second codeword sequence using polar codes to obtain the polar code sequence;
[0068] S4: The receiver performs SC decoding on the polar code sequence to obtain the decoded sequence;
[0069] S5: Determine whether the decoded sequence can pass the PC check and CRC check;
[0070] If possible, output the decoding result and proceed to step S7;
[0071] If not, proceed to step S6;
[0072] S6: Determine whether the current bit flip count is less than the preset maximum bit flip count;
[0073] If so, perform a bit flip, perform SCF decoding based on the bit flip index, and return to step S5;
[0074] If not, proceed to step S7;
[0075] S7: Execution complete.
[0076] In the specific implementation process, by adopting the PC-SCF decoding algorithm, the error detection capability of the parity check bits can be improved, while unnecessary subsequent decoding processes can be eliminated, reducing decoding complexity. At the same time, the optimal placement position of the PC bits is determined by using a genetic algorithm, which further improves the performance of the decoding algorithm.
[0077] More specifically, if Figure 2 As shown, in step S1, the specific steps for determining the optimal insertion position of the PC bit using a genetic algorithm are as follows:
[0078] S11: Initialize the population;
[0079] Here, individuals in the population are candidate insertion positions for PC bits, and the population is the set of candidate insertion positions;
[0080] S12: Calculate the fitness function;
[0081] S13: Determine whether the preset termination condition has been met;
[0082] If so, proceed to step S17;
[0083] If not, proceed to step S14;
[0084] S14: Select individuals to constitute the offspring population;
[0085] S15: Pair individuals in the offspring population and perform midpoint crossover. Take the first half of the first parent vector and the second half of the second parent vector to generate the offspring vector, and adjust the number of 1s in the offspring vector according to the code rate.
[0086] S16: Randomly select a position to perform a mutation operation, and then, according to the code rate limit, randomly perform another mutation on a bit other than the mutated bit to obtain offspring individuals, and return to step S12.
[0087] S17: Obtain the set of optimal placement positions.
[0088] In the specific implementation process, the placement of the PC bits will affect the overall decoding performance. By using a genetic algorithm to determine the optimal placement of the PC bits, the performance of the decoding algorithm can be further improved.
[0089] More specifically, in step S11, the initialization population is selected as follows:
[0090] Monte Carlo simulation was used to simulate the error scenarios of each information bit channel. Bit channels with high error counts were selected at abrupt changes in the number of transmission errors from low to high, so that PC bits could be used to correct the decoding path in time at error-prone bit channels. The PC bits were distributed according to the proportion of error counts in the first and second halves of the information bits to ensure that they were distributed in the more error-prone parts of the bit channel.
[0091] More specifically, in step S12, the fitness function is the reciprocal of the bit error rate.
[0092] More specifically, in step S13, the preset termination condition is either a preset maximum number of generations or a preset fitness threshold.
[0093] More specifically, in step S14, the roulette wheel selection method is used to select individuals that constitute the offspring population. The specific steps are as follows:
[0094] S141: The fitness of the population is summed to obtain the total fitness;
[0095] S142: The probability of an individual being selected is obtained by dividing the fitness of each individual by the total fitness.
[0096] S143: Calculate the cumulative probability of individuals to construct a roulette wheel;
[0097] S144: Generate a random number in the interval [0,1]. If the random number is less than or equal to the cumulative probability of the individual (the cumulative probability is the sum of the probabilities of all individuals before the individual in the individual list) and greater than the cumulative probability of the previous individual, then select the individual to enter the offspring population.
[0098] More specifically, in step S16, the mutation operation is to change 1 to 0, or to change 0 to 1.
[0099] More specifically, in step S6, from the decoded sequence set P R Select the f-bit information bits with the lowest reliability to form the set Z for bit flipping. f ,
[0100] P R Reliability of the r-th information bit The metric is:
[0101]
[0102] Among them, P r P represents R The r-th element in The absolute values of the log-likelihood ratios at the receiver, ε1, ε2, and ε3, represent the information bits. These represent different parameters, with parameter ε1 = 5 and variable num representing the influence of bit position on reliability measurement, the size of which is equal to the number of information bits.
[0103] More specifically, the value of parameter ε2 is:
[0104]
[0105] Among them, E b / N0 represents the signal-to-noise ratio, and dB represents decibels.
[0106] More specifically, parameters The value can be:
[0107]
[0108] Among them, P fail This indicates the position of the check bit when the decoded sequence fails the check during the first SC decoding.
[0109] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to the invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.
Claims
1. A PC-SCF encoding and decoding method based on a genetic algorithm, characterized in that, Includes the following steps: S1: The transmitting end performs PC encoding on the information bit sequence and inserts PC bits into the information bit sequence to obtain the first codeword sequence; wherein, the optimal insertion position of the PC bits is determined by a genetic algorithm; The steps for determining the optimal placement of the PC bits using a genetic algorithm are as follows: S11: Initialize the population; Here, individuals in the population are candidate insertion positions for PC bits, and the population is the set of candidate insertion positions; S12: Calculate the fitness function; S13: Determine whether the preset termination condition has been met; If so, proceed to step S17; If not, proceed to step S14; S14: Select individuals to constitute the offspring population; S15: Pair individuals in the offspring population and perform midpoint crossover. Take the first half of the first parent vector and the second half of the second parent vector to generate the offspring vector, and adjust the number of 1s in the offspring vector according to the code rate. S16: Randomly select a position to perform a mutation operation, and then, according to the code rate limit, randomly perform another mutation on a bit other than the mutated bit to obtain offspring individuals, and return to step S12. S17: Obtain the set of optimal placement positions; S2: Perform CRC encoding on the first codeword sequence, and place the CRC check bit at the end of the information bit sequence to obtain the second codeword sequence; S3: Encode the second codeword sequence using polar codes to obtain the polar code sequence; S4: The receiver performs SC decoding on the polar code sequence to obtain the decoded sequence; S5: Determine whether the decoded sequence can pass the PC check and CRC check; If possible, output the decoding result and proceed to step S7; If not, proceed to step S6; S6: Determine whether the current bit flip count is less than the preset maximum bit flip count; If so, perform a bit flip, perform SCF decoding based on the bit flip index, and return to step S5; From the set of decoded sequences Select the f-bit information bits with the lowest reliability to form the set for bit flipping. , Reliability of the r-th information bit The metric is: , in, express The r-th element in The absolute value of the log-likelihood ratio at the receiver represents the information bits. , , Each represents a different parameter. The variable num represents the impact of bit position on the reliability metric, and its size is equal to the number of information bits. If not, proceed to step S7; S7: Execution complete.
2. The PC-SCF encoding and decoding method based on genetic algorithm according to claim 1, characterized in that, In step S11, the initialization population is selected as follows: Monte Carlo simulation was used to simulate the error scenarios of each information bit channel, and the bit channel with the highest error count was selected at the abrupt change in the number of transmission errors from low to high.
3. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 2, characterized in that, In step S12, the fitness function is the reciprocal of the bit error rate.
4. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 2, characterized in that, In step S13, the preset termination condition is either the preset maximum number of generations or the preset fitness threshold.
5. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 2, characterized in that, In step S14, the roulette wheel selection method is used to select individuals to form the offspring population. The specific steps are as follows: S141: The fitness of the population is summed to obtain the total fitness; S142: The probability of an individual being selected is obtained by dividing the fitness of each individual by the total fitness. S143: Calculate the cumulative probability of individuals to construct a roulette wheel; S144: Generate a random number in the interval [0, 1]. If the random number is less than or equal to the cumulative probability of the individual and greater than the cumulative probability of the previous individual, then select the individual to enter the offspring population.
6. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 2, characterized in that, In step S16, the mutation operation is to change 1 to 0 or 0 to 1.
7. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 6, characterized in that, parameter The value can be: , in, The signal-to-noise ratio is represented by dB, which stands for decibel.
8. The PC-SCF encoding and decoding method based on a genetic algorithm according to claim 7, characterized in that, parameter The value can be: , in, This indicates the position of the check bit when the decoded sequence fails the check during the first SC decoding.
Citation Information
Patent Citations
Polarization code segmentation SCF decoding method based on neural network assistance
CN117767961A
Polar code segmented flipping decoding method based on LLR, and intelligent terminal
WO2021000531A1