DATA COMPRESSION METHOD, DATA DECOMPRESSION METHOD, AND COMMUNICATION APPARATUS
20240196268 ยท 2024-06-13
Assignee
Inventors
Cpc classification
H04W28/06
ELECTRICITY
H03M7/55
ELECTRICITY
International classification
Abstract
Embodiments of this application provide a data compression method, a data decompression method, and a communication apparatus. The communication apparatus may be a baseband unit (BBU), a remote radio unit (RRU), or the like. The method may be used for data compression and decompression. During data compression, the communication apparatus may obtain first data based on N pieces of original data, an amount K of combined data, and a data bit width L of the combined data, where the first data is data obtained by compressing the original data, a data bit width corresponding to the first data is ?, ? is a non-integer greater than 0, and N, K, and L are positive integers; then determine the combined data based on ? and the first data; and output the combined data.
Claims
1. A communication method, comprising: compressing N pieces of original data based on an amount K of combined data and a data bit width L of the combined data to obtain N pieces of first data, wherein each piece of first data corresponds to a data bit width of ft, ft is a non-integer greater than 0, and N, K, and L are positive integers; determining the combined data based on ft and the N pieces of first data; and outputting the combined data.
2. The method of claim 1, the method further comprising: obtaining second data based on the N pieces of original data, wherein the second data represents positive and negative features of each of the N pieces of original data; and wherein the outputting the combined data comprises: outputting the combined data and the second data.
3. The method of claim 1, wherein ft satisfies:
4. The method of claim 1, wherein each piece of first data satisfies:
5. The method of claim 1, wherein the combined data satisfies:
6. The method of claim 1, wherein ft is 5.4, 6.4, 6.5, 6.8, or 7.5.
7. The method of claim 2, wherein ft satisfies:
8. An apparatus, comprising: one or more processors configured to execute instructions causing the apparatus to: compressing N pieces of original data based on an amount K of combined data and a data bit width L of the combined data to obtain N pieces of first data, wherein each piece of first data corresponds to a data bit width of ft, ft is a non-integer greater than 0, and N, K, and L are positive integers; determine the combined data based on ft and the N pieces of first data; and output the combined data.
9. The apparatus of claim 8, wherein the instructions are executed to further cause the apparatus to: obtain second data based on the N pieces of original data, wherein the second data represents positive and negative features of each of the N pieces of original data; and wherein the instructions are executed to further cause the apparatus to output the second data.
10. The apparatus of claim 8, wherein ft satisfies:
11. The apparatus of claim 8, wherein each piece of first data satisfies:
12. The apparatus of claim 8, wherein the combined data satisfies:
13. The apparatus of claim 8, wherein ,8 is 5.4, 6.4, 6.5, 6.8, or 7.5.
14. The apparatus of claim 9, wherein ft satisfies:
15. A non-transitory computer readable medium storing instructions that are executable by a computer, the instructions comprising instructions for: compressing N pieces of original data based on an amount K of combined data and a data bit width L of the combined data to obtain N pieces of first data, wherein each piece of first data corresponds to a data bit width of ,8, ft is a non-integer greater than 0, and N, K, and L are positive integers; determining the combined data based on ft and the N pieces of first data; and outputting the combined data.
16. The non-transitory computer readable medium of claim 15, wherein the instructions further comprise instructions for: obtaining second data based on the N pieces of original data, wherein the second data represents positive and negative features of each of the N pieces of original data; and wherein the outputting the combined data comprises: outputting the combined data and the second data.
17. The non-transitory computer readable medium of claim 15, wherein ft satisfies:
18. The non-transitory computer readable medium of claim 15, wherein each piece of first data satisfies:
19. The non-transitory computer readable medium of claim 15, wherein the combined data satisfies:
7. 5.
20. The non-transitory computer readable medium of claim 15, wherein ,8 is 5.4, 6.4, 6.5, 6.8, or
Description
BRIEF DESCRIPTION OF DRAWINGS
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
DESCRIPTION OF EMBODIMENTS
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings. A specific operation method in a method embodiment may also be applied to an apparatus embodiment or a system embodiment. In the descriptions of this application, unless otherwise specified, a plurality of means two or more than two. Therefore, for implementations of an apparatus and a method, reference may be made to each other, and no repeated description is provided.
[0064]
[0065] During downlink data transmission, the RRU receives the compressed data from the BBU, performs decompression, up-sampling, digital-to-analog conversion, modulation, and power amplification, and finally transmits the data through an antenna. The BBU schedules an air interface resource for a user, performs channel coding and modulation on user data, performs data compression on modulated data, and transmits compressed data to the RRU. During uplink data transmission, the RRU performs amplification, modulation, down-sampling, and analog-to-digital conversion on an analog signal from the antenna to obtain a digital signal, then performs compression to obtain compressed data, and finally sends the compressed data to the BBU. The BBU receives the compressed data from the RRU and performs demodulation and decoding.
[0066] This application is also applicable to a communication system constructed by a BBU-like module and an RRU-like module. The RRU-like module has a function of conversion between a digital signal and an analog signal, may be used for analog signal modulation and amplification, and may further include one or more of functions such as waveform generation, sampling rate conversion, digital modulation, multi-user multiplexing, and receiving equalization of a digital signal. The BBU-like module has functions of detecting, encoding, and decoding a digital signal, and may further include one or more of functions such as waveform generation, sampling rate conversion, digital modulation, multi-user multiplexing, and receiving equalization of the digital signal. There is a communication interface between the BBU-like module and the RRU-like module, and compressed data may also be transmitted through the communication interface by using a method provided in this application. This is not specifically limited in this application. The BBU-like module may be implemented in a form of hardware and/or software, and the RRU-like module may be implemented in a form of hardware and/or software. This is not limited in this application.
[0067] It should be noted that, during actual application, the solution of this application may be further applied to data processing between a processor and a memory. A data processing procedure between the processor and the memory is the same as a data processing procedure between the BBU and the RRU. Details are not described herein in this application.
[0068] As described in the background, generally, the communication interface between the BBU and the RRU is for transmitting data by using a fixed integer data bit width, and a data rate change and a quantized SNR change that correspond to each bit are great. In an actual communication system, an available bandwidth of a communication interface may not correspond to an integer bit width, and still using the integer bit width may cause an SNR performance loss, or waste a data transmission rate. In view of this, this application provides a communication method, so that a granularity of a data bit width is finer and better meets a requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0069]
[0070] Step 201: The BBU obtains first data based on N pieces of original data, an amount K of combined data, and a data bit width L of the combined data, where the first data is data obtained by compressing the original data, a data bit width corresponding to the first data is ?, ? is a non-integer greater than 0, and N, K, and L are positive integers.
[0071] The foregoing original data may be understood as uncompressed data, data stored in a communication apparatus, data collected by a collection apparatus connected to the communication apparatus (where for example, if the communication apparatus is connected to a voltage sensor, and a voltage value collected by the voltage sensor is 36 V, 36 V may be understood as original data), or the like. This is not specifically limited in this application. For example, when data is transmitted between the BBU and the RRU, a large bandwidth is occupied for directly transmitting original data, and a large quantity of optical fiber devices are required to carry the original data, resulting in high costs. In this application, considering a cost issue, the original data may be compressed, and compressed data may be combined to construct combined data for transmission.
[0072] It should be noted that, during actual application, an amount of data to be transmitted by the BBU may be large, and the N pieces of original data may be obtained through sampling processing. For example, if sampling processing is performed, by using a same sampling frequency 1, on the data to be transmitted by the BBU, to obtain sampled data 1 to sampled data N, the sampled data 1 to sampled data N are used as the original data for data processing. Normalization processing may be further performed on the data to be transmitted by the BBU. For example, after the data is represented by using a binary value, sampling processing is performed by using a same sampling frequency, to obtain the original data. A manner of obtaining the original data is not specifically limited herein in this application.
[0073] In addition, it should be further noted that values of N and K may be agreed on in advance by the BBU and the RRU. Generally, N is a composite number, and K is a divisor of N. For example, N is 32, and K is 16 or 8, N is 30, and K is 15, 6, or 5. This is not specifically limited in this application.
[0074] Step 202: The BBU determines the combined data based on ? and the first data.
[0075] During application of this application, considering an actual application environment of the communication apparatus, for example, a supported bandwidth and a data transmission rate, the data bit width L of the combined data may be determined based on the actual application environment of the communication apparatus. The first data may be obtained by performing data processing (weighting, a data operation, and the like) based on the data bit width L, the amount K of combined data, and the N pieces of original data. The first data may be understood as data obtained by compressing the original data. After data processing, the original data is compressed, and the data bit width corresponding to the first data is ?. ? may be understood as a data bit width corresponding to each piece of first data after a plurality of pieces of first data are combined, and a valid bit width in a data transmission process. A numerical range of the valid bit width is [0, 2.sup.??1]. For example, a valid bit width of 6.5 indicates that a numerical range of the valid bit width is [0, 2.sup.6.5?1], that is [0, 89]. For example, first data A and first data B are combined into data C, a data bit width corresponding to the data C is L, and a data bit width corresponding to the first data A may be understood as ?. In addition, it should be further noted that ? may be data A obtained based on L, K, and N, or may be data obtained by processing the data A. This is not specifically limited in this application. For example, if the data A obtained based on L, K, and N is 6.5, ? may be 6.5, 6.4, or 6.3, or if the data A obtained based on L, K, and N is ?, may be 0.3, 0.33, or the like. In addition, ? may alternatively be 5.4, 6.4, 6.5, 6.8, or 7.5. This is not specifically limited in this application.
[0076] Step 203: The BBU outputs the combined data to the RRU. Correspondingly, the RRU may obtain the combined data.
[0077] Step 204: The RRU determines the first data based on the data bit width ft corresponding to the first data and the combined data, where the first data is data obtained by compressing the original data, and ? is a non-integer greater than 0.
[0078] Step 205: The RRU determines the N pieces of original data based on ? and the first data, where N is a positive integer.
[0079] In this application, a granularity of the data bit width may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0080] In an optional manner, the BBU may obtain second data based on the N pieces of original data, where the second data represents positive and negative features of each of the N pieces of original data; and the BBU may output the combined data and second data.
[0081] It should be noted that the original data has positive and negative values. For example, the original data is a voltage value, and the voltage value may be a negative value or a positive value. If the positive and negative values of the original data are not separated, an error may occur in calculation of the combined data, and accuracy of the obtained data is reduced. During data transmission, plus and minus symbols of the original data and numerical values of the data are separated and calculated, so that the combined data that can be obtained is all positive numbers. In addition, during decompression, the combined data may be quickly decompressed, to avoid a calculation error caused by a data symbol participating in calculation. When calculation efficiency is improved, data processing efficiency can be improved.
[0082] The second data may be determined by using Formula 0:
[0083] S.sub.i represents second data with an index i in N pieces of second data, D.sub.i represents original data with an index i in the N pieces of original data, and i?[0,N?1].
[0084] For example, if there are five pieces of original data, which are ?25, 69, ?52, 87, and 123, original data with an index 0 is ?25, and original data with an index 4 is 123, since ?25 is less than 0, second data with an index 0 is 1, and since 123 is greater than 0, second data with an index 4 is 0. Certainly, during actual application, when the original data is less than 0, the second data may also be 0. When the original data is greater than or equal to 0, the second data may also be 1, or may be another value such as 2 or 3. This is not specifically limited in this application and may be flexibly designed based on actual application. However, a design rule of the BBU needs to be informed to the RRU in advance, so that the RRU can correctly parse the original data. In addition, i mentioned above is merely an index number, and a value range of i may alternatively be 1 to N, 2 to N+1, or the like. This is not specifically limited in this application. Formula 0 is merely an example for description, and does not specifically limit a value range of i. The value range of i may be flexibly designed based on actual application. For descriptions of i in the following, refer to this part, and details are not described in the following. However, a design rule of the BBU needs to be informed to the RRU in advance, so that the RRU can correctly parse the original data.
[0085] In addition, it should be further noted that, after data processing shown in the foregoing Formula 0 is performed on the original data, the second data and an absolute value corresponding to the original data may be obtained. The absolute value is represented by x, herein or another letter. This is not specifically limited in this application. The foregoing example is still used. If the original data with the index 0 is ?25, x.sub.0 is 25.
[0086] During actual application, the BBU may determine a maximum value x.sub.max in x.sub.0 to x.sub.N?1, search Table 2 of compression factor indexes based on x.sub.max, find a minimum compression factor greater than x.sub.max in the Table 2, and determine a number corresponding to the compression factor. For example, x.sub.max=4500, in Table 2, the minimum compression factor greater than x.sub.max is 8192, and an index number corresponding to 8192 is 1101.
TABLE-US-00002 TABLE 2 Number 0000 0001 0010 . . . 1100 1101 1110 1111 Compression 2 4 8 . . . 4096 8192 16384 32768 factor C
[0087] It should be noted that, using a compression factor greater than x.sub.max can ensure that x.sub.0 to x.sub.N?1 can all be compressed to smaller values during compression, and can ensure that data of x.sub.0 to x.sub.N?1 is fully compressed. Selecting the minimum compression factor greater than x.sub.max instead of randomly selecting a compression factor can ensure compression precision. If a value of the compression factor is excessively small, a compression granularity is insufficient, and a bandwidth required for transmission is larger. If a value of the compression factor is excessively large, a compression granularity is excessively large, and precision of transmitted data is reduced (where for example, if compression is performed by using the compression factor 32768, for the original data, only two high-order bits of data may be reserved). Therefore, the minimum compression factor greater than x.sub.max is selected to compress the data.
[0088] In addition, in this application, a data bit width of a finer granularity is considered, and when the compression factor is obtained, ? needs to be further determined, to perform more accurate compression on x.sub.i.
[0089] In an optional manner, ? satisfies Formula 1, and Formula 1 is as follows:
[0090] It should be noted that, it can be learned from N/K that one piece of combined data is constructed by using several pieces of original data, and it can be learned from
that a bit width corresponding to one piece of original data after compression and combination may be a non-cyclic or cyclic decimal, and ? and ? a may be summed to obtain a non-cyclic decimal. A granularity of the data bit width of ? determined in this manner may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0091] After a calculation method of ft is determined, by using Formula 2, it may be determined that the first data, that is, data that needs to be compressed, satisfies Formula 2, and Formula 2 is as follows:
[0092] Z.sub.i represents first data with an index i in N pieces of first data, x.sub.i represents an absolute value corresponding to original data with an index i in the N pieces of original data, C represents a compression factor used to compress the original data, ??1, and i?[0,N?1].
[0093] It should be noted that ? ? may represent a floor function, or may represent rounding to the nearest integer, or the like. This is not specifically limited in this application. A same symbol is used in the following, and a meaning of the symbol is the same as that described herein. Details are not described again in the following. For example, if ? is 6.5 and ? is 1,
[0094] After determining the first data, the BBU may combine the first data by using Formula 3:
[0095] E.sub.j represents combined data with an index j in the combined data, Z.sub.j*K+q represents first data with an index j*K+q in the N pieces of first data, and j?[0,K?1]. A value range of j may be 0 to K?1, or may be 1 to K. This is not specifically limited in this application, and the value range of j may be flexibly designed based on actual application. A value range of q may be 0 to
or may be 1 to N/K. This is not specifically limited in this application. If the value range of i starts from 0, the value ranges of j and q may also start from 0, to facilitate better calculation. If the value range of i starts from 1, the value ranges of j and q may also start from 1, to facilitate better calculation. For example, the value range of i is 1 to 32, the value range of j may be 1 to 16, and the value range of q may be 1 to 2. For example, if ? is 6.5 and ? is 1,
[0096] After determining the combined data, the BBU may pack the combined data, the second data, and the compression factor number into a compressed package, and transmit the compressed package to the RRU through a CPRI. The RRU may decompress the compressed package to obtain the combined data, the second data, and the compression factor number. For example, after the RRU decompresses the compressed package, a length of obtained data is 246 bits, and the data may be split into a 6-bit compression factor number, 32 sign bits occupying 32 bits, and 16 pieces of combined data of a length of 13 bits. In addition, the BBU may directly inform the RRU of a value of ? or agree on a preset algorithm with the RRU, for example, calculate the value of ? by using Formula 0. This is not specifically limited in this application. The RRU may split the combined data into the first data by using Formula 4:
[0097] Z.sub.j*K+q represents first data with an index j*K+q in the N pieces of first data, j?[0,K?1], and E.sub.j represents combined data with an index j in the combined data. For example, each of the 16 pieces of combined data is split into two pieces of first data, and there are a total of 32 pieces of first data, where) ?=6.5.
[0098] After determining the first data, the RRU may search Table 2 for the compression factor based on the compression factor number, and restore the absolute value corresponding to the original data by referring to Formula 5. Formula 5 is as follows:
[0099] x.sub.i represents an absolute value corresponding to original data with an index i in the N pieces of original data, and C represents a compression factor used to compress the original data.
[0100] The RRU determines the absolute value corresponding to the original data, and may add a sign bit to each piece of absolute value data based on the second data, to restore the original data. Details are shown in Formula 6:
D.sub.i=x.sub.i*(?1).sup.S.sub.i Formula 6
[0101] Certainly, during actual application, if a BBU end separates the original data into the second data and the absolute value corresponding to the original data, when the original data is less than 0, the second data is 0; when the original data is greater than or equal to 0, the second data is 1, and Formula 6 may be adjusted to D.sub.i=x.sub.i*(?1).sup.1+S.sub.i
[0102] The following describes the communication method in this application with reference to a specific example, and possible parameters are shown in Table 3.
TABLE-US-00003 TABLE 3 Sign bit Physical meaning [D.sub.0; D.sub.1; . . . ; D.sub.N?1] Original data N Amount of original data [s.sub.0; s.sub.1; . . . ; s.sub.N?1] Second data [z.sub.0; z.sub.1; . . . ; z.sub.N?1] First data [E.sub.0; E.sub.1; . . . ; E.sub.K?1] Combined data K Amount of combined data [C.sub.0; C.sub.1; . . . ; C.sub.(2.sub.
[0103] During actual application, data transmitted by the BBU may be split into blocks, each block may include N pieces of original data, and the original data may be obtained by performing sampling and normalization processing on the transmitted data. During actual application, parameters shown in Table 4 below may be selected based on a transmission bandwidth allowed by a device. Table 4 is merely an example for description. During actual application, a block size may alternatively be another value, for example, 30 or 56. This is not specifically limited in this application. A bit width of combined data is related to the transmission bandwidth of the device and this is not limited herein. Only 13 bits are used as an example for description, and the bit width may be flexibly adjusted based on an actual requirement, for example, 33 bits or 65 bits. This is not specifically limited in this application. Data rate=Sampling rate*Antenna quantity*2*Average bit width.
TABLE-US-00004 TABLE 4 Bit width of a Bit width of Amount of Sampling Block compression combined combined Average bit rate Antenna size factor number data data in a width Data rate (MHz) quantity (N) (T) (L) block (K) (KL + T)/N + 1 (Mbps) 30.72 4 32 6 13 16 7.6875 1889.28
[0104] During data compression, the BBU may perform the following steps with reference to steps shown in
[0105] Step 301: The BBU splits transmitted data into blocks, to determine original data, for example, splits the transmitted data into a plurality of data blocks, where each data block includes 32 pieces of original data: [D.sub.0; D.sub.1; . . . ; D.sub.31].
[0106] Step 302: Split the original data into second data Si and absolute values x.sub.i of the original data, where the original data may be split by using Formula 0.
[0107] Step 303: Search for a maximum value x max in the absolute values of the original data.
[0108] Step 304: Determine a compression factor and a compression factor number based on the maximum value in the absolute values, where t is a selected compression factor number.
[0109] It can be learned from Table 2 that if x.sub.max is 4500, where 4096 (C.sub.1100)<4500?8192 (C.sub.1101), it can be learned that the compression factor number is 1101.
[0110] Step 305: Compress the absolute values of the original data based on the compression factor, to obtain first data, where ?=N/K, ?=L/?, and calculation may be performed by using Formula 2; when the parameters are the data in Table 4, ?=2, ?=6.5, and
and if L is 33, N is 30, and K is 5, ?=5, ?=6.6, and
[0111]
[0112] Step 306: Combine the first data to obtain combined data, where the combined data may be determined by using Formula 3; if the data in Table 4 is used, E.sub.j=?.sub.q=0.sup.1z.sub.j*15+q* floor (2.sup.6.5*q), where j=0 to 15; and if L is 33, N is 30, and K is 5, ?=5, ?=6.6, and E.sub.j=?.sub.q=0.sup.4z.sub.j*6+q* floor(2.sup.6.6*q), where j=0 to 5.
[0113] Step 307: Compress the combined data, the compression factor number, and the second data, construct a compressed data packet, and transmit the compressed data packet to the RRU, where the data packet may be shown in Table 5 below.
TABLE-US-00005 TABLE 5 Compression factor number Second data Combined data t [s.sub.0; s.sub.1; . . . ; s.sub.N?1] [E.sub.0; E.sub.1; . . . ; E.sub.K?1]
[0114] Correspondingly, during decompression, the RRU may perform the following steps with reference to
[0115] Step 401: The RRU decompresses a data packet to obtain combined data, second data, and a compression factor number; and splits received data into blocks, where a length of each block is (T+N+KL) bits, and each block is split into a compression factor index t (T bits), sign bits [s.sub.0; s.sub.1; . . . ; s.sub.N?1], and combined data [E.sub.0; E.sub.1; . . . ; E.sub.K?1]; if the parameters in Table 4 are used, a length of each block may be 246 bits, and the block is split into one 6-bit compression factor code, 32 sign bits, and 16 pieces of combined data of a length of 13 bits; and if L is 33, N is 30, and K is 5, a length of each block may be 234 bits, and the block is split into one 6-bit compression factor code, 30 sign bits, and six pieces of combined data of a length of 33 bits.
[0116] Step 402: The RRU splits the combined data into first data, where the combined data may be split by using Formula 4. For example, each of the 16 pieces of combined data is split into two pieces of first data, and a total of 32 pieces of first data are obtained, where ?=6.5.
[0117] If each of the six pieces of combined data is split into five pieces of first data, a total of 30 pieces of first data are obtained, where ?=6.6.
[0118] Step 403: Search for a compression factor based on the compression factor number, and restore, based on the compression factor, the first data to an absolute value corresponding to the original data, where calculation may be performed by using Formula 5. For example
[0119] Step 404: The RRU restores the original data based on the second data and the absolute value corresponding to the original data, where calculation may be performed by using Formula 6. Details are not described in this application.
[0120] In this application, a granularity of a data bit width may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0121]
[0122] The processing unit 501 is configured to obtain first data based on N pieces of original data, an amount K of combined data, and a data bit width L of the combined data, where the first data is data obtained by compressing the original data, a data bit width corresponding to the first data is ?, ? is a non-integer greater than 0, and N, K, and L are positive integers; and determine the combined data based on ? and the first data. The interface unit 502 is configured to output the combined data.
[0123] It should be noted that the foregoing original data may be understood as uncompressed data, data stored in a communication apparatus, data collected by a collection apparatus connected to the communication apparatus (where for example, if the communication apparatus is connected to a voltage sensor, and a voltage value collected by the voltage sensor is 36 V, 36 V may be understood as original data), or the like. This is not specifically limited in this application. For example, when data is transmitted between the BBU and the RRU, a large bandwidth is occupied for directly transmitting original data, and a large quantity of optical fiber devices are required to carry the original data, resulting in high costs. In this application, considering a cost issue, the original data may be compressed, and compressed data may be combined to construct combined data for transmission.
[0124] During application of this application, considering an actual application environment of the communication apparatus, for example, a supported bandwidth and a data transmission rate, the data bit width L of the combined data may be determined based on the actual application environment of the communication apparatus. The first data may be obtained by performing data processing (weighting, a data operation, and the like) based on the data bit width L, the amount K of combined data, and the N pieces of original data. The first data may be understood as data obtained by compressing the original data. After data processing, the original data is compressed, and the data bit width corresponding to the first data is ?. ? may be understood as a data bit width corresponding to each piece of first data after a plurality of pieces of first data are combined. For example, first data A and first data B are combined into data C, a data bit width corresponding to the data C is L, and a data bit width corresponding to the first data A may be understood as ?. In addition, it should be further noted that ? may be data A obtained based on L, K, and N, or may be data obtained by processing the data A. This is not specifically limited in this application. For example, if the data A obtained based on L, K, and N is 6.5, ? may be 6.5, 6.4, or 6.3, or if the data A obtained based on L, K, and N is ?, ? may be 0.3, 0.33, or the like. This is not specifically limited in this application.
[0125] In this application, a granularity of the data bit width may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured. In an optional manner, the processing unit 501 is further configured to: [0126] obtain second data based on the N pieces of original data, where the second data represents positive and negative features of each of the N pieces of original data. The interface unit 502 is configured to output the combined data and the second data.
[0127] It should be noted that the original data has positive and negative values. During data transmission, plus and minus symbols of the original data and numerical values of the data are separated and calculated, so that the combined data that can be obtained is all positive numbers. In addition, during decompression, the combined data may be quickly decompressed, to avoid a calculation error caused by a data symbol participating in calculation. When calculation efficiency is improved, data processing efficiency can be improved.
[0128] In an optional manner, ? satisfies:
[0129] It should be noted that it can be learned from N/K that one piece of combined data is constructed by using several pieces of original data, and it can be learned from
that a bit width corresponding to one piece of original data after compression and combination may be a non-cyclic or cyclic decimal, and ? and ? may be summed to obtain a non-cyclic decimal. A granularity of the data bit width of ? determined in this manner may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0130] In an optional manner, the first data satisfies:
[0131] Z.sub.i represents first data with an index i in N pieces of first data, xi represents an absolute value corresponding to original data with an index i in the N pieces of original data, C represents a compression factor used to compress the original data, ??1, and i?[0,N?1].
[0132] In an optional manner, the combined data satisfies:
[0133] E.sub.j represents combined data with an index j in the combined data, Z.sub.j*K+q represents first data with an index j*K+q in the N pieces of first data, and j?[0,K?1].
[0134] In an optional manner, ? is 5.4, 6.4, 6.5, 6.8, or 7.5.
[0135] This application provides another communication apparatus. The interface unit 502 is configured to obtain combined data. The processing unit 501 is configured to determine the first data based on a data bit width ? corresponding to the first data and the combined data, where the first data is data obtained by compressing original data, and ? is a non-integer greater than 0; and determine N pieces of original data based on ? and the first data, where N is a positive integer.
[0136] It should be noted that the foregoing original data may be understood as uncompressed data, data stored in a communication apparatus, data collected by a collection apparatus connected to the communication apparatus (where for example, if the communication apparatus is connected to a voltage sensor, and a voltage value collected by the voltage sensor is 36 V, 36 V may be understood as original data), or the like. This is not specifically limited in this application. For example, when data is transmitted between the BBU and the RRU, a large bandwidth is occupied for directly transmitting original data, and a large quantity of optical fiber devices are required to carry the original data, resulting in high costs. In this application, considering a cost issue, the original data may be compressed, and the compressed data may be combined to construct combined data for transmission.
[0137] During application of this application, considering an actual application environment of the communication apparatus, for example, a supported bandwidth and a data transmission rate, the data bit width L of the combined data may be determined based on the actual application environment of the communication apparatus. The first data may be obtained by performing data processing (weighting, a data operation, and the like) based on the data bit width L, the amount K of combined data, and the N pieces of original data. The first data may be understood as data obtained by compressing the original data. After data processing, the original data is compressed, and the data bit width corresponding to the first data is ?. ? may be understood as a data bit width corresponding to each piece of first data after a plurality of pieces of first data are combined. For example, first data A and first data B are combined into data C, a data bit width corresponding to the data C is L, and a data bit width corresponding to the first data A may be understood as ?. In addition, it should be further noted that ? may be data A obtained based on L, K, and N, or may be data obtained by processing the data A. This is not specifically limited in this application. For example, if the data A obtained based on L, K, and N is 6.5, ? may be 6.5, 6.4, or 6.3, or if the data A obtained based on L, K, and N is ?, ? may be 0.3, 0.33, or the like. This is not specifically limited in this application.
[0138] In this application, a granularity of the data bit width may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0139] In an optional manner, ? satisfies Formula 1, and Formula 1 is as follows:
[0140] It should be noted that it can be learned from N/K that one piece of combined data is constructed by using several pieces of original data, and it can be learned from
that a bit width corresponding to one piece of original data after compression and combination may be a non-cyclic or cyclic decimal, and ? and ? may be summed to obtain a non-cyclic decimal. A granularity of the data bit width of ? determined in this manner may be accurate to a decimal. Compared with a case in which only an integer data bit width is supported, this type of data bit width better meets an actual application requirement of a device, and a high SNR can be ensured while a data transmission rate is ensured.
[0141] In an optional manner, the first data satisfies Formula 4, and Formula 4 is as follows:
[0142] Z.sub.j*K+q represents first data with an index j*K+q in N pieces of first data, j?[0,K?1], and E.sub.j represents combined data with an index j in the combined data.
[0143] In an optional manner, the original data satisfies Formula 5, and Formula 5 is as follows:
[0144] x.sub.i represents an absolute value corresponding to original data with an index i in the N pieces of original data, C represents a compression factor used to compress the original data, ??1, and i?[0,N?1].
[0145] In addition,
[0146] The communication apparatus 600 may include at least one processor 610, and the communication apparatus 600 may further include at least one memory 620, configured to store a computer program, program instructions, and/or data. The memory 620 is coupled to the processor 610. The coupling in embodiments of this application may be an indirect coupling or a communication connection between apparatuses, units, or modules in an electrical form, a mechanical form, or another form, and is used for information exchange between the apparatuses, the units, or the modules. The processor 610 may perform an operation in cooperation with the memory 620. The processor 610 may execute the computer program stored in the memory 620. Optionally, the at least one memory 620 may alternatively be integrated with the processor 610.
[0147] Optionally, during actual application, the communication apparatus 600 may include a transceiver 630 or may not include a transceiver 630. A dashed box is used as an example in the figure. The communication apparatus 600 may exchange information with another device by using the transceiver 630. The transceiver 630 may be a circuit, a bus, a transceiver, or any other apparatus that can be configured to perform information exchange.
[0148] In a possible implementation, the communication apparatus 600 may be used in the foregoing terminal device, or may be the foregoing BBU, or may be the foregoing RRU. The memory 620 stores a necessary computer program, program instructions, and/or data for implementing a function of the BBU or the RRU in any one of the foregoing embodiments. The processor 610 may execute the computer program stored in the memory 620, to complete the method in any one of the foregoing embodiments.
[0149] A specific connection medium between the transceiver 630, the processor 610, and the memory 620 is not limited in embodiments of this application. In embodiments of this application, the memory 620, the processor 610, and the transceiver 630 are connected by using a bus in
[0150] In embodiments of this application, the memory may be a non-volatile memory, for example, a hard disk (hard disk drive, HDD), a solid-state drive (solid-state drive, SSD), or the like, or may be a volatile memory (volatile memory), for example, a random access memory (random-access memory, RAM). The memory may alternatively be any other medium that can be configured to carry or store expected program code in an instruction form or a data structure form and that can be accessed by a computer. This is not limited. The memory in embodiments of this application may alternatively be a circuit or any other apparatus that can implement a storage function, and is configured to store the computer program, the program instructions, and/or the data.
[0151] Based on the foregoing embodiments, as shown in
[0152] Based on the foregoing embodiments, an embodiment of this application further provides a readable storage medium. The readable storage medium stores instructions, and when the instructions are executed, the communication method in any one of the foregoing embodiments is implemented. The readable storage medium may include any medium that can store a program code, such as a USB flash drive, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disc.
[0153] A person skilled in the art should understand that embodiments of this application may be provided as methods, systems, or computer program products. Therefore, this application may use a form of complete hardware embodiments, complete software embodiments, or embodiments with a combination of software and hardware. In addition, this application may use a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, an optical memory, and the like) that include computer-usable program code.
[0154] This application is described with reference to the flowcharts and/or the block diagrams of the method, the apparatus (system), and the computer program product according to this application. It should be understood that computer program instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of processes and/or blocks in the flowcharts and/or the block diagrams. These computer program instructions may be provided to a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing apparatus to generate a machine, so that the instructions executed by the computer or the processor of the another programmable data processing apparatus generate an apparatus for implementing a function specified in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
[0155] These computer program instructions may be alternatively stored in a computer-readable memory that can instruct a computer or another programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a function specified in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
[0156] These computer program instructions may be alternatively loaded onto a computer or another programmable data processing apparatus, so that a series of operations and steps are performed on the computer or the another programmable apparatus, to generate computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable apparatus provide steps for implementing a function specified in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.