Patent Description:
Polar codes, which is the control channel coding scheme in the eMBB (Enhanced Moblie Broad Band) scenario for the fifth generation mobile communication technology (5th-Generation, <NUM>), is a new coding scheme that can achieve the binary symmetric channel capacity, and has the excellent decoding performance.

However, when the mother code length is larger, the polar code has a larger storage capacity and latency. As such, the <NUM> technology defines that the maximum mother code length of the polar codes is <NUM> bits for the downlink transmission and is <NUM> bits for the uplink transmission. However, due to the impact of Massive Multiple-Input Multiple-Output (Massive MIMO) technology, the length of the information sequence of the Uplink Control Information (UCI) has increased dramatically.

For a single carrier, the UCI is of at most <NUM> bits, and the <NUM> may support the UCI of up to <NUM> carriers to be transmitted on an uplink carrier. Thus, the length of the UCI that needs to be transmitted by one carrier may be <NUM>*<NUM> = <NUM> bits. However, the <NUM> bits far exceeds the maximum mother code length (<NUM> bits) of the polar codes for the uplink transmission, so it is necessary to study how to code and transmit the UCI for multi-carrier aggregation.

In order to solve the problem that performance of the polar codes seriously reduces when the UCI with larger length is at medium and low bit rates, the method in prior art is to divide the information sequence with larger length into two segments at an appropriate bit rate, where the polar coding is performed on two segments of information sequences respectively by using the maximum mother code of <NUM>. It is assumed that the UCI payload size = <NUM> and the polar code rate is <NUM>/<NUM>, then the total number of coded bits is <NUM>*<NUM> = <NUM> bits.

According to the existing protocols, there is a need to perform the repetition according to the maximum polar mother code length of <NUM> to obtain <NUM> bits, and the true non-repetitive code rate is only <NUM>/<NUM> = <NUM>/<NUM>, which will undoubtedly significantly reduce the performance of the uplink control channel. Therefore, it is necessary to divide the first length of the payload into two segments at first, i.e., <NUM>/<NUM> = <NUM> bits, and the <NUM> bits are coded by using the polar mother codes of Nmax = <NUM> to obtain <NUM> bits, so that <NUM> coded bits is got for the payload of <NUM> bits and then repeated to <NUM> bits. At this time, the non-repetitive actual code rate is <NUM>/<NUM> = <NUM>/<NUM>, which may significantly improve the performance compared with R = <NUM>/<NUM>.

<FIG> is a method of performing polar coding on the segments of the UCI in the prior art. Firstly a CRC sequence is attached behind the UCI information sequence (information bits) to obtain the UCI payload, then the code block segmentation is performed on the UCI payload, the polar coding is performed on the payload divided into two segments, the rate matching operation is performed respectively on the coded blocks, and finally the code block concatenation is performed to get the final output. In the UCI segmentation shown in <FIG>, multiple segments of UCI may have only one CRC, or multiple segments need to be decoded to obtain the candidate paths every time the decoding is performed, and they need to be combined to use this CRC for checking.

<FIG> is another method of performing polar coding on the segments of the UCI in the prior art. The code block segmentation is performed on the UCI information sequence (information bits) at first, where each segment is attached with a CRC sequence of L bits, then the polar coding is performed on each segment of bit stream added with the CRC, the rate matching operation is performed respectively on coded blocks, and the code block concatenation is performed to get the final output. In the method shown in <FIG>, during decoding, each segment of polar codes may be checked respectively according to its corresponding CRC. The CRC overhead is doubled. According to the current standard, the CRC is of at least <NUM> bits, so it significantly reduces the system performance, but also has the advantages of simple decoding and easy operation.

At present, all the discussions are based on the single-carrier coding scheme, or the coding method when the multiple carriers are divided into only two segments. There is no solution on how to flexibly segment, especially when the number of bits to be coded is greater than the maximum information sequence length allowed during coding. In <NPL>, it discusses the code block segmentation for data channel, in which two LDPC In this document, the number of Code Blocks depends on the base matrices are used for eMMB data channel. size in bits of the Transport Block and on the desired code rate.

In <NPL>, it discusses segmentation shall be supported, and the number of segments is at most <NUM> for NMAX, UCI=<NUM>.

The embodiments of the present application provide a coding method and apparatus, so as to solve the problem of non-flexible segmentation of the sequence to be coded in the prior art.

In order to illustrate the embodiments of the present application or the technical solutions in the prior art more clearly, the accompanying figures which need to be used in describing the embodiments or the prior art will be introduced below briefly. Obviously the accompanying figures described below are some embodiments of the present application, and other accompanying figures can also be obtained by those ordinary skilled in the art according to these accompanying figures without creative labor.

In order to flexibly segment the sequence to be coded, the embodiments of the present application provide a coding method and apparatus, an electronic device and a storage medium.

The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the accompanying drawings in the embodiments of the present application. Obviously the described embodiments are only a part of the embodiments of the present application but not all the embodiments. Based upon the embodiments of the present application, all of other embodiments obtained by those ordinary skilled in the art without creative work pertain to the protection scope of the present application.

<FIG> is a schematic diagram of a coding process provided by an embodiment of the present application. The process includes the following steps.

S301: determining the target number of segments of a sequence to be coded according to the length of the sequence to be coded and the transmission code rate.

S302: segmenting the sequence to be coded according to the target number.

S303: coding each sub-sequence obtained by segmenting, and concatenating the sub-sequences after coding.

The coding method provided by the embodiment of the present application is applied to the sending end, and specifically, the sending end may be a base station or a UE (User Equipment).

There is a sequence to be coded at the sending end, and the present application intends to segment said sequence, and codes each sub-sequence obtained by the segmentation to improve the coding performance. The sending end knows what transmission code rate R it uses to transmit the bit stream.

To segment the sequence to be coded, firstly the number of segments of the sequence to be coded should be determined, which is referred to as the target number. It is possible to determine the target number of segments of the sequence to be coded according to the length of the sequence to be coded and the transmission code rate, where the target number is a positive integer.

After the target number is determined, the sequence to be coded may be segmented according to the target number. When the segmentation is performed, it may be uniform segmentation or non-uniform segmentation.

In an embodiment of the present application, the sequence to be coded may be an information sequence including the UCI, or may be an information sequence including the UCI and a CRC sequence used for checking. That is, the sequence to be coded is the obtained UCI payload. The transmission code rate (R) is the ratio of the length (K) of the sequence to be coded to the length (M) of the sequence obtained after performing the polar coding and rate matching on the sequence to be coded, that is, R = K/M.

After the sequence to be coded is segmented, each sub-sequence after the segmentation is determined, the sub-sequence can be coded to obtain each code block, and multiple code blocks obtained after coding can be concatenated to obtain the entire coded bit stream.

In the embodiments of the present application, the target number of segments of the sequence to be coded is determined according to the length of the sequence to be coded and the transmission code rate, and the sequence to be coded is segmented according to the target number. The sequence to be coded is flexibly segmented to improve the coding performance.

In the embodiment of the present application, in order to determine the number of segments more flexibly and reasonably, said that determining the target number of segments of the sequence to be coded according to the length of the sequence to be coded and the transmission code rate includes:
determining the target number of segments of the sequence to be coded according to the length of the sequence to be coded, the transmission code rate and a preset first function.

Specifically, the preset first function is stored in the sending end. When determining the target number of segments of the sequence to be coded according to the length of the sequence to be coded and the transmission code rate, it is possible to determine the target number of segments of the sequence to be coded according to the length of the sequence to be coded, the transmission code rate and the preset first function.

The first function stored in the sending end may include a sub-function related to the length of the sequence to be coded and the transmission code rate, where the sub-function is g(R). The preset first function may be N = int (al *K/g(R)) or N = ceiling (al *K/g(R)), where g(R) is a function related to the transmission code rate R. Here g(R) is a linear function or a non-linear function, al is a first scaling factor, K is the length of the sequence to be coded, R is the transmission code rate of the sequence to be coded, and N is the target number.

The first function is an integer of a1*K/g(R). Specifically, it is possible to round down a1*K/g(R), then the first function is N = int (al *K/g(R)); or it is possible to round up a1*K/g(R), then the first function is N = ceiling (al*K/g(R)). Here al is the first scaling factor, and the range of the first scaling factor is greater than <NUM> and less than or equal to <NUM>. K is the length of the sequence to be coded, and R is the transmission code rate of the sequence to be coded.

The above-mentioned g(R) is a linear function, or g (R) is a non-linear function.

According to the present invention, g(R) is a linear function, g(R) = c1*R + b1, where c1 is the maximum bit length to be coded, and b1 is the preset first offset value.

Preferably, the range of the first offset value is greater than -<NUM> and less than <NUM>. If the embodiment of the present application is the coding method of polar codes, c1 is the maximum mother code length, which may be <NUM> bits.

Furthermore, in an embodiment of the present application, when g(R) is a linear function, N = ceiling (a*K/g(R)).

Because the values of al and b1 vary, the corresponding linear function g(R) varies, and the corresponding first function also varies. Different values of al and bl will be illustrated below in different cases. In a case that the first function is N = ceiling (al*K/g(R)), g(R) = c1*R + bl:.

In a case that the first function is N = int (al*K/g (R)), the specific target number is similar to the above, and will not be repeated here.

Alternatively, according to the present invention, g(R) is a nonlinear function, g(R) = c2*(Ai*Ri + Ai-<NUM>Ri-<NUM>+. + A<NUM>R) + b2, where c2 is the maximum bit length to be coded, b2 is the preset second offset value, i is a preset constant not less than <NUM>, and Ai - A<NUM> are preset constants. If the embodiment of the present application is the coding method of polar codes, c2 is the maximum mother code length, which may be <NUM> bits. The above-mentioned Ai to A<NUM> are preset constants, and any one or more of Ai to A<NUM> may be <NUM> or may not be <NUM>.

Furthermore, in an embodiment of the present application, when g(R) is a non-linear function, N = ceiling (a1*K/(c2*(Ai*Ri+Ai-<NUM>Ri-<NUM>+. + A<NUM>R) + b2)).

Because the values of a1 and b2 vary, the corresponding nonlinear function g(R) varies, and the corresponding first function also varies. Different values of a1 and b2 will be illustrated below in different cases.

When al is not <NUM> and b2 is not <NUM>, specifically, the target number N = ceiling (a1*K/(c2*(Ai*Ri+ Ai-<NUM>Ri-<NUM>+. + A<NUM>R) + b2));.

The above-mentioned Ai to A<NUM> are preset constants, and the constants in Ai to A<NUM> may be <NUM> or may not be <NUM>, so the items corresponding to the constants being <NUM> do not exist, and the items corresponding to the constants not being <NUM> exist.

For example, there are only three items, which may be g(R) = c2*(A<NUM>*R<NUM> + A<NUM>R<NUM> +A<NUM>R) + b2.

For example, there are only two items, which may be g(R) = c2*(A<NUM>*R<NUM> + A<NUM>R) + b2.

In a case that the first function is N = int (a1*K/(c2*(Ai*Ri + Ai-<NUM>Ri-<NUM>+. + A<NUM>R) + b2)), the specific target number is similar to the above, and will not be repeated here.

In order to segment more accurately so that the boundary points may successfully capture the segment boundary, after the target number is determined, whether to segment according to the target number may depend on whether a preset condition is met. In response to a fact that the preset condition is met, the sequence to be coded is segmented according to the target number. In response to a fact that the condition is not met, the determined target number is adjusted, and the sequence to be coded is segmented according to the adjusted target number. Based on the foregoing embodiments, in an embodiment of the present application, before segmenting the sequence to be coded according to the target number, the method includes:.

In an embodiment of the present application, before the segmentation, it may be determined whether to segment the sequence to be coded according to the target number.

Specifically, it is possible to determine a theoretical length value according to the length of the sequence to be coded and the target number at first, where the theoretical length value is the theoretical sub-length of each segment of the sequence to be coded after segmentation, i.e., a ratio determined according to the length of the sequence to be coded and the target number. The segmentation threshold corresponding to the transmission code rate is determined according to the transmission code rate.

According to the magnitudes of the segmentation threshold and the theoretical length value, it is determined whether to segment the sequence to be coded according to the target number.

If the theoretical length value is greater than or equal to the segmentation threshold, the sequence to be coded is segmented according to the target number. If the theoretical length value is less than the segmentation threshold, the target number needs to be adjusted, and the sequence to be coded is segmented according to the adjusted target number.

The first numerical value is stored in the sending end. When the theoretical length value is determined according to the length of the sequence to be coded and the target number, the second number may be determined according to the target number and the stored first numerical value. The ratio of the length of the sequence to be coded to the second quantity is determined as the theoretical length value. When the second number is determined according to the target number and the stored first numerical value, the sum of the target number and the first numerical value may be determined as the second number, or the difference between the target number and the first numerical value may be determined as the second number. The first numerical value may be <NUM>, <NUM>, <NUM>, <NUM>, or <NUM>, or another numerical value, and preferably the first numerical value is <NUM>.

If the first numerical value is <NUM>, that is, the ratio of the length K of the sequence to be coded to the target number N is taken as the theoretical length value, where the theoretical length value = K/N. If the first numerical value is <NUM> and the difference between the target number and the first numerical value is determined as the second number which is N-<NUM>, the theoretical length value is the ratio of the length K of the sequence to be coded to the second number N-<NUM>, that is, the theoretical length value = K/(N-<NUM>).

The second scaling factor a2 is stored in the sending end. When the theoretical length value is determined according to the length K of the sequence to be coded and the target number N, the theoretical length value may be determined according to the length of the sequence to be coded, the target number and the second scaling factor. Specifically, it is possible to determine the second ratio of the length of the sequence to be coded to the target number at first, and determine the product of the second ratio and the second scaling factor as the theoretical length value. That is, the theoretical length value = a2*K/N. Alternatively, the difference between the target number and the first numerical value may also be determined as the second number, where the second number is N-<NUM>. The ratio of the length K of the sequence to be coded to the second number N-<NUM> is determined, and the product of this ratio and the second scaling factor is determined as the theoretical length value, that is, the theoretical length value = a2*K/(N-<NUM>).

If the theoretical length value is less than the segmentation threshold, the target number needs to be adjusted. When the target number is adjusted, it is possible to adjust the target number to be N - k or N + k, where k is an integer greater than <NUM>, and preferably, k is <NUM>.

When the magnitudes of the theoretical length value and the segmentation threshold are determined, the process of determining the segmentation threshold may be different for different transmission code rates. On the basis of the foregoing embodiments, in an embodiment of the present application, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate includes:
if the transmission code rate is less than a preset first code rate threshold, determining that the segmentation threshold corresponding to the transmission code rate is a preset value.

In an embodiment of the present application, the first code rate threshold and the preset value are stored in the sending end. The segmentation threshold corresponding to the transmission code rate may be determined according to the magnitudes of the transmission code rate and the first code rate threshold. If the transmission code rate is less than the preset first code rate threshold, it is determined that the segmentation threshold corresponding to the transmission code rate is the preset value.

The first code rate threshold R1 may be any value greater than <NUM>. When R is less than R1, the segmentation threshold corresponding to R is the preset value. If R1 is greater than or equal to <NUM>, it is considered that the corresponding segmentation threshold is the preset value regardless of the transmission bit rate.

Preferably, the first code rate threshold is <NUM>/<NUM> or <NUM>/<NUM>.

When the segmentation threshold is determined for the transmission code rate, in an embodiment of the present application, the sending end may determine according to the saved preset second function. Specifically, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate includes:
determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function.

When the segmentation threshold corresponding to the transmission code rate is determined according to the transmission code rate and the preset second function, it is possbile to determine the segmentation threshold according to the transmission code rate and a preset linear function c3*R + b3 or int (c3*R + b3) if the transmission code rate is not less than a preset second code rate threshold, where c3 is the maximum bit length to be coded, b3 is a preset third offset value, R is the transmission code rate, and int is rounding.

The second code rate threshold R2 may be any value less than or equal to <NUM>. When R is greater than or equal to R2, the segmentation threshold is determined according to the transmission code rate and the preset linear function c3*R + b3 or int (c3*R + b3).

If R2 is less than or equal to <NUM>, it may be considered that the corresponding segmentation threshold is determined according to the linear function c3*R + b3 or int (c3*R + b3) regardless of value of the transmission code rate.

Preferably, the second code rate threshold is <NUM>/<NUM> or <NUM>/<NUM>.

If R1 = R2 and <NUM><R1<<NUM> and <NUM><R2<<NUM>; when R<R1, the corresponding segmentation threshold is the preset value; when R≥R1, the corresponding segmentation threshold is determined according to the linear function c3*R + b3 or int (c3*R + b3).

When the segmentation threshold corresponding to the transmission code rate is determined according to the transmission code rate and the preset second function, it is also possbile to determine the segmentation threshold according to the transmission code rate and a preset linear function c4*R + b4 or int (c4*R + b4) if the transmission code rate is not less than a preset third code rate threshold and less than a preset fourth bit rate threshold, where c4 is the maximum bit length to be coded, b4 is a preset fourth offset value, R is the transmission code rate, and int is rounding.

The third code rate threshold R3 is less than the fourth code rate threshold R4. On this basis, R3 may be any value less than <NUM>, and the fourth code rate threshold R4 may be any value greater than <NUM>. When R3≤R<R4, the corresponding segmentation threshold is determined according to the linear function c4*R + b4 or int (c4*R + b4).

If R3 is <NUM> and R4 is <NUM>, it may be considered that the corresponding segmentation threshold is determined according to the linear function c4*R + b4 or int (c4*R + b4) regardless of value of the transmission code rate.

It may also be: R1 = R3, R2 = R4, <NUM><R1<<NUM>, <NUM><R2<<NUM>, <NUM><R3<<NUM> and <NUM><R4<<NUM>; when R<R1, the corresponding segmentation threshold is the preset value;.

It may also be: R1 = R3, <NUM><R1<<NUM>, <NUM><R3<<NUM> and <NUM><R4<<NUM>;.

It may also be: R2 = R3, <NUM><R2<<NUM>, <NUM><R3<<NUM> and <NUM><R4<<NUM>;.

According to the above description, the determined relationship between the transmission code rate R and the segmentation threshold in the following table may be obtained, where R1 is the first code rate threshold, R2 is the second code rate threshold, R3 is the third code rate threshold, and R4 is the fourth code rate threshold.

The following is a specific embodiment of the segmentation:
N=ceil(M/<NUM>) where M= K/R
If R <=<NUM>/<NUM>
Ksegthr=<NUM>
Else if <NUM>/<NUM><R <=<NUM>/<NUM>
Ksegthr=<NUM>*R +<NUM>
End.

That is, when the code rate is less than or equal to <NUM>, the preset value Ksegthr = <NUM> may be used for segmentation; when the code rate is greater than <NUM> and less than or equal to <NUM>, the linear function Ksegthr = <NUM>*R + <NUM> is used for segmentation.

It is assumed that the length of the sequence to be coded is K = <NUM>*<NUM> = <NUM> bits, and the transmission code rate R = <NUM>.

When the target number of segments of the sequence to be coded is determined, it may be determined according to N = ceiling (K/(<NUM>*R)), so the target number of segments of the sequence to be coded is N = ceiling (<NUM>/(<NUM>*<NUM>)) = <NUM>, thus the sequence to be coded may be directly divided into <NUM> segments. The above example is to segment the coded bit number M = K/R by using the maximum mother code length of <NUM>. <FIG> is an example of only two segments using N = ceiling (K/(<NUM>*R)), where the diamonds represent the boundary points.

When the target number of segments of the sequence to be coded is determined, it may be determined according to N = ceiling (K/(<NUM>*R + b)), where b = <NUM> or <NUM>. When b = <NUM>, the target number of the segments of the sequence to be coded is N = ceiling (<NUM>/(<NUM>*<NUM>+<NUM>)) = <NUM>; when b = <NUM>, the target number of the segments of the sequence to be coded is N = ceiling (<NUM>/(<NUM>*<NUM>+<NUM>)) = <NUM>. The above example is to segment the coded bit number M = K/R by using the length of <NUM>+b/R. <FIG> is an example using N = ceiling (K/(<NUM>*R + b)) and offset = <NUM> or <NUM>. In this example, there are only two segments at most, where the diamonds represent the boundary points when b is <NUM>, and the circles represent the boundary points when b is <NUM>.

The above is to directly segment the sequence to be coded according to the determined target number. In order to make the segmentation more accurate and capture the boundary points more precisely, it is also possible to determine the relationship between the segmentation theoretical length value and the segmentation threshold after determining the target number N, and determine whether to update the target number according to the transmission code rate.

Specifically, it is possible to calculate the specific value of N according to N = ceiling (K/(<NUM>*R)) at first, and determine the theoretical length value after obtaining the specific value of N. According to the magnitudes of the theoretical length value and the segmentation threshold as well as the transmission code rate, it is determined whether to divide into N segments or N-<NUM> segments.

The following is another specific embodiment of the segmentation:
N=ceil(M/<NUM>) where M= K/R
If R <=<NUM>/<NUM>
Ksegthr=<NUM>
Else if <NUM>/<NUM><R
Ksegthr=<NUM>*R+<NUM>
End.

That is, when the code rate is less than or equal to <NUM>, the preset value Ksegthr = <NUM> may be used for segmentation; when the code rate is greater than <NUM>, the linear function Ksegthr = <NUM>*R + <NUM> is used for segmentation.

<FIG> is a schematic diagram of the segmentation according to the foregoing embodiment, where the boundary points successfully capture the segmentation boundary.

In the Long Term Evolution (LTE) system, the Uplink Control CHannel (PUCCH) is used to transmit the synchronized UCI, where the UCI transmitted on the PUCCH includes an uplink Scheduling Request (SR), the downlink Hybrid Automatic Retransmission Query ACKnowledge (HARQ-ACK) information, and the periodic Channel Quality Indicator (CQI) information of the UE. In order to ensure that the receiving end can check the accuracy of the received UCI, the sending end may attach a CRC sequence for checking behind the UCI information sequence before coding the UCI. In an embodiment of the present application, the sequence to be coded is segmented and coded. Specifically, it is possible to perform segmentation at first, followed by CRC attachment, or it is possible to perform CRC attachment at first, followed by segmentation. Based on the above embodiments, in an embodiment of the present application, said that segmenting the sequence to be coded according to the target number includes:.

Specifically, in the segmentation, if the CRC sequence is attached behind the UCI information sequence (information bits) to obtain the UCI payload and then the code block segmentation is performed on the UCI payload, there is a need to determine the target sequence according to the sequence to be coded when the sequence to be coded is the UCI information sequence. The target sequence is the UCI payload obtained after the CRC sequence is attached to the UCI information sequence (information bits); the sequence to be coded may be directly used as the target sequence when the sequence to be coded itself includes the UCI information sequence and the CRC sequence for checking.

Alternatively, in the segmentation, the code block segmentation is performed on the UCI information sequence (information bits) at first, where each segment is added with a CRC sequence of L bits, then the polar coding is performed on each segment of bit stream added with the CRC, the rate matching operation is performed respectively on coded code blocks, and finally the code blocks are concatenated to get the final output. Then, when the sequence to be coded is the UCI information sequence, the sequence to be coded may be directly used as the target sequence, and the target sequence is segmented by using the target number; when the sequence to be coded itself includes the UCI information sequence and the CRC sequence for checking, the CRC sequence needs to be removed from the sequence to be coded, and the obtained UCI information sequence is used as the target sequence to thereby perform the segmentation.

On the basis of the above embodiments, when the segmentation is performed, it may be uniform segmentation or non-uniform segmentation; or may be uniform segmentation after zero padding.

If the sequence to be coded is segmented, the uniform segmentation or the non-uniform segmentation or the uniform segmentation after zero padding may be performed on the sequence to be coded.

If the target sequence is segmented, the uniform segmentation or the non-uniform segmentation or the uniform segmentation after zero padding may be performed on the target sequence.

S401: determining the target number of segments of a sequence to be coded according to the length of the sequence to be coded, the transmission code rate and a preset first function.

S402: determining a theoretical length value according to the length of the sequence to be coded and the target number, and determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate.

S403: determining whether the theoretical length value is greater than or equal to the segmentation threshold, if so, proceeding to S405; if not, proceeding to S404.

S404: adjusting the target number, and proceeding to S405 according to the adjusted target number.

S405: segmenting the sequence to be coded according to the target number.

S406: coding each sub-sequence after segmenting, and concatenating the sub-sequences after coding.

<FIG> is a structural diagram of a coding device provided by an embodiment of the present application. The device includes:.

Optionally, the determining module <NUM> is further configured to determine a theoretical length value according to the length of the sequence to be coded and the target number; and determine the segmentation threshold corresponding to the transmission code rate according to the transmission code rate;
the apparatus further includes:.

The determining module <NUM> is specifically configured to: determine a second number according to the target number and a preset first numerical value, and determine the ratio of the length of the sequence to be coded to the second number as the theoretical length value; or determine the second ratio of the length of the sequence to be coded to the target number, and determine the product of the second ratio and a preset second scaling factor as the theoretical length value.

The apparatus further includes:
an update module configured to adjust the target number.

The determining module <NUM> is specifically configured to: determine that the segmentation threshold corresponding to the transmission code rate is a preset value if the transmission code rate is less than a preset first code rate threshold.

The determining module <NUM> is specifically configured to: determine the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function.

The determining module <NUM> is specifically configured to: determine the segmentation threshold according to the transmission code rate and a preset linear function c3*R + b3 or int (c3*R + b3) if the transmission code rate is not less than a preset second code rate threshold, where c3 is the maximum bit length to be coded, b3 is a preset third offset value, R is the transmission code rate, and int is rounding.

The determining module <NUM> is specifically configured to: determine the segmentation threshold according to the transmission code rate and a preset linear function c4*R + b4 or int (c4*R + b4) if the transmission code rate is not less than a preset third code rate threshold and less than a preset fourth bit rate threshold, where c4 is the maximum bit length to be coded, b4 is a preset fourth offset value, R is the transmission code rate, and int is rounding.

The segmentation module <NUM> is specifically configured to: determine a target sequence according to the sequence to be coded; and segment the target sequence according to the target number, where the target sequence is an information sequence, or a sequence consisting of an information sequence and a CRC sequence.

<FIG> is an electronic device provided by an embodiment of the present application. The electronic device includes: a memory <NUM> and a processor <NUM>.

The processor <NUM> is configured to read programs in the memory to perform the process of:.

The processor <NUM> is specifically configured to: determine the target number of segments of the sequence to be coded according to the length of the sequence to be coded, the transmission code rate and a preset first function.

The processor <NUM> is further configured to: determine a theoretical length value according to the length of the sequence to be coded and the target number before segmenting the sequence to be coded according to the target number; determine the segmentation threshold corresponding to the transmission code rate according to the transmission code rate; determine whether the theoretical length value is greater than or equal to the segmentation threshold; in response to determining that the theoretical length value is greater than or equal to the segmentation threshold, proceed to a next step.

The processor <NUM> is specifically configured to: determine a second number according to the target number and a preset first numerical value, and determine the ratio of the length of the sequence to be coded to the second number as the theoretical length value; or determine the second ratio of the length of the sequence to be coded to the target number, and determine the product of the second ratio and a preset second scaling factor as the theoretical length value.

The processor <NUM> is further configured to: adjust the target number before segmenting the sequence to be coded according to the target number if the theoretical length value is less than the segmentation threshold.

The processor <NUM> is specifically configured to: determine that the segmentation threshold corresponding to the transmission code rate is a preset value if the transmission code rate is less than a preset first code rate threshold.

The processor <NUM> is specifically configured to: determine the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function.

The processor <NUM> is specifically configured to: determine the segmentation threshold according to the transmission code rate and a preset linear function c3*R + b3 or int (c3*R + b3) if the transmission code rate is not less than a preset second code rate threshold, where c3 is the maximum bit length to be coded, b3 is a preset third offset value, R is the transmission code rate, and int is rounding.

The processor <NUM> is specifically configured to: determine the segmentation threshold according to the transmission code rate and a preset linear function c4*R + b4 or int (c4*R + b4) if the transmission code rate is not less than a preset third code rate threshold and less than a preset fourth bit rate threshold, where c4 is the maximum bit length to be coded, b4 is a preset fourth offset value, R is the transmission code rate, and int is rounding.

The processor <NUM> is specifically configured to: determine a target sequence according to the sequence to be coded; and segment the target sequence according to the target number, where the target sequence is an information sequence, or a sequence composed of an information sequence and a CRC sequence.

As shown in <FIG>, it is a structural schematic diagram of an electronic device provided by an embodiment of the present application. Here, in <FIG>, the bus architecture may include any numbers of interconnected buses and bridges, and specifically link various circuits of one or more processors represented by the processor <NUM> and the memory represented by the memory <NUM>. The bus architecture may further link various other circuits such as peripheral device, voltage regulator and power management circuit, which are all well known in the art and thus will not be further described again herein. The bus interface provides an interface. The processor <NUM> is responsible for managing the bus architecture and general processing, and the memory <NUM> may store the data used by the processor <NUM> when performing the operations.

A computer readable storage medium, where the computer readable storage medium stores a computer program executable by an electronic device, where the program, when running on the electronic device, causes the electronic device to perform the steps of:.

Said that determining the target number of segments of a sequence to be coded according to the length of the sequence to be coded and the transmission code rate, includes:
determining the target number of segments of the sequence to be coded according to the length of the sequence to be coded, the transmission code rate and a preset first function.

The preset first function includes:
an integer of N = a1*K/g(R), where the g(R) is a linear function or a nonlinear function, al is a first scaling factor, K is the length of the sequence to be coded, R is the transmission code rate, and N is the target number.

When the g(R) is a linear function, the g(R) = c1*R + b1, where c1 is the maximum bit length to be coded, and b1 is a preset first offset value.

When the g(R) is a nonlinear function, the g(R) = c2*(Ai*Ri+ Ai-<NUM>Ri-<NUM>+. + A<NUM>R) + b2, where c2 is the maximum bit length to be coded, b2 is a preset second offset value, i is a preset constant not less than <NUM>, and Ai - A<NUM> are preset constants.

Optionally, before segmenting the sequence to be coded according to the target number, the method includes:.

Optionally, said that determining a theoretical length value according to the length of the sequence to be coded and the target number, includes:.

Optionally, the first numerical value is <NUM>.

Optionally, if the theoretical length value is less than the segmentation threshold, before segmenting the sequence to be coded according to the target number, the method further includes:
adjusting the target number.

Optionally, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate includes:
if the transmission code rate is less than a preset first code rate threshold, determining that the segmentation threshold corresponding to the transmission code rate is a preset value.

Optionally, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate includes:
determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function.

Optionally, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function, includes:
if the transmission code rate is not less than a preset second code rate threshold, determining the segmentation threshold according to the transmission code rate and a preset linear function c3*R + b3 or int (c3*R + b3), where c3 is the maximum bit length to be coded, b3 is a preset third offset value, R is the transmission code rate, and int is rounding.

Optionally, said that determining the segmentation threshold corresponding to the transmission code rate according to the transmission code rate and a preset second function, includes:
if the transmission code rate is not less than a preset third code rate threshold and less than a preset fourth bit rate threshold, determining the segmentation threshold according to the transmission code rate and a preset linear function c4*R + b4 or int (c4*R + b4), where c4 is the maximum bit length to be coded, b4 is a preset fourth offset value, R is the transmission code rate, and int is rounding.

Optionally, the scaling factor is greater than <NUM> and less than or equal to <NUM>.

Optionally, the offset value is greater than -<NUM> and less than <NUM>.

Optionally, the segmenting the sequence to be coded according to the target number includes:.

The embodiments of the present application provide a coding method and apparatus, an electronic device and a storage medium, so as to solve the problem of non-flexible segmentation of the sequence to be coded in the prior art. The method includes: determining the target number of segments of a sequence to be coded according to the length of the sequence to be coded and the transmission code rate; segmenting the sequence to be coded according to the target number; coding each sub-sequence obtained after segmenting, and concatenating the sub-sequences after coding. In the embodiments of the present application, the target number of segments of the sequence to be coded is determined according to the length of the sequence to be coded and the transmission code rate, and the sequence to be coded is segmented according to the target number. The sequence to be coded is flexibly segmented to improve the coding performance.

For the system/apparatus embodiments, they are substantially similar to the method embodiments, so the description thereof is relatively simple, and the related parts may refer to the partial illustration of the method embodiments.

It should be noted that the relational terms such as first and second herein are only used to distinguish one entity or operation from another and do not necessarily require or imply any such actual relationship or sequence between these entities or operations.

It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems and computer program products. Thus the present application can take the form of hardware embodiments alone, software embodiments alone, or embodiments combining the software and hardware aspects. Also the present application can take the form of computer program products implemented on one or more computer usable storage mediums (including but not limited to magnetic disk memories, CD-ROMs, optical memories and the like) containing computer usable program codes therein.

The present application is described by reference to the flow charts and/or the block diagrams of the methods, the devices (systems) and the computer program products according to the embodiments of the present application. It should be understood that each process and/or block in the flow charts and/or the block diagrams, and a combination of processes and/or blocks in the flow charts and/or the block diagrams can be implemented by the computer program instructions. These computer program instructions can be provided to a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing device to produce a machine, so that an apparatus for implementing the functions specified in one or more processes of the flow charts and/or one or more blocks of the block diagrams is produced by the instructions executed by the computer or the processor of another programmable data processing device.

These computer program instructions can also be loaded onto the computer or another programmable data processing device, so that a series of operation steps are performed on the computer or another programmable device to produce the computer-implemented processing. Thus the instructions executed on the computer or another programmable device provide steps for implementing the functions specified in one or more processes of the flow charts and/or one or more blocks of the block diagrams.

Although the preferred embodiments of the present application have been described, those skilled in the art can make additional alterations and modifications to these embodiments once they learn about the basic creative concept.

Claim 1:
A coding method of polar codes, comprising:
determining (S301) a target quantity of segments of a sequence to be coded according to a length of the sequence to be coded and a transmission code rate;
performing segmentation (S302) on the sequence to be coded according to the target quantity;
coding (S303) each sub-sequence obtained after segmentation, and concatenating sub-sequences after coding;
wherein said determining a target quantity of segments of a sequence to be coded according to a length of the sequence to be coded and a transmission code rate, comprises:
determining the target quantity of segments of the sequence to be coded according to the length of the sequence to be coded, the transmission code rate and a preset first function;
characterized in that the preset first function comprises:
an integer of N = a1*K/g(R), wherein the g(R) is a linear function or a nonlinear function, al is a first scaling factor, K is the length of the sequence to be coded, R is the transmission code rate, and N is the target quantity;
wherein when the g(R) is a linear function, the g(R) = c1*R + b1, wherein c1 is a maximum bit length to be coded, and b1 is a preset first offset value; or
when the g(R) is a nonlinear function, the g(R) = c2*(Ai*Ri + Ai-<NUM>Ri-<NUM>+ ...... + A<NUM>R) + b2, wherein c2 is a maximum bit length to be coded, b2 is a preset second offset value, i is a preset constant not less than <NUM>, Ai-A1 are preset constants, and at least one Ai is not zero.