Abstract:
Embodiments of the present invention disclose a data decoding method and apparatus, relate to the field of wireless communications, and can improve a resource utilization rate in a decoding process, thereby improving decoding efficiency. The method of the present invention includes: dividing a to-be-decoded data transport block into N code blocks, where N is an integer greater than or equal to 2; and decoding the N code blocks in parallel according to a reverse direction of encoding. The present invention is applicable to data decoding.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority to Chinese Patent Application No. 201210076498.0, filed on Mar. 21, 2012, which is hereby incorporated by reference in its entirety. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to the field of wireless communications, and in particular, to a data decoding method and apparatus. 
       BACKGROUND OF THE INVENTION 
       [0003]    With the rapid development of wireless communication technologies, data traffic in a wireless network is gradually increased, resulting in an increasing amount of data to be decoded by a mobile terminal within a unit time, so the mobile terminal is required to decode the data in a more high-efficient decoding manner. 
         [0004]    An existing decoding manner is mainly stepwise decoding, for example: 
         [0005]    An HS-DSCH (High Speed Downlink Shared Channel, high speed downlink shared channel) is a channel that is applied in WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), and a decoding manner on the HS-DSCH substantially is: dividing execution steps involved in a whole decoding process into multiple decoding units having a certain sequence, and at the same time, dividing to-be-decoded data into multiple transport blocks (Transport Block). As shown in  FIG. 1 , in a decoding process of WCDMA, a transport block is placed in a decoding unit  1  first, and the decoding unit  1  performs data decoding on the transport block by using a corresponding decoding resource (a hardware device, and so on); after completing decoding, the decoding unit  1  transfers the transport block that has undergone data decoding to a decoding unit  2  for data decoding, and at the same time, the decoding unit  1  starts to decode a next transport block, that is, after a previous decoding unit completes decoding of a whole transport block, a next decoding unit starts to work, till a transport block is decoded by all decoding units, and after all transport blocks have been decoded by all the decoding units, data decoding is ended. During the data decoding, time required for each decoding unit to perform data decoding is different, when a decoding unit that requires a long time decodes a transport block, if a next decoding unit has already completed data decoding on a previous transport block, the next decoding unit enters a wait state before receiving a transport block transferred by the previous decoding unit. 
         [0006]    The prior art at least has the following problems: 
         [0007]    By adopting the existing stepwise decoding manner, only after being decoded by a previous decoding unit, data of each transport block can continue to be decoded by a next decoding unit. Because time required for each decoding unit to perform data decoding is different, when a decoding unit requiring a long time decodes a transport block, a subsequent decoding unit gets into an idle situation or a waiting situation, resulting in a low decoding resource utilization rate and low decoding efficiency. 
       SUMMARY OF THE INVENTION 
       [0008]    Embodiments of the present invention provide a data decoding method and apparatus, which can improve a resource utilization rate in a decoding process, thereby improving decoding efficiency. 
         [0009]    In order to achieve the foregoing objectives, the embodiments of the present invention adopt the following technical solutions: 
         [0010]    In one aspect, an embodiment of the present invention provides a data decoding method, including: 
         [0011]    dividing a to-be-decoded data transport block into N code blocks, where N is an integer greater than 2; and 
         [0012]    decoding the N code blocks in parallel according to a reverse direction of encoding. 
         [0013]    In another aspect, an embodiment of the present invention provides a data decoding apparatus, including: 
         [0014]    a transport block division module, configured to divide a to-be-decoded data transport block into N code blocks, where N is an integer greater than 2; and 
         [0015]    a code block decoding module, configured to decode the N code blocks in parallel according to a reverse direction of encoding. 
         [0016]    According to the data decoding method and apparatus provided by the embodiments of the present invention, to-be-decoded data that has been divided into transport blocks is further divided into code blocks, and the to-be-decoded data is decoded with a code block as a unit, so that multiple parts of a decoding device can perform data decoding on one transport block at the same time (that is, the decoding device can simultaneously decode different code blocks obtained by dividing a same transport block), thereby avoiding an idle situation or a waiting situation into which the decoding device gets when decoding is performed with a transport block as a unit. As compared with the prior art, the embodiments of the present invention can avoid the idle situation or waiting situation into which the decoding device gets during a data decoding process, thereby improving the resource utilization rate in the decoding process and improving the decoding efficiency. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0017]    To illustrate the technical solutions in the embodiments of the present invention more clearly, accompanying drawings required for describing the embodiments or the prior art are briefly introduced in the following. Apparently, the accompanying drawings in the following description merely show some embodiments of the present invention, and persons of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts. 
           [0018]      FIG. 1  is a schematic flow chart of a decoding process in the prior art; 
           [0019]      FIG. 2  is a schematic flow chart of a specific decoding process according to the present invention; 
           [0020]      FIG. 3  is a flow chart of a data decoding method according to Embodiment 1 of the present invention; 
           [0021]      FIG. 4  is a flow chart of a data decoding method according to Embodiment 2 of the present invention; 
           [0022]      FIG. 5  is a schematic flow chart of a specific decoding process according to Embodiment 2 of the present invention; 
           [0023]      FIG. 6  is a schematic structural diagram of a data decoding apparatus according to Embodiment 3 of the present invention; and 
           [0024]      FIG. 7  is a schematic structural diagram of a data decoding apparatus according to Embodiment 4 of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0025]    The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the embodiments to be described are merely part rather than all of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative effects shall fall within the protection scope of the present invention. 
         [0026]    To make the advantages of the technical solutions of the present invention clearer, the present invention is described in detail with reference to the accompanying drawings and embodiments. 
       Embodiment 1 
       [0027]    An embodiment of the present invention provides a data decoding method. As shown in  FIG. 3 , the method includes: 
         [0028]    In an actual application, a data decoding procedure may be divided into multiple decoding units, for example, as shown in  FIG. 2 , an encoding process and a decoding process that are applied to an HS-DSCH channel (adopting the 3GPP/25.212 protocol) of a WCDMA transmitter is shown, where a decoding process of a receiving end is a reverse process of an encoding process. According to a decoding procedure sequence, a decoding function may be divided into multiple decoding units. After a previous decoding unit completes data decoding on a transport block or a code block, a next decoding unit receives a data decoding result of the previous decoding unit and starts to work, for example, the decoding function may be divided into three decoding units shown in  FIG. 2 . 
         [0029]    After to-be-decoded data (that is, an encoding result finally obtained through a complete encoding process) undergoes data decoding of all the three decoding units, decoding of the data is ended, and decoded data (a decoding result finally obtained) is output. A specific division manner of the decoding units may be any implementation manner that is well known to persons of ordinary skill in the art, and is not described herein again. 
         [0030]    Step  301 : Divide a to-be-decoded data transport block into N code blocks. 
         [0031]    N is an integer greater than 2. 
         [0032]    In the present invention, the step may be executed by a receiving end, where the receiving end is a device that needs to perform a decoding process in a communication system, such as a server or a terminal device for receiving information sent by a sending end, and the sending end may be a device that needs to perform an encoding process in the communication system, such as a terminal device or a base state for sending information to the receiving end. 
         [0033]    Specifically, in this embodiment, after receiving the encoded data (that is, to-be-decoded data) sent by the sending end, the receiving end divides the to-be-decoded data into at least one transport block of a specified size. A specific manner of receiving the to-be-decoded data and dividing the to-be-decoded data into transport blocks may be any implementation manner that is well known to persons of ordinary skill in the art, and is not described herein again. After dividing the to-be-decoded data into transport blocks, the receiving end further divides all the divided transport blocks into code blocks. For example, after dividing the to-be-decoded data into three transport blocks, the receiving end further divides the three transport blocks into code blocks, where each transport block is divided into three code blocks, that is, the receiving end divides the to-be-decoded data into nine code blocks finally. A specific manner of dividing the transport block into code blocks may be any implementation manner that is well known to persons of ordinary skill in the art, and is not described herein again. 
         [0034]    Step  302 : Decode the N code blocks in parallel according to a reverse direction of encoding. 
         [0035]    Specifically, in this embodiment, after dividing the to-be-decoded data into code blocks, the receiving end decodes the code blocks successively, and after decoding the last code block, the receiving end completes decoding of the to-be-decoded data. 
         [0036]    According to the data decoding method provided by the embodiment of the present invention, to-be-decoded data that has been divided into transport blocks is further divided into code blocks, and the to-be-decoded data is decoded with a code block as a unit, so that multiple parts of a decoding device can perform data decoding on one transport block at the same time, thereby avoiding an idle situation or a waiting situation into which the decoding device gets when decoding is performed with the transport block as a unit. As compared with the prior art, the embodiments of the present invention can avoid the idle situation or waiting situation into which the decoding device gets during data decoding, thereby improving a resource utilization rate in the decoding process and improving decoding efficiency. 
       Embodiment 2 
       [0037]    An embodiment of the present invention provides a data decoding method. As shown in  FIG. 4 , the method includes: 
         [0038]    Step  401 : According to a currently used network transport protocol, divide to-be-decoded data into at least one data transport block of a size specified by the network transport protocol. 
         [0039]    Specifically, in this embodiment, after receiving to-be-decoded data that is sent by a sending end, a receiving end divides, according to a currently used network transport protocol, the to-be-decoded data into at least one data transport block of a size specified by the network transport protocol. 
         [0040]    Step  402 : Divide a to-be-decoded data transport block into N code blocks. 
         [0041]    N is an integer greater than 2. 
         [0042]    Step  403 : According to a reverse sequence of encoding, divide a decoding process into at least two decoding units. 
         [0043]    As shown in  FIG. 2 , any decoding unit includes one or more decoding steps, where any decoding step is decoding in a reverse direction of an encoding step, and decoding processing on one code block can be completed in each decoding unit. 
         [0044]    Further, as shown in  FIG. 2 , when the to-be-decoded data is encoded in the form of a TURBO code, a second decoding unit includes a TURBO decoder, a decoding step before the TURBO decoder is defined as a first decoding unit according to the timing of calculation and storage, and a decoding step after the TURBO decoder is defined as a third decoding unit according to the timing of calculation and storage. The specific amount of the decoding units may be adjusted according to a use environment, and is not limited to three. For example, as shown in  FIG. 2 , in an actual application, the data decoding process may be divided into five decoding units, namely, a decoding unit A, a decoding unit B, a decoding unit C, a decoding unit  2  and a decoding unit  3 , where the decoding unit A, the decoding unit B and the decoding unit C are almost started at the same time (where a time delay can be ignored) in an actual application, that is, in a conventional use process, it can be regarded that the decoding unit A, the decoding unit B and the decoding unit C decode one code block at the same time, thereby saving time required for decoding. 
         [0045]    Step  404 : Decode the N code blocks in parallel through the decoding units. 
         [0046]    A parallel decoding procedure is: 
         [0047]    As shown in  FIG. 5 , at a first decoding time, a first code block is decoded in a first decoding unit; at a second decoding time, a second code block is decoded in the first decoding unit, and the first code block is decoded in a second decoding unit; and at a third decoding time, the second code block is decoded in the second decoding unit, and a third code block is decoded in the first decoding unit, till decoding processing on all the N code blocks is completed in every decoding unit. For example: 
         [0048]    A receiving end divides to-be-decoded data into transport block  1 , transport block  2  and transport block  3 , where transport block  1  is further divided into code block  1 , code block  2  and code block  3 , transport block  2  is further divided into code block  4 , code block  5  and code block  6 , and transport block  3  is further divided into code block  7 , code block  8  and code block  9 . The divided nine code blocks are successively decoded by the decoding units shown in  FIG. 2 , where after completing decoding of one code block, one decoding unit transfers the code block to a next decoding unit, and the next decoding unit decodes the code block. For example, after completing decoding of code block  1 , the decoding unit  1  transfers the code block  1  that has been decoded by the decoding unit  1  to the decoding unit  2 , and the decoding unit  2  performs data decoding; and at the same time, the decoding unit  1  continues to decode code block  2 , till all the decoding units complete decoding of code block  1 . Similarly, data decoding is performed on the rest 8 code blocks successively, after the last code block is decoded by the decoding unit  3 , the receiving end completes decoding of the to-be-decoded data. 
         [0049]    During the foregoing data decoding process, because each transport block is further divided into multiple code blocks, the multiple decoding units may simultaneously decode different code blocks obtained by dividing a same transport block. For example, after completing decoding of code block  1 , the decoding unit  1  transfers code block  1  to the decoding unit  2  for data decoding, and at the same time, the decoding unit  1  continues to decode code block  2 . That is, while the decoding unit  1  performs data decoding on code block  2 , the decoding unit  2  performs data decoding on code block  1 . Because code block  1  and code block  2  are both obtained by dividing transport block  1 , the decoding unit  1  and the decoding unit  2  in the receiving end perform data decoding on transport block  1  at the same time, so that an idle situation or a waiting situation into which a decoding device gets when the to-be-decoded data is decoded with a transport block as a unit in the prior art is avoided, thereby improving a utilization rate of the decoding device in the decoding process, and improving decoding efficiency. For example: 
         [0050]    Delay time required for decoding the to-be-decoded data with the transport block as a unit is approximately estimated as follows: 
         [0051]    assume that the time for the decoding unit  1  to process one transport block is: Tp 
         [0052]    time for the decoding unit  2  to process one transport block (a decoding device corresponding to the decoding unit  2  is a TURBO decoder, and the decoder adopts four iterations) is: 4Tp 
         [0053]    time for the decoding unit  3  to process one transport block is: Tp 
         [0054]    then total time required for decoding one transport block is: 
         [0000]        Tp+ 4 Tp+Tp= 6 Tp    
         [0055]    Delay time required for decoding the to-be-decoded data with a code block as a unit is approximately estimated as follows: 
         [0056]    that one transport block is divided into three code blocks is used as an example, 
         [0057]    time for the decoding unit  1  to process one code block is: ⅓*Tp 
         [0058]    time for the decoding unit  2  to process one transport block is (in an actual application, time for the TURBO decoder to process one code block by adopting four 4 iterations is the same as time for the TURBO decoder to process one transport block): 4Tp 
         [0059]    time for the decoding unit  3  to process one code block is: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       1 
                       3 
                     
                     * 
                     Tp 
                   
                   = 
                     
                    
                   
                     
                       
                         1 
                         3 
                       
                       * 
                       Tp 
                     
                     + 
                     
                       4 
                        
                       
                           
                       
                        
                       Tp 
                     
                     + 
                     
                       
                         1 
                         3 
                       
                       * 
                       Tp 
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     4.67 
                      
                     
                         
                     
                      
                     Tp 
                   
                 
               
             
           
         
       
     
         [0060]    so the delay time caused by performing data decoding with the code block as a unit is less than that caused by perform data decoding with the transport block as a unit. 
         [0061]    Further, during a process of decoding data on the receiving end, it is required to occupy storage resources of the decoding device to store the data. For example, after the decoding unit  2  receives code block  1 , the decoding unit  2  may first store code block  1  in a RAM (Random Access Memory, random access memory) of a decoding device corresponding to the decoding unit  2 , and then the decoding unit  2  decodes code block  1 , so the size of the occupied RAM is the size of one code block, while when decoding is performed with the transport block as a unit, the size of the occupied RAM is the size of one transport block. Therefore, when the to-be-decoded data is decoded with the code block as a unit, occupied storage resources is reduced by folds, as compared with resources occupied when the to-be-decoded data is decoded with the transport block as a unit, and the receiving end may use saved storage resources to process more data, thereby further improving a resource utilization rate in the decoding process. 
         [0062]    According to the data decoding method provided in the embodiment of the present invention, the to-be-decoded data that has been divided into transport blocks is further divided into code blocks, and the to-be-decoded data is decoded with the code block as a unit, so that data decoding can be performed on one transport block by multiple decoding units at the same time (that is, multiple decoding units may simultaneously decode different code blocks obtained by dividing a same transport block), thereby avoiding an idle situation or a waiting situation into which a decoding device corresponding to a subsequent decoding unit gets when decoding is performed with the transport block as a unit. As compared with the prior art, the embodiment of the present invention can avoid the idle situation or waiting situation into which a decoding device corresponding to a decoding unit gets during data decoding, thereby improving the resource utilization rate in the decoding process and improving the decoding efficiency. 
       Embodiment 3 
       [0063]    An embodiment of the present invention provides a data decoding apparatus. As shown in  FIG. 6 , the apparatus includes: 
         [0064]    a transport block division module  61 , configured to divide a to-be-decoded data transport block into N code blocks, 
         [0065]    where N is an integer greater than 2; and 
         [0066]    a code block decoding module  62 , configured to decode the N code blocks in parallel according to a reverse direction of encoding. 
         [0067]    According to the data decoding apparatus provided by the embodiment of the present invention, the transport block division module further divides to-be-decoded data that has been divided into transport blocks into code blocks, and the code block decoding module decodes the to-be-decoded data with a code block as a unit, so that multiple parts of a decoding device can perform data decoding on a transport block at the same time, thereby avoiding an idle situation or a waiting situation into which the decoding device gets when decoding is performed with the transport block as a unit. As compared with the prior art, the embodiment of the present invention can avoid the idle situation or waiting situation into which the decoding device gets during data decoding, thereby improving a resource utilization rate in the decoding process and improving decoding efficiency. 
       Embodiment 4 
       [0068]    An embodiment of the present invention provides a data decoding apparatus. As shown in  FIG. 7 , the apparatus includes: 
         [0069]    a transport block division module  61 , configured to divide a to-be-decoded data transport block into N code blocks, 
         [0070]    where N is an integer greater than 2; and 
         [0071]    a code block decoding module  62 , configured to decode the N code blocks in parallel according to a reverse direction of encoding. 
         [0072]    The code block decoding module  62  includes: 
         [0073]    a decoding process division sub-module  621 , configured to divide a decoding process into at least two decoding units according to a reverse sequence of encoding, where decoding processing on one code block can be completed in each decoding unit; 
         [0074]    where any decoding unit includes one or more decoding steps, and any decoding step is decoding in a reverse direction of an encoding step; and 
         [0075]    a decoding process execution sub-module  622 , configured to: 
         [0076]    at a first decoding time, decode a first code block in a first decoding unit; at a second decoding time, decode a second code block in the first decoding unit, and decode the first code block in a second decoding unit; at a third decoding time, decode the second code block in the second decoding unit, and decode a third code block in the first decoding unit, till decoding processing on all the N code blocks is completed in every decoding unit. 
         [0077]    When the to-be-decoded data is encoded in the form of a TURBO code, the second decoding unit includes a TURBO decoder, and the decoding process further includes a third decoding unit. 
         [0078]    A decoding step before the TURBO decoder is defined as the first decoding unit according to the timing of calculation and storage, and a decoding step after the TURBO decoder is defined as the third decoding unit according to the timing of calculation and storage. 
         [0079]    At the third decoding time, the first code block is decoded in the third decoding unit. 
         [0080]    According to the data decoding apparatus provided in the embodiment of the present invention, the transport block division module further decodes the transport block into code blocks, and the code block decoding module decodes the to-be-decoded data with a code block as a unit, so that data decoding can be performed on one transport block by multiple decoding units at the same time (that is, multiple decoding units may simultaneously decode different code blocks obtained by dividing a same transport block), thereby avoiding an idle situation or a waiting situation into which a decoding device corresponding to a subsequent decoding unit gets when decoding is performed with the transport block as a unit. As compared with the prior art, the embodiment of the present invention can avoid the idle situation or waiting situation into which a decoding device corresponding to a decoding unit gets during data decoding, thereby improving a resource utilization rate in the decoding process and improving decoding efficiency. 
         [0081]    Persons of ordinary skill in the art may understand that implementation of all or part of the procedures of the methods in the foregoing embodiments may be completed by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program is run, the procedures of the foregoing method embodiments are performed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), a random access memory, or the like. 
         [0082]    The foregoing descriptions are merely specific implementation manners of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by persons skilled in the art within the technical scope of the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.