Abstract:
Embodiments of the present invention relate to the field of wireless communications, for use in optimizing a data compression solution. Disclosed are a method and device for data compression, transmission, and decompression. In the present method, data-to-be-transmitted is grouped by a transmitting end, and for each group: a shift factor is determined on the basis of the most significant bit of sample data of the greatest value in the group when a sign bit is removed, data bits of the sample data in the group are leftward shifted on the basis of the shift factor; the leftward shifted sample data respectively are quantified, thus making the bit number of the quantified sample data to be equal to a target bit number for compression; the shift factor and the quantified sample data are transmitted to a receiving end, the sample data respectively are dequantified, data bits in the dequantified sample data are rightward shifted respectively on the basis of the shift factor, and decompressed sample data is acquired. Employment of the present application optimizes data compression performance.

Description:
[0001]    This application claims priority to Chinese Patent Application No. 201210298915.6, filed with the Chinese Patent Office on Aug. 21, 2012 and entitled “Method and device for compressing data, and method and device for decompressing data”, which is hereby incorporated by reference in its entirety. 
       FIELD 
       [0002]    The present invention relates to the field of wireless communications and particularly to a method and device for compressing and transmitting data, and a method and device for decompressing data. 
       BACKGROUND 
       [0003]    Evolved Node Bs (eNBs) in the Long Term Evolution (LTE)/Long Term Evolution-Advanced (LTE-A) system are distributed eNB devices, each of which is composed of a Base Band Unit (BBU) and a Radio frequency Remote Unit (RRU) as a combined eNB that can be deployed in a flexibly distributed manner, as illustrated in  FIG. 1 , in which the RRU is connected with the BBU via an Ir interface. 
         [0004]    The transmission medium in the existing Ir interface is an optical fiber or another transmission medium, and if data over the Ir interface is compressed technically in effect, then a demand for the transmission medium can be greatly alleviated to thereby lower the cost of the device and improve the competitiveness of the product in the market. 
         [0005]    In the LTE system, there is such an existing solution to compression of data over the Ir interface that an automatic gain adjustment is performed on the input signal to thereby control a dynamic range of the signal and to lower the quantified bit width of the signal in a uniform quantification algorithm. This solution can compress data with a 16-bit bit width into 12 bits, which means a compression ratio of 4:3 representing the ratio of the size of the compressed data to the size of the uncompressed data, while ensuring the reliability of the signal. 
         [0006]    As can be apparent, there is low compression ratio in the prior art, and the algorithm may not be widely applicable, due to the fact that the uniform quantification is an optimum quantifier for a uniformly distributed input signal, whereas the simple uniform quantification may not be reasonable to allocation of quantification levels for a non-uniformly distributed input signal because redundant components in the signal may not be removed sufficiently. 
       SUMMARY 
       [0007]    Embodiments of the invention provide a method and device for compressing and transmitting data, and a method and device for decompressing data so as to optimize a solution of data compression. 
         [0008]    A method for compressing and transmitting data includes: 
         [0009]    grouping, by a transmitting terminal, data to be transmitted so that each group includes at least one data sample; and 
         [0010]    determining, by a transmitting terminal, a shift factor for each group according to a most significant bit of a data sample, with a largest value excluding a sign bit in the group; left-shifting data bits of respective data samples in the group respectively by the shift factor; 
         [0011]    quantizing the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and transmitting the shift factor and the respective quantized data samples to a receiving terminal 
         [0012]    A method for decompressing data includes: 
         [0013]    receiving, by a receiving terminal, a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; 
         [0014]    de-quantizing, by the receiving terminal, the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and 
         [0015]    right-shifting, by the receiving terminal, data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0016]    A device for compressing and transmitting data includes: 
         [0017]    a grouping unit configured to group data to be transmitted so that each group includes at least one data sample; 
         [0018]    a compressing unit configured to determine a shift factor for each group according to a most significant bit of a data sample, with a largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0019]    a transmitting unit configured to transmit the shift factor and the respective quantized data samples. 
         [0020]    A device for decompressing data includes: 
         [0021]    a receiving unit configured to receive a shift factor and respective quantized data samples; 
         [0022]    a de-quantifying unit configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and 
         [0023]    a shifting unit configured to right-shift data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0024]    An RRU which is a transmitting terminal includes: 
         [0025]    a grouping unit configured to group data to be transmitted so that each group includes at least one data sample; 
         [0026]    a compressing unit configured to determine a shift factor for each group according to a most significant bit of a data sample, with a largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0027]    a transmitting unit configured to transmit the shift factor and the respective quantized data samples. 
         [0028]    A BBU which is a transmitting terminal includes: 
         [0029]    a grouping unit configured to group data to be transmitted so that each group includes at least one data sample; 
         [0030]    a compressing unit configured to determine a shift factor for each group according to a most significant bit of a data sample, with a largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0031]    a transmitting unit configured to transmit the shift factor and the respective quantized data samples. 
         [0032]    An RRU which is a receiving terminal includes: 
         [0033]    a receiving unit configured to receive a shift factor and respective quantized data samples; 
         [0034]    a de-quantifying unit configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and 
         [0035]    a shifting unit configured to right-shift data bits of the respective de-quantized samples respectively by the shift factor to obtain the decompressed samples. 
         [0036]    A BBU which is a receiving terminal includes: 
         [0037]    a receiving unit configured to receive a shift factor and respective quantized data samples; 
         [0038]    a de-quantifying unit configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and 
         [0039]    a shifting unit configured to right-shift data bits of the respective de-quantized samples respectively by the shift factor to obtain the decompressed data samples. 
         [0040]    An RRU includes a processor, wherein: 
         [0041]    when the RRU is a transmitting terminal, the processor is configured to group data to be transmitted so that each group includes at least one data sample; to determine a shift factor for each group according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and to transmit the shift factor and the respective quantized data samples to a receiving terminal; and 
         [0042]    when the RRU is a receiving terminal, the processor is configured to receive a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and to right-shift data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0043]    A BBU includes a processor, wherein: 
         [0044]    when the BBU is a transmitting terminal, the processor is configured to group data to be transmitted so that each group includes at least one data sample; to determine a shift factor for each group according to a most significant bit of a data sample, with the largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and to transmit the shift factor and the respective quantized data samples to a receiving terminal; and 
         [0045]    when the BBU is a receiving terminal, the processor is configured to receive a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits; and to right-shift data bits of the respective de-quantized samples respectively by the shift factor to obtain the decompressed data samples. 
         [0046]    In the solutions according to the embodiments of the invention, the transmitting terminal groups data to be transmitted so that each group includes at least one data sample; determines a shift factor for each group from the most significant bit of a data sample, with the largest value excluding a sign bit in the group; left-shifts data bits of respective data samples in the group respectively by the shift factor; quantizes the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and transmits the shift factor and the respective quantized data samples to the receiving terminal As can be apparent, this solution groups the data to be transmitted and shifts and compresses each resulting group respectively to thereby shift and compress the data in segments so as to improve the performance of data compression. 
         [0047]    The receiving terminal receives the shift factor and the respective quantized data samples transmitted by the transmitting terminal, and then de-quantizes the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of un-quantized bits, and further right-shifts the data bits in the respective de-quantized data samples respectively by the shift factor into the decompressed data samples to thereby perform data decompression corresponding to data compression above. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0048]      FIG. 1  illustrates a schematic diagram of a distributed eNB in the prior art; 
           [0049]      FIG. 2  illustrates a flow chart of a method according to an embodiment of the invention; 
           [0050]      FIG. 3  illustrates a flow chart of another method according to an embodiment of the invention; 
           [0051]      FIG. 4  illustrates a schematic flow chart of a method for compressing and decompressing data according to an embodiment of the invention; 
           [0052]      FIG. 5  illustrates a schematic architectural diagram of a device including data compression and decompression modules according to an embodiment of the invention; 
           [0053]      FIG. 6A  illustrates a schematic diagram of grouping of data according to a first embodiment of the invention; 
           [0054]      FIG. 6B  illustrates a schematic diagram of grouping of data according to a second embodiment of the invention; 
           [0055]      FIG. 6C  illustrates a schematic diagram of grouping of data according to a third embodiment of the invention; 
           [0056]      FIG. 6D  illustrates a schematic diagram of grouping of data according to a fourth embodiment of the invention; 
           [0057]      FIG. 6E  illustrates a schematic diagram of grouping of data according to a fifth embodiment of the invention; 
           [0058]      FIG. 6F  illustrates a schematic diagram of grouping of data according to a sixth embodiment of the invention; 
           [0059]      FIG. 6G  illustrates a schematic diagram of a frame format of uncompressed IQ data according to a seventh embodiment of the invention; 
           [0060]      FIG. 6H  illustrates a schematic diagram of a frame format of the compressed IQ data according to the seventh embodiment of the invention; 
           [0061]      FIG. 6I  to  FIG. 6N  illustrate schematic diagrams of data samples throughout data compression and decompression according to the seventh embodiment of the invention; 
           [0062]      FIG. 7  illustrates a schematic structural diagram of a device according to an embodiment of the invention; and 
           [0063]      FIG. 8  illustrates a schematic structural diagram of another device according to an embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0064]    In order to optimize the performance of data compression, an embodiment of the invention provides a method for compressing and transmitting data. In this method, a transmitting terminal groups data to be transmitted, determines a shift factor for each group according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group, left-shifts data bits of respective data samples in the group respectively by the shift factor, quantizes the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits, and transmits the shift factor and the respective quantized data samples to a receiving terminal 
         [0065]    Referring to  FIG. 2 , a method for compressing and transmitting data by a data transmitting terminal according to an embodiment of the invention includes the following operations: 
         [0066]    Operation  20 : A transmitting terminal groups data to be transmitted so that each group includes at least one data sample; and 
         [0067]    Operation  21 : The transmitting terminal determines a shift factor for each group according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group; left-shifts data bits of respective data samples in the group respectively by the shift factor; quantizes the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and transmits the shift factor and the respective quantized data samples to a receiving terminal. Here the shift factor represents the number of shift bits by which the data bits of the data samples are left-shifted; and the data bits of the data samples are left-shifted by maintaining the sign bits of the data samples, removing N bits on the left of the data bits and padding N zeros to the right side of the data bits, thus resulting the left-shifted data sample. 
         [0068]    In the operation  20 , when the data to be transmitted consists of real component (I data) and imaginary component (Q data) of data (i.e., real component and imaginary component of data is referred to the IQ data), the data to be transmitted can be grouped based on the following two principles: 
         [0069]    The first principle relates to a correlation between the I data and the Q data, and if there is a high correlation between the I and Q data, then the I data and the Q data can be grouped jointly; otherwise, the I data and the Q data can be grouped separately; and 
         [0070]    The second principle relates to a correlation between different antennas, and if there is a high correlation between different antennas, the antennas can be grouped jointly; otherwise, the respective antennas can be grouped separately. If the antennas are grouped jointly, then the antennas are preferably grouped as antennas polarized in the same direction. 
         [0071]    A particular grouping schemes can be one of the following schemes: 
         [0072]    In a first scheme, the IQ data of each antenna are grouped separately and the I data and the Q data are grouped separately, so that at least one consecutive I data of the same antenna is grouped together or at least one consecutive Q data of the same antenna is grouped together; 
         [0073]    In a second scheme, the IQ data of each antenna are grouped separately and the I component of data and the Q component of data are grouped jointly, so that at least one consecutive I data and at least one consecutive Q data of the same antenna are grouped together; 
         [0074]    In a third scheme, the IQ data of a plurality of antennas are grouped jointly and the I data and the Q data are grouped separately, so that the I data of the same samples of the antennas at the same locations are grouped together or the Q data of the same samples of the antennas at the same locations are grouped together; and the same location here particularly refers to the same time location, i.e., the same instance of time; 
         [0075]    In a fourth scheme, the IQ data of a plurality of antennas are grouped jointly and the I data and the Q data are grouped jointly, so that the I data and the Q data of the antennas at the same locations are grouped together; 
         [0076]    In a fifth scheme, the IQ data of a plurality of antennas are grouped jointly and the I data and the Q data are grouped separately, so that the I data of at least one consecutive samples of the antennas at the same locations are grouped together or the Q data of at least one consecutive samples of the antennas at the same locations are grouped together; and 
         [0077]    In a sixth scheme, the IQ data of a plurality of antennas is grouped jointly and the I data and the Q data are grouped jointly, so that the I data and the Q data of at least one consecutive samples of the antennas at the same locations are grouped together. 
         [0078]    Here the IQ data refers to data transmitted over an Ir interface between an RRU and a BBU. 
         [0079]    Of course a scheme of grouping the data to be transmitted will not be limited to the six schemes above, but any scheme in which the data to be transmitted can be grouped will fall into the scope of the invention, for example, the data to be transmitted is grouped randomly according to samples, etc. 
         [0080]    In the operation  21 , the shift factor can be determined according to the most significant bit of the data sample, with the largest value excluding the sign bit in the group particularly as follows: 
         [0081]    Firstly the largest number of shift bits which can be represented by the shift factor is determined Here the largest number C of shift bits which can be represented by the shift factor can be determined in the equation of C=2̂(n*k/2)−1), where ̂ represents the power of  2 , n represents the number of data samples in the group, and k represents the number of control bits in which the shift factor is transmitted, for example, k can be 1; and particularly assuming the number k (typically 1) of control bits AGC, if the I data and the Q data are grouped separately, and n data samples (I data or Q data) are grouped together, then the shift factor may be (n*k) bits, in which the I data or the Q data are n*k/2 bits respectively, and the largest number of shift bits which can be represented is 2̂(n*k/2)−1 (starting with 0); and if the I data and the Q data are grouped jointly, and n/2 I data and n/2 Q data are grouped together, then the shift factor may be n*k/2 bits, and the largest number of shift bits which can be represented is 2̂(n*k/2)−1 (starting with 0); 
         [0082]    Then the data sample, with the largest value excluding the sign bit in the group and the bit index of the most significant bit of the data sample excluding the sign bit are determined. Here the most significant bit of the data sample excluding the sign bit refers to the first bit “ 1 ”, from the left to the right, of the data sample excluding the sign bit, the respective bits are indexed sequentially starting with 0 from the right to the left. For example, for a data sample 100100001, the sample excluding the most significant sign bit is 00100001, and the respective bits are indexed sequentially from the right to the left as 0, 1, 2, 3, 4, 5, 6 and 7, and the bit index of the most significant bit of the data sample excluding the sign bit is  5 . 
         [0083]    Finally if A is no larger than the largest number of shift bits, then the shift factor is determined to be equal to A; otherwise, the shift factor is determined to be equal to the largest number of shift bits, in which A=W−1−H, W represents the number of bits of the data sample, excluding the sign bit, in the group, and H represents the bit index of the most significant bit. 
         [0084]    Here the shift factor can be a differential shift factor, that is, the shift factor of the first group is an absolute value so that the shift factors of the remaining groups can be equal to the differences of the shift factors of the respective groups and the shift factor of the first group, as calculated above. 
         [0085]    Preferably in order to improve the precision of compression, after the largest number of shift bits which can be represented by the shift factor is determined, and before the data sample, with the largest value excluding the sign bit in the group and the number of the most significant bit of the sample excluding the sign bit are determined, if the bit index of the most significant bit, excluding the sign bit, of the data sample, with the largest value excluding the sign bit in the group is E, or all the bit indexes of the most significant bits of data samples of more than a preset proportion in the group are smaller than or equal to E, then the respective samples in the group are saturated into E bits, where E represents an integer larger than 0 and smaller than W. Here a data sample is saturated into E bits as follows: a sign bit of the data sample remain unchanged, and if the data sample excluding the sign bit is larger than a reference sample, then the data sample excluding the sign bit is updated to the reference sample, and if the data sample excluding the sign bit is no larger than the reference sample, then the data sample is maintained, where the number of bits of the reference sample is W, and all the least significant E bits of the reference sample are 1, whereas all the remaining bits thereof are 0. For example, if the data sample is 100011001, E=3, and the data sample excluding the most significant sign bit is larger than the reference sample 00000111, then the data sample is saturated into 100000111; and in another example, if the data sample is 100000011, E=3, and the data sample excluding the most significant sign bit is no larger than the reference sample 00000111, then the data sample is still saturated into 100000111. 
         [0086]    In the operation  21 , the respective left-shifted data samples can be quantized respectively particularly in the following uniform quantization: 
         [0087]    For each left-shifted data sample, the sign bit of the data sample is maintained, (V−1) bits of data are captured starting from the most significant bit to least significant bit among the data bits, and the quantized data sample is formed from the sign bit and the captured bits of data, in which V represents the target number of compressed bits. For example, if the left-shifted data sample is 10001000, V=4, the most significant sign bit is 1, and 3 bits of data captured, starting from the most significant bit to least significant bit, among the data bits are 000, then the quantized data sample consisted of the sign bit and the captured bits of data is 1000. 
         [0088]    In this method, the transmitting terminal can be an RRU, and the receiving terminal can be a BBU; or the transmitting terminal can be a BBU, and the receiving terminal can be an RRU. Of course, the transmitting terminal can be any other data transmitter, and the receiving terminal can be any other data receiver. 
         [0089]    Referring to  FIG. 3 , in order to provide a method for decompressing data corresponding to the method for compressing data as illustrated in  FIG. 2 , an embodiment of the invention provides a method for decompressing data including the following operations: 
         [0090]    Operation  30 : A receiving terminal receives a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; 
         [0091]    Operation  31 : The receiving terminal de-quantizes the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original numbers of un-quantized bits. Here the receiving terminal de-quantizes the respective data samples according to quantization of the corresponding samples by the transmitting terminal; and 
         [0092]    Operation  32 : The receiving terminal right-shifts data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. Here the number of right shift bits is equal to a value corresponding to the shift factor. 
         [0093]    In the operation  31 , the receiving terminal can de-quantize the respective data samples respectively particularly as follows: 
         [0094]    For each data sample, B zeros are padded to the right side of the data sample resulting in the de-quantized data sample, where B=W−V, W represents the number of bits of the un-quantized data sample excluding the sign bit, and V represents the number of bits of the quantized data sample. This scheme can be applicable when uniform quantization is performed by the transmitting terminal 
         [0095]    Preferably in order to improve the accuracy of a decompression result, after the de-quantized data samples are obtained, and before the data bits of the respective de-quantized data samples are right-shifted respectively by the shift factor, a preset offset can be added respectively to the de-quantized samples, where the preset offset ranging from (0, 2̂(B−1)], and ̂ represents the power of 2, for example, the preset offset is equal to 2̂(B−1); and accordingly in the operation  32 , the receiving terminal right-shifts the data bits of the respective samples, with the added preset offset, by the shift factor. 
         [0096]    In this method, the transmitting terminal can be an RRU, and the receiving terminal can be a BBU; or the transmitting terminal can be a BBU, and the receiving terminal can be an RRU. 
         [0097]    The invention will be described below in details. 
         [0098]    As illustrated in  FIG. 4 , a process flow of the transmitting terminal and the receiving terminal according to an embodiment of the invention is as follows: 
         [0099]    Operation  201 : A compression module of a transmitting terminal groups data to be transmitted so that each group includes at least one data sample; 
         [0100]    Operation  202 : The compression module determines a shift factor for each group according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group; 
         [0101]    Operation  203 : The compression module left-shifts data bits of respective data samples in the group respectively by the shift factor; 
         [0102]    Operation  204 : The compression module quantizes the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0103]    Operation  205 : The compression module puts the shift factor and the quantized data samples onto a transmission channel for transmission. 
         [0104]    Operation  301 : A decompression module of a receiving terminal receives the shift factor and the respective quantized data samples; 
         [0105]    Operation  302 : The decompression module de-quantizes the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original numbers of un-quantized bits; and 
         [0106]    Operation  303 : The decompression module right-shifts the data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0107]    Particularly when the invention is applied to compression of data over an Ir interface in a 3G/4G system, the compression module and the decompression module are positioned in the system as illustrated in  FIG. 5 , where in the uplink, the compression module resides at the RRU side, and accordingly the decompression module resides at the BBU side; and in the downlink, the compression module resides at the BBU side, and accordingly the decompression module resides at the RRU side. 
         [0108]    The six schemes of grouping data will be presented below in a first embodiment to a sixth embodiment: 
       First Embodiment 
       [0109]    As illustrated in  FIG. 6A , in the first scheme of grouping data, four I data or four Q data are grouped together, and each antenna is grouped separately. 
       Second Embodiment 
       [0110]    As illustrated in  FIG. 6B , in the second scheme of grouping data, two I data and two Q data are grouped together, and each antenna is grouped separately. 
       Third Embodiment 
       [0111]    As illustrated in  FIG. 6C , in the third scheme of grouping data, the same I data or the same Q data of four antennas polarized in the same direction are grouped together. 
       Fourth Embodiment 
       [0112]    As illustrated in  FIG. 6D , in the fourth scheme of grouping data, I data and Q data of four antennas polarized in the same direction are grouped together. 
       Fifth Embodiment 
       [0113]    As illustrated in  FIG. 6E , in the fifth scheme of grouping data, two consecutive I data of two antennas polarized in the same direction are grouped together, whereas two consecutive Q data of the two antennas polarized in the same direction are grouped together, although  FIG. 6E  illustrates a schematic diagram of only the grouped I data. 
       Sixth Embodiment 
       [0114]    As illustrated in  FIG. 6F , in the sixth scheme of grouping data, two consecutive I data and two consecutive Q data of two antennas polarized in the same direction are grouped together. 
       Seventh Embodiment 
       [0115]    For the sake of a convenient description, only the existing solution to compression of 15 bits of IQ data into 7 bits in the 3G/4G system will be described in this embodiment.  FIG. 6G  illustrates a frame format of un-compressed IQ data, and  FIG. 6H  illustrates a frame format of the compressed IQ data. It shall be noted that the invention will not be limited to the frame formats mentioned in this context. 
         [0116]    In this embodiment, binary data is represented as true codes. 15 bits of un-compressed IQ data include 15 bits of I data and 15 bits of Q data, where there are 1 sign bit and 14 data bits, and they are compressed into 7 bits including 1 sign bit and 6 data bits. That is, the un-compressed word length (i.e., number of bits) excluding the sign bit is W=14, and the compressed word length excluding the sign bit is V=6. 
         [0117]    Operation 1: A transmitting terminal groups IQ data to be transmitted, for details of which reference can be made to the first embodiment to the sixth embodiment. 
         [0118]    It is assumed that four data samples are grouped together and a shift factor is 2 bits representing the number of shift bits ranging from 0 to 3. For example,  FIG. 6I  illustrates four data samples in the group i. 
         [0119]    Operation 2: A shift factor is calculated for the group i, in which a data sample, excluding a sign bit, with the largest value in the group is D3, and the bit index of the most significant bit of D3 excluding the sign bit is H=12, that is, the shift factor is equal to (W−1−H)=14−1−12=1. 
         [0120]    Operation 3: Respective data samples in the group i are left-shifted by one bit (the sign bits are maintained, and data bits are left-shifted by one bit) into the data samples illustrated in  FIG. 6J . 
         [0121]    Operation 4: The respective data samples illustrated in  FIG. 6J  are quantized respectively into a target number of bits, which is 7 bits, that is, six bits are captured, starting from the most significant bit to least significant bit, from data bits of the shifted data samples whereas the sign bits are maintained, resulting in the quantized data samples as illustrated in  FIG. 6K , and the quantized data samples are transmitted to a receiving terminal 
         [0122]    Operation 5: The receiving terminal de-quantizes the received data samples, that is, firstly 8 zeros ((W−V)=14−6=8) are padded to the right side of the 7-bit data samples resulting into 15 bits, as illustrated in  FIG. 6L . 
         [0123]    Operation 6: An error is compensated for, that is, an offset a is added to D1 to D4 as illustrated in  FIG. 6L  resulting in the data samples as illustrated in  FIG. 6M , given a=2̂(W−V−1)=2̂(14−6−1)=2̂7. 
         [0124]    Operation 7: The respective data samples as illustrated in  FIG. 6M  are right-shifted respectively by one bit (the sign bits are maintained, and the data bits are right-shifted by one bit) into the samples illustrated in  FIG. 6N , i.e., the data samples decompressed by the receiving terminal. 
         [0125]    Referring to  FIG. 7 , an embodiment of the invention provides a device for compressing and transmitting data, the device including: 
         [0126]    A grouping unit  70  is configured to group data to be transmitted so that each group includes at least one data sample; 
         [0127]    A compressing unit  71  is configured to determine for each group a shift factor according to the most significant bit of a data sample, excluding a sign bit, with the largest value in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0128]    A transmitting unit  72  is configured to transmit the shift factor and the respective quantized data samples. 
         [0129]    Furthermore the grouping unit  70  is configured: 
         [0130]    When the data to be transmitted is real and imaginary (IQ) data, to group the data to be transmitted as follows: 
         [0131]    To group the IQ data of each antenna separately, and to group the I data and the Q data separately so that at least one consecutive I data of the same antenna is grouped together or at least one consecutive Q data of the same antenna is grouped together; or 
         [0132]    To group the IQ data of each antenna separately, and to group the I data and the Q data jointly so that at least one consecutive I data and at least one consecutive Q data of the same antenna are grouped together; or 
         [0133]    To group the IQ data of a plurality of antennas jointly, and to group the I data and the Q data separately so that the I data of the same samples of the antennas at the same locations are grouped together or the Q data of those same samples together; or 
         [0134]    To group the IQ data of a plurality of antennas jointly, and to group the I data and the Q data jointly so that the I data and the Q data of the antennas at the same locations are grouped together; or 
         [0135]    To group the IQ data of a plurality of antennas jointly, and to group the I data and the Q data separately so that the I data of at least one consecutive data samples of the antennas at the same locations is grouped together or the Q data of the at least one consecutive samples is grouped together; or 
         [0136]    To group the IQ data of a plurality of antennas jointly, and to group the I data and the Q data jointly so that the I data and the Q data of at least one consecutive data samples of the antennas at the same locations are grouped together. 
         [0137]    Furthermore the compressing unit  71  configured to determine the shift factor according to the most significant bit of the data sample, excluding the sign bit, with the largest value in the group is configured: 
         [0138]    To determine the largest number of shift bits which can be represented by the shift factor; 
         [0139]    To determine the data sample, excluding the sign bit, with the largest value in the group and the bit index of the most significant bit of the data sample excluding the sign bit; and 
         [0140]    If A is no larger than the largest number of shift bits, to determine the shift factor to be equal to A; otherwise, to determine the shift factor to be equal to the largest number of shift bits, where A=W−1−H, W represents the number of bits of the data sample, excluding the sign bit, in the group, and H represents the bit index of the most significant bit. 
         [0141]    Furthermore the compressing unit  71  is configured to determine the largest number C of shift bits which can be represented by the shift factor in the equation of: C=2̂(n*k/2)−1), 
         [0142]    Where ̂ represents the power of 2, n represents the number of data samples in the group, and k represents the number of control bits in which the shift factor is transmitted. 
         [0143]    Furthermore the compressing unit  71  is further configured: 
         [0144]    After the largest number of shift bits which can be represented by the shift factor is determined, and before the data sample, with the largest value excluding the sign bit in the group and the bit index of the most significant bit of the data sample excluding the sign bit are determined, if the bit index of the most significant bit of the data sample, with the largest value excluding the sign bit in the group is E, or there are more than a preset proportion of data samples, of which the bit indexes of the most significant bits, excluding sign bits, are smaller than or equal to E, in the group, to saturate the respective data samples in the group into E bits, where E represents an integer larger than 0. 
         [0145]    Furthermore the compressing unit  71  is configured to quantize the respective left-shifted data samples respectively as follows: 
         [0146]    To capture V bits of data, starting from the most significant bit to least significant bit, from the respective left-shifted data samples resulting in the quantized data samples. 
         [0147]    Referring to  FIG. 8 , an embodiment of the invention provides a device for decompressing data, the device including: 
         [0148]    A receiving unit  80  is configured to receive a shift factor and respective quantized data samples; 
         [0149]    A de-quantifying unit  81  is configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original numbers of un-quantized bits; and 
         [0150]    A shifting unit  82  is configured to right-shift data bits of the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0151]    Furthermore the de-quantifying unit  81  is configured: 
         [0152]    For each data sample, to pad B zeros to the right side of the data sample resulting in the de-quantized data sample, where B=W−V, W represents the number of bits of the un-quantized sample data excluding the sign bit, and V represents the number of bits of the quantized data sample. This scheme can be applicable when uniform quantization is performed by the transmitting terminal 
         [0153]    Furthermore the de-quantifying unit  81  is further configured: 
         [0154]    After the de-quantized samples are obtained, and before the shifting unit right-shifts the data bits of the respective de-quantized data samples respectively by the shift factor, to add a preset offset respectively to the de-quantized data samples, where the preset offset ranging from (0, 2̂(B−1)], and ̂ represents the power of 2; and 
         [0155]    The shifting unit  82  is configured: 
         [0156]    To right-shift the data bits of the respective data samples, with the added preset offset, by the shift factor. 
         [0157]    In summary, advantageous effects of the invention includes: 
         [0158]    In the solutions according to the embodiments of the invention, a transmitting groups the data to be transmitted so that each group includes at least one data sample; determines for each group a shift factor according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group; left-shifts data bits of respective data samples in the group respectively by the shift factor; quantizes the respective left-shifted data samples respectively so that the number of bits of each quantized sample is equal to a target number of compressed bits; and transmits the shift factor and the respective quantized data samples to a receiving terminal As can be apparent, this solution groups the data to be transmitted and shifts and compresses each resulting group respectively to thereby shift and compress the data in segments so as to improve the performance of data compression. 
         [0159]    The receiving terminal receives the shift factor and the respective quantized data samples transmitted by the transmitting terminal, and then de-quantizes the respective data samples respectively so that the number of bits of each de-quantized sample is equal to the original number of un-quantized bits, and further right-shifts the data bits in the respective de-quantized samples respectively by the shift factor into the decompressed data samples to thereby perform data decompression corresponding to data compression above. 
         [0160]    Based upon the same inventive idea as the method, an embodiment of the invention further provides an RRU which is a transmitting terminal including: 
         [0161]    A grouping unit is configured to group data to be transmitted so that each group includes at least one data sample; 
         [0162]    A compressing unit is configured to determine for each group a shift factor according to the most significant bit of a data sample, excluding a sign bit, with the largest value in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0163]    A transmitting unit is configured to transmit the shift factor and the respective quantized data samples. 
         [0164]    Based upon the same inventive idea as the method, an embodiment of the invention further provides a BBU which is a transmitting terminal including: 
         [0165]    A grouping unit is configured to group data to be transmitted so that each group includes at least one data sample; 
         [0166]    A compressing unit is configured to determine for each group a shift factor according to a most significant bit of a data sample, excluding a sign bit, with the largest value in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; and to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and 
         [0167]    A transmitting unit is configured to transmit the shift factor and the respective quantized data samples. 
         [0168]    Based upon the same inventive idea as the method, an embodiment of the invention further provides an RRU which is a receiving terminal including: 
         [0169]    A receiving unit is configured to receive a shift factor and respective quantized data samples; 
         [0170]    A de-quantifying unit is configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of bits before quantization; and 
         [0171]    A shifting unit is configured to right-shift data bits in the respective de-quantized data samples respectively by the shift factor to obtain the decompressed data samples. 
         [0172]    Based upon the same inventive idea as the method, an embodiment of the invention further provides a BBU which is a receiving terminal including: 
         [0173]    A receiving unit is configured to receive a shift factor and respective quantized data samples; 
         [0174]    A de-quantifying unit is configured to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of bits before quantization; and 
         [0175]    A shifting unit is configured to right-shift data bits in the respective de-quantized data samples respectively by the shift factor top obtain the decompressed samples. 
         [0176]    Based upon the same inventive idea as the method, an embodiment of the invention further provides an RRU including a processor, where: 
         [0177]    When the RRU is a transmitting terminal, the processor is configured to group data to be transmitted so that each group includes at least one data sample; to determine for each group a shift factor according to a most significant bit of a data sample, with the largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized data sample is equal to a target number of compressed bits; and to transmit the shift factor and the respective quantized data samples to a receiving terminal; and 
         [0178]    When the RRU is a receiving terminal, the processor is configured to receive a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; to de-quantize the respective data samples respectively so that the number of bits of each de-quantized data sample is equal to the original number of bits before quantization; and to right-shift data bits in the respective de-quantized data samples respectively by the shift factor to obtain the decompressed samples. 
         [0179]    Based upon the same inventive idea as the method, an embodiment of the invention further provides a BBU including a processor, where: 
         [0180]    When the BBU is a transmitting terminal, the processor is configured to group data to be transmitted so that each group includes at least one data sample; to determine for each group a shift factor according to the most significant bit of a data sample, with the largest value excluding a sign bit in the group; to left-shift data bits of respective data samples in the group respectively by the shift factor; to quantize the respective left-shifted data samples respectively so that the number of bits of each quantized sample is equal to a target number of compressed bits; and to transmit the shift factor and the respective quantized data samples to a receiving terminal; and 
         [0181]    When the BBU is a receiving terminal, the processor is configured to receive a shift factor, and respective quantized data samples, transmitted by a transmitting terminal; to de-quantize the respective data samples respectively so that the number of bits of each de-quantized sample is equal to the original number of bits before quantization; and to right-shift data bits in the respective de-quantized data samples respectively by the shift factor to obtain the decompressed samples. 
         [0182]    The invention has been described in a flow chart and/or a block diagram of the method, the device (system) and the computer program product according to the embodiments of the invention. It shall be appreciated that respective flows and/or blocks in the flow chart and/or the block diagram and combinations of the flows and/or the blocks in the flow chart and/or the block diagram can be embodied in computer program instructions. These computer program instructions can be loaded onto a general-purpose computer, a specific-purpose computer, an embedded processor or a processor of another programmable data processing device to produce a machine so that the instructions executed on the computer or the processor of the other programmable data processing device create means for performing the functions specified in the flow(s) of the flow chart and/or the block(s) of the block diagram. 
         [0183]    These computer program instructions can also be stored into a computer readable memory capable of directing the computer or the other programmable data processing device to operate in a specific manner so that the instructions stored in the computer readable memory create an article of manufacture including instruction means which perform the functions specified in the flow(s) of the flow chart and/or the block(s) of the block diagram. 
         [0184]    These computer program instructions can also be loaded onto the computer or the other programmable data processing device so that a series of operational steps are performed on the computer or the other programmable data processing device to create a computer implemented process so that the instructions executed on the computer or the other programmable device provide steps for performing the functions specified in the flow(s) of the flow chart and/or the block(s) of the block diagram. 
         [0185]    Although the preferred embodiments of the invention have been described, those skilled in the art benefiting from the underlying inventive concept can make additional modifications and variations to these embodiments. Therefore the appended claims are intended to be construed as encompassing the preferred embodiments and all the modifications and variations coming into the scope of the invention. 
         [0186]    Evidently those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus the invention is also intended to encompass these modifications and variations thereto so long as the modifications and variations come into the scope of the claims appended to the invention and their equivalents.