CRC check code generation method, device, electronic device and storage medium
By calculating the CRC check code by generating a matrix, the problem of delay in the calculation of CRC check code in the PDCCH channel in the 5G NR system is solved, and the parallel calculation of the CRC check code is realized, which improves the data transmission efficiency.
Patent Information
- Application Number
- CN202411856531.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the 5G NR system, there is a calculation delay in the calculation of the CRC check code calculation of the PDCCH channel, which affects the efficiency of data transmission.
By determining the first generation matrix corresponding to the length of the original information and the channel type, a second generation matrix is generated, and a CRC check code is calculated based on the second generation matrix and the original information.
The parallel calculation of CRC verification code is realized, which reduces the delay of CRC verification code calculation and improves the efficiency of data transmission.
Smart Images

Figure CN119316096B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a method, device, electronic device and storage medium for generating a CRC check code. Background Art
[0002] In the 5G NR (New Radio) system, PDCCH (Physical Downlink Control Channel) is mainly used to transmit DCI (Downlink Control Information), which is crucial for uplink and downlink resource scheduling. Before encoding, the DCI bits need to be added with a CRC check code to verify the correctness of the data at the receiving end.
[0003] In the related art, the corresponding length of 1 is added to the front of the DCI bit corresponding to the PDCCH channel, and then the binary data of the CRC (Cyclic Redundancy Check) polynomial is divided to obtain the CRC check code. However, the above solution calculates the CRC bit by bit, which has a certain calculation delay. Summary of the invention
[0004] The embodiment of the present invention provides a method, device, electronic device and storage medium for generating a CRC check code, so as to reduce the delay of calculating the CRC check code.
[0005] In a first aspect, an embodiment of the present invention provides a method for generating a CRC check code, comprising: determining the length of original information; determining a second generation matrix based on a first generation matrix corresponding to the length of the original information and a channel type to which the original information belongs; wherein the first generation matrix is a matrix determined based on a threshold value of the length of the original information, the channel type and a CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the threshold value of the length of the original information; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; based on the original information and the second generation matrix, determining the CRC check code corresponding to the original information; wherein each column in the second generation matrix corresponds to a check code in the CRC check code.
[0006] In some embodiments, the first generating matrix is determined in advance by the following method: Based on the original information length threshold, the channel type, and the CRC generating polynomial, determine the number of rows M of the first generating matrix; Concatenate an M - order identity matrix and an M×N zero matrix to obtain an M×T basis matrix; where T = M + N; Determine the binary data corresponding to the CRC generating polynomial, and perform a reverse - order process on the binary data to obtain reverse - order binary data; According to the modulo operation method, divide each row element in the basis matrix by the reverse - order binary data respectively to obtain the remainder corresponding to each row element; Based on the remainder corresponding to each row element, determine the first generating matrix.
[0007] In some embodiments, the determining the first generating matrix based on the remainder corresponding to each row element includes: For the remainder corresponding to the i - th row element in the basis matrix, perform a reverse - order process on the remainder corresponding to the i - th row element to obtain the reverse - order remainder corresponding to the i - th row element; where i is a positive integer less than or equal to M; Determine the number of digits P of the remainder corresponding to the i - th row element; If P = N, use the reverse - order remainder corresponding to the i - th row element as the i - th row element of the first generating matrix; If P < N, supplement Z zeros in front of the reverse - order remainder corresponding to the i - th row element, and use the supplemented result as the i - th row element of the first generating matrix; where Z = N - P.
[0008] In some embodiments, the determining the second generating matrix based on the length of the original information and the first generating matrix corresponding to the channel type of the original information includes: Based on the length of the original information, determine the index of the second generating matrix; Based on the index, determine the second generating matrix from the first generating matrix.
[0009] In some embodiments, the determining the CRC check code corresponding to the original information based on the original information and the second generating matrix includes: Transpose the second generating matrix to obtain the transposed second generating matrix; Process the original information according to the communication protocol of the channel type to obtain the processed original information; Multiply the transposed second generating matrix by the first - column matrix determined by the processed original information, and based on the obtained second - column matrix, determine the CRC check code.
[0010] As a possible implementation manner, the determining the CRC check code based on the obtained second - column matrix includes: For the j - th element in the second - column matrix, perform a modulo - 2 remainder operation on the j - th element, and determine the result of the remainder operation as the j - th check code in the CRC check code; where j is a positive integer less than or equal to N.
[0011] In a second aspect, an embodiment of the present invention provides a CRC check code generation device, comprising:
[0012] The first determination module is used to determine the length of the original information; the second determination module is used to determine the second generation matrix based on the length of the original information and the first generation matrix corresponding to the channel type to which the original information belongs; wherein the first generation matrix is a matrix determined based on the original information length threshold, the channel type and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; the third determination module is used to determine the CRC check code corresponding to the original information based on the original information and the second generation matrix; wherein each column in the second generation matrix corresponds to a check code in the CRC check code.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the method for generating a CRC check code described in the first aspect above is implemented.
[0014] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a CRC check code described in the first aspect above is implemented.
[0015] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating a CRC check code described in the first aspect above.
[0016] The CRC check code generation method, device, electronic device and storage medium provided by the embodiment of the present invention determine the length of the original information; based on the length of the original information and the first generation matrix, determine the second generation matrix; wherein the first generation matrix is a matrix determined based on the original information length threshold and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; based on the original information and the second generation matrix, determine the CRC check code corresponding to the original information; wherein each column in the second generation matrix corresponds to a check code in the CRC check code. The present invention generates a CRC check code based on a generation matrix, and each column in the second generation matrix corresponds to a check code in the CRC check code, indicating that each bit in the CRC check code can be calculated separately, and parallel calculation of the CRC check code can be realized, thereby reducing the delay of CRC check code calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 One of the flow charts of the method for generating a CRC check code provided in an embodiment of the present invention;
[0019] Figure 2 A second flow chart of a method for generating a CRC check code provided in an embodiment of the present invention;
[0020] Figure 3 A third flow chart of a method for generating a CRC check code provided in an embodiment of the present invention;
[0021] Figure 4 A fourth flow chart of a method for generating a CRC check code provided in an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of the structure of a device for generating a CRC check code provided in an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] It should be noted that the CRC check code refers to the redundant bits attached to the data in order to verify the correctness of the data in data communication. The CRC check code is calculated by a specific algorithm and is usually closely related to the data itself. At the receiving end, the CRC check code is recalculated using the same algorithm. If the result is the same as the received CRC check code, it is considered that there is no error in the data transmission process. For example, in the process of PDCCH transmitting DCI, the DCI bit needs to add a CRC check code before encoding to verify the correctness of the data at the receiving end.
[0026] However, the current calculation process of the CRC check code is bit by bit, which has a certain calculation delay. In order to solve the above technical problems, the present invention provides a method, device, electronic device and storage medium for generating a CRC check code.
[0027] Figure 1 One of the flow charts of the method for generating a CRC check code provided in an embodiment of the present invention. Figure 1 As shown, the method may include the following steps.
[0028] Step 101, determine the length of the original information.
[0029] The original information refers to the data information to be encoded by the transmitting end during the data communication process. If applied in the scenario of PDCCH transmitting DCI, the original information refers to the DCI information to be encoded.
[0030] Step 102, based on the length of the original information and the first generation matrix corresponding to the channel type to which the original information belongs, determine the second generation matrix; wherein the first generation matrix is a matrix determined based on the original information length threshold, the channel type and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M.
[0031] In some embodiments, the original information length threshold may be the maximum length of the original information, which may generally be determined based on an actual scenario. The CRC generator polynomial may be provided in a communication protocol in an actual scenario. The first generator matrix may be a matrix determined in advance based on the original information length threshold, the channel type to which the original information belongs, and the CRC generator polynomial, and may be a general matrix for generating a CRC check code.
[0032] The second generation matrix is determined from the first generation matrix and is used to generate a matrix of the CRC check code of the current original information. The number of rows M of the first generation matrix is related to the original information length threshold and the channel type. The method of determining the number of rows M of the first generation matrix is consistent with the processing method of the original information in the CRC check code calculation process specified in the communication protocol of the corresponding channel type. For example, if the application scenario is DCI information transmission of the PDCCH channel, N 1s need to be added before the DCI information when calculating the CRC check code. Therefore, when determining the number of rows of the first generation matrix, it is also necessary to add the original information length threshold to the CRC check code length, that is, the number of rows M of the first generation matrix = L + N, and L is the original information length threshold.
[0033] The number of rows Q of the second generation matrix is related to the length of the original information and the channel type. As an example, if the application scenario is DCI information transmission of the PDCCH channel, based on the communication protocol, N 1s need to be added before the DCI information when calculating the CRC check code. Therefore, when determining the number of rows of the second generation matrix, the length of the original information and the length of the CRC check code also need to be added, that is, the number of rows Q of the second generation matrix = S + N, where S is the length of the original information.
[0034] The first generation matrix and the second generation matrix have the same number of columns, the first generation matrix includes M rows, the second generation matrix includes Q rows, and M ≥ Q. The implementation process of determining the second generation matrix based on the length of the original information and the first generation matrix includes: determining the number of rows Q of the second generation matrix based on the length of the original information, and then selecting Q rows from the first generation matrix to form the second generation matrix.
[0035] In some embodiments, the first generating matrix can be predetermined by the following steps: based on the CRC generating polynomial, determining the corresponding binary data; based on the original information length threshold, the communication protocol corresponding to the channel type and the CRC generating polynomial, determining the number of rows M of the first generating matrix; performing concatenation processing based on the M-order unit matrix and the M×N zero matrix to obtain an M×T basis matrix, T=M+N; performing deconvolution operations on each row element of the basis matrix and the binary data corresponding to the CRC generating polynomial, and determining the first generating matrix based on the result of the deconvolution operation.
[0036] Step 103, based on the original information and the second generation matrix, determine the CRC check code corresponding to the original information; wherein each column in the second generation matrix corresponds to a check code in the CRC check code.
[0037] In some embodiments, the second generation matrix is a Q×N matrix, and the length of the original information after being processed in accordance with the processing method in the CRC calculation process specified in the protocol is also Q. The length of each column in the second generation matrix is consistent with the length of the processed original information, and the number of columns N in the second generation matrix is the number of bits of the CRC check code. In other words, each bit check code in the CRC check code is determined based on the processed original information and each column element in the second generation matrix.
[0038] As a possible implementation method, for the i-th row elements of the second generation matrix, the row matrix determined by the processed original information is multiplied by every i-row elements in the second generation matrix in a modular operation to obtain the i-th check code in the CRC check code.
[0039] According to the CRC check code generation method of the embodiment of the present invention, the length S of the original information is determined; based on the first generation matrix corresponding to the length of the original information and the channel type to which the original information belongs, the second generation matrix is determined; wherein the first generation matrix is a matrix determined based on the original information length threshold, the channel type and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; based on the original information and the second generation matrix, the CRC check code corresponding to the original information is determined; wherein each column in the second generation matrix corresponds to a check code in the CRC check code. The present invention generates a CRC check code based on a generation matrix, and each column in the second generation matrix corresponds to a check code in the CRC check code, indicating that each bit in the CRC check code can be calculated separately, and parallel calculation of the CRC check code can be realized, thereby reducing the delay of CRC check code calculation.
[0040] Next, the process of determining the first generation matrix will be described in detail.
[0041] Figure 2 The second flow chart of the method for generating a CRC check code provided by the embodiment of the present invention. Figure 2 As shown, the first generation matrix can be determined in advance in the following manner.
[0042] Step 201: Determine the number of rows M of a first generator matrix based on an original information length threshold, a channel type, and a CRC generator polynomial.
[0043] In some embodiments, different channel types correspond to different communication protocols, and the original information is processed differently during the CRC check code calculation process. In some scenarios, the original information is not processed during the CRC check code calculation process, in some scenarios, N 1s are added before the original information, and in some scenarios, N 0s are added after the original information. The process of determining the number of rows of the first generation matrix is consistent with the original information processing method specified in the protocol. As an example, if the application scenario is a scenario where PDCCH transmits DCI information, the communication protocol stipulates that when calculating the CRC check code, N 1s are added before the DCI information, and then the CRC check code is calculated based on the supplemented DCI information. Therefore, in this scenario, the number of rows of the first generation matrix M=L+N, L is the original information length threshold.
[0044] Step 202, concatenate the M-order identity matrix with the M×N zero matrix to obtain an M×T basis matrix; wherein T=M+N.
[0045] The number of bits of the CRC generating polynomial refers to the length of the binary data corresponding to the CRC generating polynomial. For example, if the CRC generating polynomial is of CRC-24 type and the original information length threshold is 60 bits, the CRC check code length is 24 bits, the M-order unit matrix is an 84×84 matrix, the M×N zero matrix refers to an 84×24 all-zero matrix, and the obtained base matrix is an 84×108 matrix.
[0046] Step 203, determine the binary data corresponding to the CRC generator polynomial, and perform reverse processing on the binary data to obtain reverse binary data.
[0047] The binary data corresponding to the CRC generator polynomial refers to the coefficient sequence corresponding to the CRC generator polynomial.
[0048] As an example, if the CRC generating polynomial is as follows, the binary data corresponding to the CRC generating polynomial is 1101100101011000100010111, and the binary data is reversed to 1110100010001101010011011.
[0049]
[0050] Step 204: Divide each row of elements in the base matrix by the reverse binary data in a modular operation manner to obtain a remainder corresponding to each row of elements.
[0051] In some embodiments, for each row of elements in the base matrix, based on a modulo-2 division operation, the elements are divided by the reverse binary data to obtain the remainders corresponding to each row of elements in the base matrix.
[0052] As an example, if the CRC generation polynomial is of the CRC-24 type, the original information length threshold is 60 bits, and the reverse binary data is 1110100010001101010011011; for the first row element 100000…00 in the base matrix, perform modulo-2 division on the first row element 100000…00 and 1110100010001101010011011 to obtain the remainder corresponding to the first row element in the base matrix; for the second row element 010000…00 in the base matrix, perform modulo-2 division on the second row element 010000…00 and 1110100010001101010011011 to obtain the remainder corresponding to the second row element in the base matrix, and so on, to obtain the remainder corresponding to each row element.
[0053] Step 205, determine the first generation matrix based on the remainder corresponding to each row element.
[0054] In some embodiments, the remainder corresponding to each row element may be reversed to obtain the reversed remainder corresponding to each row element, and then the first generation matrix is formed based on the reversed remainder corresponding to each row element.
[0055] As a possible implementation, determining the first generation matrix based on the remainder corresponding to each row element may include the following steps.
[0056] Step S1, for the remainder corresponding to the i-th row element in the base matrix, reverse the remainder corresponding to the i-th row element to obtain the reversed remainder corresponding to the i-th row element; where i is a positive integer less than or equal to M.
[0057] That is, for the remainder corresponding to each row element in the base matrix, perform the processing of steps S1 to S4 respectively to obtain the first generation matrix.
[0058] Step S2, determine the number of bits P of the remainder corresponding to the i-th row element.
[0059] Since the first generation matrix is an M×N matrix, that is, the first generation matrix contains N column elements. Also, since the number of bits of the remainder corresponding to each row element in the base matrix is uncertain, it may be N or less than N. Therefore, in order to make the finally obtained first generation matrix contain N column elements, it is necessary to determine the number of bits of the remainder corresponding to each row element.
[0060] Step S3, if P = N, use the reversed remainder corresponding to the i-th row element as the i-th row element of the first generation matrix.
[0061] Step S4, if P < N, supplement Z zeros in front of the reversed remainder corresponding to the i-th row element, and use the supplemented result as the i-th row element of the first generation matrix; where Z = N - P.
[0062] That is to say, if the number of digits of the remainder corresponding to the element in the i-th row is N, the inverse remainder corresponding to the element in the i-th row is directly used as the element in the i-th row of the first generator matrix. If the number of digits of the remainder corresponding to the element in the i-th row is less than N, it is necessary to fill the inverse remainder corresponding to the element in the i-th row with 0s so that the number of digits of the supplemented inverse remainder is N, and the supplemented result is used as the element in the i-th row of the first generator matrix.
[0063] According to the method for generating a CRC check code of an embodiment of the present invention, based on the original information length threshold, the channel type and the CRC generator polynomial, the number of rows M of the first generator matrix is determined; the M-order unit matrix is concatenated with the M×N zero matrix to obtain an M×T base matrix; wherein, T=M+N; the binary data corresponding to the CRC generator polynomial is determined, and the binary data is reversed to obtain reversed binary data; in a modular operation, each row element in the base matrix is divided by the reversed binary data to obtain the remainder corresponding to each row element; based on the remainder corresponding to each row element, the first generator matrix is determined. The present invention determines the first generator matrix in advance based on the CRC generator polynomial and the length threshold of the original information, so that when the CRC check code is calculated each time, the second generator matrix is directly determined from the first generator matrix, and the CRC check code is generated based on the second generator matrix and the original information, so as to realize the parallel calculation of the CRC check code, thereby reducing the delay of the CRC check code calculation.
[0064] Figure 3 The third flow chart of the method for generating a CRC check code provided by the embodiment of the present invention. Figure 3 As shown, based on the above embodiments, Figure 1 The implementation process of step 102 in may include the following steps.
[0065] Step 301: Determine the index of the second generation matrix based on the length of the original information.
[0066] The index of the second generation matrix refers to the position information of each row in the second generation matrix in the first generation matrix. Since the first generation matrix is a generation matrix determined based on the maximum length of the original information, it contains a total of M rows of elements, and the second generation matrix contains a total of Q rows of elements, it is necessary to select Q rows of elements from the first generation matrix to form the second generation matrix.
[0067] In some embodiments, the number of rows Q of the second generation matrix can be determined based on the length S of the original information and the protocol regulations under the channel type to which it belongs; according to the preset logic, the position identifiers of the Q row elements are selected from the first generation matrix and used as the index of the second generation matrix.
[0068] In some embodiments, the difference LS between the length of the original information and the original information length threshold L can be determined based on the length S of the original information and the original information length threshold L; based on the difference, the index of the second generation matrix is determined to be the L-S+1th row to the Nth row in the first generation matrix.
[0069] Step 302: Determine a second generator matrix from the first generator matrix based on the index.
[0070] That is, based on the index of the second generator matrix, the second generator matrix is selected from the first generator matrix.
[0071] As a possible implementation method, based on the length S of the original information and the original information length threshold L, a difference LS between the length of the original information and the original information length threshold is determined; based on the difference, the index of the second generation matrix is determined to be the L-S+1th row to the Nth row in the first generation matrix; the L-S+1th row to the Nth row in the first generation matrix are determined as the second generation matrix, that is, the L-S+1th row in the first generation matrix is used as the first row in the second generation matrix, the L-S+2th row in the first generation matrix is used as the second row in the second generation matrix, the L-S+3th row in the first generation matrix is used as the third row in the second generation matrix, and so on, to obtain the second generation matrix.
[0072] According to the method for generating a CRC check code of an embodiment of the present invention, the index of the second generation matrix is determined based on the length of the original information; based on the index, the second generation matrix is determined from the first generation matrix, so that the second generation matrix can be obtained based on the predetermined first generation matrix, and the CRC check code is determined based on the second generation matrix and the original information. The present invention generates a CRC check code based on a generation matrix, and each column in the second generation matrix corresponds to a check code in the CRC check code, indicating that each bit in the CRC check code can be calculated separately, and the parallel calculation of the CRC check code can be realized, thereby reducing the delay of the CRC check code calculation.
[0073] Figure 4 The fourth flow chart of the method for generating a CRC check code provided by the embodiment of the present invention. Figure 4 As shown, based on the above embodiments, Figure 1 The implementation process of step 103 in may include the following steps.
[0074] Step 401, transpose the second generator matrix to obtain a transposed second generator matrix.
[0075] Step 402: Process the original information according to the communication protocol of the channel type to obtain processed original information.
[0076] In some embodiments, if the current application scenario is DCI information transmission of PDCCH, according to the protocol, N ones are added before the original information to obtain the processed original information. The length of the processed original information is the same as the number of columns of the second generation matrix after transposition.
[0077] Step 403: multiply the transposed second generation matrix by the first column matrix determined by the processed original information, and determine the CRC check code based on the second column matrix obtained after the multiplication.
[0078] Since each column in the second generation matrix corresponds to a bit of the CRC check code, it means that each bit of the CRC check code can be calculated separately without affecting each other, so it can be calculated in parallel during hardware implementation, thereby greatly reducing the delay. In the process of multiplying the transposed second generation matrix with the first column matrix determined by the processed original information, the calculations between different columns in the second generation matrix are independent, that is, the multiplication process can be implemented by parallel calculation.
[0079] That is to say, each bit of the CRC check code has a corresponding generator matrix, and each bit of the CRC check code can be calculated separately based on the corresponding generator matrix, that is, the CRC check codes of each bit can be calculated in parallel. For example, the generator matrix corresponding to the first check code in the CRC check code is the first row in the transposed second generator matrix, and the generator matrix corresponding to the second check code in the CRC check code is the second row in the transposed second generator matrix, and so on. Each row element in the transposed second generator matrix is multiplied with the column matrix corresponding to the original information to obtain the second column matrix, and then each bit of the check code in the CRC check code is determined based on each element in the second column matrix.
[0080] In some embodiments, based on the second column matrix obtained after multiplication, the process of determining the CRC check code may include: for the jth element in the second column matrix, performing a modulo-2 modulus operation on the jth element, and determining the result after the modulo operation as the jth check code in the CRC check code, where j is a positive integer less than or equal to N, and splicing each check code to obtain the CRC check code.
[0081] According to the method for generating a CRC check code according to an embodiment of the present invention, the second generating matrix is transposed to obtain a transposed second generating matrix; the original information is processed according to the communication protocol of the channel type to obtain processed original information; the transposed second generating matrix is multiplied by the first column matrix determined by the processed original information, and a CRC check code is determined based on the second column matrix obtained after the multiplication. Since in the process of multiplying the transposed second generating matrix by the first column matrix determined by the processed original information, the calculation process of each row in the transposed second generating matrix is independent, it shows that each bit in the CRC check code can be calculated separately, and parallel calculation of the CRC check code can be realized, thereby reducing the time delay of CRC check code calculation.
[0082] Next, taking the scenario of transmitting DCI information on the PDCCH channel as an example, the method for generating a CRC check code will be introduced.
[0083] If the length of the CRC check code in this scenario is 24, the implementation process for determining the first generating matrix includes: based on the original information length threshold L = 60, the channel type, and the CRC generating polynomial, determining that the number of rows M of the first generating matrix is M = 60 + 24 = 84; splicing an M - order identity matrix and an M×N zero matrix to obtain a base matrix of 84×108; determining the binary data corresponding to the CRC generating polynomial and performing reverse processing on it to obtain reverse binary data 1110100010001101010011011; dividing each row element in the base matrix by the reverse binary data in accordance with the modulo operation to obtain the remainder corresponding to each row element; for the remainder corresponding to the i - th row element in the base matrix, first perform reverse processing on it to obtain the reverse remainder corresponding to the i - th row element; if the number of digits P of the remainder corresponding to the i - th row element is P = N, taking the reverse remainder corresponding to the i - th row element as the i - th row element of the first generating matrix; if P < N, supplementing Z zeros in front of the reverse remainder corresponding to the i - th row element, and taking the supplemented result as the i - th row element of the first generating matrix; where Z = N - P.
[0084] The implementation process for generating a CRC check code in this scenario includes: determining the length S of the original information; based on the length S of the original information, determining that the index of the second generating matrix is the (L - S + 1) - th row to the M - th row in the first generating matrix; determining the (L - S + 1) - th row to the M - th row in the second generating matrix as the second generating matrix; transposing the second generating matrix to obtain a transposed second generating matrix; supplementing 24 1s in front of the original information to obtain processed original information; multiplying the transposed second generating matrix by the first column matrix determined by the processed original information to obtain a second column matrix; performing modulo - 2 remainder operation on each element in the second column matrix to obtain a CRC check code.
[0085] Next, the generating device for CRC check codes provided by the present invention will be introduced.
[0086] Figure 5 It is a schematic structural diagram of the generating device for CRC check codes provided by an embodiment of the present invention. As Figure 5 shown, the device includes: a first determination module 510, a second determination module 520, and a third determination module 530. The first determination module 510 is configured to determine the length of the original information; the second determination module 520 is configured to determine a second generation matrix based on the length of the original information and a first generation matrix corresponding to the channel type to which the original information belongs; wherein, the first generation matrix is a matrix determined based on an original information length threshold, the channel type, and a CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; the third determination module 530 is configured to determine the CRC check code corresponding to the original information based on the original information and the second generation matrix; wherein each column in the second generation matrix corresponds to one check code in the CRC check code.
[0087] In some embodiments, the device further includes a fourth determination module 540. The fourth determination module 540 is configured to: determine the number of rows M of the first generation matrix based on the original information length threshold, the channel type, and the CRC generation polynomial; splice an M-order identity matrix and an M×N zero matrix to obtain an M×T basis matrix; wherein T = M + N; determine the binary data corresponding to the CRC generation polynomial, and perform a reverse order process on the binary data to obtain reverse order binary data; divide each row element in the basis matrix by the reverse order binary data in a modulo operation manner to obtain the remainder corresponding to each row element; determine the first generation matrix based on the remainder corresponding to each row element.
[0088] In some embodiments, the fourth determination module 540 is further configured to: for the remainder corresponding to the i-th row element in the basis matrix, perform a reverse order process on the remainder corresponding to the i-th row element to obtain the reverse order remainder corresponding to the i-th row element; wherein i is a positive integer less than or equal to M; determine the number of digits P of the remainder corresponding to the i-th row element; if P = N, use the reverse order remainder corresponding to the i-th row element as the i-th row element of the first generation matrix; if P < N, supplement Z zeros in front of the reverse order remainder corresponding to the i-th row element, and use the supplemented result as the i-th row element of the first generation matrix; wherein Z = N - P.
[0089] In some embodiments, the second determination module 520 is further used to: determine the index of the second generation matrix based on the length of the original information; and determine the second generation matrix from the first generation matrix based on the index.
[0090] In some embodiments, the third determination module 530 is also used to: transpose the second generation matrix to obtain a transposed second generation matrix; process the original information according to the communication protocol of the channel type to obtain the processed original information; multiply the transposed second generation matrix by the first column matrix determined by the processed original information, and determine the CRC check code based on the second column matrix obtained after the multiplication.
[0091] In some embodiments, the third determination module 530 is also used to: perform a modulo-2 remainder operation on the jth element in the second column matrix, and determine the result of the remainder operation as the jth check code in the CRC check code; where j is a positive integer less than or equal to N.
[0092] According to the CRC check code generation device of the embodiment of the present invention, the first determination module is used to determine the length of the original information; the second determination module is used to determine the second generation matrix based on the length of the original information and the first generation matrix corresponding to the channel type to which the original information belongs; the third determination module is used to determine the CRC check code corresponding to the original information based on the original information and the second generation matrix; wherein each column in the second generation matrix corresponds to a check code in the CRC check code. The present invention generates the CRC check code based on the generation matrix, and each column in the second generation matrix corresponds to a check code in the CRC check code, indicating that each bit in the CRC check code can be calculated separately, and the parallel calculation of the CRC check code can be realized, thereby reducing the delay of the CRC check code calculation.
[0093] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the computer program in the memory 630 to execute the steps of the CRC check code generation method provided in the above embodiments.
[0094] Specifically, it includes: determining the length of the original information; determining the second generation matrix based on the length of the original information and the first generation matrix corresponding to the channel type to which the original information belongs; wherein the first generation matrix is a matrix determined based on the original information length threshold, the channel type and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; based on the original information and the second generation matrix, determining the CRC check code corresponding to the original information; wherein each column in the second generation matrix corresponds to a check code in the CRC check code.
[0095] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0096] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the CRC check code generation method provided in the above embodiments.
[0097] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for generating a CRC check code provided in the above embodiments is implemented.
[0098] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0099] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a CRC check code, characterized in that: including: Determine the length of the original information; Based on the length of the original information and a first generating matrix corresponding to the channel type to which the original information belongs, determine a second generating matrix; wherein, the first generating matrix is a matrix determined based on an original information length threshold, the channel type, and a CRC generating polynomial; the first generating matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generating polynomial, and M is greater than or equal to the original information length threshold; the second generating matrix is a Q×N matrix, Q is greater than or equal to the length of the original information and Q is less than or equal to M; Based on the original information and the second generating matrix, determine the CRC check code corresponding to the original information; wherein, each column in the second generating matrix respectively corresponds to one check code in the CRC check code.
2. The method according to claim 1, characterized in that The first generating matrix is pre-determined by the following method: Based on the original information length threshold, the channel type, and the CRC generating polynomial, determine the number of rows M of the first generating matrix; Concatenate an M-order identity matrix and an M×N zero matrix to obtain an M×T basis matrix; wherein, T = M + N; Determine the binary data corresponding to the CRC generating polynomial, and perform a reverse order process on the binary data to obtain reverse order binary data; According to the modulo operation method, divide each row element in the basis matrix by the reverse order binary data respectively to obtain the remainder corresponding to each row element; Based on the remainder corresponding to each row element, determine the first generating matrix.
3. The method according to claim 2, characterized in that The determining the first generating matrix based on the remainder corresponding to each row element includes: For the remainder corresponding to the i-th row element in the basis matrix, perform a reverse order process on the remainder corresponding to the i-th row element to obtain the reverse order remainder corresponding to the i-th row element; wherein i is a positive integer less than or equal to M; Determine the number of digits P of the remainder corresponding to the i-th row element; If P = N, use the reverse order remainder corresponding to the i-th row element as the i-th row element of the first generating matrix; If P < N, supplement Z zeros in front of the reverse order remainder corresponding to the i-th row element, and use the supplemented result as the i-th row element of the first generating matrix; wherein Z = N - P.
4. The method according to claim 1, characterized in that: The determining the second generating matrix based on the length of the original information and a first generating matrix corresponding to the channel type to which the original information belongs includes: Based on the length of the original information, determine the index of the second generating matrix; Based on the index, determine the second generating matrix from the first generating matrix.
5. The method according to any one of claims 1 to 4, characterized in that The determining the CRC check code corresponding to the original information based on the original information and the second generating matrix includes: Perform a transpose process on the second generating matrix to obtain the transposed second generating matrix; According to the communication protocol of the channel type, process the original information to obtain the processed original information; Multiply the transposed second generating matrix by the first column matrix determined by the processed original information, and based on the obtained second column matrix, determine the CRC check code.
6. The method according to claim 5, characterized in that The determining the CRC check code based on the second column matrix obtained after the multiplication includes: For the j-th element in the second column matrix, a modulo-2 modulo operation is performed on the j-th element, and the result after the modulo operation is determined as the j-th check code in the CRC check code; wherein j is a positive integer less than or equal to N.
7. A CRC check code generation device, characterized in that: include: A first determination module, used to determine the length of the original information; A second determination module is used to determine a second generation matrix based on the length of the original information and the first generation matrix corresponding to the channel type to which the original information belongs; wherein the first generation matrix is a matrix determined based on the original information length threshold, the channel type and the CRC generation polynomial; the first generation matrix is an M×N matrix, N is the CRC check code length corresponding to the CRC generation polynomial, and M is greater than or equal to the original information length threshold; the second generation matrix is a Q×N matrix, Q is greater than or equal to the length of the original information, and Q is less than or equal to M; The third determination module is used to determine the CRC check code corresponding to the original information based on the original information and the second generation matrix; wherein each column in the second generation matrix corresponds to a check code in the CRC check code.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for generating a CRC check code according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a CRC check code according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a CRC check code according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Information sending method and apparatus, and information receiving method and apparatus
CN107636974A
Verification method and device, decoder, receiver and computer storage medium
CN111600613A