A kind of coding and decoding method and device of data block

文档序号:1775028 发布日期:2019-12-03 浏览:8次 中文

阅读说明:本技术 一种数据块的编译码方法及装置 (A kind of coding and decoding method and device of data block ) 是由 李庆华 王希 王文静 于 2018-05-25 设计创作,主要内容包括:本发明涉及计算机技术,特别涉及一种数据块的编译码方法及装置,用以解决编译码过程中存在的数据缓存量大,处理时延较大的问题。该方法为:在编码阶段,采用了并行方式进行CB级的CRC编码,以及采用迭代方式进行TB级的CRC编码,从而有效提高了编码速度,降低处理时延,而在译码阶段,确定各个数据块通过CB级的CRC校验后,仅保留每个数据块的摘要信息,以完成最终的TB级的CRC检验,从而有效降低缓存数据量,同时也降低了处理时延。(The present invention relates to computer technology, in particular to the coding and decoding method and device of a kind of data block are big to existing data buffer storage amount during solving coding and decoding, the larger problem of processing delay.This method are as follows: in coding stage, CB grades of CRC coding is carried out using parallel mode, and processing delay is reduced to effectively increase coding rate using the CRC coding that iterative manner carries out TB grades, and in the decoding stage, after determining each data block by CB grades of CRC check, only retain the summary info of each data block, to complete the CRC check of final TB grade, to which buffer data size be effectively reduced, while also reducing processing delay.)

1. a kind of coding method of data block characterized by comprising

Transmitting terminal obtains object transmission data, and the object transmission data are divided into n data block, wherein the target Transmitting includes initial transmission data in data, and the entirety circulation for carrying out transmission block TB grades for the initial transmission data is superfluous Remaining check (CRC) coding, obtains corresponding TB grades of cyclic redundancy check;

Transmitting terminal is directed to the 1st to (n-1)th data block, and the parallel CRC coding for carrying out encoding block CB grades obtains corresponding CB The cyclic redundancy check of grade, and the CRC coding that the 1st to (n-1)th data block carries out TB grades is successively directed to using iterative manner, Obtain corresponding TB grades of cyclic redundancy check;

Transmitting terminal is directed to nth data block, carries out TB grade of CRC and encodes, obtains corresponding TB grades of cyclic redundancy check, and according to Corresponding TB grades of the cyclic redundancy check of the nth data block carries out CB grade of CRC coding for the nth data block, obtains Obtain corresponding CB grades of cyclic redundancy check.

2. the method as described in claim 1, which is characterized in that the transmitting terminal is successively directed to the 1st extremely using iterative manner (n-1)th data block carries out TB grades of CRC coding, obtains corresponding TB grades of cyclic redundancy check, comprising:

When carrying out TB grades of CRC coding for i-th of data block, after the CRC that TB grades are carried out for i-1 data block is encoded The cyclic redundancy check of the TB grade of acquisition, the cyclic redundancy check initial value of the TB grade as i-th of data block, with i-th of data block one The CRC coding for playing TB grades of progress, obtains the cyclic redundancy check of final TB grade, wherein 1≤i≤n-1.

3. method according to claim 1 or 2, which is characterized in that the transmitting terminal is directed to nth data block, carries out TB grades CRC coding, obtain corresponding TB grades of cyclic redundancy check, comprising:

The transmitting terminal obtains in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Portion transfers data;

The transmitting terminal for the portion transfers data and (n-1)th data block it is corresponding TB grades _ cyclic redundancy check, The CRC coding for carrying out TB grades, obtains corresponding TB grades of cyclic redundancy check.

4. method as claimed in claim 3, which is characterized in that the transmitting terminal is according to the corresponding TB of the nth data block The cyclic redundancy check of grade, the CRC for carrying out CB grades for the nth data block are encoded, and obtain corresponding CB grades of cyclic redundancy check, Include:

The transmitting terminal obtains in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Portion transfers data;

The transmitting terminal for the portion transfers data and the nth data block it is corresponding TB grades _ cyclic redundancy check, into The CRC coding that CB grades of row, obtains corresponding CB grades of check code.

5. method according to claim 1 or 2, which is characterized in that the transmitting terminal is carrying out TB to the nth data block After the CRC coding and CB grades of CRC coding of grade, further comprise:

The object transmission data that coding is finished, are sent to receiving end.

6. a kind of interpretation method of data block is applied to coding method as described in claim 1 characterized by comprising

Receiving end is for the 1st for including in received object transmission data to nth data block, respectively according to corresponding coding CB grades of block of all cyclic redundancy check (CRC) check codes carry out CB grades of CRC check;

The receiving end determine described 1st to nth data block by CB grades of CRC check after, at least abandon the 1st extremely Transmission data in (n-1)th data block, and for described 1st to nth data block, respectively according to corresponding transmission block TB grades of cyclic redundancy check carries out TB grades of CRC check.

7. method as claimed in claim 6, which is characterized in that further comprise:

When the receiving end determines any one data block not by CB grades of CRC check, notice receiving end transmit again described in Any one data block, and receive transmit again described in after any one data block, update any one described data Corresponding CB grades of the cyclic redundancy check of block, and update corresponding TB grades of the cyclic redundancy check of any one described data block.

8. method according to claim 6 or 7, which is characterized in that the receiving end is for described 1st to nth data Block carries out TB grades of CRC check according to corresponding transmission block TB grades of cyclic redundancy check respectively, comprising:

The receiving end abandons the transmission data in the 1st to (n-1)th data block, and abandons described 1st to n-th Corresponding CB grades of the cyclic redundancy check of data block;

Receiving end TB grade of CRC corresponding to the 1st to (n-1)th data block splices, and is based on after splicing The check code of TB grade carry out TB grade of CRC check, the initial CRC check result of TB grades of acquisition;

The receiving end splices described TB grades of initial CRC check result with nth data block, and is directed to splicing result TB grades of CRC check is carried out, TB grades of target CRC check result is obtained;

When the receiving end determines that the target CRC check result is zero, determine that the object transmission data pass through TB grades of CRC Verification.

9. method according to claim 8, which is characterized in that further comprise:

If the receiving end determines that the target CRC check result is not zero, it is whole to notify that TB grades of receiving end progress is transmitted again A object transmission data.

10. a kind of code device of data block characterized by comprising

First coding unit is divided into n data block for obtaining object transmission data, and by the object transmission data, In, it include initial transmission data in the object transmission data, and carry out transmission block TB grades for the initial transmission data All cyclic redundancy check (CRC)s coding, obtain corresponding TB grades of cyclic redundancy check;

Second coding unit, for being directed to the 1st to (n-1)th data block, the parallel CRC coding for carrying out encoding block CB grades is obtained Corresponding CB grades of cyclic redundancy check is obtained, and the 1st to (n-1)th data block is successively directed to using iterative manner and carries out TB grades CRC coding, obtain corresponding TB grades of cyclic redundancy check;

Third coding unit carries out TB grades of CRC coding, obtains corresponding TB grades of the school CRC for being directed to nth data block Code is tested, and according to corresponding TB grades of the cyclic redundancy check of the nth data block, carries out CB grades for the nth data block CRC coding, obtains corresponding CB grades of cyclic redundancy check.

11. a kind of code translator of data block is applied to code device as claimed in claim 10 characterized by comprising

First decoding unit, for for the 1st for including in received object transmission data to nth data block, difference root CB grades of CRC check is carried out according to corresponding encoding block CB grades of all cyclic redundancy check (CRC) check codes;

Second decoding unit, for receiving end determine described 1st to nth data block by CB grades of CRC check after, lose The transmission data in the 1st to (n-1)th data block are abandoned, and for described 1st to nth data block, respectively according to corresponding TB grades of transmission block of cyclic redundancy check carry out TB grades of CRC check.

12. a kind of storage medium, which is characterized in that be stored with the program of the coding for realizing data block, described program is located When managing device operation, following steps are executed:

Object transmission data are obtained, and the object transmission data are divided into n data block, wherein the object transmission number Include initial transmission data in, and carries out transmission block TB grades of all cyclic redundancy check for the initial transmission data CRC coding, obtains corresponding TB grades of cyclic redundancy check;

For the 1st to (n-1)th data block, the parallel CRC coding for carrying out encoding block CB grades obtains corresponding CB grades of CRC Check code, and the CRC coding that the 1st to (n-1)th data block carries out TB grades is successively directed to using iterative manner, obtain phase The cyclic redundancy check for the TB grade answered;

For nth data block, TB grades of CRC coding is carried out, obtains corresponding TB grades of cyclic redundancy check, and according to described n-th Corresponding TB grades of the cyclic redundancy check of a data block, the CRC for carrying out CB grade for the nth data block are encoded, are obtained accordingly CB grades of cyclic redundancy check.

13. a kind of communication device, which is characterized in that including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is by one or more When a processor executes, so that described device executes the method as described in any one of claims 1 to 5.

14. a kind of storage medium, which is characterized in that be applied to storage medium as claimed in claim 12, be stored with for counting According to the program of the decoding of block, when described program is run by processor, following steps are executed:

For the 1st for including in received object transmission data to nth data block, respectively according to corresponding encoding block CB grades All cyclic redundancy check (CRC) check codes carry out CB grades of CRC check;

Determine described 1st to nth data block by CB grades of CRC check after, at least abandon the 1st to (n-1)th number According to the transmission data in block, and for described 1st to nth data block, respectively according to corresponding transmission block TB grades of the school CRC Test the CRC check that code carries out TB grades.

15. a kind of communication device, which is characterized in that including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is by one or more When a processor executes, so that described device executes the method as described in any one of claim 6 to 9.

Technical field

The present invention relates to computer technology, in particular to the coding and decoding method and device of a kind of data block.

Background technique

In the data transmission system of transmission, transmitting terminal would generally be carried out data transmission using layered mode, i.e., each Specific verification is added in the transmission data of layer and therefore, receiving end is in processing, it usually needs in the complete of high level caching low layer Portion's data, for the verification of this layer, this will necessarily bring data buffer storage amount big, the larger problem of processing delay.

For example, transmitting terminal first can carry out all cyclic redundancy check to initial transmission data for cataloged procedure (Cyclic Redundancy Check, CRC) coding, and add transmission block (Transfer Block, TB) after the data is transferred The cyclic redundancy check of grade obtains object transmission data, then, then is segmented to object transmission data, and is directed to every one piece of data CRC coding is carried out again, obtains the cyclic redundancy check of every one piece of data encoding block (Code Block, CB) grade respectively, then, then into Row transmission.This processing mode needs twice of CRC handling duration, data buffer storage amount can be caused in an encoding process big, processing The larger problem of time delay.

In another example for decoding process, CRC check of the receiving end to independently carrying out CB grades for every one piece of data, After verification, each segment data can be cached, then, the unified CSC verification for carrying out TB grades.This processing mode can incite somebody to action Received entirety object transmission data are buffered in processing unit always, so that it is big to will also result in data buffer storage amount, when processing Prolong larger problem.

In view of this, needing to design a kind of coding and decoding method of new data block, to overcome drawbacks described above.

Summary of the invention

The embodiment of the present invention provides the coding and decoding method and device of a kind of data block, to solve to exist during coding and decoding Data buffer storage amount it is big, the larger problem of processing delay.

Specific technical solution provided in an embodiment of the present invention is as follows:

A kind of coding method of data block, comprising:

Transmitting terminal obtains object transmission data, and the object transmission data are divided into n data block, wherein described It include initial transmission data in object transmission data, and the entirety for carrying out transmission block TB grades for the initial transmission data is followed Ring redundancy check CRC coding, obtains corresponding TB grades of cyclic redundancy check;

Transmitting terminal is directed to the 1st to (n-1)th data block, and the parallel CRC coding for carrying out encoding block CB grades obtains corresponding CB grade cyclic redundancy check, and the CRC that the 1st to (n-1)th data block carries out TB grades is successively directed to using iterative manner Coding, obtains corresponding TB grades of cyclic redundancy check;

Transmitting terminal is directed to nth data block, carries out TB grades of CRC coding, obtains corresponding TB grades of cyclic redundancy check, and According to corresponding TB grades of the cyclic redundancy check of the nth data block, the CRC for carrying out CB grades for the nth data block is compiled Code, obtains corresponding CB grades of cyclic redundancy check.

Optionally, the transmitting terminal is successively directed to the 1st to (n-1)th data block using iterative manner and carries out TB grades CRC coding, obtains corresponding TB grades of cyclic redundancy check, comprising:

When carrying out TB grades of CRC coding for i-th of data block, the CRC that TB grades are carried out for i-1 data block is compiled The cyclic redundancy check of the TB grade obtained after code, the cyclic redundancy check initial value of the TB grade as i-th of data block, with i-th of data Block carries out TB grades of CRC coding together, obtains the cyclic redundancy check of final TB grade, wherein 1≤i≤n-1.

Optionally, the transmitting terminal is directed to nth data block, carries out TB grades of CRC coding, obtains corresponding TB grades Cyclic redundancy check, comprising:

The transmitting terminal obtains in the nth data block in addition to corresponding TB grades of the cyclic redundancy check of object transmission data Except portion transfers data;

The transmitting terminal for the portion transfers data and (n-1)th data block it is corresponding TB grades _ school CRC Code is tested, TB grades of CRC coding is carried out, obtains corresponding TB grades of cyclic redundancy check.

Optionally, the transmitting terminal is according to corresponding TB grades of the cyclic redundancy check of the nth data block, for described n-th A data block carries out CB grades of CRC coding, obtains corresponding CB grades of cyclic redundancy check, comprising:

The transmitting terminal obtains in the nth data block in addition to corresponding TB grades of the cyclic redundancy check of object transmission data Except portion transfers data;

The transmitting terminal for the portion transfers data and the nth data block it is corresponding TB grades _ CRC check Code carries out CB grades of CRC coding, obtains corresponding CB grades of check code.

Optionally, the transmitting terminal is compiled in the CRC coding and CB grades of CRC for carrying out TB grades to the nth data block After code, further comprise:

The object transmission data that coding is finished, are sent to receiving end.

A kind of interpretation method of data block is applied to above-mentioned coding method, comprising:

Receiving end is for the 1st for including in received object transmission data to nth data block, respectively according to corresponding CB grades of encoding block of all cyclic redundancy check (CRC) check codes carry out CB grades of CRC check;

The receiving end determine described 1st to nth data block by CB grades of CRC check after, at least abandon the 1st Transmission data in a to (n-1)th data block, and for described 1st to nth data block, it is passed respectively according to corresponding Defeated piece TB grades of cyclic redundancy check carries out TB grades of CRC check.

Optionally, further comprise:

When the receiving end determines any one data block not by CB grades of CRC check, notice receiving end is transmitted again Any one described data block, and receive transmit again described in after any one data block, update it is described any one Corresponding CB grades of the cyclic redundancy check of data block, and update corresponding TB grades of the cyclic redundancy check of any one described data block.

Optionally, the receiving end is directed to described 1st to nth data block, respectively according to corresponding transmission block TB grades Cyclic redundancy check carry out TB grades of CRC check, comprising:

The receiving end abandons the transmission data in the 1st to (n-1)th data block, and abandons described 1st to the Corresponding CB grades of the cyclic redundancy check of n data block;

Receiving end TB grade of CRC corresponding to the 1st to (n-1)th data block splices, and based on spelling The check code of TB grade after connecing carries out TB grades of CRC check, obtains TB grades of initial CRC check result;

The receiving end splices described TB grades of initial CRC check result with nth data block, and for splicing As a result the CRC check for carrying out TB grades, obtains TB grades of target CRC check result;

When the receiving end determines that the target CRC check result is zero, determine the object transmission data by TB grades CRC check.

Optionally, further comprise:

If the receiving end determines that the target CRC check result is not zero, receiving end is notified to carry out TB grades and pass again Defeated entire object transmission data.

A kind of code device of data block, comprising:

First coding unit is divided into n data for obtaining object transmission data, and by the object transmission data Block, wherein include initial transmission data in the object transmission data, and carry out transmission block for the initial transmission data TB grades of all cyclic redundancy check (CRC)s coding, obtains corresponding TB grades of cyclic redundancy check;

Second coding unit, for being directed to the 1st to (n-1)th data block, the parallel CRC for carrying out encoding block CB grades is compiled Code, obtains corresponding CB grade of cyclic redundancy check, and use iterative manner be successively directed to the 1st to (n-1)th data block into The CRC coding that TB grades of row, obtains corresponding TB grades of cyclic redundancy check;

Third coding unit carries out TB grades of CRC coding, obtains corresponding TB grades for being directed to nth data block Cyclic redundancy check, and according to corresponding TB grades of the cyclic redundancy check of the nth data block, it is carried out for the nth data block CB grades of CRC coding, obtains corresponding CB grades of cyclic redundancy check.

Optionally, it is successively directed to the CRC coding that the 1st to (n-1)th data block carries out TB grades using iterative manner, obtains When obtaining corresponding TB grades of cyclic redundancy check, second coding unit is used for:

When carrying out TB grades of CRC coding for i-th of data block, the CRC that TB grades are carried out for i-1 data block is compiled The cyclic redundancy check of the TB grade obtained after code, the cyclic redundancy check initial value of the TB grade as i-th of data block, with i-th of data Block carries out TB grades of CRC coding together, obtains the cyclic redundancy check of final TB grade, wherein 1≤i≤n-1.

Optionally, described to be directed to nth data block, TB grades of CRC coding is carried out, corresponding TB grades of CRC check is obtained When code, the third coding unit is used for:

Obtain the part in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Transmit data;

For the portion transfers data and (n-1)th data block it is corresponding TB grades _ cyclic redundancy check, carry out TB The CRC coding of grade, obtains corresponding TB grades of cyclic redundancy check.

Optionally, described according to corresponding TB grades of the cyclic redundancy check of the nth data block, for the nth data Block carries out CB grades of CRC coding, and when obtaining corresponding CB grades of cyclic redundancy check, the third coding unit is used for:

Obtain the part in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Transmit data;

For the portion transfers data and the nth data block it is corresponding TB grades _ cyclic redundancy check, carry out CB grades CRC coding, obtain corresponding CB grades of check code.

Optionally, the third coding unit is further used for:

After carrying out TB grades of CRC coding and CB grades of CRC coding to the nth data block, coding is finished The object transmission data, be sent to receiving end.

A kind of code translator of data block is applied to above-mentioned code device, comprising:

First decoding unit, for dividing for the 1st for including in received object transmission data to nth data block CB grades of CRC check is not carried out according to corresponding encoding block CB grades of all cyclic redundancy check (CRC) check codes;

Second decoding unit, for receiving end determine described 1st to nth data block by CB grades of CRC check Afterwards, the transmission data in the 1st to (n-1)th data block are abandoned, and for described 1st to nth data block, respectively root TB grades of CRC check is carried out according to corresponding transmission block TB grades of cyclic redundancy check.

Optionally, second decoding unit is further used for:

When for determining any one data block not by CB grades of CRC check, described appoint, is transmitted in notice receiving end again Anticipate a data block, and receive transmit again described in after any one data block, update any one described data block Corresponding CB grades of cyclic redundancy check, and update corresponding TB grades of the cyclic redundancy check of any one described data block.

Optionally, for described 1st to nth data block, respectively according to corresponding transmission block TB grades of cyclic redundancy check When carrying out TB grades of CRC check, first decoding unit is used for:

The transmission data in the 1st to (n-1)th data block are abandoned, and abandon described 1st to nth data block Corresponding CB grades of cyclic redundancy check;

TB grade of CRC corresponding to the 1st to (n-1)th data block splices, and is based on spliced TB grades Check code carry out TB grade of CRC check, the initial CRC check result of TB grades of acquisition;

Described TB grades of initial CRC check result is spliced with nth data block, and carries out TB for splicing result The CRC check of grade obtains TB grades of target CRC check result;

When determining that the target CRC check result is zero, determine that the object transmission data pass through TB grades of CRC check.

Optionally, first decoding unit is further used for:

Interactive unit, for when determining that the target CRC check result is not zero, notice receiving end to carry out TB grades again Transmit entire object transmission data.

A kind of storage medium is stored with the program of the coding for realizing data block, when described program is run by processor, Execute following steps:

Object transmission data are obtained, and the object transmission data are divided into n data block, wherein the target passes Include initial transmission data in transmission of data, and carries out transmission block TB grades of all cyclic redundancies for the initial transmission data Check (CRC) coding, obtains corresponding TB grades of cyclic redundancy check;

For the 1st to (n-1)th data block, the parallel CRC coding for carrying out encoding block CB grades is obtained CB grades corresponding Cyclic redundancy check, and the 1st to (n-1)th data block be successively directed to using iterative manner carry out TB grade of CRC and encode, obtain Obtain corresponding TB grades of cyclic redundancy check;

For nth data block, TB grades of CRC coding is carried out, obtains corresponding TB grades of cyclic redundancy check, and according to institute Corresponding TB grades of the cyclic redundancy check of nth data block is stated, the CRC for carrying out CB grades for the nth data block is encoded, and is obtained Corresponding CB grades of cyclic redundancy check.

A kind of communication device, including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is one Or multiple processors are when executing, so that described device executes method described in any of the above embodiments.

A kind of storage medium is stored with the program of the decoding for data block, the journey applied to above-mentioned storage medium When sequence is run by processor, following steps are executed:

For the 1st for including in received object transmission data to nth data block, respectively according to corresponding encoding block CB grades of all cyclic redundancy check (CRC) check codes carry out CB grades of CRC check;

Determine described 1st to nth data block by CB grades of CRC check after, at least abandon the 1st to (n-1)th Transmission data in a data block, and for described 1st to nth data block, respectively according to corresponding transmission block TB grades Cyclic redundancy check carries out TB grades of CRC check.

A kind of communication device, including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is one Or multiple processors are when executing, so that described device executes method described in any of the above embodiments.

The present invention has the beneficial effect that:

In the embodiment of the present invention, in coding stage, after object transmission data are divided into n data block by transmitting terminal, for Preceding n-1 data block, respective independent parallel carries out CB grades of CRC coding, and is compiled using the CRC that iterative manner carries out TB grades Code, and nth data block then first carry out TB grade of CRC coding, then, then carry out CB grades of CRC and encode.In this way, due to part Cataloged procedure uses parallel mode and iterative manner is handled, to effectively increase coding rate, reduces processing delay.

And in the decoding stage, receiving end carries out independent CB grades of CRC check and TB grades of CRC for each data block Verification, and TB grades of CRC check is only cached as a result, at least abandoning the transmission data in preceding n-1 data block.In this way, only retaining The CRC check of final TB grade can be completed in the summary info of each data block, so that buffer data size is effectively reduced, while Reduce processing delay.

Detailed description of the invention

Fig. 1 is that transmitting terminal carries out coding flow chart to data block in the embodiment of the present invention;

Fig. 2 is that coding stage data block divides schematic diagram in the embodiment of the present invention;

Fig. 3 is that receiving end carries out decoding flow chart to data block in the embodiment of the present invention;

Fig. 4 is that decoding phase data block divides schematic diagram in the embodiment of the present invention;

Fig. 5 is transmitting terminal illustrative view of functional configuration in the embodiment of the present invention;

Fig. 6 is receiving end illustrative view of functional configuration in the embodiment of the present invention.

Specific embodiment

In order to solve coding and decoding, existing data buffer storage amount is big in the process, and the larger problem of processing delay, the present invention is implemented In example, in coding stage parallel independent process, in the decoding stage, the CRC check of segmentation is only saved as a result, without caching original biography Transmission of data reduces processing delay to reduce the reduction of data buffer storage amount.

Further description is made to the preferred embodiment of the present invention with reference to the accompanying drawing.

In the embodiment of the present invention, in coding stage, object transmission data can be divided into n data block by transmitting terminal, and The 1st to (n-1)th data block in addition to the last one data block, the parallel CRC coding for carrying out TB grades and CB grades of CRC are compiled Code generates corresponding CB grades of check code and TB grades of check code for nth data block, is then based on the 1st to (n-1)th The cyclic redundancy check and TB grades of cyclic redundancy check of the CB grade of a data block, the CRC coding and CB grades of CRC for carrying out TB grades encode, Obtain the cyclic redundancy check and TB grades of cyclic redundancy check of the CB grade of nth data block.

Specifically, as shown in fig.1, transmitting terminal is directed to the detailed process that data block is encoded in the embodiment of the present invention It is as follows:

Step 100: initial transmission data (i.e. TB) is carried out CRC coding by transmitting terminal, obtains corresponding TB grades of CRC check Code, referred to as TB_CRC, and the TB_CRC of acquisition is merged with initial transmission data, obtain object transmission data.

For example, as shown in fig.2, assuming that the length of initial transmission data (i.e. TB) is A bits, the CRC of TB grades of progress is compiled After code, after initial transmission data is merged with TB_CRC, the length of object transmission data is B bits.

Step 110: object transmission data are divided into n data block by transmitting terminal.

For example, as shown in fig.2, object transmission data are divided into n data block by transmitting terminal, wherein each data segment Data length be K bits.

Step 120: transmitting terminal is directed to the 1st to (n-1)th data block, carries out CB grades for each data block parallel CRC coding, obtain corresponding CB grades of cyclic redundancy check, referred to as CB_CRC.

Step 130: transmitting terminal is directed to the 1st to (n-1)th data block, and the 1st to the is successively directed to using iterative manner N-1 data block carries out TB grades of CRC coding, obtains corresponding TB grades of cyclic redundancy check, abbreviation TB_CRC '.

Wherein, the so-called CRC coding for being successively directed to each data block using iterative manner and carrying out TB grades, is referred to: being used Serial pipeline mode will be directed to i-1 data when encoding for the CRC that i-th of data block (1≤i≤n-1) carries out TB grades The cyclic redundancy check of TB grade that the CRC that block carries out TB grade is obtained after encoding, at the beginning of the cyclic redundancy check as the TB grade of i-th of data block Initial value carries out TB grades of CRC coding together with i-th of data block, obtains the cyclic redundancy check of final TB grade.

In the embodiment of the present invention, transmitting terminal is directed to the 1st to (n-1)th data block, obtains n-1 corresponding TB_ CRC’。

Step 130: transmitting terminal is directed to nth data block, first carries out TB grades of CRC coding, obtains corresponding TB grades of CRC Check code.

Specifically, transmitting terminal is directed to nth data block, first obtain in nth data block in addition to object transmission data are corresponding TB grade cyclic redundancy check (i.e. TB_CRC) except portion transfers data, then for the portion transfers data and described (n-1)th data block it is corresponding TB grades _ cyclic redundancy check (TB_CRC '), carry out TB grade CRC encode, obtain corresponding TB CRC, the abbreviation TB_CRC " of grade,

In the embodiment of the present invention, as shown in fig.2, above-mentioned portion transfers data, that is, refer to and remove in the last one data block The part CB except TB_CRC, since TB_CRC is all CRC schools for carrying out CRC coding and obtaining for initial transmission data Code is tested, therefore, when carrying out CRC coding for the transmission data in last nth data block, first TB_CRC is excluded.

Step 140: transmitting terminal is according to corresponding TB grades of the cyclic redundancy check of the nth data block, for described n-th Data block carries out CB grades of CRC coding, obtains corresponding CB grades of cyclic redundancy check.

Specifically, transmitting terminal can obtain in the nth data block in addition to corresponding TB grades of the school CRC of object transmission data The portion transfers data except code is tested, then, then it is TB grades corresponding for the portion transfers data and the nth data block _ cyclic redundancy check, CB grades of CRC coding is carried out, corresponding CB grades of check code is obtained.

So far, all coding finishes object transmission data, and transmitting terminal can send out the object transmission data after coding Toward receiving end.

Correspondingly, corresponding to above-mentioned cataloged procedure, in the embodiment of the present invention, in the decoding stage, receiving end is to each data Block independently carries out CB grades of CRC check, and in all data blocks by CB grades of CRC check after, abandon related data, then base In the cyclic redundancy check of the TB grade of each data block, TB grades of CRC check is carried out, to only cache TB grades of CRC check result.

Specifically, as shown in fig.3, receiving end is directed to the detailed process that data block is decoded in the embodiment of the present invention It is as follows:

Step 300: receiving end receives encoded object transmission data, includes n number in the object transmission data According to block.

It further, also include corresponding TB grades of the cyclic redundancy check of each data block in the object transmission data (that is, TB_CRC ') and CB grades of cyclic redundancy check (that is, CB_CRC) further further include the corresponding TB of object transmission data The cyclic redundancy check (that is, TB_CRC) of grade.

Step 310: receiving end for the 1st to nth data block, respectively according to corresponding CB grades of cyclic redundancy check into The CRC check that CB grades of row.

It, can be by i-th data block specifically, by taking any one data block (hereinafter referred to as i-th of data block) as an example CB grades of check polynomials are defined as CB_CRC (i), after the CB_CRC of i-th of data block is substituted into CB_CRC (i), if CB_CRC (i) value is 0, it is determined that i-th of data block is correct by CB grades of CRC check, i.e. data block;

When determining any one data block not by CB grades of CRC check, need to notify that transmitting terminal is again described any one A data block, and receive transmit again described in after any one data block, it is corresponding to update any one described data block CB grade cyclic redundancy check, and update corresponding TB grades of the cyclic redundancy check of any one data block.

Step 320: when receiving end determines all n data blocks by CB grades of CRC check, at least abandon it is described before Transmission data in n-1 data block, and for the 1st to nth data block, respectively according to corresponding transmission block TB grades Cyclic redundancy check carries out TB grades of CRC check.

In the embodiment of the present invention, when receiving end only determines all n data blocks by CB grades of CRC check, just meeting Continue TB grades of CRC check, detailed process is as follows:

Firstly, receiving end is directed to the 1st to (n-1)th data block, transmission data therein are abandoned, specifically, refering to Shown in Fig. 4, preceding n-1 data block is set as [0, CB_CRC (i), NULL] by receiving end, optionally, as shown in figure 4, also The 1st to (n-1)th corresponding CB grades of the cyclic redundancy check of data block can be further abandoned, in this way, can be further Reduce buffer data size.

Then, corresponding TB grades of the cyclic redundancy check (i.e. TB_CRC ') of the preceding n-1 data block is spelled in receiving end It connects, and carries out TB grades of CRC check (e.g., using CRC-24A algorithm) based on spliced TB grades of check code, obtain one The initial CRC check of the TB grade of 24bit is as a result, optionally, be denoted as TB_CRC_BUF, then, by described TB grades of the initial school CRC It tests result to be spliced with nth data block, and the CRC check for carrying out TB grades for splicing result (e.g., is calculated using CRC-24A Method), the target CRC check of final TB grade is obtained as a result, optionally, being denoted as TB_CRC_FINAL.

If the value 0 of TB_CRC_FINAL, then it represents that object transmission data are on the whole by TB grades of CRC check, if TB_ The value 0 of CRC_FINAL is not zero, then receiving end needs that transmitting terminal is notified to carry out TB grades of re-transmissions, i.e., transmits entire mesh again Mark transmission data.

Obviously, when carrying out TB grades of CRC check, verification of the receiving end according only to CB grades of CRC check result to TB grades Code is spliced, so as to form the equivalent abstract of complete object transmission data, and by carrying out TB grades to equivalent abstract The whole verification for object transmission data is realized in CRC check.

In the embodiment of the present invention, it is after being spliced described TB grades of initial CRC check result and nth data block, Carry out TB grades of CRC check.Under another implementation, optionally, can also by described TB grades of initial CRC check as a result, With the transmission data in nth data block other than corresponding TB grades of the cyclic redundancy check (that is, TB_CRC) of object transmission data After being spliced, then TB grades of CRC check is carried out, the CRC check result of the TB grade obtained at this time can be denoted as TB_CRC_ FINAL ', if TB_CRC_FINAL is equal to TB_CRC, then it represents that indicate that object transmission data pass through TB grades of the school CRC on the whole It tests, if TB_CRC_FINAL is not equal to TB_CRC, receiving end needs that transmitting terminal is notified to carry out TB grades of re-transmissions, i.e., transmits again whole A object transmission data.

Based on the above embodiment, as shown in fig.5, in the embodiment of the present invention, transmitting terminal includes at least the first coding unit 51, the second coding unit 52 and third coding unit 53, wherein

First coding unit 51 is divided into n data for obtaining object transmission data, and by the object transmission data Block, wherein include initial transmission data in the object transmission data, and carry out transmission block for the initial transmission data TB grades of all cyclic redundancy check (CRC)s coding, obtains corresponding TB grades of cyclic redundancy check;

Second coding unit 52, for being directed to the 1st to (n-1)th data block, the parallel CRC for carrying out encoding block CB grades Coding obtains corresponding CB grades of cyclic redundancy check, and is successively directed to the 1st to (n-1)th data block using iterative manner The CRC coding for carrying out TB grades, obtains corresponding TB grades of cyclic redundancy check;

Third coding unit 53 carries out TB grades of CRC coding, obtains corresponding TB grades for being directed to nth data block Cyclic redundancy check, and according to corresponding TB grades of the cyclic redundancy check of the nth data block, it is carried out for the nth data block CB grades of CRC coding, obtains corresponding CB grades of cyclic redundancy check.

Optionally, it is successively directed to the CRC coding that the 1st to (n-1)th data block carries out TB grades using iterative manner, obtains When obtaining corresponding TB grades of cyclic redundancy check, second coding unit 52 is used for:

When carrying out TB grades of CRC coding for i-th of data block, the CRC that TB grades are carried out for i-1 data block is compiled The cyclic redundancy check of the TB grade obtained after code, the cyclic redundancy check initial value of the TB grade as i-th of data block, with i-th of data Block carries out TB grades of CRC coding together, obtains the cyclic redundancy check of final TB grade, wherein 1≤i≤n-1.

Optionally, described to be directed to nth data block, TB grades of CRC coding is carried out, corresponding TB grades of CRC check is obtained When code, the third coding unit 53 is used for:

Obtain the part in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Transmit data;

For the portion transfers data and (n-1)th data block it is corresponding TB grades _ cyclic redundancy check, carry out TB The CRC coding of grade, obtains corresponding TB grades of cyclic redundancy check.

Optionally, described according to corresponding TB grades of the cyclic redundancy check of the nth data block, for the nth data Block carries out CB grades of CRC coding, and when obtaining corresponding CB grades of cyclic redundancy check, the third coding unit 53 is used for:

Obtain the part in the nth data block other than corresponding TB grades of the cyclic redundancy check of object transmission data Transmit data;

For the portion transfers data and the nth data block it is corresponding TB grades _ cyclic redundancy check, carry out CB grades CRC coding, obtain corresponding CB grades of check code.

Optionally, the third coding unit 53 is further used for:

After carrying out TB grades of CRC coding and CB grades of CRC coding to the nth data block, coding is finished The object transmission data, be sent to receiving end.

Correspondingly, as shown in fig.6, receiving end includes at least the first decoding unit 61 and second in the embodiment of the present invention Decoding unit 62, wherein

First decoding unit 61, for for the 1st for including in received object transmission data to nth data block, CB grades of CRC check is carried out according to corresponding encoding block CB grades of all cyclic redundancy check (CRC) check codes respectively;

Second decoding unit 62, for receiving end determine described 1st to nth data block by CB grades of the school CRC After testing, the transmission data in the 1st to (n-1)th data block are abandoned, and for described 1st to nth data block, respectively TB grades of CRC check is carried out according to corresponding transmission block TB grades of cyclic redundancy check.

Optionally, second decoding unit 62 is further used for:

When for determining any one data block not by CB grades of CRC check, described appoint, is transmitted in notice receiving end again Anticipate a data block, and receive transmit again described in after any one data block, update any one described data block Corresponding CB grades of cyclic redundancy check, and update corresponding TB grades of the cyclic redundancy check of any one described data block.

Optionally, for described 1st to nth data block, respectively according to corresponding transmission block TB grades of cyclic redundancy check When carrying out TB grades of CRC check, first decoding unit 61 is used for:

The transmission data in the 1st to (n-1)th data block are abandoned, and abandon described 1st to nth data block Corresponding CB grades of cyclic redundancy check;

TB grade of CRC corresponding to the 1st to (n-1)th data block splices, and is based on spliced TB grades Check code carry out TB grade of CRC check, the initial CRC check result of TB grades of acquisition;

Described TB grades of initial CRC check result is spliced with nth data block, and carries out TB for splicing result The CRC check of grade obtains TB grades of target CRC check result;

When determining that the target CRC check result is zero, determine that the object transmission data pass through TB grades of CRC check.

Optionally, first decoding unit 61 is further used for:

Interactive unit, for when determining that the target CRC check result is not zero, notice receiving end to carry out TB grades again Transmit entire object transmission data.

The embodiment of the present invention provides a kind of storage medium, is stored with the program of the coding for realizing data block, the journey When sequence is run by processor, following steps are executed:

Object transmission data are obtained, and the object transmission data are divided into n data block, wherein the target passes Include initial transmission data in transmission of data, and carries out transmission block TB grades of all cyclic redundancies for the initial transmission data Check (CRC) coding, obtains corresponding TB grades of cyclic redundancy check;

For the 1st to (n-1)th data block, the parallel CRC coding for carrying out encoding block CB grades is obtained CB grades corresponding Cyclic redundancy check, and the 1st to (n-1)th data block be successively directed to using iterative manner carry out TB grade of CRC and encode, obtain Obtain corresponding TB grades of cyclic redundancy check;

For nth data block, TB grades of CRC coding is carried out, obtains corresponding TB grades of cyclic redundancy check, and according to institute Corresponding TB grades of the cyclic redundancy check of nth data block is stated, the CRC for carrying out CB grades for the nth data block is encoded, and is obtained Corresponding CB grades of cyclic redundancy check.

The embodiment of the present invention provides a kind of communication device, including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is one Or multiple processors are when executing, so that described device executes method described in any of the above embodiments.

The embodiment of the present invention provides a kind of storage medium, applied to above-mentioned storage medium, is stored with for data block The program of decoding when described program is run by processor, executes following steps:

For the 1st for including in received object transmission data to nth data block, respectively according to corresponding encoding block CB grades of all cyclic redundancy check (CRC) check codes carry out CB grades of CRC check;

Determine described 1st to nth data block by CB grades of CRC check after, at least abandon the 1st to (n-1)th Transmission data in a data block, and for described 1st to nth data block, respectively according to corresponding transmission block TB grades Cyclic redundancy check carries out TB grades of CRC check.

The embodiment of the present invention provides a kind of communication device, including one or more processors;And

One or more computer-readable mediums are stored with instruction on the readable medium, and described instruction is one Or multiple processors are when executing, so that described device executes method described in any of the above embodiments.

In conclusion, in coding stage, object transmission data are divided into n data by transmitting terminal in the embodiment of the present invention After block, for preceding n-1 data block, respective independent parallel carries out CB grades of CRC coding, and carries out TB using iterative manner The CRC coding of grade, and nth data block then first carry out TB grade of CRC coding, then, then carry out CB grades of CRC and encode.This Sample, to effectively increase coding rate, is dropped since code segment process is handled using parallel mode and iterative manner Reduction process time delay.

And in the decoding stage, receiving end carries out independent CB grades of CRC check and TB grades of CRC for each data block Verification, and TB grades of CRC check is only cached as a result, at least abandoning the transmission data in preceding n-1 data block.In this way, only retaining The CRC check of final TB grade can be completed in the summary info of each data block, so that buffer data size is effectively reduced, while Reduce processing delay.

It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.

The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.

These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.

These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.

Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.

Obviously, those skilled in the art can carry out various modification and variations without departing from this hair to the embodiment of the present invention The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention And its within the scope of equivalent technologies, then the present invention is also intended to include these modifications and variations.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种确定传输优先级的方法、装置和计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类