A data processing method and apparatus
Through the data processing method based on the A-law compression characteristics, the index and fit coefficients of the target data are obtained, and the problem of low data interaction efficiency between the active antenna unit of the base station and the baseband processing unit is solved, and more efficient data compression and parallel processing are achieved.
Patent Information
- Application Number
- CN202010812465.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-13
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2040-08-13
AI Technical Summary
The existing data processing efficiency is low, especially in the data interaction between the base station active antenna unit and the baseband processing unit, the time domain A-law compression algorithm is inefficient.
The data processing method based on the A-law compression characteristics is adopted to obtain the index and fit coefficient information of the target data, and calculate and cut off the target data using the fit coefficient to obtain the target result data with fewer digits, which is suitable for parallel processing of multiple target data.
It improves the efficiency of data processing, reduces the data transmission bandwidth requirements and power consumption, and is suitable for parallel processing of multiple target data.
Smart Images

Figure CN114077605B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a data processing method and apparatus. Background Art
[0002] With the application of large-scale antenna arrays in 4G / 5G systems, the data interaction volume between the base station active antenna unit (AAU) and the baseband processing unit (BBU) has increased significantly. And data compression technology can reduce the data interaction volume between the AAU and the BBU, which not only reduces the bandwidth required for data transmission but also reduces power consumption.
[0003] However, the existing data compression technology uses the time-domain A-law compression algorithm, which is implemented through time-domain AGC automatic gain control and look-up tables, and has low efficiency. Summary of the Invention
[0004] The purpose of the present invention is to provide a data processing method and apparatus to solve the problem of low efficiency of existing data processing.
[0005] To achieve the above purpose, an embodiment of the present invention provides a data processing method, including:
[0006] Obtaining an index of target data;
[0007] Determining a fitting coefficient of the target data according to the index and fitting coefficient information;
[0008] Calculating the target data according to the fitting coefficient to obtain fitting result data;
[0009] Truncating the fitting result data to obtain target result data; where
[0010] the fitting coefficient information includes fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0011] Wherein, the fitting coefficient includes a first coefficient and a second coefficient, wherein the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), m represents the number of bits, and n, f represent the number of bits of the sign and integer.
[0012] Wherein, the obtaining of the index of the target data includes:
[0013] Performing a modulo operation on the valid data in the target data to obtain a first data; wherein the valid data is the data obtained by expanding the target data after extracting the sign bit;
[0014] Determine the segment to which the first data belongs to obtain the index.
[0015] Among them, the segment is a first-level segment or a two-level segment according to the A-law compression characteristic; among them,
[0016] The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number;
[0017] The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segments is obtained by shifting the data in the segment to the right by a second preset number, and the second preset numbers of different segment groups are different or the same.
[0018] Among them, determining the segment to which the first data belongs includes:
[0019] In the case where the segment is a first-level segment, shift the first data to the right by a first preset number to obtain a first identifier;
[0020] Take the first identifier as the index.
[0021] Among them, determining the segment to which the first data belongs includes:
[0022] In the case where the segment is a two-level segment, determine the target bit of the first data, and the target bit is the highest bit with bit information of 1;
[0023] According to the target bit, determine the second identifier of the segment group to which the first data belongs;
[0024] According to the segment group to which the first data belongs, determine the second preset number, and shift the first data to the right by the second preset number to obtain a third identifier;
[0025] Calculate the index according to the second identifier and the third identifier.
[0026] Among them, calculating the fitting result data according to the fitting coefficient for the target data includes:
[0027] Substitute the fitting coefficient and the first data into the linear fitting formula for calculation to obtain the fitting result data.
[0028] Among them, truncating the fitting result data to obtain the target result data includes:
[0029] Exclusive OR the fitting result data and the symbol data bit by bit to obtain a second data, and the symbol data is the data obtained by expanding the symbol bit extracted from the target data;
[0030] Perform an addition operation on the second data and the sign bit to obtain third data;
[0031] According to the compression number of bits, shift the third data to the right by N - K bits, and then intercept K bits of data starting from the high bit to obtain the target result data; where
[0032] K represents the compression number of bits, and N represents the number of bits of the third data.
[0033] Among them, the intercepting K bits of data starting from the high bit to obtain the target result data includes:
[0034] If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit, and then intercept K bits of data to obtain the target result data;
[0035] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0036] Among them, the determining the segment to which the first data belongs to obtain the index further includes:
[0037] When the first data is greater than the first threshold, change the first data to the first threshold;
[0038] When the first data is less than the second threshold, change the first data to the second threshold.
[0039] To achieve the above object, an embodiment of the present invention further provides a data processing device, including: a memory, a transceiver, and a processor;
[0040] The memory is used to store a computer program; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations:
[0041] Obtain the index of the target data;
[0042] Determine the fitting coefficient of the target data according to the index and the fitting coefficient information;
[0043] Calculate the target data according to the fitting coefficient to obtain the fitting result data;
[0044] Perform bit truncation on the fitting result data to obtain the target result data; where
[0045] The fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0046] Among them, the fitting coefficients include a first coefficient and a second coefficient. Among them, the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), where m represents the number of bits, and n and f represent the number of bits of the sign and integer respectively.
[0047] Among them, the processor is specifically further configured to:
[0048] Perform a modulo operation on the valid data in the target data to obtain a first data; among them, the valid data is the data obtained by extending the target data after extracting the sign bit;
[0049] Determine the segment to which the first data belongs to obtain the index.
[0050] Among them, the segment is a first-level segment or a two-level segment according to the A-law compression characteristic; among them,
[0051] The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number of bits;
[0052] The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segments is obtained by shifting the data in the segment to the right by a second preset number of bits. The second preset numbers of different segment groups are different or the same.
[0053] Among them, the processor is specifically further configured to:
[0054] In the case where the segment is a first-level segment, shift the first data to the right by a first preset number of bits to obtain a first identifier;
[0055] Use the first identifier as the index.
[0056] Among them, the processor is specifically further configured to:
[0057] In the case where the segment is a two-level segment, determine the target bit of the first data, where the target bit is the highest bit with a bit information of 1;
[0058] Determine a second identifier of the segment group to which the first data belongs according to the target bit;
[0059] Determine a second preset number according to the segment group to which the first data belongs, and shift the first data to the right by the second preset number of bits to obtain a third identifier;
[0060] Calculate the index according to the second identifier and the third identifier.
[0061] Among them, the processor is specifically further configured to:
[0062] Calculate by substituting the fitting coefficient and the first data into the linear fitting formula to obtain the fitting result data.
[0063] Wherein, the processor is further specifically configured to:
[0064] Exclusive-OR the fitting result data and the symbol data bit by bit to obtain second data, where the symbol data is the data obtained by extending the sign bit extracted from the target data;
[0065] Perform an addition operation on the second data and the sign bit to obtain third data;
[0066] According to the compression number of bits, shift the third data to the right by N - K bits and then intercept K bits of data from the high bit to obtain the target result data; wherein,
[0067] K represents the compression number of bits, and N represents the number of bits of the third data.
[0068] Wherein, the processor is further specifically configured to:
[0069] If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit and then intercept K bits of data to obtain the target result data;
[0070] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0071] Wherein, the processor is further specifically configured to:
[0072] In the case where the first data is greater than the first threshold, change the first data to the first threshold;
[0073] In the case where the first data is less than the second threshold, change the first data to the second threshold.
[0074] To achieve the above object, an embodiment of the present invention further provides a data processing device, including:
[0075] An acquisition module, configured to acquire an index of target data;
[0076] A first processing module, configured to determine a fitting coefficient of the target data according to the index and fitting coefficient information;
[0077] A second processing module, configured to calculate the target data according to the fitting coefficient to obtain fitting result data;
[0078] A third processing module, configured to truncate the fitting result data to obtain target result data; wherein,
[0079] The fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0080] Among them, the fitting coefficient includes a first coefficient and a second coefficient. Among them, the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), where m represents the number of bits, and n and f represent the number of bits of the sign and the integer.
[0081] Among them, the obtaining module includes:
[0082] A first operator module, configured to perform a modulo operation on the valid data in the target data to obtain a first data; wherein, the valid data is the data obtained by expanding the target data after extracting the sign bit;
[0083] A determining sub-module, configured to determine the segment to which the first data belongs to obtain the index.
[0084] Among them, the segmentation is a first-level segmentation or a two-level segmentation according to the A-law compression characteristic; among them,
[0085] In each segment of the first-level segmentation, the number of data is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number;
[0086] In each segment of the same component segment of the two-level segmentation, the number of data is the same, and the identifier corresponding to each segment of the same component segment is obtained by shifting the data in the segment to the right by a second preset number, and the second preset numbers of different segment groups are different or the same.
[0087] Among them, the determining sub-module is further configured to:
[0088] In the case that the segmentation is a first-level segmentation, shift the first data to the right by a first preset number to obtain a first identifier;
[0089] Use the first identifier as the index.
[0090] Among them, the determining sub-module is further configured to:
[0091] In the case that the segmentation is a two-level segmentation, determine the target bit of the first data, where the target bit is the highest bit with bit information of 1;
[0092] According to the target bit, determine a second identifier of the segment group to which the first data belongs;
[0093] According to the segment group to which the first data belongs, determine a second preset number, and shift the first data to the right by the second preset number to obtain a third identifier;
[0094] The index is calculated based on the second identifier and the third identifier.
[0095] Wherein, the second processing module is further configured to:
[0096] Substitute the fitting coefficient and the first data into a linear fitting formula for calculation to obtain the fitting result data.
[0097] Wherein, the third processing module includes:
[0098] A first processing sub-module, configured to perform a bitwise exclusive OR operation on the fitting result data and the symbol data to obtain second data, where the symbol data is data obtained by extending the sign bit extracted from the target data;
[0099] A second processing sub-module, configured to perform an addition operation on the second data and the sign bit to obtain third data;
[0100] A third processing sub-module, configured to shift the third data to the right by N - K bits according to the compression bit number, and intercept K bits of data from the high bit to obtain the target result data; wherein,
[0101] K represents the compression bit number, and N represents the bit number of the third data.
[0102] Wherein, the third processing sub-module is further configured to:
[0103] If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit, and intercept K bits of data to obtain the target result data;
[0104] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0105] Wherein, the determining module is further configured to:
[0106] In the case where the first data is greater than the first threshold, change the first data to the first threshold;
[0107] In the case where the first data is less than the second threshold, change the first data to the second threshold.
[0108] To achieve the above object, an embodiment of the present invention further provides a processor-readable storage medium, where the processor-readable storage medium stores a computer program, and when the processor executes the computer program, the steps of the data processing method as described above are implemented.
[0109] The above technical solution of the present invention has at least the following beneficial effects:
[0110] In the above technical solution of the embodiment of the present invention, by obtaining the index of the target data, the fitting coefficient applicable to the target data can be determined according to the index and the fitting coefficient information, so that the target data is calculated and truncated by using the determined fitting coefficient, and the target result data with fewer digits is obtained, completing data compression. Since the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, it can be applied to the parallel processing of multiple target data, greatly improving the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] Figure 1 is one of the schematic flowcharts of the data processing method according to the embodiment of the present invention;
[0112] Figure 2 is the second schematic flowchart of the data processing method according to the embodiment of the present invention;
[0113] Figure 3 is the third schematic flowchart of the data processing method according to the embodiment of the present invention;
[0114] Figure 4 is the schematic application diagram of the method according to the embodiment of the present invention;
[0115] Figure 5 is the structural block diagram of the data processing device according to the embodiment of the present invention;
[0116] Figure 6 is the module schematic diagram of the data processing device according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0117] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0118] In the embodiments of the present application, the term "a plurality" means two or more, and other quantifiers are similar thereto.
[0119] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0120] An embodiment of the present invention provides a data processing method and apparatus. Among them, the method and the apparatus are based on the same inventive concept. Since the principles of the method and the apparatus for solving problems are similar, the implementation of the apparatus and the method can be referred to each other, and the repeated parts will not be elaborated.
[0121] As Figure 1 shown, a data processing method provided by an embodiment of the present invention includes:
[0122] Step 101, obtaining an index of target data;
[0123] Step 102, determining a fitting coefficient of the target data according to the index and fitting coefficient information;
[0124] Step 103, calculating the target data according to the fitting coefficient to obtain fitting result data;
[0125] Step 104, truncating the fitting result data to obtain target result data; wherein,
[0126] the fitting coefficient information includes fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficients has a corresponding index.
[0127] Here, the target data is data to be compressed; the fitting coefficient information includes fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficients has a corresponding index. In this way, the method of the embodiment of the present application, according to steps 101-104, by obtaining the index of the target data, can determine the fitting coefficient applicable to the target data according to the index and the fitting coefficient information, and then calculate and truncate the target data by using the determined fitting coefficient to obtain target result data with fewer digits, completing data compression. Since it can be applied to parallel processing of multiple target data, the data processing efficiency is greatly improved.
[0128] Among them, the fitting coefficient information at least includes fitting coefficients of each segment and indexes corresponding to the fitting coefficients, so as to be used to find the fitting coefficient applicable to the target data. Of course, for intuitive and quick search, the fitting coefficient information can be implemented by a table. And because the fitting coefficients of each segment are obtained by piecewise linear approximation according to the A-law compression characteristic, therefore, for different A-law compression characteristics, the fitting coefficients of each segment obtained by piecewise linear approximation are different, and the corresponding relationship between the fitting coefficients and the indexes is also different.
[0129] As can be seen from the above, in this embodiment, for each segment of fitting coefficients, they are obtained by piecewise linear approximation according to the A-law compression characteristic, and the linear fitting formula includes two coefficients. Optionally, the fitting coefficients include a first coefficient and a second coefficient, where the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), m represents the number of bits, and n, f represent the number of bits of the sign and integer.
[0130] Here, m, n, and f are all parameters configured corresponding to the A-law compression characteristic. By calibrating the first coefficient a and the second coefficient b, applicable fitting parameters are obtained for subsequent processing.
[0131] For example, in A-law compression with A = 10, a is calibrated as Q(16, 3); b is calibrated as Q(16, 1). At this time, the fitting coefficient information for A = 10 is shown in Table 1:
[0132]
[0133] Table 1
[0134] In A-law compression with A = 87.6, a is calibrated as Q(16, 5); b is calibrated as Q(16, 1). At this time, the fitting coefficient information for A = 87.6 is shown in Table 2:
[0135]
[0136] Table 2
[0137] From Table 1 and Table 2, it can be seen that the A-law compression characteristics are different, and the fitting coefficient information for both is also different. It should be noted that the "corresponding data range" in Table 1 and Table 2 is only a display of the data corresponding to the index, and the fitting coefficient information in actual application does not include this content. Moreover, data X is the data after the target data is preprocessed.
[0138] In this embodiment, considering the diversification of the types of target data, optionally, step 101 includes:
[0139] Perform a modulo operation on the valid data in the target data to obtain a first data; where the valid data is the data obtained by expanding the target data after extracting the sign bit;
[0140] Determine the segment to which the first data belongs to obtain the index.
[0141] Thus, after preprocessing the target data to obtain the first data, it will be possible to more conveniently determine its belonging segment, obtain the corresponding index, and search for the fitting coefficient. This preprocessing is to extract the sign bit of the target data, then expand it to obtain the effective data x, and then perform a modulo operation on the effective data x, so the first data X = |x|. By determining the segment to which the first data belongs, the index can be obtained.
[0142] Among them, the sign bit is the highest bit of the data, indicating the positive or negative of the target data. After extracting the sign bit, the sign bit will be expanded to the length of the target data to ensure the subsequent addition of the sign bit. Taking the target data as 16-bit data as an example, the sign bit is the 16th bit. If the sign bit is 0, it is expanded to 0x0000, and if the sign bit is 1, it is expanded to 0xffff. The first data X corresponding to the 16-bit target data can be calibrated as Q(16, 1).
[0143] In the embodiments of the present application, combined with the A-law compression characteristic, the data segmentation method will be different. Optionally, the segmentation is a one-level segmentation or a two-level segmentation according to the A-law compression characteristic; among them,
[0144] the number of data in each segment of the one-level segmentation is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by the first preset number;
[0145] the number of data in each segment of the same-component segments of the two-level segmentation is the same, and the identifier corresponding to each segment of the same-component segments is obtained by shifting the data in the segment to the right by the second preset number, and the second preset numbers of different segment groups are different or the same.
[0146] That is, the segmentation method of the one-level segmentation is to evenly segment the data. The identifier of each segment is obtained by shifting the data in the segment to the right by the first preset number. At this time, the identifier of each segment is the index corresponding to the data in the segment. Here, the first preset number is determined according to the number of bits of the data. This segmentation method is applicable to scenarios with an A-law compression characteristic similar to A = 87.6. For example, when A = 87.6 and the data is 16-bit, it can be evenly divided into 32 segments according to this segmentation method. Set the first preset number rsh_tab = 10, and the index idx_lut is calculated by the formula idx_lut = (X >> rsh_tab), and the index is calibrated as Q(6, 6).
[0147] The two - level segmentation method first groups the data and then evenly segments each group, where each group segmentation forms a segmentation group. In this way, the identifier of each segment (i.e., the sub - segment identifier) is only the identifier of the segment within the belonging segmentation group, and this identifier is obtained by shifting the data in the segment to the right by a second preset number. Here, the second preset number is set for the segmentation group. Different segmentation groups can have the same second preset number or different second preset numbers, which is determined according to the number of bits of the data and the data range in each segmentation group. This segmentation method is applicable to scenarios with A - law compression characteristics similar to A = 10. For example, when A = 10 and for 16 - bit data, 16 = 2 4 , it can be first divided into 4 groups according to this segmentation method, namely segmentation group 0 (i.e., the segmentation group identifier is 0), segmentation group 1 (i.e., the segmentation group identifier is 1), segmentation group 2 (i.e., the segmentation group identifier is 2), and segmentation group 3 (i.e., the segmentation group identifier is 3). Among them, the data range of segmentation group 0 is 0 - 4095, the data range of segmentation group 1 is 4096 - 8191, the data range of segmentation group 2 is 8192 - 16383, and the data range of segmentation group 3 is 16384 - 32767. For the segmentation group, the second preset number rsh_tab = [10 10 11 12] can be set, that is, the second preset number of segmentation group 0 is 10, the second preset number of segmentation group 1 is 10, the second preset number of segmentation group 2 is 11, and the second preset number of segmentation group 3 is 12. In each segmentation group, it is evenly divided into 4 segments, as shown in Table 3 below:
[0148]
[0149] Table 3
[0150] In this way, the index idx_lut needs to be obtained through the segmentation group identifier idx_sec and the sub - segment identifier idx_subsec. idx_lut = idx_sec * u+idx_subsec, where u represents the number of segmentation groups, that is, idx_lut = idx_sec * 4+idx_subsec, and the index scaling is U(4, 4).
[0151] In addition, in this embodiment, the number of data in each segmentation group can be different or the same.
[0152] Based on different segmentation methods, optionally, determining the segment to which the first data belongs includes:
[0153] In the case where the segment is a one - level segment, shift the first data to the right by a first preset number to obtain a first identifier;
[0154] Use the first identifier as the index.
[0155] In this way, for the case where the segmentation is at the first level, such as A = 87.6, the first identifier obtained by shifting the first data X to the right by the first preset number is the index for determining the fitting coefficient of the target data. For example, when A = 87.6 and X = 15350, converting X to 16-bit binary gives "0011101111110110", and shifting it to the right by 10 bits gives "0000000000001110", and the obtained index is 14. Then, referring to Table 2, the corresponding fitting coefficient can be determined according to this index.
[0156] Optionally, as Figure 2 shown, determining the segment to which the first data belongs includes:
[0157] Step 201, in the case where the segmentation is at the two-level segmentation, determine the target bit of the first data, where the target bit is the highest bit with bit information of 1;
[0158] Step 202, according to the target bit, determine the second identifier of the segment group to which the first data belongs;
[0159] Step 203, according to the segment group to which the first data belongs, determine the second preset number, and shift the first data to the right by the second preset number to obtain the third identifier;
[0160] Step 204, calculate the index according to the second identifier and the third identifier.
[0161] As can be seen from the above, for the segmentation method corresponding to the two-level segmentation, the index needs to be calculated through the segment group identifier and the sub-segment identifier. Therefore, according to Steps 201 - 204, in the case where the segmentation is at the two-level segmentation, such as A = 10, it is necessary to determine the second identifier (i.e., the segment group identifier) of the segment group to which the first data belongs and the third identifier (i.e., the sub-segment identifier) of the first data, and then calculate the index. Among them, the second identifier is obtained from the highest bit with bit information of 1 in the first data; the third identifier is obtained by determining the second preset number in combination with the segment group to which the first data belongs and then shifting the first data to the right by the second preset number.
[0162] Among them, for the first data, there may be one or more bits with bit information of 1, and the target bit is the highest bit among these one or more bits. And the number of bits of the target bit is counted starting from 0. For example, the first data is an L-bit data, L = 8. Since the first bit (i.e., the 0th bit) and the fourth bit (i.e., the 3rd bit) of this first data have bit information of 1, the target bit of this first data is 3. For the first data "0001010000000000", the target bit is 12.
[0163] In this embodiment, the highest bit with bit information of 1 corresponds to the R-th bit counted from low to high. Since the lowest bit of the data is bit 0, the target bit is bit R - 1. After shifting the first data, the third identifier can be represented by the information of the valid bits after the shift, where the valid bits are the lowest T bits, and T is determined by the number of bits corresponding to the total number of segment groups. For example, if the number of segment groups is 4, then T = 2.
[0164] For example, when A = 10, the data is segmented into segment group 0, segment group 1, segment group 2, and segment group 3. For a 16-bit target data, segment group 0: X = [0, 2 12 ); segment group 1: X = [2 12 , 2 13 ); segment group 2: X = [2 13 , 2 14 ); segment group 3: X = [2 14 , 2 15 ), and the exponent range is 0 to 14. If the first data is 5120, which is represented as "0001010000000000" in 16 bits, then the highest bit with bit information of 1 is 12 (i.e., R = 13), the target bit is 12, and it can be determined that the first data belongs to segment group 1, and the second identifier is 1. The target bit is calibrated as U(4, 4), and then 1100 is obtained. Further, the second preset number rsh_tab corresponding to segment group 1 is 10. Therefore, the shifted first data is "0000000000000101", and from the valid bits (i.e., the last two bits) "01", the third identifier is 1. Finally, the index corresponding to the first data is 1 * 4 + 1 = 5. In this way, combined with Table 1, the corresponding fitting coefficient can be determined according to this index.
[0165] In this embodiment, after determining the fitting coefficient according to steps 101 - 104, the calculation of the fitting result data needs to be performed. Optionally, step 103 includes:
[0166] Substitute the fitting coefficient and the first data into the linear fitting formula for calculation to obtain the fitting result data.
[0167] Here, the linear fitting formula is Y = a * X + b. After substituting the determined first coefficient a, second coefficient b, and the first data X into this linear fitting formula, the fitting result data Y can be obtained through calculation.
[0168] Among them, if A = 10, a is calibrated as Q(16, 3), b is calibrated as Q(16, 1), X is calibrated as Q(16, 1), then the result of a * X is Q(32, 3). But for adding with b, a * X is calibrated as Q(16, 1). First, shift the result of a * X left by 3 bits, and then intercept the high 16 bits. The corresponding Y is calibrated as Q(16, 1). Among them, Y is greater than 215 (The maximum value of the first data), saturation processing will be performed, and Y = 2 will be taken. 15 。
[0169] If A = 87.6, a is calibrated to Q(16, 5), b is calibrated to Q(16, 1), and X is calibrated to Q(16, 1), then a*X is also calibrated to Q(16, 1). Moreover, since the result of a*X is Q(32, 5), it is necessary to first shift left by 5 bits and then intercept the high 16 bits. The corresponding Y is calibrated to Q(16, 1). Of course, when Y is greater than 2 15 (The maximum value of the first data), saturation processing will be performed, and Y = 2 will be taken. 15 。
[0170] After obtaining the fitting result data, the next step 104 is executed. Optionally, as Figure 3 shown, step 104 includes:
[0171] Step 301, perform a bitwise exclusive OR on the fitting result data and the sign data to obtain a second data, where the sign data is the data obtained by expanding the sign bit extracted from the target data;
[0172] Step 302, perform an addition operation on the second data and the sign bit to obtain a third data;
[0173] Step 303, according to the compression bit number, shift the third data to the right by N - K bits and then intercept K bits of data from the high bit to obtain the target result data; where
[0174] K represents the compression bit number, and N represents the number of bits of the third data.
[0175] Here, the compression bit number is the number of bits of data expected to be achieved in this data processing. To restore the sign bit, first perform a bitwise exclusive OR on the fitting result data obtained in step 103 and the sign bit data to obtain a second data; then, perform an addition operation on the second data and the sign bit to obtain a third data; finally, according to the compression bit number, shift the third data to the right by N - K bits and then intercept K bits of data from the high bit to obtain the target result data.
[0176] Taking the target data of 16 bits, the compression bit number of 7 bits, and K = 7 as an example, if the sign bit of the target data is 0, after being extended to the sign bit data S = 0x0000. The fitting result data Y = 0x0001, then the second data obtained after bitwise XOR is 0x0001. And S needs to be shifted right by 15 bits to complete the addition operation, and the third data W = 0x0001 after the addition operation. If the sign bit of the target data is 1, after being extended to the sign bit data S = 0xffff, the fitting result data Y = 0x0001, then the second data obtained after bitwise XOR is 0xfffe. Similarly, S needs to be shifted right by 15 bits to complete the addition operation, and the third data W = 0xfffe + 0x0001 = 0xffff. Therefore, W = (S xor Y) + (S >> 15), and W is calibrated to Q(16, 1). After obtaining the third data, the desired target result data can be obtained by intercepting K bits of data starting from the high bit.
[0177] Considering the influence of bit truncation on the data size, optionally, the obtaining the target result data by intercepting K bits of data starting from the high bit includes:
[0178] If the bit value of the (K + 1)-th bit is 1, then after adding 1 to the bit value of the K-th bit, intercept K bits of data to obtain the target result data;
[0179] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0180] That is, during the process of intercepting data, the retained K bits of data will be adjusted in combination with the size of the data being intercepted. That is, if the (K + 1)-th bit of the fitting result data is 1, then after performing the calculation of adding 1 to the K-th bit of the fitting result data, then intercept the high K bits of data to obtain the target result data; if it is 0, then directly intercept the high K bits of the fitting result data to obtain the target result data.
[0181] Continuing the above example, if W = 0x0001 and its 8th bit is 0, then the target result data Z is "0000000"; if W = 0xffff and its 8th bit is 1, then the target result data Z is "0000000". That is, the bit truncation of the target result data Z will be rounded.
[0182] In addition, in the embodiments of the present application, the segmentation is completed based on the data range. Therefore, optionally, the obtaining the index by determining the segmentation to which the first data belongs further includes:
[0183] In the case where the first data is greater than the first threshold, changing the first data to the first threshold;
[0184] In the case where the first data is less than the second threshold, change the first data to the second threshold.
[0185] Here, the first threshold is the maximum value of the segmented data, and the second threshold is a predetermined value in the segmented data. Of course, for data less than the second preset, it is still within the range of the segmented data, and the first data less than the second threshold may not be changed.
[0186] The following combines Figure 4 to illustrate the application of the method of the embodiment of the present application:
[0187] In the current scenario, A = 10. For 16-bit data, its fitting coefficient information is shown in Table 1. The segmented groups include: segmented group 0, segmented group 1, segmented group 2, and segmented group 3. The relationship between the segmented group identifier and the sub-segment identifier is shown in Table 3. The compression position K = 7. Therefore, the input target data 16384 can be represented as "1100000000000000" for 16 bits, where the highest bit "1" is the sign bit. First, extract the sign bit. After extracting the sign bit, the remaining data after extracting the sign bit is subjected to extension and modulo operation to obtain the first data X "0100000000000000", and X is calibrated to Q(16,1). The sign bit is extended to obtain the sign data S = 0xffff. Then it is judged whether clipping is required. Since X is not greater than 32767 (the first threshold) and not less than 8 (the second threshold), no clipping is required currently. If X is greater than 32767 or less than 8, then clipping is performed. If X is greater than 32767, then X = 32767; if X is less than 8, then X = 8. Since the target bit in the first data is 14, the second identifier (segmented group identifier) is 3, and the first data belongs to segmented group 3. Further, the second preset number rsh_tab corresponding to segmented group 1 is 11. Therefore, the shifted first data is "0000000000001000", and the third identifier (sub-segment identifier) is 0 obtained from the valid bits (i.e., the last two bits) "00". Thus, the index corresponding to X is 3*4 + 0 = 12. In this way, combined with Table 1, the corresponding fitting coefficients can be determined according to this index, a = 0.539673, b = 0.529419. Substitute a, b, and X into the linear fitting formula to calculate Y = a*X + b, and Y is calibrated to Q(16,1). Then, after bitwise exclusive OR of the fitting result data and the sign bit data with the sign bit, an addition operation is performed with the sign bit to obtain the third data W, W = (S xor Y)+(S>>15). Finally, by intercepting K bits of data starting from the high bit, the desired 7-bit target result data can be obtained and output, and the target result data is calibrated to Q(7,1).
[0188] In summary, the method of the embodiment of the present application can determine the fitting coefficient applicable to the target data according to the index and the fitting coefficient information by obtaining the index of the target data, and then perform truncation on the target data after calculation using the determined fitting coefficient to obtain the target result data with fewer digits, completing data compression. Since the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, it can be applied to the parallel processing of multiple target data, greatly improving the data processing efficiency.
[0189] Among them, the selection of the segmentation boundary is optimized for convenient implementation, and each segment uses linear approximation. Considering the compression characteristic, different segmentation methods are adopted to ensure the consistency of data processing in each segment, improve the operation parallelism, and reduce the implementation complexity. Compared with the traditional method, it avoids the serious problem of the decline in DSP processing efficiency caused by the traditional A-law compression when a group of data (such as 16 data) is processed simultaneously, where different data pass through different judgment branches during the many-to-one look-up table. The method of piecewise linear fitting performs unified parallel processing on the input data, improves the DSP processing parallelism, and ensures the realizability of real-time compression processing.
[0190] It should be noted that the device applying the above method in the embodiment of the present invention can be a terminal or a network-side device. The network-side device can be, but is not limited to: a base station, a Central Unit (CU).
[0191] As Figure 5 shown, the embodiment of the present invention also provides a data processing device, including: a memory 520, a transceiver 500, and a processor 510: The memory 520 is used to store a computer program; the transceiver 500 is used to transmit and receive data under the control of the processor 510; the processor 510 is used to read the computer program in the memory 520 and perform the following operations:
[0192] Obtain the index of the target data;
[0193] Determine the fitting coefficient of the target data according to the index and the fitting coefficient information;
[0194] Calculate the target data according to the fitting coefficient to obtain the fitting result data;
[0195] Perform truncation on the fitting result data to obtain the target result data; where
[0196] the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0197] Among them, the fitting coefficients include a first coefficient and a second coefficient. Among them, the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), where m represents the number of bits, and n and f represent the number of bits of the sign and the integer.
[0198] Among them, the processor is further specifically configured to:
[0199] Perform a modulo operation on the valid data in the target data to obtain a first data; among them, the valid data is the data obtained by extending the target data after extracting the sign bit;
[0200] Determine the segment to which the first data belongs to obtain the index.
[0201] Among them, the segment is a first-level segment or a two-level segment according to the A-law compression characteristic; among them,
[0202] The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number;
[0203] The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segment is obtained by shifting the data in the segment to the right by a second preset number, and the second preset numbers of different segment groups are different or the same.
[0204] Among them, the processor is further specifically configured to:
[0205] In the case where the segment is a first-level segment, shift the first data to the right by a first preset number to obtain a first identifier;
[0206] Use the first identifier as the index.
[0207] Among them, the processor is further specifically configured to:
[0208] In the case where the segment is a two-level segment, determine the target bit of the first data, and the target bit is the highest bit with the bit information being 1;
[0209] Determine the second identifier of the segment group to which the first data belongs according to the target bit;
[0210] Determine the second preset number according to the segment group to which the first data belongs, and shift the first data to the right by the second preset number to obtain a third identifier;
[0211] Calculate the index according to the second identifier and the third identifier.
[0212] Among them, the processor is further specifically configured to:
[0213] Substitute the fitting coefficient and the first data into the linear fitting formula for calculation to obtain the fitting result data.
[0214] Among them, the processor is specifically further configured to:
[0215] Exclusive OR the fitting result data and the symbol data bit by bit to obtain second data, where the symbol data is the data obtained by extending the sign bit extracted from the target data;
[0216] Perform an addition operation on the second data and the sign bit to obtain third data;
[0217] According to the compression number of bits, shift the third data to the right by N - K bits, and then intercept K bits of data from the high bit to obtain the target result data; where
[0218] K represents the compression number of bits, and N represents the number of bits of the third data.
[0219] Among them, the processor is specifically further configured to:
[0220] If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit, and then intercept K bits of data to obtain the target result data;
[0221] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0222] Among them, the processor is specifically further configured to:
[0223] In the case where the first data is greater than the first threshold, change the first data to the first threshold;
[0224] In the case where the first data is less than the second threshold, change the first data to the second threshold.
[0225] Among them, in Figure 5 The bus architecture can include any number of interconnected buses and bridges. Specifically, various circuits represented by one or more processors represented by processor 510 and memories represented by memory 520 are linked together. The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art. Therefore, they will not be further described herein. The bus interface provides an interface. The transceiver 500 can be multiple elements, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on a transmission medium, and these transmission media include wireless channels, wired channels, optical fiber cables, etc. The processor 510 is responsible for managing the bus architecture and general processing, and the memory 520 can store the data used by the processor 510 when performing operations.
[0226] The processor 510 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.
[0227] In the device according to the embodiment of the present invention, by obtaining the index of the target data, the fitting coefficient applicable to the target data can be determined according to the index and the fitting coefficient information, so that the target data is calculated and truncated by using the determined fitting coefficient, and the target result data with fewer bits is obtained, completing data compression. Since the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, it can be applied to the parallel processing of multiple target data, greatly improving the data processing efficiency.
[0228] It should be noted here that the above device provided by the embodiment of the present invention can implement all the method steps implemented by the above method embodiment and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment will not be specifically described herein.
[0229] As Figure 6 shown, the embodiment of the present invention also provides a data processing device, including:
[0230] An acquisition module 610, configured to acquire an index of target data;
[0231] A first processing module 620, configured to determine a fitting coefficient of the target data according to the index and the fitting coefficient information;
[0232] A second processing module 630, configured to calculate the target data according to the fitting coefficient to obtain a fitting result data;
[0233] A third processing module 640, configured to truncate the fitting result data to obtain target result data; wherein,
[0234] the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0235] Wherein, the fitting coefficient includes a first coefficient and a second coefficient. The first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), where m represents the number of bits, and n and f represent the number of bits of the sign and the integer.
[0236] Among them, the obtaining module includes:
[0237] A first operator module, configured to perform a modulo operation on the valid data in the target data to obtain first data; wherein, the valid data is the data obtained by extending the target data after extracting the sign bit;
[0238] A determining sub-module, configured to determine the segment to which the first data belongs to obtain the index.
[0239] Among them, the segment is a first-level segment or a two-level segment according to the A-law compression characteristic; wherein,
[0240] The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number;
[0241] The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segment is obtained by shifting the data in the segment to the right by a second preset number, and the second preset numbers of different segment groups are different or the same.
[0242] Among them, the determining sub-module is further configured to:
[0243] In the case where the segment is a first-level segment, shift the first data to the right by a first preset number to obtain a first identifier;
[0244] Use the first identifier as the index.
[0245] Among them, the determining sub-module is further configured to:
[0246] In the case where the segment is a two-level segment, determine the target bit of the first data, and the target bit is the highest bit with bit information of 1;
[0247] According to the target bit, determine the second identifier of the segment group to which the first data belongs;
[0248] According to the segment group to which the first data belongs, determine the second preset number, and shift the first data to the right by the second preset number to obtain a third identifier;
[0249] Calculate the index according to the second identifier and the third identifier.
[0250] Among them, the second processing module is further configured to:
[0251] Substitute the fitting coefficient and the first data into a linear fitting formula for calculation to obtain the fitting result data.
[0252] Among them, the third processing module includes:
[0253] The first processing sub-module is configured to perform a bitwise exclusive OR operation on the fitting result data and the symbol data to obtain second data, where the symbol data is the data obtained by expanding the symbol bits extracted from the target data;
[0254] The second processing sub-module is configured to perform an addition operation on the second data and the symbol bits to obtain third data;
[0255] The third processing sub-module is configured to shift the third data to the right by N - K bits according to the compression bits, and then intercept K bits of data from the high bit to obtain the target result data; where,
[0256] K represents the compression bits, and N represents the number of bits of the third data.
[0257] Wherein, the third processing sub-module is further configured to:
[0258] If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit, and then intercept K bits of data to obtain the target result data;
[0259] If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
[0260] Wherein, the determining module is further configured to:
[0261] In the case where the first data is greater than the first threshold, change the first data to the first threshold;
[0262] In the case where the first data is less than the second threshold, change the first data to the second threshold.
[0263] The device according to the embodiment of the present invention can, by obtaining the index of the target data, determine the fitting coefficient applicable to the target data according to the index and the fitting coefficient information, and then perform calculation on the target data using the determined fitting coefficient and then perform truncation to obtain the target result data with fewer bits, completing data compression. Since the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, it can be applied to the parallel processing of multiple target data, greatly improving the data processing efficiency.
[0264] It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software function modules.
[0265] When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0266] It should be noted here that the above device provided in the embodiments of the present invention can implement all the method steps implemented in the above method embodiments and can achieve the same technical effects. Therefore, the same parts and beneficial effects as those in the method embodiments will not be specifically described in this embodiment.
[0267] In some embodiments of the present invention, a processor-readable storage medium is further provided. The processor-readable storage medium stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0268] Obtain the index of the target data;
[0269] Determine the fitting coefficient of the target data according to the index and the fitting coefficient information;
[0270] Calculate the target data according to the fitting coefficient to obtain the fitting result data;
[0271] Truncate the fitting result data to obtain the target result data; where
[0272] The fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index.
[0273] When the processor executes the computer program, it can implement all the implementation manners in the method embodiments as shown in Figure 1 To avoid repetition, it will not be elaborated here.
[0274] The technical solutions provided by the embodiments of this application can be applicable to multiple systems, especially 5G systems. For example, the applicable systems can be Global System of Mobile communication (GSM) systems, Code Division Multiple Access (CDMA) systems, Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS) systems, Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunication System (UMTS), Worldwide interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems, etc. Both terminal devices and network devices are included in these multiple systems. The core network part can also be included in the system, such as the Evolved Packet System (EPS), 5G System (5GS), etc.
[0275] The device involved in the embodiments of the present application can be a terminal device, such as a device that provides voice and / or data connectivity to users, a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device can be called a user equipment (UE). The wireless terminal device can communicate with one or more core networks (CNs) via a radio access network (RAN). The wireless terminal device can be a mobile terminal device, such as a mobile phone (or a "cellular" phone) and a computer with a mobile terminal device. For example, it can be a portable, pocket-sized, handheld, computer-integrated, or vehicle-mounted mobile device, which exchanges language and / or data with the radio access network. For example, devices such as personal communication service (PCS) phones, cordless phones, session initiated protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), etc. The wireless terminal device can also be called a system, a subscriber unit, a subscriber station, a mobile station, a mobile, a remote station, an access point, a remote terminal device, an access terminal device, a user terminal device, a user agent, a user device, which is not limited in the embodiments of the present application.
[0276] The apparatus involved in the embodiments of this application may be a network-side device, such as a base station, which may include multiple cells that provide services to terminals. Depending on specific application scenarios, the base station may also be referred to as an access point, or may be a device in the access network that communicates with wireless terminal devices through one or more sectors over the air interface, or have other names. The network device can be used to mutually replace the received air frames and Internet Protocol (IP) packets, acting as a router between the wireless terminal device and the rest of the access network, where the rest of the access network may include an Internet Protocol (IP) communication network. The network device can also coordinate the attribute management of the air interface. For example, the network device involved in the embodiments of this application may be a network device (Base Transceiver Station, BTS) in a Global System for Mobile communications (GSM) or Code Division Multiple Access (CDMA), may also be a network device (NodeB) in a Wide-band Code Division Multiple Access (WCDMA), may also be an evolved network device (evolutional Node B, eNB or e-NodeB) in a Long Term Evolution (LTE) system, a 5G base station (gNB) in a 5G network architecture (next generation system), may also be a Home evolved Node B (HeNB), a relay node, a femto, a pico, etc., which are not limited in the embodiments of this application. In some network architectures, the network device may include a Centralized Unit (CU) node and a Distributed Unit (DU) node, and the centralized unit and the distributed unit may also be geographically separated.
[0277] The network-side device and the terminal device can each use one or more antennas for multi-input multi-output (MIMO) transmission. The MIMO transmission can be single-user MIMO (SU-MIMO) or multi-user MIMO (MU-MIMO). According to the form and quantity of the root antenna combination, the MIMO transmission can be 2D-MIMO, 3D-MIMO, FD-MIMO, or massive-MIMO, or it can be diversity transmission, precoding transmission, beamforming transmission, etc.
[0278] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) that contain computer-usable program code.
[0279] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0280] These processor-executable instructions can also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the processor-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0281] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide for implementing the functions specified in Figure 1One or more processes and / or boxes Figure 1 Steps of the functions specified in one or more boxes.
[0282] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.
Claims
1. A data processing method, characterized in that, include: Get the index of the target data; Determining the fitting coefficient of the target data according to the index and the fitting coefficient information; Calculating the target data according to the fitting coefficient to obtain fitting result data; The fitting result data is truncated to obtain the target result data; wherein, The fitting coefficient information includes fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each fitting coefficient of each segment has a corresponding index; The step of obtaining the index of the target data includes: Performing a modulo operation on the valid data in the target data to obtain first data; wherein the valid data is data obtained by expanding the target data after extracting the sign bit; Determine the segment to which the first data belongs, and obtain the index; The segmentation is one-level segmentation or two-level segmentation according to the A-law compression characteristics; wherein, The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by right shifting the data in the segment by a first preset number; The number of data in each segment of the same group of segments of the two-level segmentation is the same, and the identifier corresponding to each segment of the same group of segments is obtained by right shifting the data in the segment by a second preset number, and the second preset numbers of different segment groups are different or the same; The determining the segment to which the first data belongs includes: In the case where the segmentation is a two-level segmentation, determining a target bit of the first data, the target bit being a highest bit whose bit information is 1; Determining, according to the target bit, a second identifier of a segment group to which the first data belongs; Determine a second preset number according to the segment group to which the first data belongs, and right-shift the first data by the second preset number to obtain a third identifier; The index is calculated according to the second identifier and the third identifier.
2. The method according to claim 1, wherein The fitting coefficients include a first coefficient and a second coefficient, wherein the first coefficient is calibrated to Q(m, n), and the second coefficient is calibrated to Q(m, f), where m represents the number of bits, and n and f represent the number of bits of symbols and integers.
3. The method according to claim 1, characterized in that, The determining the segment to which the first data belongs includes: In the case where the segment is a first-level segment, the first data is right-shifted by a first preset amount to obtain a first identifier; The first identifier is used as the index.
4. The method according to claim 1, wherein The step of calculating the target data according to the fitting coefficient to obtain fitting result data includes: Substitute the fitting coefficient and the first data into a linear fitting formula to calculate and obtain the fitting result data.
5. The method according to claim 1, wherein The step of truncating the fitting result data to obtain target result data includes: Performing bitwise XOR on the fitting result data and the symbol data to obtain second data, wherein the symbol data is data obtained by expanding the symbol bit extracted from the target data; Performing an addition operation on the second data and a sign bit to obtain third data; According to the number of compressed bits, the third data is right-shifted by NK bits, and K bits of data are intercepted from the high bit to obtain the target result data; wherein, K represents the number of compressed bits, and N represents the number of bits of the third data.
6. The method according to claim 5, wherein The step of intercepting K bits of data from a high bit to obtain the target result data includes: If the bit value of the (K + 1)-th bit is 1, then after adding 1 to the bit value of the K-th bit, K-bit data is intercepted to obtain the target result data; If the bit value of the (K + 1)-th bit is 0, then K-bit data is directly intercepted to obtain the target result data.
7. The method according to claim 1, characterized in that The determining the segment to which the first data belongs to obtain the index further includes: When the first data is greater than the first threshold, changing the first data to the first threshold; When the first data is less than the second threshold, changing the first data to the second threshold.
8. A data processing device, characterized in that, Including: A memory, a transceiver, and a processor; The memory is used to store computer programs; The transceiver is used to transmit and receive data under the control of the processor; The processor is used to read the computer program in the memory and perform the following operations: Obtain the index of the target data; Determine the fitting coefficient of the target data according to the index and the fitting coefficient information; Calculate the target data according to the fitting coefficient to obtain the fitting result data; Perform truncation on the fitting result data to obtain the target result data; where, The fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment fitting coefficient has a corresponding index; The processor is specifically further used for: Perform a modulo operation on the valid data in the target data to obtain the first data; where the valid data is the data obtained by extension after extracting the sign bit from the target data; Determine the segment to which the first data belongs to obtain the index; The segment is a first-level segment or a two-level segment according to the A-law compression characteristic; where, The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is obtained by shifting the data in the segment to the right by a first preset number; The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segments is obtained by shifting the data in the segment to the right by a second preset number, and the second preset numbers of different segment groups are different or the same; The processor is specifically further used for: When the segment is a two-level segment, determine the target bit of the first data, and the target bit is the highest bit with a bit information of 1; Determine the second identifier of the segment group to which the first data belongs according to the target bit; Determine the second preset number according to the segment group to which the first data belongs, and shift the first data to the right by the second preset number to obtain the third identifier; Calculate the index according to the second identifier and the third identifier.
9. The device according to claim 8, characterized in that The fitting coefficient includes a first coefficient and a second coefficient, where the first coefficient is calibrated as Q(m, n), and the second coefficient is calibrated as Q(m, f), m represents the number of bits, and n, f represent the number of bits of the sign and the integer.
10. The device according to claim 8, characterized in that, The processor is specifically further used for: When the segment is a first-level segment, shift the first data to the right by a first preset number to obtain the first identifier; Use the first identifier as the index.
11. The device according to claim 8, characterized in that The processor is specifically further used for: Substitute the fitting coefficient and the first data into a linear fitting formula for calculation to obtain the fitting result data.
12. The device according to claim 8, wherein, The processor is specifically further used for: Perform a bitwise exclusive OR operation on the fitting result data and the symbol data to obtain second data, where the symbol data is the data obtained by expanding the sign bit extracted from the target data; Perform an addition operation on the second data and the sign bit to obtain third data; According to the compression bit number, after shifting the third data to the right by N - K bits, intercept K bits of data from the high bit to obtain the target result data; where, K represents the compression bit number, and N represents the number of bits of the third data.
13. The device according to claim 12, characterized in that, The processor is specifically further configured to: If the bit value of the (K + 1)-th bit is 1, then add 1 to the bit value of the K-th bit, and intercept K bits of data to obtain the target result data; If the bit value of the (K + 1)-th bit is 0, then directly intercept K bits of data to obtain the target result data.
14. The device according to claim 8, wherein The processor is specifically further configured to: In the case where the first data is greater than the first threshold, change the first data to the first threshold; In the case where the first data is less than the second threshold, change the first data to the second threshold.
15. A data processing device, characterized in that, Comprising: An acquisition module, configured to acquire an index of target data; A first processing module, configured to determine a fitting coefficient of the target data according to the index and fitting coefficient information; A second processing module, configured to calculate the target data according to the fitting coefficient to obtain fitting result data; A third processing module, configured to truncate the fitting result data to obtain target result data; where, A fourth processing module, where the fitting coefficient information includes the fitting coefficients of each segment obtained by piecewise linear approximation according to the A-law compression characteristic, and each segment of fitting coefficient has a corresponding index; The acquisition module includes: A first operation sub-module, configured to perform a modulo operation on the valid data in the target data to obtain first data; where the valid data is the data obtained by expanding the target data after extracting the sign bit; A determination sub-module, configured to determine the segment to which the first data belongs to obtain the index; The segment is a first-level segment or a two-level segment according to the A-law compression characteristic; where, The number of data in each segment of the first-level segment is the same, and the identifier corresponding to each segment is the data in the segment shifted to the right by a first preset number; The number of data in each segment of the same-component segments of the two-level segment is the same, and the identifier corresponding to each segment of the same-component segments is the data in the segment shifted to the right by a second preset number, and the second preset numbers of different segment groups are different or the same; The determination sub-module is further configured to: In the case where the segment is a two-level segment, determine the target bit of the first data, and the target bit is the highest bit with bit information of 1; Determine a second identifier of the segment group to which the first data belongs according to the target bit; Determine a second preset number according to the segment group to which the first data belongs, and shift the first data to the right by the second preset number to obtain a third identifier; Calculate the index according to the second identifier and the third identifier.
16. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and when the processor executes the computer program, the steps of the data processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data processing method and data processing device based on PCM compression coding
CN110784226A